Everyone who has never used our Bots before, can test each one for 2 days without any limitation. The trial is given automatically when you login on the Bot, but in some cases it wouldn't work (security reasons). If this happens, send me a private message and i will be checking the failed trials manually and adding it for those who didn't get it.
We are looking for resellers who may accept payment methods different from ours, including classictibia's cash, realesta's cash, mastercores' cash, etc. Interested? Click here at anytime.
07-04-2019, 01:17 PM (This post was last modified: 07-04-2019, 01:19 PM by Arkilys.)
Hello.
I'm posting this thread to share common LUA scripts that are useful for specifically Caveboting.
Pay attention where you should use the script. Because some scripts may be require another code to be used Cavebot->LUA Setup, in that case, I will share both.
If find any bug, please, send a private message and i will fix the script.
07-04-2019, 01:17 PM (This post was last modified: 07-04-2019, 02:54 PM by Arkilys.)
Capacity and/or Supply checker
Go to a specific label if cap and/or supply is HIGHER than X.
This script is useful to be used on hunts to check your cap before going to know if you should go another round on the respawn or leave.
I recommend to use this Action after all waypoints that walks around the respawn. So you just need to setup the first waypoint that walks around the respawn as "start", it will go back to "start" if cap is enough and keep hunting.
if cap() >= 100 then
gotolabel('start')
return
end
Supply Checker If you are using "Healer->Open next BP for more supply" then it's not useful, because it will not detect when you have more inside the backpack. Cavebot->LUA Setup
if itemcount(SUPPLY_NAME, SUPPLY_BP) >= SUPPLY_MIN then
gotolabel('start')
return
end
Supply and Capacity Checker If you are using "Healer->Open next BP for more supply" then it's not useful, because it will not detect when you have more inside the backpack. Cavebot->LUA Setup
So it will walk on waypoints 001 to 006 and when it reaches the "007", it will check for your capacity. If it's lower than "100", it will go to waypoint "015 Node", otherwise it will go back to "001 Node 'start'".
07-04-2019, 01:17 PM (This post was last modified: 09-11-2022, 01:30 PM by Arkilys.)
Drop loot inside a container (backpack, bag, etc.)
This script will open the container and drop items inside. If there's no available slot, it will keep opening next containers searching for an available slot.
It's useful on hunts that you wanna have a "loot bag". It will save sometime because you will not need to pickup every item later and it will not look like a botter.
I recommend to keep the container hidden somewhere away from monster respawns, because if a monster dies there or anybody drops any item (like a gold coin) over it, it will not remove the item to open the container.
local ItemsDrop = { 'fish', 'battle shield', 'wooden shield' } -- Items that you wanna drop inside the container.
local BackpackLoot = 'Red Backpack' -- Name or index. Index is recommended. It will drop loots FROM this backpack. If you choose to use name then you MUST NOT have the same kind backpack (even if inside another) on floor.
local DropBagPosition = { X = 12345, Y = 54321, Z = 7 } -- Container's location that you wanna open and drop items inside.
--[[ DON'T EDIT BELOW THIS LINE --]]
--[[ DON'T EDIT BELOW THIS LINE --]]
--[[ CREDITS TO ARKILYS --]]
--[[ DON'T EDIT BELOW THIS LINE --]]
--[[ DON'T EDIT BELOW THIS LINE --]]
if findopenedcontainer == nil then
function findopenedcontainer(lastContainers, currentContainers, openedContainerId)
if currentContainers == nil then
currentContainers = getcontainers()
end
if openedContainerId == nil then
openedContainerId = -1
end
for _, current in ipairs(currentContainers) do
local found = false
for __, last in ipairs(lastContainers) do
if last.index == current.index then
found = true
break
end
end
if found == false and (openedContainerId <= 0 or openedContainerId == current.id) then
return current
end
end
return nil
end
end
if opencontainer == nil then
function opencontainer(id, from, newWindow, tries)
if newWindow == nil then
newWindow = false
end
if tries == nil then
tries = 3
end
local containersBefore = getcontainers()
local openedContainer = nil
for j = 1, tries do
openitem(id, from, newWindow)
wait(800, 1200)
local containersCurrent = getcontainers()
openedContainer = findopenedcontainer(containersBefore, containersCurrent, id)
if openedContainer ~= nil and openedContainer.index >= 0 then
break
end
containersBefore = containersCurrent
end
return openedContainer
end
end
if tempOpenNextContainer == nil then
function tempOpenNextContainer(cont)
local emptyLeft = cont.maxslots - cont.usedslots
while emptyLeft == 0 do
for _, bagItem in ipairs(cont.items) do
if itemhasflags(bagItem.id, 4) then
openitem(bagItem.id, cont.index)
wait(1000)
cont = getcontainer(cont.index)
if cont ~= nil and cont.maxslots ~= nil then
emptyLeft = cont.maxslots - cont.usedslots
break
else
return
end
end
emptyLeft = -1
end
end
if emptyLeft > 0 then
return cont
end
return nil
end
end
local bagContainer = opencontainer(0, ground(DropBagPosition.X, DropBagPosition.Y, DropBagPosition.Z), true)
if bagContainer ~= nil then
bagContainer = tempOpenNextContainer(bagContainer)
if bagContainer ~= nil then
emptyLeft = bagContainer.maxslots - bagContainer.usedslots
if emptyLeft > 0 then
table.id(ItemsDrop)
for i,j in ipairs(ItemsDrop) do
local failCount = 0
while itemcount(j, BackpackLoot) > 0 do
if emptyLeft == 0 then
bagContainer = tempOpenNextContainer(bagContainer)
if bagContainer ~= nil and bagContainer.maxslots ~= nil then
emptyLeft = bagContainer.maxslots - bagContainer.usedslots
end
end
if moveitems(j, bagContainer.index, BackpackLoot, 100) then
wait(300)
emptyLeft = emptyLeft - 1
else
wait(300)
failCount = failCount + 1
if failCount > 3 then
break
end
end
end
end
end
end
end
local ItemsDrop = { 'fish', 'battle shield', 'wooden shield' } -- Items that you wanna drop inside the container.
local BackpackLoot = 'Red Backpack' -- Backpack that you are carrying to keep loots, it will drop FROM this backpack.
local DropBagPosition = { X = 12345, Y = 54321, Z = 7 } -- Container's location that you wanna open and drop items inside.
--[[ DON'T EDIT BELOW THIS LINE --]]
--[[ DON'T EDIT BELOW THIS LINE --]]
--[[ CREDITS TO ARKILYS --]]
--[[ DON'T EDIT BELOW THIS LINE --]]
--[[ DON'T EDIT BELOW THIS LINE --]]
local startWindowsCount = windowcount()
local currentWindowsCount = -1
for i = 0, 5 do
openitem(0, ground(DropBagPosition.X, DropBagPosition.Y, DropBagPosition.Z), true)
wait(1000)
currentWindowsCount = windowcount()
if currentWindowsCount > startWindowsCount then
break
end
end
if currentWindowsCount > startWindowsCount then
table.id(ItemsDrop)
local bagIndex = currentWindowsCount - 1
function tempOpenNextContainer(bagContainer)
local emptyLeft = bagContainer.maxslots - bagContainer.usedslots
while emptyLeft == 0 do
for _, bagItem in ipairs(bagContainer.items) do
if itemhasflags(bagItem.id, 4) then
openitem(bagItem.id, bagContainer.index)
wait(1000)
bagContainer = getcontainer(bagContainer.index)
if bagContainer ~= nil and bagContainer.maxslots ~= nil then
emptyLeft = bagContainer.maxslots - bagContainer.usedslots
break
else
return
end
end
emptyLeft = -1
end
end
if emptyLeft > 0 then
return bagContainer
else
return nil
end
end
local bagContainer = tempOpenNextContainer(getcontainer(bagIndex))
if bagContainer ~= nil and bagContainer.maxslots ~= nil then
emptyLeft = bagContainer.maxslots - bagContainer.usedslots
if emptyLeft > 0 then
for i,j in ipairs(ItemsDrop) do
if table.find(ItemsDrop, j) ~= nil then
while itemcount(j, BackpackLoot) > 0 do
if emptyLeft == 0 then
bagContainer = tempOpenNextContainer(getcontainer(bagContainer.index))
if bagContainer ~= nil and bagContainer.maxslots ~= nil then
emptyLeft = bagContainer.maxslots - bagContainer.usedslots
end
end
moveitems(j, bagContainer.index, BackpackLoot, 100)
wait(300)
emptyLeft = emptyLeft - 1
end
end
end
end
end
end
07-04-2019, 01:18 PM (This post was last modified: 01-02-2020, 02:44 AM by Arkilys.)
Depositer
This script will reach the Locker, open it, open the loots backpack then:
1. Open not stackable backpack and move items FROM your loot backpack to the backpacks that are inside it.
2. Back to loots backpack and open stackable backpack and move items FROM your loot backpack there.
It's useful to make afk scripts.
1. Introduction
This script is very useful for refillers and it will split loots in "stacked" and "non stacked" backpacks. "Stacked"
You will have a single backpack that will be opened and all stackeds will be moved to. "Non Stacked"
You will have a single backpack with 20 backpacks inside that all non stackeds will be moved to.
if windowcount(DEPOSITER_LOOT_MAIN_BP) > DEPOSITER_LOOT_WINCOUNT then
if itemcount(DEPOSITER_LOOT_ITEMS_BP, DEPOSITER_LOOT_MAIN_BP) > 0 then
clearlastonto()
for i = 0, #ITEMS_LOOT do
while itemcount(ITEMS_LOOT[i], CHARACTER_LOOT_BP) > 0 do
moveitemsonto(ITEMS_LOOT[i], DEPOSITER_LOOT_ITEMS_BP, getlastonto(), DEPOSITER_LOOT_MAIN_BP, CHARACTER_LOOT_BP, 100)
wait(500)
end
end
end
higherwindow(DEPOSITER_LOOT_MAIN_BP)
wait(1000)
end
end
if itemcount(DEPOSITER_STACKED_BP, 'Locker') > 0 then
local DEPOSITER_STACKED_WINCOUNT = windowcount(DEPOSITER_STACKED_BP)
local Ammo = {
Name = 'arrow',
MaxAmount = 400,
Price = 2,
Weight = 0.7,
}
local DestinationBP = 'grey backpack'
local TakeFromWindow = 'locker'
if windowcount(DestinationBP) > 0 and windowcount(TakeFromWindow) > 0 then
local AmountToBuy = cap() / Ammo.Weight
if AmountToBuy > Ammo.MaxAmount then
AmountToBuy = Ammo.MaxAmount
end
local platinumsNeeded = math.ceil((Ammo.Price * (AmountToBuy - itemcount(Ammo.Name, true))) / 100) --Platinums to withdraw.
local currentPlatinums = itemcount(2152, DestinationBP, true)
while currentPlatinums < platinumsNeeded and itemcount(2152, TakeFromWindow, false) >= platinumsNeeded do
moveitems(2152, DestinationBP, TakeFromWindow, (platinumsNeeded - currentPlatinums))
wait(500)
currentPlatinums = itemcount(2152, DestinationBP, true)
end
end
if AmountToBuy > 0 then
local currentMoney = gold()
local moneyNeeded = math.ceil(Ammo.Price * AmountToBuy) --Platinums to withdraw.
if currentMoney > moneyNeeded then
say('hi')
wait(800)
say('buy ' .. AmountToBuy .. ' ' .. Ammo.Name)
wait(800)
say('yes')
wait(800)
end
end
end