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
To install see my Auto extension loader code here
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
- remove | + add
02 Apr 2022