• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

OTClient [OTCv8] Gold Coventer?

Svira

Active Member
Joined
Jan 27, 2008
Messages
268
Solutions
11
Reaction score
36
Hello community, I decided to sit down to OTCv8 and see what this miracle is, I have never used it before. I see that it has potential, but I don't understand how the macro works... Can someone provide me with the code that will convert gold into platinum using conventer (usewith)

It works like this:
We check the stack of items Gold 3031 and Platynek 3035, if the stack = 100, we use conventer 7410 on it.

I have this code, but no matter what I do, it either generates an error or doesn't run.

used OTCv8 and Cavebot_1.3

Lua:
local items = {3031, 3035}
local converter = 7410

local function checkItemCount()
    local itemCount = 0

    for _, itemID in ipairs(items) do
        local item = findItem(itemID)
        if item then
            itemCount = itemCount + item:getCount()
        end
    end

    if itemCount == 100 then
         useWith(converter, items[1]) 
    end
end

macro(200, "Converter for Gold", checkItemCount)

if onItemUpdate then
    onItemUpdate(checkItemCount)
end
 
Solution
Solution:


Lua:
local moneyIds = {3031, 3035} -- gold coin, platinium coin
local itemConverter = 7410
macro(1000, "Exchange moneyy", function()
    local containers = g_game.getContainers()
    for index, container in pairs(containers) do
    if not container.lootContainer then -- ignore monster containers
        for i, item in ipairs(container:getItems()) do
        if item:getCount() == 100 then
            for m, moneyId in ipairs(moneyIds) do
            if item:getId() == moneyId then
                return useWith(findItem(itemConverter), item)           
            end
            end
        end
        end
    end
    end
end)
Hello community, I decided to sit down to OTCv8 and see what this miracle is, I have never used it before. I see that it has potential, but I don't understand how the macro works... Can someone provide me with the code that will convert gold into platinum using conventer (usewith)

It works like this:
We check the stack of items Gold 3031 and Platynek 3035, if the stack = 100, we use conventer 7410 on it.

I have this code, but no matter what I do, it either generates an error or doesn't run.

used OTCv8 and Cavebot_1.3

Lua:
local items = {3031, 3035}
local converter = 7410

local function checkItemCount()
    local itemCount = 0

    for _, itemID in ipairs(items) do
        local item = findItem(itemID)
        if item then
            itemCount = itemCount + item:getCount()
        end
    end

    if itemCount == 100 then
         useWith(converter, items[1])
    end
end

macro(200, "Converter for Gold", checkItemCount)

if onItemUpdate then
    onItemUpdate(checkItemCount)
end
this function is built-in
I recommend using the latest vBot
DC otcv8

Join the OTClientV8 Discord Server! (https://discord.gg/feySup6)


1705060208689.png
1705060887079.png
 
Last edited:
Solution:


Lua:
local moneyIds = {3031, 3035} -- gold coin, platinium coin
local itemConverter = 7410
macro(1000, "Exchange moneyy", function()
    local containers = g_game.getContainers()
    for index, container in pairs(containers) do
    if not container.lootContainer then -- ignore monster containers
        for i, item in ipairs(container:getItems()) do
        if item:getCount() == 100 then
            for m, moneyId in ipairs(moneyIds) do
            if item:getId() == moneyId then
                return useWith(findItem(itemConverter), item)           
            end
            end
        end
        end
    end
    end
end)
 
Solution
Back
Top