-- 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
LUA:-- 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
I think this should work.. Havent tested it since im on a mac.
Need to fill in the missing item ids tho![]()
-- config --
local platinum_coin = 2152 -- 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
<!-- Change gold -->
<action itemid="2148" event="script" value="other/SCRIPT_NAME.lua"/>
<action itemid="2152" event="script" value="other/SCRIPT_NAME.lua"/>
<action itemid="2160" event="script" value="other/SCRIPT_NAME.lua"/>
<action itemid="GOLDENNUGGETID"event="script" value="other/SCRIPT_NAME.lua"/>