Plz help me with my Lua Teleporter Script menu

User Tag List

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

    Plz help me with my Lua Teleporter Script

    i dont know what's wrong :S
    Take a look urself


    Code:
    function On_Gossip(pUnit, Event, player)
    pUnit:GossipCreateMenu(3544, player, 0)
    pUnit:GossipMenuAddItem(2, "Teleport Me", 1, 0)
    pUnit:GossipMenuAddItem(1, "I would like to Learn a spell", 2, 0)
    pUnit:GossipSendMenu(player)
    end
    
    function Gossip_Submenus(pUnit, event, player, id, intid, code)
    
    if(intid == 999) then
    pUnit:GossipCreateMenu(3543, player, 0)
    pUnit:GossipMenuAddItem(2, "|cFF00FF00--Teleport Me--", 1, 0)
    pUnit:GossipMenuAddItem(3, "|cFF00FFFF-Learn me some PvP/Fun spells-", 2, 0)
    pUnit:GossipSendMenu(player)
    end
    
    if(intid == 1) then
    pUnit:GossipCreateMenu(3543, player, 0)
    pUnit:GossipMenuAddItem(1, "|cFF00FF00-- Shopping Mall --", 44, 0)
    pUnit:GossipMenuAddItem(1, "|cFF00FF00-- Events --", 55, 0)
    pUnit:GossipMenuAdditem(1, "|cFF00FF00-- Hyal Levelingroad --", 66, 0)
    pUnit:GossipMenuAdditem(1, "|cFF00FF00-- PvP Areas --", 88, 0)
    pUnit:GossipMenuAdditem(1, "|cFF00FF00-- Capital bar --", 99, 0)
    pUnit:GossipMenuAddItem(0, "|cFF00FFFF-- [Back] --", 999, 0)
    pUnit:GossipSendMenu(player)
    end
    
    if(intid == 2) then
    pUnit:GossipCreateMenu(3543, player, 0)
    pUnit:GossipMenuAddItem(1, "|cFFFF0000- Impairing Poison -", 796, 0)
    pUnit:GossipMenuAddItem(0, "|cFF00FFFF[Back]", 999, 0)
    pUnit:GossipSendMenu(player)
    end
    
    if(intid == 55) then
    pUnit:GossipCreateMenu(3543, player, 0)
    pUnit:GossipMenuAddItem(1, "|cFFFF0000- Karazhan event", 111, 0)
    pUnit:GossipMenuAddItem(1, "|cFFFF0000- The DarkShore Road", 112, 0)
    pUnit:GossipMenuAddItem(1, "|cFFFF0000- Coins of ZangarMarsh", 113, 0)
    pUnit:GossipMenuAddItem(1, "|cFFFF0000- Event 4", 114, 0)
    pUnit:GossipMenuAddItem(0, "|cFF00FFFF[Back]", 1, 0)
    pUnit:GossipSendMenu(player)
    end
    
    if(intid == 88) then
    pUnit:GossipCreateMenu(3543, player, 0)
    pUnit:GossipMenuAddItem(1, "|cFF00FFFF**Nagrand Arena**", 910, 0)
    pUnit:GossipMenuAddItem(1, "|cFF00FFFF**Gurubashi Arena**", 911, 0)
    pUnit:GossipMenuAddItem(0, "*[Back]*", 1, 0)
    pUnit:GossipSendMenu(player)
    end
    
    if(intid == 796) then
    player:LearnSpell(36839)
    pUnit:GossipComplete(player)
    end
    
    if(intid == 44) then
    player:Teleport(1, 7345.910156, -1540.229980, 161.311996)
    pUnit:GossipComplete(player)
    end
    
    if(intid == 66) then
    player:Teleport(1, 4612.712891, -3861.186035, 944.176453)
    pUnit:GossipComplete(player)
    end
    
    if(intid == 99) then
    player:Teleport(1, -6802.372070, -2908.077162, 16.065159)
    pUnit:GossipComplete(player)
    end
    
    if(intid == 111) then
    player:Teleport(0, -11110.259766, -2037.760010, 47.967651
    )
    pUnit:GossipComplete(player)
    end
    
    if(intid == 112) then
    player:Teleport(1, -7431.365234, -1575.177368, 178.341675)
    pUnit:GossipComplete(player)
    end
    
    if(intid == 113) then
    player:Teleport(1, -9491.288086, -1699.527710, 9.819820
    )
    pUnit:GossipComplete(player)
    end
    
    if(intid == 114) then
    player:Teleport(1, 3380.894531, -3322.465088, 314.074799)
    pUnit:GossipComplete(player)
    end
    
    if(intid == 910) then
    player:Teleport(530, -2010.819092, 6672.520020, 18.241858)
    pUnit:GossipComplete(player)
    end
    
    if(intid == 911) then
    player:Teleport(0, -13263.840820, 158.996063, 36.095226)
    pUnit:GossipComplete(player)
    end
    end
    
    RegisterUnitGossipEvent(454545, 1, "On_Gossip")
    RegisterUnitGossipEvent(454545, 2, "Gossip_Submenus")
    I get this error :My Teleporter name.lua:21: attempt to call method `GossipMenuAdditem` <a nil value>
    Last edited by alfen95; 07-26-2009 at 12:43 PM.

    Plz help me with my Lua Teleporter Script
  2. #2
    alfen95's Avatar Member
    Reputation
    1
    Join Date
    Mar 2009
    Posts
    14
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    omg

    omg
    55 views
    and not a single reply !?!?!?!

  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)
    It was because you didn't list the error at first and people won't bother reading through your script. Now that I see the error I can see the problem immediately. It should be GossipMenuAddItem. Not GossipMenuAdditem. Lua is case-sensitive, you know.

  4. #4
    alfen95's Avatar Member
    Reputation
    1
    Join Date
    Mar 2009
    Posts
    14
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank u very much +Rep for u !!

Similar Threads

  1. Can someone please help me with my lua script.
    By ConnorJ in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 08-20-2013, 05:19 AM
  2. [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
  3. i need help with a LUA teleport item and buff item...
    By trujillo in forum WoW EMU Questions & Requests
    Replies: 17
    Last Post: 09-16-2009, 02:05 AM
  4. Plz Help me with my lua ;S
    By alfen95 in forum WoW EMU Questions & Requests
    Replies: 3
    Last Post: 03-26-2009, 07:53 AM
  5. +Rep for Help with Universal Lua Teleporter
    By Lytle69 in forum WoW EMU Questions & Requests
    Replies: 16
    Last Post: 12-12-2008, 07:30 AM
All times are GMT -5. The time now is 02:35 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