Advertisement
Xsniper1000

Basic gossip script

Apr 11th, 2012
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.58 KB | None | 0 0
  1. --[[########CARLSBERG#############
  2. This is a fun script. This will give your Gossip NPC many cool options.
  3. Feel free to steal the script and modify it
  4. This is a small script, I made to test a few functions. I'd suggest you to contact me on [email protected]
  5. for a full version ]]
  6.  
  7. -- Please Enter your OWN ID.
  8. local YOUR_NPC = 1000
  9.  
  10. function GossipOnTalk(Unit, Event, player)
  11.     Unit:GossipCreateMenu(100, player, 0)
  12.     Unit:GossipMenuAddItem(0, "Give me HONOR!", 1, 0)
  13.     Unit:GossipMenuAddItem(0, "GIVE ME XP!", 2, 0)
  14.     Unit:GossipMenuAddItem(0, "GIVE ME ARENA POINTS!", 3, 0)
  15.     Unit:GossipMenuAddItem(0, "Take my arena points!", 4, 0)
  16.     Unit:GossipMenuAddItem(0, "Take me to GMISLAND!", 5, 0)
  17.     Unit:GossipSendMenu(player)
  18. end
  19.  
  20. function GossipOnSelect(Unit, Event, player, id, intid, code, pMisc)
  21.     if (intid == 1) then
  22.         player:GiveHonor(1000)
  23.         player:SendBroadcastMessage("You have been granted 1000 honor points!")
  24.     elseif (intid == 2) then
  25.         player:GiveXp(1000)
  26.         player:SendBroadcastMessage("You have been granted 1000 XP!")
  27.     elseif (intid == 3) then
  28.             player:AddArenaPoints(1)
  29.                 player:SendBroadcastMessage("You have been granted with 1 arena point!")
  30.     elseif (intid == 4) then
  31.             player:RemoveArenaPoints(1)
  32.         player:SendBroadcastMessage("I took 1 arena point from you, mohahaha")
  33.     elseif (intid == 5) then
  34.             player:Teleport(0, 000, 000, 000, 0)
  35.         player:SendBroadcastMessage("Welcome to GMISLAND")
  36.     end
  37.     player:GossipComplete()
  38. end
  39.  
  40. RegisterUnitGossipEvent(YOUR_NPC, 1, GossipOnTalk)
  41. RegisterUnitGossipEvent(YOUR_NPC, 2, GossipOnSelect)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement