原理:进入流放地后自动删除物品栏内所有回城卷
! `6 M" f9 r8 q8 p* e方法: % c3 Q' o. l4 {& s
一、将"删除回城.txt"放到script文件夹,在Script.SDB中加入相应的编号,我这是135
1 |' l( i2 v2 }! _) `5 e; @, L二、在流放地随便放个NPC Notice列加上script的编号135 坐标 58 78 要保证进去后就能看到 ; [, r* W# R; Y* T0 Q7 H/ H
三、"删除回城.txt"中回城卷的名字根据各服务器情况修改 . R: t* X3 m1 x* A) w( J
四、由于不能检测技能栏中的回城卷 所以回城卷要设置成不能放入技能栏 也就是在Item.sdb里设置回城卷的boNotSkill为TRUE
* k5 t" L4 e( q) M; h0 x( e删除回城.txt d. L2 q+ {, f' D
unit 删除回城; 5 n h7 M3 K" D+ e
inte**ce
$ a. X% `/ ?' ofunction GetToken (aStr, aToken, aSep : String) : String;
* X* E3 F4 D3 e, wfunction CompareStr (aStr1, aStr2 : String) : Boolean;
1 U# u" d- ~% l) wfunction callfunc (aText: string): string;4 v+ i4 d7 O( }# u' @. i3 `
procedure print (aText: string);
; X4 r3 S$ _4 X2 r( b- efunction Random (aScope: integer): integer;9 l6 `2 i3 |% A# t$ @6 q; u
function Length (aText: string): integer;
* P5 v5 y$ z3 [5 H- ^, `7 e! aprocedure Inc (aInt: integer);4 U+ r; R- _/ D, `
procedure Dec (aInt: integer);
+ }1 [$ o) E4 G! _* F0 w, |function StrToInt (astr: string): integer;
2 z6 F p0 @1 f1 Qfunction IntToStr (aInt: integer): string;
1 h' u2 |4 R( ^8 v) r: A, \4 `procedure exit; $ {) a* B* o3 k! V
procedure OnCreate (aStr : String); + I9 U9 W) q, B$ O( t6 Z) W
implementation
* h# `! Q5 A4 |. U8 |9 p% d q; G$ Pprocedure OnCreate (aStr : String);
1 Q7 ^. N9 r0 m" w9 ~! p# q7 Xvar' R" G6 s; C$ C. |8 u8 u) j3 M
Str : String;
/ U# v$ y' Y: Y, t% Z! h! b iCount : String;6 f9 A. N2 Z& _
GoBigMapItem : String = '回城卷';( I' k+ W9 m: E! ~, ^6 e
begin
/ K- f4 ?8 {% N% [ Str := 'getsenderitemcountbyname ' + GoBigMapItem;
: D. a+ e* A) |0 h1 p iCount := callfunc (Str);
( y5 A1 \" E2 ?0 `8 H) K3 K* v if iCount <> '0' then begin
! K+ D) `7 c" d Str := 'getsenderitem ' + GoBigMapItem;, h0 [1 L6 }8 S) M6 u) _
Str := Str + ':';2 T: L4 Q& i, w3 V c
Str := Str + iCount;
0 o$ M' l9 q. G& C print (Str);
- D0 k% N* b1 d/ W6 Z3 ] end;
3 g) Y- d8 A$ `. ]- g6 n exit;" r i* f& a/ G0 w; f
end; 4 r. |( m1 _# u, K S1 h
end.
8 t. {& n! G- o3 p |