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.
![]()
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.
![]()
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.
when i played i used this shit
lua code: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)
Or you can use Walker.Delay()
Code:-- 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)
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.
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