Offical forum of LASP, a project to script all the areas in wow via LUA
HomeHome  ­FAQFAQ  ­SearchSearch  ­MemberlistMemberlist  ­UsergroupsUsergroups  ­Donate!  ­RegisterRegister  ­Log inLog in  
Post new topic   Reply to topicShare | 
 

 Any suggestions on this script?

View previous topic View next topic Go down 
AuthorMessage
appletart
First post yay


Posts: 1
Join date: 2008-07-07

PostSubject: 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?
Back to top Go down
View user profile
Ramor
New guy


Posts: 6
Join date: 2008-04-29
Age: 19
Location: NC, USA

PostSubject: 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.
Back to top Go down
View user profile http://autumn-insomnia.com/
 

Any suggestions on this script?

View previous topic View next topic Back to top 
Page 1 of 1

Permissions of this forum:You cannot reply to topics in this forum
LUA Area Scripting Project :: General :: Support! If you want to ask anything, do it here-
Post new topic   Reply to topic