peq-quests/codecay/#mage_trap.lua

27 lines
915 B
Lua
Raw Permalink Normal View History

2017-05-13 13:41:55 -04:00
function event_spawn(e)
eq.set_proximity(e.self:GetX() - 100, e.self:GetX() + 100, e.self:GetY() - 100, e.self:GetY() + 100);
end
function event_enter(e)
if(e.other:Class() == "Magician") then
local qglobals = eq.get_qglobals(e.self,e.other);
2023-08-15 11:39:43 -04:00
if(qglobals["mage_epic"] == "10" and qglobals["mage_epic_cod"] == nil and not eq.get_entity_list():IsMobSpawnedByNpcTypeID(200060)) then
2017-05-13 13:41:55 -04:00
if(e.self:GetY()==310) then
2023-08-13 17:16:42 -04:00
e.other:Message(MT.Yellow,"The purple gem on your staff emanates a soft breeze.");
2017-05-13 13:41:55 -04:00
eq.set_global("mage_epic_cod","1",3,"H2");
eq.set_timer("mage_epic_depop",30*60*1000);
eq.spawn2(200060, 0, 0, 483,256,-80,427); -- NPC: #Spirit_Elemental
2017-05-13 13:41:55 -04:00
else
2023-08-13 17:16:42 -04:00
e.other:Message(MT.Yellow,"The purple gem on your staff glows.")
2017-05-13 13:41:55 -04:00
end
end
end
end
function event_timer(e)
if (e.timer=="mage_epic_depop") then
eq.stop_timer("mage_epic_depop");
eq.depop_all(200060);
end
end