[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/shops/potion_shop.c</h2> 
This room is a craft shop which handles potions and salves.
Do not forget important things like set_save_dir() and
set_theft_handler().<p><b>See also:</b><br>help::craft_shop
.c<p>Written by Gruper<p>Started Thu Oct 29 1998<h2>Inherits</h2>
This class inherits the following classes <a href="std.shops.craft_shop_category.c.shtml">/std/shops/craft_shop_category.c</a><h2>Method index</h2>
<dl><ul>
<li><a href="#is_potion_or_salve">is_potion_or_salve</a>(object)<br/>
This is the default function for checking if something can
be sold in a potion shop.
<li><a href="#query_message_function">query_message_function</a>()<br/>
<li><a href="#query_shopkeeper">query_shopkeeper</a>()<br/>
<li><a href="#set_message_function">set_message_function</a>(function)<br/>
This method sets the message function for the shop.
<li><a href="#set_shopkeeper">set_shopkeeper</a>(string)<br/>
This method sets the <b> name </b> of the shopkeeper that
the shop will look for when giving messages to the player.
<li><a href="#shopkeeper_say">shopkeeper_say</a>(string)<br/>
This is the default message function.
</ul><h2>Public Functions</h2>
These are functions that everyone can access.<p>
.<ul><a name="is_potion_or_salve">
is_potion_or_salve</a><pre>
int is_potion_or_salve(object ob)
</pre></br>
This is the default function for checking if something can
be sold in a potion shop.  If you override this, there is no
reason to inherit this file, so you can't.  It will accept any
object that contains something which has an eat effect or an
apply effect.
<br/><ul>
<li><b>Parameters:</b>
<br/>ob - The object that someone is trying to sell to the shop
<li><b>Returns:</b>
<br/>success 1 if the object can be sold, 0 if not

</dl>

<ul><a name="query_message_function">
query_message_function</a><pre>
function query_message_function()
</pre></br>
<br/><ul>
<li><b>Returns:</b>
<br/>Pointer to the message function

</dl>

<ul><a name="query_shopkeeper">
query_shopkeeper</a><pre>
string query_shopkeeper()
</pre></br>
<br/><ul>
<li><b>Returns:</b>
<br/>The name of the shopkeeper

</dl>

<ul><a name="set_message_function">
set_message_function</a><pre>
void set_message_function(function wossname)
</pre></br>
This method sets the message function for the shop.
The message function can be useful to handle messages to
the player via the shopkeeper. The function should be of
type string -> void.  If message_function is not set, we
default to a rather nice function.  If message_function
is explicitly set to 0, no message will be given apart from
the standard messages from craft_shop.  It is called from
is_potion_or_salve() and can also be used in do_buy() etc.
<br/><ul>
<li><b>Parameters:</b>
<br/>wossname - A pointer to the function
<li><b>Example:</b>
<br/><pre>set_message_function( (: nudity_say :) ),
where nudity_say looks like void nudity_say( string message ).
When using
</pre></dl>

<ul><a name="set_shopkeeper">
set_shopkeeper</a><pre>
void set_shopkeeper(string name)
</pre></br>
This method sets the <b> name </b> of the shopkeeper that
the shop will look for when giving messages to the player.
<br/><ul>
<li><b>Parameters:</b>
<br/>name - A name that identifies the shopkeeper to find_match

</dl>

<ul><a name="shopkeeper_say">
shopkeeper_say</a><pre>
void shopkeeper_say(string message)
</pre></br>
This is the default message function.
If the shopkeeper is in the shop, they will try to say message.



[an error occurred while processing this directive]

