Advertisement
Guest User

stn.lua

a guest
Feb 20th, 2020
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.59 KB | None | 0 0
  1. rednet.open("back")
  2. while true do
  3. term.clear()
  4. term.setCursorPos(1,1)
  5. local t = {dir, stn, pro, ser, spro, trans, platform}
  6. print("Direction: ");
  7. t.dir = read();
  8. print("Station: ");
  9. t.stn = read();
  10. print("Pronounced?: ");
  11. t.pro = read();
  12. print("Service?: ");
  13. t.ser = read()
  14. if (t.ser == "") then
  15.  t.spro = ""
  16.     t.trans = "false"
  17. else
  18.  print("Pronounced?: ");
  19.  t.spro = read();
  20.  
  21.     print("Transfer? : ");
  22.     t.trans = read();
  23. end
  24. print("Platform: ");
  25. t.platform = read();
  26. msg = textutils.serialize(t)
  27. data = textutils.unserialize(msg);
  28. rednet.broadcast(msg, "WorkshopStation");
  29. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement