home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 2 / FFMCD02.bin / new / amigalibdisks / disk950 / bbdoors / bbdoors65.lha / rexxDoors / Chicago.rexx < prev    next >
OS/2 REXX Batch file  |  1993-10-22  |  49KB  |  1,759 lines

  1. /* Chicago Gangland Version 1.21 by Steve Robbins*/
  2. /* Converted by David Prothero */
  3. /* Converted by David Simpson for BBBBS */
  4. /* Version 1.3 by Matt English 6-21-92.
  5.    New Features: Bugs fixxed, plays better in local mode, and
  6.    UnderWorld Casino at location 25, 25!
  7.  
  8.    New Features in version 1.4: by Matt English 7-10-92
  9.    Full menu option added, Leave a comment to next gangster,
  10.    Game resets and adds winners name to "GangLord Hall of Fame"
  11.    when player reaches 500,000 points.
  12.  
  13.    Version 1.41 7-25-92 by Matt Egnlish
  14.    There was a small bug! Yikes!
  15.  
  16.    Version 1.42 7-26-92 - 1.44 10-22-93 by RLStockton
  17.    To work better without BaudBandit in LOCAL mode
  18. */
  19.  
  20.  
  21. options results
  22.  
  23. CR='0D'x  /* Carraige Return */
  24. CALL TIME('R')
  25. SIGNAL ON BREAK_C
  26. SIGNAL ON BREAK_E
  27.  
  28. bbspath=GETCLIP('BBS_path')
  29. bbspath1 = bbspath'rexxdoors/'
  30. bbspath2=bbspath'rexxDoors/Data/'
  31.  
  32. PARSE arg Username winnings savewinnings colorflag secs .
  33. IF secs='' THEN secs=3600
  34.  
  35. signal on syntax
  36.  
  37. /* Open the support library if it is not already open. */
  38. if ~show('L',"rexxsupport.library") then do
  39.     addlib('rexxsupport.library',0,-30,0)
  40.      end
  41.  
  42. info='s:CONFIG.BBS'
  43. IF ~EXISTS(info) THEN info='BBS:BBS_TEXT/CONFIG.BBS'
  44. call open(con,info,'R')
  45. IF con=0 THEN EXIT
  46. lynes.1=readln(con)
  47.  
  48. compos=POS('/*',lynes.1)
  49. IF compos>0 THEN lynes.1=LEFT(lynes.1,compos-1)
  50.  bbsname=STRIP(lynes.1)
  51. call close(con)
  52.  
  53. Name = Username
  54. Spacename = Name
  55. /*ansiflag = result*/
  56. LINES = 20  /* upper(result) - 2 */
  57. ADDRESS rexx 'random(1,2,time('S'))'
  58. if colorflag = 1 then
  59.   do
  60.     WHITE = ''
  61.     RED = ''
  62.     YELLOW =''
  63.     BLACK = ''
  64.     GREEN = ''
  65.     CYAN = ''
  66.     MAGENTA = ''
  67.     BLUE = ''
  68.     IF ADDRESS()~='BAUD' THEN BLUE=RED
  69.     CLEAR = ''
  70.     HOM = 'H'
  71.     CLSCREEN = ''
  72.   end 
  73. else
  74.   do
  75.     WHITE = ''
  76.     RED = ''
  77.     YELLOW =''
  78.     BLACK = ''
  79.     GREEN = ''
  80.     CYAN = ''
  81.     MAGENTA = ''
  82.     BLUE = ''
  83.     CLEAR = ''
  84.     HOM = ''
  85.     CLSCREEN = ''
  86. end
  87. File.1 =  bbspath2'gangland/instructions'
  88. File.2 =  bbspath2'gangland/news7'
  89. File.3 =  bbspath2'gangland/news6'
  90. File.4 =  bbspath2'gangland/news5'
  91. File.5 =  bbspath2'gangland/news4'
  92. File.6 =  bbspath2'gangland/news3'
  93. File.7 =  bbspath2'gangland/news2'
  94. File.8 =  bbspath2'gangland/news1'
  95. File.9 =  bbspath2'gangland/protect'
  96. File.10 = bbspath2'gangland/position'
  97. File.11 = bbspath2'gangland/chic.oneliner'
  98. File.12 = bbspath2'gangland/chic.fame'
  99. File.13 = bbspath2'gangland/aliases'
  100. File.14 = bbspath2'gangland/top10'
  101. /* Starting Stats */
  102. turnsleft = 25
  103. gangmembers = 50
  104. datec = date()
  105. points = 5000
  106. protection = 0
  107. totalgangmembers = 50
  108. money = 1000
  109. bootleg = 0
  110. costfor = 1
  111. pos = 0
  112. deathflag = 0
  113. menus = 0
  114.   longdashes='-----------------------------------------------------------------------------'
  115. /*begin*/
  116. if exists(bbspath2'gangland/position') then
  117.   do
  118.     call open(lastpos,bbspath2'gangland/position','R')
  119.     do i = 1 to 10000
  120.       mypos.i = readln(lastpos)
  121.       posstartx.i = Word(mypos.i,1)
  122.       posstarty.i = Word(mypos.i,2)
  123.       posgang.i = Word(mypos.i,3)
  124.       posmoney.i = Word(mypos.i,4)
  125.       posalias.i = Delword(mypos.i,1,4)
  126.       if EOF(lastpos) then break
  127.       pos = pos + 1
  128.     end
  129.     call close(lastpos)
  130.   end
  131. call open(prot,file.9,'R')
  132. say'Loading Chicago Gangland...'cr
  133. do c = 1 to 25
  134.    CALL WRITECH(STDOUT,'.')
  135.    do c1 = 1 to 25
  136.       protect.c.c1 = readln(prot)
  137.    end
  138. end
  139. datel = readln(prot)
  140. if datec ~= datel then
  141.   do
  142.     SAY ''||CR
  143.     SAY ''||CR
  144.     SAY CYAN'Standby, running maintenance program.'CLEAR||CR
  145.     call seek(prot,0,'B')
  146.     do i = 1 to 625
  147.         proln.i = readln(prot)
  148.     end
  149.     call close(prot)
  150.     call open(prot,File.9,'W')
  151.     do i = 1 to 625
  152.         call writeln(prot,proln.i)
  153.     end
  154.     call writeln(prot,datec)
  155.     if exists(file.8) then address command 'c:delete 'file.8' quiet'
  156.     if exists(file.7) then address command 'c:rename 'file.7' 'file.8' quiet'
  157.     if exists(file.6) then address command 'c:rename 'file.6' 'file.7' quiet'
  158.     if exists(file.5) then address command 'c:rename 'file.5' 'file.6' quiet'
  159.     if exists(file.4) then address command 'c:rename 'file.4' 'file.5' quiet'
  160.     if exists(file.3) then address command 'c:rename 'file.3' 'file.4' quiet'
  161.     if exists(file.2) then address command 'c:rename 'file.2' 'file.3' quiet'
  162.     call open(news7,file.2,'W')
  163.     call writeln(news7,'******************************************************')
  164.     call writeln(news7,'                THE CHICAGO DAILY NEWS')
  165.     call writeln(news7,'                     'datec)
  166.     call writeln(news7,'******************************************************')
  167.     call writeln(news7,' ')
  168.     call close(news7)
  169.  
  170.     call open(aliases,bbspath2'gangland/aliases','R')
  171.     i = 0
  172.     do until EOF(aliases)
  173.         i = i + 1
  174.         line.i = readln(aliases)
  175.     end
  176.     call close(aliases)
  177.     do u = 1 to 10000
  178.         if u = i then signal cont
  179.         Namem = word(line.u,1)
  180.         if namem = '' then namem = junk
  181.         alias = Delword(line.u,1,1)
  182.         if exists(bbspath2'gangland/'Namem) then
  183.           do
  184.             call open(stats,bbspath2'gangland/'Namem,'R')
  185.             aliasa = readln(stats)
  186.             Turnsleftm = readln(stats)
  187.             gangmembersm = readln(stats)
  188.             datem = readln(stats)
  189.             startxm = readln(stats)
  190.             startym = readln(stats)
  191.             pointsm = readln(stats)
  192.             moneym = readln(stats)
  193.             totalgangmembersm = readln(stats)
  194.             protectionm = readln(stats)
  195.             bootlegm = readln(stats)
  196.             call close(stats)
  197.             protectmoney = protectionm * 200
  198.             bootlegmoney = bootlegm * 500
  199.             moneym = moneym + protectmoney + bootlegmoney
  200.             turnsleftm = 25
  201.             call open(stats,bbspath2'gangland/'Namem,'W')
  202.             call writeln(stats,aliasa)
  203.             call writeln(stats,turnsleftm)
  204.             call writeln(stats,gangmembersm)
  205.             call writeln(stats,datem)
  206.             call writeln(stats,startxm)
  207.             call writeln(stats,startym)
  208.             call writeln(stats,pointsm)
  209.             call writeln(stats,moneym)
  210.             call writeln(stats,totalgangmembersm)
  211.             call writeln(stats,protectionm)
  212.             call writeln(stats,bootlegm)
  213.             call close(stats)
  214.           end
  215.     end
  216.   end
  217. cont:
  218. SAY ''||CR
  219. SAY ''||CR
  220. SAY BLUE'Done'||CR
  221. call close(prot)
  222.                                              
  223. street.1 = First
  224. street.2 = Second
  225. street.3 = Third
  226. street.4 = Fourth
  227. street.5 = Fifth
  228. street.6 = Sixth
  229. street.7 = Seventh
  230. street.8 = Eighth
  231. street.9 = Ninth
  232. street.10 = Tenth
  233. street.11 = Eleventh
  234. street.12 = Twelveth
  235. street.13 = Thirteenth
  236. street.14 = Fourteenth
  237. street.15 = Fifteenth
  238. street.16 = Sixteenth
  239. street.17 = Seventeenth
  240. street.18 = Eighteenth
  241. street.19 = Nineteenth
  242. street.20 = Twentieth
  243. street.21 = Twentyfirst
  244. street.22 = Twentysecond
  245. street.23 = Twentythird
  246. street.24 = Twentyfourth
  247. street.25 = Twentyfifth
  248.  
  249. say CLSCREEN
  250. SAY ''||CR
  251. SAY ''||CR
  252. SAY BLUE'                 +----------------------------------------------+'CLEAR||CR
  253. SAY BLUE'                 |               'YELLOW'CHICAGO GANGLAND'BLUE'               |'CLEAR||CR
  254. SAY BLUE'                 |            'YELLOW'Written for SkyLine BBS'BLUE'           |'CLEAR||CR
  255. SAY BLUE'                 |               'YELLOW'by Steve Robbins'BLUE'               |'CLEAR||CR
  256. SAY BLUE'                 |                'YELLOW'Copyright 1990'BLUE'                |'CLEAR||CR
  257. SAY BLUE'                 |                                              |'CLEAR||CR
  258. SAY BLUE'                 |            'RED'Converted to TransAmiga'BLUE'           |'CLEAR||CR
  259. SAY BLUE'                 |               'RED'by David Prothero'BLUE'              |'CLEAR||CR
  260. SAY BLUE'                 |                                              |'CLEAR||CR
  261. SAY BLUE'                 |              'RED'Converted to BBBBS'BLUE'              |'CLEAR||CR
  262. SAY BLUE'                 |               'RED'by David Simpson'BLUE'               |'CLEAR||CR
  263. SAY BLUE'                 |                                              |'CLEAR||CR
  264. SAY BLUE'                 |       'MAGENTA'Version 1.44 includes UnderWorld'BLUE'       |'CLEAR||CR
  265. SAY BLUE'