-- config --
local platinum_coin = ? -- The itemid of a platinum coin
local crystal_coin = 3043 -- The itemid of a crystal coin
local golden_nugget = ? -- The itemid of a golden nugget
-- end config --
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.itemid == crystal_coin and item.type == 100 then
doRemoveItem(item.uid, 100)
doPlayerAddItem(cid, golden_nugget, 1)
doSendAnimatedText(playerPos, "$$$", TEXTCOLOR_GOLD)
elseif item.itemid == crystal_coin and item.type < 100 then
doRemoveItem(item.uid, 1)
doPlayerAddItem(cid, platinum_coin, 100)
doSendAnimatedText(playerPos, "$$$", TEXTCOLOR_BLUE)
elseif item.itemid == golden_nugget then
doRemoveItem(item.uid, 1)
doPlayerAddItem(cid, crystal_coin, 100)
doSendAnimatedText(playerPos, "$$$", TEXTCOLOR_BLUE)
end
end