home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Devil's Doorknob BBS Capture (1996-2003)
/
devilsdoorknobbbscapture1996-2003.iso
/
Dloads
/
WWIVMODS
/
STMPMOD.ZIP
/
STIMP12.MOD
< prev
Wrap
Text File
|
1992-07-30
|
4KB
|
138 lines
┌────────────────────────────────────────────────────────────────────────┐
│Mod : STIMP12.MOD │
│Version: WWIV 4.20e │
│Author : Stimpy #1 @1002 NuclearArmsNET 442-1601 │
│Description: Lets users use Gold to buy extra time │
│Diffculty: ▓▓░░░░░░░░ │
│Disclaimer: Always backup your source. If you get an incredible urge to │
│ sautee your cat, it's not my fault! │
└────────────────────────────────────────────────────────────────────────┘
= existing line
+ add line
- deleted line
* change line
At the top of BBS.C after all the defines add the line below...
int goldflag;
In void mainmenu()
void mainmenu()
={
= char *s, s1[81],s2[81];
* int golds,golda,i;
= long l;
Then in void mainmenu() add the following case after case 'I':
case 'J':
if (goldflag==1) {
pl("1I am sorry you can only buy time once per call");
} else {
if (thisuser.gold<=0) {
pl("1I am sorry you do not have any gold to buy time with");
} else {
npr("1You have 7%d 1gold\r\n",(int) thisuser.gold);
pl("1Any time you buy is good only for this call");
pl("1One gold piece is worth two minutes");
pl("1How much gold would you like to spend?");
pl("1`Enter' for none");
outstr(": ");
mpl(2);
input(s,2);
i=atoi(s);
if (s[0]==0)
golds=0;
else {
if (s[0])
golds=i;
if (golds>thisuser.gold) {
pl("You do not have that much gold!");
golds=0;
} else {
thisuser.gold=thisuser.gold-golds;
golda=(golds*2.0)*60.0;
thisuser.extratime=golda;
goldflag=1; }}
if (golds==0)
goldflag=0;
}
}
break;
Then search for "logon();" and make the following addtions...
= if (!hangup) {
= logon();
+ thisuser.extratime=0;
+ goldflag=0;
=main_menu_label:
= while (!hangup) {
= if (curdloads)
= dlmainmenu();
= else
= mainmenu();
= }
In MSGBASE1.C
In void post()
= sprintf(s,"+%s posted on %s",p.title,subboards[curlsub].name);
= sysoplog(s);
= sprintf(s,"Posted on %s",subboards[curlsub].name);
= save_status();
= pl(s);
+ thisuser.gold=thisuser.gold+1; /*gives one gold for posting*/
+ npr("3You recieved one gold for this post, you now have 1%d 3gold",(int) thisuser.gold);
+ nl();
= if ((subboards[curlsub].type) && (syscfg.systemnumber)) {
= ++thisuser.postnet;
= if (((subboards[curlsub].anony & anony_val_net)==0) || (lcs()))
= send_net_post(&p, subboards[curlsub].type, subboards[curlsub].filename);
= }
In void remove_post()
= sprintf(s,"-%s removed from %s",msgs[i].title,subboards[curlsub].name);
= sysoplog(s);
= delete(i);
= savebase();
= nl();
= pl("Message removed.");
+ thisuser.gold=thisuser.gold-1;
+ npr("3Removing your message cost you 1 gold, you now have 1%d 3gold",(int) thisuser.gold);
= nl();
= }
In UEDIT.C
In void print_cur_stat
= npr("Note: %s\r\n", u->note);
+ npr("Gold: %d\r\n", (int) u->gold);
In void uedit() add the following case after case 'W':
case '$':
nl();
npr("Amount of gold in account?\r\n[Current=%d]\r\n", (int) u.gold);
mpl(5);
input(s,5);
i=atoi(s);
if (s[0]) {
u.gold=i;
write_user(un,&u);
}
break;
In BBSUTL.C
In void yourinfo();
= npr("Time spent on : %ld Minutes\r\n", (long)
= ((thisuser.timeon+timer()-timeon)/60.0));
+ npr("Your Gold: %d\r\n",(int) thisuser.gold);
Now re-compile. Easy.