- local NPC_ID = 600004
- local METEOR = 41276
- local function ShaOfLust_OnCombat (event, creature, unit)
- local TARGET = creature:GetAITarget(1, true, 0, 45)
- creature:CastSpell(TARGET, 66552, true)
- unit:RegisterEvent(PhaseOne, 1000, 0)
- end
- local function PhaseOne (event, creature, unit)
- if (creature:GetHealthPct() <= 90) then
- unit:RemoveEvents()
- local TARGET2 = creature:GetAITarget(0, true, 0, 45)
- creature:CastSpell(TARGET2, 59351, true)
- unit:RegisterEvent(PhaseTwo, 1000, 0)
- end
- end
- local function PhaseTwo (event, creature, unit)
- if (creature:GetHealthPct() <= 75) then
- unit:RemoveEvents()
- creature:JumpToCoords(10322.841797, -6302.415039, 26.328140, 10, 10)
- creature:CastSpellAoF(10289.741211, -6288.017578, 26.145884, 41276, true) --one
- creature:CastSpellAoF(10297.828125, -6280.993652, 26.863653, 41276, true) --two
- creature:CastSpellAoF(10306.276367, -6276.641602, 27.530766, 41276, true) --three
- creature:CastSpellAoF(10289.741211, -6288.017578, 26.145884, 41276, true) --four
- creature:CastSpellAoF(10297.828125, -6280.993652, 26.863653, 41276, true) --five
- creature:CastSpellAoF(10306.276367, -6276.641602, 27.530766, 41276, true) --six
- unit:RegisterEvent(PhaseThree, 1000, 0)
- end
- end
- local function PhaseThree (event, creature, unit)
- if (creature:GetHealthPct() <= 30) then
- unit:RemoveEvents()
- local TARGET3 = creature:GetAITarget(1, true, 0, 45)
- creature:JumpToCoords(10329.123047, -6280.8548980, 26.420488, 10, 10)
- creature:CastSpell(TARGET3, 59351, true)
- unit:RegisterEvent(PhaseEnd, 1000, 0)
- end
- end
- local function PhaseEnd (event, creature, unit)
- if (creature:GetHealthPct() <= 10) then
- unit:RemoveEvents()
- creature:CastSpell(74458)
- creature:SendUnitSay("It would appear that I have been beaten, please forgive me.", 0)
- unit:RegisterEvent(Suicide, 6000, 1)
- end
- end
- local function Suicide (event, creature, unit)
- if (creature:GetAura(74458) == true) then
- creature:SendUnitSay("I will not let me blood stain your hands, I will rid this world of myself", 0)
- creature:CastSpell(creature, 7, true)
- end
- end
- RegisterCreatureEvent(NPC_ID, 1, ShaOfLust_OnCombat)
LUA Sha of Lust Script