原理:进入流放地后自动删除物品栏内所有回城卷 7 e' \1 ~& c$ _, B
方法: + r8 \! }. \4 ?( O$ s- F$ }) N/ N
一、将"删除回城.txt"放到script文件夹,在Script.SDB中加入相应的编号,我这是135
9 Z5 w/ e! u o) l( I+ k2 M5 \8 Q二、在流放地随便放个NPC Notice列加上script的编号135 坐标 58 78 要保证进去后就能看到
/ {: X+ G% W: F! R三、"删除回城.txt"中回城卷的名字根据各服务器情况修改
- y: I, g8 \0 @7 b, v+ F8 N0 q四、由于不能检测技能栏中的回城卷 所以回城卷要设置成不能放入技能栏 也就是在Item.sdb里设置回城卷的boNotSkill为TRUE 7 k: G& a0 O6 x2 N) B7 [0 K+ R; x3 C
删除回城.txt , ?- T! W# L+ w$ T; h
unit 删除回城;
; X }$ N, ?2 {inte**ce 7 X5 b& _# ?* M+ ?4 w6 N
function GetToken (aStr, aToken, aSep : String) : String;8 b& w x' ~0 [% q
function CompareStr (aStr1, aStr2 : String) : Boolean;: L3 n$ A( T7 h" U
function callfunc (aText: string): string;
' `8 c* h" C9 Y+ p, }3 ]procedure print (aText: string);
I& f1 H5 g+ yfunction Random (aScope: integer): integer;
5 p; O( E3 a+ u0 L4 [$ zfunction Length (aText: string): integer;
4 D9 Z6 o5 D: }procedure Inc (aInt: integer);
k% U" e$ `9 p7 ?- \procedure Dec (aInt: integer);
& j) e, H3 W- o9 ifunction StrToInt (astr: string): integer;) Q" h! f3 N' Q( U# ]
function IntToStr (aInt: integer): string;
! @& T7 v4 F- E0 S; L/ {procedure exit; , p: g5 ~0 |( T+ [
procedure OnCreate (aStr : String);
- ]! c6 C9 U' s/ H. Oimplementation / P1 g6 P$ @) d1 I& Q
procedure OnCreate (aStr : String);
6 O, Y9 u' z1 U) P3 R& `0 ^var2 a9 V8 A0 T. n0 k! T k
Str : String;/ n; w8 V3 _0 v, i. q
iCount : String;* W+ \0 W! R& F2 \0 h" U
GoBigMapItem : String = '回城卷';$ G- A! ~ [! p2 M
begin
* O$ P2 G& j6 O( l, I Str := 'getsenderitemcountbyname ' + GoBigMapItem;
9 q. C7 Y# M/ I- u9 k9 t9 s7 ` iCount := callfunc (Str);
# |: @3 K" ?1 q3 s if iCount <> '0' then begin
/ @+ u/ n" R! L' w6 N4 k, \; X Str := 'getsenderitem ' + GoBigMapItem;5 ]3 G: g2 o1 [& ^. X
Str := Str + ':';0 A3 L! q4 z+ G) a
Str := Str + iCount;
! b$ \2 O" Z1 `# b% S# j$ z% r8 @( x print (Str);- X( b5 a3 U# g! Y4 {6 q9 N
end;
* f5 u7 D/ L5 ^8 l0 m* h( n exit;9 j4 d2 [( |5 p
end; ; N. i2 q. w: z6 ?. H t# j; L
end. ( w* Q" f# ?0 |6 @0 q( L
|