ArcEmu: [lua] Teleporter Stopped Working - ArcEmu

Jump to content

Toggle shoutbox Lastest Announcements

dfighter  : (07 December 2014 - 12:06 PM) Arcemu is in hibernation mode, please read http://arcemu.org/fo...showtopic=26903
dfighter  : (01 January 2013 - 05:56 PM) Arcemu wishes you all a happy new year!
Hasbro  : (12 September 2012 - 10:01 AM) Please excuse our outage from the web! Our web host had a major malfunction!
dfighter  : (01 September 2012 - 04:05 PM) Since the spam bots just don't want to stop, I've enabled admin verification when registering.
dfighter  : (23 January 2012 - 09:56 PM) Please note that from now on you will need to confirm your email on the wiki in order to edit it!
Hasbro  : (31 December 2011 - 12:50 PM) Happy New Years all!
Navid  : (26 December 2011 - 04:09 AM) Merry Christmas !!!!!! Happy holidays all :)
WAmadeus  : (24 December 2011 - 03:54 PM) Merry Christmas to all!
dfighter  : (24 December 2011 - 11:05 AM) The Arcemu team wishes y'all a Merry Christmukkah!
Hasbro  : (05 October 2011 - 12:53 PM) Looking for web designers for upcoming web related project. If you're interested in designing user interfaces contact me
dfighter  : (02 September 2011 - 03:47 PM) So who here wants vehicles in Arcemu? :P http://arcemu.org/fo...showtopic=25440
Hasbro  : (14 August 2011 - 03:25 PM) Join us on irc, grab an irc client and connect to irc.freenode.net join channel #arcemu /server irc.freenode.net:6667 /join #arcemu
jackpoz  : (03 August 2011 - 05:33 AM) to all Lua Engine (old one) users: please check http://arcemu.org/fo...showtopic=25274
Hasbro  : (20 May 2011 - 05:27 PM) Looking for people experienced with CMake configuration and setup! Contact me asap
Hasbro  : (15 May 2011 - 05:03 PM) ArcEmu is recruiting C++ programmers, contact Hasbro if interested.
paroxysm  : (03 May 2011 - 06:26 PM) Updated luabridge gossip example to describe the whole gossip creation process rather than just how to create menu. Gossip tutorial
paroxysm  : (23 April 2011 - 11:35 AM) Lua writers can refer to the Luabridge Tutorials section in the Wiki to learn how to write gossip code correctly.
Hasbro  : (20 April 2011 - 05:22 PM) Thank you for your continuous contribution of bug reports, we are working on them.
Hasbro  : (17 April 2011 - 03:20 AM) Please consider donating to support our bills. Donations can be sent using PayPal to donations@arcemu.org - Thank you for your support.
paroxysm  : (10 April 2011 - 12:43 AM) Refer to the Luabridge Tutorials section in the Wiki to learn the new syntax of luabridge.
Resize Shouts Area

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[lua] Teleporter Stopped Working

#1 User is offline   Explicit 

  • Newbie
  • Group: Members
  • Posts: 2
  • Joined: 10-May 12
  • IRC:Explicit
  • Gender:Male
  • Location:Florida
  • Server OS:Windows

Posted 18 May 2012 - 01:55 PM

Not too sure what I did, but after editing one of my LUA scripts for a teleporter, it stopped functioning and just displayed the default gossip flag message. Now, I know LUA is case sensitive so I specifically spent at least 40 minutes checking for any mistakes there, as well as looking for any other non-capitalization mistakes I could have made. I still have had no luck at all. Here is the script:

function Teleport_on_gossip_talk(pUnit, event, player)
pUnit:GossipCreateMenu(3544, player, 0)
if(player:GetTeam() == 0) then

pUnit:GossipMenuAddItem(8, "|CFF3366FF Alliance Cities", 3, 0)
else
end
if(player:GetTeam() == 1) then
pUnit:GossipMenuAddItem(8, "|CFFCC0000 Horde Cities", 2, 0)
else
end

pUnit:GossipMenuAddItem(8, "|cFF0000FF Global Mall", 348, 0)
pUnit:GossipMenuAddItem(6, "|cFFFFCC00 Event Locations", 9, 0)
pUnit:GossipMenuAddItem(2, "|cFF0000FF Outland Dungeons", 4, 0)
pUnit:GossipMenuAddItem(2, "|cFF0000FF Outland Raids", 5, 0)
pUnit:GossipMenuAddItem(2, "|cFF0000FF Azeroth Dungeons", 6, 0)
pUnit:GossipMenuAddItem(2, "|cFF0000FF Azeroth Raids", 7, 0)
pUnit:GossipMenuAddItem(9, "|cFFCC00CC [PVP]", 8, 0)
pUnit:GossipMenuAddItem(5, "|CFF00FF00 Heal me!", 994, 0)
pUnit:GossipMenuAddItem(4, "|CFF00FF00 Buff Me!", 995, 0)
pUnit:GossipSendMenu(player)
end

function Teleport_on_gossip_select(pUnit, event, player, id, intid, code)

if(intid == 990) then
pUnit:GossipMenuAddItem(8, "|cFF0000FF Global Mall", 348, 0)
pUnit:GossipMenuAddItem(6, "|cFFFFCC00 Event Locations", 9, 0)
pUnit:GossipMenuAddItem(2, "|cFF0000FF Outland Dungeons", 4, 0)
pUnit:GossipMenuAddItem(2, "|cFF0000FF Outland Raids", 5, 0)
pUnit:GossipMenuAddItem(2, "|cFF0000FF Azeroth Dungeons", 6, 0)
pUnit:GossipMenuAddItem(2, "|cFF0000FF Azeroth Raids", 7, 0)
pUnit:GossipMenuAddItem(9, "|cFFCC00CC [PVP]", 8, 0)
pUnit:GossipMenuAddItem(5, "|CFF00FF00 Heal me!", 994, 0)
pUnit:GossipMenuAddItem(4, "|CFF00FF00 Buff Me!", 995, 0)
pUnit:GossipSendMenu(player)
end

if(intid == 2) then
pUnit:GossipCreateMenu(3544, player, 0) 
pUnit:GossipMenuAddItem(8, "|CFFCC0000 Orgrimmar", 300, 0)
pUnit:GossipMenuAddItem(8, "|CFFCC0000 Undercity", 301, 0)
pUnit:GossipMenuAddItem(8, "|CFFCC0000 Thunder Bluff", 302, 0)
pUnit:GossipMenuAddItem(8, "|CFFCC0000 Silvermoon City", 303, 0)
pUnit:GossipMenuAddItem(7, "|cFFFF6EB4[Main Menu]", 990, 0)
pUnit:GossipSendMenu(player)
end

if(intid == 9) then
pUnit:GossipCreateMenu(3544, player, 0)
pUnit:GossipMenuAddItem(6, "|cFFFFCC00 Staircase of Doom", 350, 0)
pUnit:GossipMenuAddItem(6, "|cFFFFCC00 Legendary Maze", 351, 0)
pUnit:GossipMenuAddItem(6, "|cFFFFCC00 Mountain of Glory", 352, 0)
pUnit:GossipMenuAddItem(7, "|cFF000000 [Main Menu]", 990, 0)
pUnit:GossipSendMenu(player)
end

if(intid == 3) then
pUnit:GossipCreateMenu(3544, player, 0) 
pUnit:GossipMenuAddItem(8, "|CFF3366FF Stormwind", 304, 0)
pUnit:GossipMenuAddItem(8, "|CFF3366FF Ironforge", 305, 0)
pUnit:GossipMenuAddItem(8, "|CFF3366FF Darnassus", 306, 0)
pUnit:GossipMenuAddItem(8, "|CFF3366FF The Exodar", 307, 0)
pUnit:GossipMenuAddItem(7, "|cffFF6EB4[Main Menu]", 990, 0)
pUnit:GossipSendMenu(player)
end

if(intid == 4) then
pUnit:GossipCreateMenu(3544, player, 0) 
pUnit:GossipMenuAddItem(2, "|cff388E8E Hellfire Ramparts", 308, 0)
pUnit:GossipMenuAddItem(2, "|cff388E8E Blood Furnace", 309, 0)
pUnit:GossipMenuAddItem(2, "|cff388E8E Shattered Halls", 310, 0)
pUnit:GossipMenuAddItem(2, "|cff388E8E Underbog", 311, 0)
pUnit:GossipMenuAddItem(2, "|cff388E8E Slave Pens", 312, 0)
pUnit:GossipMenuAddItem(2, "|cff388E8E Mana Tombs", 313, 0)
pUnit:GossipMenuAddItem(2, "|cff388E8E Sethekk Halls", 314, 0)
pUnit:GossipMenuAddItem(2, "|cff388E8E Shadow Labyrinth", 315, 0)
pUnit:GossipMenuAddItem(2, "|cff388E8E The Mechanar", 316, 0)
pUnit:GossipMenuAddItem(2, "|cff388E8E Arcatraz", 317, 0)
pUnit:GossipMenuAddItem(2, "|cff388E8E Caverns of Time", 318, 0)
pUnit:GossipMenuAddItem(2, "|cff388E8E Serpentshrine Cavern", 319, 0)
pUnit:GossipMenuAddItem(7, "|cffFF6EB4[Main Menu]", 990, 0)
pUnit:GossipSendMenu(player)
end

if(intid == 5) then
pUnit:GossipCreateMenu(3544, player, 0) 
pUnit:GossipMenuAddItem(2, "|cff388E8E Black Temple", 330, 0)
pUnit:GossipMenuAddItem(2, "|cff388E8E Tempest Keep", 331, 0)
pUnit:GossipMenuAddItem(2, "|cff388E8E Karazhan", 337, 0)
pUnit:GossipMenuAddItem(2, "|cff388E8E Zul'Aman", 347, 0)
pUnit:GossipMenuAddItem(2, "|cff388E8E Gruul's Lair", 346, 0)
pUnit:GossipMenuAddItem(2, "|cff388E8E Maghteridon's Lair", 332, 0)
pUnit:GossipMenuAddItem(7, "|cffFF6EB4[Main Menu]", 990, 0)
pUnit:GossipSendMenu(player)
end 

if(intid == 6) then
pUnit:GossipCreateMenu(3544, player, 0) 
pUnit:GossipMenuAddItem(2, "|cff388E8E Shadowfang Keep", 326, 0)
pUnit:GossipMenuAddItem(2, "|cff388E8E Scarlet Monastery", 327, 0)
pUnit:GossipMenuAddItem(2, "|cff388E8E Zul'Farrak", 328, 0)
pUnit:GossipMenuAddItem(2, "|cff388E8E Scholomance", 329, 0)
pUnit:GossipMenuAddItem(2, "|cff388E8E The Deadmines", 330, 0)
pUnit:GossipMenuAddItem(2, "|cff388E8E Uldaman", 331, 0)
pUnit:GossipMenuAddItem(2, "|cff388E8E Sunken temple", 332, 0)
pUnit:GossipMenuAddItem(2, "|cff388E8E Lower Blackrock Depths", 333, 0)
pUnit:GossipMenuAddItem(2, "|cff388E8E Dire Maul", 334, 0)
pUnit:GossipMenuAddItem(2, "|cff388E8E Upper Blackrock Depths", 335, 0)
pUnit:GossipMenuAddItem(7, "|cffFF6EB4[Main Menu]", 990, 0)
pUnit:GossipSendMenu(player)
end

if(intid == 7) then
pUnit:GossipCreateMenu(3544, player, 0) 
pUnit:GossipMenuAddItem(2, "|cff388E8E Onyxia's Lair", 336, 0)
pUnit:GossipMenuAddItem(2, "|cff388E8E Molten Core", 337, 0)
pUnit:GossipMenuAddItem(2, "|cff388E8E Blackwing Lair", 338, 0)
pUnit:GossipMenuAddItem(2, "|cff388E8E Zul'Gurub", 339, 0)
pUnit:GossipMenuAddItem(2, "|cff388E8E Ruins of Ahn'Qiraj 340", 69, 0)
pUnit:GossipMenuAddItem(2, "|cff388E8E Temple of Ahn'Qiraj 341", 70, 0)
pUnit:GossipMenuAddItem(2, "|cff388E8E Naxxramas", 342, 0)
pUnit:GossipMenuAddItem(7, "|cffFF6EB4 [Main Menu]", 990, 0)
pUnit:GossipSendMenu(player)
end

if(intid == 8) then
pUnit:GossipCreateMenu(3544, player, 0) 
pUnit:GossipMenuAddItem(2, "|cffFF4500 Nagrand Arena", 343, 0)
pUnit:GossipMenuAddItem(2, "|cffFF4500 Gurubashi Arena", 345, 0)
pUnit:GossipMenuAddItem(2, "|cffFF4500 The Forest of Lost Souls", 344, 0)
pUnit:GossipMenuAddItem(7, "|cffFF6EB4[Main Menu]", 990, 0)
pUnit:GossipSendMenu(player)
end

if(intid == 994) then
pUnit:GossipCreateMenu(3544, player, 0)
pUnit:GossipMenuAddItem(5, "|cff71C671 Heal me!", 994, 0)
pUnit:GossipMenuAddItem(7, "|cffFF6EB4[Main Menu]", 990, 0)
pUnit:GossipSendMenu(player)
end

-----Coordinates Go Below-----

if(intid == 300) then --Orgrimmar--
player:Teleport(1, 1371.068970, -4370.801758, 26.052483)
pUnit:GossipComplete(player)
end

if(intid == 301) then --Undercity--
player:Teleport(0, 2050.203125, 285.650604, 56.994549)
pUnit:GossipComplete(player)
end

if(intid == 302) then --Thunder Bluff--
player:Teleport(1, -1304.569946, 205.285004, 68.681396)
pUnit:GossipComplete(player)
end

if(intid == 303) then --Silvermooon City--
player:Teleport(530, 9400.486328, -7278.376953, 14.206780)
pUnit:GossipComplete(player)
end

-----------------------------------------------------------

if(intid == 304) then --Stormwind City--
player:Teleport(0, -9165.678711,470.176544, 103.978409)
pUnit:GossipComplete(player)
end

if(intid == 305) then --Ironforge--
player:Teleport(0, -4977.095215, -888.452942, 501.621216)
pUnit:GossipComplete(player)
end

if(intid == 306) then --Darnassus--
player:Teleport(1, 9943.809570, 2275.350098, 1341.390015)
pUnit:GossipComplete(player)
end

if(intid == 307) then --The Exodar--
player:Teleport(530, -3792.557861, -11691.3, -105.241)
pUnit:GossipComplete(player)
end

----------------------------------------------------------

if(intid == 308) then --HellFire Ramparts--
player:Teleport(530, -360.670990, 3071.899902, -15.097700)
pUnit:GossipComplete(player)
end

if(intid == 309) then --Blood Furnace--
player:Teleport(530, -303.506012, 3164.820068, 31.742500)
pUnit:GossipComplete(player)
end

if(intid == 310) then --Shattered Halls--
player:Teleport(530, -311.083527, 3083.291748, -3.745923)
pUnit:GossipComplete(player)
end

if(intid == 311) then --Underbog--
player:Teleport(530, 777.088989, 6763.450195, -72.062561)
pUnit:GossipComplete(player)
end

if(intid == 312) then --Slave Pens--
player:Teleport(530, 719.507996, 6999.339844, -73.074303)
pUnit:GossipComplete(player)
end

if(intid == 313) then --Mana-Tombs--
player:Teleport(530, -3079.810059, 4943.040039, -101.046997)
pUnit:GossipComplete(player)
end

if(intid == 314) then --Setthek Halls--
player:Teleport(530, -3362.219971, 4660.410156, -101.049004)
pUnit:GossipComplete(player)
end

if(intid == 315) then --Shadow Labyrinth--
player:Teleport(530, -3645.060059, 4943.620117, -101.047997)
pUnit:GossipComplete(player)
end

if(intid == 316) then --The Mechanar--
player:Teleport(530, 2862.409912, 1546.089966, 252.158691)
pUnit:GossipComplete(player)
end

if(intid == 317) then --Arcatraz--
player:Teleport(530, 3311.598145, 1332.745117, 505.557251)
pUnit:GossipComplete(player)
end

if(intid == 318) then --Cavern of Time--
player:Teleport(1, -8519.718750, -4297.542480, -208.441376)
pUnit:GossipComplete(player)
end

if(intid == 319) then --Serpentshrine Cavern--
player:Teleport(530, 830.542908, 6865.445801, -63.785503)
pUnit:GossipComplete(player)
end

----------------------------------------------------------

if(intid == 330) then --Black Temple--
player:Teleport(530, -3628.623291, 314.697510, 38.257904)
pUnit:GossipComplete(player)
end

if(intid == 331) then --Tempest Keep--
player:Teleport(530, 3089.057129, 1394.752197, 186.302628)
pUnit:GossipComplete(player)
end

if(intid == 332) then --Magtheridon's Lair--
player:Teleport(530, -313.678986, 3088.350098, -116.501999)
pUnit:GossipComplete(player)
end

if(intid == 337) then --Karazhan--
player:Teleport(0, -11124.789063, -2016.765259, 47.125431)
pUnit:GossipComplete(player)
end

if(intid == 341) then --Zul'Aman--
player:Teleport(530, 6850, -7950, 170)
pUnit:GossipComplete(player)
end

if(intid == 337) then --Gruul's Lair--
player:Teleport(530, 3530.207031, 5126.354492, 2.917513)
pUnit:GossipComplete(player)
end

----------------------------------------------------------

if(intid == 333) then --Onyxia's Lair--
player:Teleport(1, -4746, -3749, -4)
pUnit:GossipComplete(player)
end

if(intid == 334) then --Molten Core--
player:Teleport(409, 1089.486816, -470.366241, -106.475876)
pUnit:GossipComplete(player)
end

if(intid == 335) then --Blackwing Lair--
player:Teleport(469, -7665.55, -1102.49, 400.679)
pUnit:GossipComplete(player)
end

if(intid == 336) then --Zul'Gurub--
player:Teleport(0, -11919.073242, -1202.459374, 92.298744)
pUnit:GossipComplete(player)
end

if(intid == 338) then --Ruins of Ahn'Qiraj
player:Teleport(1, -8394.730469, 1485.658447, 21.038563)
pUnit:GossipComplete(player)
end

if(intid == 339) then --Temple of Ahn'Qiraj
player:Teleport(1, -8247.316406, 1970.156860, 129.071472)
pUnit:GossipComplete(player)
end

if(intid == 340) then --Naxxramas
player:Teleport(533, 3006.06, -3436.72, 293.891)
pUnit:GossipComplete(player)
end

----------------------------------------------------------

if(intid == 320) then --Shadowfang Keep--
player:Teleport(0, -10349.1, -3849.67, -24.6078)
pUnit:GossipComplete(player)
end

if(intid == 321) then --Scarlet Monastarey--
player:Teleport(0, 2843.570069, -692.133972, 139.330734)
pUnit:GossipComplete(player)
end

if(intid == 322) then --Zul'Farrak--
player:Teleport(1, -6815.975586, -2888, 540273, 8.895924)
pUnit:GossipComplete(player)
end

if(intid == 323) then --Scholomance--
player:Teleport(0, 1264.672363, -2558.375000, 94.128685)
pUnit:GossipComplete(player)
end

if(intid == 324) then --The Deamines--
player:Teleport(0, -11208.843750, 1667.725952, 24.624727)
pUnit:GossipComplete(player)
end

if(intid == 325) then --Uldaman--
player:Teleport(0, -6085.118652, -3220.368164, 262.885529)
pUnit:GossipComplete(player)
end

if(intid == 326) then --Sunken Temple--
player:Teleport(0, -10349.099609, -3849.669922, -41.240356)
pUnit:GossipComplete(player)
end

if(intid == 327) then --Lower Blackrock Spire--
player:Teleport(0, -7189,741211, -911.613281, 165.490372)
pUnit:GossipComplete(player)
end

if(intid == 328) then --Dire Maul--
player:Teleport(1, -3981.025391, 788.601379, 161.007019)
pUnit:GossipComplete(player)
end

if(intid == 329) then --Upper Blackrock Spire--
player:Teleport(469, -766.245117, -1103.233154, 399.680328)
pUnit:GossipComplete(player)
end

----------------------------------------------------------

if(intid == 348) then --The Global Mall--
player:Teleport(1, -8518.667969, 2015.781128, 104.748283)
pUnit:GossipComplete(player)
end

----------------------------------------------------------

if(intid == 350) then --Staircase of Doom--
player:Teleport(1, -8518.667969, 2015.781128, 104.748283)
pUnit:GossipComplete(player)
end

if(intid == 351) then --Legendary Maze--
player:Teleport(1, -8518.667969, 2015.781128, 104.748283)
pUnit:GossipComplete(player)
end

if(intid == 352) then --The Mountain of Glory--
player:Teleport(1, -8518.667969, 2015.781128, 104.748283)
pUnit:GossipComplete(player)
end

----------------------------------------------------------

if(intid == 343) then --Nagrand Arena--
player:Teleport(530, -2044.768799, 6654.127441, 13.054342)
pUnit:GossipComplete(player)
end

if(intid == 345) then --Gurubashi Arena--
player:Teleport(530,-2011.498413, 6601.716797, 12.434589)
pUnit:GossipComplete(player)
end

if(intid == 344) then --The Forest of Lost Souls--
player:Teleport(530,-2011.498413, 6601.716797, 12.434589)
pUnit:GossipComplete(player)
end

----------------------------------------------------------

if(intid == 994) then
pUnit:GossipCreateMenu(3543, player, 0)
pUnit:FullCastSpellOnTarget(71782, player)
pUnit:GossipSendMenu(player)
end

if(intid == 995) then
pUnit:GossipCreateMenu(3544, player, 0)
pUnit:FullCastSpellOnTarget(33077, player)
pUnit:FullCastSpellOnTarget(33078, player)
pUnit:FullCastSpellOnTarget(33079, player)
pUnit:FullCastSpellOnTarget(33080, player)
pUnit:FullCastSpellOnTarget(33081, player)
pUnit:FullCastSpellOnTarget(33082, player)
pUnit:FullCastSpellOnTarget(42995, player)
pUnit:FullCastSpellOnTarget(48161, player)
pUnit:FullCastSpellOnTarget(25898, player)
pUnit:SendChatMessage(13, 0, "You're now Buffed!", 0, 0)
pUnit:GossipMenuAddItem(7, "[Main Menu]", 990, 0)
pUnit:GossipSendMenu(player)
end
end

RegisterUnitGossipEvent(90019, 1, "Teleport_on_gossip_talk")
RegisterUnitGossipEvent(90019, 2, "Teleport_on_gossip_select")


I'd really appreciate it if you guys could tell me if I messed up somewhere. Thank you...

P.S. Yes, I know some of the coordinates are matching previous ones, I will be editing them later on.
0

#2 User is offline   Satanail 

  • Enthusiast
  • PipPipPip
  • Group: Members
  • Posts: 150
  • Joined: 11-March 12
  • Gender:Male
  • Location:Absurdistan
  • Server OS:Windows

Posted 19 May 2012 - 05:12 AM

Well i just tested the script and it loads and works. Check if the script is loaded in the correct npc. (the 2 last lines form the script). That is the only thing i changed when i initially tested (set it to my script test npc id). If the npc id of your teleporter is 90019 and the script is in the form of .lua file, placed in your script folder, there is no reason for it not to work. The only thing that might make a problem is if you have another script used by the same npc. I have some suggestions about the script, but it works in it's original form:

1. There is no reason for 2 different if checks:
if(player:GetTeam() == 0) then

pUnit:GossipMenuAddItem(8, "|CFF3366FF Alliance Cities", 3, 0)
else
end
if(player:GetTeam() == 1) then
pUnit:GossipMenuAddItem(8, "|CFFCC0000 Horde Cities", 2, 0)
else
end


This can easily be done like so:

if(player:GetTeam() == 0) then
pUnit:GossipMenuAddItem(8, "|CFF3366FF Alliance Cities", 3, 0)
elseif(player:GetTeam() == 1) then
pUnit:GossipMenuAddItem(8, "|CFFCC0000 Horde Cities", 2, 0)
end


2. You need the team check in the "[Main Menu]" (intid == 990) as well as in the "Teleport_on_gossip_talk" function in order for the player to return to the exact menu, that was created when he first right clicked the npc.

3. You need to create a gossip menu when you create the "[Main Menu]" menu. That is under (intid == 990) with "pUnit:GossipCreateMenu(3544, player, 0)". This is done in order not to stuck one menu under the other menu.


So the intid = 990 part should look something like this:
if(intid == 990) then
pUnit:GossipCreateMenu(3544, player, 0) -- CREATE NEW MENU.
if(player:GetTeam() == 0) then
pUnit:GossipMenuAddItem(8, "|CFF3366FF Alliance Cities", 3, 0)
elseif(player:GetTeam() == 1) then
pUnit:GossipMenuAddItem(8, "|CFFCC0000 Horde Cities", 2, 0)
end
pUnit:GossipMenuAddItem(8, "|cFF0000FF Global Mall", 348, 0)
pUnit:GossipMenuAddItem(6, "|cFFFFCC00 Event Locations", 9, 0)
pUnit:GossipMenuAddItem(2, "|cFF0000FF Outland Dungeons", 4, 0)
pUnit:GossipMenuAddItem(2, "|cFF0000FF Outland Raids", 5, 0)
pUnit:GossipMenuAddItem(2, "|cFF0000FF Azeroth Dungeons", 6, 0)
pUnit:GossipMenuAddItem(2, "|cFF0000FF Azeroth Raids", 7, 0)
pUnit:GossipMenuAddItem(9, "|cFFCC00CC [PVP]", 8, 0)
pUnit:GossipMenuAddItem(5, "|CFF00FF00 Heal me!", 994, 0)
pUnit:GossipMenuAddItem(4, "|CFF00FF00 Buff Me!", 995, 0)
pUnit:GossipSendMenu(player)
end


EDIT: I also noticed you don't use the "elseif" anywhere. It will be a lot better if you make your submenu select function looks something like this:

function Teleport_on_gossip_select(pUnit, event, player, id, intid, code)
if(intid == 990) then
 -- code here
elseif(intid == 1)then
 -- code here
elseif(intid == 2)then
 -- code here
 -- and etc
end

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users