What is wrong with this depositer action?
Hello people, sup?
Could you help me with this action?
Code:
-- [[ Depositer ]] --
init start
local stackbp, rarebp, bucketbp = stackbp, rarebp, bucketbp
init end
closewindows()
wait(500)
if windowcount(lootbp) == 0 then
while windowcount(lootbp) == 0 do
if windowcount() > 0 then
closewindows()
wait(1000)
end
openitem(0, 'back')
waitping(3,4)
openitem(lootbp, mainbp, false)
waitping(3,4)
resizewindows(0, lootbp)
end
end
while windowcount("Depot chest") == 0 do
opendepot()
end
while windowcount(stackbp) == 0 do
openitem(stackbp, "depot chest", true)
wait(300, 400)
resizewindows(300, stackbp)
while windowcount(stackbp) > 0 and getcontainer(stackbp).emptycount == 0 and itemcount(stackbp, stackbp) > 0 do
openitem(stackbp, stackbp, false)
wait(100, 150)
end
if windowcount(stackbp) > 0 then
resizewindows(0, stackbp)
end
end
while windowcount(rarebp) == 0 do
openitem(rarebp, "depot chest", true)
wait(300, 400)
resizewindows(300, rarebp)
while windowcount(rarebp) > 0 and getcontainer(rarebp).emptycount == 0 and itemcount(rarebp, rarebp) > 0 do
openitem(rarebp, rarebp, false)
wait(100, 150)
end
if windowcount(rarebp) > 0 then
resizewindows(0, rarebp)
end
end
if getuseroption("stones") then
while windowcount(bucketbp) == 0 do
openitem(bucketbp, "depot chest", true)
wait(300, 400)
resizewindows(300, bucketbp)
while windowcount(bucketbp) > 0 and getcontainer(bucketbp).emptycount == 0 and itemcount(bucketbp, bucketbp) > 0 do
openitem(bucketbp, bucketbp, false)
wait(100, 150)
end
if windowcount(bucketbp) > 0 then
resizewindows(0, bucketbp)
end
end
end
local cont = getcontainer(lootbp)
while windowcount(cont.name) > 0 do
local j = 1
for i=1, cont.itemcount do
local info = iteminfo(cont.item[j].id)
if not info.iscontainer and info.id ~= 3035 and info.id ~= 3043 then
if info.iscumulative then
while getcontainer(stackbp).emptycount == 0 and itemcount(stackbp, stackbp) > 0 do
openitem(stackbp, stackbp, false)
wait(200, 300)
end
if getcontainer(stackbp).emptycount > 0 then
moveitems(info.id, stackbp, lootbp, 100)
waitping()
end
else
if info.id ~= 20053 then
while getcontainer(rarebp).emptycount == 0 and itemcount(rarebp, rarebp) > 0 do
openitem(rarebp, rarebp, false)
wait(200, 300)
end
if getcontainer(rarebp).emptycount > 0 then
moveitems(info.id, rarebp, lootbp, 1)
waitping()
end
else
while getcontainer(bucketbp).emptycount == 0 and itemcount(bucketbp, bucketbp) > 0 do
openitem(bucketbp, bucketbp, false)
wait(200, 300)
end
if getcontainer(bucketbp).emptycount > 0 then
moveitems(info.id, bucketbp, lootbp, 1)
waitping()
end
end
end
else
j = j + 1
end
end
local function checkFull(_name)
return windowcount(_name) > 0 and getcontainer(_name).emptycount == 0 and itemcount(_name, _name) == 0
end
if checkFull(stackbp) or checkFull(rarebp) or (getuseroption("stones") and checkFull(bucketbp)) then
__logout = true
printerror("One of the depot backpacks is full, going to logout.")
break
end
local function isItemIn(name)
local val = false
for i=1, getcontainer(name).itemcount do
if not iteminfo(getcontainer(name).item[i].id).iscontainer and not table.find({3043, 3035}, getcontainer(name).item[i].id) then
val = true
break
end
end
return val
end
if not isItemIn(lootbp) then
if itemcount(lootbp, lootbp) > 0 then
openitem(lootbp, lootbp, false)
wait(300, 400)
else
closewindows(lootbp)
end
end
end
My char always try to deposit and this action will be ignored because it claims one of the bps are full and go to logout. But I'm sure that these bps arent full.
I already try to remove this if:
Code:
if checkFull(stackbp) or checkFull(rarebp) or (getuseroption("stones") and checkFull(bucketbp)) then
__logout = true
printerror("One of the depot backpacks is full, going to logout.")
break
end
But nothing happened.
What can I do?
Help me,
Please!!
Thank you :)