home *** CD-ROM | disk | FTP | other *** search
/ The Devil's Doorknob BBS Capture (1996-2003) / devilsdoorknobbbscapture1996-2003.iso / Dloads / WWIVMODS / MODSUNKN.ZIP / GAMBLE.MOD < prev    next >
Text File  |  1980-01-01  |  11KB  |  154 lines

  1. 71
  2.  
  3. 71/75: Gambling Garage Mod
  4. Name: The Killing Joke #1 @2118
  5. Date: Fri May 18 22:10:01 1990
  6. From: The Demilitarized Zone [201-772-3528]
  7.  
  8.  File: BBS.C  Function: Mainmenu();                                            
  9.  
  10.      /******** KEY ********/                                                   
  11.      /* = - Existing Line */                                                   
  12.      /* + - Add me!       */                                                   
  13.      /*********************                                                    
  14.  
  15. =  if (strcmp(s,"/O")==0)                                                      
  16. =    hangup=1;                                                                 
  17. =  if (strcmp(s,"/E")==0)                                                      
  18. =    slash_e();                                                                
  19. +  if (strcmp(s,"/G")==0)                                                      
  20. +     gamble();                                                                
  21. =  if (strcmp(s,"/N")==0)                                                      
  22. =    nscan(cursub);                                                            
  23.  
  24.   Put this into the end of your BBS.C                                          
  25.  
  26. void gamble()                                                                  
  27.                                                                                
  28. {                                                                              
  29.                                                                                
  30. char ch;                                                                       
  31. int t;                                                                         
  32.                                                                                
  33.                                                                                
  34.  outchr(12);                                                                   
  35.  center(1,"Welcome to the Gambling Garage");   /* Change to PRT if you don't */
  36.  nll(3);                                       /* Have the center routine */   
  37.  /* Also change nll(3); to nl(); three times if you don't have that. */        
  38.                                                                                
  39.                                                                                
  40.  prt(5,"What do you want to bet with? "); nl();                                
  41.  prt(2,"SL= 1sl, T= 5min., G=5 gold"); nl();                                   
  42.  prt(2,"[S]L, [T]ime, [G]old, [Q]uit :");                                      
  43.  ch=onek("QSTG");                                                              
  44.                                                                                
  45.  switch(ch) {                                                                  
  46.    case 'Q':                                                                   
  47.      break;                                                                    
  48.    case 'S':                                                                   
  49.      if(thisuser.sl>93) {                                                      
  50.       prt(3,"Your sl is too high to risk!");                                   
  51.       nl();                                                                    
  52.       break;                                                                   
  53.       } else {                                                                 
  54.      prt(3,"Betting one sl point..... "); nl();                                
  55.  count(100);                                                                   
  56.  t=random(100);                                                                
  57.  if (t>75) {      /* Change to please you! */                                  
  58.    prt(6,"You won an sl point!");               nl();                          
  59.    thisuser.sl++;                                                              
  60.    changedsl();                                                                
  61.  } else {                                                                      
  62.       prt(5,"Bahahahaha You lost an sl point!");     nl();                     
  63.       thisuser.sl--;                                                           
  64.       changedsl();                                                             
  65.  }                                                                             
  66.      }                                                                         
  67.   break;                                                                       
  68.    case 'T':                                                                   
  69.    prt(3,"Betting 5 minutes of time...."); nl();                               
  70.     count(100);                                                                
  71.     t=random(100);                                                             
  72.     if (t>50) {  /* Again, change to please you! */                            
  73.       prt(6,"You won 5 minutes of time!"); nl();                               
  74.       thisuser.extratime+=5.0*60.0;                                            
  75.       tleft(0);                                                                
  76.       } else {                                                                 
  77.         prt(5,"Bahahahahaha You lost 5 minutes!");  nl();                      
  78.         thisuser.extratime-=5.0*60.0;                                          
  79.         tleft(0);                                                              
  80.         }                                                                      
  81.         break;                                                                 
  82.    case 'G':                                                                   
  83.       if(thisuser.gold<5) {                                                    
  84.   prt(3,"You don't have enough gold!");                                        
  85.   break;                                                                       
  86.        } else {                                                                
  87.   prt(3,"Betting....5 gold pieces!"); nl();                                    
  88.   count(100);                                                                  
  89.   t=random(100);                                                               
  90.   if (t>65) {  /* Change to your preference */                                 
  91.      prt(6,"You won 5 gold pieces! "); nl();                                   
  92.      thisuser.gold+=5;                                                         
  93.                                                                                
  94.        } else {                                                                
  95.      prt(5,"Bahahaha you lost 5 gold pieces!");                                
  96.        thisuser.gold-=5;                                                       
  97.        }                                                                       
  98.  }                                                                             
  99.        break;                                                                  
  100.                                                                                
  101.      }                                                                         
  102. }                                                                              
  103.                                                                                
  104. 2nd                                                                            
  105. ---                                                                            
  106.   Put this somewhere in COM.C                                                  
  107.                                                                                
  108. void count(int i)    /* Only put a number 100 or less when using */            
  109.  {                                                                             
  110.    int t;                                                                      
  111.    char s[3];                                                                  
  112.                                                                                
  113.    t=1;                                                                        
  114.                                                                                
  115.  do {                                                                          
  116.    itoa(t,s,10);                                                               
  117.     prt(1,s); backspace();                                                     
  118.      if(t>=10)                                                                 
  119.       backspace();                                                             
  120.     t++;                                                                       
  121.     } while (t != i);                                                          
  122.  }                                                                             
  123.                                                                                
  124.                                                                                
  125.                                                                                
  126. 3rd                                                                            
  127. ---                                                                            
  128.   Load up FCNS.H and at the end put in:                                        
  129.                                                                                
  130.   void gamble();                                                               
  131.   void count(int i);                                                           
  132.                                                                                
  133.   at the end of the file.                                                      
  134.                                                                                
  135.                                                                                
  136.                                                                                
  137. Hit F9 and grab a big mac.                                                     
  138.                                                                                
  139. Notes                                                                          
  140. -----                                                                          
  141.                                                                                
  142. You will get two errors in BBS.C if you do not have the functions              
  143. center();  and nll(int i);  installed.  Just change the center to prt          
  144. and the nll to 3 nl();'s..   If you like this hate this, saw this, bought      
  145. this, ate this, wet this, kissed this, but this.. please notify me, as         
  146. I am intrested in your comments. At 1@8876  or my bbs (Yes i need a plug!)     
  147.                                                                                
  148. 818 905 0340                                                                   
  149. The Ward!                                                                      
  150. 24 Hours a day.                                                                
  151.  
  152.  
  153. Read:(1-75,^71),? :i
  154.