热门搜索: LOL雷霆之怒蓝月传奇传奇霸业
function ontalk2093(npc,event,player) player:echo(0,npc:GetLowGUID(),[[
真没办法,国王把看守皇宫的任务交给了我! 现在我可以把你传送到皇宫中!
好的,我要进去]]);end
function CreatureNpcFun(npc,event,player,funid) if funid == 1 then ontalk2093_1(npc,player); endend
function ontalk2093_1(npc,player) local t = tonumber(os.date("%H%M",os.time()));--定义一个临时的时间值 if player:has_defense() == true then --判断是否有有防守方 if player:is_statue_break() == true then--判断雕像是否已经摧毁 if t >= 2100 and t <= 2200 then--当前时间是否允许范围内 player:randomthismap(88); --进入地图编号88的皇宫地图随机坐标 else player:alert(10,0,0,"晚上21:00-22:00才能进入皇宫"); end else player:alert(10,0,0,"摧毁城主雕像后,才能进入皇宫"); end else if t >= 2100 and t <= 2200 then player:randomthismap(88); else player:alert(10,0,0,"晚上21:00-22:00才能进入皇宫"); end endend
RegisterUnitEvent(2093,20,"ontalk2093")RegisterUnitEvent(2093,29,"CreatureNpcFun")