PDA

View Full Version : [Lua] SpellBoss, My First Boss Script!



Milation
01-02-10, 02:18 PM
Grettings all!
first of all i will thx Grandelf for helping me a little ;D

It's my first BOSSscript, so please if there anythink you want added to it?
Or if somethink dont work? Please tell me.

Download Link(The Npc is added too):
Download The Boss Here (http://www.megaupload.com/?d=NTWRWKQD)




function Spellmaster_OnCombat(pUnit, Event)
pUnit:SendChatMessage(14, 0, "Who dares disturbing me, you have done the wrong choice!")
pUnit:RegisterEvent("Spellmaster_Fireball", 5000, 0)
pUnit:RegisterEvent("Spellmaster_Blastwave", 13000, 0)
pUnit:RegisterEvent("Spellmaster_Divineplea", 16000,0)
pUnit:RegisterEvent("Spellmaster_Phase1", 1000, 0)
end

function Spellmaster_Fireball(pUnit, Event)
pUnit:FullCastSpellOnTarget(42833, pUnit:GetMainTank())
end

function Spellmaster_Blastwave(pUnit, Event)
pUnit:CastSpell(36278)
end

function Spellmaster_Divineplea(pUnit, Event)
pUnit:CastSpell(54428)
end

function Spellmaster_Phase1(pUnit, Event)
if pUnit:GetHealthPct() < 70 then
pUnit:RemoveEvents()
pUnit:SendChatMessage(14, 0, "Lets have some fun with some ice and some fire!")
pUnit:FullCastSpell(47820)
pUnit:RegisterEvent("Spellmaster_Frostbolt", 10000, 0)
pUnit:RegisterEvent("Spellmaster_Pyroblast", 30000, 0)
pUnit:RegisterEvent("Spellmaster_Divineplea", 16000,0)
pUnit:RegisterEvent("Spellmaster_Phase2", 1000, 0)
end
end

function Spellmaster_Frostbolt(pUnit, Event)
pUnit:FullCastSpellOnTarget(42842, pUnit:GetMainTank())
end

function Spellmaster_Pyroblast(pUnit, Event)
pUnit:CastSpell(31263)
end

function Spellmaster_Divineplea(pUnit, Event)
pUnit:CastSpell(54428)
end

function Spellmaster_Phase2(pUnit, Event)
if pUnit:GetHealthPct() < 40 then
pUnit:RemoveEvents()
pUnit:SendChatMessage(14, 0, "Now it is getting serious!")
pUnit:FullCastSpell(28450)
pUnit:RegisterEvent("Spellmaster_ArcaneExplosion", 8000, 0)
pUnit:RegisterEvent("Spellmaster_Divineplea", 16000,0)
pUnit:RegisterEvent("Spellmaster_Phase3", 1000, 0)
end
end

function Spellmaster_ArcaneExplosion(pUnit, Event)
pUnit:FullCastSpell(28450)
end

function Spellmaster_Divineplea(pUnit, Event)
pUnit:CastSpell(54428)
end

function Spellmaster_Phase3(pUnit, Event)
if pUnit:GetHealthPct() < 10 then
pUnit:RemoveEvents()
pUnit:SendChatMessage(14, 0, "No this wont happend! Come my minions!")
pUnit:FullCastSpell(31624)
pUnit:RegisterEvent("Spellmaster_Arcane Barrage", 5000, 0)
pUnit:RegisterEvent("Spellmaster_ArcaneExplosion2", 13000, 0)
pUnit:RegisterEvent("Spellmaster_Divineplea", 16000,0)
end
end

function Spellmaster_ArcaneExplosion2(pUnit, Event)
pUnit:FullCastSpell(28450)
end

function Spellmaster_Arcane Barrage(pUnit, Event)
pUnit:FullCastSpellOnTarget(59248)
end

function Spellmaster_OnLeaveCombat(pUnit, Event)
pUnit:SendChatMessage(14, 0, "And another bunch of weaklings that spilled my time")
pUnit:RemoveEvents()
end

function Spellmaster_OnKilledTarget(pUnit, Event)
pUnit:SendChatMessage(14, 0, "No one can handle the power of magic except me!")
pUnit:CastSpell(65799)
end

function Spellmaster_OnDeath(pUnit, Event)
pUnit:SendChatMessage(14, 0, "How... How have you beaten my knowlegde! No.. you.... wil....... ARGH!")
pUnit:RemoveEvents()
end

RegisterUnitEvent(56565, 1, "Spellmaster_OnCombat")
RegisterUnitEvent(56565, 2, "Spellmaster_OnLeaveCombat")
RegisterUnitEvent(56565, 3, "Spellmaster_OnKilledTarget")
RegisterUnitEvent(56565, 4, "Spellmaster_OnDeath")

Dimman
01-02-10, 02:55 PM
Post it here *Paste[Bin]* (http://pastebin.com/) please :)

Thanks nice release :)

Need to spread +rep.

Milation
01-02-10, 03:14 PM
There XD http://pastebin.com/m687dd46

P1raten
09-02-10, 01:57 AM
Tank n spank ftl.

Good first script though.

Milation
09-02-10, 06:29 AM
Thanks

Abrasive
15-02-10, 08:09 PM
hey there,

on this line

function Spellmaster_Arcane Barrage(pUnit, Event)
pUnit:FullCastSpellOnTarget(59248)
end

gotta remove the space between Arcane Barracge

function Spellmaster_Arcanebarrage(pUnit, Event)
pUnit:FullCastSpellOnTarget(59248)
end

Other than that seems to work good.