lucas_csantos

Forward

Nov 25th, 2012
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. tArgs = {...}
  2. local times
  3.  
  4. -- if no arguments are passed, assume 1
  5. if tArgs[1] == nil then times = 1
  6. else
  7. times = tArgs[1]
  8. end
  9.  
  10. for i=1,times do
  11. while not turtle.forward() do end
  12. if facing == 0 then z = z+1 end
  13. if facing == 1 then x = x-1 end
  14. if facing == 2 then z = z-1 end
  15. if facing == 3 then x = x+1 end
  16. shell.run("savePos")
  17. end
Advertisement
Add Comment
Please, Sign In to add comment