forked from ornfelt/azerothcore_lua_scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFleshFlayer.lua
More file actions
37 lines (29 loc) · 1.05 KB
/
FleshFlayer.lua
File metadata and controls
37 lines (29 loc) · 1.05 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
local FleshFlayer = {};
local function CastLeap(eventId, delay, calls, creature)
creature:CastSpell(creature:GetVictim(), 47482, true)
end
local function CastPlague(eventId, delay, calls, creature)
creature:CastSpell(creature:GetVictim(), 52230, true)
end
local function CastExplode(eventId, delay, calls, creature)
creature:CastSpell(creature, 47496, true)
end
local function CastRend(eventId, delay, calls, creature)
creature:CastSpell(creature:GetVictim(), 18106, true)
end
local function OnEnterCombat(event, creature, target)
creature:RegisterEvent(CastLeap, 100, 1)
creature:RegisterEvent(CastPlague, 500, 1)
creature:RegisterEvent(CastRend, 2000, 1)
creature:RegisterEvent(CastPlague, 20000, 0)
creature:RegisterEvent(CastExplode, 30000, 0)
end
local function OnLeaveCombat(event, creature)
creature:RemoveEvents()
end
local function OnDied(event, creature, killer)
creature:RemoveEvents()
end
RegisterCreatureEvent(10407, 1, OnEnterCombat)
RegisterCreatureEvent(10407, 2, OnLeaveCombat)
RegisterCreatureEvent(10407, 4, OnDied)