[an error occurred while processing this directive]
[<a href="index.shtml">Package Index</a></code> | <a href="index_std.shtml">Mudlib Index</a></code> | <a href="index_eff.shtml">Effect Index</a></code>]<br><h2>File /obj/handlers/top_ten_handler.c</h2>
Top ten player lists - overall and for each guild.
<p>
archive and top_ten is of the format:
<code><p>
      ({ ({ name (guild), rating, level, age }), ... })
</code><p>
guild_top_tens is of the format:
<code><p>
      ([ guild: ({ ({ name, rating, level, age }), ... }), ... ])
</code><p>Written by Deutha
<h2>Includes</h2>
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.h<h2>Method index</h2>
<ul>
<li><a href="#add_guild_top_ten">add_guild_top_ten</a>(string)<br/>
Add in a new table.
<li><a href="#calc_death_xp">calc_death_xp</a>(mixed)<br/>
Calculate the death XP for an NPC.
<li><a href="#calculate_age_modifier">calculate_age_modifier</a>(object, int)<li><a href="#calculate_rating">calculate_rating</a>(object)<br/>
Figure out the rating for the player.
<li><a href="#check_family_and_club_info">check_family_and_club_info</a>()<br/>
Stuff to make sure that all the clubs still exist.
<li><a href="#check_tables">check_tables</a>()<br/>
Wander over the top ten tables checking to see if everyone
still exists.
<li><a href="#excise_name">excise_name</a>(string, string)<br/>
Remove the named player from the named table.
<li><a href="#inform_of_club">inform_of_club</a>(string, int, int, mixed)<li><a href="#player_skill_advance">player_skill_advance</a>(string, object)<br/>
Called when a player advances their skills.
<li><a href="#query_archive">query_archive</a>()<br/>
The complete archived top ten table.
<li><a href="#query_average">query_average</a>()<br/>
Some sort of weight average used in the rating calulation.
<li><a href="#query_club_info">query_club_info</a>()<li><a href="#query_club_info_num">query_club_info_num</a>()<li><a href="#query_family_info">query_family_info</a>()<li><a href="#query_guild_top_tens">query_guild_top_tens</a>()<br/>
The mapping which is the guild top ten tables.
<li><a href="#query_ordered_table">query_ordered_table</a>(string)<br/>
Returns the ordered list of people on the top ten list.
<li><a href="#query_skills">query_skills</a>()<br/>
The skils list with weights.
<li><a href="#query_top_ten">query_top_ten</a>()<br/>
Return the complete list of top ten tables.
</ul>
<h2>Public Functions</h2>
These are functions that everyone can access.<p>
<dl>
<dt class="autodocfuncname"><a name="add_guild_top_ten">
add_guild_top_ten</a><pre class="autodocfuncdef">
void add_guild_top_ten(string word)
</pre><dd><br />
Add in a new table.  This should be used when a new guild is created
and their table needs to be defined.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
word - the name of the table to create
<br />
<br />
<br /></dl>

<dt class="autodocfuncname"><a name="calc_death_xp">
calc_death_xp</a><pre class="autodocfuncdef">
int calc_death_xp(mixed ob)
</pre><dd><br />
Calculate the death XP for an NPC.
This function takes into account a number of factors including:
<li>Rating
<li>Max HP
<li>Max GP
<li>Offensive skill
<li>Defensive skill
<li>Special skill
<li>Armour (natural & worn)
<li>Weapons
<li>A.I.
<li>Protectors/defenders
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
The - object to be tested<br />
<br />
<dd><b>Returns:</b>
<br />The death XP.
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="calculate_age_modifier">
calculate_age_modifier</a><pre class="autodocfuncdef">
int calculate_age_modifier(object thing,
                           int algorithm)
</pre>
<dt class="autodocfuncname"><a name="calculate_rating">
calculate_rating</a><pre class="autodocfuncdef">
int calculate_rating(object thing)
</pre><dd><br />
Figure out the rating for the player.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
thing - the object to get the ratingof<br />
<br />
<dd><b>Returns:</b>
<br />the current rating
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="check_family_and_club_info">
check_family_and_club_info</a><pre class="autodocfuncdef">
void check_family_and_club_info()
</pre><dd><br />
Stuff to make sure that all the clubs still exist.
<br />

<dt class="autodocfuncname"><a name="check_tables">
check_tables</a><pre class="autodocfuncdef">
void check_tables()
</pre><dd><br />
Wander over the top ten tables checking to see if everyone
still exists.
<br />

<dt class="autodocfuncname"><a name="excise_name">
excise_name</a><pre class="autodocfuncdef">
varargs void excise_name(string word1,
                         string word2)
</pre><dd><br />
Remove the named player from the named table.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
word1 - the name of the player<br />
word2 - the name of the table, 0 for the main table
<br />
<br />
<br /></dl>

<dt class="autodocfuncname"><a name="inform_of_club">
inform_of_club</a><pre class="autodocfuncdef">
void inform_of_club(string club,
                    int family,
                    int type,
                    mixed num)
</pre>
<dt class="autodocfuncname"><a name="player_skill_advance">
player_skill_advance</a><pre class="autodocfuncdef">
void player_skill_advance(string word,
                          object thing)
</pre><dd><br />
Called when a player advances their skills.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
word - the skill being advanced<br />
thing - the player which advanced their skils
<br />
<br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_archive">
query_archive</a><pre class="autodocfuncdef">
mixed * query_archive()
</pre><dd><br />
The complete archived top ten table.<br />
<br /><dl>
<dd><b>Returns:</b>
<br />the archived top ten table
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_average">
query_average</a><pre class="autodocfuncdef">
int query_average()
</pre><dd><br />
Some sort of weight average used in the rating calulation.<br />
<br /><dl>
<dd><b>Returns:</b>
<br />the weighted average
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_club_info">
query_club_info</a><pre class="autodocfuncdef">
mixed * query_club_info()
</pre>
<dt class="autodocfuncname"><a name="query_club_info_num">
query_club_info_num</a><pre class="autodocfuncdef">
mapping query_club_info_num()
</pre>
<dt class="autodocfuncname"><a name="query_family_info">
query_family_info</a><pre class="autodocfuncdef">
mixed * query_family_info()
</pre>
<dt class="autodocfuncname"><a name="query_guild_top_tens">
query_guild_top_tens</a><pre class="autodocfuncdef">
mapping query_guild_top_tens()
</pre><dd><br />
The mapping which is the guild top ten tables.<br />
<br /><dl>
<dd><b>Returns:</b>
<br />the guild top ten mapping
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_ordered_table">
query_ordered_table</a><pre class="autodocfuncdef">
mixed * query_ordered_table(string table_name)
</pre><dd><br />
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.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
table_name - the name of the tanble to check<br />
<br />
<dd><b>Returns:</b>
<br />the array of arrays of the top ten information<br /><br />
<dd><b>See also:</b>
<br />/include/top_ten_tables.h
<br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="query_skills">
query_skills</a><pre class="autodocfuncdef">
mixed * query_skills()
</pre><dd><br />
The skils list with weights.  This is used to help generate the
rating.<br />
<br /><dl>
<dd><b>Returns:</b>
<br />the skils list with ratings
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_top_ten">
query_top_ten</a><pre class="autodocfuncdef">
mixed * query_top_ten()
</pre><dd><br />
Return the complete list of top ten tables.<br />
<br /><dl>
<dd><b>Returns:</b>
<br />the array of arrays being the top ten tab;les
<br /><br />
<br /></dl>

</dl>
[an error occurred while processing this directive]

