|
EXP Needed Scale [by Nashak] |
|
|
|
Posted Wednesday, August 12th @ 11:27:28 PM, by George Greer in the Commands dept.
Added Dec 3, 1996. Click the link below to read it or download it.
From: Brian Williams <bmw@efn.org>
Subject: EXP Needed
char *exp_mesg(struct char_data *ch)
{
int percent, current, total;
current = GET_EXP(ch);
current -= titles[(int) GET_CLASS(ch)][(int) GET_LEVEL(ch)].exp;
total = titles[(int) GET_CLASS(ch)][GET_LEVEL(ch) + 1].exp;
total -= titles[(int) GET_CLASS(ch)][(int) GET_LEVEL(ch)].exp;
percent = (100 * current) / total;
if (percent >= 90)
return ("You should level anytime now.");
else if (percent >= 80)
return ("You are almost ready to attain your next level.");
else if (percent >= 70)
return ("You are three-quarters of the way to your next level.");
else if (percent >= 60)
return ("You are well on your way to your next level.");
else if (percent >= 50)
return ("You are just passed the half-way point to your next level.");
else if (percent >= 40)
return ("You are at the half-way point to your next level.");
else if (percent >= 30)
return ("You are nearing the half-way point to your next level.");
else if (percent >= 20)
return ("You are one-quarter of the way to your next level.");
else if (percent >= 10)
return ("You have gained some progress towards your next level.");
else if (percent > 4)
return ("You still have a very long way to go to your next level.");
else
return ("You have just begun the journey to your next level.");
}
ACMD(do_experience)
{
sprintf(buf, "%s\r\n", exp_mesg(ch));
send_to_char("&06", ch);
send_to_char(buf, ch);
send_to_char("&00", ch);
}
<< Examine (for Objects) [by Andy Hubbard] | Reply | View as text | Flattened | Fear Spell [by Franco] >> |
|
Related Links |
|
|
|
CircleMUD Snippets |
|
|
Note: Not all of these snippets will work perfectly with
your version of code, so be prepared to fix one
or two bugs that may arise, and please let me know
what you needed to do to fix it. Sending a corrected
version is always welcome.
|
Finally, if you wish to use any of the snippets from this
page, you are more than welcome, just mention the
authors in your credits. If you wish to release any
of these snippets to the public on another site,
contact me FIRST.
|
|
|
|
|
|
|