Guest User

start.lua

a guest
Mar 14th, 2019
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.72 KB | None | 0 0
  1. local sides = require "sides"
  2. local robot = require "robot"
  3. local component = require "component"
  4. local inv = component.inventory_controller
  5. local Minimum = 0.2
  6. local active_slot = 1
  7.  
  8. local function Text()
  9.     os.execute("cls")
  10.     print("РОБОТ РАБОТАЕТ!! Создатель - GooodGame")
  11.     print("Доработал-atomzerg")
  12. end
  13.  
  14. Text()
  15.  
  16. function Charging()
  17.   inv.equip()
  18.    robot.turnLeft()
  19.     robot.turnLeft()
  20.      robot.drop()
  21.       os.sleep(7)
  22.        robot.suck()
  23.         robot.turnRight()
  24.          robot.turnRight()
  25.           inv.equip()
  26. end
  27.  
  28. function Energy()
  29.   if robot.durability() < Minimum then
  30.     Charging()
  31.   end
  32. end
  33.  
  34. while true do
  35.   if robot.durability() < Minimum then
  36. Energy()
  37. end
  38. robot.swing()
  39. end
Advertisement
Add Comment
Please, Sign In to add comment