function LordDread_OnCombat(Unit, Event)
Unit:SendChatMessage(14, 0, "Why Have you come here Mortals!! This shall be your final resting place!!!!!!!")
Unit:RegisterEvent("LordDread_Spell1", 60000, 2)
Unit:RegisterEvent("LordDread_Summon", 60000, 2)
Unit:RegisterEvent("LordDread_Summon2", 60000, 2)
Unit:RegisterEvent("LordDread_Phase1", 5000, 1)
unit:RegisterEvent("LordDread_Phase2", 5000, 1)
unit:RegisterEvent("LordDread_Phase3", 5000, 1)
end
function LordDread_Phase1(Unit, Event)
if Unit:GetHealthPct() <= 80 then
Unit:SendChatMessage(14, 0, "Feel my Power!")
Unit:CastSpell(95441)
Unit:SetScale(1)
Unit:SetModel(20939)
end
end
function LordDread_Phase2(Unit, Event)
if Unit:GetHealthPct() <= 50 then
Unit:SendChatMessage(14, 0, "Don't Make me Laugh!")
Unit:CastSpell(20694)
Unit:SetScale(1)
Unit:SetModel(20939)
end
end
function LordDread_Phase3(Unit, Event)
if Unit:GetHealthPct() <= 30 then
Unit:SendChatMessage(14, 0, "DIE!")
Unit:CastSpell(103891)
Unit:SetScale(1)
Unit:SetModel(21135)
end
end
function LordDread_Summon2 (Unit, Event)
Unit:SpawnCreature (Felguardian, 4434.249023, 2485.206055, 203.373703, 3.124879, 14, 60000);
end
function LordDread_Summon(Unit, Event)
local x = Unit:GetX();
local y = Unit:GetY();
local z = Unit:GetZ();
local o = Unit:GetO();
Unit:SpawnCreature (86747, x, y, z, o, 14 ,6000);
end
Unit:FullCastSpellOnTarget(83300, Unit:RandomPlayer)
function LordDread_Spell1(Unit, Event)
Unit:FullCastSpellOnTarget(72489, Unit:GetMainTank())
end
function LordDread_OnLeaveCombat(Unit, Event)
Unit:RemoveEvents()
function LordDread_OnKilledTarget(Unit, Event)
end
function LordDread_OnDied(Unit, Event)
Unit:RemoveEvents()
end
RegisterUnitEvent(86757, 1, "LordDread_OnCombat")
RegisterUnitEvent(86757, 2, "LordDread_OnLeaveCombat")
RegisterUnitEvent(86757, 3, "LordDread_OnKilledTarget")
RegisterUnitEvent(86757, 4, "LordDread_OnDied") [\code]
This is the script i made and i keep getting a error saying
function arguments expected near '>' i have no clue what this means please help me
[Help] Lord Dread Lua Script
Started by pretli1, Jan 25 2012 12:14 AM
6 replies to this topic
#1
Posted 25 January 2012 - 12:14 AM
#2
Posted 25 January 2012 - 07:58 AM
You missed an end at LordDread_OnLeaveCombat. :)
Brony Forever.
Favorite characters: Chrysalis, Twilight, Luna, Discord, Applejack, Rainbow Dash, Trixie.
Favorite pairings: TwiLuna, CelestiCord, Twixie, AppleDash, TwiDash, Flutterdash.
Favorite characters: Chrysalis, Twilight, Luna, Discord, Applejack, Rainbow Dash, Trixie.
Favorite pairings: TwiLuna, CelestiCord, Twixie, AppleDash, TwiDash, Flutterdash.
#3
Posted 25 January 2012 - 08:03 AM
I would try to remove the space before the ( , too
And i can't see a definition for Felguardin in LordDread_Summon2
And i can't see a definition for Felguardin in LordDread_Summon2
function LordDread_Summon2 (Unit, Event) Unit:SpawnCreature (Felguardian, 4434.249023, 2485.206055, 203.373703, 3.124879, 14, 60000); end function LordDread_Summon(Unit, Event) local x = Unit:GetX(); local y = Unit:GetY(); local z = Unit:GetZ(); local o = Unit:GetO(); Unit:SpawnCreature (86747, x, y, z, o, 14 ,6000); end
#4
Posted 25 January 2012 - 08:18 AM
Spaces before brackets doesn't matter, it ignores such stuff. And yes, missed the undefined Felguardian.
Brony Forever.
Favorite characters: Chrysalis, Twilight, Luna, Discord, Applejack, Rainbow Dash, Trixie.
Favorite pairings: TwiLuna, CelestiCord, Twixie, AppleDash, TwiDash, Flutterdash.
Favorite characters: Chrysalis, Twilight, Luna, Discord, Applejack, Rainbow Dash, Trixie.
Favorite pairings: TwiLuna, CelestiCord, Twixie, AppleDash, TwiDash, Flutterdash.
#5
Posted 25 January 2012 - 03:19 PM
ok i did everything u guys told me to accept for th thing about Felguardian idk what ua re talking about but it still doesnt work
#6
Posted 25 January 2012 - 03:41 PM
You must do something like this at the top of the script:
local Felguardian = 0 --npc entry id
Brony Forever.
Favorite characters: Chrysalis, Twilight, Luna, Discord, Applejack, Rainbow Dash, Trixie.
Favorite pairings: TwiLuna, CelestiCord, Twixie, AppleDash, TwiDash, Flutterdash.
Favorite characters: Chrysalis, Twilight, Luna, Discord, Applejack, Rainbow Dash, Trixie.
Favorite pairings: TwiLuna, CelestiCord, Twixie, AppleDash, TwiDash, Flutterdash.
#7
Posted 26 January 2012 - 12:31 AM
Quote
You must do something like this at the top of the script:
local Felguardian = 0 --npc entry id
Just to make sure you know why this is needed.
Sure, you have a spell that calls out the boss to summon a Fel Guardian.
However, how will the script know "what the hell is a Fel Guardian" ?
You got the values, but no local that defines "THIS is the thing that defines what the Fel Guardian stands for."
Without a local that defines the NPC, the script won't be able to do it.
But if you do as Laurea said and you add in
local Felguardian = 0 --npc entry id
the script will know "Oh, so when I see "Felguardian" somewhere in the script, I have to look at this local to know what it is.
Correct me if I'm wrong, but that's how I remember it.

Similar Topics
![]() |
Basic NPC ScriptStarted by Earthful, 26 Feb 2013 |
|
|
|
![]() |
Need a vanity pet teleporter script( trinity)Started by xlennyx, 04 Sep 2012 |
|
|
|
![]() ![]() |
Need a vanitypet-teleporter scriptStarted by xlennyx, 04 Sep 2012 |
|
|
|
![]() |
[Help] Lord Baromas Arlok (Halestorm's script)Started by pretli1, 01 Jul 2012 |
|
|
|
![]() |
OnFirstEnterWorld Weather ScriptStarted by Fatal Judgement, 26 Jul 2012 |
|
|
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users















