Needs Help with Warp Npc Lua menu

User Tag List

Results 1 to 4 of 4
  1. #1
    Lytle69's Avatar Member
    Reputation
    13
    Join Date
    Aug 2008
    Posts
    66
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Needs Help with Warp Npc Lua

    For some reason, only the PvP Arenas Menu changes to give me the list of ports.
    Main City's and Outland Raids don't work. +Rep to the person that Helps me.



    Code:
    local npcid = 100001
    function Teleport_OnGossipTalk(pUnit, event, player, pMisc)
    pUnit:GossipCreateMenu(100, player, 0)
    pUnit:GossipMenuAddItem(0, "Main Citys.", 100, 0)
    pUnit:GossipMenuAddItem(0, "Outland Raids", 200, 0)
    pUnit:GossipMenuAddItem(0, "PvP Arenas", 300, 0)
    pUnit:GossipSendMenu(player)
    end
    function Teleport_OnGossipSelect(pUnit, event, player, id, intid, code, pMisc)
    if(intid == 100) then
     pUnit:GossipCreateMenu(9988, player, 0)
     pUnit:GossipMenuAddItem(5, "Stormwind", 101, 0)
     pUnit:GossipMenuAddItem(5, "Ironforge", 102, 0)
     pUnit:GossipMenuAddItem(5, "Darnassus", 103, 0)
     pUnit:GossipMenuAddItem(5, "Exodar", 104, 0)
     pUnit:GossipMenuAddItem(5, "Orgrimmar", 105, 0)
     pUnit:GossipMenuAddItem(5, "Undercity", 106, 0)
     pUnit:GossipMenuAddItem(5, "Thunderbluff", 107, 0)
     pUnit:GossipMenuAddItem(5, "Silvermoon", 108, 0)
     pUnit:GossipMenuAddItem(5, "Shattrath", 109, 0)
     pUnit:GossipSendMenu(player)
    end
    end
    function Teleport_OnGossipSelect(pUnit, event, player, id, intid, code, pMisc)
    if(intid == 200) then
     pUnit:GossipCreateMenu(9988, player, 0)
     pUnit:GossipMenuAddItem(5, "BlackTemple", 201, 0)
     pUnit:GossipMenuAddItem(5, "Hyjal Summit", 202, 0)
     pUnit:GossipMenuAddItem(5, "SerpentShrine Cavern", 203, 0)
     pUnit:GossipMenuAddItem(5, "Tempest Keep The Eye", 204, 0)
     pUnit:GossipMenuAddItem(5, "Zul Aman", 205, 0)
     pUnit:GossipMenuAddItem(5, "Sunwell Plateau", 206, 0)
     pUnit:GossipMenuAddItem(5, "Hellfire Citadel", 207, 0)
     pUnit:GossipMenuAddItem(5, "Karazhan", 208, 0)
     pUnit:GossipSendMenu(player)
    end
    end
    function Teleport_OnGossipSelect(pUnit, event, player, id, intid, code, pMisc)
    if(intid == 300) then
     pUnit:GossipCreateMenu(9988, player, 0)
     pUnit:GossipMenuAddItem(5, "Gurabashi Arena", 301, 0)
     pUnit:GossipMenuAddItem(5, "Dire Maul", 302, 0)
     pUnit:GossipMenuAddItem(5, "Circle of Blood", 303, 0)
     pUnit:GossipMenuAddItem(5, "The Ring of Trials", 304, 0)
     pUnit:GossipSendMenu(player)
    end
    if(intid == 101) then
       player:Teleport(0, -8918, 552, 95)
    end
    if(intid == 102) then
       player:Teleport(0, -4981, -882, 503)
    end
    if(intid == 103) then
       player:Teleport(1, 9951.5, 2280.3, 1343)
    end
    if(intid == 104) then
       player:Teleport(530, -3998, -11861, 1)
    end
    if(intid == 105) then
       player:Teleport(1, 1482, -4417, 26)
    end
    if(intid == 106) then
       player:Teleport(0, 1523, 242, -40)
    end
    if(intid == 107) then
       player:Teleport(1, -1209, -97, 164)
    end
    if(intid == 108) then
       player:Teleport(530, 9408, -7278, 15)
    end
    if(intid == 109) then
       player:Teleport(530, -1692, 5372, 7)
    end
    if(intid == 201) then
       player:Teleport(530, -3651.94, 317.62, 37)
    end
    if(intid == 202) then
       player:Teleport(1, -8177, -4180, 168)
    end
    if(intid == 203) then
       player:Teleport(530, 811, 6866, -66)
    end
    if(intid == 204) then
       player:Teleport(530, 3089, 1389, 187)
    end
    if(intid == 205) then
       player:Teleport(530, 6853, -7954, 172)
    end
    if(intid == 206) then
       player:Teleport(530, 12590, -6775, 16)
    end
    if(intid == 207) then
       player:Teleport(530, -342, 3140, -100)
    end
    if(intid == 208) then
       player:Teleport(0, -11125, -2020, 48)
    end
    if(intid == 301) then
       player:Teleport(0, -13237, 207, 32)
    end
    if(intid == 302) then
       player:Teleport(1, -3841.5, 1093.8, 163.5)
    end
    if(intid == 303) then
       player:Teleport(530, 2906, 5972, 3.4)
    end
    if(intid == 304) then
       player:Teleport(530, -2099, 6741, -1)
    end
    end
    RegisterUnitGossipEvent(100001, 1, "Teleport_OnGossipTalk")
    RegisterUnitGossipEvent(100001, 2, "Teleport_OnGossipSelect")

    Needs Help with Warp Npc Lua
  2. #2
    baptizein's Avatar Member
    Reputation
    16
    Join Date
    Jul 2008
    Posts
    65
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Don't use three functions for the menu. Condense it down into one...

    Example:

    Code:
    function Teleport_OnSelect(pUnit, event, player, id, intid, code, pMisc)
    
    if (intid == 100) then
    code goes here
    end
    
    if (intid == 200) then
    code goes here
    end
    end
    Last edited by baptizein; 10-03-2008 at 11:40 AM.

  3. #3
    Babbaa's Avatar Member
    Reputation
    32
    Join Date
    Nov 2007
    Posts
    206
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    local npcid = 100001
    
    function Teleport_OnGossipTalk(pUnit, event, player, pMisc)
    pUnit:GossipCreateMenu(100, player, 0)
    pUnit:GossipMenuAddItem(0, "Main Citys.", 100, 0)
    pUnit:GossipMenuAddItem(0, "Outland Raids", 200, 0)
    pUnit:GossipMenuAddItem(0, "PvP Arenas", 300, 0)
    pUnit:GossipSendMenu(player)
    end
    function Teleport_OnGossipSelect(pUnit, event, player, id, intid, code, pMisc)
    if(intid == 100) then
     pUnit:GossipCreateMenu(9988, player, 0)
     pUnit:GossipMenuAddItem(5, "Stormwind", 101, 0)
     pUnit:GossipMenuAddItem(5, "Ironforge", 102, 0)
     pUnit:GossipMenuAddItem(5, "Darnassus", 103, 0)
     pUnit:GossipMenuAddItem(5, "Exodar", 104, 0)
     pUnit:GossipMenuAddItem(5, "Orgrimmar", 105, 0)
     pUnit:GossipMenuAddItem(5, "Undercity", 106, 0)
     pUnit:GossipMenuAddItem(5, "Thunderbluff", 107, 0)
     pUnit:GossipMenuAddItem(5, "Silvermoon", 108, 0)
     pUnit:GossipMenuAddItem(5, "Shattrath", 109, 0)
     pUnit:GossipSendMenu(player)
    end
    if(intid == 200) then
     pUnit:GossipCreateMenu(9988, player, 0)
     pUnit:GossipMenuAddItem(5, "BlackTemple", 201, 0)
     pUnit:GossipMenuAddItem(5, "Hyjal Summit", 202, 0)
     pUnit:GossipMenuAddItem(5, "SerpentShrine Cavern", 203, 0)
     pUnit:GossipMenuAddItem(5, "Tempest Keep The Eye", 204, 0)
     pUnit:GossipMenuAddItem(5, "Zul Aman", 205, 0)
     pUnit:GossipMenuAddItem(5, "Sunwell Plateau", 206, 0)
     pUnit:GossipMenuAddItem(5, "Hellfire Citadel", 207, 0)
     pUnit:GossipMenuAddItem(5, "Karazhan", 208, 0)
     pUnit:GossipSendMenu(player)
    end
    if(intid == 300) then
     pUnit:GossipCreateMenu(9988, player, 0)
     pUnit:GossipMenuAddItem(5, "Gurabashi Arena", 301, 0)
     pUnit:GossipMenuAddItem(5, "Dire Maul", 302, 0)
     pUnit:GossipMenuAddItem(5, "Circle of Blood", 303, 0)
     pUnit:GossipMenuAddItem(5, "The Ring of Trials", 304, 0)
     pUnit:GossipSendMenu(player)
    end
    if(intid == 101) then
       player:Teleport(0, -8918, 552, 95)
    end
    if(intid == 102) then
       player:Teleport(0, -4981, -882, 503)
    end
    if(intid == 103) then
       player:Teleport(1, 9951.5, 2280.3, 1343)
    end
    if(intid == 104) then
       player:Teleport(530, -3998, -11861, 1)
    end
    if(intid == 105) then
       player:Teleport(1, 1482, -4417, 26)
    end
    if(intid == 106) then
       player:Teleport(0, 1523, 242, -40)
    end
    if(intid == 107) then
       player:Teleport(1, -1209, -97, 164)
    end
    if(intid == 108) then
       player:Teleport(530, 9408, -7278, 15)
    end
    if(intid == 109) then
       player:Teleport(530, -1692, 5372, 7)
    end
    if(intid == 201) then
       player:Teleport(530, -3651.94, 317.62, 37)
    end
    if(intid == 202) then
       player:Teleport(1, -8177, -4180, 168)
    end
    if(intid == 203) then
       player:Teleport(530, 811, 6866, -66)
    end
    if(intid == 204) then
       player:Teleport(530, 3089, 1389, 187)
    end
    if(intid == 205) then
       player:Teleport(530, 6853, -7954, 172)
    end
    if(intid == 206) then
       player:Teleport(530, 12590, -6775, 16)
    end
    if(intid == 207) then
       player:Teleport(530, -342, 3140, -100)
    end
    if(intid == 208) then
       player:Teleport(0, -11125, -2020, 48)
    end
    if(intid == 301) then
       player:Teleport(0, -13237, 207, 32)
    end
    if(intid == 302) then
       player:Teleport(1, -3841.5, 1093.8, 163.5)
    end
    if(intid == 303) then
       player:Teleport(530, 2906, 5972, 3.4)
    end
    if(intid == 304) then
       player:Teleport(530, -2099, 6741, -1)
    end
    intid = 0
    end
    RegisterUnitGossipEvent(100001, 1, "Teleport_OnGossipTalk")
    RegisterUnitGossipEvent(100001, 2, "Teleport_OnGossipSelect")
    Fix'd.

  4. #4
    Lytle69's Avatar Member
    Reputation
    13
    Join Date
    Aug 2008
    Posts
    66
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh I see where I messed up. I forgot to remove the 2 end when I added intid = 0 in between the bottom. Thanks A BUNCH!
    Last edited by Lytle69; 10-03-2008 at 08:57 AM.

Similar Threads

  1. Need help with gltiching NPCs
    By chaosrde in forum WoW EMU Questions & Requests
    Replies: 6
    Last Post: 10-19-2009, 03:55 PM
  2. Need Help With Warp NPC
    By Juve21 in forum World of Warcraft General
    Replies: 3
    Last Post: 10-12-2008, 10:40 PM
  3. [NEED HELP] with BG npc's
    By vivalacamo in forum WoW EMU Guides & Tutorials
    Replies: 0
    Last Post: 06-29-2008, 12:50 PM
  4. Need help with my script [lua]
    By Satzen in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 05-18-2008, 05:19 PM
  5. Need help with LUA
    By Arugos in forum World of Warcraft Emulator Servers
    Replies: 18
    Last Post: 02-28-2008, 12:54 PM
All times are GMT -5. The time now is 05:16 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