SHARE
TWEET

Untitled

a guest Dec 10th, 2018 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --[[
  2.         9 X 9 Farm
  3. ]]--
  4.  
  5. local function move()
  6.     turtle.digDown()
  7.     turtle.placeDown()
  8.     while not turtle.forward() do
  9.         sleep(1)
  10.     end
  11. end
  12.  
  13. local function move2()
  14.     while not turtle.forward() do
  15.         sleep(1)
  16.     end
  17. end
  18. local function plow()
  19.     while not turtle.up() do
  20.         sleep(1)
  21.     end
  22.     move2()
  23.     for o = 1,6 do
  24.  
  25.         for i = 1,8 do
  26.             move()
  27.         end
  28.         turtle.turnRight()
  29.         move()
  30.         turtle.turnRight()
  31.         move()
  32.         for i = 1,8 do
  33.             move()
  34.         end
  35.         turtle.turnLeft()
  36.         move2()
  37.         turtle.turnLeft()
  38.         move2()
  39.     end
  40.     for i = 1,8 do
  41.         move()
  42.     end
  43.     move()
  44.     while not turtle.down() do
  45.         sleep(1)
  46.     end
  47.     turtle.turnLeft()
  48.     turtle.turnLeft()
  49. end
  50. local iRepeat = 0
  51. local iMin = 40
  52. local iCount = 0
  53. local spacer = ""
  54. while true do
  55.     term.clear()
  56.     term.setCursorPos(1,4)
  57.     print("Fuel Remaning : "..tostring(turtle.getFuelLevel()))
  58.     term.setCursorPos(1,1)
  59.     iRepeat = iRepeat+1
  60.     print("plowing   :"..iRepeat)
  61.     plow()
  62.     term.setCursorPos(1,4)
  63.     print("Fuel Remaning : "..tostring(turtle.getFuelLevel()))
  64.     iCount = iMin
  65.     while true do
  66.         iCount = iCount-1
  67.         term.setCursorPos(1,2)
  68.         term.clearLine()
  69.         print("sleeping "..iMin.." minuites")
  70.         for i = 59,0,-1 do
  71.             sleep(1)
  72.             term.setCursorPos(1,3)
  73.             term.clearLine()
  74.             if i < 10 then
  75.                 spacer = "0"
  76.             else
  77.                 spacer = ""
  78.             end
  79.             write("To go    "..iCount..":"..spacer..i)
  80.         end
  81.         if iCount == 0 then
  82.             break
  83.         end
  84.     end
  85. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top