Code:
local npcid = 5009010
function On_Gossip_Menu(unit, event, player)
unit:GossipCreateMenu(3544, player, 0)
unit:GossipMenuAddItem(9, "Bijou's into Ethereal Credits!", 1, 0)
unit:GossipMenuAddItem(9, "Ethereal credit exchange store.", 2, 0)
unit:GossipMenuAddItem(9, "Sell your items for Ethereal Credit!", 3, 0)
unit:GossipSendMenu(player)
-- end commenting out the end here. See if it works, it might.
function On_Gossip_Menu_select(Unit, event, player, id, intid, code)
if (intid == 1) then
Unit:GossipCreateMenu(99, player, 0)
Unit:GossipMenuAddItem(2, "|cFF008000Ethereal Credit X1", 13371, 0)
Unit:GossipMenuAddItem(2, "|cFF008000Ethereal Credit X3", 13372, 0)
Unit:GossipMenuAddItem(2, "|cFF008000Ethereal Credit X5", 13373, 0)
Unit:GossipMenuAddItem(2, "|cFF008000Ethereal Credit X10", 13374, 0)
Unit:GossipMenuAddItem(2, "|cFF008000Ethereal Credit X20", 13375, 0)
Unit:GossipMenuAddItem(2, "|cFF008000Ethereal Credit X50", 13376, 0)
Unit:GossipSendMenu(player)
end
if (intid == 2) then
Unit:GossipCreateMenu(98, player, 0)
Unit:GossipMenuAddItem(2, "|cffffff00Warsong gulch marks X1 for 10 Credits", 13377, 0)
Unit:GossipMenuAddItem(2, "|cffffff00Warsong gulch marks X3 for 30 Credits", 13378, 0)
Unit:GossipMenuAddItem(2, "|cffffff00Warsong gulch marks X5 for 50 Credits", 13379, 0)
Unit:GossipMenuAddItem(2, "|cffffff00Swift Spectral Tiger for 500 Credits", 133710, 0)
Unit:GossipMenuAddItem(2, "|cffffff00Murloc Suit for 250 Credits", 133711, 0)
Unit:GossipMenuAddItem(2, "|cffffff00Picnic Basket for 100 Credits", 133712, 0)
Unit:GossipSendMenu(player)
end
if (intid == 3) then
Unit:GossipCreateMenu(97, player, 0)
unit:GossipMenuAddItem(0, "|cFFFFD700!Coming Soon!", 21, 0)
Unit:GossipSendMenu(player)
end
if (intid == 13371) and (player:GetItemCount(19712) < 1) then
player:SendAreaTriggerMessage("You need 1 Purple Bijou for this item!!")
player:GossipComplete()
else
player:RemoveItem(19712, 1)
player:AddItem( 38186, 1)
player:GossipComplete()
end
if (intid == 13372) and (player:GetItemCount(19712) < 3) then
player:SendAreaTriggerMessage("You need 3 Purple Bijou for this item!")
player:GossipComplete()
else
player:RemoveItem(19712, 3)
player:AddItem( 38186, 3)
player:GossipComplete()
end
if (intid == 13373) and (player:GetItemCount(19712) < 5) then
player:SendAreaTriggerMessage("You need 5 Purple Bijou for this item!")
player:GossipComplete()
else
player:RemoveItem(19712, 5)
player:AddItem( 38186, 5)
player:GossipComplete()
end
if (intid == 13374) and (player:GetItemCount(19712) < 10) then
player:SendAreaTriggerMessage("You need 10 Purple Bijou for this item!")
player:GossipComplete()
else
player:RemoveItem(19712, 10)
player:AddItem( 38186, 10)
player:GossipComplete()
end
if (intid == 13375) and (player:GetItemCount(19712) < 20) then
player:SendAreaTriggerMessage("You need 20 Purple Bijou for this item!")
player:GossipComplete()
else
player:RemoveItem(19712, 20)
player:AddItem( 38186, 20)
player:GossipComplete()
end
if (intid == 13376) and (player:GetItemCount(19712) < 50) then
player:SendAreaTriggerMessage("You need 50 Purple Bijou for this item!")
player:GossipComplete()
else
player:RemoveItem(19712, 50)
player:AddItem( 38186, 1)
player:GossipComplete()
end
if (intid == 13377) and (player:GetItemCount(38186) < 10) then
player:SendAreaTriggerMessage("You need 10 Ethereal Credits for this item!")
player:GossipComplete()
else
player:RemoveItem(38186, 10)
player:AddItem( 20558, 1)
player:GossipComplete()
end
if (intid == 13378) and (player:GetItemCount(38186) < 30) then
player:SendAreaTriggerMessage("You need 30 Ethereal Credits for this item!")
player:GossipComplete()
else
player:RemoveItem(38186, 30)
player:AddItem( 20558, 3)
player:GossipComplete()
end
if (intid == 13379) and (player:GetItemCount(38186) < 50) then
player:SendAreaTriggerMessage("You need 50 Ethereal Credits for this item!")
player:GossipComplete()
else
player:RemoveItem(38186, 50)
player:AddItem( 20558, 5)
player:GossipComplete()
end
if (intid == 133710) and (player:GetItemCount(38186) < 500) then
player:SendAreaTriggerMessage("You need 500 Ethereal Credits for this item!")
player:GossipComplete()
else
player:RemoveItem(38186, 500)
player:AddItem( 33225, 1)
player:GossipComplete()
end
if (intid == 133711) and (player:GetItemCount(38186) < 250) then
player:SendAreaTriggerMessage("You need 250 Ethereal Credits for this item!")
player:GossipComplete()
else
player:RemoveItem(38186, 250)
player:AddItem( 33079, 1)
player:GossipComplete()
end
if (intid == 133712) and (player:GetItemCount(38186) < 100) then
player:SendAreaTriggerMessage("You need 100 Ethereal Credits for this item!")
player:GossipComplete()
else
player:RemoveItem(38186, 100)
player:AddItem( 34480, 1)
player:GossipComplete()
end
end
-- You mgiht have to add another end here.
RegisterUnitGossipEvent(5009010, 1, "On_Gossip_Menu")
RegisterUnitGossipEvent(5009010, 2, "On_Gossip_Menu_select")