{ArcEmu} LUA help! menu

User Tag List

Results 1 to 3 of 3
  1. #1
    ariax1's Avatar Member
    Reputation
    1
    Join Date
    Aug 2008
    Posts
    12
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    {ArcEmu} LUA help!

    Hey there!

    I'm having problems with my LUA code for my custom boss npc on my server.

    This is my first LUA and I've been using a program called "GamerX's Lua Script Generator"

    Im getting the following error message when i start arcemu-world.exe:

    LuaEngine: scripts\Malygen.lua...
    failed. (could not load)
    scripts\Malygen.lua:48: unexpected symbor near ' ,'


    This is how my LUA file looks like:
    Code:
    function EnterCombat_OnCombat(Unit, Event) 
    Unit:SendChatMessage(12, 0, "Thousands have come before you... They have all failed.")
    Unit:RegisterEvent("PhaseTwo_PhaseTwo",1000,0)
    Unit:RegisterEvent("PhaseTwo_PhaseTwo",1000,0)
    Unit:RegisterEvent("PhaseTwo_PhaseTwo",1000,0)
    Unit:RegisterEvent("PhaseTwo_PhaseTwo",1000,0)
    Unit:RegisterEvent("PhaseTwo_PhaseTwo",1000,0)
    Unit:RegisterEvent("PhaseTwo_PhaseTwo",1000,0)
    end
    
    function SpawnofMalygen_Spawn(pUnit, Event) 
    pUnit:SpawnCreature(920222, 3181, -1113, 179, 2, 16, 30000) 
    end
    
    function SpawnofMalygen_Spawn3(pUnit, Event) 
    pUnit:SpawnCreature(92022, 3181, 1113, 179, 2, 16, 30000) 
    end
    
    function NetherProtection_NetherProtection(pUnit, Event) 
    pUnit:CastSpell(34518, pUnit:GetRandomPlayer(0)) 
    end
    
    function AntiMagicShield_AntiMagicShield(pUnit, Event) 
    pUnit:CastSpell(19645, pUnit:GetRandomPlayer(0)) 
    end
    
    function DrawShadow_DrawShadow(pUnit, Event) 
    pUnit:CastSpell(33563, pUnit:GetRandomPlayer(0)) 
    end
    
    function ShadowNova_ShadowNova(pUnit, Event) 
    pUnit:CastSpell(38627, pUnit:GetRandomPlayer(0)) 
    end
    
    function PhaseTwo_PhaseTwo(pUnit, Event) 
    if pUnit:GetHealthPct() < 75 then 
    pUnit:RemoveEvents(); 
    pUnit:FullCastSpell(0)
    pUnit:RegisterEvent("SpawnofMalygen_Spawn",5000,6)
    Unit:RegisterEvent("PhaseTwoActTwo_PhaseTwoActTwo",1000,0)
    end 
    end
    
    function PhaseTwoActTwo_PhaseTwoActTwo(pUnit, Event) 
    if pUnit:GetHealthPct() < 75 then 
    pUnit:RemoveEvents(); 
    pUnit:FullCastSpell(0)
    pUnit:RegisterEvent("_Spawn2",,0)
    Unit:RegisterEvent("Phase3_Phase3",1000,0)
    end 
    end
    
    function Phase3_Phase3(pUnit, Event) 
    if pUnit:GetHealthPct() < 50 then 
    pUnit:RemoveEvents(); 
    pUnit:FullCastSpell(0)
    pUnit:RegisterEvent("SpawnofMalygen_Spawn3",5000,6)
    Unit:RegisterEvent("PhaseFour_PhaseFour",1000,0)
    Unit:RegisterEvent("PhaseFour_PhaseFour",1000,0)
    Unit:RegisterEvent("PhaseFour_PhaseFour",1000,0)
    Unit:RegisterEvent("PhaseFour_PhaseFour",1000,0)
    Unit:RegisterEvent("PhaseFour_PhaseFour",1000,0)
    end 
    end
    
    function PhaseFour_PhaseFour(pUnit, Event) 
    if pUnit:GetHealthPct() < 25 then 
    pUnit:RemoveEvents(); 
    pUnit:FullCastSpell(0)
    pUnit:RegisterEvent("DrawShadow_DrawShadow", 20000, 0)
    thanks in advance

    {ArcEmu} LUA help!
  2. #2
    Choices's Avatar Member
    Reputation
    94
    Join Date
    Apr 2008
    Posts
    231
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Erm, there seems to be two comma's here

    Code:
    pUnit:RegisterEvent("_Spawn2",,0)

  3. #3
    ariax1's Avatar Member
    Reputation
    1
    Join Date
    Aug 2008
    Posts
    12
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ty vm+Rep

Similar Threads

  1. [Help] Need LUA help? Post here!
    By EcHoEs in forum World of Warcraft Emulator Servers
    Replies: 20
    Last Post: 10-03-2010, 01:18 PM
  2. [Lua][ArcEmu] Need help with Lua will Rep
    By Pedregon in forum WoW EMU Questions & Requests
    Replies: 5
    Last Post: 03-20-2010, 02:39 PM
  3. LUA help
    By stoneharry in forum World of Warcraft Emulator Servers
    Replies: 16
    Last Post: 02-25-2008, 03:27 PM
  4. Lua help
    By reconz in forum World of Warcraft Emulator Servers
    Replies: 12
    Last Post: 02-18-2008, 07:03 PM
  5. Lua help
    By Tom_2001 in forum World of Warcraft Emulator Servers
    Replies: 10
    Last Post: 02-04-2008, 12:17 PM
All times are GMT -5. The time now is 05:35 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search