spasm
05-30-2009, 03:13 AM
My first boss script!
My Trainer: Hammer of Ac-Web :D He taught me everything that i could know as up from now... but he has been busy and not on MSN so i had to try this alone!
-Some is from his example that he gave to me... I am giving him credits too-
function boss_OnEnterCombat(pUnit, Event)
pUnit:SendChatMessage(12, 0, "This... This is so hard to believe, Mortals challenging and Immortal?! I will make short work of this! ")
pUnit:RegisterEvent("The Immortal_1",1000, 0)
end
function The_Immortal_2(pUnit, Event)
if pUnit:GetHealthPct() < 95 then
pUnit:RemoveEvents()
pUnit:SendChatMessage (12, 0, "Maybe a curse will frighten you off!")
pUnit:FullCastSpell(47864, pUnit:GetRandomPlayer(0))
pUnit:RegisterEvent("The Immortal_2",1000, 0)
end
end
function The_Immortal_3(pUnit, Event)
if pUnit:GetHealthPct() < 75 then
pUnit:RemoveEvents()
pUnit:SendChatMessage (12, 0, "What are you using to hit me! Plastic Swords and Arrows? Weaklings!")
pUnit:FullCastSpell(52717)
pUnit:RegisterEvent("The Immortal_3",1000, 0)
end
end
function The_Immortal_4(pUnit, Event)
if pUnit:GetHealthPct() < 45 then
pUnit:RemoveEvents()
pUnit:SendChatMessage (12, 0, "Just die you filthy Bastards!!!")
pUnit:CastSpellOnTarget(59521, pUnit:GetRandomPlayer(0))
pUnit:CastSpellOnTarget(19813, pUnit:GetRandomPlayer(0))
pUnit:RegisterEvent("The Immortal_4",1000, 0)
end
end
function The_Immortal_5(pUnit, Event)
if pUnit:GetHealthPct() < 25 then
pUnit:RemoveEvents()
pUnit:SendChatMessage (12, 0, "No!!! This isnt the end!!! I have one more trick up my sleeve!")
pUnit:FullCastSpell(52717)
pUnit:FullCastSpell(49273)
pUnit:FullCastSpell(49273)
pUnit:FullCastSpell(49273)
pUnit:FullCastSpell(49273)
pUnit:FullCastSpell(49273)
pUnit:FullCastSpell(49273)
pUnit:FullCastSpell(49273)
pUnit:RegisterEvent("The Immortal_5",1000, 0)
end
end
function The_Immortal_6(pUnit, Event)
if pUnit:GetHealthPct() <= 1 then
pUnit:RemoveEvents()
pUnit:SendChatMessage (12, 0, "You have won... You are now the Immortal...")
pUnit:CastSpellOnTarget(58912, pUnit:GetRandomPlayer(0))
pUnit:RegisterEvent("boss_Died",1000, 0)
end
end
function boss_OnKill(pUnit, Event)
pUnit:SendChatMessage(12, 0, "Death was the last thing he would conquer... Get your loot. - Made by Spasm of Ac-Web")
end
function boss_Death(pUnit, Event)
pUnit:RemoveEvents()
end
function boss_OnLeave(pUnit, Event)
pUnit:RemoveEvents()
end
RegisterUnitEvent(95439, 1, "boss_OnEnterCombat")
RegisterUnitEvent(95439, 2, "boss_OnLeaveCombat")
RegisterUnitEvent(95439, 3, "boss_OnKill")
RegisterUnitEvent(95439, 4, "boss_Died")
My Trainer: Hammer of Ac-Web :D He taught me everything that i could know as up from now... but he has been busy and not on MSN so i had to try this alone!
-Some is from his example that he gave to me... I am giving him credits too-
function boss_OnEnterCombat(pUnit, Event)
pUnit:SendChatMessage(12, 0, "This... This is so hard to believe, Mortals challenging and Immortal?! I will make short work of this! ")
pUnit:RegisterEvent("The Immortal_1",1000, 0)
end
function The_Immortal_2(pUnit, Event)
if pUnit:GetHealthPct() < 95 then
pUnit:RemoveEvents()
pUnit:SendChatMessage (12, 0, "Maybe a curse will frighten you off!")
pUnit:FullCastSpell(47864, pUnit:GetRandomPlayer(0))
pUnit:RegisterEvent("The Immortal_2",1000, 0)
end
end
function The_Immortal_3(pUnit, Event)
if pUnit:GetHealthPct() < 75 then
pUnit:RemoveEvents()
pUnit:SendChatMessage (12, 0, "What are you using to hit me! Plastic Swords and Arrows? Weaklings!")
pUnit:FullCastSpell(52717)
pUnit:RegisterEvent("The Immortal_3",1000, 0)
end
end
function The_Immortal_4(pUnit, Event)
if pUnit:GetHealthPct() < 45 then
pUnit:RemoveEvents()
pUnit:SendChatMessage (12, 0, "Just die you filthy Bastards!!!")
pUnit:CastSpellOnTarget(59521, pUnit:GetRandomPlayer(0))
pUnit:CastSpellOnTarget(19813, pUnit:GetRandomPlayer(0))
pUnit:RegisterEvent("The Immortal_4",1000, 0)
end
end
function The_Immortal_5(pUnit, Event)
if pUnit:GetHealthPct() < 25 then
pUnit:RemoveEvents()
pUnit:SendChatMessage (12, 0, "No!!! This isnt the end!!! I have one more trick up my sleeve!")
pUnit:FullCastSpell(52717)
pUnit:FullCastSpell(49273)
pUnit:FullCastSpell(49273)
pUnit:FullCastSpell(49273)
pUnit:FullCastSpell(49273)
pUnit:FullCastSpell(49273)
pUnit:FullCastSpell(49273)
pUnit:FullCastSpell(49273)
pUnit:RegisterEvent("The Immortal_5",1000, 0)
end
end
function The_Immortal_6(pUnit, Event)
if pUnit:GetHealthPct() <= 1 then
pUnit:RemoveEvents()
pUnit:SendChatMessage (12, 0, "You have won... You are now the Immortal...")
pUnit:CastSpellOnTarget(58912, pUnit:GetRandomPlayer(0))
pUnit:RegisterEvent("boss_Died",1000, 0)
end
end
function boss_OnKill(pUnit, Event)
pUnit:SendChatMessage(12, 0, "Death was the last thing he would conquer... Get your loot. - Made by Spasm of Ac-Web")
end
function boss_Death(pUnit, Event)
pUnit:RemoveEvents()
end
function boss_OnLeave(pUnit, Event)
pUnit:RemoveEvents()
end
RegisterUnitEvent(95439, 1, "boss_OnEnterCombat")
RegisterUnitEvent(95439, 2, "boss_OnLeaveCombat")
RegisterUnitEvent(95439, 3, "boss_OnKill")
RegisterUnitEvent(95439, 4, "boss_Died")