local config = {
cost = 100000, -- Price
item_id = 7590, -- Rune/Potion
}
local name = getItemNameById(7590)
function onUse(cid, item, fromPosition, itemEx, toPosition)
if doPlayerRemoveMoney(cid, config.cost) == TRUE then
if doPlayerAddItem(cid, config.pot, 100) then
doSendMagicEffect(fromPosition, CONST_ME_FIREWORK_BLUE)
doSendAnimatedText(fromPosition, "Comprado", TEXTCOLOR_PURPLE)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "VOcê comprou 100 pots por ".. config.cost .." gold.")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você precisa de ".. config.cost .." gold para comprar 100 pots")
end
return TRUE
end