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 | 
 

 a script pls help

View previous topic View next topic Go down 
AuthorMessage
sufa
Spammer?


Posts: 37
Join date: 2008-04-27

PostSubject: a script pls help   Fri May 09, 2008 7:07 am

will this work or do i have some mistakes??

function Example_OnCombat(Unit, Event)
Unit:SendChatMessage(12, 0 , "Welcome to your death!!!")
end

function Example_OnDied(Unit, Event)
Unit:SendChatMessage(12, 0 , "Noooo i never tought you beat me!!!!")
Unit:RemoveEvents()
end

function Example_OnKilledTarget(Unit, Event)
Unit:SendChatMessage(12, 0 , "Fool You Are Not Prepared!!")
end

function Example_OnLeaveCombat(Unit, Event)
Unit:SendChatMessage(12, 0 , "HOO leaving are you now chicken!!")
Unit:RemoveEvents()
end

function Example_OnCombat2(pUnit, Event)
if pUnit:GetHealthPct() < 95 then
pUnit:SendChatMessage (11, 0, "Taste the flames of Sulfuron!")
pUnit:CastSpell(20566)
pUnit:RegisterEvent("Example_OnCombat2",1000, 0)
pUnit:RemoveEvents();
end
end






RegisterUnitEvent(40009, 1, "Example_OnCombat")
RegisterUnitEvent(40009, 2, "Example_OnLeaveCombat")
RegisterUnitEvent(40009, 3, "Example_OnKilledTarget")
RegisterUnitEvent(40009, 4, "Example_OnDied")
pUnit:RegisterEvent("Example_OnCombat2", 10000, 1)
Back to top Go down
View user profile
Darhan
Admin
Admin


Posts: 63
Join date: 2008-04-23

PostSubject: Re: a script pls help   Fri May 09, 2008 8:30 am

Code:
function Example_OnCombat(Unit, Event)
Unit:SendChatMessage(12, 0 , "Welcome to your death!!!")
Unit:RegisterEvent("Example_OnCombat2",1000, 0)
end

function Example_OnDied(Unit, Event)
Unit:SendChatMessage(12, 0 , "Noooo i never tought you beat me!!!!")
Unit:RemoveEvents()
end

function Example_OnKilledTarget(Unit, Event)
Unit:SendChatMessage(12, 0 , "Fool You Are Not Prepared!!")
end

function Example_OnLeaveCombat(Unit, Event)
Unit:SendChatMessage(12, 0 , "HOO leaving are you now chicken!!")
Unit:RemoveEvents()
end

function Example_OnCombat2(pUnit, Event)
if pUnit:GetHealthPct() < 95 then
pUnit:SendChatMessage (11, 0, "Taste the flames of Sulfuron!")
pUnit:CastSpell(20566)
pUnit:RemoveEvents()
end
end



RegisterUnitEvent(40009, 1, "Example_OnCombat")
RegisterUnitEvent(40009, 2, "Example_OnLeaveCombat")
RegisterUnitEvent(40009, 3, "Example_OnKilledTarget")
RegisterUnitEvent(40009, 4, "Example_OnDied")


Try this
Back to top Go down
View user profile
sufa
Spammer?


Posts: 37
Join date: 2008-04-27

PostSubject: Re: a script pls help   Fri May 09, 2008 11:29 am

kk worked thx
Back to top Go down
View user profile
 

a script pls help

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