RE: Mob Scipting System

From: Gary Barnett (gbarnett@polarnet.com)
Date: 02/05/97


On Wed, 5 Feb 1997, The Arrow wrote:

<snip>

>Lua has associative arrays that can be used for the mud data structures,
>for example: if set up so, ch["in_room"] returns the room character ch is
>in (i.e. the C statement ch->in_room).
>It is not hard to set up such an array, but it takes plenty of lines in
>C to make it (LOTS of pushing things on the stack.)
>
Ouch :-)

>At the moment I'm trying to reimplement the trigger system and the
>interface to Lua, but I'm only using "simple" variables of type
>userdata at the moment, and let the script coder use functions (coded
>in C in the mud) to get info when needed.

That seems workable. A set of routines could provide the data.. some
sort of lookup system could be constructed rather easily I would think.

String manipulation and message reporting might be a bit more difficult,
but maybe a message format could be created for returning info to a
c function that would manipulate mud values, send messages to rooms, etc.
This could provide a double-check for buggy builder-entered programs, as well
as add the necessary security features :-)

>
>If anyone is intrested in this, I can try to make a patch with the
>interface to Lua, some Lua functions, and time triggers (which is what
>I am working on now) and put it on the circle ftp site.

I would most certainly enjoy seeing the code.. in any form. :-)

--Mallory


+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/18/00 PST