Dodedodo33

BC Meat v1.0 remove

May 30th, 2013
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.97 KB | None | 0 0
  1. function forward()
  2.    while not turtle.forward() do
  3.       print("Stuck, retrying")
  4.       sleep(1)
  5.    end
  6. end
  7.  
  8. function moveUp()
  9.    while not turtle.up()
  10.       print("Stuck, retrying")
  11.       sleep(1)
  12.    end
  13. end
  14.  
  15. function clearDirt()
  16.    turtle.select(16)
  17.    turtle.digDown()
  18. end
  19.  
  20. function digSlot(x)
  21.    turtle.digDown()
  22.    turtle.select(x)
  23.    turtle.suckDown()
  24.    turtle.select(16)
  25.    turtle.placeDown()
  26. end
  27.  
  28. function deploy()
  29.   for i = 2,4 do
  30.     forward()
  31.     turtle.select(1)
  32.     digSlot(i)
  33.   end
  34. end
  35.  
  36. function moveToPlace()
  37.    turtle.turnLeft()
  38.    turtle.turnLeft()
  39.    turtle.select(16)
  40.    turtle.digUp()
  41.    for i = 1,2 do
  42.       moveUp()
  43.       turtle.placeDown()
  44.    end
  45. end
  46.  
  47. function goHome()
  48.    turtle.turnLeft()
  49.    turtle.turnLeft()
  50.    for i = 1,3 do
  51.       moveForward()
  52.    end
  53.    turtle.select(16)
  54.    for i = 1,2 do
  55.       turtle.digDown()
  56.       turtle.down()
  57.    end
  58.    turtle.placeUp()
  59. end
  60.    
  61.  
  62. moveToPlace()
  63. deploy()
  64. goHome()
Advertisement
Add Comment
Please, Sign In to add comment