static int global_class_count (lua_State *L) { TRY_START check_args(L,0); lua_pushnumber(L, class_count()); return 1; TRY_END }
long exp_to_level(const Character *ch) { if (!ch->pc) { return 0; } double total = 0; int mod = UMIN(MAX_PLAYABLE_LEVEL, ch->level) / LEVEL_GROUPS; for (int a = 0; a < ch->level * class_count(ch); a++) { double t = (pow(a, 2) * exp_table[mod]); total += t; } return (long)total; }
int exp_per_level(CHAR_DATA *ch, int points) { int expl,inc; if (IS_NPC(ch)) return 1000; // Modified by SinaC 2001, bstat is a better idea than cstat I think expl = pc_race_table[ch->bstat(race)].expl; //expl = 1000; inc = 500; if (points < 40) // Modified by SinaC 2001 return expl; //return (expl * class_mult( ch )/100 ); //return (1000 * class_mult( ch )/100 ); // processing points -= 40; while (points > 9) { expl += inc; points -= 10; if (points > 9) { expl += inc; inc *= 2; points -= 10; } } expl += points * inc / 10; // Modified by SinaC 2001 expl *= class_count(ch->bstat(classes)); // Modified by SinaC 2001 //return (expl * class_mult( ch )/100); return expl; }