原理:进入流放地后自动删除物品栏内所有回城卷 / p c! `% m% ^9 U
方法: / f" P$ G: Q; p
一、将"删除回城.txt"放到script文件夹,在Script.SDB中加入相应的编号,我这是135
C/ @" A1 @) }4 c' g二、在流放地随便放个NPC Notice列加上script的编号135 坐标 58 78 要保证进去后就能看到 ) S9 B9 e8 M( E/ _$ Z
三、"删除回城.txt"中回城卷的名字根据各服务器情况修改 & F( J _3 y3 \: G* B2 D3 [9 u* n$ v
四、由于不能检测技能栏中的回城卷 所以回城卷要设置成不能放入技能栏 也就是在Item.sdb里设置回城卷的boNotSkill为TRUE ' g# z% J3 y4 @
删除回城.txt
J# M, k8 }" Punit 删除回城; 3 j' ^4 J g! t3 }; a: @
inte**ce 2 m3 K* _4 ?0 ~. t" {. w: B
function GetToken (aStr, aToken, aSep : String) : String;
0 B' p6 s' t3 F7 Z' W6 R* C: Ifunction CompareStr (aStr1, aStr2 : String) : Boolean;# c+ @2 H4 O% f0 S/ y' P8 d$ t0 e
function callfunc (aText: string): string;
$ f S! p# v4 Q; m: [* j, uprocedure print (aText: string);
- V# J0 o. z" [+ ]4 V7 o- |$ \function Random (aScope: integer): integer;
B' U0 m; P9 Q, jfunction Length (aText: string): integer;
, L+ d5 d! j( }3 N; Z) vprocedure Inc (aInt: integer);
: V$ ]% q! x) g9 Cprocedure Dec (aInt: integer);
2 b1 s7 t/ R0 ^0 q wfunction StrToInt (astr: string): integer;
4 s( q5 c% q$ afunction IntToStr (aInt: integer): string;
! m5 x: i; D7 D- j ~procedure exit;
) L0 U+ g+ e, z3 N; O+ Mprocedure OnCreate (aStr : String); " l# I2 d! y' n3 _6 c
implementation
: [# R! }! b/ K7 lprocedure OnCreate (aStr : String);$ g7 N' @" |6 n! e; }
var
2 n9 Q+ s3 Q( | Str : String;
4 t+ H2 N% i: \' |& j" v iCount : String;
' Y+ [# M7 x& M" x: O GoBigMapItem : String = '回城卷';
6 x( Z$ G+ N9 Hbegin$ O9 @8 o/ r) ^- ]$ t
Str := 'getsenderitemcountbyname ' + GoBigMapItem;1 M' d* P. W" M9 M' q
iCount := callfunc (Str);3 V# X3 ~. J2 G" B) y+ b
if iCount <> '0' then begin
& w* V) ]- Z3 h* ?) v e' u# |/ u Str := 'getsenderitem ' + GoBigMapItem;8 @3 {! X4 n( e" Q. z9 V
Str := Str + ':';6 \& {+ Y9 v6 F7 h2 i
Str := Str + iCount; {6 M! _1 P: f' e& k' H" R0 N
print (Str);& @ i" J) O" c o
end;/ Q- G4 W. q+ K9 |, u
exit;) h& W, }6 P# y# F: u
end; $ P# N2 k' K8 w8 ?! |
end.
$ P. ]( {0 V& b+ J/ [ |