[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 /std/living/holding.c</h2>
New holding code!
Because the old stuff wasn't OO enough for me.<p>Written by Pinkfish<h2>Method index</h2>
<ul>
<li><a href="#query_free_limbs">query_free_limbs</a>()<br/>
This method returns the number of free limbs on the living object.
<li><a href="#query_holding">query_holding</a>()<br/>
This method returns the current holding array of the living object.
<li><a href="#query_holding_limbs">query_holding_limbs</a>(object)<br/>
This method returns the list of limbs the object is being held in.
<li><a href="#query_limbs">query_limbs</a>()<br/>
This method returns the an array of the names of the limbs
on the living object.
<li><a href="#query_using_array">query_using_array</a>()<li><a href="#query_weapons">query_weapons</a>()<br/>
This method returns the currently held weapons on the living object.
<li><a href="#set_hold">set_hold</a>(object, mixed, int)<br/>
This method sets the object as held.
<li><a href="#set_unhold">set_unhold</a>(object)<br/>
This method sets the object as unheld.
</ul>
<h2>Public Functions</h2>
These are functions that everyone can access.<p>
<dl>
<dt class="autodocfuncname"><a name="query_free_limbs">
query_free_limbs</a><pre class="autodocfuncdef">
int query_free_limbs()
</pre><dd><br />
This method returns the number of free limbs on the living object.
A free limb!  Yes, have a couple of free legs, beat the rush!
Buy now!<br />
<br /><dl>
<dd><b>Returns:</b>
<br />the number of free limbs<br /><br />
<dd><b>See also:</b>
<br /><a href="#query_holding">query_holding()</a> and <a href="#query_limbs">query_limbs()
</a><br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="query_holding">
query_holding</a><pre class="autodocfuncdef">
object * query_holding()
</pre><dd><br />
This method returns the current holding array of the living object.
This has one element in the array for each object and a 0 is in the
array if that limb is not holding anything.  The positions correspond
to the positions returned by the query_limbs() function.<br />
<br /><dl>
<dd><b>Returns:</b>
<br />an array of held objects<br /><br />
<dd><b>See also:</b>
<br /><a href="#query_holding">query_holding()</a>, <a href="#query_free_limbs">query_free_limbs()</a> and <a href="#query_weapons">query_weapons()
</a><br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="query_holding_limbs">
query_holding_limbs</a><pre class="autodocfuncdef">
string * query_holding_limbs(object ob)
</pre><dd><br />
This method returns the list of limbs the object is being held in.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
ob - the object to check the limbs for<br />
<br />
<dd><b>Returns:</b>
<br />the limbs it is held in
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_limbs">
query_limbs</a><pre class="autodocfuncdef">
string * query_limbs()
</pre><dd><br />
This method returns the an array of the names of the limbs
on the living object.<br />
<br /><dl>
<dd><b>Returns:</b>
<br />an array of limbs
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_using_array">
query_using_array</a><pre class="autodocfuncdef">
string * query_using_array()
</pre>
<dt class="autodocfuncname"><a name="query_weapons">
query_weapons</a><pre class="autodocfuncdef">
object * query_weapons()
</pre><dd><br />
This method returns the currently held weapons on the living object.
This is an array of held items which are weapons and can be used
in combat.<br />
<br /><dl>
<dd><b>Returns:</b>
<br />the array of held weapons<br /><br />
<dd><b>See also:</b>
<br /><a href="#query_holding">query_holding()
</a><br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="set_hold">
set_hold</a><pre class="autodocfuncdef">
int * set_hold(object ob,
               mixed pos,
               int limbs)
</pre><dd><br />
This method sets the object as held.  It will attempt to hold it starting
at the given position in the limbs array.
<p>
The return array contains the index of the limbs from which the
item was added, if the array is 0 size then no items were
added.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
ob - the object to hold<br />
pos - the position in the limb array to start holding at<br />
limbs - the number of limbs to be used (1 or 2 usually). leave as
zero for default.<br />
<br />
<dd><b>Returns:</b>
<br />a array of limb numbers<br /><br />
<dd><b>See also:</b>
<br /><a href="#set_unhold">set_unhold()</a> and <a href="#query_limbs">query_limbs()

Editors Note: I have changed set_hold so that it no longer
automatically unholds objects. I am moving that functionality to the
hold command. If you want your objects to be in a specific limb,
you have to free it up yourself using set_unhold.
If you don't care which limbs, you just have to free up enough limbs
to hold it.
</a><br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="set_unhold">
set_unhold</a><pre class="autodocfuncdef">
int * set_unhold(object ob)
</pre><dd><br />
This method sets the object as unheld.  It will attempt to remove
the object from a held limb.
<p>
The return array contains the index of the limbs from which the
item was removed, if the array is 0 size then no items were
removed.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
ob - the object to unhold<br />
<br />
<dd><b>Returns:</b>
<br />a array of limb numbers<br /><br />
<dd><b>See also:</b>
<br /><a href="#set_hold">set_hold()</a> and <a href="#query_limbs">query_limbs()
</a><br /><br /><br /></dl>

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

