INCSlayer

SugarReveresed

Jul 29th, 2013
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.15 KB | None | 0 0
  1. function Harvest()
  2.     turtle.select(1)
  3.     while turtle.compare()==false do
  4.         turtle.dig()
  5.         turtle.forward()
  6.         if turtle.compareDown()==false then
  7.             turtle.digDown()
  8.         end
  9.     end
  10. end
  11.  
  12. function Righty()
  13.     turtle.turnRight()
  14.     turtle.forward()
  15.     turtle.dig()
  16.     turtle.forward()
  17.     turtle.select(1)
  18.     if turtle.compareDown()==false then
  19.         turtle.digDown()
  20.     end
  21.     turtle.turnRight()
  22. end
  23.  
  24. function Lefty()
  25.     turtle.turnLeft()
  26.     turtle.forward()
  27.     turtle.dig()
  28.     turtle.forward()
  29.     turtle.turnLeft()
  30. end
  31.  
  32. function Empty()
  33.     turtle.select(2)
  34.     turtle.drop()
  35.     turtle.select(3)
  36.     turtle.drop()
  37.     turtle.select(4)
  38.     turtle.drop()
  39.     turtle.select(5)
  40.     turtle.drop()
  41.     turtle.select(6)
  42.     turtle.drop()
  43.     turtle.select(7)
  44.     turtle.drop()
  45.     turtle.select(8)
  46.     turtle.drop()
  47.     turtle.select(9)
  48.     turtle.drop()
  49.     turtle.select(10)
  50.     turtle.drop()
  51.     turtle.select(11)
  52.     turtle.drop()
  53.     turtle.select(12)
  54.     turtle.drop()
  55.     turtle.select(13)
  56.     turtle.drop()
  57.     turtle.select(14)
  58.     turtle.drop()
  59.     turtle.select(15)
  60.     turtle.drop()
  61.     turtle.select(16)
  62.     turtle.drop()
  63.     turtle.select(1)
  64. end
  65.  
  66. while true do
  67.     term.clear()
  68.     term.setCursorPos(0,0)
  69.     print("Space Check")
  70.     if turtle.getItemCount(16)>1 then
  71.         print("No Space Going back to Sleep")
  72.         Empty()
  73.         os.sleep(240)
  74.     else
  75.         print("Space in Chest")
  76.         turtle.back()
  77.         turtle.back()
  78.         turtle.turnRight()
  79.         turtle.forward()
  80.         turtle.forward()       
  81.         print("Measuring Sugar Reed")
  82.         if turtle.detect()==true then
  83.             print("Sugar Reed Maturity Confirmed")
  84.             print("Harvesting Protocol Engaged")
  85.             os.sleep (30)
  86.             Harvest()
  87.             Righty()
  88.             Harvest()
  89.             Lefty()
  90.             Harvest()
  91.             turtle.turnRight()
  92.             turtle.dig()
  93.             turtle.forward()
  94.                 if turtle.compareDown()==false then
  95.                 turtle.digDown()
  96.             end
  97.             turtle.turnRight()
  98.             Harvest()
  99.             Lefty()
  100.             Harvest()
  101.             Righty()
  102.             Harvest()
  103.             turtle.turnRight()
  104.             for i=1,9 do
  105.                 turtle.forward()
  106.             end
  107.             turtle.turnRight()
  108.             turtle.back()
  109.             turtle.back()
  110.             turtle.turnLeft()
  111.             turtle.forward()
  112.             Empty()
  113.         else
  114.             print("Sugar Reed Still Immature")
  115.             turtle.back()
  116.             turtle.back()
  117.             turtle.turnLeft()
  118.             turtle.forward()
  119.             os.sleep(90)
  120.         end
  121.     end
  122. end
Advertisement
Add Comment
Please, Sign In to add comment