From the NannyMUD documentation
2003-03-15
guildd - A guild daemon.
/obj/util/guildd.c
query_level query_np_for_level query_cost_for_level query_cost_for_stat query_spendable_xp
cmd_advance_level cmd_advance_stat cmd_cost
This daemon provides functions that are intended to be used by guilds when advancing levels and stats, and to see if a player can afford to spend experience points.
NAME
query_level - Internal level calculation.SYNTAX
int query_level(object player)DESCRIPTION
This is a convenience function used only from inside the guildd. It adds together level, paragon_flag and paragon_level of the player in a way useful mostly for this daemon alone.
FUNCTION
NAME
query_np_for_level - How many np is required for a level.SYNTAX
int query_np_for_level(int level)DESCRIPTION
This function returns the number of Nanny points you need to have to be allowed to become the given level. The levels can currently be 1 to 20, where 20 is a level 19 paragon.
FUNCTION
NAME
query_cost_for_level - How much gc it costs to advance a level.SYNTAX
int query_cost_for_level(int level, int np)DESCRIPTION
This function returns the cost in gold coins to raise your level from level-1 to level, when you have np Nanny points.
FUNCTION
NAME
query_cost_for_stat - How much xp it costs to advance a stat.SYNTAX
int query_cost_for_stat(int value)DESCRIPTION
This function returns the cost in experience points to raise a stat from value-1 to value.
FUNCTION
NAME
query_spendable_xp - How many xp a player can spend.SYNTAX
int query_spendable_xp(void | object player) int query_spendable_xp(int level, int xp, int qp, int age)DESCRIPTION
This function returns the amount of experience points that can be spent by this_player(), the given player or a player that has the given specified stats. Note that level 20 is a level 19 paragon.
FUNCTION
NAME
cmd_advance_level - Try to advance a player's level.SYNTAX
int cmd_advance_level(int silent, void | object player)DESCRIPTION
This function will try to advance a player's level. If the silent flag isn't used, it will display messages to the player if the advance fails, but not if it succeeds. If you want your own messages when advancing, use the silent flag and test the return values.RETURN VALUES
-3 if the player is a wizard (Failure).-2 if the player is level 19 (Failure).-1 if the player cannot afford to advance (Failure).The new player level is returned upon success. (Success)
FUNCTION
NAME
cmd_advance_stat - Try to advance a player's stat.SYNTAX
int cmd_advance_stat(string stat, int silent, void | object player)DESCRIPTION
This function will try to advance a player's stat. The given stat must be "con", "dex", "int" or "str". If you want your own messages when advancing, use the silent flag and test the return values.RETURN VALUES
-3 if the stat is already 20 (Failure).-2 if the player is not high enough level (Failure).-1 if the player cannot afford to advance (Failure).The new player stat value is returned upon success. (Success)
FUNCTION
NAME
cmd_cost - The default 'cost' command output.SYNTAX
string cmd_cost(void | object player)DESCRIPTION
This function will return a string with the default table showing how much it will cost the given player or this_player() to advance stats and level.