This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You know where to find it...
This is a number of LPC scripts to enable a NPC being programed with AIML, the Artificial Intelligence Mark-up Language. Thou it does not make your NPC intelligent, there is still some work required. So don't expect too much. See http://www.aiml.info/ for some info about AIML.
There is a number of AIML sets available, you may check sourceforge for a start. However, to make something special out of a NPC, you will have to create your own AIML set, at least partly. No AIML set is included here (beside of a few really stupid test cases).
To use it, your NPC needs to be derived from aiml:
inherit "/i/tools/aiml" // or wherever you put it
at initialization of the monster, call something like
aiml_init("/i/tools/aiml/substitutions.xml", // substitution
"/room/haus/monster/hermes.aiml"); // actual vocabluary
take care that the messages in the
room are forwarded to the function
aiml_answer, the following works for me:
As you will probably have to integrate it into your mudlib, have a look at aiml.c, it hold basically all interfaces to the mudlib.
Sent comments and bug reports to firstname.lastname@example.org
A C version of this algorithm may be available for commercial use. Contact me in case of interest.
Constanze Holzhey, 9th Feb. 2003