• 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 Crystal Coin to Gold Nugget

bellegast

New Member
Joined
Jun 27, 2021
Messages
2
Reaction score
1
GitHub
bellegast
Hello Tibia-Players!

Im sorry for the newb question, but i didnt find an answer for SinglePlayer-Use while searching.
I just downloaded OTCv8 for Singleplayer-Use on the OT: prestige-imperia.sytes.net

Using Cavebot, Healing etc. with an ease,
the only problem is id like an automatic convertion from 100 Crystal Coins to 1 Gold Nugget (And maybe 100 Nuggets to 1 Ingot)
I dont know how to write a Macro or where to put it, since most of the Threads here are asking as a Server Owner.

Thanks in Advance!
 
LUA:
local mIds = {0000, 1111} -- PUT CRYSTAL COIN/GOLD NUGGET IDS HERE
macro(1000, "Exchange Money 2", function()
  local containers = g_game.getContainers()
  for index, container in pairs(containers) do
    if not container.lootContainer then
      for i, item in ipairs(container:getItems()) do
        if item:getCount() == 100 then
          for m, mId in ipairs(mIds) do
            if item:getId() == mId then
              return g_game.use(item)          
            end
          end
        end
      end
    end
  end
end)
 
Hey Loney, thanks for the fast Reply!
Where may i put your shiny Script to get it to work?

Best Wishes!
Like @Niloahs said, you need to paste the code into Tools - Macro. After that, you'll see a new button below which will trigger it, remember to change IDs.
Also, I did not write the script itself, you can go to always go to file tools.lua (usually located in user's appdata) and check/edit/reference the codes of your bot.
 
LUA:
local mIds = {0000, 1111} -- PUT CRYSTAL COIN/GOLD NUGGET IDS HERE
macro(1000, "Exchange Money 2", function()
  local containers = g_game.getContainers()
  for index, container in pairs(containers) do
    if not container.lootContainer then
      for i, item in ipairs(container:getItems()) do
        if item:getCount() == 100 then
          for m, mId in ipairs(mIds) do
            if item:getId() == mId then
              return g_game.use(item)         
            end
          end
        end
      end
    end
  end
end)
Added in my Tools "Ingame macro editor"
and it worked perfectly, Thank you!
 
Back
Top