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  
Share | 
 

 [help] lua >.<

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


Posts: 37
Join date: 2008-04-27

PostSubject: [help] lua >.<   Wed May 21, 2008 9:45 am

srry if i am bugging you but i downloaded a program that helps me do the lua scripts and i am still getting the freken errors and i am sad pls help me i did this lua from pieces of the lua scripts and it is saying , expected near ( pls help me
[code]function Firegod_OnCombat(Unit,Event)
Unit:SendChatMessage(12,0,"Welcome to your death!!!")
Unit:RegisterEvent("firegod_oncombat",1000,0)
Unit:RegisterEvent("firegod_oncombat2",1000,0)
Unit:RegisterEvent("firegod_oncombat3",1000,0)
Unit:RegisterEvent("firegod_oncombat4",1000,0)
Unit:RegisterEvent("firegod_oncombat5",1000,0)
Unit:RegisterEvent("firegod_oncombat6",1000,0)
Unit:RegisterEvent("firegod_oncombat7",1000,0)
Unit:RegisterEvent("firegod_oncombat8",1000,0)
Unit:RegisterEvent("firegod_oncombat9",1000,0)
Unit:RegisterEvent("firegod_oncombat10",1000,0)
Unit:RegisterEvent("firegod_oncombat11",1000,0)
Unit:RegisterEvent("firegod_oncombat12",1000,0)
Unit:RegisterEvent("firegod_oncombat13",1000,0)
Unit:RegisterEvent("firegod_oncombat14",1000,0)
Unit:RegisterEvent("firegod_oncombat15",1000,0)
Unit:RegisterEvent("firegod_oncombat16",1000,0)
Unit:RegisterEvent("firegod_oncombat17",1000,0)
end

function Firegod_spell1(pUnit,Event)
pUnit:CastSpell(20565)
end

function firegod_oncombat(pUnit,Event)
if pUnit:GetHealthPct() < 95 then
pUnit:RemoveEvents();
pUnit:RegisterEvent("Firegod_spell1", 1000, 1)
end
end
function firegod_oncombat2(pUnit,Event)
if pUnit:GetHealthPct() < 90 then
pUnit:RemoveEvents();
pUnit:RegisterEvent("Firegod_spell1", 1000, 1)
end
end

function firegod_oncombat3(pUnit,Event)
if pUnit:GetHealthPct() < 85 then
pUnit:RemoveEvents();
pUnit:RegisterEvent("Firegod_spell1", 1000, 1)
end
end

function firegod_oncombat4(pUnit,Event)
if pUnit:GetHealthPct() < 80 then
pUnit:RemoveEvents();
pUnit:RegisterEvent("Firegod_spell1", 1000, 1)
end
end

function firegod_oncombat4pUnit,Event)
if pUnit:GetHealthPct() < 75 then
pUnit:RemoveEvents();
pUnit:RegisterEvent("Firegod_spell1", 1000, 1)
end
end

function firegod_oncombat5(pUnit,Event)
if pUnit:GetHealthPct() < 70 then
pUnit:RemoveEvents();
pUnit:RegisterEvent("Firegod_spell1", 1000, 1)
end
end

function firegod_oncombat6(pUnit,Event)
if pUnit:GetHealthPct() < 65 then
pUnit:RemoveEvents();
pUnit:RegisterEvent("Firegod_spell1", 1000, 1)
end
end

function firegod_oncombat7(pUnit,Event)
if pUnit:GetHealthPct() < 60 then
pUnit:RemoveEvents();
pUnit:RegisterEvent("Firegod_spell1", 1000, 1)
end
end

function firegod_oncombat8(pUnit,Event)
if pUnit:GetHealthPct() < 55 then
pUnit:RemoveEvents();
pUnit:RegisterEvent("Firegod_spell1", 1000, 1)
end
end

function firegod_oncombat9(pUnit,Event)
if pUnit:GetHealthPct() < 50 then
pUnit:RemoveEvents();
pUnit:FullCastSpell(0)
pUnit:RegisterEvent("Firegod_spell1", 1000, 1)
end
end

function firegod_oncombat10(pUnit,Event)
if pUnit:GetHealthPct() < 45 then
pUnit:RemoveEvents();
pUnit:RegisterEvent("Firegod_spell1", 1000, 1)
end
end

function firegod_oncombat11(pUnit,Event)
if pUnit:GetHealthPct() < 40 then
pUnit:RemoveEvents();
pUnit:RegisterEvent("Firegod_spell1", 1000, 1)
end
end

function firegod_oncombat12(pUnit,Event)
if pUnit:GetHealthPct() < 35 then
pUnit:RemoveEvents();
pUnit:RegisterEvent("Firegod_spell1", 1000, 1)
end
end

function firegod_oncombat13(pUnit,Event)
if pUnit:GetHealthPct() < 30 then
pUnit:RemoveEvents();
pUnit:RegisterEvent("Firegod_spell1", 1000, 1)
end
end

function firegod_oncombat14(pUnit,Event)
if pUnit:GetHealthPct() < 25 then
pUnit:RemoveEvents();
pUnit:RegisterEvent("Firegod_spell1", 1000, 1)
end
end

function firegod_oncombat15(pUnit,Event)
if pUnit:GetHealthPct() < 20 then
pUnit:RemoveEvents();
pUnit:RegisterEvent("Firegod_spell1", 1000, 1)
end
end

function firegod_oncombat16(pUnit,Event)
if pUnit:GetHealthPct() < 15 then
pUnit:RemoveEvents();
pUnit:RegisterEvent("Firegod_spell1", 1000, 1)
end
end

function firegod_oncombat17(pUnit,Event)
if pUnit:GetHealthPct() < 10 then
pUnit:RemoveEvents();
pUnit:RegisterEvent("Firegod_spell1", 1000, 1)
end
end

function firegod_OnLeaveCombat(Unit,Event)
Unit:RemoveEvents();
end

function Friegod_OnDied(Unit,Event)
Unit:RemoveEvents();
Unit:SendChatMessage(12,0,"Nooooo this cant be i have been defeated!!")
end

function Firegod_OnKilledTarget(Unit,Event)
Unit:SendChatMessage(12,0,"Die fool!!")
end

RegisterUnitEvent(40009,1,"Firegod_OnCombat")
RegisterUnitEvent(40009,2,"firegod_OnLeaveCombat")
RegisterUnitEvent(40009,3,"Firegod_OnKilledTarget")
RegisterUnitEvent(40009,4,"Friegod_OnDied")[code]
Back to top Go down
View user profile
Darhan
Admin
Admin


Posts: 63
Join date: 2008-04-23

PostSubject: Re: [help] lua >.<   Wed May 21, 2008 2:59 pm

That is totally not how a boss chain works..look @ the sample / some tutorials.
Back to top Go down
View user profile
 

[help] lua >.<

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-