Code:
--[[Emnesia's VIP stone!]]--
--[[Only to be used on Exalted Online's Server(s)!]]--
--[[http://www.exaltedonline.net]]--
function Item_OnUse(item, event, player)
Item_menu(item, player)
end
function Item_menu(item, player)
print "Item Right-Clicked!"
if (player:IsInCombat() == true) then
player:SendAreaTriggerMessage("I wont work before you get out of combat, silly!")
player:SendBroadcastMessage("I wont work before you get out of combat, silly!")
else
item:GossipCreateMenu(3543, player, 0)
item:GossipMenuAddItem(25, "Open my awesome Command Box!", 1, 1)
item:GossipMenuAddItem(25, "Close Me!", 2, 0)
item:GossipMenuAddItem(25, "Remove Ressurection Sickness!", 3, 0)
item:GossipSendMenu(player)
end
end
function Item_OnSelect(item, event, player, id, intid, code)
if (intid == 3) then
player:LearnSpell(15007)
player:UnlearnSpell(15007)
player:SendAreaTriggerMessage("Good as new!")
player:SendBroadcastMessage("Good as new!")
end
and
Code:
RegisterItemGossipEvent(26,1,"Item_OnUse")
RegisterItemGossipEvent(26,2,"Item_OnSelect")