forked from ornfelt/azerothcore_lua_scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBolvar.lua
More file actions
46 lines (35 loc) · 1.17 KB
/
Bolvar.lua
File metadata and controls
46 lines (35 loc) · 1.17 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
39
40
41
42
43
44
45
local Bolvar = {}
local function CastAS(eventId, delay, calls, creature)
creature:CastSpell(creature:GetVictim(), 32699, true)
end
local function CastHOR(eventId, delay, calls, creature)
creature:CastSpell(creature:GetVictim(), 53595, true)
end
local function CastSunder(eventId, delay, calls, creature)
creature:CastSpell(creature:GetVictim(), 58461, true)
end
local function CastAvengingWrath(event, creature)
creature:CastSpell(creature, 31884, true)
end
local function CastKings(event, creature)
creature:CastSpell(creature, 20217, true)
end
local function OnEnterCombat(event, creature, target)
creature:RegisterEvent(CastAS, 12600, 0)
creature:RegisterEvent(CastHOR, 5000, 0)
creature:RegisterEvent(CastSunder, 10000, 0)
creature:RegisterEvent(CastAvengingWrath, 1, 1)
end
local function OnLeaveCombat(event, creature)
creature:RemoveEvents()
end
local function OnDied(event, creature, killer)
creature:RemoveEvents()
end
local function OnSpawn(event, creature)
creature:CastSpell(creature, 20217, true)
end
RegisterCreatureEvent(1748, 1, OnEnterCombat)
RegisterCreatureEvent(1748, 2, OnLeaveCombat)
RegisterCreatureEvent(1748, 4, OnDied)
RegisterCreatureEvent(1748, 5, OnSpawn)