Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- config
- local playerName = "Cow"
- local redstoneSide = "left"
- -- peripherals stuff
- local chatbox = peripheral.find("chatBox")
- if not chatbox then
- error("No ChatBox found :(")
- end
- -- db stuff
- --[[
- local statelist = {
- ["top"] = rs.getInput("top"),
- ["front"] = rs.getInput("front"),
- ["left"] = rs.getInput("left"),
- ["right"] = rs.getInput("right"),
- ["back"] = rs.getInput("back"),
- ["bottom"] = rs.getInput("bottom"),
- }
- ]]--
- term.clear()
- term.setCursorPos(1,1)
- while true do
- os.pullEvent("redstone")
- if rs.getInput(redstoneSide) then
- sleep(0.1)
- if rs.getInput(redstoneSide) then -- is redstone still one after 2 ticks?
- chatbox.tell(playerName, "Apiary has an error!", 64, true)
- end
- end
- -- check each side for redstone changes
- --[[
- for side, state in pairs(statelist) do
- if rs.getInput(side) ~= state then
- print(side.." is now "..tostring(rs.getInput(side)))
- statelist[side] = rs.getInput(side)
- if side == redstoneSide then
- chatbox.tell(playerName, "Apiary has an error!", 64, true)
- end
- end
- end
- ]]--
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement