View difference between Paste ID: G7DWmXXe and vjjj8Niv
SHOW: | | - or go back to the newest paste.
1-
local sides = require "sides"
1+
local sides = require "sides"
2-
local robot = require "robot"
2+
local robot = require "robot"
3-
local component = require "component"
3+
local component = require "component"
4-
local inv = component.inventory_controller
4+
local inv = component.inventory_controller
5-
local Minimum = 0.2
5+
local Minimum = 0.2
6-
local active_slot = 1
6+
local active_slot = 1
7-
 
7+
 
8-
local function Text()
8+
local function Text()
9-
    os.execute("cls")
9+
    os.execute("cls")
10-
    print("РОБОТ РАБОТАЕТ!! Создатель - GooodGame")
10+
    print("РОБОТ РАБОТАЕТ!! Создатель - GooodGame")
11-
    print("Доработал-atomzerg")
11+
    print("Доработал-atomzerg")
12
end
13-
 
13+
 
14-
Text()
14+
Text()
15-
 
15+
 
16-
function Charging()
16+
function Charging()
17-
  inv.equip()
17+
   robot.turnLeft()
18-
   robot.turnLeft()
18+
	os.sleep(7)
19-
    robot.turnLeft()
19+
    robot.turnLeft()
20-
     robot.drop()
20+
	os.sleep(7)
21-
      os.sleep(7)
21+
     inv.equip()
22-
       robot.suck()
22+
     robot.drop()
23-
        robot.turnRight()
23+
      os.sleep(7)
24-
         robot.turnRight()
24+
       robot.suck()
25-
          inv.equip()
25+
		os.sleep(7)
26
        robot.turnRight()
27-
 
27+
		os.sleep(7)
28-
function Energy()
28+
         robot.turnRight()
29-
  if robot.durability() < Minimum then
29+
			os.sleep(7)
30-
    Charging()
30+
          inv.equip()
31-
  end
31+
end
32
 
33-
33+
function Energy()
34-
while true do
34+
  if robot.durability() < Minimum then
35-
  if robot.durability() < Minimum then
35+
    Charging()
36-
Energy()
36+
  end
37
end
38-
robot.swing()
38+
39
while true do
40
  if robot.durability() < Minimum then
41
Energy()
42
end
43
robot.swing()
44
end