Seen a few examples of bars drawn for health, mana, movement points and have figured out how to do so in my mud... can't seem to find the right expression to use for experience.
does draw a bar, but it fills up about half a level gained expwise rather than when you're about to level up.
Would much appreciate anyone helping me figure this one out, thanks.
if (( exp_level( ch, ch->level + 1 ) - ch->exp ) > 0)
percent = (100 * ( ch->exp ) ) / ( exp_level( ch, ch->level + 1 ) - ch->exp );
else
percent = -1;
if (percent >= 100)
sprintf (pbuf, "&wExp[&Y##########&w]" );
else if (percent >= 90)
sprintf (pbuf, "&wExp[&Y#########&O:&w]" );
else if (percent >= 80)
sprintf (pbuf, "&wExp[&Y########&O::&w]" );
else if (percent >= 70)
sprintf (pbuf, "&wExp[&Y#######&O:::&w]" );
else if (percent >= 60)
sprintf (pbuf, "&wExp[&Y######&O::::&w]" );
else if (percent >= 50)
sprintf (pbuf, "&wExp[&Y#####&O:::::&w]" );
else if (percent >= 40)
sprintf (pbuf, "&wExp[&Y####&O::::::&w]" );
else if (percent >= 30)
sprintf (pbuf, "&wExp[&Y###&O:::::::&w]" );
else if (percent >= 20)
sprintf (pbuf, "&wExp[&Y##&O::::::::&w]" );
else if (percent >= 10)
sprintf (pbuf, "&wExp[&Y#&O:::::::::&w]" );
else
sprintf (pbuf, "&wExp[&O::::::::::&w]" );
break;does draw a bar, but it fills up about half a level gained expwise rather than when you're about to level up.
Would much appreciate anyone helping me figure this one out, thanks.