EvoSoft
Is Da Mapper
I found a script for an old TFS version but I can't manage to find one for 1.0 :/
Pleeeez link meeee
Pleeeez link meeee
Its the same, add a constant function in your global.lua to define the itemid, item.xml add the "currency - worth" amount and lastly add the new lines in your changegold.lua file.
ITEM_GOLD_COIN = 2148
ITEM_PLATINUM_COIN = 2152
ITEM_CRYSTAL_COIN = 2160
ITEM_GOLD_NUGGET = 2157
ITEM_BAR_GOLD = 15515
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.itemid == ITEM_GOLD_COIN and item.type == ITEMCOUNT_MAX then
doChangeTypeItem(item.uid, item.type - item.type)
doPlayerAddItem(cid, ITEM_PLATINUM_COIN, 1)
elseif item.itemid == ITEM_PLATINUM_COIN and item.type == ITEMCOUNT_MAX then
doChangeTypeItem(item.uid, item.type - item.type)
doPlayerAddItem(cid, ITEM_CRYSTAL_COIN, 1)
elseif item.itemid == ITEM_PLATINUM_COIN and item.type < ITEMCOUNT_MAX then
doChangeTypeItem(item.uid, item.type - 1)
doPlayerAddItem(cid, ITEM_GOLD_COIN, ITEMCOUNT_MAX)
elseif item.itemid == ITEM_CRYSTAL_COIN and item.type == ITEMCOUNT_MAX then
doChangeTypeItem(item.uid, item.type - item.type)
doPlayerAddItem(cid, ITEM_GOLD_NUGGET, 1)
elseif item.itemid == ITEM_CRYSTAL_COIN and item.type < ITEMCOUNT_MAX then
doChangeTypeItem(item.uid, item.type - 1)
doPlayerAddItem(cid, ITEM_PLATINUM_COIN, ITEMCOUNT_MAX)
elseif item.itemid == ITEM_GOLD_NUGGET and item.type == ITEMCOUNT_MAX then
doChangeTypeItem(item.uid, item.type - item.type)
doPlayerAddItem(cid, ITEM_BAR_GOLD, 1)
elseif item.itemid == ITEM_GOLD_NUGGET and item.type < ITEMCOUNT_MAX then
doChangeTypeItem(item.uid, item.type - 1)
doPlayerAddItem(cid, ITEM_CRYSTAL_COIN, ITEMCOUNT_MAX)
elseif item.itemid == ITEM_BAR_GOLD and item.type < ITEMCOUNT_MAX then
doChangeTypeItem(item.uid, item.type - 1)
doPlayerAddItem(cid, ITEM_GOLD_NUGGET, ITEMCOUNT_MAX)
else
return FALSE
end
return TRUE
end
I did.. it looks like:Okay serach for crystal coin and see if it has some other parameter like currency or smth like that.
<item id="2160" article="a" name="crystal coin">
<attribute key="weight" value="10" />
</item>
ITEM_CRYSTAL_COIN
int32_t Item::getWorth() const
void Game::addMoney(Cylinder* cylinder, uint64_t money, uint32_t flags /*= 0*/)