home *** CD-ROM | disk | FTP | other *** search
/ The Devil's Doorknob BBS Capture (1996-2003) / devilsdoorknobbbscapture1996-2003.iso / Dloads / SYSOP / MODS1.ZIP / BEAM105D.MOD < prev    next >
Text File  |  1995-05-24  |  13KB  |  363 lines

  1. Beamer #357 @3475
  2. Sat May 20 13:11:54 1995
  3. 0R 34 05/24 07:43 WWIVLink 2051->2050
  4. 0R 34 05/24 05:44 WWIVlink 13900->2051
  5. 0R 34 05/21 04:37 WWIVLink 314->13900
  6. 0R 34 05/20 13:07 WWIVLink 3475->314
  7. 0R 34 05/20 13:12 WWIVlink ->3475
  8. 7Msg Reply Status -0 2No Reply Necessary0
  9.  
  10. ╔═══════════════════════════════════════════════════════════════════════════╗
  11. ║ MOD Desc     : Adds a MATRIX Games area for all your games!               ║
  12. ║                                                                           ║
  13. ║ Filename     : BEAM105D.mod                 Mod Version  : 1.05d          ║
  14. ║ Author       : Beamer & Zu Digital          WWIV Version : 4.23 AND 4.24  ║
  15. ║                                                                           ║
  16. ║ Network      : 7@2148 WWIVnet & 1@8421 WWIVnet                            ║
  17. ║ Addresses      1@3450 DesertNet                                           ║
  18. ║                1@3450 TazNet                                              ║
  19. ║                1@3452 Infiniti                                            ║
  20. ║                1@3459 TerraNet                                            ║
  21. ║                                                                           ║
  22. ║ Last updated : 5/16/95                                                    ║
  23. ║ Difficulty   : █░░░░░░░░                                            ║
  24. ║                                                                           ║
  25. ╚═══════════════════════════════════════════════════════════════════════════╝
  26. ┌───────────────────────────────────────────────────────────────────────────┐
  27. │ Legend:                                                                   │
  28. │                                                                           │
  29. │  - Commeny out or delete                                                  │
  30. │  + Add this                                                               │
  31. │  = Leave alone                                                            │
  32. │  @ Change this                                                            │
  33. └───────────────────────────────────────────────────────────────────────────┘
  34. ┌───────────────────────────────────────────────────────────────────────────┐
  35. │ Specail Notes:                                                            │
  36. │                                                                           │
  37. │   This version will work if you have 21 chains or less. I will soon be    │
  38. │   adding a dual matrix listing in the future versions. The ANSI below is  │
  39. │   edited to fit 1-21 games. READ '* NOTE *' below in step #3 to edit the  │
  40. │   location of the matrix menu to acomidate your location preferences.     │
  41. │                                                                           │
  42. │   This mod has been FULLY tested on After Dark BBs and it has caused NO   │
  43. │   problems what so ever. If your pet snake swallows your dog, then        │
  44. │   you INSTALLED THIS WRONG, so go back and take a glance at it.           │
  45. │                                                                           │
  46. │   BACK UP YOUR SOURCE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!   │
  47. └───────────────────────────────────────────────────────────────────────────┘
  48.  
  49. ┌───────────────────────────────────────────────────────────────────────────┐
  50. │ Specail Credits:                                                          │
  51. │                                                                           │
  52. │ Zu Digital at WWIVnet 1@8421                                              │
  53. │    For all the time that he has put in this mod & helping me get the      │
  54. │    mod to read internaly the names and then disply them in the menu       │
  55. │                                                                           │
  56. │ Dawg at WWIVnet 1@2121                                                    │
  57. │    For helping me get the mod to exit the games that shrink and then      │
  58. │    return back to the Matrix Chains menu instead of the main board prompt │
  59. └───────────────────────────────────────────────────────────────────────────┘
  60.  
  61. ─────────────────────────────────────────────────────────────────────────────
  62. Install the COMMON.MOD v2.2 -=- This is a COMMON.MOD!
  63. DOE!¡!
  64. ─────────────────────────────────────────────────────────────────────────────
  65.  
  66. ─────────────────────────────────────────────────────────────────────────────
  67. Step 0: To Upgrade from BEAM105C.MOD, Look for the NOTE in step #3 and add
  68.     the 2 'curdloads=x'
  69. ─────────────────────────────────────────────────────────────────────────────
  70.  
  71. ─────────────────────────────────────────────────────────────────────────────
  72. Step 1:  Open BBSUTL1.C and add this to the end.
  73.  
  74. NOTE: If you have PBCOMMON installed, then you may need to SKIP
  75.       this part! ONLY install this if you get an error saying...
  76.       'undefined _noabort in modual BBSOVL1.C' when you compile it.
  77. ─────────────────────────────────────────────────────────────────────────────
  78.  
  79. void noabort(unsigned char *fn)
  80. {
  81.   int oic;
  82.  
  83.   if (using_modem) {
  84.     oic=incom;
  85.     incom=0;
  86.     dump();
  87.   }
  88.   existprint(fn);
  89.   if (using_modem) {
  90.     dump();
  91.     incom=oic;
  92.   }
  93. }
  94.  
  95.  
  96. Add this to the end of UTILITY.C
  97.  
  98. void CLS(void)
  99. {
  100.   if (okansi()) {
  101.     outchr(12);
  102.     outstr("\x1b[2J");
  103.   } else {
  104.     outchr(12);
  105.   }
  106. }
  107.  
  108.  
  109. ─────────────────────────────────────────────────────────────────────────────
  110. Step 2:  Open BBSOVL1.C and add this at the top...
  111. ─────────────────────────────────────────────────────────────────────────────
  112.  
  113. = #pragma hdrstop
  114. =
  115. + #include <conio.h>
  116. = #include "subxtr.h"
  117. =
  118. = #define FRAME 7
  119. + #define WWIV_424          //Comment this out for WWIV ver. 4.23
  120. + #define CHAIN_OPTIONS (21)//Add/Subtract - Considering # of chains you have
  121. +                           //This is the # of chains that you have installed
  122.  
  123. Then skip down to void do_chain and add:
  124.  
  125. =void do_chains(void)
  126. ={
  127. =  int map[MAX_CHAINS],mapp,i,ok,done;
  128. =  char *ss;
  129. =  chainfilerec c;
  130. =
  131. +  if(okansi()) {                  /* ADD BEAM105d.MOD */
  132. +    matrix_chains();              /* ADD BEAM105d.MOD */
  133. +    return;                       /* ADD BEAM105d.MOD */
  134. +  }                               /* ADD BEAM105d.MOD */
  135. =  tleft(1);
  136. =  mapp=0;
  137.  
  138. ─────────────────────────────────────────────────────────────────────────────
  139. Step 3:   Open BBSOVL1.C and block copy the following code just above the
  140.       'void show_chains(int *mapp, int *map)'
  141. ─────────────────────────────────────────────────────────────────────────────
  142.  
  143. //START Block copy
  144. void matrix_chains(void)
  145. {
  146.   int i, match, done;
  147.  
  148.   chainfilerec c;
  149.   showtextrec opt[CHAIN_OPTIONS];
  150.   varimenurec *menu=NULL, newmenu;
  151.   varimenuinfo info={YELLOW, GREEN, WHITE + (BLUE <<4), RED + (BLUE << 4),
  152.              LIGHTGRAY, COMMON_FULL, 0, 0, 0, 0, 0};
  153.  
  154.   if(numchain > CHAIN_OPTIONS) {
  155.     sysoplog("Increase your CHAIN_OPTIONS in matrix chains mod");
  156.     CLS();
  157.     nl(); nl();
  158.     pl("6Please tell the SysOp that the games MOD has a problem!");
  159.     nl(); pausescr();
  160.     return;
  161.   }
  162.  
  163.   match=0;
  164.   for(i=0; i < numchain; i++) {
  165.     c=chains[i];
  166.     if ((c.ansir & ansir_ansi) && (!okansi()))
  167.       ;
  168. #ifdef WWIV_424
  169.     else if ((c.ansir & ansir_rip_only) && (!rip_on()))
  170.       ;
  171. #endif
  172.     else if ((c.ansir & ansir_no_300) && (modem_speed==300) && incom)
  173.       ;
  174.     else if ((c.ansir & ansir_local_only) && (using_modem))
  175.       ;
  176.     else if (c.sl>actsl)
  177.       ;
  178.     else if ((c.ar) && ((c.ar & thisuser.ar)==0))
  179.       ;
  180.     else
  181.     {
  182. //    * NOTE *: edit the number 3 in the line below for menu highth.
  183. //        edit the number 24 in the line below for menu width.
  184. //        edit the number 29 in the line below for menu column.
  185.       build_showtextrec(&opt[i], 29, 3+match, 24, chains[i].description,
  186.             JUSTIFY_CENTER, ' ');
  187.       fillvarimenurec(&newmenu, &opt[i], SHOW_TEXT_TYPE,
  188.               chains[i].description[0], i, COMMON_ACTIVE);
  189.       menu=addvarimenu(menu, &newmenu);
  190.  
  191.       ++match;
  192.     }
  193.   }
  194.  
  195. //    * NOTE *: edit the number 3 in the line below for menu highth.
  196. //        edit the number 24 in the line below for menu width.
  197. //        edit the number 29 in the line below for menu column.
  198.   build_showtextrec(&opt[i], 29, 3+match, 24, "Quit", JUSTIFY_CENTER, ' ');
  199.   fillvarimenurec(&newmenu, &opt[i], SHOW_TEXT_TYPE, 'Q', 999, COMMON_ACTIVE);
  200.   menu=addvarimenu(menu, &newmenu);
  201.  
  202.   done=0;
  203.   topdata=0;
  204.  
  205.   while((!done) && (!hangup)) {
  206.     curdloads=0;                          //NOTE: BEAM105D upgrade
  207.     CLS();
  208.     noabort("MATCHAIN");
  209.  
  210.     info.redraw=COMMON_FULL;
  211.     varimenu(menu, &info);
  212.  
  213. /* Execute sysop commands */
  214.     if(do_sysop_command(info.event)) {
  215.       info.last=0;
  216.       info.redraw=COMMON_FULL;
  217.       CLS();
  218.       noabort("MATCHAIN");
  219.     }
  220.  
  221. /* Execute user commands */
  222.     switch(info.event) {
  223.       case EXECUTE:
  224.     switch(info.returnvalue) {
  225.       case 999:
  226.         CLS();
  227.         done=1;
  228.         break;
  229.  
  230.       default:
  231.         curdloads=2;                  //NOTE: BEAM105D upgrade
  232.         CLS();
  233.         run_chain(info.returnvalue);
  234.         break;
  235.     }
  236.     break;
  237.  
  238.       case GET_OUT:
  239.     CLS();
  240.     done=1;
  241.     break;
  242.     }
  243.   }
  244.   killvarimenu(menu);
  245. }
  246.  
  247.  
  248. void run_chain(int cn)
  249. {
  250.   char s[255],s1[81],s2[81],s3[81];
  251.   int oc,inst,f;
  252.   long l;
  253.  
  254.   inst=(inst_ok(INST_LOC_CHAINS, cn+1));
  255.   if (inst!=0) {
  256.     strcpy(s,get_string(1053));
  257.     strcat(s,chains[cn].description);
  258.     strcat(s,get_string(1054));
  259.     sprintf(s1,"5%d1.  ",inst);
  260.     strcat(s,s1);
  261.     if (!(chains[cn].ansir & ansir_multi_user)) {
  262.      pl(s);
  263.      pl(get_string(1055));
  264.      return;
  265.   } else {
  266.      pl(s);
  267.      outstr(get_string(1056));
  268.      if (!(yn()))
  269.       return;
  270.     }
  271.   }
  272.   write_inst(INST_LOC_CHAINS, cn+1, INST_FLAGS_ONLINE);
  273. #ifdef OPT_CHAIN_REG
  274.   chains_reg[cn].usage++;
  275.   sprintf(s,"%s%s",syscfg.datadir,get_string(1057));
  276.   f=sh_open(s,O_RDWR | O_BINARY | O_CREAT | O_TRUNC, S_IREAD | S_IWRITE);
  277.   if(f) {
  278.     sh_write(f,(void *)chains_reg, numchain * sizeof(chainregrec));
  279.     f=sh_close(f);
  280.   }
  281. #endif
  282.   itoa(com_speed, s1, 10);
  283.   if ((com_speed==1) || (com_speed==49664))
  284.     strcpy(s1,"115200");
  285.   itoa(syscfgovr.primaryport,s2,10);
  286.   itoa(modem_speed, s3, 10);
  287.   stuff_in(s,chains[cn].filename,create_chain_file(),s1,s2,s3,"");
  288.   sprintf(s2,get_stringx(1,35),chains[cn].description);
  289.   sysoplog(s2);
  290.   oc=chatcall;
  291.   thisuser.chainsrun++;
  292.   if (chains[cn].ansir & ansir_no_DOS) {
  293.     set_protect(0);
  294.     if (chains[cn].ansir & ansir_shrink)
  295.       shrink_out(s,1,0,1,1);
  296.     else {
  297.       chatcall=0;
  298.       run_external(s);
  299.     }
  300.   } else {
  301.     if (chains[cn].ansir & ansir_shrink) {
  302.       if (chains[cn].ansir & ansir_no_pause) {
  303.         shrink_out(s,2,1,1,1);
  304.       } else {
  305.     shrink_out(s,1,1,1,1);
  306.       }
  307.     } else {
  308.       l=thisuser.sysstatus;
  309.       if (chains[cn].ansir & ansir_no_pause)
  310.     thisuser.sysstatus &= ~sysstatus_pause_on_page;
  311.       chatcall=0;
  312.       full_external(s,0,1);
  313.       thisuser.sysstatus = l;
  314.     }
  315.   }
  316.   chatcall=oc;
  317.   topscreen();
  318. }
  319. //END Block copy
  320.  
  321. ──────────────────────────────────────────────────────────────────────────────
  322. Step 4:  You now need to run 'MAKE FCNS' BEFORE compiling or add the
  323.      voids above to FCNS.H manualy.
  324. ──────────────────────────────────────────────────────────────────────────────
  325.  
  326. ──────────────────────────────────────────────────────────────────────────────
  327. Step 5:  UUEncode this MATCHAIN.ZIP and then unzip it, then copy MATCHAIN.ANS
  328.          ANSI into your GFILES directory...
  329. ──────────────────────────────────────────────────────────────────────────────
  330.  
  331. -------------------- START MATCHAIN.ANS --------------------------------------
  332. section 1 of uuencode 5.10 of file matchain.zip    by R.E.M.
  333.  
  334. begin 644 matchain.zip
  335. M4$L#!!0````(`&2EL!YB6Z!N3@(``*@*```,````34%40TA!24XN04Y3E95+
  336. M<N,@$(;WKO()O.DC2+;BS)27WN4*.H/N!EQ'`JXRT-#0+9"<4552"8_^OWYR
  337. MFZ=AN<WWG]L\O,;78WQ-XZ+#9\)':\NV;;=Y'-^XL(2_A[2$VT-<N/\]V<Q[
  338. MQ5)5,OAI!:#"MU<%@&PT7YJ^%Z.!3,=_E2E"_C8_'IG"U_-*'-?U_+9!E6J@
  339. MM(Y$>/E!G(DM'0+@5P)ZL>5K(`AYQ\P@(O1W"QTBPF\(ZIU0R9E2B2GC:LJB
  340. M:7FD]1W/=/_($VXP(A$C'4$TQ:/F^Q>ZS__4W4A9HV@G[+&TXOJRGN@F$P8!
  341. MC.X@[!@BA.89X;M0+O:$PU5_BF,SCD*!:7K'>"8D)Y!$5?N^F\C=$N"B[RRG
  342. M_D[J*']_FQK9HHQ*\G[1[S@6M`#<9X]51Y,YG7U>+$"CC4`U\"(T-$%`MHWL
  343. MTRYXHL)*GL9,!0W/RLJ.]V15;I+@%<5:.`BZTZDIUN+Z0?`896,ZN8ALHD:/
  344. M%&6`JQR`G*MTD`;Q8D4SX!'V$GC/>#FPJEW7CD\DVH#7?\MH\"&[7N)._`'Q
  345. M2W1TJI?5;JZ-*J5<E*)H@.2EDREA\P01JE6J/A9AM."=E177S2D;`JI-:X)Q
  346. MP5:?I:CN1Q--4=1";]HGE2)!<[$2L!2$JU*[O,[D4\!SMF.^V_M_#NHWJT53
  347. M(KC41P$$[*Z%VQ&?5;X&H<(G?6H3!VX%!TY@[L;HH0]?1_,K6X=`"@"K"-L)
  348. M['0*:]?K!5PO?5VVYSF;M=O'=Y),R52)Y[)$J];<B9OI27^&I)C::MQ@-'>]
  349. M_`-02P$"%``4````"`!DI;`>8EN@;DX"``"H"@``#``````````!`"``````
  350. E````34%40TA!24XN04Y34$L%!@`````!``$`.@```'@"````````
  351. `
  352. end
  353. sum -r/size 64104/1013 section (from "begin" to "end")
  354. sum -r/size 26482/712 entire input file
  355. -------------------- End of MATCHAIN.ANS -------------------------------------
  356.  
  357. ──────────────────────────────────────────────────────────────────────────────
  358. Step 6:   Compile and you are done!
  359. NOTE:     You may contact me at the address at the top of this mod at anytime
  360. ──────────────────────────────────────────────────────────────────────────────
  361.  
  362.  
  363.