mpg_specialization.lua - Quest File
x
1
--
2
-- MPG Raid Trial General Notes
3
-- 1 MPG_hate - The Mastery of Hate (Raid)
4
-- 2 MPG_endurance - The Mastery of Endurance (Raid)
5
-- 4 MPG_foresight - The Mastery of Foresight (Raid)
6
-- 8 MPG_specialization - The Mastery of Specialization (Raid)
7
-- 16 MPG_adaptation - The Mastery of Adaptation (Raid)
8
-- 32 MPG_corruption - The Mastery of Corruption (Raid)
9
--
10
-- Mobs
11
--
12
-- Spells Cast:
13
-- [Mon Aug 24 15:20:31 2015] Master of Specialization begins to cast a spell. <Imprecision> 5700
14
-- [Mon Aug 24 15:20:42 2015] Master of Specialization begins to cast a spell. <Searing Pain> 5723
15
-- [Mon Aug 24 15:21:18 2015] Master of Specialization begins to cast a spell. <Rigidity> 5701
16
-- [Mon Aug 24 15:21:28 2015] Master of Specialization begins to cast a spell. <Chilling Agony> 5724
17
-- [Mon Aug 24 15:21:58 2015] Master of Specialization begins to cast a spell. <Curse of Misfortune> 5702
18
-- [Mon Aug 24 15:22:08 2015] Master of Specialization begins to cast a spell. <Glimmering Aura> 5725
19
-- [Mon Aug 24 15:22:38 2015] Master of Specialization begins to cast a spell. <Impurity> 5703
20
-- [Mon Aug 24 15:22:48 2015] Master of Specialization begins to cast a spell. <Toxic Blast> 5726
21
22
-- 1 5700 <Imprecision>
23
-- 2 5723 <Searing Pain>
24
-- 3 5701 <Rigidity>
25
-- 4 5724 <Chilling Agony>
26
-- 5 5702 <Curse of Misfortune>
27
-- 6 5725 <Glimmering Aura>
28
-- 7 5703 <Impurity>
29
-- 8 5726 <Toxic Blast>
30
31
local event_started = 0;
32
local instance_id;
33
local lockout_win = 108;
34
local this_bit = 8;
35
local player_list;
36
local spell_list = {};
37
local spell_idx = 1;
38
local spell_timer = 25;
39
40
function setup()
41
spell_list = {
42
[1] = 5700,
43
[2] = 5723,
44
[3] = 5701,
45
[4] = 5724,
46
[5] = 5702,
47
[6] = 5725,
48
[7] = 5703,
49
[8] = 5726
50
}
51
end
52
53
function Boss_Spawn(e)
54
instance_id = eq.get_zone_instance_id();
55
player_list = eq.get_characters_in_instance(instance_id);
56
event_started = 0;
57
lockout_win = 108;
58
this_bit = 8;
59
setup();
60
61
e.self:SetSpecialAbility(SpecialAbility.immune_aggro, 1);
62
e.self:SetSpecialAbility(SpecialAbility.immune_aggro_on, 1);
63
e.self:SetSpecialAbility(SpecialAbility.no_harm_from_client, 1);
64
end
65
66
function Boss_Say(e)
67
if ( e.message:findi("hail") ) then
68
e.self:Say("This is the Mastery of Specialization trial. You must demonstrate your ability to use your primary skills and fall back on your secondary skillset when necessary. Are you ready to [" .. eq.say_link("begin", false, "begin") .. "]?");
69
elseif ( e.message:findi("begin") ) then
70
local dz = eq.get_expedition()
71
if dz.valid then
72
dz:SetLocked(true, ExpeditionLockMessage.Begin, 14) -- live uses "Event Messages" type 365 (not in emu clients)
73
dz:AddReplayLockout(eq.seconds("3h"))
74
end
75
76
e.self:Say("Very well! Let the battle commence!");
77
78
event_started = 1;
79
80
-- Enable the Death Toucher
81
eq.spawn_condition('chambersd', instance_id, 5, 1 );
82
eq.spawn2(307006,0,0,0,0,0,0); -- NPC: #death_touch
83
84
CastSpells(e);
85
eq.set_timer('spell_timer', spell_timer * 1000);
86
87
e.self:AddToHateList(e.other, 1);
88
89
e.self:SetSpecialAbility(SpecialAbility.immune_aggro, 0);
90
e.self:SetSpecialAbility(SpecialAbility.immune_aggro_on, 0);
91
e.self:SetSpecialAbility(SpecialAbility.no_harm_from_client, 0);
92
end
93
end
94
95
function Boss_Timer(e)
96
if (e.timer == 'spell_timer' ) then
97
CastSpells(e);
98
end
99
end
100
101
function CastSpells(e)
102
if (spell_idx > 8) then
103
spell_idx = 1;
104
end
105
106
-- Cast the Spell
107
e.self:CastSpell(spell_list[spell_idx], e.self:GetHateTop():GetID());
108
109
-- Increment the spell casting index;
110
spell_idx = spell_idx + 1;
111
end
112
113
function Boss_Death(e)
114
eq.stop_all_timers();
115
116
-- Disable the Death Toucher
117
eq.spawn_condition('chambersd', instance_id, 5, 0 );
118
eq.depop_all(307006);
119
120
-- Spawn Shell of the Master
121
eq.spawn2(307008, 0, 0, -212, 270, 66, e.self:GetHeading()); -- NPC: Shell_of_the_Master_
122
123
-- Update the Win Lockout
124
local dz = eq.get_expedition()
125
if dz.valid then
126
dz:AddReplayLockoutDuration(eq.seconds("5d")) -- 5 days + current timer (max 123 hours)
127
end
128
129
local mpg_helper = require("mpg_helper");
130
mpg_helper.UpdateRaidTrialLockout(player_list, this_bit, nil);
131
end
132
133
function event_encounter_load(e)
134
eq.register_npc_event('mpg_specialization', Event.say, 307007, Boss_Say);
135
eq.register_npc_event('mpg_specialization', Event.spawn, 307007, Boss_Spawn);
136
eq.register_npc_event('mpg_specialization', Event.timer, 307007, Boss_Timer);
137
eq.register_npc_event('mpg_specialization', Event.death_complete, 307007, Boss_Death);
138
139
end
140
141
function event_encounter_unload(e)
142
end
143
Quest Source: 28 May 2022