将下列代码添加到NPC脚本任意位置
然后在位置”D:\mud2.0\Mir200\Envir\PsNpcScript.txt“里面来设置执行时间(看上方表格)
procedure Execute;
begin
if (GetDayOfWeek = 6) and (GetHour = 21) and (GetMin = 10) then
begin
if This_NPC.CheckMapMonByName('1803', '行会Boss') < 1 then
begin
This_NPC.CreateMon('1803', 20, 22, 1, '行会Boss', 1);
ServerSay('系统:行会boss刷新了。请速度清理!', 0);
ServerSay('系统:行会boss刷新了。请速度清理!', 0);
ServerSay('系统:行会boss刷新了。请速度清理!', 0);
ServerSay('系统:行会boss刷新了。请速度清理!', 0);
ServerSay('系统:行会boss刷新了。请速度清理!', 0);
end;
end;
end;
Procedure _GetYB;
begin
//这里输入你的充值地图,或者直接修改你想要的提示
This_Player.PlayerNotice('LINK$https@by.1234500000.com~cz~10003tlZOquMkXdJ',5);
end;
万能脚本截断命令,任意位置
if This_Player.GetV(101,101) = 1 then
begin
This_NPC.NpcNotice('您已经领取过了');
Exit;
end;
//例子
Procedure _jiangli2;
begin
if This_Player.GetV(101,101) = 1 then
begin
This_NPC.NpcNotice('您已经领取过了');
Exit;
end;
Begin
if This_Player.GetV(88,88) >= 30 then
Begin
This_Player.SetV(101,101,1);
This_Player.SysGiveGift('贵族斗笠',1,true);
This_NPC.NpcNotice('恭喜:'+This_Player.Name+'领取了【贵族斗笠】');
end else
This_NPC.NpcNotice('领取失败,您没有充值30元');
end;
end;
脚本重置变量命令
procedure _domain;
var today , mei: integer; //声明变量
begin
today := GetDateNum(GetNow);// 获取当前日期 //
if This_Player.GetV(55,91) <> today then // 初始化
begin
This_Player.SetV(55,91,today);
This_Player.SetV(280,41,0);
end;
This_Npc.NpcDialog(This_Player,
<'+ inttostr(This_Player.GetV(280,40)) +'/c=70> //显示变量
);
end;
procedure _pk;
begin
if This_Player.MyPkpoint >= 100 then //检测pk值
begin
if This_Player.YBNum >= 1 then //检测元宝
begin
This_Player.DecPkPoint(100); //减少pk值
This_Player.ScriptRequestSubYBNum(1); //扣元宝
end else
begin
This_Npc.NpcDialog(This_Player,
'对不起,你的元宝不足,不能消减PK值!'
);
end;
end else
begin
This_Npc.NpcDialog(This_Player,
'你现在不需要消减PK值!'
);
end;
end;
检测宝宝数量
if This_Player.GetSlaveCount('') < 2 then //<2就是检测小于2只宝宝
给人物增加经验倍数
This_Player.MultiTempExpRate := 2; //2=2倍,是几倍就等于几
检测人物性别给予物品(例如:衣服,性别检测:0=男,1=女)
if This_Player.Gender = 0 then
begin
This_Player.SysGiveGift('魔法长袍(男)',1,true);
end else
begin
This_Player.SysGiveGift('魔法长袍(女)',1,true);end;
end;
检测多个物品物品和扣除物品
procedure _1;
begin
if ((This_Player.GetBagItemCount ('命运神石') >= 1) and (This_Player.GetBagItemCount ('金矿') >= 20) and (This_Player.GoldNum >= 1000000)) then
begin
This_Player.Take('金矿',20);
This_Player.Take('命运神石',1);
This_Player.DecGold(1000000);
This_Player.Give('命运之刃',1);
ServerSay('恭喜玩家【' + This_Player.Name + '】成功兑换了[命运之刃]', 3);
//等待
end else
begin
This_NPC.NpcDialog(This_Player,
'<> <无法兑换,请看以下说明/fcolor=103>:|\'
+'|1.<材料不足/fcolor=250>|'
+'| </@zhanshen>') ;
end;
end;
检测金币和扣除金币
if This_Player.GoldNum >= 100000 then
begin
This_Player.DecGold(100000);
ServerSay('系统:玩家【' + This_Player.Name + '】开启了狂暴之力.干掉他可获得10W金币!!',3);
This_Player.PlayerNotice('成功开启狂暴之力!', 5);
end else
This_Player.PlayerNotice('你没有元宝,无法开启狂暴之力!', 5);
end;
暂无评论内容