Lua issues menu

User Tag List

Thread: Lua issues

Results 1 to 12 of 12
  1. #1
    Evilbuffy's Avatar Member
    Reputation
    38
    Join Date
    Mar 2009
    Posts
    185
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lua issues

    God Day People! There is a lot of threads regarding issues with Lua. For some reason many Lua scripts are not loading / working as they should, and I'm having the same problems. Is there anyone who could mention all the known "bugs" that cause the issues with Lua?

    This is the script I'm going to talk about at the moment, but I also have trouble getting Blizzlike scripts to work too.

    function On_Gossip(pUnit, event, player)
    local race=player:GetPlayerRace()
    if race==1 or race==3 or race==4 or race==7 or race==11 then
    pUnit:GossipCreateMenu(3544, player, 0)
    pUnit:GossipMenuAddItem(2, "Alliance Leveling Areas", 1, 0)
    pUnit:GossipMenuAddItem(2, "Custom Instances", 3, 0)
    pUnit:GossipSendMenu(player)

    else
    pUnit:GossipCreateMenu(3544, player, 0)
    pUnit:GossipMenuAddItem(2, "Horde Leveling Areas", 2, 0)
    pUnit:GossipMenuAddItem(2, "Custom Instances", 3, 0)
    pUnit:GossipSendMenu(player)
    end
    end

    function Gossip_Submenus(pUnit, event, player, id, intid, code)
    if(intid == 999) then
    pUnit:GossipCreateMenu(3543, player, 0)
    pUnit:GossipMenuAddItem(2, "Alliance Leveling Areas", 1, 0)
    pUnit:GossipMenuAddItem(2, "Horde Leveling Areas", 2, 0)
    pUnit:GossipMenuAddItem(2, "Custom Instances", 3, 0)
    pUnit:GossipSendMenu(player)
    end

    if(intid == 1) then
    pUnit:GossipCreateMenu(3543, player, 0)
    pUnit:GossipMenuAddItem(1, "No rests for the Holidays", 300, 0)
    pUnit:GossipMenuAddItem(1, "Haunted Forest", 301, 0)
    pUnit:GossipMenuAddItem(1, "Finders Forest", 302, 0)
    pUnit:GossipMenuAddItem(0, "[Back]", 999, 0)
    pUnit:GossipSendMenu(player)
    end

    if(intid == 2) then
    pUnit:GossipCreateMenu(3543, player, 0)
    pUnit:GossipMenuAddItem(1, "No rests for the Holidays", 303, 0)
    pUnit:GossipMenuAddItem(1, "Haunted Forest", 304, 0)
    pUnit:GossipMenuAddItem(1, "Finders Forest", 305, 0)
    pUnit:GossipMenuAddItem(0, "[Back]", 999, 0)
    pUnit:GossipSendMenu(player)
    end

    if(intid == 3) then
    pUnit:GossipCreateMenu(3543, player, 0)
    pUnit:GossipMenuAddItem(1, "Utgarde Keep", 306, 0)
    pUnit:GossipMenuAddItem(1, "Utgarde Pinnacle", 307, 0)
    pUnit:GossipMenuAddItem(1, "The Nexus", 308, 0)
    pUnit:GossipMenuAddItem(1, "Azjol-Nerub", 309, 0)
    pUnit:GossipMenuAddItem(1, "Ahn'kahet", 310, 0)
    pUnit:GossipMenuAddItem(1, "Halls of Lightning", 311, 0)
    pUnit:GossipMenuAddItem(0, "[Back]", 999, 0)
    pUnit:GossipSendMenu(player)
    end

    if(intid == 300) then --No rests for the Holidays
    player:Teleport(0, -4952.040039, 923.046021, 396.43798
    pUnit:GossipComplete(player)
    end

    if(intid == 301) then --Haunted Forest
    player:Teleport(0, -7186.313965, -282.150848, 60.214787)
    pUnit:GossipComplete(player)
    end

    if(intid == 302) then --Finders Forest
    player:Teleport(0, -7590.881348, 1257.607422, 136.364761)
    pUnit:GossipComplete(player)
    end

    if(intid == 303) then --No rests for the Holidays
    player:Teleport(0, -5152.333496, 1163.829590, 385.045410)
    pUnit:GossipComplete(player)
    end

    if(intid == 304) then --Haunted Forest
    player:Teleport(0, -7124.536133, -294.570343, 59.73954
    pUnit:GossipComplete(player)
    end

    if(intid == 305) then --Finders Forest
    player:Teleport(0, -7617.710449, 1414.320801, 151.082993)
    pUnit:GossipComplete(player)
    end


    if(intid == 306) then --Utgarde Keep
    player:Teleport(571, 1203.406982, -4864.382324, 41.248001)
    pUnit:GossipComplete(player)
    end

    if(intid == 307) then --Utgarde Pinnacle
    player:Teleport(571, 1269.920654, -4854.597168, 215.763885)
    pUnit:GossipComplete(player)
    end

    if(intid == 30 then --The Nexus
    player:Teleport(571, 3856.677490, 6983.687988, 86.094810)
    pUnit:GossipComplete(player)
    end

    if(intid == 309) then --Azjol-Nerub
    player:Teleport(571, 3721.598633, 2169.613525, 37.027439)
    pUnit:GossipComplete(player)
    end

    if(intid == 310) then --Ahn'kahet
    player:Teleport(571, 3653.818115, 2068.238525, 4.150550)
    pUnit:GossipComplete(player)
    end

    if(intid == 311) then --Halls of Lightning
    player:Teleport(571, 9082.833984, -1312.702759, 1058.398315)
    pUnit:GossipComplete(player)
    end

    RegisterUnitGossipEvent(100255, 1, "On_Gossip")
    RegisterUnitGossipEvent(100255, 2, "Gossip_Submenus")
    I doubt there is anything wrong with the script I'm trying to use, but for some reason something is doing so when I spawn the NPC (with the entry ID 100255) it's not showing the menus. I also have over 1000 Blizzlike Lua scripts, and they some of those don't want to work either.

    And of course I have enabled the Lua scripting in my config files:

    #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
    # Scripting Engine Setup
    #
    # ArcEmu can support multiple script backends via the means of loading .dll files for them.
    # This section in the config can enable/disable those backends.
    #
    # LUA
    # If you would like to enable the LUA scripting backend, enable this.
    # Default: 0
    #
    #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#

    <ScriptBackends LUA="1">


    - Buffy

    Lua issues
  2. #2
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    I'll look through the script when I get on my pc in 30-60mins (unless somone posts first) but I read the text and issues with Lua is generally:
    A: People just don't understand the theory, when to remove events etc
    B: There using the default Lua engine which practicly never works.

    I've only had 1 error before involving the actual Lua possibilities and that is that you cant register something in a gossip or on death.

  3. #3
    Evilbuffy's Avatar Member
    Reputation
    38
    Join Date
    Mar 2009
    Posts
    185
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okey, Thanks for helping out here.

    A: I'm not a "God" in scripting, so I may have done something wrong.
    B: We are using the default Lua engine, because our Core Dev says that we can't change it.(which is bull****).

  4. #4
    Scubast3ve's Avatar Member
    Reputation
    55
    Join Date
    Apr 2009
    Posts
    125
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You forgot to end the Gossip_Submenus function end anyway fixed it 4 ya

    Code:
    function On_Gossip(pUnit, event, player)
    local race=player:GetPlayerRace()
    if race==1 or race==3 or race==4 or race==7 or race==11 then
    pUnit:GossipCreateMenu(3544, player, 0)
    pUnit:GossipMenuAddItem(2, "Alliance Leveling Areas", 1, 0)
    pUnit:GossipMenuAddItem(2, "Custom Instances", 3, 0)
    pUnit:GossipSendMenu(player)
    
    else
    pUnit:GossipCreateMenu(3544, player, 0)
    pUnit:GossipMenuAddItem(2, "Horde Leveling Areas", 2, 0)
    pUnit:GossipMenuAddItem(2, "Custom Instances", 3, 0)
    pUnit:GossipSendMenu(player)
    end
    end
    
    function Gossip_Submenus(pUnit, event, player, id, intid, code)
    if(intid == 999) then
    pUnit:GossipCreateMenu(3543, player, 0)
    pUnit:GossipMenuAddItem(2, "Alliance Leveling Areas", 1, 0)
    pUnit:GossipMenuAddItem(2, "Horde Leveling Areas", 2, 0)
    pUnit:GossipMenuAddItem(2, "Custom Instances", 3, 0)
    pUnit:GossipSendMenu(player)
    end
    
    if(intid == 1) then
    pUnit:GossipCreateMenu(3543, player, 0)
    pUnit:GossipMenuAddItem(1, "No rests for the Holidays", 300, 0)
    pUnit:GossipMenuAddItem(1, "Haunted Forest", 301, 0)
    pUnit:GossipMenuAddItem(1, "Finders Forest", 302, 0)
    pUnit:GossipMenuAddItem(0, "[Back]", 999, 0)
    pUnit:GossipSendMenu(player)
    end
    
    if(intid == 2) then
    pUnit:GossipCreateMenu(3543, player, 0)
    pUnit:GossipMenuAddItem(1, "No rests for the Holidays", 303, 0)
    pUnit:GossipMenuAddItem(1, "Haunted Forest", 304, 0)
    pUnit:GossipMenuAddItem(1, "Finders Forest", 305, 0)
    pUnit:GossipMenuAddItem(0, "[Back]", 999, 0)
    pUnit:GossipSendMenu(player)
    end
    
    if(intid == 3) then
    pUnit:GossipCreateMenu(3543, player, 0)
    pUnit:GossipMenuAddItem(1, "Utgarde Keep", 306, 0)
    pUnit:GossipMenuAddItem(1, "Utgarde Pinnacle", 307, 0)
    pUnit:GossipMenuAddItem(1, "The Nexus", 308, 0)
    pUnit:GossipMenuAddItem(1, "Azjol-Nerub", 309, 0)
    pUnit:GossipMenuAddItem(1, "Ahn'kahet", 310, 0)
    pUnit:GossipMenuAddItem(1, "Halls of Lightning", 311, 0)
    pUnit:GossipMenuAddItem(0, "[Back]", 999, 0)
    pUnit:GossipSendMenu(player)
    end
    
    if(intid == 300) then --No rests for the Holidays
    player:Teleport(0, -4952.040039, 923.046021, 396.437988)
    pUnit:GossipComplete(player)
    end
    
    if(intid == 301) then --Haunted Forest
    player:Teleport(0, -7186.313965, -282.150848, 60.214787)
    pUnit:GossipComplete(player)
    end
    
    if(intid == 302) then --Finders Forest
    player:Teleport(0, -7590.881348, 1257.607422, 136.364761)
    pUnit:GossipComplete(player)
    end
    
    if(intid == 303) then --No rests for the Holidays
    player:Teleport(0, -5152.333496, 1163.829590, 385.045410)
    pUnit:GossipComplete(player)
    end
    
    if(intid == 304) then --Haunted Forest
    player:Teleport(0, -7124.536133, -294.570343, 59.739548)
    pUnit:GossipComplete(player)
    end
    
    if(intid == 305) then --Finders Forest
    player:Teleport(0, -7617.710449, 1414.320801, 151.082993)
    pUnit:GossipComplete(player)
    end
    
    
    if(intid == 306) then --Utgarde Keep
    player:Teleport(571, 1203.406982, -4864.382324, 41.248001)
    pUnit:GossipComplete(player)
    end
    
    if(intid == 307) then --Utgarde Pinnacle
    player:Teleport(571, 1269.920654, -4854.597168, 215.763885)
    pUnit:GossipComplete(player)
    end
    
    if(intid == 308) then --The Nexus
    player:Teleport(571, 3856.677490, 6983.687988, 86.094810)
    pUnit:GossipComplete(player)
    end
    
    if(intid == 309) then --Azjol-Nerub
    player:Teleport(571, 3721.598633, 2169.613525, 37.027439)
    pUnit:GossipComplete(player)
    end
    
    if(intid == 310) then --Ahn'kahet
    player:Teleport(571, 3653.818115, 2068.238525, 4.150550)
    pUnit:GossipComplete(player)
    end
    
    if(intid == 311) then --Halls of Lightning
    player:Teleport(571, 9082.833984, -1312.702759, 1058.398315)
    pUnit:GossipComplete(player)
    end
    end
    
    RegisterUnitGossipEvent(100255, 1, "On_Gossip")
    RegisterUnitGossipEvent(100255, 2, "Gossip_Submenus")
    Don't Forget To Give Rep To People Who Help You.

  5. #5
    Evilbuffy's Avatar Member
    Reputation
    38
    Join Date
    Mar 2009
    Posts
    185
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    if(intid == 311) then --Halls of Lightning
    player:Teleport(571, 9082.833984, -1312.702759, 1058.398315)
    pUnit:GossipComplete(player)
    end
    end
    The second "end" which you added, is what you mean I'm missing?
    I will test this out, just need to wait for the owner to come online.
    And if it works, I deeply apriciate it.

  6. #6
    Scubast3ve's Avatar Member
    Reputation
    55
    Join Date
    Apr 2009
    Posts
    125
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thats it ^^ enjoy
    Don't Forget To Give Rep To People Who Help You.

  7. #7
    Evilbuffy's Avatar Member
    Reputation
    38
    Join Date
    Mar 2009
    Posts
    185
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okey, Thanks. I will try it out, but still post stuff about the Lua engine here. Since I know the Lua engine causes a lot of issues and stuff.

  8. #8
    Scubast3ve's Avatar Member
    Reputation
    55
    Join Date
    Apr 2009
    Posts
    125
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    kk main issues include:

    - Not ending functions or ifs
    - Leaving out brackets or commas
    - Capital letters(it is all case sensitive so be careful)

    if i think of anymore i will post em
    Don't Forget To Give Rep To People Who Help You.

  9. #9
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    I'm telling you it's the core. Take a script that uses a lot of commands from the release section, then use it with the default engine, then compile the GuaEngine for example and try again. You will find a huge difference. I've already fixed 2 people's problems today and it was because there Lua engine did not support the stuff they wanted to do. Also +Rep to Scubast3ve for helping before I got back

  10. #10
    Scubast3ve's Avatar Member
    Reputation
    55
    Join Date
    Apr 2009
    Posts
    125
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In this case its not the core but yes i agree people who dig up old lua scripts only end up in here trying to use lua instead of lua++
    Don't Forget To Give Rep To People Who Help You.

  11. #11
    Zudrik's Avatar Member
    Reputation
    52
    Join Date
    Dec 2008
    Posts
    169
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've encountered a bug which made me hold off on my project with scripting 'The Light of Dawn' quest for Death Knights. Using the default Lua engine.

    Same Npc, say it's ID is like 12975. You can define it (ThisGuy = 0) and make it so if you have the same creature (saying that there are 2 spawned) they each do something different.

    It would be something like:
    The function
    ThisGuy = ThisGuy +1
    if ThisGuy == 1 then
    blah blah blah
    if ThisGuy == 2 then
    blah blah blah

    And it keeps on going.

    Now what I was doing was having this creature move with waypoint, and I had them set to destroy their waypoint map when they got to a certain area. All was working fine, however, until I had 17 of the same creature moving. So once creature 17 made it to that waypoint and destroyed their custom map, it would crash the world.exe.

    I am seriously clueless about this, but I would call it a bug.

  12. #12
    Gastricpenguin's Avatar Legendary
    Reputation
    980
    Join Date
    Feb 2007
    Posts
    2,236
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use my engine, it's way easier than lua++ :P
    Life Puzzler WoW - Website | Forums

Similar Threads

  1. Lua Issues
    By zatlantis in forum WoW EMU Questions & Requests
    Replies: 1
    Last Post: 06-12-2009, 05:17 AM
  2. Lua issue ( hide seek script)
    By zozoka in forum WoW EMU Questions & Requests
    Replies: 6
    Last Post: 09-30-2008, 04:24 PM
  3. LUA issue..
    By kreegoth in forum WoW EMU Questions & Requests
    Replies: 5
    Last Post: 09-22-2008, 11:56 PM
  4. LUA Issues
    By orion5814 in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 06-20-2008, 04:03 PM
  5. [LUA Issue] Sudden self-targetting
    By Whitethebunny in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 06-07-2008, 09:06 PM
All times are GMT -5. The time now is 11:15 PM. 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