Advertisement
Zantag

trainYard

Dec 2nd, 2013
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. rednet.open("top")
  2.  
  3. while true do
  4. eventType, sender, message, dist = os.pullEvent("rednet_message")
  5. tbl = textutils.unserialize(message)
  6. if tbl[1] == "SEND_TRAIN" then
  7. print(sender .." " .. tbl[1] .. " " .. dist)
  8. redstone.setBundledOutput("bottom", tbl[2])
  9. print("Sending Train: " .. tbl[2])
  10. os.sleep(2)
  11. redstone.setBundledOutput("bottom", 0)
  12. else
  13. print(message .. " is invalid")
  14. end
  15. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement