PDA

View Full Version : Reconnecter with backpacks?



alehopper
12-16-2015, 04:39 AM
ok so now that we have oxtools we can reconnect all the time in server save etc
but my question is, how do we open the backpacks at login? i cant find any script for it
my char died yesterday because of reconnect and backpacks didn't open so would be great if i could fix this xD

i know it auto opens in the official xenobot scripts but for our own scriptss? we, the noobs, rly need help with scriping using all the new stuffs u added into this binary update.

Aristeus
12-17-2015, 08:07 AM
ok so now that we have oxtools we can reconnect all the time in server save etc
but my question is, how do we open the backpacks at login? i cant find any script for it
my char died yesterday because of reconnect and backpacks didn't open so would be great if i could fix this xD

i know it auto opens in the official xenobot scripts but for our own scriptss? we, the noobs, rly need help with scriping using all the new stuffs u added into this binary update.

You'll need to make a module that checks if your backpacks are open and if they aren't it will open the them. All my hunting scripts use modules that do this.

alehopper
12-17-2015, 11:27 AM
kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk kkkkkkkkkkkkkkkkkkkkkk ur lib is fking anti steal shit LOOOOL
very easy ty i go buy windbot only for that feature then 1 search instantly gave me multiple hits there unlike this dead forum that contains 0

shadowart
12-17-2015, 11:40 AM
kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk kkkkkkkkkkkkkkkkkkkkkk ur lib is fking anti steal shit LOOOOL
very easy ty i go buy windbot only for that feature then 1 search instantly gave me multiple hits there unlike this dead forum that contains 0
This used to be stickied before the forum wipe, written by Furpan.

local Reset_Amount = 2 -- amounts of backpacks to open (must be sorted first to last to open, inside main backpack)
local Offline_Time = 1 -- increase this is it resets at random points meanwhile online

function Self.isOffline()
local s = os.clock()
wait(200)
getSelfID()
if ((os.clock() - s) > Offline_Time) then
return true
end
end

function OpenBackpacks(amount)
Cavebot.Stop()
Self.CloseContainers()
Self.OpenMainBackpack(true)
wait(500 + Self.Ping())
if #Container.GetAll() == 1 then
for slot, item in Container.GetFirst():iItems() do
if Item.isContainer(item.id) then
Container.GetFirst():UseItem(slot, false)
wait(500 + Self.Ping())
Container.GetLast():Minimize()
wait(100 + Self.Ping())
end
if #Container.GetAll() == amount then break end
end
end
if #Container.GetAll() ~= amount then
print('Backpack reset not complete, recursing.')
OpenBackpacks(amount)
end
Cavebot.Start()
end

Module.New('BP_RESET', function()
if Self.isOffline() then OpenBackpacks(Reset_Amount) end
end)

alehopper
01-01-2016, 06:25 AM
This used to be stickied before the forum wipe, written by Furpan.

local Reset_Amount = 2 -- amounts of backpacks to open (must be sorted first to last to open, inside main backpack)
local Offline_Time = 1 -- increase this is it resets at random points meanwhile online

function Self.isOffline()
local s = os.clock()
wait(200)
getSelfID()
if ((os.clock() - s) > Offline_Time) then
return true
end
end

function OpenBackpacks(amount)
Cavebot.Stop()
Self.CloseContainers()
Self.OpenMainBackpack(true)
wait(500 + Self.Ping())
if #Container.GetAll() == 1 then
for slot, item in Container.GetFirst():iItems() do
if Item.isContainer(item.id) then
Container.GetFirst():UseItem(slot, false)
wait(500 + Self.Ping())
Container.GetLast():Minimize()
wait(100 + Self.Ping())
end
if #Container.GetAll() == amount then break end
end
end
if #Container.GetAll() ~= amount then
print('Backpack reset not complete, recursing.')
OpenBackpacks(amount)
end
Cavebot.Start()
end

Module.New('BP_RESET', function()
if Self.isOffline() then OpenBackpacks(Reset_Amount) end
end)



Thanks man. Been using ever since u posted but sometimes it bugs out, not sure what causes it. i thought it was looting but its disaabled when u log in.

obviously best would be such a "bp listener" like xenobot offical scripts has but maybe thats too hard to add? ive been trying messing around with it but their script is way too complicated for me :T
i managed to get it kinda working but its super messy solution and idk if i fckd something up so im scared it will do something really stupid and get me banned

and after using that other bot, i see xenobot also has many advantages over it but still some the other bot has perks too. i will stick with xeno. it works great just needs to fix this reconnecter so its good

saweh
01-11-2016, 05:05 PM
This used to be stickied before the forum wipe, written by Furpan.

local Reset_Amount = 2 -- amounts of backpacks to open (must be sorted first to last to open, inside main backpack)
local Offline_Time = 1 -- increase this is it resets at random points meanwhile online

function Self.isOffline()
local s = os.clock()
wait(200)
getSelfID()
if ((os.clock() - s) > Offline_Time) then
return true
end
end

function OpenBackpacks(amount)
Cavebot.Stop()
Self.CloseContainers()
Self.OpenMainBackpack(true)
wait(500 + Self.Ping())
if #Container.GetAll() == 1 then
for slot, item in Container.GetFirst():iItems() do
if Item.isContainer(item.id) then
Container.GetFirst():UseItem(slot, false)
wait(500 + Self.Ping())
Container.GetLast():Minimize()
wait(100 + Self.Ping())
end
if #Container.GetAll() == amount then break end
end
end
if #Container.GetAll() ~= amount then
print('Backpack reset not complete, recursing.')
OpenBackpacks(amount)
end
Cavebot.Start()
end

Module.New('BP_RESET', function()
if Self.isOffline() then OpenBackpacks(Reset_Amount) end
end)


Is there a way to make this script without the reconect function and add the script to a label? So the bot opens all my backpacks if he reached the label ? would be damn awesome. My bot sometimes closes 1 or more bps idk how it happens :s