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.
847
Cap Check - vBot extension #111
This allows you to add a "capacity check" button inside the bot.
To install see my Auto extension loader code here
File: cap_check.lua | 772b | 27 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.checkCapacity = {}

CaveBot.registerAction("capacity", "#FF0090", function(value, retries)
  local data = string.split(value, ",")
  if #data ~= 2 then
   warn("wrong format, should be: amount, Label")
   return false
  end

  local capAmount = tonumber(data[1])
  local triggerLabel = data[2]:trim()

  if freecap() < capAmount then
    print("CaveBot[CapCheck]: capacity ".. capAmount.." reached, proceeding to label "..triggerLabel)
    CaveBot.gotoLabel(triggerLabel)
  end
  return true
end)

CaveBot.Extensions.checkCapacity.setup = function()
  CaveBot.Editor.registerAction("capacity", "capacity", {
    value="150, goTown",
    title="Capacity",
    description="trigger capacity, label",
    multiline=false,
  })
end

12 Jul 2023
Ads