Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("top")
- while true do
- eventType, sender, message, dist = os.pullEvent("rednet_message")
- tbl = textutils.unserialize(message)
- if tbl[1] == "SEND_TRAIN" then
- print(sender .." " .. tbl[1] .. " " .. dist)
- redstone.setBundledOutput("bottom", tbl[2])
- print("Sending Train: " .. tbl[2])
- os.sleep(2)
- redstone.setBundledOutput("bottom", 0)
- else
- print(message .. " is invalid")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement