Re: [CODE] modified exp_to_level for do_levels?

From: Michael J. Fara (mulder@CLOUD9.NET)
Date: 08/25/98


Actually I just figured it out now, forget it :)
but, if anyone is looking to do the same thing I did, the code is beloweth:

-----Original Message-----
From: Michael J. Fara <mulder@cloud9.net>
To: circle <CIRCLE@post.queensu.ca>
Date: Tuesday, August 25, 1998 12:40 PM
Subject: [CODE] modified exp_to_level for do_levels?


>For those of you using the experience formula replacement snippet for the
>experience tables posted by Nic Suzor you may know what I'm talking about.
>
>
>Well I realised that exp_to_level was great, but it didn't allow certain
>variables (like exp_to_level based on something other then the person's
>lvl), therefor I changed exp_to_level to look like this:
>
>int exp_to_level(arg)
>{
>  int modifier, exp;
>
>  if (arg < 10) /* arg should always be a level */
>    modifier = 1;
>  else if (arg < 20)
>    modifier = 5;
>  else if (arg < 30)
>    modifier = 10;
>  else if (arg < 40)
>    modifier = 20;
>  else if (arg < 50)
>    modifier = 30;
>  else if (arg < 60)
>    modifier = 40;
>  else if (arg < 70)
>    modifier = 50;
>  else if (arg < 80)
>    modifier = 60;
>  else if (arg < 90)
>    modifier = 80;
>  else
>    modifier = 250;
>
> exp = arg * modifier * 4000;
>
>  return exp;
>}
>
>I changed all the references in the code from exp_to_level(ch) to
>exp_to_level(GET_LEVEL(ch)). I did this so I would be able to have the
>function send information on experience needed to aquire a level, even if
>that is not the person's lvl, example exp_to_level(LVL_IMMORT).
>
>So now that I did this I realised I could probably bring back the do_levels
>command and make it work properly, but I am having some weird problems.
Does
>anyone using Nic's formula know how this could probably be done?
>


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