Advertisement
mrWhiskasss

робот удача

Jan 2nd, 2022 (edited)
698
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --улучение магнит, инвентраль, батарея3, контейнер3, клава, монитор, дисковод, остальное как пк тир 3
  2.  
  3.  
  4. local r       = require("robot")
  5. local com     = require("component")
  6. local term    = require("term")
  7. local unicode = require("unicode")
  8. local gpu     = com.gpu
  9. local w, h    = 50, 16
  10. term.clear()
  11. gpu.setResolution(w, h)
  12. --gpu.setBackground(0xFFFFFF)
  13. --gpu.setForeground(0x000000)
  14. gpu.fill(1, 1, w, h, " ")
  15. gpu.fill(1, 1, 1, 1, "┌")
  16. gpu.fill(1, h, 1, 1, "└")
  17. gpu.fill(1, 2 ,1, h-2, "│")
  18. gpu.fill(w, 2, 1, h-2, "│")
  19. gpu.fill(2, 1, w-2, 1, "─")
  20. gpu.fill(2, h, w-2, 1, "─")
  21. gpu.fill(w, 1, 1, 1, "┐")
  22. gpu.fill(w, h, 1, 1, "┘")
  23. gpu.set(3, 2, "Робот "..r.name().." запущен!")
  24. gpu.fill(3, 3, unicode.len("Робот "..r.name().." запущен!"), 1, "─")
  25.   while true do
  26.   local mine, temp = r.detect()
  27.     if mine and temp ~= "entity" then
  28.     r.swing()
  29.     r.suck()
  30.   end
  31.   os.sleep(0)
  32. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement