原理:进入流放地后自动删除物品栏内所有回城卷
G$ z, @6 v5 h% C4 G! i方法: * i* t* O \: `8 M
一、将"删除回城.txt"放到script文件夹,在Script.SDB中加入相应的编号,我这是135 ' N( N. n/ u, J+ @9 g3 I4 h
二、在流放地随便放个NPC Notice列加上script的编号135 坐标 58 78 要保证进去后就能看到 ( E2 d) \0 ^% X$ c
三、"删除回城.txt"中回城卷的名字根据各服务器情况修改
6 Y2 P7 e. x) p( P0 ?3 x* h8 W四、由于不能检测技能栏中的回城卷 所以回城卷要设置成不能放入技能栏 也就是在Item.sdb里设置回城卷的boNotSkill为TRUE
" D9 D" @3 N' D# p删除回城.txt ! L% y3 g' x& |& a& g5 a0 M
unit 删除回城; 1 ^' v$ }& U7 O; U2 E1 c0 m+ H9 U
inte**ce
# Y3 \( n5 f/ L8 [ M# kfunction GetToken (aStr, aToken, aSep : String) : String;/ n8 T, f7 p1 G9 P& T! e0 z* q u z
function CompareStr (aStr1, aStr2 : String) : Boolean;& x% O4 U& e; K4 {! u2 G* D
function callfunc (aText: string): string;5 J6 E; w! {: I& h$ |$ |$ i
procedure print (aText: string);+ y3 D: `3 {. Y+ Z
function Random (aScope: integer): integer;
. p# T$ H" o0 h( j; ifunction Length (aText: string): integer;
$ U& h ]" ?0 |# n0 Gprocedure Inc (aInt: integer);6 q8 Y) @* c6 ?6 K$ O H
procedure Dec (aInt: integer);9 {& @3 b' a3 \, R: `7 }% o; ^5 x& q
function StrToInt (astr: string): integer;
$ q* N$ W6 ^5 a9 zfunction IntToStr (aInt: integer): string;
+ R* ~) G+ x$ ~% C# I! Zprocedure exit;
& K9 i: S. f R8 t8 Aprocedure OnCreate (aStr : String); " b. ?9 E/ ?$ c4 q
implementation + ~% B3 V# ?& Z
procedure OnCreate (aStr : String);
# E% X: W3 w J' F5 C% svar" p* G! x6 y# v+ V( d' @; z1 e
Str : String;" N# i/ M! a: w1 f: M/ u3 @1 R# K
iCount : String;% j# c! Z, j0 l7 U
GoBigMapItem : String = '回城卷';
, j8 s$ l' `4 h3 Cbegin
5 S9 b3 H* s7 A! C6 j r Str := 'getsenderitemcountbyname ' + GoBigMapItem;" q4 ?1 `1 k2 r; w
iCount := callfunc (Str);
: x! y- ?6 y( q: D3 m$ }3 w5 _ if iCount <> '0' then begin7 @1 f" }1 L! l
Str := 'getsenderitem ' + GoBigMapItem;
* X. k9 ~- z' z# c. Y8 k3 O- R Str := Str + ':';% ]+ C+ L2 r0 D+ j* W' t0 h
Str := Str + iCount;
Y- @$ _. s# w' q! P print (Str);
7 d2 C# f5 r; b' B% o end;
$ ^& N J) O3 H, t% _ exit;3 N, J9 G6 Y+ I4 x& E# ?( t+ \5 Z
end; 3 w$ L( i% P2 h6 f. y( I3 v: i
end. 7 w1 o$ Q$ [ K6 _7 M" o
|