原理:进入流放地后自动删除物品栏内所有回城卷
/ Z! b7 L' C; @, n3 {方法:
/ i& u5 P }0 k- j' l一、将"删除回城.txt"放到script文件夹,在Script.SDB中加入相应的编号,我这是135 ; I5 G& K5 P- ?' r
二、在流放地随便放个NPC Notice列加上script的编号135 坐标 58 78 要保证进去后就能看到
& D, z/ W" f, c7 d三、"删除回城.txt"中回城卷的名字根据各服务器情况修改
$ V) l/ ~, [, ^! t0 t( K. C; k四、由于不能检测技能栏中的回城卷 所以回城卷要设置成不能放入技能栏 也就是在Item.sdb里设置回城卷的boNotSkill为TRUE
6 v* a, b* | ~% b& u删除回城.txt ( S* G) I4 Q# u% U/ z) C
unit 删除回城; + m* f0 p& C) {' O8 D+ c# l
inte**ce ; I& u" [+ T' M
function GetToken (aStr, aToken, aSep : String) : String;: k5 T' e1 E1 U) q
function CompareStr (aStr1, aStr2 : String) : Boolean;
+ r9 v2 T m+ Q4 T1 hfunction callfunc (aText: string): string;2 Z6 m T+ G# Z6 {# T8 t
procedure print (aText: string);
" J0 n( L/ x$ m* f/ c* lfunction Random (aScope: integer): integer;" ]5 `- l8 b3 k4 z, U+ z) t
function Length (aText: string): integer;8 q1 @! v/ k( c+ O) c3 _" h8 g5 b
procedure Inc (aInt: integer);
& i" Z$ j7 j4 R3 I3 ~procedure Dec (aInt: integer);
% H' N$ d$ r! z! z1 `function StrToInt (astr: string): integer;
& w2 d1 q a* p+ Kfunction IntToStr (aInt: integer): string;9 s5 Y* u& W& d! P; t
procedure exit; " o; E% n/ H; L9 _
procedure OnCreate (aStr : String);
' n& w4 O1 }! Y; Kimplementation 2 G% h7 j6 @: B
procedure OnCreate (aStr : String);
. A5 R& t. K% A& Q$ Y# Y& Zvar6 j3 U; C$ D; z: }
Str : String;8 k. B6 e6 _- q K' x; d! W
iCount : String;* P; o: N% [( f& q D+ _+ z
GoBigMapItem : String = '回城卷';. U* @ K _0 x
begin
" H% o1 F+ L) Y* S W' ]! E Str := 'getsenderitemcountbyname ' + GoBigMapItem;& @$ J% V: A. n* D' }# r" W
iCount := callfunc (Str);1 y( K; [" b. I- L
if iCount <> '0' then begin }( Z5 u, ^& S. X
Str := 'getsenderitem ' + GoBigMapItem;
: R% `7 y$ C1 s- Z: m* V Str := Str + ':';" x* ]2 U& }# E! W! \
Str := Str + iCount;) q0 E& R' Q! l7 c
print (Str);
' u5 d0 V8 ? O+ i; f% B8 `4 |6 Y. E end;
% l% x4 C- @0 _9 w' J# z2 v) p exit;- B7 h: b) y% R( |
end; & T, O. ^6 f9 O* B
end.
1 {. w1 Z, f n$ @ |