Laine_prikol

Cobblestone Generator

Jan 28th, 2017
338
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- CobbleStone Generator by Laine_prikol
  2. local robot = require("robot")
  3. local term = require("term")
  4. local os = require("os")
  5. cobblestone = 0
  6. if robot.durability() == nil then
  7.  print("НЕТ ИНСТРУМЕНТА!")
  8.  end
  9. print("ВНИМАНИЕ: ПОСТАВЬТЕ СУНДУК НАД РОБОТОМ!")
  10. while true do
  11.  os.sleep(1)
  12. if robot.detectDown() then
  13.   robot.swingDown()
  14.   cobblestone = cobblestone + 1
  15.   term.clear()
  16.   print("Прочность инструмента: "..robot.durability())
  17.   print("Собранно булыжника: "..cobblestone)
  18. end
  19. if robot.count() then
  20.  robot.dropUp()
  21. end
  22. if robot.durability() == 0 then
  23.  print("Инструмент сломан!")
  24.  break
  25. end
  26. end
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×