Re: multi.patch - can't use skills/spells at same time??

From: Rasdan (rasdan@PEAK.ORG)
Date: 02/22/98


Well,

I wrote the multi patch and when I tested it, it worked fine. But I see
from the snippet of code you included that there was an absence of logic
on my part, which is regrettable since I like the stuff I post to be in
perfect working order.

What I was trying to accomplish with that bit of code was to prevent
people from casting spells until they were at the right level that the
skill was originally assigned in. I'm not sure exactly how Circle syntax
works anymore with respect to skills and skill assigning, since we are
doing a totally different system now, but I think this should work:

#define CIRCLE_DEFAULT_CLASS_NOSKILL    31

if (GET_SKILL(ch, spellnum)) {
  for (i = 0; i < NUM_CLASSES; i++) {
    if (MULTI_FLAGGED(ch, (1 << class))) {
      /* Not sure what circle defaults to here, when a skill isn't
         assigned to a particular class, so I will default it, using
         the define above.
        */
      if (SINFO.min_level[class] != CIRCLE_DEFAULT_CLASS_NOSKILL &&
        GET_LEVEL(ch) < SINFO.min_level[class]) {
        send_to_char("You can't cast that yet!\r\n", ch);
        return;
      }
    }
  }
}

Keep in mind this is mailer code and may not work, but it should.

Rasdan


                                  /   \
        _                 )      ((   ))     (
       (@)               /|\      ))_((     /|\                 _
       |-|`\            / | \    (/\|/\)   / | \               (@)
       | | ------------/--|-voV---\`|'/--Vov-|--\--------------|-|
       |-|                  '^`   (o o)  '^`                   | |
       | |  James C. Thomas Jr.   `\Y/'  Founder of Finality   |-|
       |-|            rasdan@finality.drachen.com              | |
       | |             finality.drachen.com 4000               |-|
       |_|_____________________________________________________| |
       (@)       l   /\ /         ( (       \ /\   l         `\|-|
                 l /   V           \ \       V   \ l           (@)
                 l/                _) )_          \I
                                   `\ /'
                                     `


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST