home *** CD-ROM | disk | FTP | other *** search
/ The Devil's Doorknob BBS Capture (1996-2003) / devilsdoorknobbbscapture1996-2003.iso / Dloads / WWIVMODS / MODSUNKN.ZIP / SALTII.MOD < prev    next >
Text File  |  1989-02-04  |  16KB  |  504 lines

  1.  
  2.                              A BETTER GOLD SYSTEM
  3.                             BY SLICK THE SLICKSTER
  4.                                    1/21/89
  5.  
  6.    This ARC file SLICK3.ARC, contains this file, SLICK3.MOD.
  7.  
  8.    This is a mod that will effect your users on the BBS.  It will setup a new
  9. gold system.  A gold system is a system, in which the user uses his gold for
  10. things that you want it to be charge to his gold.  Like for instant, you want
  11. an on-liner to cost 5 gold pieces, and the user has 100 gold pieces, so when
  12. he runs that on-liner, and ends the on-liner.  He will have 95 gold pieces,
  13. because you set up 5 gold pieces for that on-liner.  You can set up other
  14. mods to use it with my gold system.  The best ones I recommend are: LOGOFF
  15. 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.
  16.    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
  17. how much a message base will give gold to the user when he/she post.  It will
  18. also remove the gold, if perhaps a user remove his/her message!
  19.  
  20.    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 
  21. instructions.
  22.                                  +------+
  23.                                  | NOTE |
  24.                                  +------+
  25.  
  26.    This mod contain some symbols, and may be mistaken as if it was the
  27. included in the mod, please understand these symbols, before going on any
  28. farther.
  29. ┌─────────────────────────┐
  30. │ LEGEND: * = Change Line │
  31. │         - = Delete Line │
  32. │         + = Add Line    │
  33. └─────────────────────────┘
  34. In some places, I might put this:
  35. ┌─┐
  36. │.│
  37. │.│
  38. │.│
  39. └─┘
  40. The first block, is the legend of the symbols.  The symbols will show up as
  41. the first character on the line.  The second block is a group of three dots.
  42. 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!!
  43.  
  44.  
  45.                                    FIRST
  46.                              +--------------+
  47.                              | NAME CALLING |
  48.                              +--------------+
  49.  
  50. 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.
  51.  
  52.    float rewardgold;
  53.  
  54. Now search for "/* DATA FOR OTHER PROGRAMS AVAILABLE */", and add this line at the end of this variable structure.
  55.  
  56.    float costgold;
  57.  
  58.                                   SECOND
  59.                             +---------------+
  60.                             | THE EXTERNALS |
  61.                             +---------------+
  62.  
  63. We now are finish with declaring the variables needed.  Now, we are going
  64. to modify some existing procedures so that we can edit the gold requirement
  65. for each external game.  Now, in your SYSOPF.C file, you should search for
  66. "void chaindata(int n, char *s)", and modify/add the following lines...
  67.  
  68.  
  69.     void chaindata(int n, char *s)   /* LEGEND: * = Change Line */
  70.     {                                /*         - = Delete Line */
  71.       char x,y,z,i;                  /*         + = Add Line    */
  72. +     char s1[31];
  73.       chainfilerec c;
  74.  
  75.       .
  76.       .
  77.       .
  78.       .
  79.  
  80.       else
  81.         z='Y';
  82. +     itoa(c.costgold,s1,10);
  83. *     sprintf(s,"%2d %-30.30s %-23.23s %-4.4s %-3d   %1c  %1c  %1c",
  84. *               n,c.description,c.filename,s1,c.sl,y,x,z);
  85.     }
  86.  
  87. Next go down to "void showchains()", (it should be after the above procedure)
  88. and modify/add the following lines...
  89.  
  90.     void chaindata(int n, char *s)
  91.     {
  92.  
  93.       .
  94.       .
  95.       .
  96.       abort=0;
  97. *     pla("NN Description                    Path Name               GOLD 
  98. SL  ANSI AR DOS",
  99. *         &abort);
  100. *     pla("== ------------------------------ ======================= ---- 
  101. === ---- == ---",
  102. *         &abort);
  103.       .
  104.       .
  105.       .
  106.  
  107.       }
  108.     }
  109.  
  110. Next go down to "void modify_chain(int n)", (it should be after the above
  111. procedure) and modify/add the following lines...
  112.  
  113.      void modify_chain(int n);
  114.      {
  115.        .
  116.        .
  117.        .
  118.          pl("F. DOS Interrupt: Used");
  119. +      itoa(c.costgold,s,10);
  120. +      strcpy(s1,"G. Gold Required: ");
  121. +      strcat(s1,s);
  122. +      strcat(s1," Pieces");
  123. +      print(s1,"");
  124.        if (c.ansir & ansir_no_300)
  125. *        pl("H. 300 Baud     : Not allowed");
  126.        else
  127. *        pl("H. 300 Baud     : Allowed");
  128.        nl();
  129. *      prt(2,"Which (A-H,Q) ? ");
  130. *      ch=onek("QABCDEFGH");
  131.        .
  132.        .
  133.        .
  134.          else
  135.            c.ansir |= ansir_no_DOS;
  136.          break;
  137. +      case 'G':
  138. +        nl();
  139. +        prt(5,"New gold requirement? ");
  140. +        input(s,5);
  141. +        c.costgold=atoi(s);
  142. +        break;
  143. *      case 'H':
  144.          nl();
  145.          prt(5,"Allow 300 baud users to run? ");
  146.          .
  147.          .
  148.          .
  149.        }
  150.        chains[n]=c;
  151.      }
  152.  
  153. Next go down to "void insert_chain(int n)", (it should be the next procedure
  154. under the above procedure) and add a this next line after "c.ansir=0;".
  155.  
  156.      c.costgold=0;
  157.  
  158.  
  159.                                   THIRD
  160.                              +-------------+
  161.                              | THE WRITERS |
  162.                              +-------------+
  163.  
  164. 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.
  165. Do a search for "void boarddata(int n, char *s)", and modify/add the following lines...
  166.  
  167.      void boarddata(int n, char *s)
  168.      {
  169.         char x,y,k,i;
  170. +       char s1[30];
  171.  
  172.         subboardrec r;
  173.         .
  174.         .
  175.         .
  176.         else
  177.           k=r.key;
  178. +       itoa(r.rewardgold,s1,10);
  179. *       sprintf(s,"%2d %1c %1c  %-36s %-4s %-8s %-3d %-3d %-3d %-3d %1c",
  180. *       n,k,x,r.name,s1,r.filename,r.readsl,r.postsl,r.age,r.maxmsgs,y);
  181.      }
  182.  
  183. Next go down to "void showsubs()", (it should be below here the above
  184. procedure) and add/modify the following lines...
  185.  
  186.      void showsubs()
  187.      {
  188.        .
  189.        .
  190.        .
  191.        abort=0;
  192. *      pla("NN K AR Name                                 GOLD FN       
  193. RSL PSL AGE MSG ANON",
  194. *          &abort);
  195. *      pla("== - == ------------------------------------ ---- ======== 
  196. --- === --- === ----",
  197. *          &abort);
  198.        .
  199.        .
  200.        .
  201.      }
  202.  
  203. Next go down to "void modify_sub(int n)", (should be below the above procedure) and add/modify the following lines...
  204.  
  205.      void modify_sub(int n)
  206.      {
  207.        .
  208.        .
  209.        .
  210.        print("K. Storage typ: ",s,"");
  211. +      itoa(r.rewardgold,s,10);
  212. +      print("L. Reward Gold: ",s,"");
  213.        nl();
  214. *      prt(2,"Which (A-L,Q) ? ");
  215. *      ch=onek("QABCDEFGHIJKL");
  216.        .
  217.        .
  218.        .
  219.            r.storage_type=i;
  220.          break;
  221. +      case 'L':
  222. +        nl();
  223. +        prt(2,"New Reward Gold? ");
  224. +        input(s,5);
  225. +        i=atoi(s);
  226. +        r.rewardgold=i;
  227. +        break;
  228.        .
  229.        .
  230.        .
  231.        } while ((!done) && (!hangup));
  232.        subboards[n]=r;
  233.        if (!wfc)
  234.          changedsl();
  235.      }
  236.  
  237. Next go down to "void insert_sub(int n)", (it should be the next procedure
  238. under the above procedure) and add a this next line after 
  239. "r\storage_type=2;".
  240.  
  241.      r.rewardgold=3;
  242.  
  243.                                   FOURTH
  244.                            +-----------------+
  245.                            | THE LAST BATTLE |
  246.                            +-----------------+
  247.  
  248. We now are finish with adding in the gold requirement for the message
  249. base editor, let's now go to edit the complete the misson.  We're going
  250. to load your MSGBASE1.C file.  Now, do that, load it!  OK, search for
  251. "posted on", it should be somewhere in the "void post()".  Now we're gonna
  252. start...
  253.  
  254.      void post()
  255.      {
  256.         .
  257.         .
  258.         .
  259.         topscreen();
  260.         strcpy(s,"+");
  261.         strcat(s,p.title);
  262.         strcat(s," posted on ");
  263.         strcat(s,subboards[curlsub].name);
  264.         sysoplog(s);
  265. +       nl();
  266. +       prt(3,"Hey, thanks for posting that 'interesting'");
  267. +       prt(3,"post, you just earn yourself ");
  268. +       itoa(subboards[curlsub].rewardgold,s,10);
  269. +       prt(6,s);
  270. +       prt(3," gold pieces!");
  271. +       nl();
  272. +       thisuser.gold+=subboards[curlsub].rewardgold;
  273.         save_status();
  274.         .
  275.         .
  276.      }
  277.  
  278. 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...
  279.  
  280.      prt(3,"Sorry, when you remove a post, you're");
  281.      nl();
  282.      prt(3,"removing the gold you earn for posting");
  283.      prt(3,"that message!!");
  284.      thisuser.gold-=subboards[curlsub].rewardgold;
  285.      nl();
  286.  
  287. Hold on, we're almost finish.  Now, load your BBSUTL1.C file, search for
  288. "void show_chains(int *mapp, int *map)", and enter the following lines...
  289.  
  290.      void show_chains(int *mapp, int *map)
  291.      {
  292.        int abort,i,i1;
  293. *      char s1[81],s[81];
  294.  
  295.        abort=0;
  296.        nl();
  297.        for (i=0; (i<*mapp) && (!abort) && (!hangup); i++) {
  298.          itoa(i+1,s,10);
  299.          strcat(s,". ");
  300. +        strcat(s,"(");
  301. +        itoa(chains[map[i]].costgold,s1,10);
  302. +        strcat(s,s1);
  303. +        strcat(s,") ");
  304.          strcat(s,(chains[map[i]].description));
  305.          pla(s,&abort);
  306.        }
  307.        nl();
  308.      }
  309.  
  310. Now search for "void run_chain(int cn)", and enter the following lines...
  311.  
  312.      void run_chain(int cn)
  313.      {
  314.        char s[81],s1[81],s2[81];
  315.        int oc;
  316.  
  317. +      if (thisuser.gold<(chains[cn].costgold)) {
  318. +        nl();
  319. +        ansic(6);
  320. +        print("Sorry, not enough gold...","");
  321. +        ansic(3);
  322. +        print("Try posting a message or two in","");
  323. +        ansic(3);
  324. +        print("the message base!!","");
  325. +        return;
  326. +        }
  327.        strcpy(s1,chains[cn].filename);
  328.        strcpy(s2,create_chain_file("CHAIN.TXT"));
  329.        .
  330.        .
  331.        .
  332.        chatcall=oc;
  333. +      thisuser.gold-=chains[cn].costgold;
  334.      }
  335.  
  336. Next, go down to "void do_chains()", (it should be below the above procedure)
  337. and add/modify the following lines...
  338.  
  339.      void do_chains()
  340.      {
  341.        int map[50],mapp,i,i1,ok,done;
  342. +      int pf;
  343. *      char s[81],s1[81],*ss;
  344.        chainfilerec c;
  345.        .
  346.        .
  347.        .
  348.          }
  349.        }
  350.        if (mapp==0) {
  351.          nl();
  352.          nl();
  353.          pl("Sorry, no external programs available.");
  354.          nl();
  355.          return;
  356.        }
  357. +      if (thisuser.gold<=0) {  /* FROM HERE TO THE END */
  358. +        nl();                  /* PASTE THIS IN DO_CHAINS() */
  359. +        ansic(6);              /* AND REMOVE THE OLD PART */
  360. +        print("Sorry, not enough gold...","");
  361. +        ansic(3);
  362. +        print("Try posting a message or two in","");
  363. +        ansic(3);
  364. +        print("the message base!!","");
  365. +        return;
  366. +      }
  367. +      if (mapp==1) {
  368. +        if (thisuser.gold<(chains[map[0]].costgold))
  369. +        {
  370. +          nl();
  371. +          ansic(6);
  372. +          print("Sorry, not enough gold...","");
  373. +          ansic(3);
  374. +          print("Try posting a message or two in","");
  375. +          ansic(3);
  376. +          print("the message base!!","");
  377. +          return;
  378. +        }
  379. +        run_chain(map[0]);
  380. +        return;
  381. +      }
  382. +      pf=0;
  383. +      if (okansi()) {
  384. +        strcpy(s,syscfg.gfilesdir);
  385. +        strcat(s,"CHAINS.TXT");
  386. +        if (exist(s))
  387. +          pf=1;
  388. +        }
  389. +      if (!pf)
  390. +        show_chains(&mapp,map);
  391. +      done=0;
  392. +      do {
  393. +        if (!pf) {
  394. +          prt(2,"Which (Q=Quit, ?=List) : ");
  395. +        } else {
  396. +          ansic(0);
  397. +          printfile("CHAINS.TXT");
  398. +        }
  399. +        ss=mmkey(2);
  400. +        i=atoi(ss);
  401. +        if ((i>0) && (i<=mapp)) {
  402. +          done=1;
  403. +          run_chain(map[i-1]);
  404. +        } else
  405. +          if (strcmp(ss,"Q")==0)
  406. +            done=1;
  407. +          else
  408. +          if ((strcmp(ss,"?")==0) && !pf)
  409. +            show_chains(&mapp,map);
  410. +      } while ((!hangup) && (!done));
  411. +      ansic(0);
  412. +    }
  413.  
  414. Now load in the BBS.C file, search for "void sublist()", and add/modify the
  415. following lines...
  416.  
  417.  
  418.      void sublist()
  419.      {
  420.        int i,abort;
  421. *      char s[81],s1[81];
  422.  
  423.        abort=0;
  424.        nl();
  425.        pla("Subs available:");
  426.        nl();
  427.        i=0;
  428.        while ((i<32) && (usub[i].subnum!=-1)) {
  429.          strcpy(s,usub[i].keys);
  430.          s[2]=0;
  431.          if (s[1]==0)
  432.            s[1]=32;
  433. +        strcat(s," (");
  434. +        itoa(subboards[usub[i].subnum].rewardgold,s,10);
  435. +        strcat(s,s1);
  436. +        strcat(s,")");
  437.          strcat(s," - ");
  438.          if (syscfg.systemnumber)
  439.       if (subboards[usub[i].subnum].type)
  440.         strcat(s,"<NET> ");
  441.       .
  442.       .
  443.       .
  444.       .
  445.      }
  446.  
  447.  
  448. Well, THAT'S IT!!  The SUBLIST() procedure would look like this:
  449.  
  450. Subs available:
  451.  
  452. 1 (3) - <NET> WWIV/Net General
  453. 2 (5) - <NET> WWIV/Net Movies
  454. 3 (10) - <NET> WWIV/Net Politics
  455.  
  456. And the chains menu would look like this:
  457.  
  458. 1. (3) The Gang Busters
  459. 2. (5) COPS
  460.  
  461. If you like to create an ANSI menu or ANSI users, you may, the filename my
  462. mod looks for is "CHAINS.TXT", and you must put some message to tell the
  463. user to input their choice!
  464.  
  465. If you have any comments, please contact me, I'm the author of The Gang Busters & COPS.  So, my address is:
  466.  
  467. Hue Truong
  468. 2323 Lincoln Park Avenue
  469. Los Angeles, CA 90031
  470.  
  471. I'm found calling in mostly in the 818 area code, and 213 area codes..
  472.  
  473.                                   ┌─────────┐
  474.                                   │ The End │
  475.                                   │---------│
  476.                                   │ 1/21/89 │
  477.                                   └─────────┘
  478.  
  479. About the new SALT system...
  480. David Truong #73 @2382    [The Tech Corner]
  481. Sun Jan 22 18:55:17 1989
  482.  
  483.     Hi!  I want to tell you about the new SALT system, Slick made.  If 
  484. they are a mod that is exactly like that, then he didn't know it exist.  
  485. He created that mod so because the original SALT system he got didn't let 
  486. him have a different requirement of gold for some different on-line 
  487. games.  He wanted the gold requirement to be low (like 2gp) for games 
  488. that the users don't play that often.  And the games the users play 
  489. *everyday*, has a higher gold requirement.  The old salt system didn't 
  490. let him do that, so he went on creating this one.  You can have different 
  491. gold requirement by seting up the gold requirement in the CHAINEDIT.  On 
  492. the display of CHAINS available (while in the CHAINEDIT) it would display 
  493. the gold requirement for that game too.  And it also will display the 
  494. gold requirement to the user, when the lists of games are available.  
  495.     He also didn't like to give the *fix* amount of gold pieces to the 
  496. user when the user post.  He wanted something like running the chains,  
  497. where you can edit the gold requirement, but something like that so when 
  498. a user posts, he gets a different reward of gold, like to give more gold 
  499. on another message base, than the others.  So he added it in, but when 
  500. you put this in, the message base will mess up.  And you kinda have to 
  501. initialize WWIV in a temporary dir, and get the SUBS.DAT, so that it 
  502. won't crash.  You'll find out, it's a floating point error if there are 
  503. more than one msg base.  
  504.