原理:进入流放地后自动删除物品栏内所有回城卷 2 f# Z8 U* m6 O2 H
方法:
, {' p; U. r/ x% R一、将"删除回城.txt"放到script文件夹,在Script.SDB中加入相应的编号,我这是135
/ T/ G8 i/ r' N+ V二、在流放地随便放个NPC Notice列加上script的编号135 坐标 58 78 要保证进去后就能看到 ; X$ ] @+ g; @& E5 z
三、"删除回城.txt"中回城卷的名字根据各服务器情况修改
" f% h; d( }5 b# y四、由于不能检测技能栏中的回城卷 所以回城卷要设置成不能放入技能栏 也就是在Item.sdb里设置回城卷的boNotSkill为TRUE
- |/ D! o T- v& W删除回城.txt / H8 ^+ y& U* [2 l5 d3 |" R" `$ H
unit 删除回城; * v, q/ V+ l7 P( k
inte**ce ) S3 ~3 T6 r/ `8 ?2 p0 H. X
function GetToken (aStr, aToken, aSep : String) : String;4 _# I g3 }+ S& }
function CompareStr (aStr1, aStr2 : String) : Boolean;8 d2 J8 k0 C `
function callfunc (aText: string): string;
+ |- z0 A& b; xprocedure print (aText: string);0 b, ]% q: l! l X
function Random (aScope: integer): integer;" S' x/ p; j1 U' t4 [1 `' P
function Length (aText: string): integer;7 @/ M: ]: L o1 Y& E5 Y, R
procedure Inc (aInt: integer);1 R8 s9 p h% _) \5 W. S" U
procedure Dec (aInt: integer);5 d0 ^" S( h0 V3 f0 x, d" R: Y
function StrToInt (astr: string): integer;( H' B1 v3 Z8 _
function IntToStr (aInt: integer): string;
) d7 E4 ^1 U+ i2 d" U( ?- ^6 U# `procedure exit;
, S& {. N# R; Z) Uprocedure OnCreate (aStr : String);
- a' ?! A; t. V7 d/ |implementation 9 D+ T& x( @- [* J
procedure OnCreate (aStr : String);) [3 i/ H5 z: t, }+ R( Y
var! C M+ t4 @4 I3 U
Str : String;) m& n2 D8 m# H/ [
iCount : String;/ I" J$ }5 t# Z5 o5 F" A- r
GoBigMapItem : String = '回城卷';& [3 k* G; V7 Z9 J/ C
begin% l2 _9 H1 [2 ~# S* K: M* z* v
Str := 'getsenderitemcountbyname ' + GoBigMapItem;& z* t) R, I, T/ o. O4 U- ?
iCount := callfunc (Str);
0 H, q! h# d4 b- | if iCount <> '0' then begin
+ F7 y6 ]+ R' o5 a$ k3 P Str := 'getsenderitem ' + GoBigMapItem;
4 Z0 y! d) N+ F7 W l2 D Str := Str + ':';
& f6 T( j/ w, @1 }' ^8 \ Str := Str + iCount;2 C U4 E2 `$ }7 ]8 m7 g
print (Str);6 o2 Z) b) x6 p+ X5 r4 I* m1 B I
end;# m+ D, u. I" u
exit;
& w& O' S( b1 @( D. W# ^9 send;
: ~, @3 F# q- q& u% A. v% Yend.
2 K( k7 @1 G$ ?; O( w6 [. u' |& v |