Wx2
By: a guest | Mar 21st, 2010 | Syntax:
Lua | Size: 0.66 KB | Hits: 63 | Expires: Never
local NPCID = 76668 ---> The NPC ID here!
function Talent_OnGossip(Unit, event, player)
Unit:GossipCreateMenu(3544, player, 0)
Unit:GossipMenuAddItem(0, "Give me 20 talent points", 1, 0)
Unit:GossipMenuAddItem(4, "Nevermind", 999, 0)
Unit:GossipSendMenu(player)
end
function Talent_SubMenu(unit, event, player, id, intid, code)
if(intid == 999) then
Unit:GossipComplete(player)
end
if(intid == 1) then
Unit:SetTalentPoints(0, 20)
Unit:SendChatMessage(13, 0, "20 Talents has been added to you!")
Unit:GossipComplete(player)
end
end
RegisterUnitGossipEvent(NPCID, 1, "Talent_OnGossip")
RegisterUnitGossipEvent(NPCID, 2, "Talent_SubMenu")