forked from ornfelt/azerothcore_lua_scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAllianceMage2.lua
More file actions
36 lines (28 loc) · 1.02 KB
/
AllianceMage2.lua
File metadata and controls
36 lines (28 loc) · 1.02 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
local AMage = {}
local function CastFireball(eventId, delay, calls, creature)
creature:CastSpell(creature:GetVictim(), 38692, true)
end
local function CastFrostbolt(eventId, delay, calls, creature)
creature:CastSpell(creature:GetVictim(), 27071, true)
end
local function CastBlizzard(eventId, delay, calls, creature)
creature:CastSpell(creature:GetVictim(), 42213, true)
end
local function CastArcaneExplosion(eventId, delay, calls, creature)
creature:CastSpell(creature:GetVictim(), 19712, true)
end
local function OnEnterCombat(event, creature, target)
creature:RegisterEvent(CastFireball, 3600, 0)
creature:RegisterEvent(CastFrostbolt, 7200, 0)
creature:RegisterEvent(CastBlizzard, 9000, 0)
creature:RegisterEvent(CastArcaneExplosion, 10800, 0)
end
local function OnLeaveCombat(event, creature)
creature:RemoveEvents()
end
local function OnDied(event, creature, killer)
creature:RemoveEvents()
end
RegisterCreatureEvent(400027, 1, OnEnterCombat)
RegisterCreatureEvent(400027, 2, OnLeaveCombat)
RegisterCreatureEvent(400027, 4, OnDied)