Re: [CODE] Exp code and formula

From: George (greerga@DRAGON.HAM.MUOHIO.EDU)
Date: 11/18/97


On Tue, 18 Nov 1997, Chuck Reed wrote:

>if (GET_LEVEL(ch) >= 0 && GET_LEVEL(ch) < 10)
>   mod = 1;
>if (GET_LEVEL(ch) >= 10 && GET_LEVEL(ch) < 20)
>   mod = 2;
>if (GET_LEVEL(ch) >= 20 && GET_LEVEL(ch) < 30)
>   mod = 4;
>if (GET_LEVEL(ch) >= 30 && GET_LEVEL(ch) < 40)
>   mod = 8;
>if (GET_LEVEL(ch) >= 40 && GET_LEVEL(ch) < 50)
>   mod = 16;
>if (GET_LEVEL(ch) >= 50 && GET_LEVEL(ch) < 60)
>   mod = 25;
>else
>   mod = 30;

Notice that your 'mod' will always be 25 or 30.

>/*   THE FORMULA!!!!!! */
>if (GET_LEVEL(ch) = 1)

I'm assuming you typo'd == here.

>   exp = 800;
>else
>   exp = GET_LEVEL(ch) * 500 * ((GET_LEVEL(ch) - 1) / 10) * mod;

Looks ok, didn't look hard though.

>/* If character is human, grant a 10% xp bonus */
>h_mod = exp * (1 / 10);
>if (IS_HUMAN(ch))
>   exp = exp - h_mod;

Subtracting 1/10 of the xp, so...

if (IS_HUMAN(ch))
  exp *= .9;

--
George Greer  -  Me@Null.net   | Genius may have its limitations, but stupidity
http://www.van.ml.org/~greerga | is not thus handicapped. -- Elbert Hubbard


     +------------------------------------------------------------+
     | 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/08/00 PST