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 | 
 

 What did i do wrong? :)

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


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

PostSubject: What did i do wrong? :)   Sun May 18, 2008 4:13 pm

Code:
function Khroou_OnCombat(pUnit, Event)
pUnit:RegisterEvent("Boss_Phase2", 1000, 0)
Unit:SendChatMessage(12, 0, "You are too late... The spirit of Cholzzon is
mine...Mine!")
end
end

function Khroou_Phase2(pUnit, Event)
if pUnit:GetHealthPct() < 90 then
Unit:CastSpell(33933)
pUnit:RegisterEvent("BlastWave", 5000, 3,)
Unit:SendChatMessage:(12, 0, "Is it hot? Or just me...")
end
end

function Khroou_Phase3(pUnit, Event)
if pUnit:GetHealthPct() < 80 then
Unit:SendChatMessage(12, 0, "Pittiful Mortals, that you even try..")
Unit:CastSpell(27088)
pUnit:RegisterEvent("FrostNova", 500, 4,)
Unit:SendChatMessage(12, 0, "Hope it's not too cold")
end
end

function Khroou_Phase4(pUnit, Event)
if pUnit:GetHealthPct() < 70 then
pUnit:RegisterEvent("Khroou_Phase5", 1000, 0)
end
end

function Khroou_Phase5(pUnit, Event)
if pUnit:GetHealthPct() < 60 then
pUnit:RegisterEvent("Khroou_Phase6", 1000, 0)
Unit:CastSpell:(27082)
pUnit:RegisterEvent("ArcaneExplosion", 1200, 8)
Unit:SendChatMessage:("12, 0, Taste some Arcane Powers, From Cholzzon's
Mind!")
end
end

function Khroou_Phase6(pUnit, Event)
if pUnit:GetHealthPct() < 50 then
pUnit:RegisterEvent("Khroou_Phase7", 1000, 0)
end
end

function Khroou_Phase7(pUnit, Event)
if pUnit:GetHealthPct() < 40 then
pUnit:RegisterEvent("Khroou_Phase8", 1000, 0)
Unit:SendChatMessage:(12, 0, "Moooo!")
end
end


function Khroou_Phase8(pUnit, Event)
if pUnit:GetHealthPct() < 30 then
pUnit:RegisterEvent("Khroou_Phase9", 1000, 0)
Unit:sendChatMessage:(12, 0, You are strong Mortals...")
end
end

function Khroou_Phase9(pUnit, Event)
if pUnit:GetHealthPct() < 20 then
pUnit:RegisterEvent("Khroou_Phase10", 1000, 0)
Unit:CastSpell(40647)
pUnit:RegisterEvent("ShadowPrison", 15000, 1)
end
end

function Khroou_Phase10(pUnit, Event)
if pUnit:GetHealthPct() < 10 then
pUnit:RegisterEvent("Khroou_Phase11", 1000, 0)
end
end

function Khroou_Phase11(pUnit, Event)
if pUnit:GetHealthPct() < 5 then
pUnit:SendChatMessage(14, 0, "Damn you Mortals, You can't Beat me!")
end
end

function Khroou_LeaveCombat(pUnit, Event)
Unit:SendChatMessage(12, 0, Cowards!")
pUnit:RemoveEvents()
end

function Khroou_Dead(pUnit, Event)
Unit:SendChatMessage(12, 0, No! It can't be!")
pUnit:RemoveEvents()
end

function Khroou_KilledTarget(pUnit, Event)
pUnit:SendChatMessage(14, 0, "Who is next to give his soul to me?")
end

RegisterUnitEvent(111000, 1, "Khrouu_OnCombat")
RegisterUnitEvent(111000, 2, "Khrouu_LeaveCombat")
RegisterUnitEvent(111000, 3, "Khrouu_KilledTarget")
RegisterUnitEvent(111000, 4, "Khrouu_Dead")


Would be verry happy if you can find the problem Smile
Back to top Go down
View user profile http://www.nxwow.aowc.net
Wartick
Admin
Admin


Posts: 23
Join date: 2008-04-23
Age: 14
Location: Finland

PostSubject: Re: What did i do wrong? :)   Sun May 18, 2008 4:58 pm

So look at the part
Code:
function Khroou_OnCombat(pUnit, Event)
pUnit:RegisterEvent("Boss_Phase2", 1000, 0)
Unit:SendChatMessage(12, 0, "You are too late... The spirit of Cholzzon is
mine...Mine!")
end
end


Search the forums for the new Sendchatmessage form. It shoud be in SVN

And there shoud be only 1x "end"


1end for every "function"
1end for every "if"

so that doesnt have "if" its only 1. ^^
Back to top Go down
View user profile http://lasp.forummotion.com
Cholzzon
Spammer?


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

PostSubject: Re: What did i do wrong? :)   Mon May 19, 2008 6:41 am

ok thx
Back to top Go down
View user profile http://www.nxwow.aowc.net
soet
First post yay


Posts: 1
Join date: 2008-05-21

PostSubject: Re: What did i do wrong? :)   Wed May 21, 2008 10:21 pm

Try this:

Code:
function Khrouu_OnCombat(pUnit, Event)
pUnit:SendChatMessage(12, 0, "You are too late... The spirit of Cholzzon is mine...Mine!")
pUnit:RegisterEvent("Khroou_Phase2", 1000, 0)
end

function Khroou_Phase2(pUnit, Event)
if pUnit:GetHealthPct() < 90 then
pUnit:RemoveEvents();
pUnit:SendChatMessage(12, 0, "Is it hot? Or just me...")
pUnit:CastSpell(33933)
pUnit:RegisterEvent("Khroou_Phase3",1000, 0)
end
end

function Khroou_Phase3(pUnit, Event)
if pUnit:GetHealthPct() < 80 then
pUnit:RemoveEvents();
pUnit:SendChatMessage(12, 0, "Pittiful Mortals, that you even try..")
pUnit:CastSpell(27088)
pUnit:SendChatMessage(12, 0, "Hope it's not too cold")
pUnit:RegisterEvent("Khroou_Phase4", 1000, 0)
end
end

function Khroou_Phase4(pUnit, Event)
if pUnit:GetHealthPct() < 70 then
pUnit:RemoveEvents();
pUnit:RegisterEvent("Khroou_Phase5", 1000, 0)
end
end

function Khroou_Phase5(pUnit, Event)
if pUnit:GetHealthPct() < 60 then
pUnit:RemoveEvents();
pUnit:SendChatMessage(12, 0, "Taste some Arcane Powers, From Cholzzon's Mind!")
pUnit:CastSpell(27082)
pUnit:RegisterEvent("Khroou_Phase6", 1000, 0)
end
end

function Khroou_Phase6(pUnit, Event)
if pUnit:GetHealthPct() < 50 then
pUnit:RemoveEvents();
pUnit:RegisterEvent("Khroou_Phase7", 1000, 0)
end
end

function Khroou_Phase7(pUnit, Event)
if pUnit:GetHealthPct() < 40 then
pUnit:RemoveEvents();
pUnit:SendChatMessage(12, 0, "Moooo!")
pUnit:RegisterEvent("Khroou_Phase8", 1000, 0)
end
end


function Khroou_Phase8(pUnit, Event)
if pUnit:GetHealthPct() < 30 then
pUnit:RemoveEvents();
pUnit:sendChatMessage(12, 0, "You are strong Mortals...")
pUnit:RegisterEvent("Khroou_Phase9", 1000, 0)
end
end

function Khroou_Phase9(pUnit, Event)
if pUnit:GetHealthPct() < 20 then
pUnit:RemoveEvents();
pUnit:CastSpell(40647)
pUnit:RegisterEvent("Khroou_Phase10", 1000, 0)
end
end

function Khroou_Phase10(pUnit, Event)
if pUnit:GetHealthPct() < 10 then
pUnit:RemoveEvents();
pUnit:RegisterEvent("Khroou_Phase11", 1000, 0)
end
end

function Khroou_Phase11(pUnit, Event)
if pUnit:GetHealthPct() < 5 then
pUnit:RemoveEvents();
pUnit:SendChatMessage(12, 0, "Damn you Mortals, You can't Beat me!")
end
end

function Khrouu_OnLeaveCombat(pUnit, Event)
pUnit:SendChatMessage(12, 0, "Cowards!")
pUnit:RemoveEvents()
end


function Khrouu_OnKilledTarget(pUnit, Event)
pUnit:SendChatMessage(12, 0, "Who is next to give his soul to me?")
end

function Khrouu_OnDied(pUnit, Event)
pUnit:SendChatMessage(12, 0, "No! It can't be!")
pUnit:RemoveEvents()
end

RegisterUnitEvent(111000,1,"Khrouu_OnCombat")
RegisterUnitEvent(111000,2,"Khrouu_OnLeaveCombat")
RegisterUnitEvent(111000,3,"Khrouu_OnKilledTarget")
RegisterUnitEvent(111000,4,"Khrouu_OnDied")
Back to top Go down
View user profile
 

What did i do wrong? :)

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