View Full Version : Request - Reconnect open bps all bps in main bp
Once the reconect, would be cool having a script that actually opens all the backpacks/containers you have in the order of your main backpack.
:)
leux10
04-21-2016, 06:33 AM
Ive been looking for this too. OXtools is outdated and dont work for me.
Like 1-2 years ago when i botted (just started again) then there were perfect lua scripts that reconnected once outlogged (server safe etc.) and opened bps. Now i cant find a single one on this forum.
slaweksor
04-27-2016, 06:59 PM
when i played i used this shit
local LootBp1 = 'Orange Backpack'
local LootBp2 = 'Purple Backpack'
local StackBp = 'Green Backpack'
local GoldBp = 'Grey Backpack'
local numberOfBackpacks = 5
Module('Alarm Containers', function(mod)
if #Container.GetAll() < numberOfBackpacks and Self.isInPz() == false then
alert()
print('Containers fucked up, stopping to reset BPs')
setWalkerEnabled(false)
Targeting.Stop()
Looter.Stop()
Self.CloseContainers()
Self.OpenMainBackpack(true):OpenChildren({GoldBp, true},{StackBp, false},{LootBp1, false},{LootBp2, false})
wait(200, 500)
setWalkerEnabled(true)
Targeting.Start()
Looter.Start()
end
mod:Delay(2000)
end)
Oscagi
04-27-2016, 09:57 PM
when i played i used this shit
local LootBp1 = 'Orange Backpack'
local LootBp2 = 'Purple Backpack'
local StackBp = 'Green Backpack'
local GoldBp = 'Grey Backpack'
local numberOfBackpacks = 5
Module('Alarm Containers', function(mod)
if #Container.GetAll() < numberOfBackpacks and Self.isInPz() == false then
alert()
print('Containers fucked up, stopping to reset BPs')
setWalkerEnabled(false)
Targeting.Stop()
Looter.Stop()
Self.CloseContainers()
Self.OpenMainBackpack(true):OpenChildren({GoldBp, true},{StackBp, false},{LootBp1, false},{LootBp2, false})
wait(200, 500)
setWalkerEnabled(true)
Targeting.Start()
Looter.Start()
end
mod:Delay(2000)
end)
You can change:
setWalkerEnabled(false)
Targeting.Stop()
Looter.Stop()
For :
Cavebot.Stop() / Cavebot.Start()
More easy. :>
mikjail
08-22-2016, 08:18 PM
You can change:
setWalkerEnabled(false)
Targeting.Stop()
Looter.Stop()
For :
Cavebot.Stop() / Cavebot.Start()
More easy. :>
But it work?
Zingron
08-22-2016, 08:23 PM
Or you can use Walker.Delay()
-- Backpack Configuration:
local MainBP = "Jewelled Backpack" --- Main Backpack (On your equipment slot)
local LootBP = "Fur Backpack" --- Backpack for loot
local SuppliesBP = "Red Backpack" --- Backpack for supplies
local AmmoBP = "Blue Backpack" --- Backpack for ammunition
local NumBackpacks = 4 --- Number of total backpacks open
Module.New('OpenContainers', function(BpMod)
if #Container.GetAll() < NumBackpacks then
Walker.Delay(6000)
print("Opening Backpacks...")
Self.CloseContainers()
Self.OpenMainBackpack(true):OpenChildren({LootBP, true},{SuppliesBP, true},{AmmoBP, true})
wait(200, 500)
end
BpMod:Delay(1000)
end)
mikjail
08-22-2016, 09:01 PM
Or you can use Walker.Delay()
-- Backpack Configuration:
local MainBP = "Jewelled Backpack" --- Main Backpack (On your equipment slot)
local LootBP = "Fur Backpack" --- Backpack for loot
local SuppliesBP = "Red Backpack" --- Backpack for supplies
local AmmoBP = "Blue Backpack" --- Backpack for ammunition
local NumBackpacks = 4 --- Number of total backpacks open
Module.New('OpenContainers', function(BpMod)
if #Container.GetAll() < NumBackpacks then
Walker.Delay(6000)
print("Opening Backpacks...")
Self.CloseContainers()
Self.OpenMainBackpack(true):OpenChildren({LootBP, true},{SuppliesBP, true},{AmmoBP, true})
wait(200, 500)
end
BpMod:Delay(1000)
end)
What #Container.GetAll() means?
Zingron
08-22-2016, 09:10 PM
Container.GetAll()
is a function that returns any containers you currently have open.
#
is a length operator in lua
So when you put it all together as #Container.GetAll() it will return the number of backpacks you have open, it then compares this number to the variable NumBackpacks to see if the returned value is less than the value of NumBackpacks. If it is less then it will execute the code inside the if statement, thus opening all the backpacks.
mikjail
08-22-2016, 09:25 PM
Container.GetAll()
is a function that returns any containers you currently have open.
#
is a length operator in lua
So when you put it all together as #Container.GetAll() it will return the number of backpacks you have open, it then compares this number to the variable NumBackpacks to see if the returned value is less than the value of NumBackpacks. If it is less then it will execute the code inside the if statement, thus opening all the backpacks.
You are the men! but what if I have a labelName == ResetBps it will execute anyways even if I have this module? or can I just leave the module instead of having elseif for resseting the bps?
mikjail
08-22-2016, 09:37 PM
Oh I got it, the labelName == ResetBps must bee in the code otherwise there will bee not free slot to put gold or loot if is the case.
Sorry for that stupid question haha
Zingron
How i need to make it with labelName==ResetBps cuz i dont get it :<
Ierttw
09-04-2021, 05:07 PM
Very nice, thank you. https://mmbot.online/
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.