Your browser does not support JavaScript or its disabled!
Please turn it on, or be aware that some features on this website will not work correctly.
1.4K
Find Teleport - vBot extension #89
This allows you to add a "Find teleport" button inside the bot.
To install see my Auto extension loader code here
File: find_teleport.lua | 1.08kb | 37 lines.
 --[[
  Script made by Lee (Discord: l33_) - www.trainorcreations.com
  If you want to support my work, feel free to donate at https://trainorcreations.com/donate
  PS. Stop ripping off my work and selling it as your own.
 ]]--
CaveBot.Extensions.Teleport = {}

CaveBot.registerAction("Teleport", "#00FFFF", function(value, retries, prev)
  -- find teleport nearby
  local data = string.split(value, ",")

  if #data ~= 2 then
    warn("wrong format, should be: item, maxdistance")
    return false
  end

  local itemId = tonumber(data[1])
  local dist = tonumber(data[2])

  for _, tile in ipairs(g_map.getTiles(posz())) do
    if getDistanceBetween(pos(), tile:getPosition()) <= dist then
      for _, item in ipairs(tile:getItems()) do
        if item:getId() == itemId then
          if autoWalk(tile:getPosition(), 10, { ignoreNonPathable = true}) then
            CaveBot.delay(1000)
            return true
          end
        end
      end
    end
  end
  return "retry"
end)

CaveBot.Extensions.Teleport.setup = function()
  CaveBot.Editor.registerAction("teleport", "find teleport", {
    value=function() return 1949 ..','..3 end,
    title="Find Teleport",
    description="Finds item x distance from character and stands on it. item,maxdistance",
    multiline=false,
  })
end

02 Apr 2022
Ads