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.
Exercise Dummy - Ext #100
Allows you to use an exercise wand on a training dummy from the cavebot. (or any other items on something else, searches for item on screen.)
To install see my Auto extension loader code here
1.01kb | 33 lines.
  Script made by Lee (Discord: l33_) -
  If you want to support my work, feel free to donate at
  PS. Stop ripping off my work and selling it as your own.
CaveBot.Extensions.Exercise = {}
CaveBot.registerAction("exercise", "#00FFFF", function(value, retries, prev)
  local data = string.split(value, ",")

  if #data ~= 3 then
    warn("wrong format, should be: dummyId, itemId, maxdistance")
    return false

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

  for _, tile in ipairs(g_map.getTiles(posz())) do
    if getDistanceBetween(pos(), tile:getPosition()) <= dist then
      local item = tile:getTopUseThing()
      if item and item:getId() == dummyId then
        g_game.useInventoryItemWith(itemId, item)
        return true
  return "retry"

CaveBot.Extensions.Exercise.setup = function()
  CaveBot.Editor.registerAction("exercise", "Exercise", {
    value=function() return '1949, 35288, 3' end,
    title="Find Exercise",
    description="Finds item x distance from character and uses item on it. dummy, item,maxdistance",

01 Jul 2022