home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 2: PC / frozenfish_august_1995.bin / bbs / d09xx / d0950.lha / 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'                 |       'MAGENTA'Casino feature, located at 25, 25.'BLUE'     |'CLEAR||CR
  266. SAY BLUE'                 |             'MAGENTA'by Matt English 7-25-92'BLUE'          |'CLEAR||CR
  267. SAY BLUE'                 |                                              |'
  268. SAY BLUE'                 +----------------------------------------------+'CLEAR||CR
  269. SAY CR
  270. say ''cr
  271. call pressreturn
  272. /*continue*/
  273.  
  274. aliascheck: 
  275. call open(aliases,bbspath2'gangland/aliases','R')
  276. u = 1
  277. do until EOF(aliases)
  278.    alias1.u = readln(aliases)
  279.    alias2.u = word(alias1.u,1)
  280.    alias3.u = Delword(alias1.u,1,1)
  281.    u = u + 1
  282. end
  283. call close(aliases)
  284. marker = u - 1
  285. if ~exists(bbspath2'gangland/'Name) then
  286.   do
  287.     options prompt Magenta'Please enter an alias: '
  288.     pull alias
  289.     options prompt ' '
  290.     if alias = '' then
  291.       do
  292.         SAY RED'You must enter an alias!'CLEAR||CR
  293.         signal aliascheck
  294.       end
  295.     u = 1
  296.     do i = 1 to marker
  297.         if alias = alias3.u then
  298.           do
  299.             SAY RED'That alias is already being used!'||CR
  300.             CALL delay(100)
  301.             signal aliascheck
  302.           end                  
  303.     u = u + 1
  304.     end
  305.     call open(aliases,bbspath2'gangland/aliases','W')
  306.     do i = 1 to (u + 1)
  307.         call writeln(aliases,alias1.i)
  308.     end
  309.     call writeln(aliases,Name' 'alias)
  310.     call close(aliases)
  311.   end
  312. signal begin 
  313.  
  314. begin:
  315. if ~exists(bbspath2'gangland/'Name) then do
  316.    call open(stats,bbspath2'gangland/'Name,'W')
  317.    call writeln(stats,alias)
  318.    call writeln(stats,turnsleft)
  319.    call writeln(stats,gangmembers)
  320.    call writeln(stats,datec)
  321.    startx = upper(random(1,25,time('s')))
  322.    call writeln(stats,startx)
  323.    starty = upper(random(1,25,time('s')))
  324.    call writeln(stats,starty)
  325.    call writeln(stats,points)
  326.    call writeln(stats,money)
  327.    call writeln(stats,totalgangmembers)
  328.    call writeln(stats,protection)
  329.    call writeln(stats,bootleg)
  330.    call close(stats)
  331.    call open(news7,file.2,'A')
  332.    call writeln(news7,'Ganglord 'alias' has moved into the Chicago!')
  333.    call close(news7)
  334.    signal menuopt
  335. end
  336. else do    
  337.    call open(stats,bbspath2'gangland/'Name,'R')
  338.    alias = readln(stats)
  339.    Turnsleft = readln(stats)
  340.    gangmembers = readln(stats)
  341.    date = readln(stats)
  342.    startx = readln(stats)
  343.    starty = readln(stats)
  344.    points = readln(stats)
  345.    money = readln(stats)
  346.    totalgangmembers = readln(stats)
  347.    protection = readln(stats)
  348.    bootleg = readln(stats)
  349.    call close(stats)
  350.    if datec = date & turnsleft = 0 then do
  351.       say CLSCREEN
  352.       SAY ''||CR
  353.       SAY RED'You are out of turns for today!'CLEAR||CR
  354.       CALL delay(100)
  355.       signal quickexit
  356.    end   
  357.    if datec ~= date then turnsleft = 25
  358.    call open(news7,file.2,'A')
  359.    call writeln(news7,'Ganglord 'alias' is active again!')
  360.    call close(news7)
  361.    signal menuopt
  362. end
  363.  
  364. menuopt:
  365.  say ''cr
  366. options prompt'   Would you like to have full menus for this game? (N,y) > '
  367. pull menuans
  368. if menuans = 'Y' then menus = 1
  369. if menuans = 'N' then do
  370.  say ''cr
  371.  say' OK, no menus. If you change your mind, type ''T'' at the prompt.'cr
  372.  end
  373. say ''cr
  374. signal Fame
  375.  
  376. Fame:
  377.  if exists(file.12) then do
  378.   call open(fm,file.12,'R')
  379.   fameline = '********************************************'
  380.   fameline = center(fameline,70)
  381.   say MAGENTA''fameline''cr
  382.   headerline = 'GangLord Hall of Fame'
  383.   headerline = center(headerline,70)
  384.   say YELLOW''headerline''cr
  385.   say MAGENTA''fameline''CLEAR''cr
  386.   say ''cr
  387.    do until eof(fm)
  388.     fmline = readln(fm)
  389.     fmline = center(fmline,70)
  390.     say GREEN''fmline''clear''cr
  391.     end
  392.   say ''cr
  393.   say ''cr
  394.   call close(fm)
  395.   end
  396.   CALL delay(100)
  397.  signal readoneliner
  398.  
  399. readoneliner:
  400. if ~exists(file.11) then signal MAIN
  401. say ''cr
  402. call open(fny,file.11,'R');mess=readln(fny);bywhom=readln(fny)
  403. say ''longdashes''cr;say ''CYAN''mess ''YELLOW''bywhom''CLEAR''cr;say ''longdashes''cr
  404. call close(fny);call delay(200)
  405. signal MAIN
  406.  
  407. main:
  408. if startx = 1 & starty = 1 then signal pool
  409. if startx = 25 & starty = 25 then signal casino
  410. say CLSCREEN
  411. if menus = 1 then do
  412.   SAY ''||CR
  413.    SAY '          'YELLOW'Q = Quit to' bbsname ''||CR
  414.    SAY '          S = Shootout'||CR
  415.    SAY '          O = Offer protection to the storeowners'||CR
  416.    SAY '          A = Add more protection to this block'||CR
  417.    SAY '          H = Hit the the protected block of another gang'||CR
  418.    SAY '          M = Move to another block'||CR
  419.    SAY '          G = Ganglord scores'||CR
  420.    SAY '          N = Chicago Daily News'||CR
  421.    SAY '          I = Instructions'||CR
  422.    SAY '          Y = Your statistics'||CR
  423.    SAY '          T = Toggle menus on/off'CLEAR||CR
  424.    SAY ''||CR
  425.   end
  426. SAY center(''GREEN''alias'',70)||CR
  427. SAY ''||CR
  428. SAY CYAN'You are at the corner of 'street.startx' North and 'street.starty' East'||CR
  429. SAY 'You have 'gangmembers' gangmembers with you'||CR
  430. protect_alias = Delword(protect.startx.starty,1,1)
  431. protect_gang = Word(protect.startx.starty,1)
  432. if protect_alias ~= '' then do
  433.    proflag = 0
  434.    SAY 'This block is protected by' GREEN||protect_alias||CLEAR||CR
  435. end
  436. else do
  437.    SAY 'This block is not under protection'||CLEAR||CR
  438.    proflag = 1
  439. end
  440. if 1 <= pos then do i = 1 to pos
  441.    if posstartx.i = startx & posstarty.i = starty & alias ~= posalias.i then
  442.    SAY 'You also see 'posalias.i' on this block there are 'posgang.i' gangmembers with him!'||CR
  443. end
  444. SAY ''||CR
  445. Options prompt MAGENTA'Q S O A H M G N I Y T ? ('YELLOW||turnsleft||MAGENTA')>'CLEAR
  446. pull ans
  447. CALL checkBBS()
  448. if ans = '###PANIC' then signal goodbye
  449. if ans = 'Q' then signal goodbye
  450. if ans = 'S' then signal shootout
  451. if ans = 'O' then signal protection
  452. if ans = 'A' then signal addon
  453. if ans = 'H' then signal hitother
  454. if ans = 'M' then signal move
  455. if ans = 'G' then signal highscores
  456. if ans = 'N' then signal news
  457. if ans = 'I' then signal instructions
  458. if ans = 'Y' then signal stats
  459. if ans = 'T' then do
  460.  say ''cr
  461.  if menus = 0 then do
  462.   say'  OK, I''ll turn your menus on!'cr
  463.   menus = 1
  464.   say ''cr
  465.   signal main
  466.   end
  467.  if menus = 1 then do
  468.   say'  OK, your menus are now turned off.'cr
  469.   menus = 0
  470.   say ''cr
  471.   signal main
  472.   end
  473. end
  474. if ans = '' then signal main
  475. if ans = '?' then do
  476.    SAY ''||CR
  477.    SAY '          'YELLOW'Q = Quit to' bbsname ''||CR
  478.    SAY '          S = Shootout'||CR
  479.    SAY '          O = Offer protection to the storeowners'||CR
  480.    SAY '          A = Add more protection to this block'||CR
  481.    SAY '          H = Hit the the protected block of another gang'||CR
  482.    SAY '          M = Move to another block'||CR
  483.    SAY '          G = Ganglord scores'||CR
  484.    SAY '          N = Chicago Daily News'||CR
  485.    SAY '          I = Instructions'||CR
  486.    SAY '          Y = Your statistics'||CR
  487.    SAY '          T = Toggle menus'CLEAR||CR
  488.    SAY ''||CR
  489.    call pressreturn
  490.    /*continue*/
  491. end
  492. signal main
  493.      
  494. pool:
  495. say CLSCREEN
  496. if menus = 1 then do
  497.    SAY ''||CR
  498.    SAY '          'YELLOW'M = Move'||CR
  499.    SAY '          H = Hire new gangmembers'||CR
  500.    SAY '          B = Buy a bootleg operation'||CR
  501.    SAY '          G = Gamble at a game of pool'||CR
  502.    SAY '          Q = Quit to 'bbsname ''CLEAR||CR
  503.    SAY ''||CR
  504.   end
  505. say yellow'Check out the UnderWorld Casino! At 25, 25.'clear||cr
  506. say ''cr
  507. SAY GREEN'Welcome to the Southside Pool Hall'||CR
  508. SAY 'What is your pleasure?'CLEAR||CR
  509. SAY ''||CR
  510. Options Prompt YELLOW'M H B G Q ? ('turnsleft')>'CLEAR
  511. pull ANS
  512. if ans = '###PANIC' then signal goodbye
  513. if ans = 'M' then signal move
  514. if ans = 'H' then signal hire
  515. if ans = 'B' then signal still
  516. if ans = 'G' then signal gamble
  517. if ans = 'Q' then do
  518.    startx = upper(random(1,25,time('s')))
  519.    starty = upper(random(1,25,time('s')))
  520.    signal goodbye
  521. end
  522. if ans = '' then signal pool
  523. if ans = '?' then do
  524.    SAY ''||CR
  525.    SAY '          'YELLOW'M = Move'||CR
  526.    SAY '          H = Hire new gangmembers'||CR
  527.    SAY '          B = Buy a bootleg operation'||CR
  528.    SAY '          G = Gamble at a game of pool'||CR
  529.    SAY '          Q = Quit to 'bbsname ''CLEAR||CR
  530.    SAY ''||CR
  531.    call pressreturn
  532.    /*continue*/
  533. end
  534. signal main
  535.  
  536. casino:
  537. say CLSCREEN
  538. if menus = 1 then do
  539.    SAY ''||CR
  540.    SAY '          'YELLOW'M = Move'||CR
  541.    SAY '          H = Hire new gangmembers'||CR
  542.    SAY '          B = Play a hand of BlackJack'||CR
  543.    SAY '          S = Try the Slot machine'||CR
  544.    SAY '          Q = Quit to 'bbsname ''CLEAR||CR
  545.    SAY ''||CR
  546.    end
  547. SAY GREEN'   Welcome to the Underworld Casino'||CR
  548. SAY '   What is your pleasure?'CLEAR||CR
  549. say'   You have $'money''cr
  550. SAY ''||CR
  551. Options Prompt YELLOW'M H B S Q ? ('turnsleft')>'CLEAR
  552. pull ANS
  553. if ans = '###PANIC' then signal goodbye
  554. if ans = 'M' then signal move
  555. if ans = 'H' then signal hire
  556. if ans = 'B' then signal BlackJack
  557. if ans = 'S' then signal Slots
  558. if ans = 'Q' then do
  559.    startx = upper(random(1,25,time('s')))
  560.    starty = upper(random(1,25,time('s')))
  561.    signal goodbye
  562. end
  563. if ans = '' then signal pool
  564. if ans = '?' then do
  565.    SAY ''||CR
  566.    SAY '          'YELLOW'M = Move'||CR
  567.    SAY '          H = Hire new gangmembers'||CR
  568.    SAY '          B = Play a hand of BlackJack'||CR
  569.    SAY '          S = Try the Slot machine'||CR
  570.    SAY '          Q = Quit to 'bbsname ''CLEAR||CR
  571.    SAY ''||CR
  572.    call pressreturn
  573.    /*continue*/
  574. end
  575. signal main
  576.  
  577. BlackJack:
  578.    if money < 1 then do
  579.     say'  You don''t seem to have any cash at this time!'cr
  580.     say'  Sorry, but we don''t play for the fun of it!'
  581.     call casino
  582.     end
  583.    if turnsleft < 1 then do
  584.     say'  Sorry, you don''t have any turns left!'cr
  585.     say'  Try again next time!'cr
  586.     say''cr
  587.     call casino
  588.     end
  589.    turnsleft = turnsleft - 1
  590.    CALL SetClip('CHICMON',money)
  591.    if colorflag = 1 then CALL SetClip('CHICCOLOR','1')
  592.    say ''cr
  593.    say'   OK, let''s play a hand of BlackJack!'
  594.  
  595. /*trace ?r  */
  596.  
  597. curdir=PRAGMA('D')
  598. CALL setdir(bbspath'rexxDoors')
  599.  
  600.    say ''cr
  601.    /*INTERPRET BlackJack.rexx*/
  602.    doors.temp = BlackJack.rexx
  603.    INTERPRET 'call' doors.temp
  604.  
  605.    money = GetClip('CHICMON')
  606.    CALL SetClip('CHICMON','')
  607.    CALL SetClip('CHICCOLOR','')
  608.    say ''cr
  609.    CALL setdir(curdir)
  610.    Call casino
  611.  
  612. Slots:
  613.    if money < 1 then do
  614.     say'  You don''t seem to have any cash at this time!'cr
  615.     say'  Sorry, but we don''t play for the fun of it!'
  616.     call casino
  617.     end
  618.    if turnsleft < 1 then do
  619.     say'  Sorry, you don''t have any turns left!'cr
  620.     say'  Try again next time!'cr
  621.     say''cr
  622.     call casino
  623.     end
  624.    turnsleft = turnsleft - 1
  625.    CALL SetClip('CHICMON',money)
  626.    if colorflag = 1 then CALL SetClip('CHICCOLOR','1')
  627.    say ''cr
  628.    /*say'   OK, let''s play a hand of BlackJack!'*/
  629.  
  630. /*trace ?r  */
  631.  
  632. curdir=PRAGMA('D')
  633. CALL setdir(bbspath'rexxDoors')
  634.  
  635.    say ''cr
  636.    /*INTERPRET BlackJack.rexx*/
  637.    doors.temp = One_Armed_Bandit.rexx
  638.    INTERPRET 'call' doors.temp
  639.  
  640.    money = GetClip('CHICMON')
  641.    CALL SetClip('CHICMON','')
  642.    CALL SetClip('CHICCOLOR','')
  643.    say ''cr
  644.    CALL setdir(curdir)
  645.    Call casino
  646.  
  647.  
  648. setdir:
  649. PARSE ARG tempdir
  650. CALL PRAGMA('D',STRIP(tempdir))
  651. directory=PRAGMA('D')
  652. slash=LASTPOS('/',directory)
  653. IF slash=0 THEN slash=LASTPOS(':',directory)
  654. plaindir=directory
  655. IF slash>0 THEN plaindir=SUBSTR(plaindir,slash+1)
  656. RETURN
  657.  
  658.  
  659. hire:
  660. say CLSCREEN
  661.    if turnsleft < 1 then do
  662.     say'  Sorry, you don''t have any turns left!'cr
  663.     say'  Try again next time!'cr
  664.     say''cr
  665.     signal main
  666.     end
  667. cost = random(100,200,time('s'))
  668. if costfor > cost then cost = costfor
  669. costfor = cost
  670. SAY CYAN'New gangmembers salaries are 'cost' dollars each.'||CR
  671. SAY 'You currently have 'gangmembers 'gangmembers and 'money' dollars.'||CR
  672. SAY ''||CR
  673. possible = money % cost
  674. options prompt MAGENTA'How many gangmembers would you like to hire?('possible' max)'
  675. pull newgang
  676. options prompt ' '
  677. if newgang = 0 | newgang = '' then signal /*pool*/main
  678. do i = 1 to length(newgang)
  679.    if ~datatype(substr(newgang,i,1),N) then do
  680.       SAY RED'You must enter a valid number!'||CR
  681.       CALL delay(100)
  682.       /*signal pool */
  683.       signal main
  684.    end
  685. end
  686. totcost = cost * newgang
  687. if totcost > money then do
  688.    SAY RED'You don''t have enough money for 'newgang' gangmembers!'||CR
  689.    CALL delay(100)
  690.    /*signal pool*/
  691.    signal main
  692. end
  693. SAY MAGENTA'The total of the salaries will be 'totcost' dollars.'||CR
  694. SAY ''||CR
  695. options prompt CYAN'Are you sure you want to hire them? 'CLEAR
  696. pull ans
  697. options prompt ' '
  698. if ans = N then signal /*pool*/main
  699. money = money - totcost
  700. gangmembers = gangmembers + newgang
  701. totalgangmembers = totalgangmembers + newgang
  702. turnsleft = turnsleft - 1
  703. /*signal pool*/
  704. signal main
  705.  
  706. still:
  707.    if turnsleft < 1 then do
  708.     say'  Sorry, you don''t have any turns left!'cr
  709.     say'  Try again next time!'cr
  710.     say''cr
  711.     signal main
  712.     end
  713. if money < 5000 then do
  714.    SAY RED'You do not have enough money!'CLEAR||CR
  715.    CALL delay(100)
  716.    signal pool
  717. end
  718. SAY ''||CR
  719. SAY ''||CR
  720. SAY MAGENTA'Bootleg operations cost $5000 each. You have 'money' dollars.'||CR
  721. options prompt 'How many bootleg operations would you like to purchase?  '
  722. pull ans
  723. do i = 1 to length(ans)
  724.    if ~datatype(substr(ans,i,1),N) then do
  725.       SAY RED'You must enter a valid number!'||CR
  726.       CALL delay(100)
  727.       /*signal pool */
  728.       signal still
  729.    end
  730. end
  731. if ans = '' then signal pool
  732. cost = 5000 * ans
  733. if money < cost then do
  734.    SAY RED'You do not have that much money!'||CR
  735.    signal still
  736. end
  737. options prompt 'It will cost you 'cost' dollars. Are you sure? '
  738. pull ans2
  739.  
  740. if ans2 = 'N' then signal pool
  741. money = money - cost
  742. bootleg = bootleg + ans
  743. SAY ''||CR
  744. SAY CYAN'Nice doing business with you.'CLEAR||CR
  745. turnsleft = turnsleft - 1
  746. CALL delay(100)
  747. signal pool
  748.  
  749. gamble:
  750. say CLSCREEN
  751.    if turnsleft < 1 then do
  752.     say'  Sorry, you don''t have any turns left!'cr
  753.     say'  Try again next time!'cr
  754.     say''cr
  755.     signal pool
  756.     end
  757. options prompt CYAN'You have $'money', how much would you like to bet?($500 limit)'CLEAR
  758. pull bet
  759. options prompt ' '
  760. if bet > 500 then signal gamble
  761. do i = 1 to length(bet)
  762.    if ~datatype(substr(bet,i,1),N) then do
  763.       SAY RED'You must enter a valid whole number!'||CR
  764.       CALL delay(100)
  765.       signal pool
  766.    end
  767. end
  768. SAY ''||CR
  769. if bet > money then do
  770.   SAY RED'You don''t have that much money'CLEAR||CR
  771.   signal pool
  772.   end
  773. win = random(1,3,time('s'))
  774. if bet = '' then signal pool
  775. turnsleft = turnsleft - 1
  776. SAY YELLOW'Rack''em up'||CR
  777. CALL delay(100)
  778. SAY ''||CR
  779. if win = 2 then do
  780.    how = random(1,6,time('s'))
  781.    select
  782.       when how = 1 then SAY MAGENTA'You sank the 8 ball off the break!'||CR
  783.       when how = 2 then SAY MAGENTA'You left him with all 7 balls on the table'||CR
  784.       when how = 3 then SAY MAGENTA'You squeak out a victory by sinking the 8 ball'||CR
  785.       when how = 4 then SAY MAGENTA'He scratches on the 8 ball.'||CR
  786.       when how = 5 then SAY MAGENTA'You leave him with 3 balls on the table. Good work.'||CR
  787.       otherwise SAY MAGENTA'You run the table on him!'||CR
  788.    end
  789.    money = money + bet
  790.    SAY ''||CR
  791.    SAY GREEN'You win!'||CR
  792. end
  793. if win = 1 | win = 3 then do
  794.    how = random(1,6,time('s'))
  795.    select
  796.       when how = 1 then SAY GREEN'He sinks the 8 ball off the break!'||CR
  797.       when how = 2 then SAY GREEN'He left you with all 7 balls on the table'||CR
  798.       when how = 3 then SAY GREEN'He squeaks out a victory by sinking the 8 ball'||CR
  799.       when how = 4 then SAY GREEN'You scratch on the 8 ball. Tough Luck!'||CR
  800.       when how = 5 then SAY GREEN'He leaves you with 3 balls on the table.'||CR
  801.       otherwise SAY GREEN'He runs the table on you!'||CR
  802.    end
  803.    money = money - bet
  804.    SAY ''||CR
  805.    SAY RED'You lose!'||CR
  806. end
  807. CALL delay(100)
  808. signal pool
  809.  
  810. shootout:killflag = 0
  811. shoottotal = 0
  812. say CLSCREEN
  813. do i = 1 to pos
  814.    if posstartx.i = startx & posstarty.i = starty & alias ~= posalias.i then do
  815.       shoottotal = shoottotal + 1
  816.    end
  817. end
  818. if shoottotal = 0 then do
  819.    SAY RED'There is no one to attack!'||CR
  820.    CALL delay(100)
  821.    signal main
  822. end
  823. SAY MAGENTA'Ganglords at your block:'||CR
  824. SAY ''||CR
  825. do i = 1 to pos
  826.    if posstartx.i = startx & posstarty.i = starty & alias ~= posalias.i then do
  827.       SAY BLUE posalias.i  'with' posgang.i 'gangmembers'||CR
  828.       shoottotal = shoottotal + 1
  829.    end
  830. end
  831. SAY ''||CR
  832. w = 0
  833. options prompt MAGENTA'Who do you want to attack?(Return to Quit) '
  834. pull victim
  835. options prompt ' '
  836. if victim = "" then signal main
  837. do i = 1 to pos
  838.    if victim = posalias.i then do
  839.       w = 1
  840.       r = i 
  841.       fight2 = posgang.i
  842.       break
  843.    end
  844.    if w = 1 then break
  845. end
  846. if posalias.r ~= victim then do
  847.    SAY RED'There is no one at this block by that name!'||CR
  848.    CALL delay(100)
  849.    signal main
  850. end
  851. fight3 = fight2
  852. yourper1 = (gangmembers / (gangmembers + fight2)) * 100
  853. if yourper1 > 95 then yourper1 = 95
  854. if yourper1 < 5 then yourper1 = 5
  855. if w = 0 then signal shootout
  856. call open(news7,file.2,'A')
  857. call writeln(news7,'Ganglord 'alias' tries to have a shootout with 'victim'.')
  858. call close(news7)
  859. fight1 = gangmembers
  860. say CLSCREEN
  861. SAY MAGENTA'         Your gang:                      His gang:'CR
  862. SAY BLUE   '        ----------                      ---------'CR
  863.  
  864. shootagain:
  865. say cyan   '             'gangmembers'                                'fight2''CR
  866. SAY ''||CR
  867. if killflag = 0 then do
  868.    options prompt YELLOW'RETURN to Continue  K to Kill  Q to Quit '
  869.    pull ans
  870.    if ans = Q then signal quitter2
  871.    if ans = K then killflag = 1
  872. end
  873. losers1 = Random(1,100)
  874. if yourper1 >= losers1 then fight2 = fight2 - 1
  875. else gangmembers = gangmembers - 1
  876. /*if gangmembers <= -1 then do
  877.    gangmembers = -1
  878.    signal shootyou
  879. end
  880. if fight2 <= -1 then do
  881.    fight2 = -1
  882.    signal shoothim */
  883. if gangmembers <= 0 then do
  884.    gangmembers = 0
  885.    signal shootyou
  886. end
  887. if fight2 <= 0 then do
  888.    fight2 = 0
  889.    signal shoothim
  890. end
  891. /*if colorflag = 1 then do
  892.    SAY HOM||CR
  893.    SAY ''||CR
  894.    SAY ''||CR
  895.    SAY ''||CR
  896.    SAY ''||CR
  897.    SAY '                                                  '||CR
  898.    SAY HOM||CR
  899.    SAY ''||CR
  900.    SAY ''||CR
  901. end      */
  902. signal Shootagain 
  903.               
  904. shootyou:
  905. /*if colorflag = 1 then do
  906.    SAY HOM||CR
  907.    SAY ''||CR
  908.    SAY ''||CR
  909.    SAY ''||CR
  910.    SAY ''||CR
  911.    SAY '                                                  '||CR
  912.    SAY HOM||CR
  913.    SAY ''||CR
  914.    SAY ''||CR
  915. end  */
  916. say cyan   '             'gangmembers'                                'fight2''CR
  917. SAY ''||CR
  918. CALL delay(50)
  919. call open(aliases,bbspath2'gangland/aliases','R')
  920. u = 1
  921. do until EOF(aliases)
  922.   alias1.u = readln(aliases)
  923.    alias2.u = word(alias1.u,1)
  924.    alias3.u = Delword(alias1.u,1,1)
  925.    if alias3.u = victim then do
  926.       aliasfix = alias2.u
  927.       signal shootyou1
  928.    end
  929.    u = u + 1
  930. end
  931.  
  932. shootyou1:
  933. call close(aliases)
  934. call open(provictim,bbspath2'gangland/'aliasfix,'R')
  935. vicalias = readln(provictim)
  936. vicTurnsleft = readln(provictim)
  937. vicgangmembers = readln(provictim)
  938. vicdate = readln(provictim)
  939. vicstartx = readln(provictim)
  940. vicstarty = readln(provictim)
  941. vicpoints = readln(provictim)
  942. vicmoney = readln(provictim)
  943. victotalgangmembers = readln(provictim)
  944. vicprotection = readln(provictim)
  945. vicbootleg = readln(provictim)
  946. call close(provictim)
  947. vicgangmembers = vicgangmembers - (fight3 - fight2)
  948. victotalgangmembers = victotalgangmembers - (fight3 - fight2)
  949. pointsg = victotalgangmembers * 100
  950. pointsp = vicprotection * 1000
  951. vicpoints = pointsg + pointsp
  952. vicmoney = vicmoney + money
  953. vicbootleg = vicbootleg + bootleg
  954. call open(provictim,bbspath2'gangland/'aliasfix,'W')
  955. call writeln(provictim,vicalias)
  956. call writeln(provictim,victurnsleft)
  957. call writeln(provictim,vicgangmembers)
  958. call writeln(provictim,vicdate)
  959. call writeln(provictim,vicstartx)
  960. call writeln(provictim,vicstarty)
  961. call writeln(provictim,vicpoints)
  962. call writeln(provictim,vicmoney)
  963. call writeln(provictim,victotalgangmembers)
  964. call writeln(provictim,vicprotection)
  965. call writeln(provictim,vicbootleg)
  966. call close(provictim)
  967. call open(top10,bbspath2'gangland/top10','R')
  968. do i = 2 to 11
  969.    tops = readln(top10)
  970.    topalias.i = delword(tops,1,1)
  971.    topscore.i = word(tops,1)
  972.    if victim = topalias.i then topscore.i = vicpoints
  973. end
  974. call close(top10)
  975. call open(top10,bbspath2'gangland/top10','W')
  976. do i = 1 to 10
  977.    call writeln(top10,topscore.i' 'topalias.i)
  978. end
  979. call close(top10)
  980. call open(news7,file.2,'A')
  981. call writeln(news7,'Ganglord 'alias' is killed by 'victim'''s gang!')
  982. call close(news7)
  983. signal death
  984.  
  985. shoothim:
  986. /*if colorflag = 1 then do
  987.    SAY HOM||CR
  988.    SAY ''||CR
  989.    SAY ''||CR
  990.    SAY ''||CR
  991.    SAY ''||CR
  992.    SAY '                                                  '||CR
  993.    SAY HOM||CR
  994.    SAY ''||CR
  995.    SAY ''||CR
  996. end   */
  997. say cyan   '             'gangmembers'                                'fight2''CR
  998. SAY ''||CR
  999. SAY center(YELLOW'You wipe him out!',76)||CR
  1000. totalgangmembers = totalgangmembers - (Fight1 - gangmembers)
  1001. call open(aliases,bbspath2'gangland/aliases','R')
  1002. u = 1
  1003. do until EOF(aliases)
  1004.    alias1.u = readln(aliases)
  1005.    alias2.u = word(alias1.u,1)
  1006.    alias3.u = Delword(alias1.u,1,1)
  1007.    if alias3.u = victim then break
  1008.    u = u + 1
  1009. end
  1010. call close(aliases)
  1011. call open(provictim,bbspath2'gangland/'alias2.u,'R')
  1012. vicalias = readln(provictim)
  1013. vicTurnsleft = readln(provictim)
  1014. vicgangmembers = readln(provictim)
  1015. vicdate = readln(provictim)
  1016. vicstartx = readln(provictim)
  1017. vicstarty = readln(provictim)
  1018. vicpoints = readln(provictim)
  1019. vicmoney = readln(provictim)
  1020. victotalgangmembers = readln(provictim)
  1021. vicprotection = readln(provictim)
  1022. vicbootleg = readln(provictim)
  1023. call close(provictim)
  1024. money = vicmoney + money
  1025. bootleg = vicbootleg + bootleg
  1026. do i = 1 to pos
  1027.    if victim = posalias.i then do
  1028.       money = money + posmoney.i
  1029.       mypos.i = ''
  1030.       posstartx.i = ''
  1031.       posstarty.i = ''
  1032.       posgang.i = ''
  1033.       posmoney.i = ''
  1034.       posalias.i = ''
  1035.    end
  1036. end
  1037. call open(aliases,bbspath2'gangland/aliases','R')
  1038. do o = 1 to 10000
  1039.    alias1.o = readln(aliases)
  1040.    alias2.o = Word(alias1.o,1)
  1041.    alias3.o = Delword(alias1.o,1,1)
  1042.    if victim = alias3.o then do
  1043.       /*delete(bbspath2'gangland/'alias2.o)*/
  1044.       address command 'c:delete 'bbspath2'gangland/'alias2.o' quiet'
  1045.       alias1.o = ''
  1046.    end
  1047.    if EOF(aliases) then break
  1048. end
  1049. j = o
  1050. call close(aliases)
  1051. call open(aliases,bbspath2'gangland/aliases','W')
  1052. do o = 1 to 10000
  1053.    if alias1.o ~= '' then call writeln(aliases,alias1.o)
  1054.    if o = j then break 
  1055. end
  1056. call close(aliases)
  1057. do c = 1 to 25
  1058.    do c1 = 1 to 25
  1059.       if Delword(protect.c.c1,1,1) = victim then
  1060.       protect.c.c1 = 0
  1061.     end
  1062. end
  1063. SAY ''||CR
  1064. call open(top10,bbspath2'gangland/top10','R')
  1065. do i = 1 to 10
  1066.    tops.i = readln(top10)
  1067.    if delword(tops.i,1,1) = victim then tops.i = '0 'victim
  1068. end
  1069. call close(top10)
  1070. call open(top10,bbspath2'gangland/top10','W')
  1071. do i = 1 to 10
  1072.    call writeln(top10,tops.i)
  1073. end
  1074. call close(top10)
  1075. call open(news7,file.2,'A')
  1076. call writeln(news7,'Ganglord 'alias' slaughters 'victim)
  1077. call close(news7)
  1078. signal main
  1079.  
  1080. quitter2:
  1081. do i = 1 to pos
  1082.    if victim = posalias.i then do
  1083.       w = 1 
  1084.       posgang.i = fight2
  1085.       break
  1086.    end
  1087. end
  1088. call open(news7,file.2,'A')
  1089. call writeln(news7,'Ganglord 'alias' runs from the shootout.')
  1090. call close(news7)
  1091. SAY center(YELLOW'Chicken!',76)||CR
  1092. CALL delay(100)
  1093. signal main
  1094.  
  1095. protection:
  1096. if gangmembers < 1 then do
  1097.    SAY ''||CR
  1098.    SAY RED'You don''t have enough gangmembers with you to offer protection!'CLEAR||CR
  1099.    CALL delay(100)
  1100.    signal main
  1101. end
  1102. protectors = word(protect.startx.starty,1)
  1103. if protectors = 0 then signal noprotect
  1104. do
  1105.    protect_alias = Delword(protect.startx.starty,1,1)
  1106.    SAY ''||CR
  1107.    SAY ''||CR
  1108.    SAY RED'The block already has protection from 'protect_alias'!'CLEAR||CR
  1109.    CALL delay(100)
  1110.    signal main 
  1111. end
  1112.  
  1113. noprotect:
  1114. SAY ''||CR
  1115. options prompt GREEN'How many gangmembers do you want to leave here?'CLEAR
  1116. pull protectors
  1117. options prompt ' '
  1118. if protectors = 0 then signal main
  1119. if protectors = ' ' then signal main
  1120. do i = 1 to length(protectors)
  1121.    if ~datatype(substr(protectors,i,1),N) then do
  1122.       SAY RED'You must enter a valid whole number!'||CR
  1123.       CALL delay(100)
  1124.       signal main
  1125.    end
  1126. end
  1127. if gangmembers - protectors < 0 then do
  1128.    SAY RED'You don''t have that many gangmembers!'||CR
  1129.    signal noprotect
  1130. end
  1131. gangmembers = gangmembers - protectors
  1132. protection = protection + 1
  1133. protect.startx.starty = protectors' 'alias
  1134. turnsleft = turnsleft - 1
  1135. signal main
  1136.  
  1137. addon:
  1138. say CLSCREEN
  1139. protect_gang = word(protect.startx.starty,1)
  1140. if protect_alias ~= alias then do
  1141.    SAY RED'You have to move to a block you are protecting to add gangmembers'CLEAR||CR
  1142.    CALL delay(100)
  1143.    signal main
  1144. end
  1145. SAY GREEN'You currently have 'protect_gang' gangmembers protecting this block.'||CR
  1146. options prompt GREEN'How many gangmembers do you want to add?'
  1147. pull addto
  1148. options prompt ' '
  1149. if addto = '' then signal main
  1150. if gangmembers - addto < 0 then do
  1151.    SAY RED'You don''t have that many gangmembers!'||CR
  1152.    CALL delay(100)
  1153.    signal main
  1154. end
  1155. if protect_gang + addto < 1 then do
  1156.    SAY RED'You can''t have less than 1 gangmember!'||CR
  1157.    CALL delay(100)
  1158.    signal main
  1159. end
  1160. protect_add = addto + protect_gang
  1161. protect.startx.starty = protect_add ' ' alias
  1162. gangmembers = gangmembers - addto
  1163. signal main
  1164.  
  1165. hitother:
  1166. killflag = 0
  1167. say CLSCREEN
  1168. if proflag = 1 then do
  1169.    SAY RED'There is no one protecting this block!'CLEAR||CR
  1170.    CALL delay(100)
  1171.    signal main
  1172. end
  1173. if alias = protect_alias then do
  1174.    SAY RED'You cannot attack yourself!'||CR
  1175.    CALL delay(100)
  1176.    signal main
  1177. end
  1178. lostgang = protect_gang
  1179. yourper = (gangmembers / (gangmembers + lostgang)) * 100
  1180. if yourper > 95 then yourper = 95
  1181. call open(news7,file.2,'A')
  1182. call writeln(news7,'Ganglord 'alias' tries to hit 'protect_alias'''s block.')
  1183. call close(news7)
  1184. SAY MAGENTA'           Your gang:                      His gang:'CR
  1185. SAY BLUE   '          ----------                      ---------'CR
  1186.  
  1187. hitagain:
  1188. say cyan   '               'gangmembers'                              'protect_gang''CR
  1189. SAY ''||CR
  1190. if killflag = 0 then do
  1191.    options prompt YELLOW'RETURN to Continue  K to kill  Q to Quit '
  1192.    pull ANS
  1193.    if ans = Q then signal quitter
  1194.    if ans = K then killflag = 1
  1195. end
  1196. losers = random(1,100)
  1197. if yourper >= losers then Protect_gang = Protect_gang - 1
  1198. else gangmembers = gangmembers - 1
  1199. if gangmembers <= -1 then do
  1200.    gangmembers = -1
  1201.    signal hityou
  1202. end
  1203. if protect_gang <= 0 then do
  1204.    protect_gang = 0
  1205.    signal hitthem
  1206. end
  1207. /*if colorflag = 1 then do
  1208.    SAY HOM||CR
  1209.    SAY ''||CR
  1210.    SAY ''||CR
  1211.    SAY ''||CR
  1212.    SAY ''||CR
  1213.    SAY '                                                  '||CR
  1214.    SAY HOM||CR
  1215.    SAY ''||CR
  1216.    SAY ''||CR
  1217. end  */
  1218. signal hitagain   
  1219.  
  1220. Hityou:
  1221. /*if colorflag = 1 then do
  1222.    SAY HOM||CR
  1223.    SAY ''||CR
  1224.    SAY ''||CR
  1225.    SAY ''||CR
  1226.    SAY ''||CR
  1227.    SAY '                                                  '||CR
  1228.    SAY HOM||CR
  1229.    SAY ''||CR
  1230.    SAY ''||CR
  1231. end  */
  1232. say cyan   '               'gangmembers'                              'protect_gang''CR
  1233. SAY ''||CR
  1234. protect.startx.starty = protect_gang' 'protect_alias
  1235. CALL delay(100)
  1236. call open(news7,file.2,'A')
  1237. call writeln(news7,'Ganglord 'alias' is killed by 'protect_gang'''s gang!')
  1238. call close(news7)
  1239. signal death
  1240.  
  1241. hitthem:
  1242. /*if colorflag = 1 then do
  1243.    SAY HOM||CR
  1244.    SAY ''||CR
  1245.    SAY ''||CR
  1246.    SAY ''||CR
  1247.    SAY ''||CR
  1248.    SAY '                                                  '||CR
  1249.    SAY HOM||CR
  1250.    SAY ''||CR
  1251.    SAY ''||CR
  1252. end    */
  1253. say cyan   '               'gangmembers'                              'protect_gang''CR
  1254. SAY ''||CR
  1255. protect.startx.starty = 0
  1256. SAY ''||CR
  1257. SAY center(YELLOW'You wipe him out!',76)||CR
  1258. CALL delay(100)
  1259. call open(news7,file.2,'A')
  1260. call writeln(news7,'Ganglord 'alias' slaughters 'protect_alias'''s gang!')
  1261. call close(news7)
  1262. call open(aliases,bbspath2'gangland/aliases','R')
  1263. u = 0
  1264. do until EOF(aliases)
  1265.    u = u + 1
  1266.    alias1.u = readln(aliases)
  1267.    alias2.u = word(alias1.u,1)
  1268.    alias3.u = Delword(alias1.u,1,1)
  1269.    if alias3.u = protect_alias then do
  1270.       alias2 = alias2.u
  1271.       alias3 = alias3.u
  1272.       break
  1273.    end 
  1274. end
  1275. call close(aliases)
  1276. call open(provictim,bbspath2'gangland/'alias2,'R')
  1277. vicalias = readln(provictim)
  1278. vicTurnsleft = readln(provictim)
  1279. vicgangmembers = readln(provictim)
  1280. vicdate = readln(provictim)
  1281. vicstartx = readln(provictim)
  1282. vicstarty = readln(provictim)
  1283. vicpoints = readln(provictim)
  1284. vicmoney = readln(provictim)
  1285. victotalgangmembers = readln(provictim)
  1286. vicprotection = readln(provictim)
  1287. vicbootleg = readln(provictim)
  1288. call close(provictim)
  1289. vicprotection = vicprotection - 1
  1290. victotalgangmembers = victotalgangmembers - lostgang
  1291. call open(provictim,bbspath2'gangland/'alias2,'W')
  1292. call writeln(provictim,vicalias)
  1293. call writeln(provictim,victurnsleft)
  1294. call writeln(provictim,vicgangmembers)
  1295. call writeln(provictim,vicdate)
  1296. call writeln(provictim,vicstartx)
  1297. call writeln(provictim,vicstarty)
  1298. call writeln(provictim,vicpoints)
  1299. call writeln(provictim,vicmoney)
  1300. call writeln(provictim,victotalgangmembers)
  1301. call writeln(provictim,vicprotection)
  1302. call writeln(provictim,vicbootleg)
  1303. call close(provictim)
  1304. call open(top10,bbspath2'gangland/top10','R')
  1305. do i = 1 to 10
  1306.    tops = readln(top10)
  1307.    topalias.i = delword(tops,1,1)
  1308.    topscore.i = word(tops,1)
  1309.    if protect_alias = topalias.i then topscore.i = (topscore.i - 1000 - (lostgang * 100))
  1310. end
  1311. call close(top10)
  1312. call open(top10,bbspath2'gangland/top10','W')
  1313. do i = 1 to 10
  1314.    call writeln(top10,topscore.i' 'topalias.i)
  1315. end
  1316. call close(top10)
  1317. signal main
  1318.  
  1319. quitter:
  1320. protect.startx.starty = protect_gang' 'protect_alias
  1321. call open(news7,file.2,'A')
  1322. call writeln(news7,'Ganglord 'alias' runs from the fight.')
  1323. call close(news7)
  1324. SAY center(YELLOW'Chicken!',76)||CR
  1325. CALL delay(100)
  1326. signal main
  1327.  
  1328. move:
  1329. if turnsleft < 1 then do
  1330.    SAY ''||CR
  1331.    SAY RED'You do not have any turns left!'||CR
  1332.    CALL delay (100)
  1333.    signal main
  1334. end
  1335. SAY ''||CR
  1336. SAY ''||CR
  1337. SAY BLUE'What location do you want to move to?'||CR
  1338. options prompt '                               North:'
  1339. pull startxtemp1
  1340. options prompt ' '
  1341. startxtemp = strip(startxtemp1,'L','0')
  1342. do i = 1 to 25
  1343.    if startxtemp = i then leave
  1344.    if i = 25 then do
  1345.       SAY ''||CR
  1346.       SAY RED'Street numbers can only be whole numbers between 1 and 25'CLEAR||CR
  1347.       CALL delay(100)
  1348.       signal main
  1349.    end
  1350. end
  1351. options prompt '                                East:'
  1352. pull startytemp1
  1353. options prompt ' '
  1354. startytemp = strip(startytemp1,'L','0')
  1355. do i = 1 to 25
  1356.    if startytemp = i then leave
  1357.    if i = 25 then do
  1358.       SAY ''||CR
  1359.       SAY RED'Street numbers can only be whole numbers between 1 and 25'CLEAR||CR
  1360.       CALL delay(100)
  1361.       signal main
  1362.    end
  1363. end
  1364. startx = startxtemp
  1365. starty = startytemp
  1366. turnsleft = turnsleft - 1
  1367. signal main
  1368.  
  1369. highscores:
  1370. call open(top10,bbspath2'gangland/top10','R')
  1371. pointsg = totalgangmembers * 100
  1372. pointsp = protection * 1000
  1373. points = pointsg + pointsp
  1374. topalias.1 = alias
  1375. topscore.1 = points
  1376. do i = 2 to 11
  1377.    tops = readln(top10)
  1378.    topalias.i = delword(tops,1,1)
  1379.    topscore.i = word(tops,1)
  1380.    if topalias.1 = topalias.i then topscore.i = -1
  1381. end
  1382. call close(top10)
  1383. do i = 1 to 10
  1384.    do h = i + 1 to 11
  1385.       if topscore.i < topscore.h then do
  1386.          temp = topscore.i
  1387.          topscore.i = topscore.h
  1388.          topscore.h = temp
  1389.          tempor = topalias.i
  1390.          topalias.i = topalias.h
  1391.          topalias.h = tempor
  1392.       end
  1393.    end
  1394. end
  1395. say CLSCREEN
  1396.  
  1397. /*----------------------------------------------------------------------
  1398.                          Check for a winner!
  1399. -----------------------------------------------------------------------*/
  1400. wingoal = 500000
  1401.  do i = 1 to 10
  1402.   if datatype(topscore.i,'N') = 1 & topscore.i >= wingoal then do
  1403.    winner = topalias.i
  1404.    winscore = topscore.i
  1405.     if ~exists(file.12) then do
  1406.      call open(winfile,file.12,'W')
  1407.      call writeln(winfile,date'    'winner'    'winscore)
  1408.      call close(winfile)
  1409.      temp.file = 'Ram:temp.file12'
  1410.      address command 'c:copy 'file.12' 'temp.file' quiet'
  1411.      end
  1412.     else do
  1413.      call open(winfile,file.12,'A')
  1414.      writeln(winfile,date'    'winner'    'winscore)
  1415.      call close(winfile)
  1416.      temp.file = 'Ram:temp.file12'
  1417.      address command 'c:copy 'file.12' 'temp.file' quiet'
  1418.      end
  1419.   say ''cr
  1420.   say' 'YELLOW'                 We have a winner!!!'cr
  1421.   say' 'RED' 'winner' is being added to ''The GangLord Hall of Fame!'''Clear''cr
  1422.   say ''cr
  1423.   signal reset
  1424.   end
  1425.  end
  1426.  
  1427. SAY YELLOW||center('-----------------------------------------',70)||CR
  1428. SAY RED||center('Top 10 Chicago Ganglords',70)||CR
  1429. SAY YELLOW||center('-----------------------------------------',70)||CR
  1430. SAY ''||CR
  1431. call open(top10,bbspath2'gangland/top10','W')
  1432. do i = 1 to 10
  1433.    say cyan||CENTER(LEFT(topalias.i,20) RIGHT(topscore.i,7),70)||CR
  1434.    call writeln(top10,topscore.i' 'topalias.i)
  1435. end
  1436. call close(top10)
  1437. SAY ''||CR
  1438. if quiting = 1 then do
  1439.  SAY ''||CR
  1440.  SAY ''||CR
  1441.  SAY '              'RED' Thank you for playing Chicago Gangland'||CR
  1442.  SAY ''||CR
  1443.  SAY '            'MAGENTA'Now returning you to the 'bbsname' 'CLEAR||CR
  1444.  SAY ''||CR
  1445.  CALL delay(100)
  1446. exit
  1447. end
  1448. call pressreturn
  1449. /*continue*/
  1450. signal main
  1451.  
  1452. news:
  1453. say CLSCREEN
  1454. q = 0
  1455. do i = 2 to 8
  1456.    select
  1457.       when i = 2 then SAY CYAN||CR
  1458.       when i = 3 then SAY RED||CR
  1459.       when i = 4 then SAY MAGENTA||CR
  1460.       when i = 5 then SAY BLUE||CR
  1461.       when i = 6 then SAY GREEN||CR
  1462.       when i = 7 then SAY YELLOW||CR
  1463.       otherwise SAY WHITE||CR
  1464.    end
  1465.    if exists(file.i) then call open(gamenews,file.i,'R')
  1466.    if exists(file.i) then do until EOF(gamenews)
  1467.       q = q + 1
  1468.       SAY Readln(gamenews)||CR
  1469.       if q // (LINES - 3) = 0 then do
  1470.          options prompt 'Hit RETURN to continue or Q to quit '
  1471.          pull ANS
  1472.          if ans = 'Q' then do
  1473.             call close(gamenews)
  1474.             signal main
  1475.          end
  1476.       end
  1477.    end
  1478.    call close(gamenews)
  1479. end
  1480. /*call pressreturn*/
  1481. /*continue*/
  1482. if i = 8 /*& eof(file.1) = 1 then do*/then signal main
  1483.  call pressreturn
  1484.  signal main
  1485.  end
  1486.  
  1487. instructions:
  1488. say CLSCREEN
  1489. SAY ''||CR
  1490. i = 1
  1491. call open(instr,file.1,'R')
  1492. do until EOF(instr)
  1493.    SAY Readln(instr)||CR
  1494.    if i // LINES = 0 
  1495.    then do
  1496.       call pressreturn
  1497.       /*continue*/
  1498.    end
  1499.    i = i + 1
  1500. end
  1501. call close(instr)
  1502. call pressreturn
  1503. /*continue*/
  1504. signal main
  1505.  
  1506. stats:
  1507. say CLSCREEN
  1508. SAY center(RED'-----------------------------------------',76)||CR
  1509. SAY center(YELLOW||Spacename'''s' 'STATISTICS',76)||CR
  1510. SAY center(RED'-----------------------------------------',76)||CR
  1511. SAY ''||CR
  1512. Say CYAN '   Alias: 'Alias''cr
  1513. Say CYAN '   Position: ' Street.startx 'North ' Street.starty 'East'CR
  1514. Say CYAN '   Total Gangmembers: 'totalgangmembers''CR
  1515. Say CYAN '   Gangmembers with you: 'gangmembers''CR
  1516. Say CYAN '   Money: 'money''CR
  1517. Say CYAN '   Bootleg Operations: 'bootleg''CR
  1518. SAY ''||CR
  1519. SAY CYAN 'Blocks protected:'||CR
  1520. i = 12
  1521. do c = 1 to 25
  1522.    do c1 = 1 to 25
  1523.       protect_alias = Delword(protect.c.c1,1,1)
  1524.       if protect_alias = alias then do
  1525.          SAY MAGENTA street.c 'North' street.c1 'East with' word(protect.c.c1,1) 'gangmembers'||CR
  1526.          if i // LINES - 1 = 0 then call pressreturn
  1527.          i = i + 1
  1528.       end
  1529.    end
  1530. end
  1531. call pressreturn
  1532. /*continue*/
  1533. signal main
  1534.  
  1535. reset:
  1536.  say ''cr
  1537.  say ' Please standby, the game is being reset!'cr
  1538.  say ''cr
  1539.  address command 'c:delete 'bbspath2'Gangland/#? quiet'
  1540.  backuppath = bbspath2'GangBackups/'
  1541.  
  1542.  address command 'c:copy 'backuppath'news6 'file.3' quiet'
  1543.  address command 'c:copy 'backuppath'news5 'file.4' quiet'
  1544.  address command 'c:copy 'backuppath'news4 'file.5' quiet'
  1545.  address command 'c:copy 'backuppath'news3 'file.6' quiet'
  1546.  address command 'c:copy 'backuppath'news2 'file.7' quiet'
  1547.  address command 'c:copy 'backuppath'news1 'file.8' quiet'
  1548.  address command 'c:copy 'backuppath'aliases 'file.13' quiet'
  1549.  address command 'c:copy 'backuppath'protect 'file.9' quiet'
  1550.  address command 'c:copy 'backuppath'top10 'file.14' quiet'
  1551.  address command 'c:copy 'temp.file' 'file.12' quiet'
  1552.  call delete(temp.file)
  1553.     call open(news7,file.2,'W')
  1554.     call writeln(news7,'******************************************************')
  1555.     call writeln(news7,'                THE CHICAGO DAILY NEWS')
  1556.     call writeln(news7,'                     'datec)
  1557.     call writeln(news7,'******************************************************')
  1558.     call writeln(news7,' ')
  1559.     call writeln(news7,' GangLord 'winner' wins the game with a score of 'winscore'!')
  1560.     call writeln(news7,' The game has been reset!')
  1561.     call close(news7)
  1562.  
  1563.  mess = ''winner' has won the game, and the game has been reset!'
  1564.  call open(fnx,file.11,'W');call writeln(fnx,mess);call close(fnx)
  1565.  
  1566.  say ''cr
  1567.  say' The game is now reset!'cr
  1568.  say' Play again to be the first gangster in the new game!'cr
  1569.  say ''cr
  1570.  exit
  1571.  
  1572.  
  1573. death:
  1574. say CLSCREEN
  1575. SAY center(RED'You have died 'SpaceName'.',76)||CR
  1576. SAY ''||CR
  1577. Say CYAN'Clearing your stats..'CR
  1578. do c = 1 to 25
  1579.    CALL WRITECH(STDOUT,'.')
  1580.    do c1 = 1 to 25
  1581.       protect_alias = Delword(protect.c.c1,1,1)
  1582.       if protect_alias = alias then
  1583.       protect.c.c1 = 0  
  1584.    end
  1585. end
  1586. /*delete(bbspath2'gangland/'Name)     */
  1587. address command 'c:delete 'bbspath2'gangland/'Name' quiet'
  1588. totalgangmembers = 0
  1589. protection = 0
  1590. deathflag = 1
  1591. signal goodbye
  1592.  
  1593. goodbye:
  1594. say CLSCREEN
  1595. Say CYAN'Saving game stats..'cr
  1596. call open(aliases,bbspath2'gangland/aliases','W')
  1597. u = 1
  1598. do i = 1 to marker - 1
  1599.    if name' 'alias ~= alias1.u then
  1600.    call writeln(aliases,alias1.u)
  1601.    u = u + 1
  1602. end
  1603. if deathflag = 0 then call writeln(aliases,name' 'alias)
  1604. call close(aliases)
  1605. call open(lastpos,file.10,'W')
  1606. q = 1
  1607. if pos ~= 0 then do i = 1 to pos
  1608.    if alias ~= posalias.q then
  1609.    call writeln(lastpos,mypos.q)
  1610.    q = q + 1
  1611. end
  1612. if deathflag = 0 then call writeln(lastpos,startx' 'starty' 'gangmembers' 'money' 'alias)
  1613. call close(lastpos)
  1614. call open(prot,File.9,'W')
  1615. do c = 1 to 25
  1616.    CALL WRITECH(STDOUT,'.')
  1617.    do c1 = 1 to 25
  1618.       call writeln(prot,protect.c.c1)
  1619.    end
  1620. end
  1621. call writeln(prot,datec)
  1622. call close(prot)
  1623. pointsg = totalgangmembers * 100
  1624. pointsp = protection * 1000
  1625. points = pointsg + pointsp
  1626. call open(top10,bbspath2'gangland/top10','R')
  1627. topalias.1 = alias
  1628. topscore.1 = points
  1629. do i = 2 to 11
  1630.    tops = readln(top10)
  1631.    topalias.i = delword(tops,1,1)
  1632.    topscore.i = word(tops,1)
  1633.    if topalias.1 = topalias.i then topscore.i = -1
  1634. end
  1635. call close(top10)
  1636. do i = 1 to 10
  1637.    do h = i + 1 to 11
  1638.       if topscore.i < topscore.h then do
  1639.          temp = topscore.i
  1640.          topscore.i = topscore.h
  1641.          topscore.h = temp
  1642.          tempor = topalias.i
  1643.          topalias.i = topalias.h
  1644.          topalias.h = tempor
  1645.       end
  1646.    end
  1647. end
  1648. call open(top10,bbspath2'gangland/top10','W')
  1649. do i = 1 to 10
  1650.    call writeln(top10,topscore.i' 'topalias.i)
  1651. end
  1652. call close(top10)
  1653. if exists(bbspath2'gangland/'Name) then do
  1654.    call open(stats,bbspath2'gangland/'Name,'W')
  1655.    call writeln(stats,alias)
  1656.    call writeln(stats,turnsleft)
  1657.    call writeln(stats,gangmembers)
  1658.    call writeln(stats,datec)
  1659.    call writeln(stats,startx)
  1660.    call writeln(stats,starty)
  1661.    call writeln(stats,points)
  1662.    call writeln(stats,money)
  1663.    call writeln(stats,totalgangmembers)
  1664.    call writeln(stats,protection)
  1665.    call writeln(stats,bootleg)
  1666.    call close(stats)
  1667. end
  1668. say CLSCREEN
  1669. call oneliner
  1670. quiting = 1
  1671. call highscores
  1672. SAY ''||CR
  1673. SAY ''||CR
  1674. SAY '              'RED' Thank you for playing Chicago Gangland'||CR
  1675. SAY ''||CR
  1676. SAY '            'MAGENTA'Now returning you to the 'bbsname' 'CLEAR||CR
  1677. CALL delay(100)
  1678. exit
  1679.  
  1680. ONELINER:
  1681. say ''cr
  1682. options prompt ''CYAN' Do you want to leave a message for the next Gangster (y/N)?'CLEAR' > '
  1683.  
  1684. pull result;ans=upper(result)
  1685. if ans~='Y' then do
  1686.   say ''YELLOW'  No'CLEAR''cr
  1687.   return
  1688.   end
  1689. say ''WHITE'  Yes'CLEAR''cr;say ''cr
  1690. options prompt''GREEN' Enter a ONE LINE message:'CLEAR' ';say ''cr
  1691.  
  1692. pull result; mess=result
  1693. if length(mess)<10 then do
  1694.   say ''YELLOW'Message too short, Entry Aborted.'CLEAR''cr;signal ONELINER
  1695.   end
  1696. say ''cr
  1697. say ''longdashes''cr
  1698. say ''MAGENTA''mess ''alias''CLEAR''cr
  1699. say ''longdashes''cr
  1700. say ''cr
  1701. options prompt ''BLUE' Does this look OK?'CLEAR' > '
  1702.  
  1703.  
  1704. pull result;ans=upper(result)
  1705. if ans='N' then do
  1706.   say ' Nope!'cr;signal ONELINER
  1707.   end
  1708. say ''MAGENTA' Yep!'CLEAR''cr
  1709. if exists(file.11) then do
  1710.   address command 'c:delete 'file.11' quiet'
  1711.   end
  1712. call open(fnx,file.11,'W');call writeln(fnx,mess);call writeln(fnx,alias);call close(fnx)
  1713. return
  1714.  
  1715.  
  1716. quickexit:
  1717.    say CLSCREEN
  1718.    call oneliner
  1719.    quiting = 1
  1720.    call highscores
  1721.    SAY ''||CR
  1722.    SAY ''||CR
  1723.    SAY '              'RED' Thank you for playing Chicago Gangland'||CR
  1724.    SAY ''||CR
  1725.    SAY '            'MAGENTA'Now returning you to 'bbsname' 'CLEAR||CR
  1726.    CALL delay(100)
  1727.    exit
  1728.  
  1729. pressreturn:
  1730. say ''cr
  1731. options prompt'  Press return to continue'
  1732. pull response
  1733. return
  1734.  
  1735. /************************* Error Checking *********************************/
  1736.  
  1737. syntax:
  1738.    SAY '*BOOM*  Got a syntax error.  PLEASE notify the sysop.'||CR
  1739.    SAY 'Line:' SIGL '   Error Code:' RC||CR
  1740. exit
  1741.  
  1742. checkBBS:
  1743. IF ADDRESS()~='BAUD' THEN RETURN 0
  1744. IF TIME('e')>secs THEN SIGNAL goodbye
  1745. dcd
  1746. IF RC=0 THEN SIGNAL goodbye
  1747. temp=secs-TIME('E')
  1748. IF temp<120 THEN SAY '*** Only' temp 'seconds left! ***'CR 
  1749. RETURN 0
  1750.  
  1751.  
  1752. BREAK_C:
  1753. BREAK_E:
  1754. call goodbye
  1755. CALL CLOSE(f)
  1756. RETURN(count);
  1757. EXIT;                           /* a little redundant, so sue me! */
  1758.  
  1759. /**************************************************************************/