home *** CD-ROM | disk | FTP | other *** search
/ synchro.net / synchro.net.tar / synchro.net / main / BBS / MC.ZIP / MC2.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1988-05-06  |  15.5 KB  |  383 lines

  1. {                             Milliways Casino                               }
  2. {                  Copyright (C) 1987 by Charles Ezzell & Matthew Warner     }
  3. {                            All Rights Reserved                             }
  4. {                                                                            }
  5. {                                                                            }
  6. overlay procedure player_stats;
  7. var real_money : real;
  8.     temp : str;
  9. begin
  10.   checkhangup; if hangup then leave;
  11.   nl;nl;
  12.   print('Your Name '+player[pn].name);
  13.   if player[pn].last_on<>date then print('Last time here was '+player[pn].last_on+'.');
  14.   str(player[pn].times_on:0,temp);
  15.   if player[pn].times_on>1 then temp:=temp+' times.' else temp:=temp+' time.';
  16.   print('You have played the game '+temp);
  17.   str(player[0].jackpot:0:0,temp);
  18.   temp:=format_money(temp,false);
  19.   print('The slots jackpot now stands at '+temp+'.');
  20.   str(player[pn].players_money:0:0,temp);
  21.   temp:=format_money(temp,false);
  22.   print('You have '+temp+' on hand at this time.');
  23.   real_money:=real_dough(pn);
  24.   str(real_money:0:0,temp);
  25.   temp:=format_money(temp,true);
  26.   print('Your actual cash is '+temp+'.');
  27.   if not player[0].dating_kathy then begin
  28.     str(player[0].strangers_money:0:0,temp);
  29.     temp:=format_money(temp,false);
  30.     print('The stranger has '+temp+'.');
  31.   end else print('The stranger is out fooling around.');
  32.   if player[pn].hooker>0 then begin
  33.     str(player[pn].hooker,temp);
  34.     if player[pn].hooker>1 then temp:=temp+' times.'
  35.      else temp:=temp+' time.';
  36.     print('You''ve dated Kathy '+temp);
  37.     if player[pn].screwed>0 then begin
  38.       str(player[pn].screwed,temp);
  39.       if player[pn].screwed>1 then temp:=temp+' times.'
  40.        else temp:=temp+' time.';
  41.       print('You''ve made love to Kathy '+temp);
  42.     end;
  43.   end;
  44.   if player[pn].turned_down_date>0 then begin
  45.     str(player[pn].turned_down_date:0,temp);
  46.     if player[pn].hooker=0 then begin
  47.       nl;ansic(8);
  48.       print('You have not had a date yet!  Are you ''funny''?');
  49.       nl;ansic(0);
  50.     end else begin
  51.       if player[pn].turned_down_date>1 then temp:=temp+' dates'
  52.        else temp:=temp+' date';
  53.       print('You''ve turned down '+temp+' with Kathy.');
  54.     end;
  55.   end;
  56.   real_money:=player[pn].won_today;
  57.   str(real_money:0:0,temp);
  58.   temp:=format_money(temp,false);
  59.   if real_money>0.0 then print('Today, you have won '+temp+'.');
  60.   if real_money<0.0 then print('Today, you have lost '+temp+'.');
  61.   if real_money=0.0 then print('You have not won or lost today.');
  62.   if player[pn].bruno>0 then begin
  63.     str(player[pn].bruno,temp);
  64.     print('You have seen Bruno '+temp+' times.');
  65.   end;
  66.   tleft;
  67.   print('Time Left: '+tlef);
  68.   nl;nl;pausescr;
  69. end;
  70.  
  71. overlay procedure do_stats;
  72. var i : integer;
  73.     real_money : real;
  74.     temp, temp3, temp2, temp1 : str;
  75. begin
  76.   sort_players;
  77.   print('Player''s Name                 Money         Real');
  78.   print('-------------------------   ----------   -----------');
  79.   for i:=1 to player[0].num_players do begin
  80.     checkhangup; if hangup then leave;
  81.     real_money:=real_dough(i);
  82.     str(real_money:0:0,temp1);
  83.     temp1:=format_money(temp1,true);
  84.     str(player[i].players_money:0:0,temp3);
  85.     temp3:=format_money(temp3,false);
  86.     temp:=player[i].name;
  87.     if length(temp)<25 then
  88.       repeat
  89.         temp:=temp+' ';
  90.       until length(temp)=25;
  91.     if length(temp3)<10 then
  92.       repeat
  93.         temp3:=' '+temp3;
  94.       until length(temp3)=10;
  95.     if length(temp1)<11 then
  96.       repeat
  97.         temp1:=' '+temp1;
  98.       until length(temp1)=11;
  99.     print(temp+'   '+temp3+'   '+temp1);
  100.   end;
  101.   tleft;
  102.   print('Time Left: '+tlef);
  103.   nl;pausescr;
  104. end;
  105.  
  106. overlay procedure find_player;
  107. var i:integer;
  108. begin
  109.   checkhangup; if hangup then return;
  110.   found:=false;
  111.   assign(messagefile,gfilespath+'casino.msg');
  112.   {$I-} reset(messagefile); {$I+}
  113.   if ioresult<>0 then begin
  114.     rewrite(messagefile);
  115.     writeln(messagefile,'Current file begins on '+date+'.'+#13+#10);
  116.   end;
  117.   close(messagefile);
  118.   assign(infile,gfilespath+'mcrecord.dat');
  119.   {$I-} reset(infile); {$I+}
  120.   if ioresult <>0 then begin
  121.     with player[0] do begin
  122.       reckind:=system;
  123.       num_players:=0;
  124.       old_date:=date;
  125.       strangers_money:=20000;
  126.       jackpot:=10000;
  127.       dating_kathy:=false;
  128.     end;
  129.   end else begin
  130.     seek(infile,0);
  131.     read(infile,player[0]);
  132.     if player[0].num_players>0 then begin
  133.       for i:=1 to player[0].num_players do
  134.        read(infile,player[i]);
  135.       if player[0].old_date<>date then begin
  136.         sysoplog(#13+#10+'***  New Day for the Casino  ***'+#13+#10);
  137.         player[0].old_date:=date;
  138.         for i:=1 to player[0].num_players do begin
  139.           player[i].played_roulette:=0;
  140.           player[i].played_baccarat:=0;
  141.           player[i].played_twenty1:=0;
  142.           player[i].played_slots:=0;
  143.           player[i].won_today:=0.0;
  144.         end;
  145.       end;
  146.       sort_players;
  147.       i:=0;
  148.       repeat
  149.         i:=i+1;
  150.         if player[i].name=thisuser.name then found:=true;
  151.         if found then pn:=i;
  152.       until (i=player[0].num_players) or found;
  153.     end;
  154.   end;
  155.   close(infile);
  156.   if not found then create_player;
  157.   check_winnings;
  158.   if player[pn].last_on<>date then player[pn].times_on:=player[pn].times_on+1;
  159.   if (not player[pn].ansi_ok) and okansi
  160.    then begin
  161.     prompt('Do you want to see ANSI graphics?');
  162.     if yn then player[pn].ansi_ok:=true else player[pn].ansi_ok:=false;
  163.   end;
  164.   if player[pn].ansi_ok then ansiok:=true else ansiok:=false;
  165.   if not okansi then ansiok:=false;
  166.   if player[0].dating_kathy then stranger_dates_kathy:=true
  167.    else stranger_dates_kathy:=false;
  168. (*  if (not player[pn].music) and music in thisuser.defaults then begin
  169.     prompt('Do you wish to hear music?')
  170.     if yn then player[pn].music:=true;
  171.   end; *)  {Look for music in later release}
  172. end; {find player}
  173.  
  174. overlay procedure died;
  175. begin
  176.   print('OH NO!  You have collapsed inside the Casino and have been rushed to the');
  177.   print('hospital.  After several days, a doctor comes in with the bad news');
  178.   print('of all the tests they have run on you.  You have AIDS, and they want');
  179.   print('to know of all the people you have had sexual contact with in the past');
  180.   print('several years.  Your mind is so messed up from the news, you can');
  181.   print('only think of Kathy.  You give them her name, and learn she has died');
  182.   print('herself, only 2 days ago.');
  183.   nl;
  184.   print('Well, better luck in your next life '+player[pn].name+'!');
  185.   append(messagefile);
  186.   writeln(messagefile,player[pn].name + ' caught the deadly disease and died on '+date+'.');
  187.   close(messagefile);
  188.   player_died;
  189.   leave;
  190. end;
  191.  
  192. overlay procedure stranger_dates;
  193. var h,i:integer;
  194. begin
  195.   if not stranger_dates_kathy then begin
  196.     h:=random(100);
  197.     if h>75 then begin
  198.       checkhangup; if hangup then leave;
  199.       nl;
  200.       if player[pn].hooker=0 then begin
  201.         print('  A beautiful blonde comes up to the stranger and asks him');
  202.         print('if he would like to go out with her.  ');
  203.       end else
  204.        print('  You see Kathy approach the stranger and ask him for a date.  ');
  205.       if h>90 then begin
  206.         print('The stranger looks her over, gets up and tells you that');
  207.         print('maybe he''ll see you later.  He then takes her arm, and they');
  208.         print('leave.'+#13+#10);
  209.         player[0].dating_kathy:=true;
  210.         stranger_dates_kathy:=true;
  211.         nl;pausescr;
  212.       end else if h>85 then begin
  213.         print('The stranger looks at her, and says something to the showgirls');
  214.         print('sitting around him.  Two of them get up, grab her, and throw her');
  215.         print('out of the casino.'+#13+#10);
  216.         nl;pausescr;
  217.         checkhangup; if hangup then leave;
  218.         print('  You get up out of your chair, and leave the casino and find');
  219.         if player[pn].bruno=0 then print('the young lady')
  220.          else print('Kathy');
  221.         print('standing outside the casino, crying.  You ask her if there is');
  222.         print('anything you can do to help her.  She looks at you, noticing');
  223.         print('what appears to be concern in your eyes, and asks you if you');
  224.         print('would like to keep her company tonight.'+#13+#10);
  225.         nl;prompt('Do you go with her? ');
  226.         if yn then date_kathy else begin
  227.           checkhangup; if hangup then leave;
  228.           nl;
  229.           player[pn].turned_down_date:=player[pn].turned_down_date+1;
  230.           print('  You tell her that you can''t leave right now, but you');
  231.           print('would be glad to get her a taxi to take her back home.');
  232.           print('She accepts, saying that she would like to see you again');
  233.           print('sometime soon.  You agree to this, and hail a taxi for her.');
  234.           print(' She gets into the taxi, and leaves.  ');
  235.           if player[pn].condom=0 then begin
  236.             print('As the taxi drives off');
  237.             print('you notice a small package laying on the sidewalk.'+#13+#10);
  238.             nl;prompt('Do you pick it up? ');
  239.             if yn then begin
  240.               checkhangup; if hangup then leave;
  241.               nl;
  242.               player[pn].condom := player[pn].condom + 1;
  243.               print('It is a condom.  Your mind begins to wonder about');
  244.               print('what kind of person');
  245.               if player[pn].bruno=0 then print('the young lady')
  246.                else print('Kathy');
  247.               print('might be.'+#13+#10);
  248.               nl;pausescr;
  249.             end;
  250.           end;
  251.         end;
  252.       end else begin
  253.         print('The stranger tells her to get lost, he doesn''t have time to mess');
  254.         print('with her at the moment.'+#13+#10);
  255.       end;
  256.     end;
  257.   end else begin
  258.     player[0].dating_kathy:=false;
  259.     stranger_dates_kathy:=false;
  260.     print('The stranger returns back to the casino, taking his seat near you.');
  261.     i:=random(10)*100;
  262.     player[0].strangers_money:=player[0].strangers_money-i;
  263.   end;
  264. end;
  265.  
  266. overlay procedure hooker;
  267. var temp:str;
  268.     temp_num, y, i:integer;
  269.     dated, condom : boolean;
  270. begin
  271.   if player[pn].hooker=0 then begin
  272.     checkhangup; if hangup then leave;
  273.     print('  A beautiful blonde comes up to you and sits down beside you.');
  274.     print('She mentions that she has been watching you play, and would like');
  275.     print('to get to know you better.  She asks you if you would like to go');
  276.     print('out and see some of the nightlife around town.'+#13+#10);
  277.     nl;
  278.     prompt('Do you go with the young lady? ');
  279.     if yn then date_kathy else refuse_date;
  280.   end else if player[pn].hooker>0 then begin
  281.     checkhangup; if hangup then leave;
  282.     print('Kathy comes up to you and asks if you would like to go out again.'+#13+#10);
  283.     nl;prompt('Do you go with her? ');
  284.     if yn then date_kathy else refuse_date;
  285.   end;
  286. end; {end hooker}
  287.  
  288. overlay procedure more(i:integer);
  289. var t:integer; r:real; temp:str;
  290. begin
  291.   case i of
  292.     1 : begin
  293.       print('You stare at the stranger and how quickly he can drink');
  294.       print('his drinks!  In the reflection of the bourbon, you');
  295.       print('notice something flashing off to the corner of the casino.  You');
  296.       print('glance over in that direction and see 3 people');
  297.       print('materializing.  You notice two figures that');
  298.       print('human, but the third looks like a cross');
  299.       print('between a man and the devil!'+#13+#10);
  300.       nl;
  301.       print('The one in the middle approaches you and asks, "Excuse');
  302.       print('me Sir, but could you direct me to George and Gracey?"'+#13+#10);
  303.       nl;pausescr;
  304.       print('You look in puzzlement at the three men and the one in');
  305.       print('the middle responds again.'+#13+#10);
  306.       print('"The two humpback whales..  You know.." he says.');
  307.       print('The one that looks like the devil says, "Admiral, I');
  308.       print('don''t think he knows.  Maybe we should find them');
  309.       print('ourselves."'+#13+#10);
  310.       nl;
  311.       print('And with that, they both exit out the doors to the far right...'+#13+#10);
  312.       nl;pausescr;
  313.         end;
  314.     2 : begin
  315.       print('You hear a crash and see a large creature rushing');
  316.       print('through the doors!  He looks like a troll, but you');
  317.       print('wouldn''t know one if you saw one.  He lets out a roar,');
  318.       print('and runs into the men''s bathroom.'+#13+#10);
  319.       nl;pausescr;
  320.       print('Not more than 2 seconds pass before you see a ');
  321.       print('large man run through the same broken door.  He is');
  322.       print('carrying a lantern and a rather antique looking sword.');
  323.       print('He approaches you.'+#13+#10);
  324.       nl;pausescr;
  325.       ansic(4);print('>ASK MAN ABOUT TROLL');
  326.       ansic(4);print('>"Ah yes...  He''s in the bathroom."');
  327.       ansic(4);print('>SAY THANK YOU.');
  328.       delay(2000);
  329.       nl;ansic(4);print(^G+^G+^G+'Your score is 420 in 4200 moves'+^G+^G+^G);
  330.       ansic(0);nl;pausescr;
  331.       print('and with that over with, he runs into the bathroom...');
  332.       print('You return to the game..');
  333.         end;
  334.     3 : begin
  335.       print('All of the sudden your concentration is broken as you');
  336.       print('hear the shrill of alarms and buzzers.  You notice that');
  337.       print('a man at one of the other tables is yelling.  Bruno goes over');
  338.       print('to that man and picks him up off his feet as if he was');
  339.       print('nothing.  The man is screaming and dragging his');
  340.       print('feet.  As Bruno walks by you, the man throws a little');
  341.       print('black box at you.'+#13+#10);
  342.       nl;pausescr;
  343.       print('Bruno carries the man to an airlock, where the bartender');
  344.       print('is standing.  The bartender pushes a button, and Bruno');
  345.       print('shoves the man into it.  Then, the bartender pushes another');
  346.       print('button, and you hear the whooshing sound of air rushing out. ');
  347.       print('Seconds later, you notice the man float by one of the windows');
  348.       print('just before his body explodes.'+#13+#10);
  349.       nl;pausescr;
  350.       prompt('Do you pick up the box? ');
  351.       if yn then begin
  352.         print('You examine the box, and notice it''s a calculator for determining ');
  353.         print('the winning combinations for slot machines and roulette wheels!');
  354.         prompt('Do you keep the box? ');
  355.         if yn then begin
  356.           print('Bruno comes back over, looking around, and notices the box');
  357.           print('in your hand.  The next thing you know, you are standing');
  358.           print('in the airlock.  You look around, trying to find a way to');
  359.           print('escape, then......'+#13+#10);
  360.           player[pn].bruno:=100;
  361.           sysoplog(#13+#10+'***** Bruno killed '+player[pn].name+' *****');
  362.           append(messagefile);
  363.           writeln(messagefile,'Bruno killed '+player[pn].name+' on '+date+' for cheating.'+#13+#10);
  364.           close(messagefile);
  365.           delay(5000);leave;
  366.         end else begin
  367.           print('You call Bruno over, and hand him the box.  He thanks you,');
  368.           print('and in return hands you the man''s Milliways Credit');
  369.           print('Card.  You take the card, and hand yours and it to one');
  370.           print('of the hostesses, who returns in a few minutes with your');
  371.           print('card.'+#13+#10);
  372.           for t:=1 to 30 do r:=random(100)*100;
  373.           str(r:0:0,temp);
  374.           temp:=format_money(temp,false);
  375.           print('You are '+temp+' richer for being honest!');
  376.           player[pn].players_money:=player[pn].players_money+r;
  377.           nl;pausescr;
  378.         end;
  379.       end;
  380.         end;
  381.   end;
  382. end;
  383.  
  384.