lama-0.8a/
lama-0.8a/data/character/
lama-0.8a/data/class/
lama-0.8a/data/map/
lama-0.8a/data/race/
lama-0.8a/doc/
lama-0.8a/log/
lama-0.8a/src/
lama-0.8a/src/ext/
lama-0.8a/txt/
<!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><strong>obj.Event</strong></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>
		<a href="../modules/obj.Mob.html">obj.Mob</a>
	</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.Event</code></h1>

<p>Cloneable that holds data about a fireable event, meant to be used with a Scheduler.</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="#Event:execute">Event:execute</a>&nbsp;(timestamp)</td>
	<td class="summary">The intended access point for running the event.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#Event:hasRun">Event:hasRun</a>&nbsp;()</td>
	<td class="summary">Check if this event has had its first firing.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#Event:initialize">Event:initialize</a>&nbsp;(destination, fun, shouldRepeat, repeatMax, repeatInterval)</td>
	<td class="summary">This is just a shortcut for initializing a new event.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#Event:isDone">Event:isDone</a>&nbsp;()</td>
	<td class="summary">Check if this event will fire anymore.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#Event:isReady">Event:isReady</a>&nbsp;(timestamp)</td>
	<td class="summary">Check if the event is ready to fire.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#Event:willRepeat">Event:willRepeat</a>&nbsp;()</td>
	<td class="summary">Will this event repeat (anymore)? Takes into consideration whether or not we have reached our repeat maximum, so it will return false if we have reached it.</td>
	</tr>

</table>



<h2>Tables</h2>
<table class="table_list">

	<tr>
	<td class="name" nowrap><a href="#Event">Event</a></td>
	<td class="summary">Event meant to be used with a Scheduler.</td>
	</tr>

</table>



<br/>
<br/>



<h2><a name="functions"></a>Functions</h2>
<dl class="function">



<dt><a name="Event:execute"></a><strong>Event:execute</strong>&nbsp;(timestamp)</dt>
<dd>
The intended access point for running the event.


<h3>Parameters:</h3>
<ul>
	
	<li>
	  <code><em>timestamp</em></code>: Timestamp to be treated as the firing-off point.
	</li>
	
</ul>








</dd>




<dt><a name="Event:hasRun"></a><strong>Event:hasRun</strong>&nbsp;()</dt>
<dd>
Check if this event has had its first firing.







<h3>Return value:</h3>
<ul>true if it has fired.<br/>false otherwise.</ul>



</dd>




<dt><a name="Event:initialize"></a><strong>Event:initialize</strong>&nbsp;(destination, fun, shouldRepeat, repeatMax, repeatInterval)</dt>
<dd>
This is just a shortcut for initializing a new event. This is to make it as easy as possible to create a new event.


<h3>Parameters:</h3>
<ul>
	
	<li>
	  <code><em>destination</em></code>: Timestamp indicating when the event should fire.
	</li>
	
	<li>
	  <code><em>fun</em></code>: The function to be fired by the event.
	</li>
	
	<li>
	  <code><em>shouldRepeat</em></code>: If true, this event should repeat after the first firing.
	</li>
	
	<li>
	  <code><em>repeatMax</em></code>: How many cycles before we stop.
	</li>
	
	<li>
	  <code><em>repeatInterval</em></code>: How long between each repeat? (relative amount based on clock)
	</li>
	
</ul>








</dd>




<dt><a name="Event:isDone"></a><strong>Event:isDone</strong>&nbsp;()</dt>
<dd>
Check if this event will fire anymore.







<h3>Return value:</h3>
<ul>true if the event will still fire.<br/>false otherwise.</ul>



</dd>




<dt><a name="Event:isReady"></a><strong>Event:isReady</strong>&nbsp;(timestamp)</dt>
<dd>
Check if the event is ready to fire.


<h3>Parameters:</h3>
<ul>
	
	<li>
	  <code><em>timestamp</em></code>: This is the current timestamp to compare to our destination timestamp.
	</li>
	
</ul>






<h3>Return value:</h3>
<ul>true if the event is ready to fire.<br/>false otherwise.</ul>



</dd>




<dt><a name="Event:willRepeat"></a><strong>Event:willRepeat</strong>&nbsp;()</dt>
<dd>
Will this event repeat (anymore)? Takes into consideration whether or not we have reached our repeat maximum, so it will return false if we have reached it.







<h3>Return value:</h3>
<ul>true if it will repeat.<br/>false otherwise.</ul>



</dd>


</dl>




<h2><a name="tables"></a>Tables</h2>
<dl class="table">

<dt><a name="Event"></a><strong>Event</strong></dt>
<dd>Event meant to be used with a Scheduler.<br /><br />


<h3>Fields:</h3>
<ul>
	
	<li>
	  <code><em>destination</em></code>: Timestamp indicating when the event should fire.
	</li>
	
	<li>
	  <code><em>didRun</em></code>: If true, this event has had its initial firing.
	</li>
	
	<li>
	  <code><em>shouldRepeat</em></code>: If true, this event should repeat after the first firing.
	</li>
	
	<li>
	  <code><em>currentRepeat</em></code>: Which cycle we're on.
	</li>
	
	<li>
	  <code><em>repeatMax</em></code>: How many cycles before we stop.
	</li>
	
	<li>
	  <code><em>repeatInterval</em></code>: Added to destination for each repeat.
	</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>