Lua problems... menu

Shout-Out

User Tag List

Results 1 to 3 of 3
  1. #1
    Vendros's Avatar Private
    Reputation
    1
    Join Date
    Dec 2009
    Posts
    13
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lua problems...

    Hey all. I've been having problems with Lua scripting since earlier today, and I decided that it was finally time to ask someone about it. I'm just now getting into Lua scripting, so I'm an extreme novice at this stuff. For some reason, the world.exe program looks like the Lua script is alright, but when I go to actually USE the script, the only thing that comes up is the menu and the "Listen, <Name>, I will tell you the story about this place." After that, it's blank.


    function Brann_OnGossip(pUnit, event, player)
    pUnit:GossipCreateMenu(199, player, 0)
    pUnit:GossipMenuAddItem(0, "Brann, please tell me the history of this place.", 511, 0)
    pUnit:GossipMenuAddItem(0, "I do not think I am quite ready yet.",

    512, 0)
    pUnit:GossipSendMenu(player)
    end


    function Brann_Submenus(pUnit, event, player, id, intid, code)
    if(intid == 511) then
    pUnit:SetNPCFlags(35)
    pUnit:RegisterEvent("Brann_Start", 1, 1)
    local name = player:GetName()
    pUnit:SendChatMessage(12, 0, "Listen, "..name..". I will tell you the
    story about this place.")
    player:GossipComplete()
    end

    if(intid == 512) then
    player:GossipComplete()
    end

    end


    function Brann_Start(pUnit, Event)
    pUnit:RegisterEvent("Brann_StartTalk", 4000, 1)
    end


    RegisterUnitGossipEvent(45000, 1, "Brann_OnGossip")
    RegisterUnitGossipEvent(45000, 2, "Brann_Submenus")



    --[[ Brann Texts ]]--

    function Brann_StartTalk(pUnit, Event)
    pUnit:Emote(1, 4000)
    pUnit:SendChatMessage(12, 0, "The Hall of Thanes is a massive, natural

    cavern complex. It is located in Ironforge’s lowest depths. The area is

    a true marvel of organic stone formation: no dwarf has touched this

    area with pick or chisel.")
    pUnit:RegisterEvent("Brann_Talk1", 6500, 1)
    end

    function Brann_Talk1(pUnit, Event)
    pUnit:Emote(1, 4000)
    pUnit:SendChatMessage(12, 0, "Ironforge’s kings are buried in the Hall

    of Thanes, and the old throne is here as well. Also within this

    cavernous area is the ancient, weathered Iron Forge — perhaps the

    greatest titan artifact ever unearthed.")
    pUnit:RegisterEvent("Brann_Talk2", 8000, 1)
    end

    function Brann_Talk2(pUnit, Event)
    pUnit:Emote(1, 4000)
    pUnit:SendChatMessage(12, 0, "The dwarves do not use this holy anvil,

    but keep it near their honored dead and the seat of their power.")
    pUnit:RegisterEvent("Brann_Talk3", 8000, 1)
    end

    function Brann_Talk3(pUnit, Event)
    pUnit:Emote(1, 4000)
    pUnit:SendChatMessage(12, 0, "I believe that as we uncover more truths

    about our ancestry, we will find greater uses for the Iron Forge. The

    titans must have given it to us for a reason.")
    pUnit:RegisterEvent("Brann_Talk4", 9000, 1)
    end

    function Brann_Talk4(pUnit, Event)
    pUnit:Emote(1, 1000)
    pUnit:SendChatMessage(12, 0, "That is all I can reveal to you for now,

    I'm afraid.")
    pUnit:SetNPCFlags(1)
    end

    Lua problems...
  2. #2
    Ground Zero's Avatar ★ Elder ★
    Reputation
    1132
    Join Date
    Aug 2008
    Posts
    3,503
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You registered the event as Brann_Start on the if intid = 511 and registered it below as Brann_StartTalk.

  3. #3
    Dynashock's Avatar Contributor

    Reputation
    176
    Join Date
    Nov 2007
    Posts
    203
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There's some trouble with registering events in a gossip script, from what I've experienced. You could try it with a RegisterTimedEvent (and passing on vital information such as pUnit and the player) instead.

Similar Threads

  1. Lua problem
    By Minichili in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 04-14-2008, 09:45 AM
  2. [Help] Lua problem
    By Lich King in forum World of Warcraft Emulator Servers
    Replies: 10
    Last Post: 03-23-2008, 04:34 AM
  3. lua problem
    By *Alexz* in forum World of Warcraft Emulator Servers
    Replies: 9
    Last Post: 02-14-2008, 10:41 PM
  4. [Question]-Lua Problem
    By Peter1337 in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 02-07-2008, 07:59 AM
  5. [Question] LUA problem
    By Peter1337 in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 02-01-2008, 09:21 AM
All times are GMT -5. The time now is 03:07 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