SHARE
TWEET

Tram

a guest Apr 23rd, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local Location = 1
  2.  
  3. local Junctions = {
  4.                    {    0, 2048,    5,    9,    1,    3,   19,   51,  243,  371,  627, 1651, 3699},
  5.                    { 2048,    0,    5,    9,    1,    3,   19,   51,  243,  371,  627, 1651, 3699}
  6.                   }
  7. term.clear()
  8. term.setCursorPos(1,1)
  9. print("                    Welcome to")
  10. print("  Transport for Regions Around Marbleville (TRAM)")
  11. print("---------------------------------------------------")
  12. print("          Please select your destination:")
  13. print()
  14. print("ts = Train Station       pt = Processing Towers")
  15. print("pc = Computers           ap = Advanced Processing")
  16. print("br = Bedroom             as = Automated Storage")
  17. print("gs = General Storage     ab = Assembly")
  18. print("fi = Fields              rf = Refinery")
  19. print("cp = Coal Processing     eg = Engines")
  20. print("fs = Factory Storage")
  21. print()
  22. print("Please use lower case symbols for your station code (2 letters)")
  23. local Destination_Code = read()
  24. term.clear()
  25. term.setCursorPos(1,1)
  26. local Destination_Table = {"ts","pc","br","gs","fi","cp","fs","pt","ap","as","ab","rf","eg"}
  27. local Destination = 1
  28. while Destination_Code ~= Destination_Table[Destination] do
  29.   Destination = Destination + 1
  30.   if (Destination > 16) or (Destination_Code == 0) then
  31.     print("Invalid destination code!")
  32.     sleep(3)
  33.     os.reboot()  
  34.   end
  35. end
  36. if Destination == Location then
  37.   print("You're already there you dumbass!")
  38.   sleep(3)
  39.   os.reboot()
  40. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top