Share Pastebin
Guest
Public paste!

Wx2

By: a guest | Mar 21st, 2010 | Syntax: Lua | Size: 0.66 KB | Hits: 63 | Expires: Never
Copy text to clipboard
  1. local NPCID = 76668 ---> The NPC ID here!
  2.  
  3. function Talent_OnGossip(Unit, event, player)
  4.         Unit:GossipCreateMenu(3544, player, 0)
  5.         Unit:GossipMenuAddItem(0, "Give me 20 talent points", 1, 0)
  6.         Unit:GossipMenuAddItem(4, "Nevermind", 999, 0)
  7.         Unit:GossipSendMenu(player)
  8. end
  9.  
  10. function Talent_SubMenu(unit, event, player, id, intid, code)
  11.  
  12. if(intid == 999) then
  13.         Unit:GossipComplete(player)
  14. end
  15.  
  16. if(intid == 1) then
  17.         Unit:SetTalentPoints(0, 20)
  18.         Unit:SendChatMessage(13, 0, "20 Talents has been added to you!")
  19.         Unit:GossipComplete(player)
  20.         end
  21. end
  22.  
  23. RegisterUnitGossipEvent(NPCID, 1, "Talent_OnGossip")
  24. RegisterUnitGossipEvent(NPCID, 2, "Talent_SubMenu")