Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function NatoSwiftmend (pUnit, event, player)
- -- The combat check could be before teleporting instead. This way you could use the NPC, but not teleport.
- -- Atm you can co to the NPC and if you get attacked you can still teleport.
- if (player:IsInCombat()) then
- player:SendAreaTriggerMessage("You cannot access Nato Swiftmend while you're in combat!")
- return
- end
- pUnit:GossipCreateMenu(50, player, 0)
- local race=player:GetPlayerRace()
- if race==2 or race==5 or race==6 or race==8 or race==10 then
- pUnit:GossipMenuAddItem(3, "Mall", 1, 0)
- pUnit:GossipMenuAddItem(9, "Cross Faction Battle", 2, 0)
- pUnit:GossipMenuAddItem(10, "Solo Content", 3, 0)
- pUnit:GossipMenuAddItem(5, "Nevermind", 0, 0)
- else
- pUnit:GossipMenuAddItem(3, "Mall", 1, 0)
- pUnit:GossipMenuAddItem(9, "Cross Faction Battle", 4, 0)
- pUnit:GossipMenuAddItem(10, "Solo Content", 3, 0)
- pUnit:GossipMenuAddItem(5, "Nevermind", 0, 0)
- end
- pUnit:GossipSendMenu(player)
- end
- local function NatoSwiftmend2(pUnit, event, player, id, intid, code)
- if(intid == 1) then
- player:Teleport(1, -10710.852539, 2482.370850, 7.922390)
- elseif(intid == 2) then
- player:Teleport(0, 1804.678345, 186.426788, 70.398277)
- elseif(intid == 3) then
- player:Teleport(0, 0, 0, 0) -- Unfinished
- elseif(intid == 4) then
- player:Teleport(0, 1805.745361, 291.897797, 70.3992628)
- end
- player:GossipComplete()
- end
- -- Dont use quotes in registers
- RegisterUnitGossipEvent(80000, 1, NatoSwiftmend)
- RegisterUnitGossipEvent(80000, 2, NatoSwiftmend2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement