SHARE
TWEET

ladderbuild.lua

a guest Apr 12th, 2015 283 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- настройки
  2. dis = 15 -- размер лестницы
  3.  
  4. local robot = require("robot")
  5. local term = require("term")
  6.  
  7. -- эти настройки НЕ трогай!!!
  8. minecomplete = 0
  9. returncomplete = 0
  10.  
  11. term.clear()
  12. print("Programist135 3x3 Ladder Builder")
  13. print("Copyright Programist135")
  14.  
  15. robot.up()
  16. while true do
  17.   minecomplete = minecomplete+1
  18.   robot.swing()
  19.   robot.forward()
  20.   robot.turnRight()
  21.   robot.swing()
  22.   robot.forward()
  23.   robot.swingUp()
  24.   robot.swingDown()
  25.   robot.turnAround()
  26.   robot.forward()
  27.   robot.swing()
  28.   robot.forward()
  29.   robot.swingUp()
  30.   robot.swingDown()
  31.   robot.turnAround()
  32.   robot.forward()
  33.   robot.turnLeft()
  34.   robot.swingUp()
  35.   robot.swingDown()
  36.   robot.down()
  37.   if minecomplete == dis then
  38.     while true do
  39.       robot.up()
  40.       robot.back()
  41.       returncomplete = returncomplete+1
  42.       if returncomplete == dis then break end
  43.     end
  44.     robot.down()
  45.     break
  46.   end
  47. end
  48. print("Finished!")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top