Re: [NEWBIE] Exp stuffs.

From: Tony Robbins (tonyr@NWPACLINK.COM)
Date: 05/06/98


At 09:38 PM 5/6/98 -0500, you wrote:
>This code will go into class.c I think.  Their are some pretty big tables
>set up right before all the titles.  Also, the way you want to do this
>seems to me to be a recursive function because you would have to keep
>calling it until you got down to level two where you have a set
>expeirence.  Also, on your formula, it should be:
>
>exp_to_level = current_exp * (1 + (100/level)) * number(1,1000)

I can't say that this would work all that well.  Formulas never work as
intended unless they form a specific line or curve on a graph.  Perhaps you
want one arm of a parabola?  A random number is a TERRIBLE idea because it
will evaluate differently each time.

Put this in int exp_to_level or some such.

Try this:

float modifier;
^^^^^ I'm bad with typing, I believe you want this.

switch (GET_CLASS(ch)) {
  case CLASS_WARRIOR:
  case CLASS_THIEF:
    modifier = 1.01;
    break;
  case CLASS_CLERIC:
  case CLASS_MAGIC_USER:
    modifier = 1;
    break;
  default:
    modifier = 1;
    break;
}

/* The above makes it so that clerics and magi get the amount returned by
the formula, while warriors and thieves get a little more difficult
formula. */

exp_to_level = 0;
for (i = 1;i <= level;i++)  // level is the argument from the character
  exp_to_level += handy formula (write one...  Think parabola...)
}
exp_to_level * modifier;

return exp_to_level;

bleh, finish it.

-B.


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