Guest User

Untitled

a guest
Oct 1st, 2018
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. local toBackpack = "orange backpack" -- name of backpack
  2. local contfrom = Container.New('Your Inbox')
  3. Self.OpenMainBackpack(true)
  4. while not contfrom:isOpen() do
  5. locker = Container.New("Locker")
  6. if not locker:isOpen() then -- opens locker
  7. Self.OpenLocker()
  8. wait(800, 1000)
  9. end
  10. local dp = Container.New('Locker')
  11. for mailspot, touse in dp:iItems() do
  12. if touse.id == 12902 then
  13. dp:UseItem(mailspot, true)
  14. wait(500, 1700)
  15. contfrom = Container.New('Your Inbox')
  16. end
  17. end
  18. end
  19. while contfrom:isOpen() do
  20. local DestinationBp = Container.GetByName(toBackpack)
  21. local item = contfrom:GetItemData(0)
  22. if not (Self.Cap() - Item.GetWeight(item.id)*item.count < 1) and contfrom:ItemCount() > 0 then
  23. if DestinationBp:ItemCount() == DestinationBp:ItemCapacity() then
  24. DestinationBp:UseItem(DestinationBp:ItemCount()-1,true)
  25. else
  26. contfrom:MoveItemToContainer(0,DestinationBp:Index(),DestinationBp:ItemCount())
  27. wait(500,550)
  28. end
  29. else
  30. Empty = true
  31. end
  32. if Empty then break end
  33. end
Advertisement
Add Comment
Please, Sign In to add comment