Re: [BPL11] SET_SKILL

From: Patrick Dughi (dughi@IMAXX.NET)
Date: 08/18/98


> Ok as you know i just added do_remort to my mud and it works great.
> But i want to reset all skills and spells learned to 0.  Is there a way to
> do this without using SET_SKILL for every skill/spell or deleting the
> playerfile?  oh and the stock mud regenerates all your stats if you havent
> been on in so long.  Anyone know where i can find that in the code for
> personal reasons id like to take that out.
> Thanks

        It doesn't regenerate all the stats.. lets see.. let me use grep:
-n = show lines, -10 10 lines above and below...

> grep -n -10 hour db.c

1855-  strcpy(ch->player.name, st->name);
1856-  strcpy(ch->player.passwd, st->pwd);
1857-
1858-  /* Add all spell effects */
1859-  for (i = 0; i < MAX_AFFECT; i++) {
1860-    if (st->affected[i].type)
1861-      affect_to_char(ch, &st->affected[i]);
1862-  }
1863-
1864-  /*
1865:   * If you're not poisioned and you've been away for more than an hour of
1866-   * real time, we'll set your HMV back to full
1867-   */
1868-
1869-  if (!AFF_FLAGGED(ch, AFF_POISON) &&
1870-      (((long) (time(0) - st->last_logon)) >= SECS_PER_REAL_HOUR)) {
1871-    GET_HIT(ch) = GET_MAX_HIT(ch);
1872-    GET_MOVE(ch) = GET_MAX_MOVE(ch);
1873-    GET_MANA(ch) = GET_MAX_MANA(ch);
1874-  }
1875-}                          /* store_to_char */

        Of course, I could have just searched for GET_HIT(ch) =
GET_MAX_HIT(ch) or the like, and it would have worked okay, but since I
knew where it was, no problem.

                                                PjD


     +------------------------------------------------------------+
     | 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