Advertisement
colognefire

Turtle Area

May 30th, 2015
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.64 KB | None | 0 0
  1. shell.run('clear')
  2. print ("Wie lang soll das Feld sein?")
  3. local x=io.read()
  4. print ("Wie breit soll das Feld sein?")
  5. local y=io.read()
  6.  
  7. turtle.forward()
  8. turtle.turnLeft()
  9. turtle.turnLeft()
  10. turtle.place()
  11. turtle.turnRight()
  12. turtle.turnRight()
  13.  
  14. for i = 1,x do
  15. turtle.forward()
  16. end
  17.  
  18. turtle.back()
  19. turtle.place()
  20. turtle.turnRight()
  21.  
  22. for i = -1,y do
  23. turtle.forward()
  24. end
  25.  
  26. turtle.back()
  27. turtle.turnLeft()
  28. turtle.place()
  29. turtle.turnRight()
  30. turtle.turnRight()
  31.  
  32. for i = 1,x do
  33. turtle.forward()
  34. end
  35.  
  36. turtle.back()
  37. turtle.place()
  38. turtle.turnRight()
  39.  
  40. for i=0,y do
  41. turtle.forward()
  42. end
  43.  
  44. turtle.turnRight()
  45. print("Fertig! :D")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement