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

  1. Natas #2 @2741
  2. Fri May 05 01:08:48 1995
  3. 0R 34 05/06 07:17 WWIVnet 4001->4000
  4. 0R 34 05/04 14:22 WWIVnet 2001->4001
  5. 0R 34 05/06 01:22 WWIVnet 2720->2001
  6. 0R 34 05/05 06:54 WWIVnet 2002->2720
  7. 0R 34 05/05 05:57 WWIVNET 2744->2002
  8. 0R 34 05/05 02:04 WWIVNet 2741->2744
  9. 0R 34 05/05 01:14 WWIVnet ->2741
  10. ┌────────────────────────────────────────────────────────────────────────────┐
  11. │ Mod Name: EDCP01.Mod                    Mod Author: Natas 2@2741 WWIVNet   │
  12. │ Difficulty: [■■■.......] (3 of 10)      Date: 05/04/95                     │
  13. │ Files Affected: COM.C                   Adapted From: A feature that I saw │
  14. │ WWIV Version: 4.23                                    on another BBS       │
  15. │ Music Played: Metallica (Good for modding! <g>)       software........     │
  16. │ Short Desc. : Allow the use of the Arrow keys when prompted with a Yes/No  │
  17. │               question...  Like in Obv/2 and ViSioN-X.                     │
  18. │                                                                            │
  19. └──────────────────────────────────────────────────────(c)─EDCP─Inc.─'95─────┘
  20. ╔════════════════════════════════════════════════════════════════════════════╗
  21. ║   This mod is copyright 1994, 1995 by Matt Neu, aka Natas, and is          ║
  22. ║   distributed as freeware.  Permission is granted to distribute and post   ║
  23. ║   this mod on BBS systems and online services, provided no alterations     ║
  24. ║   are made (removal of message headers/taglines allowed).  This mod may    ║
  25. ║   contain some parts of WWIV source code, which is copyright 1988-1994 by  ║
  26. ║   Wayne Bell and licensed only to registered users of WWIV.  Use of WWIV   ║
  27. ║   source without registration constitutes a license violation and could    ║
  28. ║   lead to legal prosecution  and certain doom.                             ║
  29. ║                                                                            ║
  30. ║   Shareware distributors and CD-ROM publishers may not distribute this mod ║
  31. ║   without express written permission of the Author or WWIV Software        ║
  32. ║   Services.  Distribution should be to Registered WWIV sysops only.        ║
  33. ║                                                                            ║
  34. ║   AKA: If you rip this mod off, you're a loser.  And if you modify it,     ║
  35. ║        give me AND WWIV Software Services some recognition!!!              ║
  36. ╚════════════════════════════════════════════════════════════════════════════╝
  37.  
  38. Long Desc. :  All this mod does is modify the standard yn()/ny() routines in
  39.           the stock BBS.  It will print out a [Yes/No] box after a the
  40.           question and allow you to use the left and right arrow keys to
  41.           highlite back and forth between Yes or No.  It is basically
  42.           just a graphical "enhancement" but it is still cool.. (:
  43.           It supports ANSi and Non-ANSi users.  And I have TRIED to make
  44.           it as efficient as possible.  I've seen this feature on alot
  45.           of other BBS softwares like Oblivion/2, V/2, and Vision-X.  I
  46.           also have seen it on one WWIV board, but I have never seen a
  47.           mod released for it.  So I took upon myself to write one for
  48.           it. (:  The code SHOULD be bug free.  I have tested it to the
  49.           extent of my debugging knowledge, but I'm not perfect! (: .
  50.           Welp..  On with the Mod...
  51.  
  52. KeY........
  53. ────────────────┐
  54. ++ Add a line   │
  55. == Existing line│
  56. 69 Cool...(:    │
  57. ────────────────┘
  58.  
  59. Step - 0
  60. ─────────────
  61.  
  62. BACK UP YOUR SOURCE CODE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  63.  
  64. Step - 1
  65. ─────────────
  66.  
  67. Open up the file COM.C ...  Add this groovy stuff at the top of the file.
  68.  
  69. ++#define UP      72
  70. ++#define DOWN    80
  71. ++#define LEFT    75
  72. ++#define RIGHT   77
  73. ++#define ENTER   13 //Only add this line if you DO NOT have Asylum's
  74.              //Common Mod installed.  Common already has a #define 
  75.              //for ENTER
  76. ++#define FALSE 0
  77. ++#define TRUE  1
  78.  
  79. ==#define frequency 500
  80.  
  81. Step - 2
  82. ─────────────
  83.  
  84. Still in COM.C, block copy this code AFTER static void print_yn(int i)
  85.  
  86. //Start Block Copy
  87. unsigned char getlx()
  88. {
  89.   unsigned char ch;
  90.  
  91.   ch=getkey();
  92.   if (ch=='[') {
  93.     ch=getkey();
  94.       switch(ch) {
  95.     case 'A':  /* Up */
  96.       return(UP);
  97.     case 'D':  /* Left */
  98.       return(LEFT);
  99.     case 'B': /* Down */
  100.       return(DOWN);
  101.     case 'C': /* Right */
  102.       default:
  103.       return(RIGHT);
  104.        }
  105.    }
  106.    return(ch);
  107. }
  108. //End Block Copy!!!!!!
  109.  
  110. Step - 3
  111. ─────────────
  112.  
  113. Still in COM.C, replace int yn(void) and int ny(void) with the following
  114. replacements.......
  115.  
  116. int yn(void)
  117. {
  118.   char ch,ans;
  119.   int i,done=0,curans;
  120.  
  121.   curans=1;
  122.   if (okansi())
  123.     npr("7[3Yes/4No7]");
  124.   else
  125.     npr("[Yes/NO]");
  126.   while (!done && !hangup) {
  127.     ch=getlx();
  128.     switch (ch) {
  129.       case '8':
  130.       case '4':
  131.       case UP:
  132.       case LEFT:
  133.     if (curans) {
  134.       for (i=0; i<8; i++) {
  135.         backspace();
  136.       }
  137.       if (okansi())
  138.         npr("7[4Yes3/No7]");
  139.       else
  140.         npr("[YES/No]");
  141.     }
  142.     curans=0;
  143.     break;
  144.       case '2':
  145.       case '6':
  146.       case DOWN:
  147.       case RIGHT:
  148.     if (!curans) {
  149.       for (i=0; i<8; i++) {
  150.         backspace();
  151.       }
  152.       if (okansi())
  153.         npr("7[3Yes/4No7]");
  154.       else
  155.         npr("[Yes/NO]");
  156.     }
  157.     curans=1;
  158.     break;
  159.       case 'Y':
  160.       case 'y':
  161.     if (curans) {
  162.       for (i=0; i<8; i++) {
  163.         backspace();
  164.       }
  165.       if (okansi())
  166.         npr("7[4Yes3/No7]");
  167.       else
  168.         npr("[YES/No]");
  169.     }
  170.     ans=TRUE;
  171.     done=1;
  172.     break;
  173.       case 'N':
  174.       case 'n':
  175.     if (!curans) {
  176.       for (i=0; i<8; i++) {
  177.         backspace();
  178.       }
  179.       if (okansi())
  180.         npr("7[3Yes/4No7]");
  181.       else
  182.         npr("[Yes/NO]");
  183.     }
  184.     ans=FALSE;
  185.     done=1;
  186.     break;
  187.       case ENTER:
  188.     switch(curans) {
  189.       case 0:
  190.         ans=TRUE;
  191.         break;
  192.       case 1:
  193.         ans=FALSE;
  194.         break;
  195.     }
  196.     nl();
  197.     done=1;
  198.     break;
  199.       }
  200.    }
  201.    return(ans);
  202. }
  203.  
  204. int ny(void)
  205. {
  206.   char ch,ans;
  207.   int i,done=0,curans;
  208.  
  209.   curans=0;
  210.   if (okansi())
  211.     npr("7[4Yes3/No7]");
  212.   else
  213.     npr("[YES/No]");
  214.   while (!done && !hangup) {
  215.     ch=getlx();
  216.     switch (ch) {
  217.       case '8':
  218.       case '4':
  219.       case UP:
  220.       case LEFT:
  221.     if (curans) {
  222.       for (i=0; i<8; i++) {
  223.         backspace();
  224.       }
  225.       if (okansi())
  226.         npr("7[4Yes3/No7]");
  227.       else
  228.         npr("[YES/No]");
  229.     }
  230.     curans=0;
  231.     break;
  232.       case '2':
  233.       case '6':
  234.       case DOWN:
  235.       case RIGHT:
  236.     if (!curans) {
  237.       for (i=0; i<8; i++) {
  238.         backspace();
  239.       }
  240.       if (okansi())
  241.         npr("7[3Yes/4No7]");
  242.       else
  243.         npr("[Yes/NO]");
  244.     }
  245.     curans=1;
  246.     break;
  247.       case 'Y':
  248.       case 'y':
  249.     if (curans) {
  250.       for (i=0; i<8; i++) {
  251.         backspace();
  252.       }
  253.       if (okansi())
  254.         npr("7[4Yes3/No7]");
  255.       else
  256.         npr("[YES/No]");
  257.     }
  258.     ans=TRUE;
  259.     done=1;
  260.     break;
  261.       case 'N':
  262.       case 'n':
  263.     if (!curans) {
  264.       for (i=0; i<8; i++) {
  265.         backspace();
  266.       }
  267.       if (okansi())
  268.         npr("7[3Yes/4No7]");
  269.       else
  270.         npr("[Yes/NO]");
  271.     }
  272.     ans=FALSE;
  273.     done=1;
  274.     break;
  275.       case ENTER:
  276.     switch(curans) {
  277.       case 0:
  278.         ans=TRUE;
  279.         break;
  280.       case 1:
  281.         ans=FALSE;
  282.         break;
  283.     }
  284.     nl();
  285.     done=1;
  286.     break;
  287.       }
  288.    }
  289.    return(ans);
  290. }
  291.  
  292. Step - 4
  293. ─────────────
  294.  
  295. MAKE FCNS..  (or just add unsigned char getlx(); to FCNS.H manually..)
  296.  
  297. A few quick notes..  I still think it was kind of pointless to basically
  298. be using the same stuff in int yn AND int ny (considering it is so much
  299. more code then the originals).  Although, I had thought to just make it one
  300. function but couldn't figure out a way without having to change EVERY call
  301. to int yn and int ny throughout the code.  Hopefully I will release an update
  302. that will solve this "problem" .. (:
  303.  
  304. ThankZ to...
  305.  
  306. I'd like to thank Bast (I don't know his node #) for the getlx() function.
  307. That was taken out of BAST010.MOD (The Litebar Login one).  Full credit for
  308. that goes to him..  Thanks Man .... (:
  309.  
  310. I'd like to thank Wayne Bell for the great software..  I mean hell, we could
  311. all be running WILDCAT had it not been for Wayne and all those dedicated to
  312. The WWIV Cause.  Thanks Wayne!
  313.  
  314. I'd like to thank the Asylum Group and The French Mod Division.  They have
  315. both written alot of mods that have opened my eyes to alot of programming
  316. stuff that I didn't understand.  They've helped show all those other BBS
  317. Softwares out there that us WWIV'ers can make our BBS's look just as spiffy
  318. as theres (better IMHO) by going beyond the stock look.  Plus, they just kick
  319. ass..  'Nuff Said.. (:
  320.  
  321. I know he'll probably never read this, but I'd like to thank Unca Scrooge.
  322. He (although I doubt he knows it) helped inspire me slot to keep with WWIV
  323. and write a few mods..  Although God only knows why he gave control of all
  324. his WWIV stuff to Dale Cooper.
  325.  
  326. GreetZ goes to....
  327.  
  328. Ziroc..  For calling and testing out this mod remotely..  And for letting me
  329.      drink his pepsi, and smoke his cigarettes when I'm out.. (:
  330. Hades..  For also calling and testing this out..  And buying me lunch today
  331.      at school....  GeeZe i was hungry.. heheheeh
  332.  
  333.   All the WWIV SysOp's who've tried there damnedest to make this software the
  334.   BEST around...  and succeeded!
  335.  
  336. A Fuck Off to...
  337.  
  338. All the little lamers who LOVE to rip-off mods and not give PROPER Credit
  339. where proper credit is do..  You little freaks know who you are..  And if
  340. you don't appreciate this message to 'ya.. .  Good .. That was my intent.
  341.  
  342. If you use this mod, or see/find any bugs in it.  Please send me some mail.
  343. Thanks .. (:
  344.  
  345. Natas 2@2741 WWIVNet
  346.  
  347. ────────
  348. Mods by Evil Dance Cult Productions (EDCP)
  349. ────────────────────
  350. Name            Description
  351. ──────────────────────────────────────────────────────────────────────────────
  352. EDCP01 .Mod   │ Arrow key usage for the Yes/No prompts.
  353. ──────────────────────────────────────────────────────────────────────────────
  354.