Update craftCrystal.lua
This commit is contained in:
parent
c787fde08a
commit
9b4780b1a1
1 changed files with 7 additions and 0 deletions
|
@ -2,11 +2,18 @@ local robot = require("robot")
|
||||||
local component = require("component")
|
local component = require("component")
|
||||||
local sides = require("sides")
|
local sides = require("sides")
|
||||||
local rs = component.redstone
|
local rs = component.redstone
|
||||||
|
local flag = true;
|
||||||
while true do
|
while true do
|
||||||
if rs.getInput(sides.top) > 0 then
|
if rs.getInput(sides.top) > 0 then
|
||||||
|
flag = true
|
||||||
robot.suck()
|
robot.suck()
|
||||||
robot.dropDown()
|
robot.dropDown()
|
||||||
else
|
else
|
||||||
|
if flag then
|
||||||
|
os.sleep(5)
|
||||||
|
else
|
||||||
|
flag = false
|
||||||
|
end
|
||||||
robot.suckDown()
|
robot.suckDown()
|
||||||
robot.drop()
|
robot.drop()
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue