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 | 
 

 New Lua Script With a Spell =D

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


Posts: 30
Join date: 2008-05-08
Age: 15
Location: Sweden

PostSubject: New Lua Script With a Spell =D   Fri May 09, 2008 6:26 am

Hey! I wonder if my new script will work. With a spell Razz
Code:
function Curser_OnCombat(Unit, Event)
Unit:SendChatMessage(12, 0, "Hope you're not afraid of Fire!")
end

function Curser_OnDied(Unit, Event)
Unit:SendChatMessage(12, 0, "You... are too.. Late!..")
Unit:RemoveEvents()
end



function Curser_Fireball(pUnit, Event)
local plr = pUnit:GetRandomPlayer(0)
if (plr ~= nil) then
pUnit:FullCastSpellOnTarget(133, plr)
end

RegisterUnitEvent(111206, 1, "Curser_OnCombat")
RegisterUnitEvent(111206, 2, "Curser_OnDied")
RegisterUnitEvent(111206, 3, "Curser_Fireball")


He is supposed to say, Normal talking.. When he enters combat.
And he is allso supposed to be casting spell 133 = Fireball. How often will he cast it? Like Whenever he can would be good Smile
And if he does he says somthing.
Back to top Go down
View user profile http://www.nxwow.aowc.net
Darhan
Admin
Admin


Posts: 63
Join date: 2008-04-23

PostSubject: Re: New Lua Script With a Spell =D   Fri May 09, 2008 8:31 am

function Curser_OnCombat(Unit, Event)
Unit:SendChatMessage(14, 0, "Hope you're not afraid of Fire!")
Unit:RegisterEvent("Curser_Fireball", timerinmilisec, howmanytimes)
end

function Curser_OnDied(Unit, Event)
Unit:SendChatMessage(14, 0, "You... are too.. Late!..")
Unit:RemoveEvents()
end

function Curser_Fireball(pUnit, Event)
local plr = pUnit:GetRandomPlayer(0)
if (plr ~= nil) then
pUnit:FullCastSpellOnTarget(133, plr)
end
end

RegisterUnitEvent(111206, 1, "Curser_OnCombat")
RegisterUnitEvent(111206, 2, "Curser_OnDied")



RegisterUnitEvent(111206, 3, "Curser_Fireball") <- This is impossible Wink
Back to top Go down
View user profile
 

New Lua Script With a Spell =D

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