Advertisement
nvp777

Untitled

May 15th, 2019
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.85 KB | None | 0 0
  1. ------USTAWIENIA ------------------
  2. local itemSort = 8043
  3. local itemSort2 = 3280
  4. local itemSort3 = 3369
  5. local itemSort4 = 3065
  6. local itemSort5 = 3284
  7. local itemSort6 = 814
  8. local itemSort7 = 815
  9. local itemSort8 = 816
  10. local itemSort9 = 3369
  11. local itemSort10 = 8043
  12. local itemSort11 = 3567
  13. local itemSort12 = 3384
  14. local itemSort13 = 3381  
  15.  
  16. local backpackSortFrom = 'Your inbox'
  17. local backpackSortTo = 'backpack'
  18. local dLay = 0
  19. ------KONIEC USTAWIEN ------------------
  20. local itemSorter = function(sortItem, from, to)
  21. local fromBp = Container.New(from)
  22. local toBp = Container.New(to)
  23.  
  24.  
  25. if type(sortItem) == 'number' then
  26. for spot, item in (fromBp:iItems()) do
  27. if item.id == sortItem then
  28. fromBp:MoveItemToContainer(spot, toBp:Index())
  29. end
  30. end
  31. elseif type(sortItem) == 'string' then
  32. for spot, item in (fromBp:iItems()) do
  33. if item.name == sortItem then
  34. fromBp:MoveItemToContainer(spot, toBp:Index())
  35. end
  36. end
  37. end
  38. end
  39. Module.New('Sorter', function(this)
  40. itemSorter(itemSort, backpackSortFrom, backpackSortTo)
  41. this:Delay(dLay)
  42. itemSorter(itemSort2, backpackSortFrom, backpackSortTo)
  43. this:Delay(dLay)
  44. itemSorter(itemSort3, backpackSortFrom, backpackSortTo)
  45. this:Delay(dLay)
  46. itemSorter(itemSort4, backpackSortFrom, backpackSortTo)
  47. this:Delay(dLay)
  48. itemSorter(itemSort5, backpackSortFrom, backpackSortTo)
  49. this:Delay(dLay)
  50. itemSorter(itemSort6, backpackSortFrom, backpackSortTo)
  51. this:Delay(dLay)
  52. itemSorter(itemSort7, backpackSortFrom, backpackSortTo)
  53. this:Delay(dLay)
  54. itemSorter(itemSort8, backpackSortFrom, backpackSortTo)
  55. this:Delay(dLay)
  56. itemSorter(itemSort9, backpackSortFrom, backpackSortTo)
  57. this:Delay(dLay)
  58. itemSorter(itemSort10, backpackSortFrom, backpackSortTo)
  59. this:Delay(dLay)
  60. itemSorter(itemSort11, backpackSortFrom, backpackSortTo)
  61. this:Delay(dLay)
  62. itemSorter(itemSort12, backpackSortFrom, backpackSortTo)
  63. this:Delay(dLay)
  64. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement