Advertisement
JJC15433

Torch Interval Test

Jun 25th, 2013
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.55 KB | None | 0 0
  1. --Torch distance placement test
  2.  
  3. ---attempting to write code for interval torch placement so as to not need to follow turtle and break or place torches.
  4.  
  5. term.clear()
  6. term.setCursorPos(1,1)
  7. local distance = read()
  8. term.write("How long should the corridor be? ")
  9.  
  10. for i = 1, distance do
  11.     turtle.digDown()
  12.     turtle.dig()
  13.     while turtle.detectUp() do
  14.         turtle.digUp()
  15.     end
  16.     for distance%3 = 0 do
  17.         turtle.select(3)
  18.         turtle.turnRight()
  19.         turtle.turnRight()
  20.         turtle.place()
  21.         turtle.turnRight()
  22.         turtle.turnRight()
  23.     end
  24.     turtle.forward()
  25. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement