Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local component = require("component")
- local sides = require("sides")
- local colors = require("colors")
- local robot = require("robot")
- local rs = component.list("redstone")()
- do_debug = true
- DEBUG = function(msg)
- if do_debug then
- print(msg)
- end
- end
- -- OCEmu has no redstone.
- if rs == nil then
- rs = {}
- rs.getInput = function(s) return 0 end
- else
- rs = component.proxy(rs)
- end
- local getred = function ()
- for i = 0,5,1
- do
- --DEBUG("tested " .. i .. "=" .. rs.getInput(i))
- if rs.getInput(i) > 0 then
- return 15
- end
- end
- return 0
- end
- while true do
- if getred() > 0 then
- -- signal = fireeeee
- robot.use(3,false,1.06)
- end
- os.sleep(0)
- end
Add Comment
Please, Sign In to add comment