原理:进入流放地后自动删除物品栏内所有回城卷 : P ~; E* `# }$ K* q& w0 N4 f
方法: 0 }* K- q& g. y: \" }/ E! H
一、将"删除回城.txt"放到script文件夹,在Script.SDB中加入相应的编号,我这是135
$ }. ?/ @- C1 n- X0 M k二、在流放地随便放个NPC Notice列加上script的编号135 坐标 58 78 要保证进去后就能看到 . \$ K) x# Z: S5 _) R8 B
三、"删除回城.txt"中回城卷的名字根据各服务器情况修改 7 j8 ^8 ?2 _& z) W) v3 a2 K% U1 s
四、由于不能检测技能栏中的回城卷 所以回城卷要设置成不能放入技能栏 也就是在Item.sdb里设置回城卷的boNotSkill为TRUE @# m. y% P7 ?: ^& B8 X- Q
删除回城.txt 5 f6 f& f8 @9 R! Q* O$ X% ~
unit 删除回城;
3 \/ t5 T- l {8 C' q# M0 rinte**ce
" l2 ^ u, x5 [6 n" F) P5 efunction GetToken (aStr, aToken, aSep : String) : String;$ o% T) c9 T" K, R( U. u
function CompareStr (aStr1, aStr2 : String) : Boolean;# D3 x. X4 H3 q) N+ l1 C! S H
function callfunc (aText: string): string;- b1 J* E" L- V% M! @
procedure print (aText: string);
8 K- V4 V! l. K0 }: k8 wfunction Random (aScope: integer): integer;% ~3 W* h' ^) M7 x+ `' v, u
function Length (aText: string): integer;
4 _/ x! O* q# P3 H- |procedure Inc (aInt: integer);! [6 ~" Q2 |- X; A+ D0 E
procedure Dec (aInt: integer);
% F+ o7 h0 j5 vfunction StrToInt (astr: string): integer;
( O/ a. m* f2 L1 K- P" v4 wfunction IntToStr (aInt: integer): string;+ |- M, B J( C
procedure exit; 2 O0 b$ j3 j8 a% {4 h; f
procedure OnCreate (aStr : String);
- l0 ]8 q9 d$ T. Zimplementation
& H4 l S; \& t/ x3 g% qprocedure OnCreate (aStr : String);
( |+ T L R/ ~" y/ \$ K# svar3 K( D, o2 c9 Q
Str : String;
2 {7 ^) ]5 k5 | iCount : String;( h" n/ Y1 e6 P
GoBigMapItem : String = '回城卷';
. Q4 o$ n# `3 E9 D0 jbegin
$ l8 ~. Q: }' P7 H' c' Q5 e+ m) ^* M Str := 'getsenderitemcountbyname ' + GoBigMapItem;9 q* [9 v* e* p; V; }" V3 q
iCount := callfunc (Str);+ `5 ?* c+ e% A+ c: g# u
if iCount <> '0' then begin
, W2 A) Z: k9 a' f# t Str := 'getsenderitem ' + GoBigMapItem;
7 P8 P G0 g1 L Str := Str + ':';
! ~, G' n; }# f& u% c' }6 ]* A- Q# [ Str := Str + iCount;& ~0 X& u) `4 c n$ Y3 c; c
print (Str);
2 T, q R: {1 ]% m" p9 W$ u end;
$ A5 J4 o9 ?4 }) c5 ^ exit;
6 g: I1 i6 V" f9 jend; + d) a+ E" p% y6 X
end. 6 R( C: x7 V) G/ t
|