[email protected] webmail now available. Want one? Go here.
Windows getting boring or just want to try something Open Source for your next Desktop Environment?! Go Zorin OS.
Paste
Pasted as Lua by registered user cbsxmj ( 8 years ago )
local robot = require("robot")
robot.select(2)
if robot.count(1)<1 then
print("place torch in slot 1")
return
end
local l=0
while true do
while robot.detect() do
robot.swing()
end
if robot.forward() then l=l+1 end
robot.swingDown()
while robot.detectUp() do
robot.swingUp()
end
if l>11 then
l=0
robot.select(1)
robot.placeDown()
if robot.count(1) < 1 then return end
robot.select(2)
end
if robot.count(16)>0 then return end
end
Revise this Paste