home *** CD-ROM | disk | FTP | other *** search
/ The Devil's Doorknob BBS Capture (1996-2003) / devilsdoorknobbbscapture1996-2003.iso / Dloads / SYSOP / MODS1.ZIP / BEAM207.MOD < prev    next >
Text File  |  1995-07-16  |  9KB  |  302 lines

  1. Beamer #1 @3459
  2. Sun Jul 16 07:02:58 1995
  3. ╔═══════════════════════════════════════════════════════════════════════════╗
  4. ║ Mod Name:    :  BEAM207.MOD                                               ║
  5. ║ Difficulty   :  ▓░░░░░░░░░                                                ║
  6. ║ WWIV Version :  4.24                                                      ║
  7. ║ Version Date :  07/16/95                                                  ║
  8. ║ Description  :  Adds an ANSI Matrix Time Bank.                            ║
  9. ║                 Next version will contain a Gambling function from        ║
  10. ║                 SPV's Gambling MODs                                       ║
  11. ╚═══════════════════════════════════════════════════════════════════════════╝
  12.  
  13. ┌───────────────────────────────────────────────────────────────────────────┐
  14. │ Legend:                                                                   │
  15. │                                                                           │
  16. │  - Commeny out or delete                                                  │
  17. │  + Add this                                                               │
  18. │  = Leave alone                                                            │
  19. │  @ Change this                                                            │
  20. └───────────────────────────────────────────────────────────────────────────┘
  21.  
  22. ┌───────────────────────────────────────────────────────────────────────────┐
  23. │ NOTE:                                                                     │
  24. │                                                                           │
  25. │ This is a COMMON2.2+ MOD...                                                                          │
  26. │                                                                           │
  27. │ WATCH FOR LINE WRAPS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! │
  28. └───────────────────────────────────────────────────────────────────────────┘
  29.  
  30. ─────────────────────────────────────────────────────────────────────────────
  31. Step 0:   Dahhhhh!!!
  32. ─────────────────────────────────────────────────────────────────────────────
  33.  
  34. ─────────────────────────────────────────────────────────────────────────────
  35. Step 1:   If you do not have this yet, please add this to the end of
  36.       BBSOVL2.C
  37. ─────────────────────────────────────────────────────────────────────────────
  38.  
  39.  
  40. void noabort(unsigned char *fn)
  41. {
  42.   int oic;
  43.  
  44.   if (using_modem) {
  45.     oic=incom;
  46.     incom=0;
  47.     dump();
  48.   }
  49.   existprint(fn);
  50.   if (using_modem) {
  51.     dump();
  52.     incom=oic;
  53.   }
  54. }
  55.  
  56.  
  57. ──────────────────────────────────────────────────────────────────────────────
  58. Step 2:   Open up MISCCMD.C and replace 'void time_bank(void)' with the
  59.       following...
  60. ──────────────────────────────────────────────────────────────────────────────
  61.  
  62.  
  63. char *time_str [] = {
  64.   "Deposit",
  65.   "Steal",
  66.   "Go Back",
  67. };
  68.  
  69.  
  70. void time_bank2(void)
  71. {
  72.   char s[81];
  73.   int i,done;
  74.   double nsln;
  75.  
  76.   showtextrec opt[TIMBK_OPTIONS];
  77.   varimenurec *menu=NULL, newmenu;
  78.   varimenuinfo info={HIGHLIGHT, UNHIGHLIGHT, UNHIGHLIGHT, HIGHLIGHT,
  79.              COMMON_FULL, 0, 0, 0, 0, 0};
  80.  
  81.  
  82.   for (i=0; i<TIMBK_OPTIONS; i++) {
  83. // * NOTE *: edit the number 37 in the line below for menu column.
  84. //         edit the number 15 in the line below for menu top line.
  85. //         edit the number 7 in the line below for menu width.
  86.     build_showtextrec(&opt[i], 37, 15+i, 7, time_str[i], JUSTIFY_CENTER, ' ');
  87.     fillvarimenurec(&newmenu, &opt[i], SHOW_TEXT_TYPE, time_str[i][0],
  88.     time_str[i][0], COMMON_ACTIVE);
  89.     menu=addvarimenu(menu, &newmenu);
  90.   }
  91.  
  92.   done=0;
  93.   topdata=0;
  94.  
  95.   while((!done) && (!hangup)) {
  96.     CLS();
  97.     noabort("TIMEBANK");
  98.     goxy(24,17);
  99.     npr("6%-6d",thisuser.banktime);//Balance:
  100.     goxy(47,17);
  101.     npr("6%-6d",(int)(nsl()/60));//Time Left:
  102.  
  103.     info.redraw=COMMON_FULL;
  104.     varimenu(menu, &info);
  105.  
  106.     switch(info.event) {
  107.       case EXECUTE:
  108.     switch(info.returnvalue) {
  109.       case 'D':
  110.         goxy(1,2);
  111.         prt(4,"Give how much:0 ");
  112.         mpl2(3);
  113.         input(s,3);
  114.         i=atoi(s);
  115.         if (i>0) {
  116.           nsln=nsl();
  117.           if ((i+thisuser.banktime)>syscfg.sl[thisuser.sl].time_per_logon)
  118.         i=syscfg.sl[thisuser.sl].time_per_logon-thisuser.banktime;
  119.           if (i>(nsln/60.0))
  120.         i=(nsln/60.0);
  121.           thisuser.banktime+=i;
  122.           thisuser.extratime-=i*60.0;
  123.           tleft(0);
  124.         }
  125.         break;
  126.       case 'S':
  127.         goxy(59,2);
  128.         if (!thisuser.banktime)
  129.           break;
  130.         prt(4,"Steal how much:0 ");
  131.         mpl2(3);
  132.         input(s,3);
  133.         i=atoi(s);
  134.         if (i>0) {
  135.           nsln=nsl();
  136.           if (i>thisuser.banktime)
  137.         i=thisuser.banktime;
  138.           thisuser.banktime-=i;
  139.           thisuser.extratime+=(i*60.0);
  140.           tleft(0);
  141.         }
  142.         break;
  143.       case 'G':
  144.         CLS();
  145.         done=1;
  146.         break;
  147.     }
  148.     break;
  149.     case GET_OUT:
  150.       CLS();
  151.       done=1;
  152.     break;
  153.     }
  154.   }
  155.   killvarimenu(menu);
  156. }
  157.  
  158.  
  159. void time_bank(void)
  160. {
  161.   char s[81],bc[11],c;
  162.   int i,done=0;
  163.   double nsln;
  164.  
  165.   nl();
  166.   if (thisuser.sl<=syscfg.newusersl) {
  167.     ansic(6);
  168.     pl(get_string(981));
  169.     return;
  170.   }
  171.  
  172.   if (thisuser.banktime>syscfg.sl[thisuser.sl].time_per_logon)
  173.     thisuser.banktime=syscfg.sl[thisuser.sl].time_per_logon;
  174.  
  175.   if (menu_on()) {
  176.     rip_timebank();
  177.     return;
  178.   }
  179.  
  180.   if (okansi()) {
  181.     time_bank2();
  182.     return;
  183.   }
  184.  
  185.   strcpy(bc,get_string(983));
  186.  
  187.   do {
  188.     outchr(12);
  189.     sprintf(s,"%c%s%c",bc[0],charstr(25,bc[4]),bc[1]);
  190.     prt(4,s); nl();
  191.     sprintf(s,"%c%-25.25s%c",bc[5],get_string(984),bc[5]);
  192.     prt(4,s); nl();
  193.     sprintf(s,"%c%s%c",bc[7],charstr(25,bc[4]),bc[9]);
  194.     prt(4,s); nl();
  195.     sprintf(s,"%c%-25.25s%c",bc[5],get_string(985),bc[5]);
  196.     prt(4,s); nl();
  197.     sprintf(s,"%c%-25.25s%c",bc[5],get_string(986),bc[5]);
  198.     prt(4,s); nl();
  199.     sprintf(s,"%c%-25.25s%c",bc[5],get_string(987),bc[5]);
  200.     prt(4,s); nl();
  201.     sprintf(s,"%c%s%c",bc[7],charstr(25,bc[4]),bc[9]);
  202.     prt(4,s); nl();
  203.     sprintf(s,"%c%-17.17s%-6d  %c",bc[5],get_string(988),thisuser.banktime,bc[5]);
  204.     prt(4,s); nl();
  205.     sprintf(s,"%c%-17.17s%-6d  %c",bc[5],get_string(1430),(int)(nsl()/60),bc[5]);
  206.     prt(4,s); nl();
  207.     sprintf(s,"%c%s%c",bc[2],charstr(25,bc[4]),bc[3]);
  208.     prt(4,s);
  209.     nln(2);
  210.     prt(1,get_string(989));
  211.     ansic(2);
  212.     c=onek("QDW");
  213.     switch(c) {
  214.       case 'D':
  215.         nl();
  216.         prt(1,get_string(990));
  217.     mpl(3);
  218.         input(s,3);
  219.         i=atoi(s);
  220.         if (i>0) {
  221.           nsln=nsl();
  222.       if ((i+thisuser.banktime)>syscfg.sl[thisuser.sl].time_per_logon)
  223.         i=syscfg.sl[thisuser.sl].time_per_logon-thisuser.banktime;
  224.           if (i>(nsln/60.0))
  225.             i=(nsln/60.0);
  226.       thisuser.banktime+=i;
  227.           thisuser.extratime-=i*60.0;
  228.           tleft(0);
  229.         }
  230.         break;
  231.       case 'W':
  232.         nl();
  233.         if (!thisuser.banktime)
  234.           break;
  235.         prt(1,get_string(991));
  236.         mpl(3);
  237.     input(s,3);
  238.         i=atoi(s);
  239.         if (i>0) {
  240.           nsln=nsl();
  241.           if (i>thisuser.banktime)
  242.         i=thisuser.banktime;
  243.       thisuser.banktime-=i;
  244.       thisuser.extratime+=(i*60.0);
  245.       tleft(0);
  246.     }
  247.     break;
  248.       case 'Q':
  249.     done=1;
  250.     break;
  251.     }
  252.   } while (!done && !hangup);
  253. }
  254.  
  255.  
  256. ─────────────────────────────────────────────────────────────────────────────
  257. Step 3:  Then add this at the top of the file...
  258. ─────────────────────────────────────────────────────────────────────────────
  259.  
  260.  
  261. = #define DOTS 5
  262. = #define FRAME 7
  263. + #define TIMBK_OPTIONS  3
  264. +
  265. + #define HIGHLIGHT 5     //  HighLighted     1 DBLUE  2 GREEN  3 CYAN  4 DRED
  266. + #define UNHIGHLIGHT 31   // 31 Color Normal  5 PURPLE 6 BROWN  7 GRAY  8 DGRAY
  267.  
  268.  
  269. ─────────────────────────────────────────────────────────────────────────────
  270. Step 4:     UUDECODE the following file and unzip it,it contains
  271.         the Time Bank ANSI File, Then add it in the GFILES directory.
  272. ─────────────────────────────────────────────────────────────────────────────
  273.  
  274. section 1 of uuencode 5.10 of file timebank.zip    by R.E.M.
  275.  
  276. begin 644 timebank.zip
  277. M4$L#!!0````(`,(T\!X0#)N'H0$``#$,```,````5$E-14)!3DLN04Y3[58]
  278. M;\(P$-TCY1>P^"<0BH0$&TRM.J(R,$4ME:K6#"W]7Y6<*0M8CI=V@+)4I'^$
  279. ML3XGA22^)$K3CPP]%.(\[IW?(]'E6M-NF[:FG3.]L*W65%\Z([48.#0,RF-I
  280. M6V@:AUKO.G2QP4E[T.W1R>3T@HQOZ(P,W?DM<>=79'S_^+#0V<G$Y)K$M2)5
  281. M/$<&BRB0CT5$7LGM5NZ.F3A:AV/NR5+:(NP5(D&NCC+?9PJ'$U;\)4TJX-17
  282. ME&]32"D]@UX%!:WJ!\PF$-[2I`).?47_-G_2YEK%,WS]N<UU6L474-"J\(SD
  283. M;%M`DVI+P'P5-:>,1ARMP_G%?E@FZOA:V\([`WO22GTUOEOB#D)/7?KJ$,L*
  284. M-IO61N(;*#<;:=P]C7J,D+V_)X2)_"0#;8;-D/,@4(<^>:L@"#;JV(D$RI?-
  285. MZ'B,Q/.90X?NG3N_G/4/#Y)0?V]O%'K'%#WOG<^N%_U/#=_1WP0V!RJ[3F<D
  286. M/)`@X@LT3P^[(*]#G["(MS'+L6*>;>67`_W()IQ+K4ER7I!6=4?4#S_,Y@4%
  287. MC?KP@1'<MCX`4$L!`A0`%`````@`PC3P'A`,FX>A`0``,0P```P`````````
  288. L`0`@`````````%1)345"04Y++D%.4U!+!08``````0`!`#H```#+`0``````
  289. `
  290. end
  291. sum -r/size 6129/773 section (from "begin" to "end")
  292. sum -r/size 35819/539 entire input file
  293.  
  294. ─────────────────────────────────────────────────────────────────────────────
  295.  
  296. ─────────────────────────────────────────────────────────────────────────────
  297. Step 5:   Save, Make FCNS, Compile!
  298. ─────────────────────────────────────────────────────────────────────────────
  299.  
  300.                 After Dark BBs
  301.                 (314) 946-1730
  302.