Acrenactive
★Designer★
Hey Everyone!
I had problems with make 100 crystal coin to 1 ingot so i made a thread in support, i got many answers, but none of the script helped for me. (big thanks to @Zothion , He really did try to help me,
but the script not worked.
So I spent time to solve my problem and I did so I have chosen to share the script with everyone.
It is based on the original script but I have added gold ingot works
-----------------------------------------------------------------------------
Gold ingot id: 9971 <<< you can change this id
100 crystal coin to 1 gold ingot.
I had problems with make 100 crystal coin to 1 ingot so i made a thread in support, i got many answers, but none of the script helped for me. (big thanks to @Zothion , He really did try to help me,
but the script not worked.
So I spent time to solve my problem and I did so I have chosen to share the script with everyone.
It is based on the original script but I have added gold ingot works
-----------------------------------------------------------------------------
Gold ingot id: 9971 <<< you can change this id
100 crystal coin to 1 gold ingot.
Actions.xml
search
and add under this
Replace this script in changegold
data\actions\scripts\other\changegold
search
Code:
<!-- Gold -->
<action itemid="2148" script="other/changegold.lua" />
<action itemid="2152" script="other/changegold.lua" />
<action itemid="2160" script="other/changegold.lua" />
and add under this
Code:
<action itemid="9971" script="other/changegold.lua" />
Replace this script in changegold
data\actions\scripts\other\changegold
Code:
local items = {
[ITEM_GOLD_COIN] = {to = ITEM_PLATINUM_COIN},
[ITEM_PLATINUM_COIN] = {from = ITEM_GOLD_COIN, to = ITEM_CRYSTAL_COIN},
[ITEM_CRYSTAL_COIN] = {from = ITEM_PLATINUM_COIN, to = 9971},
[9971] = {from = ITEM_CRYSTAL_COIN},
}
function onUse(cid, item, fromPosition, itemEx, toPosition, isHotkey)
local coin = items[item.itemid]
if coin then
if(item.type == 100 and coin.to ~= nil)then
Item(item.uid):remove()
Player(cid):addItem(coin.to, 1)
elseif(coin.from ~= nil)then
Item(item.uid):remove(1)
Player(cid):addItem(coin.from, 100)
end
end
return true
end