<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title>Reference</title> <link rel="stylesheet" href="../luadoc.css" type="text/css" /> <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/--> </head> <body> <div id="container"> <div id="product"> <div id="product_logo"></div> <div id="product_name"><big><b></b></big></div> <div id="product_description"></div> </div> <!-- id="product" --> <div id="main"> <div id="navigation"> <h1>LuaDoc</h1> <ul> <li><a href="../index.html">Index</a></li> </ul> <!-- Module list --> <h1>Modules</h1> <ul> <li> <a href="../modules/CharacterManager.html">CharacterManager</a> </li> <li> <a href="../modules/Direction.html">Direction</a> </li> <li> <a href="../modules/Game.html">Game</a> </li> <li> <a href="../modules/GameState.html">GameState</a> </li> <li> <a href="../modules/MessageMode.html">MessageMode</a> </li> <li> <a href="../modules/Nanny.html">Nanny</a> </li> <li> <a href="../modules/PlayerState.html">PlayerState</a> </li> <li> <a href="../modules/Telnet.html">Telnet</a> </li> <li> <a href="../modules/config.html">config</a> </li> <li> <a href="../modules/ext.string.html">ext.string</a> </li> <li> <a href="../modules/ext.table.html">ext.table</a> </li> <li> <a href="../modules/main.html">main</a> </li> <li> <a href="../modules/obj.Client.html">obj.Client</a> </li> <li> <a href="../modules/obj.Cloneable.html">obj.Cloneable</a> </li> <li> <a href="../modules/obj.Command.html">obj.Command</a> </li> <li> <a href="../modules/obj.CommandParser.html">obj.CommandParser</a> </li> <li> <a href="../modules/obj.Event.html">obj.Event</a> </li> <li> <a href="../modules/obj.Map.html">obj.Map</a> </li> <li> <a href="../modules/obj.MapObject.html">obj.MapObject</a> </li> <li> <a href="../modules/obj.MapTile.html">obj.MapTile</a> </li> <li><strong>obj.Mob</strong></li> <li> <a href="../modules/obj.Player.html">obj.Player</a> </li> <li> <a href="../modules/obj.Scheduler.html">obj.Scheduler</a> </li> <li> <a href="../modules/obj.Server.html">obj.Server</a> </li> </ul> <!-- File list --> </div><!-- id="navigation" --> <div id="content"> <h1>Module <code>obj.Mob</code></h1> <p>Cloneable:MapObject that holds data for mobile creatures.</p> <p><b>Author:</b> <table class="authors_list"> <tr><td class="name">milkmanjack</td></tr> </table> </p> <h2>Functions</h2> <table class="function_list"> <tr> <td class="name" nowrap><a href="#Mob:getDescription">Mob:getDescription</a> ()</td> <td class="summary">Get the Mob's description.</td> </tr> <tr> <td class="name" nowrap><a href="#Mob:getMessageMode">Mob:getMessageMode</a> (mode)</td> <td class="summary">Shortcut to player:getMessageMode() </td> </tr> <tr> <td class="name" nowrap><a href="#Mob:getName">Mob:getName</a> ()</td> <td class="summary">Get the Mob's name.</td> </tr> <tr> <td class="name" nowrap><a href="#Mob:getPlayer">Mob:getPlayer</a> ()</td> <td class="summary">Get current Player.</td> </tr> <tr> <td class="name" nowrap><a href="#Mob:isPlayerControlled">Mob:isPlayerControlled</a> ()</td> <td class="summary">Check if this Mob has a Player controlling it.</td> </tr> <tr> <td class="name" nowrap><a href="#Mob:send">Mob:send</a> (data, i, j)</td> <td class="summary">Shortcut to player:send(data,i,j) </td> </tr> <tr> <td class="name" nowrap><a href="#Mob:sendLine">Mob:sendLine</a> (str)</td> <td class="summary">Shortcut to player:sendLine(str) </td> </tr> <tr> <td class="name" nowrap><a href="#Mob:sendMessage">Mob:sendMessage</a> (msg, mode, autobreak)</td> <td class="summary">Shortcut to player:sendMessage(msg, mode, autobreak) </td> </tr> <tr> <td class="name" nowrap><a href="#Mob:sendString">Mob:sendString</a> (str)</td> <td class="summary">Shortcut to player:sendString(str) </td> </tr> <tr> <td class="name" nowrap><a href="#Mob:setMessageMode">Mob:setMessageMode</a> (mode)</td> <td class="summary">Shortcut to player:setMessageMode(mode) </td> </tr> <tr> <td class="name" nowrap><a href="#Mob:setPlayer">Mob:setPlayer</a> (player)</td> <td class="summary">Associate this Mob with the given Player.</td> </tr> <tr> <td class="name" nowrap><a href="#Mob:showRoom">Mob:showRoom</a> ()</td> <td class="summary">Shows a description of the room the mob inhabits to the mob.</td> </tr> <tr> <td class="name" nowrap><a href="#Mob:step">Mob:step</a> (direction)</td> <td class="summary">Takes a step in the given direction.</td> </tr> <tr> <td class="name" nowrap><a href="#Mob:unsetPlayer">Mob:unsetPlayer</a> ()</td> <td class="summary">De-associates this Mob from our current Player.</td> </tr> </table> <h2>Tables</h2> <table class="table_list"> <tr> <td class="name" nowrap><a href="#Mob">Mob</a></td> <td class="summary">Cloneable:MapObject that holds data for mobile creatures.</td> </tr> </table> <br/> <br/> <h2><a name="functions"></a>Functions</h2> <dl class="function"> <dt><a name="Mob:getDescription"></a><strong>Mob:getDescription</strong> ()</dt> <dd> Get the Mob's description. <h3>Return value:</h3> <ul>Mob's description.</ul> </dd> <dt><a name="Mob:getMessageMode"></a><strong>Mob:getMessageMode</strong> (mode)</dt> <dd> Shortcut to player:getMessageMode() <h3>Parameters:</h3> <ul> <li> <code><em>mode</em></code>: </li> </ul> </dd> <dt><a name="Mob:getName"></a><strong>Mob:getName</strong> ()</dt> <dd> Get the Mob's name. <h3>Return value:</h3> <ul>Mob's name.</ul> </dd> <dt><a name="Mob:getPlayer"></a><strong>Mob:getPlayer</strong> ()</dt> <dd> Get current Player. <h3>Return value:</h3> <ul>Current Player, if any.</ul> </dd> <dt><a name="Mob:isPlayerControlled"></a><strong>Mob:isPlayerControlled</strong> ()</dt> <dd> Check if this Mob has a Player controlling it. <h3>Return value:</h3> <ul>true if this Mob is controlled by a Player.<br/>false otherwise.</ul> </dd> <dt><a name="Mob:send"></a><strong>Mob:send</strong> (data, i, j)</dt> <dd> Shortcut to player:send(data,i,j) <h3>Parameters:</h3> <ul> <li> <code><em>data</em></code>: </li> <li> <code><em>i</em></code>: </li> <li> <code><em>j</em></code>: </li> </ul> </dd> <dt><a name="Mob:sendLine"></a><strong>Mob:sendLine</strong> (str)</dt> <dd> Shortcut to player:sendLine(str) <h3>Parameters:</h3> <ul> <li> <code><em>str</em></code>: </li> </ul> </dd> <dt><a name="Mob:sendMessage"></a><strong>Mob:sendMessage</strong> (msg, mode, autobreak)</dt> <dd> Shortcut to player:sendMessage(msg, mode, autobreak) <h3>Parameters:</h3> <ul> <li> <code><em>msg</em></code>: </li> <li> <code><em>mode</em></code>: </li> <li> <code><em>autobreak</em></code>: </li> </ul> </dd> <dt><a name="Mob:sendString"></a><strong>Mob:sendString</strong> (str)</dt> <dd> Shortcut to player:sendString(str) <h3>Parameters:</h3> <ul> <li> <code><em>str</em></code>: </li> </ul> </dd> <dt><a name="Mob:setMessageMode"></a><strong>Mob:setMessageMode</strong> (mode)</dt> <dd> Shortcut to player:setMessageMode(mode) <h3>Parameters:</h3> <ul> <li> <code><em>mode</em></code>: </li> </ul> </dd> <dt><a name="Mob:setPlayer"></a><strong>Mob:setPlayer</strong> (player)</dt> <dd> Associate this Mob with the given Player. A Mob's Player shares a mututal reference with the Mob, so when the Mob's Player changes, so does the Player's Mob. <h3>Parameters:</h3> <ul> <li> <code><em>player</em></code>: The player to associate with. </li> </ul> </dd> <dt><a name="Mob:showRoom"></a><strong>Mob:showRoom</strong> ()</dt> <dd> Shows a description of the room the mob inhabits to the mob. </dd> <dt><a name="Mob:step"></a><strong>Mob:step</strong> (direction)</dt> <dd> Takes a step in the given direction. <h3>Parameters:</h3> <ul> <li> <code><em>direction</em></code>: Direction to step in. </li> </ul> <h3>Return value:</h3> <ul>true on successful step.<br/>false otherwise.</ul> </dd> <dt><a name="Mob:unsetPlayer"></a><strong>Mob:unsetPlayer</strong> ()</dt> <dd> De-associates this Mob from our current Player. </dd> </dl> <h2><a name="tables"></a>Tables</h2> <dl class="table"> <dt><a name="Mob"></a><strong>Mob</strong></dt> <dd>Cloneable:MapObject that holds data for mobile creatures.<br /><br /> <h3>Fields:</h3> <ul> <li> <code><em>name</em></code>: Name of the creature. </li> <li> <code><em>description</em></code>: A complete description of the creature. </li> <li> <code><em>level</em></code>: Experience level of the creature. </li> <li> <code><em>experience</em></code>: Experience accumulated this level. </li> <li> <code><em>health</em></code>: Current health. </li> <li> <code><em>mana</em></code>: Current mana. </li> <li> <code><em>moves</em></code>: Current moves. </li> <li> <code><em>player</em></code>: The Player we're associated with. </li> </ul> </dd> </dl> </div> <!-- id="content" --> </div> <!-- id="main" --> <div id="about"> <p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p> </div> <!-- id="about" --> </div> <!-- id="container" --> </body> </html>