Advertisement
Revector

Start_put.lua

Jul 29th, 2019 (edited)
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.13 KB | None | 0 0
  1. local robot = require("robot")
  2. -- pastebin get GGFBt97D start.lua
  3. -- SpacerolDark: cd /bin --> edit pastebin.lua --> Найти в двух местах "http://pastebin/...." и заменить на "https://pastebin/...." --> нажать Ctrl-S --> нажать Ctrl-W --> cd -
  4. -- SpacerolDark: После этого можно использовать pastebin get, pastebin run и так далее
  5. -- блоки, динамит, ядра
  6.  
  7. while true do
  8.  
  9.     robot.turnAround()
  10.  
  11.     if (robot.suck(4)) then
  12.     -- поiхали
  13.         os.sleep(3)
  14.  
  15.         robot.turnAround()
  16.         robot.turnRight()
  17.         robot.suck(1)
  18.         robot.turnLeft()
  19.  
  20.         robot.forward()
  21.         robot.turnLeft()
  22.         robot.forward()
  23.  
  24.         robot.placeDown()
  25.         robot.forward() --
  26.         robot.placeDown()
  27.  
  28.         robot.turnLeft()
  29.         robot.suck(16)
  30.         robot.turnRight()
  31.  
  32.         robot.turnRight()
  33.         robot.forward()
  34.         robot.placeDown()
  35.         robot.turnRight()
  36.         robot.forward()
  37.         robot.placeDown()
  38.  
  39.         robot.forward()
  40.         robot.turnAround()
  41.         robot.select(2)
  42.         robot.place()
  43.  
  44.         robot.turnRight()
  45.         robot.forward()
  46.         robot.turnLeft()
  47.         robot.use()
  48.         robot.use()
  49.  
  50.         robot.turnLeft()
  51.         robot.forward()
  52.         robot.turnRight()
  53.         robot.select(3)
  54.         os.sleep(5)
  55.         robot.drop(16)
  56.  
  57.         os.sleep(30)
  58.  
  59.         --идем копать
  60.  
  61.         robot.turnLeft()
  62.         robot.forward()
  63.         robot.turnRight()
  64.         robot.forward()
  65.  
  66.  
  67.         --digging
  68.  
  69.         robot.swingDown()
  70.         robot.forward()
  71.         robot.swingDown()
  72.         robot.turnRight()
  73.         robot.forward()
  74.         robot.swingDown()
  75.         robot.turnRight()
  76.         robot.forward()
  77.         robot.swingDown()
  78.         robot.turnRight()
  79.         robot.forward()
  80.         robot.drop(4)
  81.         robot.turnLeft()
  82.         robot.forward()
  83.         robot.turnRight()
  84.         robot.forward()
  85.         robot.turnAround()
  86.  
  87.     else
  88.         robot.turnAround()
  89.         os.sleep(2)
  90.     end
  91. os.sleep(1)
  92. robot.select(1)
  93. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement