Re: [IDEA] Global on/off values

From: Kaun Lazaro (circle_777@hotmail.com)
Date: 01/12/01


ok this is basicaly what I'm using, the spell marathon is mag affects, and
gives level * 100 hit roll and damage roll to a character, gods excluded.
Can I make it so that the line:
static bool enabled = FALSE;
is outside the program and can be called by other programs? like the nanny
from interpreter.c? note the code used was only alted by me to suit my
needs. Thanks guys for your help. also if anyone wants to use it put Daniel
A. Koepke and myself in your credits.


   ACMD(do_marathon)
   {
     static bool enabled = FALSE;

     if (GET_LEVEL(ch) < LVL_GRGOD && !enabled) {
       send_to_char("Huh?!\r\n", ch);
       return;
     } else if (GET_LEVEL(ch) >= LVL_GRGOD) {

       if (enabled == FALSE) {
         enabled = TRUE;
         send_to_char("Enabled.\r\n", ch);
         return;
       } else if (enabled == TRUE) {
         enabled = FALSE;
         send_to_char("Disabled.\r\n", ch);
         return;
       }
     }

     call_magic(ch, ch, 0, SPELL_MARATHON);
     return;
   }


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/03/01 PST