原理:进入流放地后自动删除物品栏内所有回城卷
& M' a' |: a- ^: o# A v方法: * K0 N6 P& t5 c; B% D- n& X
一、将"删除回城.txt"放到script文件夹,在Script.SDB中加入相应的编号,我这是135
4 u# Q3 |0 f" G2 B4 b7 A5 S, j二、在流放地随便放个NPC Notice列加上script的编号135 坐标 58 78 要保证进去后就能看到
* C: `% @+ f5 `2 `三、"删除回城.txt"中回城卷的名字根据各服务器情况修改 ' ]% n+ ]( g: [
四、由于不能检测技能栏中的回城卷 所以回城卷要设置成不能放入技能栏 也就是在Item.sdb里设置回城卷的boNotSkill为TRUE 7 N) b( S) h3 D* I. p
删除回城.txt 7 N2 i7 M9 ^3 \& y' m0 h, v% G
unit 删除回城;
7 F; k* S* A9 o* R. y# Xinte**ce ; x; v* f7 ]" k# m, [5 P B
function GetToken (aStr, aToken, aSep : String) : String;
! S; F, u# G2 `2 J5 A6 Afunction CompareStr (aStr1, aStr2 : String) : Boolean;
% G; b; p/ H S5 U! e5 H: C* D: }* |function callfunc (aText: string): string;7 m/ l8 l* n" u1 g7 ~
procedure print (aText: string);
: X8 g( C' F4 X x/ @function Random (aScope: integer): integer;; ~2 b" U8 u' }3 D: _
function Length (aText: string): integer;
^$ @4 g! U7 K: R( J2 cprocedure Inc (aInt: integer);+ `. h% M% i1 f9 r+ r+ i
procedure Dec (aInt: integer);' ]/ W# `! I" q" i) [/ |
function StrToInt (astr: string): integer;" g+ Z; v6 w" ]% U
function IntToStr (aInt: integer): string;7 f( E+ ?; M- k# J% w0 p: ?2 V; Q
procedure exit; % @$ W$ i( I- ]. C8 [% l
procedure OnCreate (aStr : String); 3 W: b' b- i" {, a6 m
implementation 3 A6 I: U: t; [, E
procedure OnCreate (aStr : String);
! t5 i' y% w: v/ avar" z* A* N" \; [# }4 f# `
Str : String; I r. z( l3 \8 F9 c; |9 f" q
iCount : String;* p5 F& M% C! a# h6 i1 W
GoBigMapItem : String = '回城卷';# v$ ~; W; N+ X; Y
begin
( X' D- e: a: r Str := 'getsenderitemcountbyname ' + GoBigMapItem;& i. U$ D {3 W& s, o/ c' x6 z" q
iCount := callfunc (Str);
* K7 w, e: s% D, X; P if iCount <> '0' then begin
6 m0 ^2 ^' z+ P9 y Str := 'getsenderitem ' + GoBigMapItem;! s1 w) Q. P/ p1 I: X
Str := Str + ':';
- ?1 u: U. G5 e- N Str := Str + iCount;
- w% ^* p; F1 p; g) m print (Str);. G% r* X( e7 y
end;9 M r8 w2 e! m% n
exit;' W/ ~ d& a: G, d f
end;
! [/ q/ U7 I* d( f( Z/ f3 Yend.
- u4 l. V) Z2 u |