Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.27 KB | None | 0 0
  1. --[[
  2.     Credits Warlord777/InfernoGaming
  3. ]]
  4.  
  5. -- Variables
  6. local NPC_ID = IDHERE!
  7.  
  8. -- On Triggers
  9. function exampleGossipOnTalk(Unit, Event, player)
  10.     Unit:GossipCreateMenu(100, player, 0)
  11.     Unit:GossipMenuAddItem(1, "Teleport me to The Mall", 1, 0)
  12.     Unit:GossipMenuAddItem(1, "Teleport me to Level Road, 4, 0)
  13.     Unit:GossipMenuAddItem(3, "Remove Resurrection Sickness.", 2, 0)
  14.     Unit:GossipMenuAddItem(0, "Never mind.", 3, 0)
  15.     Unit:GossipSendMenu(player)
  16. end
  17.  
  18.  
  19. function exampleGossipOnSelect(Unit, Event, player, id, intid, code, pMisc)
  20.     if (intid == 1) then
  21.         player:Teleport(1, -9101.980469, 1612.902832, 21)
  22.         player:GossipComplete()
  23.     end
  24.    
  25.     if (intid == 4) then
  26.         player:Teleport(530, 11658.806641, -7103.918945, 11.104808)
  27.         player:GossipComplete()
  28.     end
  29.    
  30.     if (intid == 2) then
  31.         if (player:HasAura(15007) == true) then
  32.             player:SendBroadcastMessage("Resurrection Sickness has been Removed")
  33.             player:RemoveAura(15007)
  34.             player:GossipComplete()
  35.         else
  36.             player:SendBroadcastMessage("You do not have Resurrection Sickness!")
  37.             player:GossipComplete()
  38.         end
  39.    
  40.  
  41.     end
  42.  
  43.     if (intid == 3) then
  44.         player:GossipComplete()
  45.     end
  46. end
  47.  
  48. -- RegisterUnitEvents
  49. RegisterUnitGossipEvent(NPC_ID, 1, "GossipOnTalk")
  50. RegisterUnitGossipEvent(NPC_ID, 2, "GossipOnSelect")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement