Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("top")
- os.loadAPI("ocs/apis/sensor")
- os.loadAPI("monmon")
- m = peripheral.wrap("left")
- local prox = sensor.wrap("bottom")
- print(textutils.serialise(prox.getTargets()))
- local targets = prox.getTargets()
- while true do
- i=0
- monmon.loadImage("b1")
- local targets = prox.getTargets()
- for k, v in pairs(targets) do
- if v.Name == "Blaze" then
- if v.Position.Y == 1 then
- i=i+1
- end
- end
- end
- print(i)
- rednet.broadcast(i)
- m.setBackgroundColor(colors.black)
- m.setTextColor(colors.lime)
- m.setCursorPos(12,10)
- m.write(" ")
- m.setCursorPos(12,10)
- m.write(math.abs(i))
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement