{ ***********************
土城跑酷
作者:开心就好
内容:在一个特定的时间段开始在土城一定范围内跑动随机得到一定的物品奖励,比如以下脚本
会在每天15:00-15:05 及19:00 -19:05开放
******************************}
program Mir2;
var
WpName : string;
Rdm_int,px, py :Integer;
Procedure _doexit;
begin
This_Npc.CloseDialog(This_Player);
end;
procedure _tcpk;
begin
if This_Player.Level >1 then
begin
This_Player.CallOut(This_Npc, 1, 'tcpk2');
This_Player.FlyTo('3',333,333);
This_Npc.NpcDialog(This_Player,
'请好好把握这幸福的时光。'
);
end;
end;
procedure tcpk2;
begin
Rdm_int := random(100);
px:= This_player.My_X;
py:= This_Player.My_Y;
if ((GetHour = 15) and (GetMin < 5)) or
((GetHour = 15) and (GetMin < 5)) then begin //自己修改开放时间
if (This_Player.MapName = '3') and ( 323 < px ) and (px < 343 )
and (323 < py ) and (py < 343) then //在土城坐标333.333 周围10格内跑动有效
begin if (This_Player.GetV(77,1) <> px) or
(This_Player.GetV(77,2) <> py )then // 移动才会继续触犯以下代码
begin
if This_Player.FreeBagNum >= 2 then
begin
if Rdm_int < 5 then // 5%机会获得以下物品
begin
case random(25) of // 5%机会获得以下25个物品中的一个
0 : WpName := '屠龙';
1 : WpName := '嗜魂法杖';
2 : WpName := '逍遥扇';
3 : WpName := '圣战头盔';
4 : WpName := '光芒项链';
5 : WpName := '光芒手镯';
6 : WpName := '光芒戒指';
7 : WpName := '烈焰戒指';
8 : WpName := '烈焰项链';
9 : WpName := '烈焰手镯';
10: WpName := '雷霆项链';
11 :WpName := '传送戒指';
12: WpName := '麻痹戒指';
13 :WpName := '隐身戒指';
14 :WpName := '雷霆手镯';
15: WpName := '防御戒指';
16: WpName := '天师长袍';
17 :WpName := '天尊道袍';
18: WpName := '霓裳羽衣';
19 :WpName := '法神披风';
20 :WpName := '圣战宝甲';
21: WpName := '天魔神甲';
22 :WpName := '噬血术';
23 :WpName := '逐日剑法';
24: WpName := '流星火雨';
end;
end
else if Rdm_int < 99 then
begin
case random(4) of
0 : begin
This_Player.Give('经验',5000);
This_Player.PlayerNotice('你获得5000经验!' , 1);
end;
1 : begin
This_Player.Give('经验',50000);
This_Player.PlayerNotice('你获得50000经验!' , 1);
end;
2 : begin This_Player.Give('经验',500000);
This_Player.PlayerNotice('你获得50000经验!' , 1);
end;
3 : begin This_Player.Give('经验',5000000);
This_Player.PlayerNotice('你获得500w经验!' , 1);
end;
end;
end;