you need to add an action to reopen your backpacks, since this one just deposit.
Printable View
use this in action before depositerQuote:
-- Open Bps
init start
local mainBp = "Backpack Of Holding" -- change these
local goldBp = "Brocade backpack" -- change these
local lootBp = "Jewelled backpack" -- change these
local supplyBp = "Zaoan chess box" -- change these
init end
setsetting('Looting/OpenNextBP', 'no')
closewindows()
wait(400,600)
while windowcount() < 4 do
closewindows()
openitem(0, "back", true)
wait(800,1200) resizewindows()
wait(500)
openitem(supplyBp, mainBp, true)
wait(800,1200) resizewindows()
wait(500)
openitem(lootBp, mainBp, true)
wait(800,1200) resizewindows()
wait(500)
openitem(goldBp, mainBp, true)
wait(800,1200) resizewindows()
wait(500)
end
setsetting('Looting/OpenNextBP', 'no')
you guys do not understand , an example I have 3 backpacks with full loot going to deposit only the last backpack he deposit he open the first backpack and dont back for deposit the anothers only the last he deposit and go next wpt
ty for helping
Here is what is happening: when your char come back from hunting it has the last backpack opened, so since this code is for depositing and not for reopening your backpacks it will just deposit the last one. You need to add a very simple piede of code to reopen your backpacks and set open next bp as No, só it will start depositing from the first backpack until the last one.
Could not give you REP+ @Dehan but great work!
It helped me alot mate, but I have one question:
Maybe this way of depositing happens to be 'easier' to cip detect bot?
tks good job!
I added the opening backpacks after all and marking the opening of the next backpack.Code:--### Dehan's Depot Boxes Depositer v1.0.0 ###
lootingBp = 'yellow backpack'
nonstackableNumber = 1
stackableNumber = 2
--[[DO NOT EDIT BELOW THIS LINE]]--
setsetting('Looting/OpenNextBP', 'no')
waitping()
closewindows() wait(1500)
while windowcount(lootingBp) == 0 do
closewindows() wait(1000)
openitem($back.id,'back') wait(1000)
openitem(lootingBp,itemname($back.id),true) wait(1000)
resizewindows()
end
while windowcount("Depot Chest") == 0 do
opendepot(true)
wait(300)
openitem(3502)
wait(500)
end
depotId = 22796
stackableId = depotId + stackableNumber
nonstackableId = depotId + nonstackableNumber
while (true) do
foreach lootingitem i do
while itemcount(i.id, lootingBp) > 0 do
if itemproperty(i.id, 5) then
moveitemsonto(i.id, stackableId, 1, 'depot chest', lootingBp, 100)
else
moveitemsonto(i.id, nonstackableId, 1, 'depot chest', lootingBp, 100)
end
end
end
if (itemcount(lootingBp, lootingBp) > 0) then
openitem(lootingBp, lootingBp, false)
waitcontainer(lootingBp, false)
else
break
end
while windowcount(lootingBp) == 0 do
closewindows() wait(1000)
waitping()
openitem($back.id,'back') wait(1000)
openitem(2867,itemname($back.id),true) wait(1000)
resizewindows()
openitem(9602,itemname($back.id),true) wait(1000)
resizewindows()
openitem(2866,itemname($back.id),true) wait(1000)
resizewindows()
openitem(8860,itemname($back.id),true) wait(1000)
resizewindows()
wait(1000)
setsetting('Looting/OpenNextBP', 'yes')
end
break
end
wait(100)
end
I do not know why does not work : D
I am also surprised that translates items with only one backpack.
This should move the two. Merging objects and connecting objects.
@Dehan
How can I change the depositer (in backpacks) of scripts that I have, to this depositer?
well done i try it :)
i fixed it to reopen backpack but know the open the nex backpack go off, and when i go hunting again dont go on again i need something to enable the open next backpack to go full afk
this needs to be sticked
i have a problem, where i must put this scripts?
how to ignore plat coins?
can i separate the loot by type and box? for example blue djiin box 1, blue box 2 etc?
Look at these id
Rashid = {661, 662, 664, 667, 669, 672, 673, 680, 681, 683, 686, 688, 691, 692, 780, 781, 783, 786, 788, 791, 792, 795, 796, 798, 803, 805, 808, 809, 811, 812, 813, 814, 815, 816,817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 2958, 2991, 3002, 3006, 3007, 3008, 3010, 3016, 3017, 3018, 3019, 3025, 3055, 3063, 3290, 3314, 3315,3326, 3327, 3328, 3330, 3332, 3333, 3334, 3339, 3340, 3342, 3344, 3356, 3360, 3364, 3366, 3386, 3397, 3404, 3408, 3414, 3420, 3421, 3435, 3436, 3440, 3441, 3442, 3550, 3554, 3556, 5461, 5710, 5741, 5810, 5917, 5918, 6095, 6096, 6131, 6299, 6553, 7379, 7380, 7381, 7382, 7383, 7384, 7386, 7387, 7388, 7389, 7390, 7392, 7402, 7403, 7404, 7406, 7408, 7414, 7415, 7418, 7422, 7424, 7425, 7426, 7427, 7429, 7430, 7432, 7434, 7437, 7438, 7449, 7452, 7456, 7457, 7460, 7461, 7462, 7463, 7464, 8022, 8027, 8045, 8049, 8050, 8052, 8057, 8061, 8063, 9013, 9014, 9017, 9302, 9303, 9304, 10457, 11674, 16163, 16164, 17828, 17829, 17852}
GreenDJinn = {666, 685, 785, 802, 3045, 3048, 3051, 3052, 3053, 3054, 3065, 3066, 3067, 3069, 3070, 3077, 3078, 3084, 3085, 3097, 3098, 3281, 3297, 3299, 3307, 3318, 3322, 3324, 3369, 3370, 3371, 3373, 3383, 3384, 3428, 3429, 3432, 3434, 3574, 7407, 7411, 7413, 7419, 7421, 7428, 8082, 8083, 8084, 16117, 16118}
BlueDjinn = {660, 674, 679, 693, 779, 793, 794, 810, 3046, 3049, 3050, 3056, 3060, 3061, 3062, 3071, 3072, 3073, 3074, 3075, 3079, 3081, 3082, 3083, 3091, 3092, 3093, 3271,3279,3280, 3284, 3301, 3302, 3313, 3320, 3380, 3381, 3382, 3385, 3391, 3392, 3415, 3416, 3418, 3419, 3439, 3567, 7391, 7410, 7412, 7436, 7451, 7454, 8092, 8093, 8094,16096, 16115}
I'm not sure but I think you could try this...I don't know if it would work
--### Dehan's Depot Boxes Depositer v1.0.0 ###
lootingBp = 'jewelled backpack'
BoxRashid = 1
BoxGreen = 2
BoxBlue = 3
nonstackableNumber = 4
stackableNumber = 5
--[[DO NOT EDIT BELOW THIS LINE]]--
setsetting('Looting/OpenNextBP', 'no')
waitping()
closewindows() wait(1500)
while windowcount(lootingBp) == 0 do
closewindows() wait(1000)
openitem($back.id,'back') wait(1000)
openitem(lootingBp,itemname($back.id),true) wait(1000)
resizewindows()
end
while windowcount("Depot Chest") == 0 do
opendepot(true)
wait(300)
openitem(3502)
wait(500)
end
depotId = 22796
RashidId = depotId + BoxRashid
GreenId = depotId + BoxGreen
BlueId = depotId + BoxBlue
stackableId = depotId + stackableNumber
nonstackableId = depotId + nonstackableNumber
while (true) do
foreach lootingitem i do
while itemcount(i.id, lootingBp) > 0 do
local Rashid = {661, 662, 664, 667, 669, 672, 673, 680, 681, 683, 686, 688, 691, 692, 780, 781, 783, 786, 788, 791, 792, 795, 796, 798, 803, 805, 808, 809, 811, 812, 813, 814, 815, 816,817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 2958, 2991, 3002, 3006, 3007, 3008, 3010, 3016, 3017, 3018, 3019, 3025, 3055, 3063, 3290, 3314, 3315,3326, 3327, 3328, 3330, 3332, 3333, 3334, 3339, 3340, 3342, 3344, 3356, 3360, 3364, 3366, 3386, 3397, 3404, 3408, 3414, 3420, 3421, 3435, 3436, 3440, 3441, 3442, 3550, 3554, 3556, 5461, 5710, 5741, 5810, 5917, 5918, 6095, 6096, 6131, 6299, 6553, 7379, 7380, 7381, 7382, 7383, 7384, 7386, 7387, 7388, 7389, 7390, 7392, 7402, 7403, 7404, 7406, 7408, 7414, 7415, 7418, 7422, 7424, 7425, 7426, 7427, 7429, 7430, 7432, 7434, 7437, 7438, 7449, 7452, 7456, 7457, 7460, 7461, 7462, 7463, 7464, 8022, 8027, 8045, 8049, 8050, 8052, 8057, 8061, 8063, 9013, 9014, 9017, 9302, 9303, 9304, 10457, 11674, 16163, 16164, 17828, 17829, 17852}
local GreenDJinn = {666, 685, 785, 802, 3045, 3048, 3051, 3052, 3053, 3054, 3065, 3066, 3067, 3069, 3070, 3077, 3078, 3084, 3085, 3097, 3098, 3281, 3297, 3299, 3307, 3318, 3322, 3324, 3369, 3370, 3371, 3373, 3383, 3384, 3428, 3429, 3432, 3434, 3574, 7407, 7411, 7413, 7419, 7421, 7428, 8082, 8083, 8084, 16117, 16118}
local BlueDjinn = {660, 674, 679, 693, 779, 793, 794, 810, 3046, 3049, 3050, 3056, 3060, 3061, 3062, 3071, 3072, 3073, 3074, 3075, 3079, 3081, 3082, 3083, 3091, 3092, 3093, 3271,3279,3280, 3284, 3301, 3302, 3313, 3320, 3380, 3381, 3382, 3385, 3391, 3392, 3415, 3416, 3418, 3419, 3439, 3567, 7391, 7410, 7412, 7436, 7451, 7454, 8092, 8093, 8094,16096, 16115}
if itemname(Rashid) then
moveitemsonto(i.id, RashidId, 1, 'depot chest', lootingBp, 100)
elseif itemname(GreenDJinn) then
moveitemsonto(i.id, GreenId, 1, 'depot chest', lootingBp, 100)
elseif itemname(BlueDjinn) then
moveitemsonto(i.id, BlueId, 1, 'depot chest', lootingBp, 100)
else
if itemproperty(i.id, 5) then
moveitemsonto(i.id, stackableId, 1, 'depot chest', lootingBp, 100)
else
moveitemsonto(i.id, nonstackableId, 1, 'depot chest', lootingBp, 100)
end
end
end
end
if (itemcount(lootingBp, lootingBp) > 0) then
openitem(lootingBp, lootingBp, false)
waitcontainer(lootingBp, false)
else
break
end
wait(100)
end
Or use the Shadow action as the Xixico mentioned.
Hello, here it is scirpt with user options + rashid,blue/green djinn sorter:
User Options:
Script:Code:{
"type" : "group",
"name" : "Depot:",
"column" : 2,
"children": [
{
"type" : "combobox",
"name" : "stackitems",
"text" : "Stack Items:",
"items" : ["1 [[item:22797]]","2 [[item:22798]]","3 [[item:22799]]","4 [[item:22800]]","5 [[item:22801]]","6 [[item:22802]]","7 [[item:22803]]","8 [[item:22804]]","9 [[item:22805]]","10 [[item:22806]]","11 [[item:22807]]","12 [[item:22808]]","13 [[item:22809]]","14 [[item:22810]]","15 [[item:22811]]","16 [[item:22812]]","17 [[item:22813]]"]
},
{
"type" : "combobox",
"name" : "nonstackitems",
"text" : "Non-stack Items:",
"items" : ["1 [[item:22797]]","2 [[item:22798]]","3 [[item:22799]]","4 [[item:22800]]","5 [[item:22801]]","6 [[item:22802]]","7 [[item:22803]]","8 [[item:22804]]","9 [[item:22805]]","10 [[item:22806]]","11 [[item:22807]]","12 [[item:22808]]","13 [[item:22809]]","14 [[item:22810]]","15 [[item:22811]]","16 [[item:22812]]","17 [[item:22813]]"]
},
{
"type" : "combobox",
"name" : "rashiditems",
"text" : "RashidItems",
"items" : ["1 [[item:22797]]","2 [[item:22798]]","3 [[item:22799]]","4 [[item:22800]]","5 [[item:22801]]","6 [[item:22802]]","7 [[item:22803]]","8 [[item:22804]]","9 [[item:22805]]","10 [[item:22806]]","11 [[item:22807]]","12 [[item:22808]]","13 [[item:22809]]","14 [[item:22810]]","15 [[item:22811]]","16 [[item:22812]]","17 [[item:22813]]"]
},
{
"type" : "combobox",
"name" : "bluedjin",
"text" : "Blue Dijnn:",
"items" : ["1 [[item:22797]]","2 [[item:22798]]","3 [[item:22799]]","4 [[item:22800]]","5 [[item:22801]]","6 [[item:22802]]","7 [[item:22803]]","8 [[item:22804]]","9 [[item:22805]]","10 [[item:22806]]","11 [[item:22807]]","12 [[item:22808]]","13 [[item:22809]]","14 [[item:22810]]","15 [[item:22811]]","16 [[item:22812]]","17 [[item:22813]]"]
},
{
"type" : "combobox",
"name" : "greendjin",
"text" : "Green Djinn:",
"items" : ["1 [[item:22797]]","2 [[item:22798]]","3 [[item:22799]]","4 [[item:22800]]","5 [[item:22801]]","6 [[item:22802]]","7 [[item:22803]]","8 [[item:22804]]","9 [[item:22805]]","10 [[item:22806]]","11 [[item:22807]]","12 [[item:22808]]","13 [[item:22809]]","14 [[item:22810]]","15 [[item:22811]]","16 [[item:22812]]","17 [[item:22813]]"]
},
{
"type" : "combobox",
"name" : "lootbp",
"text" : "Which loot backpack?",
"items" :
[
"Brown Backpack [[item: brown backpack]]",
"Beach Backpack [[item: beach backpack]]",
"Blue Backpack [[item: blue backpack]]",
"Brocade Backpack [[item: brocade backpack]]",
"Camouflage Backpack [[item: camouflage backpack]]",
"Crown Backpack [[item: crown backpack]]",
"Deepling Backpack [[item: deepling backpack]]",
"Demon Backpack [[item: demon backpack]]",
"Dragon Backpack [[item: dragon backpack]]",
"Fur Backpack [[item: fur backpack]]",
"Golden Backpack [[item: golden backpack]]",
"Green Backpack [[item: green backpack]]",
"Grey Backpack [[item: grey backpack]]",
"Jewelled Backpack [[item: jewelled backpack]]",
"Orange Backpack [[item: orange backpack]]",
"Purple Backpack [[item: purple backpack]]",
"Red Backpack [[item: red backpack]]",
"Yellow Backpack [[item: yellow backpack]]",
"Zaoan chess box [[item: zaoan chess box]]"
]
}
]
}
If someone want i can add one depo more for Yasir items :).Code:--Deposit Items--
lootingBp = getuseroption('lootbp')
nonstackableNumber = getuseroption('stackitems')
stackableNumber = getuseroption('nonstackitems')
rashidnumber = getuseroption('rashiditems')
bluenumber = getuseroption('bluedjin')
greenumer = getuseroption('greendjin')
--[[DO NOT EDIT BELOW THIS LINE]]--
setsetting('Looting/OpenNextBP', 'no')
waitping()
closewindows() wait(1500)
while windowcount(lootingBp) == 0 do
closewindows() wait(1000)
openitem($back.id,'back') wait(1000)
openitem(lootingBp,itemname($back.id),true) wait(1000)
resizewindows()
end
while windowcount("Depot Chest") == 0 do
opendepot(true)
wait(300)
openitem(3502)
wait(500)
end
depotId = 22796
stackableId = depotId + stackableNumber
nonstackableId = depotId + nonstackableNumber
rashidid = depotId + rashidnumber
blueid = depotId + bluenumber
greenid = depotId + greenumer
while (true) do
foreach lootingitem i do
while itemcount(i.id, lootingBp) > 0 do
if table.find(ITEMS_RASHID, i.id) then
moveitemsonto(i.id, rashidid, 1, 'depot chest', lootingBp, 100)
elseif table.find(ITEMS_BLUE_DJINN, i.id) then
moveitemsonto(i.id, blueid, 1, 'depot chest', lootingBp, 100)
elseif table.find(ITEMS_GREEN_DJINN, i.id) then
moveitemsonto(i.id, greenid, 1, 'depot chest', lootingBp, 100)
elseif itemproperty(i.id, 5) then
moveitemsonto(i.id, stackableId, 1, 'depot chest', lootingBp, 100)
else
moveitemsonto(i.id, nonstackableId, 1, 'depot chest', lootingBp, 100)
end
end
end
if (itemcount(lootingBp, lootingBp) > 0) then
openitem(lootingBp, lootingBp, false)
waitcontainer(lootingBp, false)
else
break
end
wait(100)
end
God bless you with a good wife and many children @Dehan , I were actually trying to do a depositer like this one, and while looking help with a action I found that you already did all the work. Much appreciated.
Awesome! Thanks Dehan!
First, thank you for the Amazing Script!
I'm having a little trouble getting it to work passed the first backpack, if anybody could help me out that would be awesome.
I left the code out that closed out the BP's because I have the stackable items put into my gold bp to save space in my lootbp.
I've read through the post where you said that we needed to add a resetter for our lootbp and to turn off the next BP beforehand as well. I'm just not sure where I went wrong with the coding.
Thank you for your help.
KennethFlynn
Code:--### Dehan's Depot Boxes Depositer v1.0.0 ###
--Edited v1.0
lootingBp = 'Orange Backpack'
nonstackableNumber = 7
stackableNumber = 6
--[[DO NOT EDIT BELOW THIS LINE]]--
setsetting('Looting/OpenNextBP', 'no')
waitping()
wait(1500)
restartbackpack('lootbp')
wait(1500)
while windowcount(lootingBp) == 0 do
closewindows() wait(1000)
openitem($back.id,'back') wait(1000)
openitem(lootingBp,itemname($back.id),true) wait(1000)
resizewindows()
end
while windowcount("Depot Chest") == 0 do
opendepot(true)
wait(300)
openitem(3502)
wait(500)
end
depotId = 22796
stackableId = depotId + stackableNumber
nonstackableId = depotId + nonstackableNumber
while (true) do
foreach lootingitem i do
while itemcount(i.id, lootingBp) > 0 and i.id~=3035 do
if itemproperty(i.id, 5) then
moveitemsonto(i.id, stackableId, 1, 'depot chest', lootingBp, 100)
else
moveitemsonto(i.id, nonstackableId, 1, 'depot chest', lootingBp, 100)
end
end
end
if (itemcount(lootingBp, lootingBp) > 0) then
openitem(lootingBp, lootingBp, false)
waitcontainer(lootingBp, false)
else
break
end
wait(100)
end
wait(1000)
setsetting("Looting/OpenNextBP", "yes")
wait(1000)
Hello,
For my needs i changed this script to fit my needs: To pass array of backpacks and deposit all items at once.
Here is my script feel free to use :)
Core Credits @Dehan
In this script i also use my backpacks reseter - it works really well so also feel free to use. It was also core-changing from someone from here, if Ill found from where i got this I'll edit and add credits to author.
Here is the code:
PHP Code:
-----------------------------------------------------------------------------------
-- Restarts backpacks passed in 'backpacks' parameter.
-- param backpacks: array of backpacks names from settings.
-- @example: restart_backpacks({'rare', 'stackable', 'gold', 'supplies'})
function restart_backpacks(backpacks)
local main_backpack
closewindows()
main_backpack = openitem(0, 'back') wait(500,1000)
resizewindows(0, '0') wait(500,1000)
for index, backpack in ipairs(backpacks) do
openitem(getlootingdestination(backpack), main_backpack, true) wait(500,1000)
resizewindows(0, string.format("%s", index)) wait(500,1000)
end
end
-----------------------------------------------------------------------------------
-- Deposits loot items from backpacks passed in 'bp_destination_names' param.
-- param bp_destination_names: array of backpacks names from settings.
-- param stackable: Depot Index for stackables - if not passed function will set 1 as default.
-- param non_stackable: Depot Index for non stackables - if not passed function will set 2 as default.
-- @example: deposit_loot_items({'rare', 'stackable', 'another_backpack'}, 3, 4)
function deposit_loot_items(bp_destination_names, stackable, non_stackable)
local depot_id = 22796
local stackable = stackable or 1
local non_stackable = non_stackable or 2
local stackable_id = depot_id + stackable
local nonstackable_id = depot_id + non_stackable
local settings_backup = getsetting('Looting/OpenNextBP')
-- If OpenNextBP is on turn it off.
setsetting('Looting/OpenNextBP', 'no') waitping()
restart_backpacks(bp_destination_names)
-- Reach and open depot.
while windowcount("Depot Chest") == 0 do
opendepot(true) wait(300)
openitem(3502) wait(500)
end
for _, backpack in ipairs(bp_destination_names) do
-- Retrieve backpack object.
backpack = getlootingdestination(backpack)
while true do
foreach lootingitem item do
-- When found looting object in current backpack move it.
while itemcount(item.id, backpack) > 0 do
chosen_destination = itemproperty(item.id, ITEM_STACKABLE) and stackable_id or nonstackable_id
-- Move items to chosen destination.
moveitemsonto(item.id, chosen_destination, 1, 'depot chest', backpack, 100)
end
end
-- If found cascaded backpack inside - open it.
if (itemcount(backpack, backpack) > 0) then
openitem(backpack, backpack, false)
waitcontainer(backpack, false)
else
break
end
end
end
-- Revert Looting/OpenNextBP settings.
setsetting('Looting/OpenNextBP', settings_backup)
end
i cant make this work on Hexera's Rookgaard depots, can someone help me?
hello?
Hello!
I apologize for reviving this post but really could not find a solution.
I'm using WindBot for TibiaOT (obviously) and am finding it difficult to adapt this script.
Basically, when the script tries to add an item in the depot box without having opened it, the game returns a message saying that the depot is full, something that does not happen if you open the depot box and insert new items.
is it possible to adapt this script to move items to the open depot box ?!
Sorry my bad inglish