Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- elseif (labelName == "Backpacks") then
- Walker.Stop()
- print("Backpacks")
- Self.CloseContainers()
- repeat
- wait(900)
- until (Self.UseItemFromEquipment("backpack") > 0)
- wait(1000)
- Container.GetFirst():OpenChildren(Item.GetID(LootBp), Item.GetID(ItemsBp), Item.GetID(SupplyBp))
- wait(300)
- Container.GetByName(MainBp):Minimize()
- wait(300)
- Container.GetByName(LootBp):Minimize()
- wait(300)
- Container.GetByName(ItemsBp):Minimize()
- wait(300)
- Container.GetByName(SupplyBp):Minimize()
- wait(300)
- Walker.Start()
- elseif (labelName == "Depositer") then
- --Opening depot & bps
- Walker.Stop()
- Self.ReachDepot()
- wait(500,600)
- Container.GetByName("Locker"):OpenChildren({3502, true}) -- Opens depot chest
- wait(500,600)
- Container.GetByName("Locker"):Close() -- Closes locker
- wait(500,600)
- Container.GetByName("Depot Chest"):OpenChildren({ItemsDepotBP, true}) -- Opens depot bp for normal items
- wait(500,600)
- Container.GetByName("Depot Chest"):OpenChildren({StackDepotBP, true}) -- Opens depot bp for stackables
- wait(500,600)
- while (Container.GetByName(ItemsDepotBP):isFull()) do -- Opening next backpack untill reach non fully filled
- Dedi_OpenNextBp(ItemsDepotBP)
- wait(200,400)
- end
- while (Container.GetByName(StackDepotBP):isFull()) do -- Opening next backpack untill reach non fully filled
- Dedi_OpenNextBp(StackDepotBP)
- wait(200,400)
- end
- --Depositing items
- for i=0,5 do -- Repeat 4 times (put here amount of loot backpacks you have on yourself)
- for j=Container.GetByName(LootBp):ItemCount()-1, 0, -1 do -- Checks all slot takens
- local ItemName = Item.GetName(Container.GetByName(LootBp):GetItemData(j).id):titlecase()
- if table.contains(Items, ItemName) then -- If item is in Item list, move from loot backpack to depot bp)
- Container.GetByName(LootBp):MoveItemToContainer(j, Container.GetByName(ItemsDepotBP):Index(), Container.GetByName(ItemsDepotBP):ItemCapacity()-1)
- wait(200,400)
- end
- if Container.GetByName(ItemsDepotBP):isFull() then -- If depot backpack is filled open next
- Dedi_OpenNextBp(ItemsDepotBP)
- wait(200,400)
- end
- end
- Dedi_OpenNextBp(LootBp) -- Checked all slots in current loot backpack, so open next and repeat looking for items again :)
- wait(200,400)
- end
- --Depositing stackables
- -- Here we have only 1 backpack, so we don't have to repeat it few times
- for j=Container.GetByName(StackBackpack):ItemCount()-1, 0, -1 do
- local ItemName = Item.GetName(Container.GetByName(StackBackpack):GetItemData(j).id):titlecase()
- if table.contains(Stackable, ItemName) then
- Container.GetByName(StackBackpack):MoveItemToContainer(j, Container.GetByName(StackDepotBP):Index(), Container.GetByName(StackDepotBP):ItemCapacity()-1)
- wait(200,400)
- end
- if Container.GetByName(StackDepotBP):isFull() then
- Dedi_OpenNextBp(StackDepotBP)
- wait(200,400)
- end
- end
- --Closing bps with items
- Container.GetByName(ItemsDepotBP):Close()
- wait(200,400)
- Container.GetByName(StackDepotBP):Close()
- wait(200,400)
- -- Opening main backpack and backpack for supplies
- Self.CloseContainers()
- while Dedi_WindowCount("all") < 4 do
- Self.CloseContainers()
- repeat
- wait(900)
- until (Self.UseItemFromEquipment("backpack") > 0)
- wait(1000)
- Container.GetFirst():OpenChildren(Item.GetID(LootBp), Item.GetID(ItemsBp), Item.GetID(SupplyBp))
- wait(300)
- Container.GetByName(MainBp):Minimize()
- wait(300)
- Container.GetByName(LootBp):Minimize()
- wait(300)
- Container.GetByName(ItemsBp):Minimize()
- wait(300)
- Container.GetByName(SupplyBp):Minimize()
- wait(300)
- Walker.Start()
- end
- Walker.Start()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement