Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- настройки
- dis = 15 -- размер лестницы
- local robot = require("robot")
- local term = require("term")
- -- эти настройки НЕ трогай!!!
- minecomplete = 0
- returncomplete = 0
- term.clear()
- print("Programist135 3x3 Ladder Builder")
- print("Copyright Programist135")
- robot.up()
- while true do
- minecomplete = minecomplete+1
- robot.swing()
- robot.forward()
- robot.turnRight()
- robot.swing()
- robot.forward()
- robot.swingUp()
- robot.swingDown()
- robot.turnAround()
- robot.forward()
- robot.swing()
- robot.forward()
- robot.swingUp()
- robot.swingDown()
- robot.turnAround()
- robot.forward()
- robot.turnLeft()
- robot.swingUp()
- robot.swingDown()
- robot.down()
- if minecomplete == dis then
- while true do
- robot.up()
- robot.back()
- returncomplete = returncomplete+1
- if returncomplete == dis then break end
- end
- robot.down()
- break
- end
- end
- print("Finished!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement