用于战神引擎的怪物攻城Npc脚本,Gm可以在线设置开区攻城的时间,但要设置之前,记得是GM权限才行,普通玩家无法设置这个时间。脚本为单文件,直接添加即可使用。
部分脚本
begin if (GetDayOfWeek = zhou) and (GetHour = xs+1) and (GetMin = (fz+20)-60) then //定时刷怪时间点 begin This_NPC.CreateMon('3',330,332,5,'蛮荒巨灵神1',5); This_NPC.NpcNotice('【军团来袭】:当前第 3 波,每隔10分钟一波,共5波'); end; end else if (GetDayOfWeek = zhou) and (GetHour = xs) and (GetMin = fz+20) then //定时刷怪时间点 begin This_NPC.CreateMon('3',330,332,5,'九尾狐王1',5); This_NPC.NpcNotice('【军团来袭】:当前第 3 波,每隔10分钟一波,共5波'); end; if (ghour > xs) and (gmin < fz) then begin if (GetDayOfWeek = zhou) and (GetHour = xs+1) and (GetMin = (fz+30)-60) then //定时刷怪时间点 begin This_NPC.CreateMon('3',309,350,5,'火龙神1',5); This_NPC.NpcNotice('【军团来袭】:当前第 4 波,每隔10分钟一波,共5波'); end; end else if (GetDayOfWeek = zhou) and (GetHour = xs) and (GetMin = fz+30) then //定时刷怪时间点 begin This_NPC.CreateMon('3',309,350,5,'新型冠状病毒1',5); This_NPC.NpcNotice('【军团来袭】:当前第 4 波,每隔10分钟一波,共5波'); end; if (ghour > xs) and (gmin < fz) then begin if (GetDayOfWeek = zhou) and (GetHour = xs+1) and (GetMin = (fz+40)-60) then //定时刷怪时间点 begin This_NPC.CreateMon('3',379,322,5,'爆不爆谁知道',5); This_NPC.NpcNotice('【军团来袭】:当前第 5 波,每隔10分钟一波,共5波'); ServerSay('【BOSS来袭】:十分钟后,所有BOSS将被系统清理。',2); //0红色,1绿色,2蓝色,3粉色 end; end else if (GetDayOfWeek = zhou) and (GetHour = xs) and (GetMin = fz+40) then //定时刷怪时间点 begin This_NPC.CreateMon('3',379,322,5,'小魔王',5); This_NPC.NpcNotice('【军团来袭】:当前第 5 波,每隔10分钟一波,共5波'); ServerSay('【BOSS来袭】:十分钟后,所有BOSS将被系统清理。',2); //0红色,1绿色,2蓝色,3粉色 end; if (ghour > xs) and (gmin < fz) then begin if (GetDayOfWeek = zhou) and (GetHour = xs+1) and (GetMin = (fz+50)-60) then //定时刷怪时间点 begin This_NPC.ClearMon('3'); ServerSay('【BOSS来袭】:本次BOSS来袭活动结束!',2); //0红色,1绿色,2蓝色,3粉色 end; end else if (GetDayOfWeek = zhou) and (GetHour = xs) and (GetMin = fz+50) then begin This_NPC.ClearMon('3'); ServerSay('【BOSS来袭】:本次BOSS来袭活动结束!',2); //0红色,1绿色,2蓝色,3粉色 end; end; Begin //怪物攻城时间 格式:星期几 几点 几分 怪物攻城 zhou := GetG(56,1); //星期几 xs := GetG(56,6); //小时 fz := GetG(56,7); //分钟 if This_Player.GMLevel > 0 then begin This_Npc.NpcDialog(This_Player, '尊敬的GM你好:\ \' + '|{cmd}<怪物攻城时间设置/@gongcheng> \' ); end else begin This_Npc.NpcDialog(This_Player, '你不是管理员,无法为你服务\ \' ); end; end.