Category : BBS Programs+Doors
Archive   : TONSMOD.ZIP
Filename : SALTII.MOD

 
Output of file : SALTII.MOD contained in archive : TONSMOD.ZIP

A BETTER GOLD SYSTEM
BY SLICK THE SLICKSTER
1/21/89

This ARC file SLICK3.ARC, contains this file, SLICK3.MOD.

This is a mod that will effect your users on the BBS. It will setup a new
gold system. A gold system is a system, in which the user uses his gold for
things that you want it to be charge to his gold. Like for instant, you want
an on-liner to cost 5 gold pieces, and the user has 100 gold pieces, so when
he runs that on-liner, and ends the on-liner. He will have 95 gold pieces,
because you set up 5 gold pieces for that on-liner. You can set up other
mods to use it with my gold system. The best ones I recommend are: LOGOFF
LOTTERY (LOGLOT10.C) , SELL GOLD FOR TIME/UPLOAD CREDIT (GOLD.C), AND MR.BILL'S CASINO. They are very useful in a gold system, they will let the user spend their gold, or earn some gold.
What my gold system does, is to let the sysop configure how much a external program will cost to the user's gold. And will also let the sysop configure
how much a message base will give gold to the user when he/she post. It will
also remove the gold, if perhaps a user remove his/her message!

The first thing you should do is read over this documentation throug(lp and make sure you understand it. Then you should install it using these
instructions.
+------+
| NOTE |
+------+

This mod contain some symbols, and may be mistaken as if it was the
included in the mod, please understand these symbols, before going on any
farther.
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ LEGEND: * = Change Line ³
³ - = Delete Line ³
³ + = Add Line ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
In some places, I might put this:
ÚÄ¿
³.³
³.³
³.³
ÀÄÙ
The first block, is the legend of the symbols. The symbols will show up as
the first character on the line. The second block is a group of three dots.
It means that the source code continues, and is not written in. Usually, after the three dots, there will be a piece of the source code which you can search for, so when you find it. You'll know where to continue. Now let's start!!


FIRST
+--------------+
| NAME CALLING |
+--------------+

First, let's declare some needed variables! In your VARDEC.H file, you should search for "/* MESSAGE BASE INFORMATION */", (without quotes) and add this line at the end of this variable structure.

float rewardgold;

Now search for "/* DATA FOR OTHER PROGRAMS AVAILABLE */", and add this line at the end of this variable structure.

float costgold;

SECOND
+---------------+
| THE EXTERNALS |
+---------------+

We now are finish with declaring the variables needed. Now, we are going
to modify some existing procedures so that we can edit the gold requirement
for each external game. Now, in your SYSOPF.C file, you should search for
"void chaindata(int n, char *s)", and modify/add the following lines...


void chaindata(int n, char *s) /* LEGEND: * = Change Line */
{ /* - = Delete Line */
char x,y,z,i; /* + = Add Line */
+ char s1[31];
chainfilerec c;

.
.
.
.

else
z='Y';
+ itoa(c.costgold,s1,10);
* sprintf(s,"%2d %-30.30s %-23.23s %-4.4s %-3d %1c %1c %1c",
* n,c.description,c.filename,s1,c.sl,y,x,z);
}

Next go down to "void showchains()", (it should be after the above procedure)
and modify/add the following lines...

void chaindata(int n, char *s)
{

.
.
.
abort=0;
* pla("NN Description Path Name GOLD
SL ANSI AR DOS",
* &abort);
* pla("== ------------------------------ ======================= ----
=== ---- == ---",
* &abort);
.
.
.

}
}

Next go down to "void modify_chain(int n)", (it should be after the above
procedure) and modify/add the following lines...

void modify_chain(int n);
{
.
.
.
pl("F. DOS Interrupt: Used");
+ itoa(c.costgold,s,10);
+ strcpy(s1,"G. Gold Required: ");
+ strcat(s1,s);
+ strcat(s1," Pieces");
+ print(s1,"");
if (c.ansir & ansir_no_300)
* pl("H. 300 Baud : Not allowed");
else
* pl("H. 300 Baud : Allowed");
nl();
* prt(2,"Which (A-H,Q) ? ");
* ch=onek("QABCDEFGH");
.
.
.
else
c.ansir |= ansir_no_DOS;
break;
+ case 'G':
+ nl();
+ prt(5,"New gold requirement? ");
+ input(s,5);
+ c.costgold=atoi(s);
+ break;
* case 'H':
nl();
prt(5,"Allow 300 baud users to run? ");
.
.
.
}
chains[n]=c;
}

Next go down to "void insert_chain(int n)", (it should be the next procedure
under the above procedure) and add a this next line after "c.ansir=0;".

c.costgold=0;


THIRD
+-------------+
| THE WRITERS |
+-------------+

We now are finish with adding in the gold requirement for the external programs, let's now go to edit the board editor, so we can award our fellow posters for posting! OK, go to the beginning of your SYSOPF.C file.
Do a search for "void boarddata(int n, char *s)", and modify/add the following lines...

void boarddata(int n, char *s)
{
char x,y,k,i;
+ char s1[30];

subboardrec r;
.
.
.
else
k=r.key;
+ itoa(r.rewardgold,s1,10);
* sprintf(s,"%2d %1c %1c %-36s %-4s %-8s %-3d %-3d %-3d %-3d %1c",
* n,k,x,r.name,s1,r.filename,r.readsl,r.postsl,r.age,r.maxmsgs,y);
}

Next go down to "void showsubs()", (it should be below here the above
procedure) and add/modify the following lines...

void showsubs()
{
.
.
.
abort=0;
* pla("NN K AR Name GOLD FN
RSL PSL AGE MSG ANON",
* &abort);
* pla("== - == ------------------------------------ ---- ========
--- === --- === ----",
* &abort);
.
.
.
}

Next go down to "void modify_sub(int n)", (should be below the above procedure) and add/modify the following lines...

void modify_sub(int n)
{
.
.
.
print("K. Storage typ: ",s,"");
+ itoa(r.rewardgold,s,10);
+ print("L. Reward Gold: ",s,"");
nl();
* prt(2,"Which (A-L,Q) ? ");
* ch=onek("QABCDEFGHIJKL");
.
.
.
r.storage_type=i;
break;
+ case 'L':
+ nl();
+ prt(2,"New Reward Gold? ");
+ input(s,5);
+ i=atoi(s);
+ r.rewardgold=i;
+ break;
.
.
.
} while ((!done) && (!hangup));
subboards[n]=r;
if (!wfc)
changedsl();
}

Next go down to "void insert_sub(int n)", (it should be the next procedure
under the above procedure) and add a this next line after
"r\storage_type=2;".

r.rewardgold=3;

FOURTH
+-----------------+
| THE LAST BATTLE |
+-----------------+

We now are finish with adding in the gold requirement for the message
base editor, let's now go to edit the complete the misson. We're going
to load your MSGBASE1.C file. Now, do that, load it! OK, search for
"posted on", it should be somewhere in the "void post()". Now we're gonna
start...

void post()
{
.
.
.
topscreen();
strcpy(s,"+");
strcat(s,p.title);
strcat(s," posted on ");
strcat(s,subboards[curlsub].name);
sysoplog(s);
+ nl();
+ prt(3,"Hey, thanks for posting that 'interesting'");
+ prt(3,"post, you just earn yourself ");
+ itoa(subboards[curlsub].rewardgold,s,10);
+ prt(6,s);
+ prt(3," gold pieces!");
+ nl();
+ thisuser.gold+=subboards[curlsub].rewardgold;
save_status();
.
.
}

Now, that's the code to reward the user for posting, let's go on... OK, search for "void remove_post()". Now, do another search for "Message removed.", when you get there, you should still be in remove_post(). Now enter the following lines...

prt(3,"Sorry, when you remove a post, you're");
nl();
prt(3,"removing the gold you earn for posting");
prt(3,"that message!!");
thisuser.gold-=subboards[curlsub].rewardgold;
nl();

Hold on, we're almost finish. Now, load your BBSUTL1.C file, search for
"void show_chains(int *mapp, int *map)", and enter the following lines...

void show_chains(int *mapp, int *map)
{
int abort,i,i1;
* char s1[81],s[81];

abort=0;
nl();
for (i=0; (i<*mapp) && (!abort) && (!hangup); i++) {
itoa(i+1,s,10);
strcat(s,". ");
+ strcat(s,"(");
+ itoa(chains[map[i]].costgold,s1,10);
+ strcat(s,s1);
+ strcat(s,") ");
strcat(s,(chains[map[i]].description));
pla(s,&abort);
}
nl();
}

Now search for "void run_chain(int cn)", and enter the following lines...

void run_chain(int cn)
{
char s[81],s1[81],s2[81];
int oc;

+ if (thisuser.gold<(chains[cn].costgold)) {
+ nl();
+ ansic(6);
+ print("Sorry, not enough gold...","");
+ ansic(3);
+ print("Try posting a message or two in","");
+ ansic(3);
+ print("the message base!!","");
+ return;
+ }
strcpy(s1,chains[cn].filename);
strcpy(s2,create_chain_file("CHAIN.TXT"));
.
.
.
chatcall=oc;
+ thisuser.gold-=chains[cn].costgold;
}

Next, go down to "void do_chains()", (it should be below the above procedure)
and add/modify the following lines...

void do_chains()
{
int map[50],mapp,i,i1,ok,done;
+ int pf;
* char s[81],s1[81],*ss;
chainfilerec c;
.
.
.
}
}
if (mapp==0) {
nl();
nl();
pl("Sorry, no external programs available.");
nl();
return;
}
+ if (thisuser.gold<=0) { /* FROM HERE TO THE END */
+ nl(); /* PASTE THIS IN DO_CHAINS() */
+ ansic(6); /* AND REMOVE THE OLD PART */
+ print("Sorry, not enough gold...","");
+ ansic(3);
+ print("Try posting a message or two in","");
+ ansic(3);
+ print("the message base!!","");
+ return;
+ }
+ if (mapp==1) {
+ if (thisuser.gold<(chains[map[0]].costgold))
+ {
+ nl();
+ ansic(6);
+ print("Sorry, not enough gold...","");
+ ansic(3);
+ print("Try posting a message or two in","");
+ ansic(3);
+ print("the message base!!","");
+ return;
+ }
+ run_chain(map[0]);
+ return;
+ }
+ pf=0;
+ if (okansi()) {
+ strcpy(s,syscfg.gfilesdir);
+ strcat(s,"CHAINS.TXT");
+ if (exist(s))
+ pf=1;
+ }
+ if (!pf)
+ show_chains(&mapp,map);
+ done=0;
+ do {
+ if (!pf) {
+ prt(2,"Which (Q=Quit, ?=List) : ");
+ } else {
+ ansic(0);
+ printfile("CHAINS.TXT");
+ }
+ ss=mmkey(2);
+ i=atoi(ss);
+ if ((i>0) && (i<=mapp)) {
+ done=1;
+ run_chain(map[i-1]);
+ } else
+ if (strcmp(ss,"Q")==0)
+ done=1;
+ else
+ if ((strcmp(ss,"?")==0) && !pf)
+ show_chains(&mapp,map);
+ } while ((!hangup) && (!done));
+ ansic(0);
+ }

Now load in the BBS.C file, search for "void sublist()", and add/modify the
following lines...


void sublist()
{
int i,abort;
* char s[81],s1[81];

abort=0;
nl();
pla("Subs available:");
nl();
i=0;
while ((i<32) && (usub[i].subnum!=-1)) {
strcpy(s,usub[i].keys);
s[2]=0;
if (s[1]==0)
s[1]=32;
+ strcat(s," (");
+ itoa(subboards[usub[i].subnum].rewardgold,s,10);
+ strcat(s,s1);
+ strcat(s,")");
strcat(s," - ");
if (syscfg.systemnumber)
if (subboards[usub[i].subnum].type)
strcat(s," ");
.
.
.
.
}


Well, THAT'S IT!! The SUBLIST() procedure would look like this:

Subs available:

1 (3) - WWIV/Net General
2 (5) - WWIV/Net Movies
3 (10) - WWIV/Net Politics

And the chains menu would look like this:

1. (3) The Gang Busters
2. (5) COPS

If you like to create an ANSI menu or ANSI users, you may, the filename my
mod looks for is "CHAINS.TXT", and you must put some message to tell the
user to input their choice!

If you have any comments, please contact me, I'm the author of The Gang Busters & COPS. So, my address is:

Hue Truong
2323 Lincoln Park Avenue
Los Angeles, CA 90031

I'm found calling in mostly in the 818 area code, and 213 area codes..

ÚÄÄÄÄÄÄÄÄÄ¿
³ The End ³
³---------³
³ 1/21/89 ³
ÀÄÄÄÄÄÄÄÄÄÙ

About the new SALT system...
David Truong #73 @2382 [The Tech Corner]
Sun Jan 22 18:55:17 1989

Hi! I want to tell you about the new SALT system, Slick made. If
they are a mod that is exactly like that, then he didn't know it exist.
He created that mod so because the original SALT system he got didn't let
him have a different requirement of gold for some different on-line
games. He wanted the gold requirement to be low (like 2gp) for games
that the users don't play that often. And the games the users play
*everyday*, has a higher gold requirement. The old salt system didn't
let him do that, so he went on creating this one. You can have different
gold requirement by seting up the gold requirement in the CHAINEDIT. On
the display of CHAINS available (while in the CHAINEDIT) it would display
the gold requirement for that game too. And it also will display the
gold requirement to the user, when the lists of games are available.
He also didn't like to give the *fix* amount of gold pieces to the
user when the user post. He wanted something like running the chains,
where you can edit the gold requirement, but something like that so when
a user posts, he gets a different reward of gold, like to give more gold
on another message base, than the others. So he added it in, but when
you put this in, the message base will mess up. And you kinda have to
initialize WWIV in a temporary dir, and get the SUBS.DAT, so that it
won't crash. You'll find out, it's a floating point error if there are
more than one msg base.


  3 Responses to “Category : BBS Programs+Doors
Archive   : TONSMOD.ZIP
Filename : SALTII.MOD

  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/