[Package Index | Mudlib Index | Effect Index]
File /obj/handlers/top_ten_handler.c
Top ten player lists - overall and for each guild.
archive and top_ten is of the format:
      ({ ({ name (guild), rating, level, age }), ... })
guild_top_tens is of the format:
      ([ guild: ({ ({ name, rating, level, age }), ... }), ... ])
Written by Deutha
Includes
This class includes the following files /include/clubs.h, /include/weapon.h, /include/clothing.h, /include/player_handler.h, /include/playtesters.h, /include/player.h, /include/top_ten_tables.h, /include/skills.h, /include/am_time.h and /include/library.hMethod index
Public Functions
These are functions that everyone can access.
- 
add_guild_top_ten
void add_guild_top_ten(string word)
 
Add in a new table.  This should be used when a new guild is created
and their table needs to be defined.
- Parameters:
word - the name of the table to create
 
- 
calc_death_xp
int calc_death_xp(mixed ob)
 
Calculate the death XP for an NPC.
This function takes into account a number of factors including:
- Rating
 - Max HP
 - Max GP
 - Offensive skill
 - Defensive skill
 - Special skill
 - Armour (natural & worn)
 - Weapons
 - A.I.
 - Protectors/defenders
- Parameters:
The - object to be tested
- Returns:
The death XP.
  
- 
calculate_age_modifier
int calculate_age_modifier(object thing,
                           int algorithm)
- 
calculate_rating
int calculate_rating(object thing)
  
Figure out the rating for the player.
- Parameters:
thing - the object to get the ratingof
- Returns:
the current rating
  
- 
check_family_and_club_info
void check_family_and_club_info()
 
Stuff to make sure that all the clubs still exist.
- 
check_tables
void check_tables()
 
Wander over the top ten tables checking to see if everyone
still exists.
- 
excise_name
varargs void excise_name(string word1,
                         string word2)
 
Remove the named player from the named table.
- Parameters:
word1 - the name of the player
word2 - the name of the table, 0 for the main table
 
- 
inform_of_club
void inform_of_club(string club,
                    int family,
                    int type,
                    mixed num)
- 
player_skill_advance
void player_skill_advance(string word,
                          object thing)
  
Called when a player advances their skills.
- Parameters:
word - the skill being advanced
thing - the player which advanced their skils
 
- 
query_archive
mixed * query_archive()
 
The complete archived top ten table.
- Returns:
the archived top ten table
 
- 
query_average
int query_average()
 
Some sort of weight average used in the rating calulation.
- Returns:
the weighted average
 
- 
query_club_info
mixed * query_club_info()
- 
query_club_info_num
mapping query_club_info_num()
- 
query_family_info
mixed * query_family_info()
- 
query_guild_top_tens
mapping query_guild_top_tens()
    
The mapping which is the guild top ten tables.
- Returns:
the guild top ten mapping
 
- 
query_ordered_table
mixed * query_ordered_table(string table_name)
 
Returns the ordered list of people on the top ten list.  If the table
name is 0 or it is "main" the main table is checked.  If the
table name is "archive" then the archive is used.
- Parameters:
table_name - the name of the tanble to check
- Returns:
the array of arrays of the top ten information
- See also:
/include/top_ten_tables.h
   
- 
query_skills
mixed * query_skills()
 
The skils list with weights.  This is used to help generate the
rating.
- Returns:
the skils list with ratings
 
- 
query_top_ten
mixed * query_top_ten()
 
Return the complete list of top ten tables.
- Returns:
the array of arrays being the top ten tab;les