Re: GUILD Related Layout

From: Moses Junior (undefined_pharoah@hotmail.com)
Date: 03/29/01


Dear list, this is Bill (from Web Remedies Network) I have recently,
subscribed to the list from this email address aswell to communicate while
at work, due mainly to the fact that setting up and or using personal email
services while here is somewhat prohobited.

Anyways, I've become a little clearer on the main topic at hand, in terms of
adding espec related architecture to the interpretation of guild related
spells associated with any mob.

My question is this:  All espects as of now take in one value, as shown
below, by trainer related espec will contain 4 values per line:
ie:

Trainer_Skills: 34 100 0 1
   Spell number  ^ ^Percent mob will teach to, 0= Gold cost, 1, Qp cost.

void parse_espec(char *buf, int i, int nr)
{
  char *ptr;

  if ((ptr = strchr(buf, ':')) != NULL) {
    *(ptr++) = '\0';
    while (isspace(*ptr))
      ptr++;
#if 0   /* Need to evaluate interpret_espec()'s NULL handling. */
  }      - Here is where I am a little unclear I understand,
#else    - it first tests for NULL character and or what not,
  } else - and designated the value to ptr if otherwise.
ptr = "";- but what means of implementing something similar to
#endif   - scanf could I use to function properly with both,
         - 1 value (for other especs) and 4 for trainer espec.

  interpret_espec(buf, ptr, i, nr);
}

I was thinking perhaps of something alon the lines of a before check infron
t of the strchr for : but a strcmp(buf, "Trainer_Skills") but then again the
match won't be consistant due to the fact that buf will contain the values
associated with it.  Genmob.c is no problem it's mainly parse_espec I'm
having problems with.  In terms of figuring out how I can utilize 4 values
for trainer_skills: and still maintain the error checking for 1 argument for
other especs such as BareHandAttack.

Any help is appreciated, and I apologize for filling the list with a bunch
of responses to my own posts. =]

Bill
webremedies@home.com

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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/04/01 PST