shardwurm_broodmother.lua - Quest File
xxxxxxxxxx
1
-- items: 30272
2
function event_trade(e)
3
local item_lib = require("items");
4
5
if(item_lib.check_turn_in(e.trade, {item1 = 30272})) then -- Harness of Control
6
e.self:Emote("reels in pain as the harness snaps around its neck tightly. A strange gleam enters its eyes as it slowly begins to shamble towards the exit and the giants fortress.");
7
e.other:Ding();
8
e.other:AddEXP(20000);
9
-- start gridid 57
10
eq.start(57);
11
end
12
item_lib.return_items(e.self, e.other, e.trade);
13
end
14
15
function event_waypoint_arrive(e)
16
-- waypoint number from gridid 57
17
if(e.wp == 15) then
18
-- set proximity to make sure the player is following close by.
19
eq.set_proximity(e.self:GetX()-45,e.self:GetX()+45,e.self:GetY()-45,e.self:GetY()+45,e.self:GetZ()-25,e.self:GetZ()+25);
20
elseif(e.wp == 19) then
21
-- clear proximity and if the giants spawned then attack Gralk Dwarfkiller and send signal for Fergul Frostsky to run away.
22
eq.clear_proximity();
23
if(eq.get_entity_list():IsMobSpawnedByNpcTypeID(118208)) then
24
eq.attack_npc_type(118208);
25
eq.signal(118207,1); -- NPC: #Fergul_Frostsky
26
end
27
end
28
end
29
30
-- if Player enter the proximity then spawns the 2 giants and clear proximity.
31
function event_enter(e)
32
eq.spawn2(118207,0,0,-2397,-2615,294,0); -- NPC: #Fergul_Frostsky
33
eq.spawn2(118208,0,0,-2391,-2569,299,0); -- NPC: #Gralk_Dwarfkiller
34
eq.clear_proximity();
35
end
36
37
function event_signal(e)
38
-- signal to depop from Fergul Frostsky once he either reached the end of his path (waypoint 6) or on death
39
if(e.signal == 1) then
40
eq.depop_with_timer();
41
end
42
end
43
Quest Source: 28 May 2022