They both had registered the same events which were, Gossip_Submenus and On_Gossip, you need to vary them or else it will only register on and it will work on all creatures who register it, so the alliance script will work with the horde and alliance npc if you don't register it correctly.
Code:
function Tele_On_Gossip(pUnit, event, player)
if (player:HasFinishedQuest(8) == true) then
pUnit:GossipCreateMenu(14772, player, 0)
pUnit:GossipMenuAddItem(0, "Teleport me!", 1, 0)
pUnit:GossipSendMenu(player)
else
pUnit:SendBroadcastMessage("You need to do the quest first!")
end
end
function Tele_Gossip_Submenus(pUnit, event, player, id, intid, code)
if(intid == 1) then
player:Teleport(34, 49.821201, 0.870144, -16.713614)
end
end
RegisterUnitGossipEvent(14772, 1, "Tele_On_Gossip")
RegisterUnitGossipEvent(14772, 2, "Tele_Gossip_Submenus")
Code:
Code:
function Teleporter_On_Gossip(pUnit, event, player)
if (player:HasFinishedQuest(9) == true) then
pUnit:GossipCreateMenu(14762, player, 0)
pUnit:GossipMenuAddItem(0, "Teleport me!", 1, 0)
pUnit:GossipSendMenu(player)
else
pUnit:SendBroadcastMessage("You need to do the quest first!")
end
end
function Teleporter_Gossip_Submenus(pUnit, event, player, id, intid, code)
if(intid == 1) then
player:Teleport(34, 49.821201, 0.870144, -16.713614)
end
end
RegisterUnitGossipEvent(14762, 1, "Teleporter_On_Gossip")
RegisterUnitGossipEvent(14762, 2, "Teleporter_Gossip_Submenus")