Everyone who has never used our Bots before, can test each one for 2 days without any limitation.
The trial is given automatically when you login on the Bot, but in some cases it wouldn't work (security reasons).
If this happens, send me a private message and i will be checking the failed trials manually and adding it for those who didn't get it.
We are looking for resellers who may accept payment methods different from ours, including classictibia's cash, realesta's cash, mastercores' cash, etc. Interested? Click here at anytime.



Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Change gold with item
#1
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
Reply

#2
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
Reply

#3
|Only Registered members can see download links. | Click here to buy subscription or here to register.
How do i get the item id
Reply

#4
|Only Registered members can see download links. | Click here to buy subscription or here to register.
Reply

#5
|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
Reply

#6
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

If you have different gold changers then add it to the list. The script will check for each one
local GOLD_CONVERTERS_IDS = { 1234, 4321, 99999 } -- Gold converters ids. If you have different gold changers then add it to the list.

local GOLD_CONVERTER_ID = 0
for _, gcId in ipairs(GOLD_CONVERTERS_IDS) do
    if itemcount(gcId) > 0 then
        GOLD_CONVERTER_ID = gcId
        break
    end
end

if GOLD_CONVERTER_ID > 0 then
    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
end
Reply



Forum Jump:



Forum software by © MyBB Theme © iAndrew 2016