Agility, Power, & if (!str_cmp("argument", buf))

From: David Cole (tiznor@hotmail.com)
Date: 11/22/01


Hello once again, & thanks for the info on raising stats.

I've added two new stats to the mud agility and power, power is for
summoning, eg: conjurers, how well they can summon elementals and pets etc..
and agility is a rogue, and handler related stat.

Well, I've managed to make the stat roller roll the new stats with the old,
and I have created the new ASCII pfile defines for the new stats as well as
added GET_AGI and GET_POW in utils.h, also added sbyte agi; sbyte pow; to
char_ability_data as well as adding the cases and defines in db.c. So what's
my problem?

Stats roll, they show the first time you log in, and they stick. But the
minute you log off it does not write the new stats to the ASCII pfile and
does not save them so power and agi are returned to 0 when you do a att in
the game after relogin.

I'm having lots of problems like this with ASCII pfiles, anything I try
adding doesn't save in them, and I add them to all the proper places, I
think?

Also I've wrote a new prompt system similar to Sojourn III and ExileMUD's
prompt system, but I'm trying to add a !CAN_SEE to the tank name so if you
cant see the person that's tanking of the enemy it will return someone
(obviously this is during battle, like if your blind etc, someone can
already not start a battle if they cant see the person to attack.). Here's
what I've tried got, and obviously by looking at it maybe you can point me
in a right direction?

    if (FIGHTING(d->character)) {
    if (PRF_FLAGGED(d->character, PRF_TANKNAME)) {
    if (COLOR_LEV(d->character) >= C_CMP) {
    sprintf(prompt + strlen(prompt), " T: %s ", GET_NAME(d->character));
  } else {
    sprintf(prompt + strlen(prompt), " T: %s ", GET_NAME(d->character));}
 }

And my final question: if (!str_cmp("argument", buf)), I've rewrote the
toggle command to accept arguments. like toggle ASCII will turn your color
if its on and vise versa, but I want it to be able to: if a player enters
tog an it will tog ASCII, right now its complete argument or nothing, I know
its been done, and atm its just not hitting me but what else can I use to
make it accept sort term arguments instead of complete?

A million thanks to anyone who can answer at lease one of these, they been
bugging me to high hell.

David Cole

--
   +---------------------------------------------------------------+
   | 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/06/01 PST