Advertisement
JaMaNi133

quarry

Apr 23rd, 2023 (edited)
957
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.17 KB | None | 0 0
  1. local lines =  tonumber(...)
  2.  
  3.  
  4. local sStep,stepINV     = "top" , false
  5. local sClutch,clutchINV   = "back" , true
  6. local sShift,shiftINV    = "right" , true
  7. local sPower,powerINV    = "left" , false
  8. local sFeedback,feedbackINV = "bottom" , false
  9.  
  10.  
  11. redstone.setOutput(sShift , not(shiftINV == true))
  12. redstone.setOutput(sPower , not(powerINV == true))
  13. redstone.setOutput(sClutch , not(true == clutchINV)) --move up
  14. sleep(1)
  15. local feedback = feedbackINV
  16. while (feedback == feedbackINV) do
  17.     feedback = redstone.getInput(sFeedback)
  18. end
  19. redstone.setOutput(sClutch , not(false == clutchINV))
  20. redstone.setOutput(sPower , not(powerINV == false))
  21. sleep(1)
  22.  
  23.  
  24.  
  25. while lines > 0 do
  26.  
  27.     print(lines)
  28.  
  29.     lines = lines - 1
  30.  
  31.    
  32.  
  33.     redstone.setOutput(sClutch,not(false == clutchINV))
  34.     redstone.setOutput(sPower , not(powerINV == false))
  35.     redstone.setOutput(sShift , not(shiftINV == true))
  36.     redstone.setOutput(sStep , not(true == stepINV))
  37.     sleep(0.5)
  38.     redstone.setOutput(sStep , not(false == stepINV))     -- step
  39.     sleep(1)
  40.     local feedback = feedbackINV
  41.     while (feedback == feedbackINV) do
  42.         feedback = redstone.getInput(sFeedback)
  43.         sleep(1)
  44.     end
  45.     sleep(1)
  46.  
  47.  
  48.     redstone.setOutput(sShift , not(shiftINV == false))
  49.     redstone.setOutput(sPower , not(powerINV == true))
  50.     redstone.setOutput(sClutch , not(true == clutchINV)) --move down
  51.     sleep(1)
  52.     local feedback = feedbackINV
  53.     while (feedback == feedbackINV) do
  54.         feedback = redstone.getInput(sFeedback)
  55.         sleep(1)
  56.     end
  57.     redstone.setOutput(sClutch,not(false == clutchINV))
  58.     redstone.setOutput(sPower , not(powerINV == false))
  59.     sleep(1)
  60.  
  61.  
  62.  
  63.     redstone.setOutput(sShift , not(shiftINV == true))
  64.     redstone.setOutput(sPower , not(powerINV == true))
  65.     redstone.setOutput(sClutch , not(true == clutchINV)) --move up
  66.     sleep(1)
  67.     local feedback = feedbackINV
  68.     while (feedback == feedbackINV) do
  69.         feedback = redstone.getInput(sFeedback)
  70.         sleep(1)
  71.     end
  72.     redstone.setOutput(sClutch , not(false == clutchINV))
  73.     redstone.setOutput(sPower , not(powerINV == false))
  74.     sleep(1)
  75.  
  76.    
  77.  
  78. end
  79.  
  80. print("done")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement