Category : BBS Programs+Doors
Archive   : TZBANK14.ZIP
Filename : TZCASINO.C

 
Output of file : TZCASINO.C contained in archive : TZBANK14.ZIP
void tzbank() /* mod - add entire void */
{
char s[81],s1[81],s2[81],buf[12];
int i,f;
float l;

if (thisuser.sl<=10) {
prt(1,"Sorry, but your Security Level is too low to enter the bank. Please try"); nl();
prt(1,"again after you have been validated."); nl();
nl();
return;
}
strcpy(s1,"TZCASINO.EXE");
if (!exist(s1)) {
nl();
prt(3,"Sorry, the casino is currently closed."); nl();
} else {
sysoplog("*** Entered the Casino");
nl();
prt(5,"Checking the casino door..");
nl();
chatcall=0;
strcpy(s2,create_chain_file("CHAIN.TXT"));
stuff_in(s,s1,s2,"","","","");
full_external(s,0,0);
strcpy(s,"$$CASINO.DAT");
f=open(s,O_RDWR | O_BINARY);
if (f>0) {
lseek(f,0L,SEEK_SET);
read(f,(void *) buf,12);
buf[10]=0;
thisuser.gold=atof(buf);
lseek(f,12L,SEEK_SET);
read(f,(void *) buf,12);
buf[10]=0;
if (thisuser.sl<255) {
thisuser.sl=atoi(buf);
realsl=thisuser.sl;
}
lseek(f,24L,SEEK_SET);
read(f,(void *) buf,12);
buf[10]=0;
thisuser.timesaved=atoi(buf);
lseek(f,36L,SEEK_SET);
read(f,(void *) buf,12);
buf[10]=0;
thisuser.uk=atol(buf);
lseek(f,48L,SEEK_SET);
read(f,(void *) buf,12);
buf[10]=0;
l=atof(buf);
lseek(f,60L,SEEK_SET);
read(f,(void *) buf,12);
buf[10]=0;
i=atoi(buf);
close(f);
unlink(s);
if (i) {
hangup=1;
delay(3000);
}
if (l<0.0) {
l=labs(l);
if (extratimecall>0.0) {
if (extratimecall>=l) {
extratimecall-=l;
} else {
l-=extratimecall;
extratimecall=0.0;
}
} else
thisuser.extratime-=l;
} else
thisuser.extratime+=l;
}
}
}


  3 Responses to “Category : BBS Programs+Doors
Archive   : TZBANK14.ZIP
Filename : TZCASINO.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/