Re: [CODE] [HELP] trying to limit skill/spell keeps for remorts

From: Afizal Mustapa (amustapa@GAMEBOX.NET)
Date: 06/25/00

On Sat, 24 Jun 2000 22:46:42 -0500, Fiorin <> wrote:

>I have used the multi.patch from ftp site in my mud with some
>modifications of my own. I would like to do one more thing with
>it that to be perfectly honest I haven't the slightest idea how
>to do. What I would like to do is set it so that a player that
>remorts keeps a set number of skills/spells from previous class
>but not the rest, and the ones that are kept would be randomly
>chosen for the player from all skills/spells of the previus
>class that are practiced. So if anyone has any ideas on how to
>do this it would be greatly appreciated.

You could do something like this before reseting the player's class:

  struct spell_info_type spell_info[TOP_SPELL_DEFINE + 1];

  for (i = 1; i <= MAX_SKILLS; i++)
    if (spell_info[i].min_level[GET_CLASS(ch)] < LVL_IMMORT && !number(0,
      GET_SKILL(ch, i) = 0;

Change the randomization to suit your taste...


Afizal Mustapa
Petaling Jaya, Selangor, Malaysia.

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  |

This archive was generated by hypermail 2b30 : 04/10/01 PDT