Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local modem = peripheral.wrap("top") or error("No modem attached", 0)
- modem.open(12) -- Open 43 so we can receive replies
- -- And wait for a reply
- local event, side, channel, replyChannel, message, distance
- repeat
- event, side, channel, replyChannel, message, distance = os.pullEvent("modem_message")
- until channel == 12
- -- Process the received message based on its content
- if message == "Iron" then
- modem.transmit(46, 12, "Preparing Package...")
- print("Starting Drop...")
- redstone.setOutput("front", true)
- os.sleep(1)
- print("Stoping Drop...")
- redstone.setOutput("front", false)
- os.sleep(3)
- modem.transmit(46, 12, "Drop-Ready")
- end
- shell.run("startup")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement