[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 /global/playtester.c</h2>
This is the playtester player object.  It gives the playtesters the
bonus extra commands needed by happy playtesters.<p><b>See also:</b><br><a href="global.player.c.shtml">/global/player.c</a><p>Written by Pinkfish<p>Started Tue Jun 25 11:27:05 PDT 2002
<h2>Inherits</h2>
This class inherits the following classes <a href="global.player.c.shtml">/global/player.c</a><h2>Includes</h2>
This class includes the following files <a href="include.login_handler.h.shtml">/include/login_handler.h</a>, <a href="include.player.h.shtml">/include/player.h</a>, <a href="include.player_handler.h.shtml">/include/player_handler.h</a>, <a href="include.playtesters.h.shtml">/include/playtesters.h</a> and <a href="include.command.h.shtml">/include/command.h</a><h2>Class Index</h2>
<ul><li><a href="#class_playtester_data">playtester_data</a>
</ul><h2>Method index</h2>
<dl><ul>
<li><a href="#add_skill_level">add_skill_level</a>(string, int, mixed)<br/>
Mask this and don't let the skill's be upped if we are mangleing
the skills.
<li><a href="#advancement_restriction">advancement_restriction</a>()<li><a href="#disable_damage_log">disable_damage_log</a>()<br/>
This method disables logging of PT fake damage.
<li><a href="#disable_death_log">disable_death_log</a>()<br/>
This method disables logging of PT fake deaths.
<li><a href="#disable_personal_pt_protection">disable_personal_pt_protection</a>()<br/>
This method resets the protect flag so that adjust_hp and
do_death are not masked, i.
<li><a href="#disable_pt_protection">disable_pt_protection</a>()<br/>
This method sets the PT as no longer being under room protection.
<li><a href="#enable_damage_log">enable_damage_log</a>()<br/>
This method enables logging of PT fake damage.
<li><a href="#enable_death_log">enable_death_log</a>()<br/>
This method enables logging of PT fake deaths.
<li><a href="#enable_personal_pt_protection">enable_personal_pt_protection</a>()<br/>
This method sets the protect flag so that adjust_hp and
do_death are masked.
<li><a href="#enable_pt_protection">enable_pt_protection</a>()<br/>
This method sets the PT as being under room protection.
<li><a href="#pt_adjust_hp">pt_adjust_hp</a>(int, object, object, string)<br/>
This method adjusts the fake hitpoints.
<li><a href="#pt_do_death">pt_do_death</a>()<br/>
This method replaces the normal do_death() when testing.
<li><a href="#pt_query_hp">pt_query_hp</a>()<br/>
This method returns the number of fake hitpoints.
<li><a href="#pt_set_hp">pt_set_hp</a>(int)<br/>
This method sets the fake hitpoints.
<li><a href="#query_contractable">query_contractable</a>()<li><a href="#query_in_pt_arena">query_in_pt_arena</a>()<li><a href="#query_log_damage">query_log_damage</a>()<br/>
This method returns the status of the LOG_DAMAGE flag, i.
<li><a href="#query_log_death">query_log_death</a>()<br/>
This method returns the status of the LOG_DEATH flag, i.
<li><a href="#query_playtester">query_playtester</a>()<br/>
This method tells us if the object is a playtester or not.
<li><a href="#query_pt_area">query_pt_area</a>(object)<li><a href="#query_pt_exec">query_pt_exec</a>()<br/>
This method returns if the player is a pt exec or not.
<li><a href="#query_pt_log_file">query_pt_log_file</a>()<br/>
This method returns the log file for logging of PT fake deaths and damage.
<li><a href="#query_pt_protection">query_pt_protection</a>()<br/>
This method returns the status of the protect flag.
<li><a href="#query_real_skill_level">query_real_skill_level</a>(string)<br/>
This returns the real unadulterated level of the pt.
<li><a href="#query_senior_playtester">query_senior_playtester</a>(string)<br/>
This method returns if the player is a pt senior or not.
<li><a href="#query_skill">query_skill</a>(string)<br/>
The playtester override for the query_skill function to allow
various skill levels to be set.
<li><a href="#query_skill_mangle">query_skill_mangle</a>()<br/>
This method returns the current skill mangle setting.
<li><a href="#query_skills_being_mangled">query_skills_being_mangled</a>()<br/>
This method returns the current set of skills being mangled.
<li><a href="#remove_skill_mangle_level">remove_skill_mangle_level</a>(string)<br/>
This method removes a skill mangle level.
<li><a href="#set_pt_log_file">set_pt_log_file</a>(string)<br/>
This method sets the log file for logging of PT fake deaths and damage.
<li><a href="#set_skill_mangle">set_skill_mangle</a>(int)<br/>
This sets the mangle skills flag.
<li><a href="#set_skill_mangle_level">set_skill_mangle_level</a>(string, int)<br/>
This sets the mangle level for the specific skill.
</ul><h2>Public Functions</h2>
These are functions that everyone can access.<p>
.<ul><a name="add_skill_level">
add_skill_level</a><pre>
varargs int add_skill_level(string skill,
                            int lvl,
                            mixed exp)
</pre></br>
Mask this and don't let the skill's be upped if we are mangleing
the skills.


<ul><a name="advancement_restriction">
advancement_restriction</a><pre>
int advancement_restriction()
</pre>
<ul><a name="disable_damage_log">
disable_damage_log</a><pre>
void disable_damage_log()
</pre></br>
This method disables logging of PT fake damage.


<ul><a name="disable_death_log">
disable_death_log</a><pre>
void disable_death_log()
</pre></br>
This method disables logging of PT fake deaths.


<ul><a name="disable_personal_pt_protection">
disable_personal_pt_protection</a><pre>
int disable_personal_pt_protection()
</pre></br>
This method resets the protect flag so that adjust_hp and
do_death are not masked, i.e. the player can be hurt in the
normal(*) way.

(*) Having "normal" ways to hurt people is quite sick...  But it's fnu!


<ul><a name="disable_pt_protection">
disable_pt_protection</a><pre>
int disable_pt_protection()
</pre></br>
This method sets the PT as no longer being under room protection.  Room protection does not 
expire and lasts until it is switched off.  It also over-rides personal protection.  
<br/><ul>
<li><b>Returns:</b>
<br/>1 on success, 0 on failure.

</dl>

<ul><a name="enable_damage_log">
enable_damage_log</a><pre>
void enable_damage_log()
</pre></br>
This method enables logging of PT fake damage.


<ul><a name="enable_death_log">
enable_death_log</a><pre>
void enable_death_log()
</pre></br>
This method enables logging of PT fake deaths.


<ul><a name="enable_personal_pt_protection">
enable_personal_pt_protection</a><pre>
int enable_personal_pt_protection()
</pre></br>
This method sets the protect flag so that adjust_hp and
do_death are masked.


<ul><a name="enable_pt_protection">
enable_pt_protection</a><pre>
int enable_pt_protection()
</pre></br>
This method sets the PT as being under room protection.  Room protection does not 
expire and lasts until it is switched off.  It also over-rides personal protection.  
<br/><ul>
<li><b>Returns:</b>
<br/>1 on success, 0 on failure.

</dl>

<ul><a name="pt_adjust_hp">
pt_adjust_hp</a><pre>
varargs int pt_adjust_hp(int hp,
                         object attacker,
                         object weapong,
                         string attack)
</pre></br>
This method adjusts the fake hitpoints.
<br/><ul>
<li><b>Parameters:</b>
<br/>hp - The value to add to fake hitpoints
<li><b>Returns:</b>
<br/>hp after adjustment

</dl>

<ul><a name="pt_do_death">
pt_do_death</a><pre>
object pt_do_death()
</pre></br>
This method replaces the normal do_death() when testing.  It gives
players a message about how it would have hurt if it had been for real.
<br/><ul>
<li><b>Parameters:</b>
<br/>thing - The object that killed us.
<li><b>Returns:</b>
<br/>A corpse

</dl>

<ul><a name="pt_query_hp">
pt_query_hp</a><pre>
int pt_query_hp()
</pre></br>
This method returns the number of fake hitpoints.
<br/><ul>
<li><b>Returns:</b>
<br/>The number of fake hitpoints

</dl>

<ul><a name="pt_set_hp">
pt_set_hp</a><pre>
void pt_set_hp(int hp)
</pre></br>
This method sets the fake hitpoints.
<br/><ul>
<li><b>Parameters:</b>
<br/>hp - The new value of fake hitpoints

</dl>

<ul><a name="query_contractable">
query_contractable</a><pre>
int query_contractable()
</pre>
<ul><a name="query_in_pt_arena">
query_in_pt_arena</a><pre>
int query_in_pt_arena()
</pre>
<ul><a name="query_log_damage">
query_log_damage</a><pre>
int query_log_damage()
</pre></br>
This method returns the status of the LOG_DAMAGE flag, i.e. whether
PT fake damage is logged or not.
<br/><ul>
<li><b>Returns:</b>
<br/>Status of LOG_DAMAGE flag

</dl>

<ul><a name="query_log_death">
query_log_death</a><pre>
int query_log_death()
</pre></br>
This method returns the status of the LOG_DEATH flag, i.e. whether
PT fake deaths are logged or not.
<br/><ul>
<li><b>Returns:</b>
<br/>Status of LOG_DEATH flag

</dl>

<ul><a name="query_playtester">
query_playtester</a><pre>
int query_playtester()
</pre></br>
This method tells us if the object is a playtester or not.
<br/><ul>
<li><b>Returns:</b>
<br/>1 if the object is a creator, 0 if not.

</dl>

<ul><a name="query_pt_area">
query_pt_area</a><pre>
int query_pt_area(object ob)
</pre>
<ul><a name="query_pt_exec">
query_pt_exec</a><pre>
int query_pt_exec()
</pre></br>
This method returns if the player is a pt exec or not.
<br/><ul>
<li><b>Parameters:</b>
<br/>player - the player to query
<li><b>Returns:</b>
<br/>1 if they are an exec, 0 if not

</dl>

<ul><a name="query_pt_log_file">
query_pt_log_file</a><pre>
string query_pt_log_file()
</pre></br>
This method returns the log file for logging of PT fake deaths and damage.
The default is /d/playtesters/log/pain.
<br/><ul>
<li><b>Returns:</b>
<br/>The filename of the log file.

</dl>

<ul><a name="query_pt_protection">
query_pt_protection</a><pre>
int query_pt_protection()
</pre></br>
This method returns the status of the protect flag.  2 means that they have 
their room protection enabled, 1 means that they have their personal protection
enabled, 0 means that they are not.
<br/><ul>
<li><b>Returns:</b>
<br/>The value of the protect flag

</dl>

<ul><a name="query_real_skill_level">
query_real_skill_level</a><pre>
int query_real_skill_level(string skill)
</pre></br>
This returns the real unadulterated level of the pt.


<ul><a name="query_senior_playtester">
query_senior_playtester</a><pre>
int query_senior_playtester(string player)
</pre></br>
This method returns if the player is a pt senior or not.
<br/><ul>
<li><b>Parameters:</b>
<br/>player - the player to query
<li><b>Returns:</b>
<br/>1 if they are an senior, 0 if not

</dl>

<ul><a name="query_skill">
query_skill</a><pre>
int query_skill(string skill)
</pre></br>
The playtester override for the query_skill function to allow
various skill levels to be set.


<ul><a name="query_skill_mangle">
query_skill_mangle</a><pre>
int query_skill_mangle()
</pre></br>
This method returns the current skill mangle setting.
<br/><ul>
<li><b>Returns:</b>
<br/>the skill mangle setting

</dl>

<ul><a name="query_skills_being_mangled">
query_skills_being_mangled</a><pre>
mapping query_skills_being_mangled()
</pre></br>
This method returns the current set of skills being mangled.


<ul><a name="remove_skill_mangle_level">
remove_skill_mangle_level</a><pre>
void remove_skill_mangle_level(string skill)
</pre></br>
This method removes a skill mangle level.


<ul><a name="set_pt_log_file">
set_pt_log_file</a><pre>
void set_pt_log_file(string str)
</pre></br>
This method sets the log file for logging of PT fake deaths and damage.
The default is /d/playtesters/log/pain.
<br/><ul>
<li><b>Parameters:</b>
<br/>str - The filename of the log file.

</dl>

<ul><a name="set_skill_mangle">
set_skill_mangle</a><pre>
void set_skill_mangle(int flag)
</pre></br>
This sets the mangle skills flag.
<br/><ul>
<li><b>Parameters:</b>
<br/>flag - enable or disable mangling skills

</dl>

<ul><a name="set_skill_mangle_level">
set_skill_mangle_level</a><pre>
int set_skill_mangle_level(string skill,
                           int lvl)
</pre></br>
This sets the mangle level for the specific skill.
<br/><ul>
<li><b>Parameters:</b>
<br/>skill - the skill to mangle
<br/>lvl - the level to set it to

</dl>


<h2>Classes</h2>
These are nice data types for dealing with...  Data!<p>
<ul>
<li><a name="class_playtester_data">
playtester_data</a><pre>
class playtester_data {
                        int protect;
                        int hp;
                        string log_file;
                        int log_death;
                        int log_damage;
                        int turn_off;
                        int protection_counter;
                        int room_protection;
                        int skill_mangle;
                        mapping skills;
}

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

