RE: Mob Scipting System

From: The Arrow (pt94jpi@student.hk-r.se)
Date: 02/05/97


On Wed, 5 Feb 1997, Gary Barnett wrote:

> How far did you get with your implementation of Lua? I took a look at the
> page and was
> impressed, yet I think it would be a good amount of work to export the mud
> data structures
> for use within the code.
> 
> Can you share any details? 

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.)

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.

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.

/ Joachim

------------------------------------------------------------------------
  The Arrow              Arrow@Shadow World - mud.fukt.hk-r.se 4000

  Joachim Pileborg       Email: pilen@fukt.hk-r.se
  Tranbärsvägen 22:19
  37238 Ronneby          http://www.fukt.hk-r.se/~pilen/
  SWEDEN
------------------------------------------------------------------------

+-----------------------------------------------------------+
| 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