appletart First post yay
Posts: 1 Join date: 2008-07-07
 | Subject: Any suggestions on this script? Tue Jul 08, 2008 10:44 pm | |
| Anyone have any suggestions on how to make this script better? | Code: | -- FelHunter function Felhunter_OnCombat(Unit, Event) Unit:RegisterEvent("_Wrathone", 2000, 0) end
function Felhunter_Ownage(pUnit, Event) local plr = pUnit:GetMainTank() if (plr ~= nil) then pUnit:FullCastSpellOnTarget(9739, plr) pUnit:RegisterEvent("Felhunter_HealthRandom") end end
function Felhunter_HealthRandom(pUnit, Event) if pUnit:GetHealthPct() < 90 then pUnit:SendChatMessage(12, 0, "Mwahahahahahah! You will die now!") pUnit:CastSpell(31610) end end
function Felhunter_SpellList(pUnit, Event) local plr = pUnit:GetClosestPlayer() if (plr ~= nil) then pUnit:FullCastSpell(37727, 3000, 0)
function Felhunter_OnDied(Unit, Event) Unit:RemoveEvents() Unit:SendChatMessage(12, 0, "This.. cannot... happen!!!") end
function Felhunter_OnLeaveCombat(Unit, Event) Unit:RemoveEvents() Unit:SendChatMessage(11, 0, "You fail at life noob!") end
RegisterUnitEvent(417, 1, "Felhunter_OnCombat") RegisterUnitEvent(417, 2, "Felhunter_OnLeaveCombat") RegisterUnitEvent(417, 4, "Felhunter_OnDied") |
and will it work? |
|
Ramor New guy

Posts: 6 Join date: 2008-04-29 Age: 19 Location: NC, USA
 | Subject: Re: Any suggestions on this script? Fri Jul 11, 2008 4:59 am | |
| For one, the SpellList function isn't being registered, it also does not have an 'end'. Second, your first function is registering '_Wrathone', when there is no such function in this script. So not, this script will not work. |
|