原理:进入流放地后自动删除物品栏内所有回城卷
+ X; V) M1 c$ |, ^" f! B+ \$ I) r方法: 1 p( G" C6 s+ q' X
一、将"删除回城.txt"放到script文件夹,在Script.SDB中加入相应的编号,我这是135 ( Y( n1 p0 Y7 V
二、在流放地随便放个NPC Notice列加上script的编号135 坐标 58 78 要保证进去后就能看到
) H* C, [ O9 k1 A( z三、"删除回城.txt"中回城卷的名字根据各服务器情况修改 2 \$ Z* A) c- \ k; d# w
四、由于不能检测技能栏中的回城卷 所以回城卷要设置成不能放入技能栏 也就是在Item.sdb里设置回城卷的boNotSkill为TRUE 6 O. D1 B& P! [4 q9 u
删除回城.txt
8 J6 D1 O$ G) {$ L6 [7 sunit 删除回城;
/ f7 g6 Q9 H$ Linte**ce 5 |# o8 L- D6 P& a* \" C b
function GetToken (aStr, aToken, aSep : String) : String;
* L/ S. H* {2 W3 i7 u8 ^, Dfunction CompareStr (aStr1, aStr2 : String) : Boolean;4 S/ B/ u4 v% p* z7 |
function callfunc (aText: string): string;
" ~3 u3 w& E0 l% o1 Hprocedure print (aText: string);: R& n$ w# |3 c( d* d
function Random (aScope: integer): integer;: b' m- C) b" r0 E( Y
function Length (aText: string): integer;
+ @' m/ H8 d, u, Lprocedure Inc (aInt: integer);. R0 Y' b. }( c
procedure Dec (aInt: integer);
2 V0 ]2 K, Q# T/ p- C0 I! Cfunction StrToInt (astr: string): integer;5 c+ e2 |' Z0 W/ k Z5 H. Q5 I z
function IntToStr (aInt: integer): string;9 D" r/ ~. |+ d2 K- l& T( s
procedure exit;
! U$ `' H t, t' T& F+ p: x. nprocedure OnCreate (aStr : String); . z+ f }6 l" a" w2 l
implementation 4 {- }9 i* x* b1 ]* E
procedure OnCreate (aStr : String);. i: l; z- j* X. `2 J% b
var8 B, j& {2 D' G5 Z7 v; X
Str : String;' j" ]: L1 C( C5 f( x
iCount : String;
' u# u& ~0 k8 n4 A0 N# H( g GoBigMapItem : String = '回城卷';, j3 i4 b) P% V( C9 Z7 X
begin7 x9 d1 z8 B' k3 u4 d
Str := 'getsenderitemcountbyname ' + GoBigMapItem;2 f; A9 ?3 v7 F7 o' a S
iCount := callfunc (Str);* L9 {5 i% T" K# W! l
if iCount <> '0' then begin: c+ y6 ~0 z8 W. B) W+ k
Str := 'getsenderitem ' + GoBigMapItem;% i3 g, v- t% f% ~
Str := Str + ':';$ Y8 y2 q8 x+ b7 @
Str := Str + iCount;
& t0 _, c3 l2 m" b' F8 l2 n print (Str);
& a5 m5 t: g# G W end;4 O0 `2 n$ z. {: l/ c8 X
exit;+ r7 ], n- @$ O0 ^3 {
end; + l) x6 u" M! ]& _8 u# b7 B
end.
4 O. E* g2 E* b |