Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --### Dehan's Depot Boxes Depositer v1.0.0 ###
- --### Modified by Strahowski to not use looting ###--
- --### Modification inspired by Garkstal inf depositer ###--
- local lootingBp = "Orange backpack"
- local nonstackableNumber = 7
- local stackableNumber = 8
- local ignore = {"gold coin", "platinum coin"} -- Will not move these items
- -- Do not edit anything below this line
- for i=1, #ignore do
- ignore[i] = itemid(ignore[i])
- end
- --[[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
- print("Bp opened, opening depot")
- while windowcount("Depot Chest") == 0 do
- opendepot(true)
- wait(300)
- openitem(3502)
- wait(500)
- end
- print("depot opened, onwards")
- local depotId = 22796
- local stackableId = depotId + stackableNumber
- local nonstackableId = depotId + nonstackableNumber
- local cont = getcontainer(lootingBp)
- while windowcount(cont.name) > 0 do
- local j = 1
- for i=1, cont.itemcount do
- local info = iteminfo(cont.item[j].id)
- print(info)
- print(info.iscontainer)
- if not info.iscontainer and not table.find(ignore, info.id) then
- if info.iscumulative then
- --
- moveitemsonto(info.id, stackableId, 1, 'depot chest', lootingBp, 100)
- waitping()
- else
- --
- moveitemsonto(info.id, nonstackableId, 1, 'depot chest', lootingBp, 100)
- waitping()
- end
- else
- j = j + 1
- end
- 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(ignore, getcontainer(name).item[i].id) then
- val = true
- break
- end
- end
- return val
- end
- if not isItemIn(lootingBp) then
- if itemcount(lootingBp, lootingBp) > 0 then
- openitem(lootingBp, lootingBp, false)
- wait(300, 400)
- else
- closewindows(lootingBp)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement