原理:进入流放地后自动删除物品栏内所有回城卷
3 _5 R' ?* ]( h! [5 H# Q方法: " r* [, _2 S3 B# r* a; e; Y
一、将"删除回城.txt"放到script文件夹,在Script.SDB中加入相应的编号,我这是135 ; ?# f: l+ ] w: M8 N& e
二、在流放地随便放个NPC Notice列加上script的编号135 坐标 58 78 要保证进去后就能看到 ) R e& n$ v# l# ~
三、"删除回城.txt"中回城卷的名字根据各服务器情况修改 - O9 i" y9 m' I8 y
四、由于不能检测技能栏中的回城卷 所以回城卷要设置成不能放入技能栏 也就是在Item.sdb里设置回城卷的boNotSkill为TRUE
0 T9 A6 ^5 @- |7 h( r' ^删除回城.txt
1 V9 q! B" H/ N+ M. ?- Tunit 删除回城; t, y1 _; Z2 `3 E
inte**ce
. \+ y+ p6 y, g, @" W" Q& t% X) Cfunction GetToken (aStr, aToken, aSep : String) : String;# d5 {/ S5 g! @. K& F
function CompareStr (aStr1, aStr2 : String) : Boolean;5 k+ h' F- D* J& F) C$ T
function callfunc (aText: string): string;
! i! z3 j. [* W1 T& G1 Dprocedure print (aText: string);) s) D1 ~; ^4 W2 f
function Random (aScope: integer): integer;: b9 i: D0 n" Y4 L) T
function Length (aText: string): integer;% j3 {- m$ C; ?* x" x% \
procedure Inc (aInt: integer);$ b" |" B5 T. A) j# Q R! [: n
procedure Dec (aInt: integer);
) j- [2 ^* N7 C) ^8 \function StrToInt (astr: string): integer;- O. j- [% G2 f: X
function IntToStr (aInt: integer): string;
) Y+ F- i8 W u; k; zprocedure exit;
8 ^- b% |6 R9 X% J. K" f# _5 Cprocedure OnCreate (aStr : String); 1 Y' P$ z3 `* f9 r6 s+ l; D9 y
implementation
, y, X+ @* o7 g ^4 n) A, @. N) y2 zprocedure OnCreate (aStr : String);
* k) P6 ^9 l1 M e2 v. n8 {var
$ x( C: J, h4 y$ R6 Y) u9 b Str : String;- |3 H! { p& x* l" x8 e% ~6 G7 A- |
iCount : String;' Y$ s, T5 R5 \$ f% W
GoBigMapItem : String = '回城卷';
) g. [+ r. Y0 a. I+ ^" i( ebegin
T2 h) L6 f6 @3 }+ W$ K3 ]; p Str := 'getsenderitemcountbyname ' + GoBigMapItem;6 h* B/ y7 @/ m0 A; ~4 w% d9 [5 R
iCount := callfunc (Str);1 k+ _ i. Y+ \/ w. c2 |: o
if iCount <> '0' then begin/ w$ M' i) z# I" x4 O' y7 Z
Str := 'getsenderitem ' + GoBigMapItem;. @5 R( C* M: r0 U
Str := Str + ':';/ k* c* o, h2 R$ {: v; w
Str := Str + iCount;. a9 h% R! U- E+ [# x
print (Str);$ T7 F8 H8 _7 ~
end;7 V/ g" v( ^( z- F t7 C5 V
exit;
4 x$ R3 @. F4 {/ Send; ) L& q' D4 Z. n& l$ N7 M. N
end. , R& O& o" L" X5 p9 g f
|