home *** CD-ROM | disk | FTP | other *** search
/ synchro.net / synchro.net.tar / synchro.net / main / BBS / MC.ZIP / MC.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  2002-11-19  |  42.9 KB  |  994 lines

  1. {                             Milliways Casino                               }
  2. {                  Copyright (C) 1987 by Charles Ezzell & Matthew Warner     }
  3. {                            All Rights Reserved                             }
  4. {                                                                            }
  5. {  No part of this program may be reprinted or reproduced or utilized in any }
  6. {  form or any electronic, mechanical, or other means no known or hereafter  }
  7. {  invented, including photocopying and recording, or in any information     }
  8. {  storage and retrieval system, without permission in writing from the      }
  9. {  author, except for those uses listed below.                               }
  10. {                                                                            }
  11. {  1) This program is 'freeware'.  No charges may be made by anyone or any   }
  12. {     service for copying this program for the use of others.                }
  13. {  2) This program can be freely distributed in UNMODIFIED form by any       }
  14. {     Bulletin Board System Operator (hereafter known as Sysop), or any      }
  15. {     user of a BBS system.                                                  }
  16. {  3) A Sysop has the right to modify this program only for his/her use.  He }
  17. {     cannot distribute a modified copy without permission of the author.    }
  18. {  4) Any modifications or improvements made by a Sysop (or user/programmer) }
  19. {     may be sent to the author.                                             }
  20. {  5) The copyright notice and name of the program can not be removed from   }
  21. {     the program.  It must be shown each time the program is ran.           }
  22. {     (Its the law, not my idea)                                             }
  23. {  6) By running this program, you agree to all the above conditions.        }
  24. {                                                                            }
  25. {                                                                            }
  26. {  Questions and Answers about the copyright by me.                          }
  27. {  What rights does this give a sysop?                                       }
  28. {  Very simple.  You can use it just like any other WWIV chn file, as long   }
  29. {  as you don't remove the copyright notice or change the name of the game.  }
  30. {  You can modify it, re-do the variables, or whatever, in order to get it   }
  31. {  to work on your system.  I give you these rights.  You CAN NOT distribute }
  32. {  a modified copy.  I have done things this way in order to protect my      }
  33. {  rights, and those of others who have helped me in writing this.           }
  34. {  All official releases will come through me, and be distributed through    }
  35. {  the people listed below who have volunteered their services.              }
  36. {  If you have any new ideas or suggestion to improve the game, please send  }
  37. {  them to me or one of the distributors and they will see that I get them.  }
  38. {  I've worked long and hard on this game, and, not wanting to do like       }
  39. {  others who only send out .chn files of their programs, am releasing the   }
  40. {  source code since many sysops have modified common.pas.                   }
  41. {  This program has been compiled with both the original common.pas and with }
  42. {  mine, with no problems, so most everyone of you out there should have no  }
  43. {  problems.  ( Mine is approx 38k long, so most of you should not get       }
  44. {  get memory overflow errors).                                              }
  45. {                                                                            }
  46. {                               DISTRIBUTORS                                 }
  47. {                               ------------                                 }
  48. {    Charles Ezzell   Milliways                         (919)823-5897        }
  49. {    Matthew Warner   The United Star Ship Saratoga     (919)443-9343        }
  50. {    Jami Chism       The Pits                          (919)362-8053        }
  51. {    Brandon Poole    The Boinger Board                 (919)846-3734        }
  52. {                                                                            }
  53. {  Any sysop or user may distribute the program (unmodified).  If you do get }
  54. {  a copy that does not seem to work, contact one of the above, and let them }
  55. {  know who sent you the program.  If you feel the program has been modified }
  56. {  LET ME KNOW!                                                              }
  57. {                                                                            }
  58. {  If any problems occur, feel free to contact me.  I plan on adding new     }
  59. {  features into the game myself, and any help would be appreciated.         }
  60. {                                                                            }
  61. {  All those who send in mods that are used in future releases get first     }
  62. {  crack at the new release.                                                 }
  63. {                                                                            }
  64. {  A note about some of the procedures used:                                 }
  65. {  procedure setcol(byte):  this procedure checks to see if the user has     }
  66. {    selected ansi graphics, and if so, sets the colors using Wayne Bell's   }
  67. {    setc(byte) procedure.  0-15 give foreground colors, add 16 to get the   }
  68. {    background (haven't tried it with 24-31), and add 128 to get blink.     }
  69. {    setcol(132) should give a blinking red on most systems.                 }
  70. {  procedure casdisplay(str):  modified from my graphics mods and Othello    }
  71. {    game, this procedure is used to move cursor, clear screen, and in the   }
  72. {    roulette and slots games, used for color control (this procedure was    }
  73. {    written before the setcol).                                             }
  74. {  procedure print and print1(str):  These 2 procedures are modified         }
  75. {    versions of Wayne Bell's print and print1 procedures.  The only         }
  76. {    difference is they do not allow the user to stop printing the line out. }
  77. {    It also allows for formatting the line length to the users length,      }
  78. {    unlike the print command.  Colors could be added into (haven't checked) }
  79. {    the lines by inserting the correct codes at the beginning of each       }
  80. {    string.  This routines do not do a line feed or carriage return at the  }
  81. {    end of the line, so that must be inserted in (or use procedure nl from  }
  82. {    common.pas.                                                             }
  83. {    Example:  Printaa(#1+#2+'Hi there'+#13+#10);                            }
  84. {              this should give you print Hi there in ansic(2), with a cr/lf }
  85. {              print('Hi there');                                            }
  86. {              this would print 'Hi there', leaving the cursor at the end of }
  87. {              of the line.                                                  }
  88. {                                                                            }
  89. {  If any questions, feel free to contact me on any of the BBS's systems     }
  90. {  listed above, or write me.                                                }
  91. {                                                                            }
  92. {  Charles N. Ezzell                                                         }
  93. {  Route 2, Box JV41                                                         }
  94. {  Tarboro, NC 27886                                                         }
  95. {  (919) 823-5897  Milliways                                                 }
  96. {                                                                            }
  97. {  Revision History                                                          }
  98. {  Nov. 18, 1987  Version 1.0 released.                                      }
  99. {                                                                            }
  100.  
  101. program mc;
  102.  
  103. {$V-} {$C-}
  104.  
  105. {$I common.pas}
  106.  
  107. type
  108.    filetype = (system, other);
  109.  
  110.      rec =
  111.    record
  112.      case reckind : filetype of
  113.        system : (num_players : integer;
  114.                  old_date : str;
  115.                  dating_kathy : boolean;
  116.                  jackpot, strangers_money : real
  117.                 );
  118.        other  : (name : string[25];
  119.                  last_on : str;
  120.                  music, used_condom, ansi_ok, male : boolean;
  121.                  won_today, players_money : real;
  122.                  times_on, aids,
  123.                  played_baccarat, played_twenty1,
  124.                  played_slots, played_roulette,
  125.                  turned_down_date, hooker,
  126.                  screwed, bruno , condom : integer;
  127.                 );
  128.    end;
  129.  
  130. const win_money=1000000.;
  131.  
  132. var player : array[0..51] of rec;
  133.     infile, outfile : file of rec;
  134.     messagefile: text;
  135.     found, done : boolean;
  136.     bruno : integer;
  137.     pn : integer;
  138.     strangers_temp_money, temp_money : real;
  139.     door : char;
  140.     roul, twenty, slot, bacc,
  141.     stranger_dates_kathy, ansiok, play_ok, won : boolean;
  142.  
  143. procedure player_died;
  144. begin
  145.   player[pn].used_condom:=false;
  146.   player[pn].players_money:=1000.;
  147.   player[pn].last_on:=date;
  148.   player[pn].times_on:=0;
  149.   player[pn].hooker:=0;
  150.   player[pn].screwed:=0;
  151.   player[pn].condom:=0;
  152.   player[pn].bruno:=0;
  153.   player[pn].aids:=0;
  154.   player[pn].played_slots:=0;
  155.   player[pn].played_roulette:=0;
  156.   player[pn].played_twenty1:=0;
  157.   player[pn].played_baccarat:=0;
  158.   player[pn].turned_down_date:=0;
  159.   player[pn].won_today:=-1000000.;
  160. end;
  161.  
  162. procedure leave;
  163. var i : integer;
  164. begin
  165.   if not won then begin
  166.     if player[pn].players_money<=0 then player[pn].players_money:=1000.;
  167.     if player[pn].bruno>=7 then player_died;
  168.     if player[pn].last_on<>date then player[pn].last_on:=date;
  169.   end else begin
  170.     player_died;
  171.     player[pn].won_today:=0.0;
  172.   end;
  173.   assign(outfile,gfilespath+'mcrecord.dat');
  174.   rewrite(outfile);
  175.   for i:=0 to player[0].num_players do
  176.     write(outfile,player[i]);
  177.   close(outfile);
  178.   return;
  179. end;
  180.  
  181. procedure setcol(b:byte);
  182. begin
  183.  if ansiok and (b<9) then ansic(b);
  184. end;
  185.  
  186. procedure casdisplay(i:str);
  187. TYPE
  188.   registers =
  189.     RECORD CASE Boolean OF
  190.       true : (al,ah,bl,bh,cl,ch,dl,dh : byte);
  191.       false: (ax,   bx,   cx,   dx,
  192.               bp,si,di,ds,es,FLAGS    : integer)
  193.     end;
  194. var reg:registers;
  195.     c  :integer;
  196. begin
  197.   if ansiok then begin
  198.     checkhangup; if hangup then leave;
  199.     for c:=1 to length(i) do begin
  200.       reg.ah:=$02;
  201.       reg.dx:=ord(i[c]);
  202.       prompt(i[c]);
  203.     end;
  204.   end;
  205. end;
  206.  
  207.  
  208. function format_money(s : str; real:boolean) : str;
  209. var minus: boolean;
  210. begin
  211.   minus:=false;
  212.   repeat
  213.     if s[1]=' ' then delete(s,1,1);
  214.   until s[1]<>' ';
  215.   if s[1]='-' then begin
  216.     delete(s,1,1);
  217.     minus:=true;
  218.   end;
  219.   if length(s)>3 then insert(',',s,length(s)-2);
  220.   if length(s)>7 then insert(',',s,length(s)-6);
  221.   if length(s)>11 then insert(',',s,length(s)-10);
  222.   if s[1]=',' then delete(s,1,1);
  223.   if minus and real then format_money:='-$'+s
  224.    else format_money:='$'+s;
  225. end;
  226.  
  227. overlay procedure create_player;
  228. begin
  229.   if player[0].num_players+1>50 then begin
  230.     checkhangup; if hangup then leave;
  231.     print('Bruno walks up to you with bad news.  "I''m awful sorry '+thisuser.name+',');
  232.     print('but the casino is full right now.  If you would leave a message');
  233.     print('to the Sysop, he just might could throw one of the bums off of here,');
  234.     print('and you can enter.  Thank you for coming by though.');
  235.     nl;nl;
  236.     sysoplog('  ***  NO ROOM IN THE GAME  ***');
  237.     leave;
  238.   end else begin
  239.     player[0].num_players:=player[0].num_players+1;
  240.     pn:=player[0].num_players;
  241.     player[pn].name:=thisuser.name;
  242.     if thisuser.sex='M' then player[pn].male:=true
  243.      else player[pn].male:=false;
  244.     player[pn].used_condom:=false;
  245.     player[pn].players_money:=1000.;
  246.     player[pn].last_on:=date;
  247.     player[pn].times_on:=1;
  248.     player[pn].aids:=0;
  249.     player[pn].hooker:=0;
  250.     player[pn].screwed:=0;
  251.     player[pn].condom:=0;
  252.     player[pn].bruno:=0;
  253.     player[pn].won_today:=0.0;
  254.     player[pn].played_slots:=0;
  255.     player[pn].played_roulette:=0;
  256.     player[pn].played_twenty1:=0;
  257.     player[pn].played_baccarat:=0;
  258.     player[pn].turned_down_date:=0;
  259.     (*player[pn].music:=music in thisuser.defaults;*) {look for music later}
  260.     player[pn].music:=false;
  261.     if okansi then begin
  262.         print('Do you wish to see ansi graphics during the game?');
  263.         if yn then player[pn].ansi_ok:=true else player[pn].ansi_ok:=false;
  264.       end;
  265.   end;
  266.   if player[pn].ansi_ok then ansiok:=true else ansiok:=false;
  267. end; {create player}
  268.  
  269. overlay procedure strangers_gets_more_money;
  270. var i,x:integer; temp:str;
  271. begin
  272.   for x:=1 to 10 do
  273.    repeat
  274.     i:=random(10000)+20000;
  275.   until i mod 100=0;
  276.   str(i:0,temp);
  277.   temp:=format_money(temp,false)+'.';
  278.   checkhangup; if hangup then leave;
  279.   print('The stranger''s cash seems to have run out.');
  280.   print(' He whispers something into the ear of one of the girls sitting');
  281.   print('around him, and she leaves, returning in a few minutes with an');
  282.   print('envelope.  The stranger puts down his cigar, and takes the envelope');
  283.   print('from the girl.  He then removes a large wad of money, hands it to');
  284.   print('another one of his girls, who rushes off.  Seconds later, you are');
  285.   print('amazed as he is credited with another '+temp);
  286.   player[0].strangers_money:=player[0].strangers_money+i;
  287.   strangers_temp_money:=strangers_temp_money+i;
  288.   nl;pausescr;
  289. end;
  290.  
  291. overlay procedure refuse_date;
  292. begin
  293.   if player[pn].hooker=0 then begin
  294.     checkhangup; if hangup then leave;
  295.     print('You politely refuse the invitation, saying that you');
  296.     print('really don''t care to see the nightlife right now.'+#13+#10);
  297.     nl;pausescr;
  298.   end else begin
  299.     checkhangup; if hangup then leave;
  300.     print('You politely turn down the invitation, telling Kathy that');
  301.     print('you are feeling lucky, and want to keep trying to win,');
  302.     print('but maybe you and her can get together later.'+#13+#10);
  303.     nl;pausescr;
  304.   end;
  305.   player[pn].turned_down_date:=player[pn].turned_down_date+1;
  306.  
  307. end;
  308.  
  309. overlay procedure date_kathy;
  310. var make_love:boolean;
  311.     i, y : integer;
  312.     temp:str;
  313. begin
  314.   i:=random(10)*100;
  315.   if player[pn].hooker=0 then begin
  316.     player[pn].hooker:=player[pn].hooker+1;
  317.     checkhangup; if hangup then leave;
  318.     print('  The young lady introduces herself as Kathy.  ');
  319.     print('The two of you go out and spend several hours together enjoying');
  320.     print('the nightlife.  After a while, you and Kathy end up in her suite.  ');
  321.     print('She tells you to mix a couple of drinks while she goes and gets');
  322.     print('into something a little more comfortable.  You head towards the');
  323.     print('bar and and mix 2 drinks, then sit down on the luscious couch.'+#13+#10);
  324.     nl;pausescr;
  325.     checkhangup; if hangup then leave;
  326.     print('  She comes back out of the bedroom, wearing a long black robe');
  327.     print('that covers her from her neck down to her ankles.  She sits down');
  328.     print('next to you, takes her drink, and finishes it off in one swallow.  ');
  329.     print('She turns to you, leans closer, and begins to nibble on your earlobe.'+#13+#10);
  330.     print('"'+thisuser.name+'", she whispers into your ear, "Would you like to make');
  331.     print('love to me?"'+#13+#10);
  332.     nl;prompt('Do you make love to Kathy? ');
  333.     if yn then make_love:=true else make_love:=false;
  334.   end else begin
  335.     player[pn].hooker:=player[pn].hooker+1;
  336.     checkhangup; if hangup then leave;
  337.     print('  You and Kathy again go out, spending several hours');
  338.     print('enjoying the nightlife of Los Vegas, and once again,');
  339.     print('end up back in her apartment.'+#13+#10);
  340.     nl;
  341.     print('  Again, she has you mix a couple of drinks, and she heads');
  342.     print('towards the bedroom to change her clothes.  After a few');
  343.     print('minutes, she comes back out, and asks');
  344.     print('if you would like to make love to her.'+#13+#10);
  345.     nl;prompt('Do you make love to Kathy? ');
  346.     if yn then make_love:=true else make_love:=false;
  347.   end;
  348. {********** BEGIN MAKE LOVE **************}
  349.   if make_love then begin
  350.     if player[pn].condom>0 then begin
  351.       prompt('Do you use the condom you found? ');
  352.       if yn then begin
  353.         player[pn].condom:=0;
  354.         player[pn].used_condom:=true;
  355.       end else player[pn].aids:=player[pn].aids+1;
  356.     end;
  357.     if player[pn].screwed=0 then begin
  358.       checkhangup; if hangup then leave;
  359.       print('  You are stunned, although deep in you mind, you knew this was going');
  360.       print('happen sooner or later.  You turn to look at her and her lips approach yours...'+#13+#10);
  361.       nl;delay(5000);
  362.       for y:=1 to 10 do nl;
  363.       temp:='FOOLED YOU DIDN''T I!';ansic(8);print(temp);nl;
  364.       print('This is a family program, so leaving out the details, let''s just say');
  365.       print('that you leave the suite 12 hours later, with a smile on your face and');
  366.       print('1000 dollars poorer.  You return to the table to continue playing.'+#13+#10);
  367.       nl;nl;pausescr;
  368.       player[pn].players_money:=player[pn].players_money-1000;
  369.       player[pn].screwed:=player[pn].screwed+1;
  370.     end else begin
  371.       checkhangup; if hangup then leave;
  372.       print('  Once again you and Kathy spend several lovely hours together, and you return');
  373.       print('to the Casino, $1000 poorer, but happy with your experience with her.'+#13+#10);
  374.       nl;pausescr;
  375.     end;
  376.     player[pn].screwed:=player[pn].screwed+1;
  377.     player[pn].players_money:=player[pn].players_money-1000;
  378.   end else begin
  379. {********* BEGIN NO MAKE LOVE ***********}
  380.     if player[pn].screwed=0 then begin
  381.       checkhangup; if hangup then leave;
  382.       print('  You politely refuse, saying that you believe that 2 people should');
  383.       print('not do such things unless they are deeply in love and are married.');
  384.       print('Kathy looks at you in surprise, but realizes that you mean what you');
  385.       print('say, and a wishful look comes across her face.  She kisses you');
  386.       print('on the cheek, and says that she hopes you and her will see each');
  387.       print('other again.'+#13+#10);
  388.       nl; pausescr;
  389.     end else begin
  390.       print('  You tell Kathy that you just are not in the mood right now,');
  391.       print('but maybe later on.  You give her a quick kiss, a $100 bill, then return to');
  392.       print('the Casino to continue playing.'+#13+#10);
  393.       player[pn].players_money:=player[pn].players_money-100;
  394.       nl;pausescr;
  395.     end;
  396.     if (player[pn].screwed=0) and (player[pn].hooker>=10) and
  397.      (player[pn].players_money>win_money) and (player[pn].condom>0) then begin
  398.       nl;pausescr;
  399.       checkhangup; if hangup then leave;
  400.       print('  You notice tears running out of Kathy''s eyes, and she turns her');
  401.       print('to try and hide them from you.  You hold her in your arms, and ask');
  402.       print('her what is wrong.  She says she has a confession to make, that she');
  403.       print('hasn''t been truely honest with you.  She explains that she is a high');
  404.       print('class hooker, getting over $1000 a night, and yet, because of you, she');
  405.       print('doesn''t quite know what is going on with her life, and has fallen');
  406.       print('madly in love with you.'+#13+#10);
  407.       nl;pausescr;
  408.       checkhangup; if hangup then leave;
  409.       print('  You turn your face towards hers, look her in the eyes, and tell her');
  410.       print('that you have known she was a hooker for quite a while, and that');
  411.       print('you had fallen in love with her from the moment you first laid eyes on');
  412.       print('her, but were afraid to say anything.  She asks you how you knew, and');
  413.       print('you show her the condom you had found.'+#13+#10);
  414.       nl;pausescr;
  415.       checkhangup; if hangup then leave;
  416.       print('  Kathy begins crying all over again, and you hold her tightly');
  417.       print('in your arms.  After a short time, the closeness of her body');
  418.       print('to yours starts to make you feel very funny.  You look her in the');
  419.       print('eyes, and begin to kiss her.  She responds, drawing her body');
  420.       print('even closer to yours.'+#13+#10);
  421.       nl;pausescr;
  422.       checkhangup; if hangup then leave;
  423.       print('The next morning, you wake up and look over at Kathy laying there');
  424.       print('next to you.  She wakes up, smiles, and kisses you shyly.  You');
  425.       print('are feeling strange, and ask her, stutteringly, if she will');
  426.       print('marry you.  To your surprise, she accepts, and the two of you');
  427.       print('run out, and within 3 weeks are married.'+#13+#10);
  428.       nl;
  429.       print('  With the money that you have won here at the casino, you and her');
  430.       print('open up a business in the mountains of North Carolina, where you');
  431.       print('and Kathy live happily ever after.'+#13+#10);
  432.       nl;pausescr;
  433.       checkhangup; if hangup then leave;
  434.       won:=true;
  435.     end;
  436.   end;
  437.   if not won then begin
  438.     print('Your date with the young lady costs you $'+cstr(i)+' for dinner, shows, and drinks.'+#13+#10);
  439.     player[pn].players_money:=player[pn].players_money-i;
  440.   end;
  441.   if won then begin
  442.     print('CONGRATULATIONS '+player[pn].name);
  443.     print('YOU HAVE WON THE GAME!');
  444.     sysoplog(#13+#10+' **** '+player[pn].name+' WON AT CASINO ****'+#13+#10);
  445.     print('If I was you, I''d brag about it.');
  446.     print('It''s not designed to be won easily!');
  447.     reset(messagefile);
  448.     append(messagefile);
  449.     temp:=player[pn].name+' won on '+date+'.';
  450.     writeln(messagefile,temp+#13+#10);
  451.     close(messagefile);
  452.     leave;
  453.   end;
  454. end;
  455.  
  456. overlay procedure buy_from_bruno;
  457. var i : integer;
  458.     home, business, women : real;
  459.     temp : str;
  460.     nope : boolean;
  461. begin
  462.   nope:=false;
  463.   home:=50000.; business:=300000.; women:=500000.;
  464.   repeat
  465.     checkhangup; if hangup then leave;
  466.     if (player[pn].players_money>women) and (player[pn].bruno=6) then i:=6 else
  467.      if (player[pn].players_money>business) and (player[pn].bruno=5) then i:=5 else
  468.       if (player[pn].players_money>home) and (player[pn].bruno=4) then i:=4 else
  469.        if (player[pn].players_money>25000) and (player[pn].bruno=3) then i:=3 else
  470.         if (player[pn].players_money>7000) and (player[pn].bruno=2) then i:=2 else
  471.          if (player[pn].players_money>250) and (player[pn].bruno=1) then i:=1 else
  472.     i:=0;
  473.     if i<>0 then begin
  474.       str(player[pn].players_money:0:0,temp);
  475.       temp:=format_money(temp,false);
  476.       print('You have '+temp+' dollars.');
  477.       nl;
  478.       case i of
  479.         1 : begin
  480.               checkhangup; if hangup then leave;
  481.               print('You can now buy your airplane ticket back');
  482.               prompt('from Bruno for $150.  Do you wish to do so? ');
  483.               if yn then begin
  484.                 print('Bruno returns your plane ticket, relieving you of');
  485.                 print('$150 of your hard earned money.');
  486.                 player[pn].bruno:=player[pn].bruno-1;
  487.                 player[pn].players_money:=player[pn].players_money-150.;
  488.                 nl;pausescr;
  489.               end else nope:=true;
  490.             end;
  491.         2 : begin
  492.               checkhangup; if hangup then leave;
  493.               print('You may now buy your watch back from Bruno for $1,250.');
  494.               prompt('Do you wish to do so?' );
  495.               if yn then begin
  496.                 print('Bruno smiles as he returns your watch from his arm,');
  497.                 print('while taking your money');
  498.                 player[pn].bruno:=player[pn].bruno-1;
  499.                 player[pn].players_money:=player[pn].players_money-1250.;
  500.                 nl;nl;pausescr;
  501.               end else nope:=true;
  502.             end;
  503.         3 : begin
  504.               checkhangup; if hangup then leave;
  505.               print('Bruno offers to return the limo for $12,500.');
  506.               prompt('Do you take him up on his offer? ');
  507.               if yn then begin
  508.                 print('Bruno returns the limo to you, and shakes');
  509.                 print('your hand at your smart move.');
  510.                 player[pn].bruno:=player[pn].bruno-1;
  511.                 player[pn].players_money:=player[pn].players_money-12500.;
  512.                 nl;nl;pausescr;
  513.               end else nope:=true;
  514.             end;
  515.         4 : begin
  516.               checkhangup; if hangup then leave;
  517.               print('Bruno offers to sell you your home back for $35,000.');
  518.               prompt('Do you want to buy your house back? ');
  519.               if yn then begin
  520.                 print('Bruno returns the deed to you.');
  521.                 player[pn].players_money:=player[pn].players_money-35000.;
  522.                 player[pn].bruno:=player[pn].bruno-1;
  523.                 nl;nl;pausescr;
  524.               end else nope:=true;
  525.             end;
  526.         5 : begin
  527.               checkhangup; if hangup then leave;
  528.               print('Bruno offers to sell your business back to you for $150,000.');
  529.               prompt('Do you want to buy your business back? ');
  530.               if yn then begin
  531.                 print('Bruno returns control of the business back to you,');
  532.                 print('shaking your hand at a smart move.'#13+#10);
  533.                 player[pn].players_money:=player[pn].players_money-150000.;
  534.                 player[pn].bruno:=player[pn].bruno-1;
  535.                 nl;pausescr;
  536.               end else begin
  537.                 nope:=true;
  538.                 print('Bruno shakes his head at that stupid move of yours.'+#13+#10);
  539.               end;
  540.             end;
  541.         6 : begin
  542.               checkhangup; if hangup then leave;
  543.               print('Bruno walks up to you and says the arab prince has not left');
  544.               print('and might be willing to return your nieces back to you (for a small handling fee, of course).');
  545.               print('It seems he''s got his eye out for the chorus line, and needs');
  546.               print('a little extra cash.');
  547.               nl;nl;
  548.               prompt('Do you let Bruno retrieve your nieces from the Prince? ');
  549.               if yn then begin
  550.                 nl;
  551.                 print('Bruno returns and says the arab will return them for $250,000.');
  552.                 print('You hand Bruno the money, and seconds later, they are returned.');
  553.                 print('to their hotel room, not even knowing they had been sold.'+#13+#10);
  554.                 print('(Bruno had fed them mickeys before taking them to the');
  555.                 print('arab, and luckily for you, the drug had not worn off yet.'+#13+#10);
  556.                 player[pn].bruno:=player[pn].bruno-1;
  557.                 player[pn].players_money:=player[pn].players_money-250000.;
  558.                 nl;nl;pausescr;
  559.                end else begin
  560.                  nope:=true;
  561.                  print('Bruno walks away, sadly shaking his head, thinking about');
  562.                  print('how stupid you are being.'+#13+#10);
  563.                end;
  564.              end;
  565.       end;
  566.     end;
  567.   until (i=0) or nope;
  568. end;
  569.  
  570. overlay procedure sell_to_bruno;
  571. begin
  572.   checkhangup; if hangup then leave;
  573.   print('You don''t have the funds, so a large man named Bruno');
  574.   print('comes over, and');
  575.   repeat
  576.     checkhangup; if hangup then leave;
  577.     player[pn].bruno:=player[pn].bruno+1;
  578.     case player[pn].bruno of
  579.       1  : begin
  580.            print('you sell your plane ticket for $100!');
  581.            player[pn].players_money := player[pn].players_money + 100.;
  582.            temp_money:=temp_money+100.;
  583.          end;
  584.       2  : begin
  585.            print('you sell your solid gold watch for $1,000!');
  586.            player[pn].players_money := player[pn].players_money + 1000.;
  587.            temp_money:=temp_money+1000.;
  588.          end;
  589.       3  : begin
  590.            print('you sell Bruno your new limo for $8,000!');
  591.            player[pn].players_money := player[pn].players_money + 8000.;
  592.            temp_money:=temp_money+8000.;
  593.          end;
  594.       4  : begin
  595.            print('you sell Bruno your new home for $25,000!');
  596.            player[pn].players_money := player[pn].players_money+25000.;
  597.            temp_money:=temp_money+25000.;
  598.          end;
  599.       5  : begin
  600.              print('you sell Bruno your business for $100,000!');
  601.              player[pn].players_money:=player[pn].players_money+100000.;
  602.              temp_money:=temp_money+100000.;
  603.            end;
  604.       6  : begin
  605.            print('you sell your virgin nieces');
  606.            print('(ages 12 & 13) into slavery to an arab prince');
  607.            print('for $200,000!');
  608.            player[pn].players_money := player[pn].players_money + 200000.;
  609.            temp_money:=temp_money+200000.;
  610.          end;
  611.       7  : begin
  612.            nl;nl;delay(1000);
  613.            print('The crowd around the table has become mighty quite.');
  614.            print('You realize, too late, that you have made a serious');
  615.            print('mistake, and have nothing left to offer.  Bruno, and');
  616.            print('two of his friends grab you, and take you for a ride');
  617.            print('in the Nevada desert.  After an hour of driving, they');
  618.            print('drag you out of the car, and proceed to break your arms');
  619.            print('and legs.  Then they get back into the car, leaving you');
  620.            print('laying there, to die.');
  621.            sysoplog(#13+#10+'***** Bruno killed '+player[pn].name+' *****');
  622.            append(messagefile);
  623.            writeln(messagefile,'Bruno killed '+player[pn].name+' on '+date+'.'+#13+#10);
  624.            close(messagefile);
  625.            delay(5000);leave;
  626.          end;
  627.     end;
  628.     nl;nl;pausescr;
  629.     if temp_money<0 then if player[pn].bruno<>7 then
  630.      print('You still don''t have the funds so ')
  631.       else nl;
  632.   until temp_money>0;
  633. end;
  634.  
  635. overlay procedure strange_things(i:integer);
  636. begin
  637.   case i of
  638.     1  : if roul then begin
  639.          print('You throw the coupier a 10 dollar chip in the hopes');
  640.          print('that it will improve your luck.');
  641.          player[pn].players_money:=player[pn].players_money-10;
  642.          nl;nl;pausescr;
  643.        end;
  644.     2  : begin
  645.          print('Feeling thirsty, you order a drink from one of the many');
  646.          print('cocktail waitresses wandering buy.  After about 30 seconds');
  647.          print('you are amazed when she returns with your drink.  You');
  648.          print('give her a 10 dollar chip in appreciation (not to mention');
  649.          print('her good looks).');
  650.          player[pn].players_money:=player[pn].players_money-10;
  651.          nl;nl;pausescr;
  652.        end;
  653.     3  : begin
  654.          print('You notice something strange happening over in the corner.');
  655.          print('A golden creature seems to be approaching you, limping along');
  656.          print('the corridor in what seems to be a fast motion.');
  657.          nl;nl;
  658.          print('What''s this?  He''s a robot!  He is mumbling under his');
  659.          print('breath, and as you strain to hear what he''s saying, you');
  660.          print('catch a few phrases.  He seems to be complaining, mumbling');
  661.          print('something about Earthmen, a Heart of Gold, stupid mice');
  662.          print('and the number 42.');
  663.          nl;nl;pausescr;
  664.          print('A 2-headed man runs up to him, and they stand there not');
  665.          print('15 feet from you.  They talk, then you see the robot');
  666.          print('nod his head in agreement, and they disappear before your');
  667.          print('eyes.');
  668.          nl;nl;
  669.          print('You pick up your drink, and down it in one large swallow, not');
  670.          print('believing anything you have just seen.');
  671.          nl;nl;pausescr;
  672.        end;
  673.     4 : begin
  674.         print('As you set your drink on the table, you hear a deep rumble');
  675.         print('from outside the large, one piece mirror that covers the southern wall');
  676.         print('of the casino.  All of a sudden, with a large smash, a rather');
  677.         print('large sports car comes rushing through the mirror, quickly');
  678.         print('followed by 4 rather large guys on motorcycles.  The car lands');
  679.         print('in the middle of the casino.  Without notice, a slim, young');
  680.         print('looking man jumps out, pulls out a gun and manages to kill');
  681.         print('3 of the 4 cyclists.  By this time.  you are on the floor,');
  682.         print('hiding under the table with about 10 other people.  The');
  683.         print('young man and the cyclist get into a huge fight, rolling');
  684.         print('off tables, throwing each other into the slot machines, knocking');
  685.         print('over other patrons.  Kinda like what you would see in an action adventure');
  686.         print('film.  The young man, who has astounded you with his quick');
  687.         print('right hooks, slams the cyclist into the wall, finally knocking');
  688.         print('him out.'+#13+#10);
  689.         nl;pausescr;
  690.         print('The young man gets up, walks over to you, and asks');
  691.         print('what you are drinking.  You tell him a 7&7, and he tells you');
  692.         print('that is a bad choice, then proceeds to order 2 Martini''s,');
  693.         print('shaken, not stirred.  You ask him his name, and he responds');
  694.         print('with "Bond, James Bond.".  The martini''s arrive, he hands you one');
  695.         print('and proceeds to drink his right on down.  With that over, he');
  696.         print('then picks up a nearby');
  697.         print('girl, gets into his car, and exits the same way he entered,');
  698.         print('making another loud crash as he tears down another wall');
  699.         nl;nl;print('  Almost immidately, the usher-boys have started');
  700.         print('cleaning things up, and within minutes, things are back');
  701.         print('to normal...');
  702.         nl;nl;pausescr;
  703.         print('You pick up the martini left on the table, and swallow it in one');
  704.         print('large gulp, not quite believing anything that has just happened.');
  705.         nl;nl;
  706.       end;
  707.     5:  begin
  708.         print('You stagger a minute and notice that your drinks seems');
  709.         print('a bit stronger.  Just then, you hear a small, quite voice');
  710.         print('behind you say, "Excuse me sir.".  You turn around and');
  711.         print('see a young lady with ruby slippers and carrying a picnic');
  712.         print('basket.  She asks, "Could you tell me in which direction');
  713.         print('Kansas is?  I''ve gotten lost in a storm and just');
  714.         print('can''t seem to find my way back home."  You think to');
  715.         print('yourself that you''ve seen this girl someplace before,');
  716.         print('but you just can''t seem to place her,');
  717.         print('and before you know it, you''ve pointed her in the');
  718.         print('direction of the teleporter.  She says, "Thank you sir.');
  719.         print(' Come on Toto, Aunt-Em is going to be worried about us."');
  720.         print(' And with that, you see a little dog pop');
  721.         print('out of the basket just long enough to bark, before');
  722.         print('being teleported back to Kansas.  You take another drink,');
  723.         print('and pass the whole thing off as a trick done');
  724.         print('by the magacian on stage.');
  725.         nl;nl;pausescr;
  726.      end;
  727.     6:  begin
  728.         print('One of the many waitresses comes over and asks you if you''d');
  729.         print('like a drink.  You are slightly intimidated by her beautiful');
  730.         print('body, and start to stutter.  The girls standing around the');
  731.         print('stranger giggle at your nervousness.  You manage to get out');
  732.         print('a yes, and she leaves for a few minutes and returns with your');
  733.         print('drink.');
  734.         nl;nl;pausescr;
  735.       end;
  736.   end;
  737. end;
  738.  
  739. function real_dough(c:integer):real;
  740. begin
  741.   case player[c].bruno of
  742.     0 : real_dough:=player[c].players_money;
  743.     1 : real_dough:=player[c].players_money-100.;
  744.     2 : real_dough:=player[c].players_money-1100.;
  745.     3 : real_dough:=player[c].players_money-9100.;
  746.     4 : real_dough:=player[c].players_money-33100.;
  747.     5 : real_dough:=player[c].players_money-133100.;
  748.     6 : real_dough:=player[c].players_money-233100.;
  749.   end;
  750. end;
  751.  
  752. procedure check_winnings;
  753. var i : str;
  754. begin
  755.   tleft;
  756.   if player[pn].won_today=-1000000. then begin
  757.     print('You died today!  You''ll have to');
  758.     print('try again tomorrow.');
  759.     leave;
  760.   end;
  761.   if player[pn].won_today>=100000. then begin
  762.     str(player[pn].won_today:0:0,i); i:=format_money(i,false);
  763.     print('Bruno walks up to you and says:');
  764.     nl;
  765.     print('You have won '+i+' today.');
  766.     print('Unfortunately, that is over the limit, so try');
  767.     print('again tomorrow.');
  768.     nl;
  769.     leave;
  770.   end;
  771.   if player[pn].won_today<=-100000. then begin
  772.     str(player[pn].won_today:0:0,i); i:=format_money(i,false);
  773.     print('Bruno walks up to you and informs you that');
  774.     print('you have lost '+i+' today, and that you might');
  775.     print('do better if you try again tomorrow.');
  776.     nl;
  777.     leave;
  778.   end;
  779. end;
  780.  
  781. procedure sort_players;
  782. var x,a,h : integer;
  783.     real_moneya, real_moneyh : real;
  784. begin
  785.   for a:=1 to player[0].num_players-1 do begin
  786.     for h:=a+1 to player[0].num_players do begin
  787.       real_moneyh:=real_dough(h);
  788.       real_moneya:=real_dough(a);
  789.       if real_moneyh > real_moneya then begin
  790.         if h=pn then pn:=a
  791.           else if a=pn then pn:=h;
  792.         player[player[0].num_players+1]:=player[h];
  793.         player[h]:=player[a];
  794.         player[a]:=player[player[0].num_players+1];
  795.       end;
  796.     end;
  797.   end;
  798. end;
  799.  
  800. {$I mc1.pas}
  801.  
  802. {$I mc2.pas}
  803.  
  804. procedure check_random;
  805. const hooker_money=100000.;
  806. var i: integer;
  807. begin
  808.   checkhangup; if hangup then leave;
  809.   tleft;
  810.   i:=random(500)+1;
  811.   case i of
  812.     50 : if roul then strange_things(1);
  813.     60    : strange_things(2);
  814.     70    : strange_things(3);
  815.     80    : strange_things(4);
  816.     90    : strange_things(5);
  817.     100   : strange_things(6);
  818.     110   : if roul then begin
  819.               i:=random(38)+1;
  820.               print('You notice the showgirls talking amongst themselves, and you');
  821.               print('hear them talking about the number '+cstr(i));
  822.               nl;nl;
  823.             end;
  824.     120   : more(1);
  825.     130   : more(2);
  826.     140   : more(3);
  827.   200..300: if player[pn].aids>0 then begin
  828.                case player[pn].aids of
  829.                  1..2 : print('You are feeling weak.');
  830.                  3..4 : print('You are feeling really bad!');
  831.                  5    : died;
  832.                end;
  833.              end;
  834.   350..400: if (player[pn].bruno=0) and
  835.               (player[pn].players_money>player[pn].hooker*hooker_money)
  836.                and (not stranger_dates_kathy)
  837.                 then hooker;
  838.   450..500: if player[pn].players_money>player[pn].hooker*hooker_money
  839.              then stranger_dates;
  840.   end;
  841. end;
  842.  
  843. (*********************** BEGIN TWENTY-ONE **********************)
  844. {$I mc3.pas}
  845. (************************ END TWENYY-ONE ***********************)
  846.  
  847. (*********************** BEGIN BACCARAT ************************)
  848. {$I mc4.PAS}
  849. (************************ END BACCARAT *************************)
  850.  
  851. (************************* BEGIN SLOTS *************************)
  852. {$I mc5.PAS}
  853. (************************** END SLOTS **************************)
  854.  
  855. (************************ BEGIN ROULETTE ***********************)
  856. {$I mc6.pas}
  857. (************************* END ROULETTE ************************)
  858.  
  859. overlay procedure welcome;
  860. var i : str;
  861. begin
  862.   checkhangup; if hangup then return;
  863.   find_player;
  864.   if found then begin
  865.     nl;nl;nl;
  866.     logon(2);
  867.     nl;nl;nl;
  868.     print('Welcome back '+player[pn].name);
  869.     str(player[pn].players_money:0:0,i); i:=format_money(i,false);
  870.     print('You have '+i+'.  Good luck!');
  871.     nl;nl;pausescr;
  872.   end else begin
  873.     logon(1);
  874.     pausescr;
  875.     nl;nl;nl;
  876.     print('  You tip the cabbie as you exit the yellow cab.  He looks back');
  877.     print('as you walk away from the cab, and yells, "Man, you''d better');
  878.     print('turn down that volume of yours!" and with a screech of rubber,');
  879.     print('he leaves you in a smokescreen.  You stare in amazement at the');
  880.     print('large neon sign above you.');
  881.     nl;nl;pausescr;
  882.     logon(3);
  883.     nl;nl;
  884.     enter_casino;
  885.   end;
  886. end; {welcome}
  887.  
  888. procedure check_played(i:integer);
  889. begin
  890.   play_ok:=true;
  891.   case i of
  892.     1 : if player[pn].played_slots=10 then begin
  893.           print('I''m sorry, but you can only visit');
  894.           print('the slot machines 10 times a day.');
  895.           play_ok:=false;
  896.         end;
  897.     2 : if player[pn].played_roulette=5 then begin
  898.           print('I''m sorry, but you can only visit');
  899.           print('the roulette tables 5 times a day.');
  900.           play_ok:=false;
  901.         end;
  902.     3 : if player[pn].played_twenty1=10 then begin
  903.           print('I''m sorry, but you can only visit');
  904.           print('the blackjack tables 10 times a day.');
  905.           play_ok:=false;
  906.         end;
  907.     4 : if player[pn].played_baccarat=3 then begin
  908.           print('I''m sorry, but you can only visit');
  909.           print('the baccarat tables 3 times a day.');
  910.           play_ok:=false;
  911.         end;
  912.   end;
  913. end;
  914.  
  915. {main}
  916. begin
  917.   iport;
  918.   sysoplog('     Played Milliway''s Casino');
  919.   won:=false;
  920.   checkhangup; if hangup then return;
  921.   welcome;
  922.   setcol(1);print('Do you wish to see what''s');
  923.   setcol(1);prompt('happened to others in the game? ');
  924.   if yn then begin printfile(gfilespath+'casino.msg'); pausescr; end;
  925.   randomize;
  926.   done := false;
  927.   slot:=false;roul:=false;twenty:=false;bacc:=false;
  928.   repeat
  929.     tleft;
  930.     checkhangup; if hangup then leave;
  931.     check_winnings;
  932.     print('You are standing in front of 4 doors.');
  933.     print('Each door is numbered, and has a sign underneath.');
  934.     nl;
  935.     print('1 : Slots');
  936.     print('2 : Roulette');
  937.     print('3 : Blackjack');
  938.     print('4 : Baccarat');
  939.     nl;
  940.     print('I : Instructions, Q: Quit,');
  941.     print('S : Global Stats, Y: Your Stats');
  942.     prompt('Which door do you enter? ');
  943.     onek(door,'1234IQSY');
  944.     case door of
  945.       'Q' : done:=true;
  946.       'I' : general_instructions;
  947.       '1' : begin
  948.               check_played(1);
  949.               if play_ok then begin
  950.                 slot:=true;
  951.                 player[pn].played_slots:=player[pn].played_slots+1;
  952.                 slots;
  953.                 slot:=false;
  954.               end;
  955.             end;
  956.       '2' : begin
  957.               check_played(2);
  958.               if play_ok then begin
  959.                 roul:=true;
  960.                 player[pn].played_roulette:=player[pn].played_roulette+1;
  961.                 roulette;
  962.                 roul:=false;
  963.               end;
  964.             end;
  965.       '3' : begin
  966.               check_played(3);
  967.               if play_ok then begin
  968.                 twenty:=true;
  969.                 player[pn].played_twenty1:=player[pn].played_twenty1+1;
  970.                 twenty_one;
  971.                 twenty:=false;
  972.               end;
  973.             end;
  974.       '4' : begin
  975.               if stranger_dates_kathy then begin
  976.                 print('All the tables are filled right now.');
  977.                 print('Please try again later.');
  978.               end else begin
  979.                 check_played(4);
  980.                 if play_ok then begin
  981.                   player[pn].played_baccarat:=player[pn].played_baccarat+1;
  982.                   bacc:=true;
  983.                   baccarat;
  984.                   bacc:=false;
  985.                 end;
  986.               end;
  987.             end;
  988.       'S' : do_stats;
  989.       'Y' : player_stats;
  990.     end;
  991.     nl;
  992.   until done;
  993.   leave;
  994. end.
  995.