Jump to content

[zero]registeritemgossipevent functional?


psyk3d

Recommended Posts

As the title says, is the RegisterItemGossipEvent method functional in mangos zero? I'm asking because it does not seem to be.

Here is the code:

Spoiler

--[==[----------------------------### START OF TELEPORTER ###----------------------------]==]

local UnitEntry = 1

-- Main Menu
local function OnGossipHelloTS(event, player, unit)
	--if (!player:IsInCombat()) then -- Check Combat State
		player:GossipMenuAddItem( 5, "[Teleport Locations]"				,0, 1)
		player:GossipMenuAddItem( 5, "[Player Tools]"					,0, 2)
		player:StopSpellCast()
		
		player:GossipSendMenu(0x7FFFFFFF, unit)
	--else
	--player:SendNotification("You are in combat.")
	--end
end

-- Sub-Menus
local function OnGossipSelectTS(event, player, unit, sender, intid, code)
	if(intid == 0) then -- Main Menu
		player:GossipMenuAddItem( 5, "[Teleport Locations]"				,0, 1)
		player:GossipMenuAddItem( 5, "[Player Tools]"					,0, 2)
	
		player:GossipSendMenu(0x7FFFFFFF, unit)
	end
	
	if(intid == 1) then -- Teleport Locations
		if ( player:GetTeam() == 1) then
		-- HORDE
			player:GossipMenuAddItem( 5, "[The Market]"					,0, 300)
			player:GossipMenuAddItem( 5, "[Major Cities]"				,0, 5)
			player:GossipMenuAddItem( 5, "[Starting Areas]"				,0, 7)
		else
		-- ALLIANCE
			player:GossipMenuAddItem( 5, "[The Market]"					,0, 301)
			player:GossipMenuAddItem( 5, "[Major Cities]"				,0, 6)
			player:GossipMenuAddItem( 5, "[Starting Areas]"				,0, 8)
		end
		player:GossipMenuAddItem( 5, "[Neutral Cities]"					,0, 17)
		player:GossipMenuAddItem( 5, "[Zones]"							,0, 9)
		player:GossipMenuAddItem( 5, "[Instances]"						,0, 10)
		player:GossipMenuAddItem( 5, "[Raids]"							,0, 12)
		player:GossipMenuAddItem( 5, "[Gurubashi Arena]"				,0, 200)
	
		player:GossipMenuAddItem( 7, "[Main Menu]"						,0, 0)
	
		player:GossipSendMenu(0x7FFFFFFF, unit)
	end
	if(intid == 2) then -- Player Tools
		if (player:GetClass() == 2) then --Paladin
			player:GossipMenuAddItem( 5, "[Learn Missing Spells]"		,0, 304)
			end
		if (player:GetClass() == 1) then --Warrior
			player:GossipMenuAddItem( 5, "[Learn Missing Spells]"		,0, 304)
			end
		if (player:GetClass() == 7) then --Shaman
			player:GossipMenuAddItem( 5, "[Learn Missing Spells]"		,0, 304)
			end
		if (player:GetClass() == 9) then --Warlock
			player:GossipMenuAddItem( 5, "[Learn Missing Spells]"		,0, 304)
			end
		if (player:GetClass() == 4) then --Rogue
			player:GossipMenuAddItem( 5, "[Learn Missing Spells]"		,0, 304)
			end
		if (player:GetClass() == 11) then --Druid
			player:GossipMenuAddItem( 5, "[Learn Missing Spells]"		,0, 304)
			end
		if (player:GetClass() == 3) then --Hunter
			player:GossipMenuAddItem( 5, "[Learn Missing Spells]"		,0, 304)
			end
		player:GossipMenuAddItem( 5, "[Learn Professions]"				,0, 16)
		player:GossipMenuAddItem( 5, "[Max Out Weapon Skills]"			,0, 302)
		player:GossipMenuAddItem( 5, "[Teach Me Riding]"				,0, 317)
		player:GossipMenuAddItem( 5, "[Reset Talent Points]"			,0, 318)
	
		if (player:GetClass() == 3) then --Hunter
			player:GossipMenuAddItem( 5, "[Level My Pet]"				,0, 303)
		end
	
		player:GossipMenuAddItem( 7, "[Main Menu]"						,0, 0)
	
		player:GossipSendMenu(0x7FFFFFFF, unit)
	end
	if(intid == 5) then -- Cities [HORDE]
		player:GossipMenuAddItem( 5, "Orgrimmar"						,0, 100)
		player:GossipMenuAddItem( 5, "Undercity"						,0, 101)
		player:GossipMenuAddItem( 5, "Thunderbluff"						,0, 102)
		player:GossipMenuAddItem( 5, "Goldshire (Stormwind)"			,0, 202)
		
		player:GossipMenuAddItem( 7, "[Back]"							,0, 1)
		player:GossipMenuAddItem( 7, "[Main Menu]"						,0, 0)
		
		player:GossipSendMenu(0x7FFFFFFF, unit)
	end
	if(intid == 6) then -- Cities [ALLIANCE]
		player:GossipMenuAddItem( 5, "Stormwind City"					,0, 103)
		player:GossipMenuAddItem( 5, "Ironforge"						,0, 104)
		player:GossipMenuAddItem( 5, "Darnassus"						,0, 105)
		player:GossipMenuAddItem( 5, "Razor Hill (Orgrimmar)"			,0, 201)
		
		player:GossipMenuAddItem( 7, "[Back]"							,0, 1)
		player:GossipMenuAddItem( 7, "[Main Menu]"						,0, 0)
		
		player:GossipSendMenu(0x7FFFFFFF, unit)
	end
	if(intid == 7) then -- Starting Places [HORDE]
		player:GossipMenuAddItem( 5, "Shadow Grave"						,0, 106)
		player:GossipMenuAddItem( 5, "Valley of Trials"					,0, 107)
		player:GossipMenuAddItem( 5, "Camp Narache"						,0, 108)
		
		player:GossipMenuAddItem( 7, "[Back]"							,0, 1)
		player:GossipMenuAddItem( 7, "[Main Menu]"						,0, 0)
	
		player:GossipSendMenu(0x7FFFFFFF, unit)
	end
	if(intid == 8) then -- Starting Places [ALLIANCE]
		player:GossipMenuAddItem( 5, "Northshire Valley"				,0, 109)
		player:GossipMenuAddItem( 5, "Coldridge Valley"					,0, 110)
		player:GossipMenuAddItem( 5, "Shadowglen"						,0, 111)
		
		player:GossipMenuAddItem( 7, "[Back]"							,0, 1)
		player:GossipMenuAddItem( 7, "[Main Menu]"						,0, 0)
	
		player:GossipSendMenu(0x7FFFFFFF, unit)
	end
	if(intid == 9) then -- Zones
		player:GossipMenuAddItem( 5, "[Kalimdor]"						,0, 13)
		player:GossipMenuAddItem( 5, "[Eastern Kingdoms]"				,0, 14)
		
		player:GossipMenuAddItem( 7, "[Back]"							,0, 1)
		player:GossipMenuAddItem( 7, "[Main Menu]"						,0, 0)
	
		player:GossipSendMenu(0x7FFFFFFF, unit)
	end
	if(intid == 10) then -- Instances [PAGE 1]
		player:GossipMenuAddItem( 5, "The Wailing Caverns"				,0, 230)
		player:GossipMenuAddItem( 5, "Deadmines"						,0, 231)
		player:GossipMenuAddItem( 5, "Shadowfang Keep"					,0, 232)
		player:GossipMenuAddItem( 5, "Blackfathom Deeps"				,0, 233)
		player:GossipMenuAddItem( 5, "Razorfen Kraul"					,0, 234)
		player:GossipMenuAddItem( 5, "Razorfen Downs"					,0, 235)
		player:GossipMenuAddItem( 5, "Scarlet Monastery"				,0, 236)
	
		player:GossipMenuAddItem( 7, "[More]"							,0, 11)
		player:GossipMenuAddItem( 7, "[Back]"							,0, 1)
		player:GossipMenuAddItem( 7, "[Main Menu]"						,0, 0)
	
		player:GossipSendMenu(0x7FFFFFFF, unit)
	end
	if(intid == 11) then -- Instances [PAGE 2]
		player:GossipMenuAddItem( 5, "Uldaman"							,0, 237)
		player:GossipMenuAddItem( 5, "Zul'Farrak"						,0, 238)
		player:GossipMenuAddItem( 5, "Maraudon"							,0, 239)
		player:GossipMenuAddItem( 5, "The Sunken Temple"				,0, 240)
		player:GossipMenuAddItem( 5, "Dire Maul"						,0, 241)
		player:GossipMenuAddItem( 5, "Blackrock Spire"					,0, 242)
		player:GossipMenuAddItem( 5, "Blackrock Depths"					,0, 243)
		player:GossipMenuAddItem( 5, "Scholomance"						,0, 244)
	
		player:GossipMenuAddItem( 7, "[Back]"							,0, 10)
		player:GossipMenuAddItem( 7, "[Main Menu]"						,0, 0)
	
		player:GossipSendMenu(0x7FFFFFFF, unit)
	end
	if(intid == 12) then -- Raids
		player:GossipMenuAddItem( 5, "Stratholme Back Door"				,0, 245)
		player:GossipMenuAddItem( 5, "Stratholme Main Door"				,0, 246)
		player:GossipMenuAddItem( 5, "Onyxia's Lair"					,0, 247)
		player:GossipMenuAddItem( 5, "Molten Core"						,0, 248)
		player:GossipMenuAddItem( 5, "Blackwing Lair"					,0, 249)
		player:GossipMenuAddItem( 5, "Naxxramas"						,0, 250)
		player:GossipMenuAddItem( 5, "Ruins of Ahn'Qiraj"				,0, 251)
		player:GossipMenuAddItem( 5, "Temple of Ahn'Qiraj"				,0, 252)
		player:GossipMenuAddItem( 5, "Zul'Gurub"						,0, 253)
		
		player:GossipMenuAddItem( 7, "[Back]"							,0, 1)
		player:GossipMenuAddItem( 7, "[Main Menu]"						,0, 0)
	
		player:GossipSendMenu(0x7FFFFFFF, unit)
	end
	if(intid == 13) then -- Kalimdor
		player:GossipMenuAddItem( 5, "Ashenvale"						,0, 203)
		player:GossipMenuAddItem( 5, "Darkshore"						,0, 204)
		player:GossipMenuAddItem( 5, "Desolace"							,0, 205)
		player:GossipMenuAddItem( 5, "Durotar"							,0, 206)
		player:GossipMenuAddItem( 5, "Dustwallow Marsh"					,0, 207)
		player:GossipMenuAddItem( 5, "Feralas"							,0, 208)
		player:GossipMenuAddItem( 5, "Silithus"							,0, 209)
		player:GossipMenuAddItem( 5, "Stonetalon Mountains"				,0, 210)
		player:GossipMenuAddItem( 5, "Tanaris"							,0, 211)
		player:GossipMenuAddItem( 5, "The Barrens"						,0, 212)
		player:GossipMenuAddItem( 5, "Thousand Needles"					,0, 213)
		player:GossipMenuAddItem( 5, "Winterspring"						,0, 214)
		
		player:GossipMenuAddItem( 7, "[Back]"							,0, 9)
		player:GossipMenuAddItem( 7, "[Main Menu]"						,0, 0)
	
		player:GossipSendMenu(0x7FFFFFFF, unit)
	end
	if(intid == 14) then -- Eastern Kingdoms [Page 1]
		player:GossipMenuAddItem( 5, "Arathi Highlands"					,0, 215)
		player:GossipMenuAddItem( 5, "Badlands"							,0, 216)
		player:GossipMenuAddItem( 5, "Dun Morogh"						,0, 217)
		player:GossipMenuAddItem( 5, "Duskwood"							,0, 218)
		player:GossipMenuAddItem( 5, "Eastern Plaguelands"				,0, 219)
		player:GossipMenuAddItem( 5, "Elwynn Forest"					,0, 220)
		player:GossipMenuAddItem( 5, "Hillsbrad Foothills"				,0, 221)
		player:GossipMenuAddItem( 5, "Redridge Mountains"				,0, 222)
		player:GossipMenuAddItem( 5, "Silverpine Forest"				,0, 223)
	
		player:GossipMenuAddItem( 7, "[More]"							,0, 15)
		player:GossipMenuAddItem( 7, "[Back]"							,0, 9)
		player:GossipMenuAddItem( 7, "[Main Menu]"						,0, 0)
	
		player:GossipSendMenu(0x7FFFFFFF, unit)
	end
	if(intid == 15) then -- Eastern Kingdoms [Page 2]
		player:GossipMenuAddItem( 5, "Stranglethorn Vale"				,0, 224)
		player:GossipMenuAddItem( 5, "Swamp of Sorrows"					,0, 225)
		player:GossipMenuAddItem( 5, "The Hinterlands"					,0, 226)
		player:GossipMenuAddItem( 5, "Tirisfal Glades"					,0, 227)
		player:GossipMenuAddItem( 5, "Westfall"							,0, 228)
		player:GossipMenuAddItem( 5, "Wetlands"							,0, 229)
	
		player:GossipMenuAddItem( 7, "[Back]"							,0, 14)
		player:GossipMenuAddItem( 7, "[Main Menu]"						,0, 0)
	
		player:GossipSendMenu(0x7FFFFFFF, unit)
	end
	if(intid == 16) then -- Learn Professions
		player:GossipMenuAddItem( 5, "Alchemy"							,0, 305)
		player:GossipMenuAddItem( 5, "Blacksmithing"					,0, 306)
		player:GossipMenuAddItem( 5, "Enchanting"						,0, 307)
		player:GossipMenuAddItem( 5, "Engineering"						,0, 308)
		player:GossipMenuAddItem( 5, "Herbalism"						,0, 309)
		player:GossipMenuAddItem( 5, "Leatherworking"					,0, 310)
		player:GossipMenuAddItem( 5, "Mining"							,0, 311)
		player:GossipMenuAddItem( 5, "Skinning"							,0, 312)
		player:GossipMenuAddItem( 5, "Tailoring"						,0, 313)
		player:GossipMenuAddItem( 5, "Cooking"							,0, 314)
		player:GossipMenuAddItem( 5, "First Aid"						,0, 315)
		player:GossipMenuAddItem( 5, "Fishing"							,0, 316)
	
		player:GossipMenuAddItem( 7, "[Back]"							,0, 2)
		player:GossipMenuAddItem( 7, "[Main Menu]"						,0, 0)
	
		player:GossipSendMenu(0x7FFFFFFF, unit)
	end
	if(intid == 17) then -- Neutral Cities
		player:GossipMenuAddItem( 5, "Booty Bay"						,0, 113)
		player:GossipMenuAddItem( 5, "Ratchet"							,0, 114)
	
		player:GossipMenuAddItem( 7, "[Back]"							,0, 1)
		player:GossipMenuAddItem( 7, "[Main Menu]"						,0, 0)
	
		player:GossipSendMenu(0x7FFFFFFF, unit)
	end

	---### CITIES ###---
	
	-- ### HORDE ###
	
	if(intid == 100) then -- Orgrimmar
		player:GossipComplete()
		player:Teleport(1, 1676.6774, -4448.3955, 19.0713, 0)
	end
	if(intid == 101) then -- Undercity 
		player:GossipComplete()
		player:Teleport(0, 1822.0999, 238.638855, 60.694809, 0)
	end
	if(intid == 102) then -- Thunderbluff
		player:GossipComplete()
		player:Teleport(1, -1272.703735, 116.886490, 131.016861, 0)
	end
	
	-- ### ALLIANCE ###
	
	if(intid == 103) then -- Stormwind
		player:GossipComplete()
		player:Teleport(0, -8828.231445, 627.927490, 94.055664, 0)
	end
	if(intid == 104) then -- Ironforge 
		player:GossipComplete()
		player:Teleport(0, -5019.015625, -836.758911, 496.661591, 0)
	end
	if(intid == 105) then -- Darnassus
		player:GossipComplete()
		player:Teleport(1, 9962.712891, 2280.142822, 1341.394409, 0)
	end
	
	---### STARTING PLACES ####---
	
	-- ### HORDE ###
	if(intid == 106) then -- Shadow Grave
		player:GossipComplete()
		player:Teleport(0, 1663.517, 1678.187744, 120.5303, 0)
	end
	if(intid == 107) then -- Valley of Trials
		player:GossipComplete()
		player:Teleport(1, -602.1253, -4262.4208, 38.956341, 0)
	end
	if(intid == 108) then -- Camp Narache
		player:GossipComplete()
		player:Teleport(1, -2914.16992, -266.061798, 53.658211, 0)
	end
	
	-- ### ALLIANCE ###
	
	if(intid == 109) then -- Nortshire Valley
		player:GossipComplete()
		player:Teleport(0, -8943.133789, -132.934921, 83.704269, 0)
	end
	if(intid == 110) then -- Coldridge Valley
		player:GossipComplete()
		player:Teleport(0, -6231.106445, 332.270477, 383.153931, 0)
	end
	if(intid == 111) then -- Shadowglen
		player:GossipComplete()
		player:Teleport(1, 10329.918945, 833.500305, 1326.260620, 0)
	end
	
	---### Neutral Cities ###---
	
	if(intid == 113) then -- Booty Bay
		player:GossipComplete()
		player:Teleport(0, -14252.345703, 334.345215, 26.107536, 2.305929)
	end
	if(intid == 114) then -- Ratchet
		player:GossipComplete()
		player:Teleport(1, -962.580872, -3765.391113, 5.300766, 0.944835)
	end
	
	---### ZONES ###---
	
	if(intid == 200) then -- Gurubashi
		player:GossipComplete()
		player:Teleport(0, -13261.3, 168.294, 35.0792, 1.00688)
	end
	if(intid == 201) then -- Kalimdor -> Razor Hill [Alliance Port to Horde]
		player:GossipComplete()
		player:Teleport(1, 315.721, -4743.4, 10.4867, 0)
	end
	if(intid == 202) then -- Eastern Kingdoms -> Goldshire [Horde Port to Alliance]
		player:GossipComplete()
		player:Teleport(0, -9464.0, 62.0, 56.0, 0)
	end
	if(intid == 203) then -- Kalimdor -> Ashenvale
		player:GossipComplete()
		player:Teleport(1, 3469.43,847.62,6.36476,0)
	end
	if(intid == 204) then -- Kalimdor -> Darkshore
		player:GossipComplete()
		player:Teleport(1, 6207.5,-152.833,80.8185,0)
	end
	if(intid == 205) then -- Kalimdor -> Desolace
		player:GossipComplete()
		player:Teleport(1, -93.1614,1691.15,90.0649,0)
	end
	if(intid == 206) then -- Kalimdor -> Durotar
		player:GossipComplete()
		player:Teleport(1, 341.42,-4684.7,31.9493,0)
	end
	if(intid == 207) then -- Kalimdor -> Duswallow Marsh
		player:GossipComplete()
		player:Teleport(1, -3463.26,-4123.13,18.1043,0)
	end
	if(intid == 208) then -- Kalimdor -> Ferelas
		player:GossipComplete()
		player:Teleport(1, -4458.93,243.415,65.6136,0)
	end
	if(intid == 209) then -- Kalimdor -> Silithus
		player:GossipComplete()
		player:Teleport(1, -6824.15,821.273,50.6675,0)
	end
	if(intid == 210) then -- Kalimdor -> Stonetalon Mountains
		player:GossipComplete()
		player:Teleport(1, 1145.00,85.664,-6.64,0)
	end
	if(intid == 211) then -- Kalimdor -> Tanaris
		player:GossipComplete()
		player:Teleport(1, -7373.69,-2950.2,11.7598,0)
	end
	if(intid == 212) then -- Kalimdor -> The Barrens
		player:GossipComplete()
		player:Teleport(1, -456.263,-2652.7,96.615,0)
	end
	if(intid == 213) then -- Kalimdor -> Thousand Needles
		player:GossipComplete()
		player:Teleport(1, -4941.66,-1595.42,-33.07,0)
	end
	if(intid == 214) then -- Kalimdor -> Winterspring
		player:GossipComplete()
		player:Teleport(1, 6107.62,-4181.6,853.322,0)
	end
	if(intid == 215) then -- Eastern Kingdoms -> Arathi Highlands
		player:GossipComplete()
		player:Teleport(0, -1544.93,-2495.01,54.11,0)
	end
	if(intid == 216) then -- Eastern Kingdoms -> Badlands
		player:GossipComplete()
		player:Teleport(0, -6084.95,-3328.44,253.76,0)
	end
	if(intid == 217) then -- Eastern Kingdoms -> Dun Morogh
		player:GossipComplete()
		player:Teleport(0, -5660.33,755.299,390.605,0)
	end
	if(intid == 218) then -- Eastern Kingdoms -> Duskwood
		player:GossipComplete()
		player:Teleport(0, -10879.85,-327.06,37.78,0)
	end
	if(intid == 219) then -- Eastern Kingdoms -> Eastern Plaguelands
		player:GossipComplete()
		player:Teleport(0, 2280.12,-5313.16,87.74,0)
	end
	if(intid == 220) then -- Eastern Kingdoms -> Elwynn Forest
		player:GossipComplete()
		player:Teleport(0, -9545.78,-51.81,56.72,0)
	end
	if(intid == 221) then -- Eastern Kingdoms -> Hillsbrad Foothills
		player:GossipComplete()
		player:Teleport(0, -436.03,-583.27,53.58,0)
	end
	if(intid == 222) then -- Eastern Kingdoms -> Reridge Mountains
		player:GossipComplete()
		player:Teleport(0, -9633.80,-1875.09,68.39,0)
	end
	if(intid == 223) then -- Eastern Kingdoms -> Silverpine Forest
		player:GossipComplete()
		player:Teleport(0, 641.48,1297.84,85.45,0)
	end
	if(intid == 224) then -- Eastern Kingdoms -> Stranglethorn Vale
		player:GossipComplete()
		player:Teleport(0, -11393.77,-288.94,58.99,0)
	end
	if(intid == 225) then -- Eastern Kingdoms -> Swamp of Sorrows
		player:GossipComplete()
		player:Teleport(0, -10522.55,-3028.30,21.79,0)
	end
	if(intid == 226) then -- Eastern Kingdoms -> The Hinterlands
		player:GossipComplete()
		player:Teleport(0, 155.14,-2014.95,122.55,0)
	end
	if(intid == 227) then -- Eastern Kingdoms -> Tirisfal Glades
		player:GossipComplete()
		player:Teleport(0, 2255.5,288.511,35.1138,0)
	end
	if(intid == 228) then -- Eastern Kingdoms -> Westfall
		player:GossipComplete()
		player:Teleport(0, -10919.09,998.47,35.47,0)
	end
	if(intid == 229) then -- Eastern Kingdoms -> Wetlands
		player:GossipComplete()
		player:Teleport(0, -4086.36,-2610.95,47.0143,0)
	end
	
	---### INSTANCES ###---
	
	if(intid == 230) then -- The Wailing Caverns
		player:GossipComplete()
		player:Teleport(1, -722.53,-2226.30,16.94,2.71)
	end
	if(intid == 231) then -- The Deadmines
		player:GossipComplete()
		player:Teleport(0, -11212.04,1658.58,25.67,1.45)
	end
	if(intid == 232) then -- Shadowfang Keep
		player:GossipComplete()
		player:Teleport(0, -254.47,1524.68,76.89,1.56)
	end
	if(intid == 233) then -- Blackfathom Deeps
		player:GossipComplete()
		player:Teleport(1, 4254.58,664.74,-29.04,1.97)
	end
	if(intid == 234) then -- Razorfen Kraul
		player:GossipComplete()
		player:Teleport(1, -4484.04,-1739.40,86.47,1.23)
	end
	if(intid == 235) then -- Razorfen Downs
		player:GossipComplete()
		player:Teleport(1, -4645.08,-2470.85,85.53,4.39)
	end
	if(intid == 236) then -- The Scarlet Monastery
		player:GossipComplete()
		player:Teleport(0, 2843.89,-693.74,139.32,5.11)
	end
	if(intid == 237) then -- Uldaman
		player:GossipComplete()
		player:Teleport(0, -6119.70,-2957.30,204.11,0.03)
	end
	if(intid == 238) then -- Zul'Farrak
		player:GossipComplete()
		player:Teleport(1, -6839.39,-2911.03,8.87,0.41)
	end
	if(intid == 239) then -- Maraudon
		player:GossipComplete()
		player:Teleport(1, -1433.33,2955.34,96.21,4.82)
	end
	if(intid == 240) then -- The Sunken Temple
		player:GossipComplete()
		player:Teleport(0, -10346.92,-3851.90,-43.41,6.09)
	end
	if(intid == 241) then -- Dire Maul
		player:GossipComplete()
		player:Teleport(1, -3982.47,1127.79,161.02,0.05)
	end
	if(intid == 242) then -- Blackrock Spire
		player:GossipComplete()
		player:Teleport(0, -7535.43,-1212.04,285.45,5.29)
	end
	if(intid == 243) then -- Blackrock Depths
		player:GossipComplete()
		player:Teleport(0, -7301.03,-913.19,165.37,0.08)
	end
	if(intid == 244) then -- Scholomance
		player:GossipComplete()
		player:Teleport(0, 1252.319824, -2587.151123, 92.886772, 0)
	end
	
	---### Raids ###---
	
	if(intid == 245) then -- Stratholme Backdoor Entrance
		player:GossipComplete()
		player:Teleport(0, 3160.416992, -4038.750244, 104.177376, 0)
	end
	if(intid == 246) then -- Stratholme Main Entrance
		player:GossipComplete()
		player:Teleport(0, 3357.214355, -3379.713135, 144.780853, 0)
	end
	if(intid == 247) then -- Onyxia's Lair
		player:GossipComplete()
		player:Teleport(1, -4682.391602, -3709.857422, 46.792862, 0)
	end
	if(intid == 248) then -- Molten Core
		player:GossipComplete()
		player:Teleport(230, 1121.451172, -454.316772, -101.329536, 3.5)
	end
	if(intid == 249) then -- Blackwing Lair
		player:GossipComplete()
		player:Teleport(469, -7665.55, -1102.49, 400.679, 0)
	end
	if(intid == 250) then -- Naxxramas
		player:GossipComplete()
		player:Teleport(0, 3121.061768, -3689.973389, 133.458786, 0)
	end
	if(intid == 251) then -- Ruins of Ahn'Qiraj
		player:GossipComplete()
		player:Teleport(1, -8409.032227, 1498.830933, 27.361542, 2.497567)
	end
	if(intid == 252) then -- Temple of Ahn'Qiraj
		player:GossipComplete()
		player:Teleport(1, -8245.837891, 1983.736206, 129.071686, 0.936195)
	end
	if(intid == 253) then -- Zul'Gurub
		player:GossipComplete()
		player:Teleport(0, -11916.179688, -1190.977051, 85.137901, 0)
	end
	
	---### OTHER ###---
	
	-- ### Market ###
	if(intid == 300) then -- Horde Mall
		player:GossipComplete()
		player:Teleport(1, -10708.900391, 2410.229980, 7.607820, 2.542850)
	end
	if(intid == 301) then -- Alliance Mall
		player:GossipComplete()
		player:Teleport(0, -9307.393555, 714.058594, 130.719421, 5.809136)
	end	
	
	---### Player Tools ###---

	if(intid == 302) then -- Set Weapon Skill MAX
		player:GossipComplete()
		player:AdvanceSkillsToMax()
		player:SendNotification("Your Weapon Skills Have Been Maxed Out.")
	end
	if(intid == 303) then -- Level Pet
		player:GossipComplete()
	end
	if(intid == 304) then -- Learn Spells
		player:GossipComplete()
		if (player:GetClass() == 2) then --Paladin
			player:LearnSpell(7328)
			player:LearnSpell(13819)
			player:LearnSpell(23214)
			player:LearnSpell(5502)
		end
		if (player:GetClass() == 1) then --Warrior
			player:LearnSpell(2458)
			player:LearnSpell(71)
			player:LearnSpell(20252)
			player:LearnSpell(7386)
			player:LearnSpell(674)
		end
		if (player:GetClass() == 7) then --Shaman
			player:LearnSpell(2075)
			player:LearnSpell(8073)
			player:LearnSpell(5396)
			player:LearnSpell(674)
		end
		if (player:GetClass() == 9) then --Warlock
			player:LearnSpell(688)
			player:LearnSpell(697)
			player:LearnSpell(712)
			player:LearnSpell(691)
			player:LearnSpell(1122)
			player:LearnSpell(5784)
			player:LearnSpell(23161)
		end
		if (player:GetClass() == 4) then --Rogue
			player:LearnSpell(2842)
			player:LearnSpell(674)
		end
		if (player:GetClass() == 11) then --Druid
			player:LearnSpell(1066)
			player:LearnSpell(5487)
			player:LearnSpell(9634)
			player:LearnSpell(6807)
		end
		if (player:GetClass() == 3) then --Hunter
			player:LearnSpell(883)
			player:LearnSpell(2641)
			player:LearnSpell(6991)
			player:LearnSpell(982)
			player:LearnSpell(1515)
			player:LearnSpell(674)
		end
		player:SendNotification("Your Missing Spells Have Been Added.", 0)
	end
	
	-- ### Learn Professions ###
	if(intid == 305) then -- Alchemy
		player:GossipComplete()
		player:LearnSpell(2259)
		player:LearnSpell(3101)
		player:LearnSpell(3464)
		player:LearnSpell(11611)
	
		player:AdvanceSkill(171, 300)
		player:SendNotification("You Have Been Taught Alchemy.", 0)
	end
	if(intid == 306) then -- Blacksmithing
		player:GossipComplete()
		player:LearnSpell(2018)
		player:LearnSpell(3100)
		player:LearnSpell(3538)
		player:LearnSpell(9785)
		
		player:AdvanceSkill(164, 300)
		player:SendNotification("You Have Been Taught Blacksmithing.", 0)
	end
	if(intid == 307) then -- Enchanting
		player:GossipComplete()
		player:LearnSpell(7411)
		player:LearnSpell(7412)
		player:LearnSpell(7413)
		player:LearnSpell(13920)
		
		player:AdvanceSkill(333, 300)
		player:SendNotification("You Have Been Taught Enchanting.", 0)
	end
	if(intid == 308) then -- Engineering
		player:GossipComplete()
		player:LearnSpell(4036)
		player:LearnSpell(4037)
		player:LearnSpell(4038)
		player:LearnSpell(12656)
		
		player:AdvanceSkill(202, 300)
		player:SendNotification("You Have Been Taught Engineering.", 0)
	end
	if(intid == 309) then -- Herbalism
		player:GossipComplete()
		player:LearnSpell(2366)
		player:LearnSpell(2368)
		player:LearnSpell(3570)
		player:LearnSpell(11993)
		
		player:AdvanceSkill(182, 300)
		player:SendNotification("You Have Been Taught Herbalism.", 0)
	end
	if(intid == 310) then -- LeatherWorking
		player:GossipComplete()
		player:LearnSpell(2108)
		player:LearnSpell(3104)
		player:LearnSpell(3811)
		player:LearnSpell(10662)
		
		player:AdvanceSkill(165, 300)
		player:SendNotification("You Have Been Taught LeatherWorking.", 0)
	end
	if(intid == 311) then -- Mining
		player:GossipComplete()
		player:LearnSpell(2575)
		player:LearnSpell(2576)
		player:LearnSpell(3564)
		player:LearnSpell(10248)
		
		player:AdvanceSkill(186, 300)
		player:SendNotification("You Have Been Taught Mining.", 0)
	end
	if(intid == 312) then -- Skinning
		player:GossipComplete()
		player:LearnSpell(8613)
		player:LearnSpell(8617)
		player:LearnSpell(8618)
		player:LearnSpell(10768)
		
		player:AdvanceSkill(393, 300)
		player:SendNotification("You Have Been Taught Skinning.", 0)
	end
	if(intid == 313) then -- Tailoring
		player:GossipComplete()
		player:LearnSpell(3908)
		player:LearnSpell(3909)
		player:LearnSpell(3910)
		player:LearnSpell(12180)
		
		player:AdvanceSkill(197, 300)
		player:SendNotification("You Have Been Taught Tailoring.", 0)
	end
	if(intid == 314) then -- Cooking
		player:GossipComplete()
		player:LearnSpell(2550)
		player:LearnSpell(3102)
		player:LearnSpell(3413)
		player:LearnSpell(18260)
		
		player:AdvanceSkill(185, 300)
		player:SendNotification("You Have Been Taught Cooking.", 0)
	end
	if(intid == 315) then -- First Aid
		player:GossipComplete()
		player:LearnSpell(3273)
		player:LearnSpell(3274)
		player:LearnSpell(7924)
		player:LearnSpell(10846)
		
		player:AdvanceSkill(129, 300)
		player:SendNotification("You Have Been Taught First Aid.", 0)
	end
	if(intid == 316) then -- Fishing
		player:GossipComplete()
		player:LearnSpell(7620)
		player:LearnSpell(7731)
		player:LearnSpell(7732)
		player:LearnSpell(18248)
		
		player:AdvanceSkill(356, 300)
		player:SendNotification("You Have Been Taught Fishing.", 0)
	end
	if(intid == 317) then -- Learn Riding
		player:GossipComplete()
		player:LearnSpell(33388)
		player:LearnSpell(33391)
	
		player:AdvanceSkill(762, 150)
		player:SendNotification("You Have Been Taught Riding.", 0)
	end
	if(intid == 318) then -- Reset Talent Points
		player:GossipComplete()
		player:resetTalents(true)
		player:GiveLevel(-59)
		player:GiveLevel(60)
		player:SendNotification("Your Talents Have Been Reset.", 0)
	end

end
-- -----------------------------### END OF TELEPORTER ###-----------------------------

RegisterItemGossipEvent(999999, 1, OnGossipHelloTS)
RegisterItemGossipEvent(999999, 2, OnGossipSelectTS)

 

 

Link to comment
Share on other sites

It should be functional:
https://github.com/mangoszero/server/blob/master/src/game/WorldHandlers/ScriptMgr.cpp#L2240

What exactly did you try? Could be the code has something wrong.
I cannot test the functionality at this moment.
Does the NPC have the gossip npcflag?
Also make sure that you dont have any errors in your log files or in console after trying to talk to the creature.

Link to comment
Share on other sites

3 hours ago, Rochet2 said:

It should be functional:
https://github.com/mangoszero/server/blob/master/src/game/WorldHandlers/ScriptMgr.cpp#L2240

What exactly did you try? Could be the code has something wrong.
I cannot test the functionality at this moment.
Does the NPC have the gossip npcflag?
Also make sure that you dont have any errors in your log files or in console after trying to talk to the creature.

I am terribly sorry, accidentally pasted RegisterCreatureGossipEvent instead of RegisterItemGossipEvent.

The problem i am having is that using the item will not trigger the gossip menu no matter what, even though the lua script is loading perfectly with no errors. The same script works perfectly on an npc.

Edit: Hm, looking at eluna now, I think support for gossip menus on items has been dropped, though im pretty sure it was working a few versions ago.

Link to comment
Share on other sites

Try attaching the script to the hearthstone item.
If it works on that item, then it works fine.

For item gossip the item needs to have a spell on use, like hearthstone has. I recommend copying hearthstone and using some dummy, instant cast spell that is cast on self. Dont forget to clear cache, as I have seen it prevent using an item.

Link to comment
Share on other sites

On 3/19/2017 at 11:56 PM, Rochet2 said:

Try attaching the script to the hearthstone item.
If it works on that item, then it works fine.

For item gossip the item needs to have a spell on use, like hearthstone has. I recommend copying hearthstone and using some dummy, instant cast spell that is cast on self. Dont forget to clear cache, as I have seen it prevent using an item.

It works with a spell, used 18282 as a dummy spell. Also clear your WDB folder. Thanks.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use