2014-01-25 22:13:18 +02:00
local npcId = 123
2013-11-02 00:48:17 -04:00
2014-01-25 22:13:18 +02:00
local function GossipHello ( event , plr , unit )
2013-11-02 00:48:17 -04:00
plr : GossipMenuAddItem ( 0 , " I would like to place a bounty " , 0 , 1 , true , " Who would you like to place a bounty on? " , 10000 ) -- icon, text, sender, intid, use code (true/false), prompt text, how much gold (amount)
plr : GossipMenuAddItem ( 0 , " Nevermind.. " , 0 , 2 )
2013-12-01 21:10:41 -05:00
plr : GossipSendMenu ( 1 , unit )
2013-11-02 00:48:17 -04:00
end
2014-01-25 22:13:18 +02:00
local function GossipSelect ( event , player , creature , sender , intid , code )
2013-11-02 00:48:17 -04:00
if ( intid == 1 ) then -- Deal with code / bounty stuff
2013-12-01 21:10:41 -05:00
local victim = GetPlayerByName ( code )
if ( victim ~= nil ) then
player : SendBroadcastMessage ( " NAME: " .. victim : GetName ( ) .. " ! " )
player : ModifyMoney ( - 10000 ) -- Remove the gold amount
end
end
2013-11-02 00:48:17 -04:00
end
RegisterCreatureGossipEvent ( npcId , 1 , GossipHello )
RegisterCreatureGossipEvent ( npcId , 2 , GossipSelect )