home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / files / bbs / spcelite.scr < prev    next >
Encoding:
Text File  |  1993-07-20  |  6.9 KB  |  352 lines

  1. SCRIPT
  2.  
  3. ;Space Empire Elite Menu
  4. ;by Eric Crofut last updated 5/15/88
  5. ;Outpost BBS 816-966-8188 300/1200/2400
  6.  
  7.  
  8. abort off
  9. clear
  10. define path = 'd:\spcemp\'  ; Set Drive path name for Space Empire files
  11. define cd
  12. define choice
  13. define dummy
  14. define spc_date
  15. define spc_day
  16. define fc
  17. define date
  18. define today_date
  19. today_date = '&24'
  20. define id
  21. id = '&31'
  22. define player
  23. define calls = '&27'
  24.  
  25. define player_no
  26. define user_idx
  27. define se_name
  28. define se_player
  29. define player_idx
  30. define player_lines
  31. define last_date
  32. define score
  33. define total_planets
  34. define food_planets
  35. define ore_planets
  36. define soldier_planets
  37. define unknown
  38. define troops
  39. define ally
  40. define population
  41. define food
  42. define fighters
  43. define credits
  44. define generals
  45. define def_stations
  46. define command_ship
  47. define player_name
  48. define agents
  49. define heavy_cruisers
  50. define carriers
  51. define turns
  52. define insurgents
  53. define dead_planets
  54. define report
  55.  
  56.  
  57. MENU:
  58.  
  59. clear screen
  60.  
  61. printe
  62. printe '  Space Empire Elite v5.3'
  63. printe '  ======================='
  64. printe
  65. printe ' \{P\} Play Space Empire'
  66. printe ' \{N\} Space Empire News'
  67. printe ' \{S\} Space Empire Scores'
  68. printe ' \{F\} Space Empire Hall Of Fame'
  69. printe ' \{I\} Space Empire Instructions'
  70. printe ' \{R\} Space Empire RULES'
  71. if command_level 32
  72. printe ' \{L\} Space Empire Log'
  73. endif
  74. printe ' \{Y\} Your Player Status'
  75. printe ' \{A\} Your Activity Report'
  76. printe
  77. printe ' \{M\} Space Empire Message Base'
  78. printe
  79. printe ' \{X\} To Exit'
  80.  
  81.  
  82. GET_CHOICE:
  83. printe
  84. print 'Enter Selection: '
  85.  
  86. if time_exceeded
  87.  printe 'Sorry Your Out Of Time!'
  88.  exit
  89. endif
  90.  
  91. get_key choice
  92.  
  93. if choice = 'P'
  94.  printe 'Play Space Empire'
  95.  goto spcemp
  96. ef choice = 'N'
  97.  printe 'News'
  98.  goto spc_news
  99. ef choice = 'S'
  100.  printe 'Scores'
  101.  view '[path]sescore.txt'
  102. ef choice = 'F'
  103.  printe 'Hall Of Fame'
  104.  printe
  105.  view '[path]sefame.txt'
  106. ef choice = 'I'
  107.  printe 'Instructions'
  108.  view '[path]spcelite.doc'
  109. ef choice = 'R'
  110.  printe 'Space Empire Rules'
  111.  printe
  112.  printe ' Any player that has the protected score of 4000 or below may NOT be'
  113.  printe 'attack in any way, if you do than it will cost you 1/2 your Empire.'
  114. ef choice = 'y'
  115.  printe 'Loading Status...'
  116.  goto status
  117. ef choice = 'a'
  118.  printe 'Activity Report'
  119.  report = 'y'
  120.  goto status
  121. ef choice = 'M'
  122.  printe 'Message Base'
  123.  execute 'd:\empmsg\empmsg.com'
  124. ef choice = 'l'
  125.  goto spc_log
  126. ef choice = 'X'
  127.  printe 'Exit'
  128.  execute 'g:\arcade.com'
  129. ef choice = '?'
  130.  goto menu
  131. else 
  132.  printe 'Enter ? For Help'
  133.  goto get_choice
  134. endif
  135.  
  136. goto get_choice
  137.  
  138.  
  139. SPC_LOG:
  140.  
  141. if command_level 32
  142. else
  143.  goto get_choice
  144. endif
  145.  
  146. printe 'Log'
  147. print '\{T\}oday\"s \{Y\}esterday\"s Log: '
  148. get_key dummy
  149.  
  150. if dummy = 'T'
  151.  printe 'Today'
  152.  printe
  153.  view '[path]selog.txt'
  154. ef dummy = 'Y'
  155.  printe 'Yesterday'
  156.  printe
  157.  view '[path]selog.old'
  158. else
  159.  goto get_choice
  160. endif
  161.  
  162. goto get_choice
  163.  
  164.  
  165. SPC_NEWS:
  166.  
  167. print '\{T\}oday\"s  \{Y\}esterday\"s News: '
  168. get_key dummy
  169.  
  170. if dummy = 'T'
  171.  printe 'Today'
  172.  printe
  173.  view '[path]senews.txt'
  174. ef dummy = 'Y'
  175.  printe 'Yesterday'
  176.  printe
  177.  view '[path]senews.old'
  178. else
  179.  goto get_choice
  180. endif
  181.  
  182. goto get_choice
  183.  
  184.  
  185. SPCEMP:
  186.  
  187. if command_level 1    ;must have access level 1 to play Space Empire
  188. else
  189.  printe
  190.  printe 'Sorry You Are Not Authorized Yet!'
  191.  goto get_choice
  192. endif
  193.  
  194. if calls = '0'  ;Some users call before midnight and wait for the time to
  195.  printe         ;change. This will make them hang up first before playing.
  196.  printe 'Sorry you must call back tomorrow'
  197.  goto get_choice
  198. endif
  199.  
  200. open 'd:\userlog\bbs.log', append  ;Will print out when the user played
  201.  fprinte 'Played Space Empire'     ;to the User Log if you want it.
  202. close
  203.  
  204. if file_exists '[path]senews.txt' ;check first time startup
  205.  open '[path]senews.txt',input    ;Input the date of Space Empire News file.
  206.   finput spc_date 2
  207.   close
  208. else
  209.  goto eof
  210. endif
  211.  
  212. spc_day = copy spc_date,10,2  ;Copying the day from SE news file
  213. date    = copy today_date,4,2 ;Copying the day from current date
  214.  
  215. if date # spc_day  ;If date is not today then make todays, yesterdays news.
  216.  fc = file_copy '[path]senews.txt', '[path]senews.old'
  217.  fc = file_copy '[path]selog.txt', '[path]selog.old'
  218. endif
  219.  
  220.  
  221. RUN_SPCEMP:
  222. open '[path]sename.bbs', output  ;Saving users name for Space Empire
  223.  fprinte '&1'
  224. close
  225.  
  226. cd = file_chgdir path  ;change directory path to Space Empire folder
  227. gem 'spcelite.tos'     ;run Space Empire
  228. cd = file_chgdir 'd:\' ;change directory path back to working BBS path
  229.  
  230. goto menu
  231.  
  232.  
  233. STATUS:           ;get user player status
  234. player_no  = '1'
  235. player_idx = '24'
  236. open '[path]elitplr.dat', input
  237.  
  238. FIND_SE_PLAYER:
  239. if player_no = '25'
  240.  close
  241.  printe
  242.  printe 'Sorry, You Have No Player'
  243.  goto get_choice
  244. endif
  245.  finput se_name player_idx
  246.    player_idx = '22'
  247.   if se_name = &1
  248.    player_lines = '1'
  249.    goto list_player
  250.   else
  251.    increase player_no
  252.    goto find_se_player
  253.   endif
  254.  
  255.  
  256. LIST_PLAYER:
  257. if report = 'y'
  258.  close
  259.  goto list_activity
  260. endif
  261.  
  262. player_idx = '1'
  263.  finput last_date
  264.  finput score
  265.  finput total_planets
  266.  finput food_planets
  267.  finput ore_planets
  268.  finput soldier_planets
  269.  finput unknown
  270.  finput troops
  271.  finput ally
  272.  finput population
  273.  finput food
  274.  finput fighters
  275.  finput credits
  276.  finput generals
  277.  finput def_stations
  278.  finput command_ship
  279.  finput player_name
  280.  finput agents
  281.  finput heavy_cruisers
  282.  finput carriers
  283.  finput turns
  284. close
  285.  
  286. increase player_no
  287. open '[path]insurge.dat', input
  288.  finput insurgents player_no
  289. close
  290.  
  291. open '[path]deadp.dat', input
  292.  finput dead_planets player_no
  293. close
  294.  
  295.  
  296. printe
  297. printe '    Player Name: [player_name]'
  298. ;printe '    Ally Number: [ally]'
  299. printe ' Last Play Date: [last_date]'
  300. printe '     Turns Left: [turns]'
  301. printe '          Score: [score]'
  302. ;printe '  Total Planets: [total_planets]'
  303. printe '   Food Planets: [food_planets]'
  304. printe '    Ore Planets: [ore_planets]'
  305. printe 'Soldier Planets: [soldier_planets]'
  306. printe '     Population: [population]'
  307. printe '           Food: [food]'
  308. printe '        Credits: [credits]'
  309. printe '  Def. Stations: [def_stations]'
  310. printe '   Command Ship: [command_ship]%'
  311. printe '       Generals: [generals]'
  312. printe '         Troops: [troops]'
  313. printe '       Carriers: [carriers]'
  314. printe '       Fighters: [fighters]'
  315. printe ' Heavy Cruisers: [heavy_cruisers]'
  316. printe '         Agents: [agents]'
  317. printe '     Insurgents: [insurgents]'
  318. printe '   Dead Planets: [dead_planets]'
  319.  
  320. goto get_choice
  321.  
  322.  
  323. EOF:
  324. close
  325.  
  326.  open '[path]senews.txt', output  ;if first time - create news files
  327.   fprint 'New Space Times'
  328.   fprint 'As of:&24'
  329.   fprint '---------------'
  330.  close
  331.  open '[path]senews.old', output
  332.  fprinte 'No News...'
  333.  close
  334.  
  335. goto run_spcemp
  336.  
  337.  
  338. LIST_ACTIVITY:
  339. increase player_no
  340.  
  341. if file_exists '[path]sem.[player_no]'
  342.  printe
  343.  view '[path]sem.[player_no]'
  344. endif
  345.  
  346. printe
  347. printe 'No Activity To Report!'
  348.  
  349. report = 'n'
  350. goto get_choice
  351.