forked from ornfelt/azerothcore_lua_scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCustomGreench.lua
More file actions
38 lines (31 loc) · 1.37 KB
/
CustomGreench.lua
File metadata and controls
38 lines (31 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
--Needs lots and lots of work. Register health check to event 9.
--Add true false statements to check if he's reached below 50.
--Don't remove events unnecessarily
local AbominableGreench = {};
function AbominableGreench.OnDie(event, creature)
creature:SendUnitYell("Argh... I'll be back!", 0)
end
function AbominableGreench.Enrage(event, delay, calls, creature)
if (creature:GetHealthPct() <= 50) then
creature:RemoveEvents()
creature:CastSpell(creature, 61369, true)
creature:RegisterEvent(AbominableGreench.FrostAttack, 4000, 0)
end
end
function AbominableGreench.FrostAttack(event, delay, calls, creature)
local TARGET = creature:GetAITarget(1, true, 0, 45)
creature:CastSpell(TARGET, 35263, true)
end
function AbominableGreench.OnEnterCombat(event, creature, target)
local TARGET = creature:GetAITarget(1, true, 0, 45)
creature:CastSpell(TARGET, 33547, true)
creature:SendUnitYell("You can try to stop me, but it's just a waste of time. I'm the king of Winter Veil crime!", 0)
creature:RegisterEvent(AbominableGreench.Enrage, 1000, 0)
end
function AbominableGreench.OnLeaveCombat(event, creature)
creature:SendUnitYell("What's the matter? Don't you like my holiday spirit?", 0)
creature:RemoveEvents()
end
RegisterCreatureEvent(13602, 1, AbominableGreench.OnEnterCombat)
RegisterCreatureEvent(13602, 2, AbominableGreench.OnLeaveCombat)
RegisterCreatureEvent(13602, 4, AbominableGreench.OnDie)