Advertisement
25hz

Turtle - Move up

Apr 4th, 2016
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- I name the file "u" to
  2. -- minimize typing :)
  3. -- Usage: u 3
  4. -- Moves the turtle up 3, and
  5. -- digs if anything is in the way.
  6. -- If you just type "u", it moves 1.
  7.  
  8. arg = (...)
  9. arg = tonumber(arg) or 1
  10. x = 0
  11.  
  12. while x < arg do
  13.     if turtle.up() == true then
  14.     x = x + 1
  15.     else
  16.     turtle.digUp()
  17.     end
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement