Advertisement
Guest User

newQuarry.lua

a guest
Dec 7th, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.01 KB | None | 0 0
  1. minedSpace = {6,6,4}
  2.  
  3. pos = {0,0,0}
  4. -- +for/back- , -left/Right+ , +Up/Down-
  5.  
  6. --Preconditon: chest behind area to min in front
  7.  
  8.  
  9. direction = 0
  10. -- 0 = ^ , 1 = > , 2 = v , 3 = <,4 = up ,5 down
  11. function increment(dir)--dir is where going
  12.     if dir == 0 then
  13.         pos[0] = post[0] + 1
  14.     elseif dir == 1 then
  15.         pos[1] = pos[1] + 1
  16.    
  17.     elseif dir == 2 then
  18.         pos[0] = pos[0] - 1
  19.     elseif dir == 3 then
  20.         pos[1] = pos[1] - 1
  21.        
  22.     elseif dir == 4 then
  23.         pos[2] = pos[2] + 1
  24.     elseif dir == 5 then
  25.         pos[2] = pos[2] - 1
  26.        
  27.     end
  28. end
  29.  
  30. function left(x)
  31.     turtle.turnLeft()
  32.     forward(x)
  33.     turtle.turnRight()
  34. end
  35.  
  36. function right(x)
  37.     turtle.turnRight()
  38.     forward(x)
  39.     turtle.turnLeft()
  40. end
  41.  
  42. function back(x)
  43.     for i=0, x do
  44.         turtle.back()
  45.     end
  46. end
  47.  
  48. function forward(x)
  49.     for i=0,x do
  50.         turtle.dig()
  51.         turtle.suck()
  52.         turtle.forward()
  53.        
  54.     end
  55. end
  56.  
  57.  
  58. function plane()
  59. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement