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 >
Wrap
Text File
|
1980-01-01
|
11KB
|
154 lines
71
71/75: Gambling Garage Mod
Name: The Killing Joke #1 @2118
Date: Fri May 18 22:10:01 1990
From: The Demilitarized Zone [201-772-3528]
File: BBS.C Function: Mainmenu();
/******** KEY ********/
/* = - Existing Line */
/* + - Add me! */
/*********************
= if (strcmp(s,"/O")==0)
= hangup=1;
= if (strcmp(s,"/E")==0)
= slash_e();
+ if (strcmp(s,"/G")==0)
+ gamble();
= if (strcmp(s,"/N")==0)
= nscan(cursub);
Put this into the end of your BBS.C
void gamble()
{
char ch;
int t;
outchr(12);
center(1,"Welcome to the Gambling Garage"); /* Change to PRT if you don't */
nll(3); /* Have the center routine */
/* Also change nll(3); to nl(); three times if you don't have that. */
prt(5,"What do you want to bet with? "); nl();
prt(2,"SL= 1sl, T= 5min., G=5 gold"); nl();
prt(2,"[S]L, [T]ime, [G]old, [Q]uit :");
ch=onek("QSTG");
switch(ch) {
case 'Q':
break;
case 'S':
if(thisuser.sl>93) {
prt(3,"Your sl is too high to risk!");
nl();
break;
} else {
prt(3,"Betting one sl point..... "); nl();
count(100);
t=random(100);
if (t>75) { /* Change to please you! */
prt(6,"You won an sl point!"); nl();
thisuser.sl++;
changedsl();
} else {
prt(5,"Bahahahaha You lost an sl point!"); nl();
thisuser.sl--;
changedsl();
}
}
break;
case 'T':
prt(3,"Betting 5 minutes of time...."); nl();
count(100);
t=random(100);
if (t>50) { /* Again, change to please you! */
prt(6,"You won 5 minutes of time!"); nl();
thisuser.extratime+=5.0*60.0;
tleft(0);
} else {
prt(5,"Bahahahahaha You lost 5 minutes!"); nl();
thisuser.extratime-=5.0*60.0;
tleft(0);
}
break;
case 'G':
if(thisuser.gold<5) {
prt(3,"You don't have enough gold!");
break;
} else {
prt(3,"Betting....5 gold pieces!"); nl();
count(100);
t=random(100);
if (t>65) { /* Change to your preference */
prt(6,"You won 5 gold pieces! "); nl();
thisuser.gold+=5;
} else {
prt(5,"Bahahaha you lost 5 gold pieces!");
thisuser.gold-=5;
}
}
break;
}
}
2nd
---
Put this somewhere in COM.C
void count(int i) /* Only put a number 100 or less when using */
{
int t;
char s[3];
t=1;
do {
itoa(t,s,10);
prt(1,s); backspace();
if(t>=10)
backspace();
t++;
} while (t != i);
}
3rd
---
Load up FCNS.H and at the end put in:
void gamble();
void count(int i);
at the end of the file.
Hit F9 and grab a big mac.
Notes
-----
You will get two errors in BBS.C if you do not have the functions
center(); and nll(int i); installed. Just change the center to prt
and the nll to 3 nl();'s.. If you like this hate this, saw this, bought
this, ate this, wet this, kissed this, but this.. please notify me, as
I am intrested in your comments. At 1@8876 or my bbs (Yes i need a plug!)
818 905 0340
The Ward!
24 Hours a day.
Read:(1-75,^71),? :i