Posts: 7
Threads: 2
Joined: Oct 2019
Reputation:
0
I need a gold changer script, to be used in kingdom swap, they have an item which u click with it on the 100 stack gold coin and turns into plat, like a gold converter in irl tibia
Thank you
Posts: 2,006
Threads: 329
Joined: Jul 2018
Reputation:
56
05-13-2022, 03:29 PM
(This post was last modified: 05-13-2022, 03:29 PM by Arkilys.)
Hello.
I think this should work. It will move gold coins to your belt/arrow slot and use gold converter then move platinum coin to a backpack.
local GOLD_CONVERTER_ID = 0 -- Gold converter id.
local PLATINUMS_BP = 'blue backpack' -- Backpack to move platinum coins.
local belt_item = belt()
if itemcount('gold coin', '') >= 100 and (belt_item.id ~= 3031 or (belt_item.id == 3031 and belt_item.count < 100)) then
moveitems('gold coin', 'belt', '', '100')
wait(500, 800)
elseif belt_item.id == 3031 and belt_item.count == 100 then
useitemonitem(GOLD_CONVERTER_ID, 3031, 'belt')
wait(500, 800)
moveitems('gold coin', PLATINUMS_BP, 'belt', '100')
wait(500, 800)
end
Posts: 7
Threads: 2
Joined: Oct 2019
Reputation:
0
(05-13-2022, 03:29 PM)Arkilys Wrote: |Only Registered members can see download links. | Click here to buy subscription or here to register.Hello.
I think this should work. It will move gold coins to your belt/arrow slot and use gold converter then move platinum coin to a backpack.
local GOLD_CONVERTER_ID = 0 -- Gold converter id.
local PLATINUMS_BP = 'blue backpack' -- Backpack to move platinum coins.
local belt_item = belt()
if itemcount('gold coin', '') >= 100 and (belt_item.id ~= 3031 or (belt_item.id == 3031 and belt_item.count < 100)) then
moveitems('gold coin', 'belt', '', '100')
wait(500, 800)
elseif belt_item.id == 3031 and belt_item.count == 100 then
useitemonitem(GOLD_CONVERTER_ID, 3031, 'belt')
wait(500, 800)
moveitems('gold coin', PLATINUMS_BP, 'belt', '100')
wait(500, 800)
end
How do i get the item id
Posts: 2,006
Threads: 329
Joined: Jul 2018
Reputation:
56
|Only Registered members can see download links. | Click here to buy subscription or here to register.
Posts: 7
Threads: 2
Joined: Oct 2019
Reputation:
0
05-14-2022, 11:40 AM
(This post was last modified: 05-14-2022, 12:08 PM by rodrigossl.)
(05-13-2022, 05:03 PM)Arkilys Wrote: |Only Registered members can see download links. | Click here to buy subscription or here to register.|Only Registered members can see download links. | Click here to buy subscription or here to register. it takes too much effort to push and drag to the other bp, can u just make a simpler one where he reads where theres 100 gold coin stack and pushes to the other bp that plat ?
also, how do i remove the simulated hotkeys, its causing me trouble when focused on client, it clicks wrong in map and shit
Posts: 2,006
Threads: 329
Joined: Jul 2018
Reputation:
56
05-14-2022, 04:25 PM
(This post was last modified: 05-14-2022, 04:26 PM by Arkilys.)
Hello.
I may ask you to take care when posting on Forums, to make sure you are posting on right section. Because you posted on Realesta OTBot's section instead of Kasteria OTBot, they look familiar but works bit differently internally and may have differences on its functions according to the server particularities.
I disagree with about effort, since it takes a single movement. But I agree that it could be easier.
I've applied a few changes on LUA function -> useitemonitem(), so it will accept item slot as well, so you can use item id, item name or item index/slot. So you can actually make gold converter to be used on right gold coin stack without moving gold coins to belt and so.
Redownload and reinstall Kasteria OTBot (1.0.25-6), otherwise this will not work. |Only Registered members can see download links. | Click here to buy subscription or here to register.
local GOLD_CONVERTER_ID = 0 -- Gold converter id.
local containers = getcontainers()
for _, cont in ipairs(containers) do
for __, item in ipairs(cont.items) do
if item.id == 3031 and item.count == 100 then
useitemonitem(GOLD_CONVERTER_ID, item.index, cont.index)
wait(500, 800)
return
end
end
end
|