Need help with Gossip Lua with Functions (3 rep to whoever fixes) menu

User Tag List

Results 1 to 5 of 5
  1. #1
    stoneharry's Avatar Moderator Harry

    Authenticator enabled
    Reputation
    1613
    Join Date
    Sep 2007
    Posts
    4,554
    Thanks G/R
    151/146
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Need help with Gossip Lua with Functions (3 rep to whoever fixes)

    Alright, i'll try and make this brief.

    Code:
    function On_GossipMenu(pUnit, event, player)
        pUnit:GossipCreateMenu(50, player, 0)
        pUnit:GossipMenuAddItem(2, "Bla bla bla.", 1, 0)
        pUnit:GossipMenuAddItem(3, "Bla 2", 2, 0)
        pUnit:GossipSendMenu(player)
    end
    function On_GossipSelect(pUnit, event, player, id, intid, code)
    if (intid == 1) then
        player:GossipComplete()
        end
        if (intid == 2) then
        player:GossipComplete()
        end
    end
     
    RegisterUnitGossipEvent(2527111, 1, "On_GossipMenu")
    RegisterUnitGossipEvent(2527111, 2, "On_GossipSelect")
    so heres my basic layout, now that works fine, I can add in parts and it will all work. Now if I try and add in a function...

    Code:
    function On_GossipMenu(pUnit, event, player)
        pUnit:GossipCreateMenu(50, player, 0)
        pUnit:GossipMenuAddItem(2, "Bla bla bla.", 1, 0)
        pUnit:GossipMenuAddItem(3, "Bla 2", 2, 0)
        pUnit:GossipSendMenu(player)
    end
    function On_GossipSelect(pUnit, event, player, id, intid, code)
    if (intid == 1) then
        pUnit:SendChatMessage(12, 0, "Lets do this.")
        pUnit:RegisterEvent("Start", 3000, 0)
        player:GossipComplete()
        end
        if (intid == 2) then
        player:GossipComplete()
        end
    end
     
    
    function Start(pUnit, Event)
        pUnit:RemoveEvents()
        pUnit:SendChatMessage(14, 0, "Lerroyyyyyy")
        pUnit:Emote(45)
    end
     
    RegisterUnitGossipEvent(2527111, 1, "On_GossipMenu")
    RegisterUnitGossipEvent(2527111, 2, "On_GossipSelect")
    It doesn't do anything. I waited 3 seconds, nothing, no errors in console, no errors on load, nothing.
    What can I do to make him say something else after a timer on a gossip script? I thought about quickly making him hostile then friendly again with a on enter combat but that could turn out buggy and messy. I just want more functions with a gossip script, can anyone help?

    Thanks, 3 rep to whoever finds the answer

    Need help with Gossip Lua with Functions (3 rep to whoever fixes)
  2. #2
    Aznex's Avatar Contributor
    Reputation
    128
    Join Date
    Feb 2008
    Posts
    770
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    function Start(pUnit, Event)
        pUnit:RemoveEvents()
        pUnit:SendChatMessage(14, 0, "Lerroyyyyyy")
        pUnit:Emote(45)
    end
    You just wanna make him shout at random or?
    & aren't u supposed to register the function?

  3. #3
    stoneharry's Avatar Moderator Harry

    Authenticator enabled
    Reputation
    1613
    Join Date
    Sep 2007
    Posts
    4,554
    Thanks G/R
    151/146
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Well thats not the actual script, I was using it as an example. Actual script is huge. =P
    The problem is I want the function to trigger 3 seconds after the first option on the gossip being clicked, and if you look it is registered.
    " pUnit:RegisterEvent("Start", 3000, 0)"
    on the int id 1.
    No errors, nothing, just doesn't trigger.

  4. #4
    Sega1964's Avatar Member
    Reputation
    7
    Join Date
    Dec 2008
    Posts
    53
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm, Im not sure if you can make it go by seconds im not sure maybe in Blua

  5. #5
    stoneharry's Avatar Moderator Harry

    Authenticator enabled
    Reputation
    1613
    Join Date
    Sep 2007
    Posts
    4,554
    Thanks G/R
    151/146
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    I found out what wrong. It's a old Lua bug with WoW and it just doesn't work. Nothing wrong on my part, just a bug between gossip and switching over to other functions. Anyway ty for anyone who tried to help.

Similar Threads

  1. [Lua Script] Need help with this lua gossip script
    By diviee3 in forum WoW EMU Questions & Requests
    Replies: 1
    Last Post: 06-21-2010, 07:52 PM
  2. Need help with PayPal Will Rep
    By The Legendary D in forum WoW Scams Help
    Replies: 5
    Last Post: 06-25-2008, 11:35 AM
  3. Need help with RWMod, will +Rep
    By Tankotron in forum WoW UI, Macros and Talent Specs
    Replies: 2
    Last Post: 06-10-2008, 07:58 PM
  4. Need help with LUA
    By Arugos in forum World of Warcraft Emulator Servers
    Replies: 18
    Last Post: 02-28-2008, 12:54 PM
  5. NEED help with server plus rep
    By Denelly in forum World of Warcraft Emulator Servers
    Replies: 7
    Last Post: 10-30-2007, 09:12 PM
All times are GMT -5. The time now is 05:53 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search