Advertisement
rickydaan

[Lua] Wall maker 1.3.6

Feb 26th, 2012
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. function toStart() -- Making a function to return to the start of a line
  2. ts = 0
  3. repeat
  4. ts = ts + 1 -- Counts up a number
  5. turtle.turnLeft()
  6. turtle.forward()
  7. turtle.turnRight()
  8. until ts == lenght -- Ending at the start of the line
  9. end
  10.  
  11. term.clear()
  12. term.setCursorPos(1,1)
  13. print("Making a wall!")
  14. print("How high?")
  15. high = tonumber(read()) -- Deletes the strings, so it becomes a number
  16. print("Lenght?")
  17. lenght = tonumber(read()) -- Same as before
  18.  
  19. function wallLine() -- Same as before
  20. wl = 0
  21. repeat
  22. wl = wl + 1
  23. turtle.place()
  24. turtle.turnRight()
  25. turtle.forward()
  26. turtle.turnLeft()
  27. until wl == lenght
  28. end
  29.  
  30. function wall()
  31. wa = 0
  32. repeat
  33. wa = wa + 1
  34. wallLine()
  35. turtle.up()
  36. toStart()
  37. until wh == high
  38. end
  39. wall()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement