[Lua] Gossip NPC Question menu

User Tag List

Results 1 to 2 of 2
  1. #1
    Herbalism's Avatar Knight-Lieutenant
    Reputation
    28
    Join Date
    Jun 2010
    Posts
    317
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Lua] Gossip NPC Question

    Hey

    So I recently made this script: http://pastebin.com/QqL22j7p
    Now I'm wondering, what exactly should I put in the "-- RegisterUnitEvents" field?

    +Rep to a correct answer.
    Thanks.

    'Nuff said

    [Lua] Gossip NPC Question
  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)
    Gossip scripts have lots of buggy things where you have to make hack-fixes to get around.

    For example, you can't have only 1 menu otherwise it automatically does it straight away. To make it only display 1 menu yet not skip it, you would do something like:
    Code:
    function menus()
    pUnit:createmenu()
    pUnit:AddMenu("hi",player,0) -- Or whatever the command is
    if pUnit == 0 then -- This can't happen
    pUnit:AddMenu("DEBUG", player, 0)
    end
    end
    You also can't register events in a gossip menu. To do this make it check to see if a variable is at a state on spawn every 5 seconds forever, and when a gossip menu is selected change the state of that variable so it can do that registered event.

    Answering your question though:

    Code:
    RegisterUnitGossipEvent(npcid, 1, "OnTalk")
    RegisterUnitGossipEvent(npcid, 2, "OnItemSelect")
    You can find helpful documentation on all of this through the following two links:

Similar Threads

  1. LUA Tele NPC.
    By Ickybad in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 06-08-2008, 06:08 AM
  2. Renaming NPC question????
    By PRIMO12 in forum World of Warcraft Emulator Servers
    Replies: 15
    Last Post: 12-11-2007, 04:43 PM
  3. A NPC Question
    By secretdragon008 in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 11-11-2007, 05:38 AM
  4. ascent npc question
    By djblade17 in forum World of Warcraft Emulator Servers
    Replies: 8
    Last Post: 11-10-2007, 01:05 AM
  5. Custom teleport npcs question please help
    By friendofdar in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 09-24-2007, 09:35 PM
All times are GMT -5. The time now is 03:35 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