神武新章新人上线前20名奖励脚本
unit 欢迎玩家;
interface
function GetToken (aStr, aToken, aSep : String) : String;
function CompareStr (aStr1, aStr2 : String) : Boolean;
function callfunc (aText: string): string;
procedure print (aText: string);
function Random (aScope: integer): integer;
function Length (aText: string): integer;
procedure Inc (aInt: integer);
procedure Dec (aInt: integer);
function StrToInt (astr: string): integer;
function IntToStr (aInt: integer): string;
procedure exit;
procedure OnGetResult (aStr : String);
procedure OnLeftClick (aStr : String);
var
i: Integer;
implementation
procedure OnLeftClick (aStr : String);
var
Str : String;
Race : Integer;
begin
Str := callfunc ('getsenderrace');
Race := StrToInt (Str);
if Race = 1 then begin
print ('showwindow .\help\欢迎玩家.txt 1');
exit;
end;
end;
procedure OnGetResult (aStr : String);
var
Str, Name, Maps, nStr : String;
nCur, nDura, Mapi, iCount, nValue, nCount : Integer;
begin
if aStr = 'close' then begin
exit;
end;
if aStr = '登陆奖励' then begin
if i >= 20 then begin
Dec(i);
Dec(i);
Dec(i);
Dec(i);
Dec(i);
Dec(i);
Dec(i);
Dec(i);
Dec(i);
Dec(i);
Dec(i);
Dec(i);
Dec(i);
Dec(i);
Dec(i);
Dec(i);
Dec(i);
Dec(i);
Dec(i);
Dec(i);
print ('setallowdelete npc 新人认证');
exit;
end;
Str := callfunc ('getsenderitemexistence 新人认证:1');
if Str = 'false' then begin
print ('say 贪心的家伙!');
print (Str);
exit;
end;
Str := callfunc ('checkenoughspace');
if Str = 'false' then begin
print ('say 包包满哩撒~');
exit;
end;
if i >= 0 then begin
if i < 1 then begin
print ('getsenderitem 新人认证:1');
print ('putsendermagicitem 经验值:1000 @欢迎玩家 4');
print ('putsendermagicitem 金元:50 @欢迎玩家 4');
print (Str);
Name := callfunc ('getsendername');
Str := 'sendsendertopmsg ' + '【';
Str := Str + Name;
Str := Str + '】恭喜你是本服第一位玩家';
print (Str);
Inc(i);
exit;
end;
end;
if i >= 1 then begin
if i < 2 then begin
print ('getsenderitem 新人认证:1');
print ('putsendermagicitem 经验值:1000 @欢迎玩家 4');
print ('putsendermagicitem 金元:50 @欢迎玩家 4');
print (Str);
Name := callfunc ('getsendername');
Str := 'sendsendertopmsg ' + '【';
Str := Str + Name;
Str := Str + '】恭喜你是本服第二位玩家';
print (Str);
Inc(i);
exit;
end;
end;
if i >= 2 then begin
if i < 3 then begin
print ('getsenderitem 新人认证:1');
print ('putsendermagicitem 经验值:1000 @欢迎玩家 4');
print ('putsendermagicitem 金元:50 @欢迎玩家 4');
print (Str);
Name := callfunc ('getsendername');
Str := 'sendsendertopmsg ' + '【';
Str := Str + Name;
Str := Str + '】恭喜你是本服第三位玩家';
print (Str);
Inc(i);
exit;
end;
end;
if i >= 3 then begin
if i < 4 then begin
print ('getsenderitem 新人认证:1');
print ('putsendermagicitem 经验值:1000 @欢迎玩家 4');
print ('putsendermagicitem 金元:50 @欢迎玩家 4');
print (Str);
Name := callfunc ('getsendername');
Str := 'sendsendertopmsg ' + '【';
Str := Str + Name;
Str := Str + '】恭喜你是本服第四位玩家';
print (Str);
Inc(i);
exit;
end;
end;
if i >= 4 then begin
if i < 5 then begin
print ('getsenderitem 新人认证:1');
print ('putsendermagicitem 经验值:1000 @欢迎玩家 4');
print ('putsendermagicitem 金元:50 @欢迎玩家 4');
print (Str);
Name := callfunc ('getsendername');
Str := 'sendsendertopmsg ' + '【';
Str := Str + Name;
Str := Str + '】恭喜你是本服第五位玩家';
print (Str);
Inc(i);
exit;
end;
end;
if i >= 5 then begin
if i < 6 then begin
print ('getsenderitem 新人认证:1');
print ('putsendermagicitem 经验值:1000 @欢迎玩家 4');
print ('putsendermagicitem 金元:50 @欢迎玩家 4');
print (Str);
Name := callfunc ('getsendername');
Str := 'sendsendertopmsg ' + '【';
Str := Str + Name;
Str := Str + '】恭喜你是本服第六位玩家';
print (Str);
Inc(i);
exit;
end;
end;
if i >= 6 then begin
if i < 7 then begin
print ('getsenderitem 新人认证:1');
print ('putsendermagicitem 经验值:1000 @欢迎玩家 4');
print ('putsendermagicitem 金元:50 @欢迎玩家 4');
print (Str);
Name := callfunc ('getsendername');
Str := 'sendsendertopmsg ' + '【';
Str := Str + Name;
Str := Str + '】恭喜你是本服第七位玩家';
print (Str);
Inc(i);
exit;
end;
end;
if i >= 7 then begin
if i < 8 then begin
print ('getsenderitem 新人认证:1');
print ('putsendermagicitem 经验值:1000 @欢迎玩家 4');
print ('putsendermagicitem 金元:50 @欢迎玩家 4');
print (Str);
Name := callfunc ('getsendername');
Str := 'sendsendertopmsg ' + '【';
Str := Str + Name;
Str := Str + '】恭喜你是本服第八位玩家';
print (Str);
Inc(i);
exit;
end;
end;