Benna
Member
- Joined
- Jul 3, 2008
- Messages
- 150
- Reaction score
- 7
Alright so if i right click any stack that's on the floor with etc 100 gold coin, platinum, crystal coin i will receive the changing amount to my main backpack but the money will still be on the floor.
So how do i fix it? This is my current goldchanger action lua.
So how do i fix it? This is my current goldchanger action lua.
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.itemid == ITEM_GOLD_COIN and item.type == ITEMCOUNT_MAX then
doPlayerRemoveItem(cid, ITEM_GOLD_COIN, ITEMCOUNT_MAX)
doPlayerAddItem(cid, ITEM_PLATINUM_COIN, 1)
elseif item.itemid == ITEM_PLATINUM_COIN and item.type == ITEMCOUNT_MAX then
doPlayerRemoveItem(cid, ITEM_PLATINUM_COIN, ITEMCOUNT_MAX)
doPlayerAddItem(cid, ITEM_CRYSTAL_COIN, 1)
elseif item.itemid == ITEM_PLATINUM_COIN and item.type < ITEMCOUNT_MAX then
doPlayerRemoveItem(cid, ITEM_PLATINUM_COIN, 1)
doPlayerAddItem(cid, ITEM_GOLD_COIN, ITEMCOUNT_MAX)
elseif item.itemid == ITEM_CRYSTAL_COIN then
doPlayerRemoveItem(cid, ITEM_CRYSTAL_COIN, 1)
doPlayerAddItem(cid, ITEM_PLATINUM_COIN, ITEMCOUNT_MAX)
else
return FALSE
end
return TRUE
end