In my Canary Server, protocol 14.12, using OTClient Redemption, I can't change gold with only right click, if i use right click, 100 gold coins put in mode use with and I have to left click to convert. In all others OT i only have to right click. With OTClient is a problem for bot, not converts 100 gp with the exchange money option. And with macros to use with is a problem because not full all the container of backpack. Why dont complete to 100 gp the first backpack? Im desesperate

Here is the changegold.lua code:
local config = {
[ITEM_GOLD_COIN] = { changeTo = ITEM_PLATINUM_COIN },
[ITEM_PLATINUM_COIN] = { changeBack = ITEM_GOLD_COIN, changeTo = ITEM_CRYSTAL_COIN },
[ITEM_CRYSTAL_COIN] = { changeBack = ITEM_PLATINUM_COIN },
}
local changeGold = Action()
function changeGold.onUse(player, item, fromPosition, target, toPosition, isHotkey)
local coin = config[item:getId()]
if coin.changeTo and item.type == 100 then
item:remove()
player:addItem(coin.changeTo, 1)
return true
elseif coin.changeBack then
item:remove(1)
player:addItem(coin.changeBack, 100)
return true
end
return false
end
changeGold:id(ITEM_GOLD_COIN, ITEM_PLATINUM_COIN, ITEM_CRYSTAL_COIN)
changeGold:register()
And GoldConverter.lua:
local config = {
[ITEM_GOLD_COIN] = { changeTo = ITEM_PLATINUM_COIN },
[ITEM_PLATINUM_COIN] = { changeBack = ITEM_GOLD_COIN, changeTo = ITEM_CRYSTAL_COIN },
[ITEM_CRYSTAL_COIN] = { changeBack = ITEM_PLATINUM_COIN },
}
local goldConverter = Action()
function goldConverter.onUse(player, item, fromPosition, target, toPosition, isHotkey)
local coin = config[target.itemid]
if not coin then
return false
end
local charges = item:getCharges()
if coin.changeTo and target.type == 100 then
target:remove()
player:addItem(coin.changeTo, 1)
item:transform(item:getId(), charges - 1)
elseif coin.changeBack then
target:transform(target.itemid, target.type - 1)
player:addItem(coin.changeBack, 100)
item:transform(item:getId(), charges - 1)
else
return false
end
if charges == 0 then
item:remove()
end
return true
end
goldConverter:id(23722, 25719)
goldConverter:register()

Post automatically merged:
Here is the changegold.lua code:
local config = {
[ITEM_GOLD_COIN] = { changeTo = ITEM_PLATINUM_COIN },
[ITEM_PLATINUM_COIN] = { changeBack = ITEM_GOLD_COIN, changeTo = ITEM_CRYSTAL_COIN },
[ITEM_CRYSTAL_COIN] = { changeBack = ITEM_PLATINUM_COIN },
}
local changeGold = Action()
function changeGold.onUse(player, item, fromPosition, target, toPosition, isHotkey)
local coin = config[item:getId()]
if coin.changeTo and item.type == 100 then
item:remove()
player:addItem(coin.changeTo, 1)
return true
elseif coin.changeBack then
item:remove(1)
player:addItem(coin.changeBack, 100)
return true
end
return false
end
changeGold:id(ITEM_GOLD_COIN, ITEM_PLATINUM_COIN, ITEM_CRYSTAL_COIN)
changeGold:register()
And GoldConverter.lua:
local config = {
[ITEM_GOLD_COIN] = { changeTo = ITEM_PLATINUM_COIN },
[ITEM_PLATINUM_COIN] = { changeBack = ITEM_GOLD_COIN, changeTo = ITEM_CRYSTAL_COIN },
[ITEM_CRYSTAL_COIN] = { changeBack = ITEM_PLATINUM_COIN },
}
local goldConverter = Action()
function goldConverter.onUse(player, item, fromPosition, target, toPosition, isHotkey)
local coin = config[target.itemid]
if not coin then
return false
end
local charges = item:getCharges()
if coin.changeTo and target.type == 100 then
target:remove()
player:addItem(coin.changeTo, 1)
item:transform(item:getId(), charges - 1)
elseif coin.changeBack then
target:transform(target.itemid, target.type - 1)
player:addItem(coin.changeBack, 100)
item:transform(item:getId(), charges - 1)
else
return false
end
if charges == 0 then
item:remove()
end
return true
end
goldConverter:id(23722, 25719)
goldConverter:register()
