LUA script question menu

Shout-Out

User Tag List

Results 1 to 5 of 5
  1. #1
    Zordin's Avatar Banned
    Reputation
    21
    Join Date
    Jan 2007
    Posts
    163
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    LUA script question

    I'm making my first LUA scripted boss. But my LUA script is not working, the error it says when ascent-world starts it up is
    Code:
    11:33 N LuaEngine: Kil'tazoor2.loa... failed. (could not load) scriptskil'tazoor2.lua:3: unexpected symbol near ','
    Thats the error, heres the script

    Code:
    function OnCombat_OnCombat(Unit, Event) 
    Unit:SendChatMessage(12, 0, "No one can defeat the kobolds, insects!")
    Unit:RegisterEvent("Kil'tazoor_Frostbolt of Ages", , 3)
    Unit:RegisterEvent("Kil'tazoor_Frostbolt of Ages", 25000, 5)
    Unit:RegisterEvent("Kil'tazoor_Frostbolt of Ages", 25000, 5)
    Unit:RegisterEvent("Kil'tazoor_Frostbolt of Ages", 25000, 5)
    Unit:RegisterEvent("Kil'tazoor_Frostbolt of Ages", 25000, 5)
    end
    
    function Kil'tazoor_Frostbolt of Ages(pUnit, Event) 
    pUnit:CastSpell(11, pUnit:GetMainTank()) 
    end
    
    function OnLeave_OnLeaveCombat(Unit, Event) 
    Unit:RemoveEvents() 
    Unit:SendChatMessage(12, 0, "You loose, cowards!") 
    end
    
    function OnDeath_OnDied(Unit, Event) 
    Unit:RemoveEvents() 
    Unit:SendChatMessage(12, 0, "Other's will take my place!") 
    end
    
    function OnKillerTarget_OnKilledTarget(Unit, Event) 
    Unit:SendChatMessage(12, 0, "Your death, makes me happy!") 
    end
    
    RegisterUnitEvent(70013, 1, "OnCombat_OnCombat")
    RegisterUnitEvent(70013, 2, "OnLeave_OnLeaveCombat")
    RegisterUnitEvent(70013, 3, "OnKillerTarget_OnKilledTarget")
    RegisterUnitEvent(70013, 4, "_OnDied")
    +Rep to who ever solves it for me xD

    Thanks in advance.
    Edit: I removed the part where he casts frostbolt of ages, and it worked, id still like him to cast these though
    Last edited by Zordin; 06-08-2008 at 04:56 AM.

    LUA script question
  2. #2
    Power of Illuminati's Avatar Contributor
    Reputation
    179
    Join Date
    May 2008
    Posts
    1,410
    Thanks G/R
    6/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As the error tells it's near the , the error occur, and when you remove the frostbolt of ages function it work, I can just think of this

    function Kil'tazoor_Frostbolt of Ages(pUnit, Event)
    That is your function name now, remove the ' in there, it's prob bugging it up real nice.

    Also remove the space bars, just messing it up...

    So it should be like this

    function OnCombat_OnCombat(Unit, Event)
    Unit:SendChatMessage(12, 0, "No one can defeat the kobolds, insects!")
    Unit:RegisterEvent("Kiltazoor_FrostboltofAges", , 3)
    Unit:RegisterEvent("Kiltazoor_FrostboltofAges", 25000, 5)
    Unit:RegisterEvent("Kiltazoor_FrostboltofAges", 25000, 5)
    Unit:RegisterEvent("Kiltazoor_FrostboltofAges", 25000, 5)
    Unit:RegisterEvent("Kiltazoor_FrostboltofAges", 25000, 5)
    end

    function Kiltazoor_FrostboltofAges(pUnit, Event)
    pUnit:CastSpell(11, pUnit:GetMainTank())
    end

    function OnLeave_OnLeaveCombat(Unit, Event)
    Unit:RemoveEvents()
    Unit:SendChatMessage(12, 0, "You loose, cowards!")
    end

    function OnDeath_OnDied(Unit, Event)
    Unit:RemoveEvents()
    Unit:SendChatMessage(12, 0, "Other's will take my place!")
    end

    function OnKillerTarget_OnKilledTarget(Unit, Event)
    Unit:SendChatMessage(12, 0, "Your death, makes me happy!")
    end

    RegisterUnitEvent(70013, 1, "OnCombat_OnCombat")
    RegisterUnitEvent(70013, 2, "OnLeave_OnLeaveCombat")
    RegisterUnitEvent(70013, 3, "OnKillerTarget_OnKilledTarget")
    RegisterUnitEvent(70013, 4, "_OnDied")
    I think it was from the spacebars now when I use my brain
    Last edited by Power of Illuminati; 06-08-2008 at 06:13 AM.

  3. #3
    TheSpidey's Avatar Elite User
    Reputation
    365
    Join Date
    Jan 2008
    Posts
    2,200
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Unit:RegisterEvent("Kiltazoor_FrostboltofAges", , 3)
    See the error in that statement?

  4. #4
    Power of Illuminati's Avatar Contributor
    Reputation
    179
    Join Date
    May 2008
    Posts
    1,410
    Thanks G/R
    6/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thespidey got a point there too -.^

    *grrr*

  5. #5
    Zordin's Avatar Banned
    Reputation
    21
    Join Date
    Jan 2007
    Posts
    163
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, thanks ill try these out.

Similar Threads

  1. [Lua] Newbie Lua scripting question (SOLVED)
    By Maybepie in forum WoW EMU Questions & Requests
    Replies: 10
    Last Post: 04-16-2010, 07:21 AM
  2. lua scripting question
    By deep6ixed in forum WoW EMU Questions & Requests
    Replies: 3
    Last Post: 08-08-2009, 06:31 AM
  3. Lua Scripting question.
    By gregzoid2 in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 07-06-2008, 02:45 PM
  4. LUA Script question.. [AI_Tick?]
    By Lakotaness in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 06-14-2008, 06:54 AM
  5. LUA Script Question
    By abndrew82 in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 02-08-2008, 02:55 PM
All times are GMT -5. The time now is 03:06 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