Atomzerg

MOX

Mar 5th, 2019 (edited)
459
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.31 KB | None | 0 0
  1. local sides = require "sides"
  2. local robot = require "robot"
  3. local component = require "component"
  4. local inv = component.inventory_controller
  5. local Minimum = 0.2
  6. local active_slot = 1
  7. BeginSlot=1
  8.  
  9. TeplArray={}
  10. MOXArray={}
  11. ZTeplArray={}
  12. BTeplArray={}
  13.  
  14. TeplCount=1
  15. MOXCount=1
  16. ZTeplCount=1
  17. BTeplCount=1
  18.  
  19. for i = 1, 64 do
  20. robot.select(i)
  21. ActiveItem=component.inventory_controller.getStackInInternalSlot()
  22. if ActiveItem~=nil then
  23. if ActiveItem.name=="IC2:reactorMOXQuad" then
  24. MOXArray[MOXCount]=i
  25. MOXCount=MOXCount+1
  26. end
  27. if ActiveItem.name=="IC2:reactorHeatSwitchSpread" then
  28. ZTeplArray[ZTeplCount]=i
  29. ZTeplCount=ZTeplCount+1
  30. end
  31. if ActiveItem.name=="IC2:reactorVentDiamond" then
  32. TeplArray[TeplCount]=i
  33. TeplCount=TeplCount+1
  34. end
  35.  
  36. if ActiveItem.name=="IC2:reactorVentSpread" then
  37. BTeplArray[BTeplCount]=i
  38. BTeplCount=BTeplCount+1
  39. end
  40. end
  41. end
  42. TeplCount=1
  43. MOXCount=1
  44. ZTeplCount=1
  45. BTeplCount=1
  46. for BeginSlot=1, 54 do
  47. if BeginSlot==10 or BeginSlot==18 or BeginSlot==32 or BeginSlot==46 or BeginSlot==54 then
  48. active_slot=MOXArray[MOXCount]
  49. robot.select(active_slot)
  50. robot.drop(1)
  51. MOXCount=MOXCount+1
  52. end
  53.  
  54. if BeginSlot==12 or BeginSlot==14 or BeginSlot==16 or BeginSlot==24 or BeginSlot==28 or BeginSlot==30 or BeginSlot==34 or BeginSlot==36 or BeginSlot==48 or BeginSlot==50 or BeginSlot==52 then
  55. active_slot=BTeplArray[BTeplCount]
  56. robot.select(active_slot)
  57. robot.drop(1)
  58. BTeplCount=BTeplCount+1
  59. end
  60.  
  61. if BeginSlot==1 or BeginSlot==3 or BeginSlot==5 or BeginSlot==7 or BeginSlot==9 or BeginSlot==11 or BeginSlot==13 or BeginSlot==15 or BeginSlot==17 or BeginSlot==19 or BeginSlot==21 or BeginSlot==23 or BeginSlot==25 or BeginSlot==27 or BeginSlot==29 or BeginSlot==31 or BeginSlot==33 or BeginSlot==35 or BeginSlot==37 or BeginSlot==39 or BeginSlot==41 or BeginSlot==43 or BeginSlot==45 or BeginSlot==47 or BeginSlot==49 or BeginSlot==51 or BeginSlot==53 then
  62. active_slot=TeplArray[TeplCount]
  63. robot.select(active_slot)
  64. robot.drop(1)
  65. TeplCount=TeplCount+1
  66. end
  67.  
  68. if BeginSlot==2 or BeginSlot==4 or BeginSlot==6 or BeginSlot==8 or BeginSlot==20 or BeginSlot==22 or BeginSlot==26 or BeginSlot==38 or BeginSlot==40 or BeginSlot==42 or BeginSlot==44 then
  69. active_slot=ZTeplArray[ZTeplCount]
  70. robot.select(active_slot)
  71. robot.drop(1)
  72. ZTeplCount=ZTeplCount+1
  73. end
  74. end
Add Comment
Please, Sign In to add comment