#mage_trap.lua - Quest File
xxxxxxxxxx
1
function event_spawn(e)
2
eq.set_proximity(e.self:GetX() - 100, e.self:GetX() + 100, e.self:GetY() - 100, e.self:GetY() + 100);
3
end
4
5
function event_enter(e)
6
if(e.other:Class() == "Magician") then
7
local qglobals = eq.get_qglobals(e.self,e.other);
8
if(qglobals["mage_epic"] == "10" and qglobals["mage_epic_cod"] == nil and eq.get_entity_list():IsMobSpawnedByNpcTypeID(200060) == false ) then
9
if(e.self:GetY()==310) then
10
e.other:Message(15,"The purple gem on your staff emanates a soft breeze.");
11
eq.set_global("mage_epic_cod","1",3,"H2");
12
eq.set_timer("mage_epic_depop",30*60*1000);
13
eq.spawn2(200060, 0, 0, 483,256,-80,427); -- NPC: #Spirit_Elemental
14
else
15
e.other:Message(15,"The purple gem on your staff glows.")
16
end
17
end
18
end
19
end
20
21
function event_timer(e)
22
if (e.timer=="mage_epic_depop") then
23
eq.stop_timer("mage_epic_depop");
24
eq.depop_all(200060);
25
end
26
end
27
Quest Source: 28 May 2022