This persistent is programmed to work when you are not in zone safe, if you want to configure any specific area edit line 54.
Do not forget to edit the name of the bps Looting > Seetings (line 13 - 17)
--AutoOpenBP
auto(1000)
local useAutoBP = true --check, if use auto open bp
local MinimizeEquip = false
--Checks
local useSupBP = true --check, if use supbp
local useExtraBP = false --check, if use extrabp
local useExtraBP2 = false --check, if use extrabp2
local useLootBP = true --check, if use lootbp
local useGoldBP = true --check, if use goldbp
--Destination
local mainbp = itemname($back.id)
local supplybp = getlootingdestination('suppbp') --check you looting destination, name supbp
local extrabp = getlootingdestination('extrabp') --check you looting destination, name extrabp
local extrabp2 = getlootingdestination('extrabp2') --check you looting destination, name extrabp2
local lootbp = getlootingdestination('lootbp') --check you looting destination, name lootbp
local goldbp = getlootingdestination('goldbp') --check you looting destination, name goldbp
function UseMinimizeEquip()
while windowcount(mainbp) == 0 do
restorewindows('equip')
end
while windowcount(mainbp) == 1 do
minimizewindows('equip')
end
end
function OpenMainBP()
while windowcount(mainbp) == 0 do
pausewalking(2000)
wait(200,400)
closewindows()
openitem(0,'back')
wait(200,400)
pausewalking(0)
resizewindows()
end
end
function OthersBP(BpType)
while windowcount(BpType) == 0 and windowcount(mainbp) == 1 do
pausewalking(2000)
openitem(BpType,mainbp,true)
wait(200,400)
pausewalking(0)
resizewindows()
end
end
if $connected then
if useAutoBP then
if not $pzone then
if MinimizeEquip then
UseMinimizeEquip()
elseif not MinimizeEquip then
restorewindows('equip')
end
OpenMainBP()
if useSupBP and itemcount(supplybp) > 0 then
OthersBP(supplybp)
end
if useExtraBP and itemcount(extrabp) > 0 then
OthersBP(extrabp)
end
if useExtraBP2 and itemcount(extrabp2) > 0 then
OthersBP(extrabp2)
end
if useLootBP and itemcount(lootbp) > 0 then
OthersBP(lootbp)
end
if useGoldBP and itemcount(goldbp) > 0 then
OthersBP(goldbp)
end
end
end
end
-Update: 06/15/2017 --Add check if not Minimize equip then restore equip
06-13-2017, 03:58 PM
downloadkct
Another great action, this bp opener is the best available here on forum, thank you \o/
06-13-2017, 05:57 PM
Cisco
Quote:
Originally Posted by downloadkct
Another great action, this bp opener is the best available here on forum, thank you \o/
--==Update: 06/15/2017 --Add check if not Minimize equip then restore equip==--
Tomorrow I must put another update. I will put options to choose which backpacks to open in certain sections of the cavebot.
Example of how I use ...
- When I'm hunting I always have to open all the backpacks.
- When I am buying potions or ammunition in the city, going hunting, refill, coming back from hunting, I just have to open the essentials which is mainbp, sup bp and bp extras. Because backpack of gold and loot in this case would be useless and one loses of time for the bot abrir and being able to cause deaths in the strongest hunts.
07-06-2017, 07:17 AM
Pilao
i love u
07-06-2017, 09:39 AM
iafondo
Yours is missing some stuff and not working at least for me, this is the one i made and added 2 functions u had, more code but works for me
To see te Listas activate at HUD activehotkeys.lua
Cavebot config (you need to add 1 per option) if i can ill add it later:
-- Auto Open Bps
-- Options
local useAutoBP = true -- check, if use auto open bp
local useMinimizeEquip = true -- check, if minimize equip
-- Checks
local useSupBP = true -- check, if use supbp
local useExtraBP = false -- check, if use extrabp
local useExtraBP2 = false -- check, if use extrabp2
local useLootBP = true -- check, if use lootbp
local useGoldBP = true -- check, if use goldbp
-- Destination, need to add to Cavebot Configs the user option
local mainbp = getuseroption("MainBP") -- check you looting destination, name mainbp
local suppbp = getuseroption("SuppBP") -- check you looting destination, name supbp
local extrabp = getuseroption("ExtraBP") -- check you looting destination, name extrabp
local extrabp2 = getuseroption("ExtraBP2") -- check you looting destination, name extrabp2
local lootbp = getuseroption("LootBP") -- check you looting destination, name lootbp
local goldbp = getuseroption("GoldBP") -- check you looting destination, name goldbp
--------------------------------------------------------------------------------------------
auto(1500,3000)
if not $pzone and useAutoBP and $connected then
if (windowcount(mainbp) ~= 1 or windowcount(goldbp) ~= 1 or windowcount(lootbp) ~= 1 or windowcount(suppbp) ~= 1 or windowcount(extrabp) ~= 1 and useExtraBP or windowcount(extrabp2) ~= 1 and useExtraBP2) then
setsetting('Looting/OpenNextBP', 'no')
if windowcount(mainbp) ~= 1 then
listas("BP Opener - Opening mainbp")
pausewalking(2000)
openitem(mainbp,'back')
waitping() waitping()
resizewindows(0,mainbp)
waitping() waitping()
end
if windowcount(lootbp) ~= 1 and useLootBP then
listas("BP Opener - Opening lootbp")
pausewalking(2000)
openitem(lootbp,mainbp,true)
waitping() waitping()
resizewindows(0,lootbp)
waitping() waitping()
end
if windowcount(suppbp) ~= 1 and useSupBP then
listas("BP Opener - Opening supplybp")
pausewalking(2000)
openitem(suppbp,mainbp,true)
waitping() waitping()
resizewindows(0,supplybp)
waitping() waitping()
end
if windowcount(goldbp) ~= 1 and useGoldBP then
listas("BP Opener - Opening goldbp")
pausewalking(2000)
openitem(goldbp,mainbp,true)
waitping() waitping()
resizewindows(0,goldbp)
waitping() waitping()
end
if windowcount(extrabp) ~= 1 and useExtraBP then
listas("BP Opener - Opening extrabp")
pausewalking(2000)
openitem(extrabp,mainbp,true)
waitping() waitping()
resizewindows(0,extrabp)
waitping() waitping()
end
if windowcount(extrabp2) ~= 1 and useExtraBP2 then
listas("BP Opener - Opening extrabp2")
pausewalking(2000)
openitem(extrabp2,mainbp,true)
waitping() waitping()
resizewindows(0,extrabp2)
waitping() waitping()
end
setsetting('Looting/OpenNextBP', 'yes')
else
listas("BP Opener - BPs Opened")
end
else
listas("Disabled For Depositer")
end
if useMinimizeEquip then
minimizewindows('equip')
end
The function of this persistent is only to open the backpacks.
1- Useroption --> some players do not use, so I put "getlootingdestination()" which is the names you would write in "Looting > Settings > Looting Destinations"
2- listas() --> just a writing to guide what is happening
3- windowcount(mainbp) == 0 or windowcount(mainbp) ~= 1 --> In this case it's the same thing, the two mean even the backpacks are not open.
4- setsetting('Looting/OpenNextBP', 'yes') --> This is option of every script that is done, I could not put this in persistent because in some moments this part would have to be disabled or the whole looting disabled for certain functions like dp.
This issue is resolved with another persistent.
auto(1000)
local Sections = {'Hunt'} --{'Hunt'} or {'Floor 1', 'Floor 2'} or {'City', 'ToCity', 'Hunt'} etc...
if $connected then
if table.find(Sections, $wptsection) then
setsetting('Looting/OpenNextBP', 'yes')
else
setsetting('Looting/OpenNextBP', 'no')
end
end
or desable Looting
auto(1000)
local Sections = {'Hunt'} --{'Hunt'} or {'Floor 1', 'Floor 2'} or {'City', 'ToCity', 'Hunt'} etc...
if $connected then
if table.find(Sections, $wptsection) then
setsetting('Looting/Enabled', 'yes')
else
setsetting('Looting/Enabled', 'no')
end
end
5- wait() or waitping() --> I used "wait()" but if you want "waitping()" just change all "wait()" to "waitping()"
PS -->The problem you should be having is this part, always to open backpacks you put 2 "waitping()" followed this means that your problem should be ping + time to open backpack. Then just increase the "wait()" or put 1 "waitping()"
6- If you are disconnected the persistent you posted will not open the backpacks because you only put them to minimize the "equips" and did not put them to maximize if they are closed.
7- Your "mainbp" opens only if it is the "useroption" backpack, the way I put it in the persistent it opens any backpacks that are like "mainbp"
8- It is a persistence that anyone can use. In the case of your persistent the person would have to have "useroption" and in the part of "open next bp" the person would change some configuration that sometimes at that moment the scripter had it deactivated.
9- But the goal is to serve as backpack opener the rest is personal setting. I can not put personal setup into a persistent serving for several people with different styles. An example I use it so ...my persistent line 54
if table.find({'City'}, $wptsection) and $wptid ~= 006 or
table.find({'Location', 'To Spawn', 'Refill', 'To City', 'City2', 'TrainerOff', 'Hunt'}, $wptsection) then
section City, wptid 006 is my depositing (dehan depot box)