-- download at MT.QZX.COM (bonemeal-sapling.lua) local b = "a" -- bonemeal node breaker local s = "d" -- on/off switch local t = 15 -- duration between scans if event.type == "program" or (event.type == "on" and string.lower(event.pin.name) == s) then port[b] = false interrupt(t, "scan") elseif event.iid == "scan" and pin[s] then digiline_send("scan", "GET") elseif event.channel == "scan" then local node = event.msg local len = string.len(node) if string.sub(node, len-6, len) == "sapling" then -- bonemeal sapling port[b] = true interrupt(1, "wait") else interrupt(t, "scan") end elseif event.iid == "wait" then port[b] = false interrupt(t, "scan") end