Atomzerg

react

Mar 7th, 2019
429
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local sides = require "sides"
  2. local robot = require "robot"
  3. local component = require "component"
  4. local inv = component.inventory_controller
  5. local active_slot = 1
  6. BeginSlot=1
  7.  
  8. TeplArray={}
  9. UranArray={}
  10. ZTeplArray={}
  11. BTeplArray={}
  12. PlastArray={}
  13.  
  14. TeplCount=1
  15. UranCount=1
  16. ZTeplCount=1
  17. BTeplCount=1
  18. PlastCount=1
  19.  
  20. for i = 1, 64 do
  21.     robot.select(i)
  22.     ActiveItem=component.inventory_controller.getStackInInternalSlot()
  23.     if ActiveItem~=nil then
  24.         if ActiveItem.name=="IC2:reactorUraniumQuad" then
  25.             UranArray[UranCount]=i
  26.             UranCount=UranCount+1
  27.         end
  28.         if ActiveItem.name=="IC2:reactorPlating" then
  29.             PlastArray[PlastCount]=i
  30.             PlastCount=PlastCount+1
  31.         end
  32.         if ActiveItem.name=="IC2:reactorHeatSwitchSpread" then
  33.             ZTeplArray[ZTeplCount]=i
  34.             ZTeplCount=ZTeplCount+1
  35.         end
  36.         if ActiveItem.name=="IC2:reactorVentGold" then
  37.             TeplArray[TeplCount]=i
  38.             TeplCount=TeplCount+1
  39.         end
  40.  
  41.         if ActiveItem.name=="IC2:reactorVentSpread" then
  42.             BTeplArray[BTeplCount]=i
  43.             BTeplCount=BTeplCount+1
  44.         end
  45.     end
  46. end
  47. TeplCount=1
  48. UranCount=1
  49. ZTeplCount=1
  50. BTeplCount=1
  51. PlastCount=1
  52. for BeginSlot=1, 54 do
  53. if BeginSlot==1 or BeginSlot==17 or BeginSlot==21 or BeginSlot==24 or BeginSlot==38 or BeginSlot==41 or BeginSlot==44 then
  54. active_slot=UranArray[UranCount]
  55. robot.select(active_slot)
  56. robot.drop(1)
  57. end
  58.  
  59. if BeginSlot==2 or BeginSlot==7 or BeginSlot==11 or BeginSlot==14 or BeginSlot==27 or BeginSlot==28 or BeginSlot==31 or BeginSlot==34 or BeginSlot==48 or BeginSlot==51 or BeginSlot==54 then
  60. active_slot=BTeplArray[BTeplCount]
  61. robot.select(active_slot)
  62. robot.drop(1)
  63. BTeplCount=BTeplCount+1
  64. end
  65.  
  66. if BeginSlot==3 or BeginSlot==5 or BeginSlot==6 or BeginSlot==8 or BeginSlot==12 or BeginSlot==13 or BeginSlot==15 or BeginSlot==16 or BeginSlot==18 or BeginSlot==20 or BeginSlot==22 or BeginSlot==23  or BeginSlot==25 or BeginSlot==26 or BeginSlot==29 or BeginSlot==30 or BeginSlot==32 or BeginSlot==33 or BeginSlot==35 or BeginSlot==37 or BeginSlot==39 or BeginSlot==40 or BeginSlot==42 or BeginSlot==43 or BeginSlot==45 or BeginSlot==47 or BeginSlot==50  or BeginSlot==53 then
  67. active_slot=TeplArray[TeplCount]
  68. robot.select(active_slot)
  69. robot.drop(1)
  70. TeplCount=TeplCount+1
  71. end
  72.  
  73. if BeginSlot==4 then
  74. active_slot=ZTeplArray[1]
  75. robot.select(active_slot)
  76. robot.drop(1)
  77. end
  78.  
  79. if BeginSlot==9 or BeginSlot==10 or BeginSlot==19 or BeginSlot==36 or BeginSlot==46 or BeginSlot==49 or BeginSlot==52 then
  80. active_slot=PlastArray[1]
  81. robot.select(active_slot)
  82. robot.drop(1)
  83. end
  84. end
RAW Paste Data