MadScience2728

Roof+

Feb 26th, 2021
932
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local slot = 1
  2. turtle.select(slot)
  3.  
  4. function Ensure()
  5.     if turtle.getItemCount(slot) == 0 then
  6.         slot = slot + 1
  7.         if slot == 17 then slot = 1 end
  8.         turtle.select(slot)
  9.         if turtle.getItemCount(slot) == 0 then
  10.             print("Insert more >>")
  11.             read()
  12.         end
  13.     end        
  14. end
  15.  
  16. function F()
  17.     Ensure()
  18.     turtle.placeDown()
  19.     turtle.forward()
  20. end
  21.  
  22. function U()
  23.     turtle.up()
  24. end
  25.  
  26. function L()
  27.     turtle.turnLeft()
  28. end
  29.  
  30. function R()
  31.     turtle.turnRight()
  32. end
  33.  
  34. function FMax()
  35.     while not turtle.detect() do
  36.         F()
  37.     end
  38. end
  39.  
  40. turtle.forward()
  41. turtle.down()
  42. turtle.turnLeft()
  43. turtle.turnLeft()
  44. --
  45. local count = 0
  46. while true do
  47.     while turtle.back() do
  48.         Ensure()
  49.         turtle.place()
  50.         count = 0
  51.     end
  52.     turtle.turnRight()
  53.     count = count + 1
  54.     if count == 3 then
  55.         U()
  56.         Ensure()
  57.         turtle.placeDown()
  58.         break
  59.     end    
  60. end
  61.  
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×