原理:进入流放地后自动删除物品栏内所有回城卷 , T' D$ I e2 P- y# A+ V
方法:
U+ ~, c5 p- h$ ?* ]一、将"删除回城.txt"放到script文件夹,在Script.SDB中加入相应的编号,我这是135
5 E6 u( G0 \5 Y1 U$ P& k6 b, `二、在流放地随便放个NPC Notice列加上script的编号135 坐标 58 78 要保证进去后就能看到
1 a/ |/ r, C. W三、"删除回城.txt"中回城卷的名字根据各服务器情况修改 4 ^8 h( L& Z9 ]9 \" N
四、由于不能检测技能栏中的回城卷 所以回城卷要设置成不能放入技能栏 也就是在Item.sdb里设置回城卷的boNotSkill为TRUE ! M5 d4 R3 B& v5 B; `+ c
删除回城.txt
) k& J* f& `* X( ~; n# `unit 删除回城;
% o; W9 O3 q! rinte**ce
( L. z2 f0 ^2 [# t$ y# [function GetToken (aStr, aToken, aSep : String) : String;
! s) Z7 o; ^7 w6 Gfunction CompareStr (aStr1, aStr2 : String) : Boolean;9 N5 @2 j5 L* j3 C3 H
function callfunc (aText: string): string;
3 d# e" W5 t. M9 tprocedure print (aText: string);
: b3 Y7 t+ {* m; `% r; F+ qfunction Random (aScope: integer): integer;
* o/ \# x7 R$ B! g4 g9 dfunction Length (aText: string): integer;. C1 W* J2 l, r0 d" T
procedure Inc (aInt: integer);
7 I. H. ?( x4 \. n3 ?procedure Dec (aInt: integer);
3 e7 x% ^* g5 P* p0 l) G' X; kfunction StrToInt (astr: string): integer;
; C$ A6 b' N+ R# S. t: [: n: ?8 [function IntToStr (aInt: integer): string;5 S1 z& x' ~) `" R* }
procedure exit;
( i( X. p: _4 `5 y& N0 wprocedure OnCreate (aStr : String); 9 I+ D) C! S4 O# y- w
implementation + V( `+ A @; r) V) i6 u/ J
procedure OnCreate (aStr : String);5 v7 F( v& B2 W- b9 _3 j
var3 [, X& {: P* N1 _$ q
Str : String;
8 R5 b' U5 ?, D6 t6 c$ g iCount : String;
$ ~1 q6 m0 @4 |$ o+ P GoBigMapItem : String = '回城卷';; a/ m& H4 f& x4 e; K
begin
( a5 y. {; N: }5 X! k2 B Str := 'getsenderitemcountbyname ' + GoBigMapItem;3 a% |3 m, b& ?, ~' H
iCount := callfunc (Str);* r/ I8 M. a, d+ J" s
if iCount <> '0' then begin
9 ~3 U ^! a! T% N L; w Str := 'getsenderitem ' + GoBigMapItem;
( W6 b# S& P$ [ j, h a; ]' a Str := Str + ':';
: m9 Y' k# k! l' g0 _) l Str := Str + iCount;# e7 X5 Q- ]5 Q6 w& }) N+ p
print (Str);
" o3 h% ~6 r1 `' p! k/ W6 U end;' y; B+ I+ r5 r
exit;+ l2 h5 t8 i4 U. Z7 C
end;
8 X8 p; C+ x& }end.
+ Z1 U) ?- M: G/ J+ z0 b: s |