[MUD-Dev] Re: MUD-Dev digest, Vol 1 #105 - 12 msgs

Mik Clarke mikclrk at ibm.net
Fri Jun 18 22:44:00 CEST 1999


Chris Gray wrote:

> ["Dr. Cat":]
>
>  I think one point is being missed, in
> > that 99.999% of the language design here seems to be aimed solely at
> > an audience of programmers.
> > You'd have a hard time sieving for prime numbers with this language...
> > But making something fun isn't hard at all.  :X)
>
> Yup! You'd also have a hard time in doing anything in terms of creating
> the world in it. That's why I think there should be (at least!) 2
> languages in the MUD. One to create the world (softcoding), and one
> for scripting. I have pretty firm ideas about what I want in a softcoding
> language, but I'm quite interested in thoughts, like Dr. Cat's, as to
> what should be in a scripting language.

CthulhuMud uses a combination of scripts and triggers in place of mob progs
(and standard ROM type file loading for the static bits).  Events have a
context and triggers can evaluate conditions against it, so mobs can be quite
picky about what they react to.  For example you can code conditions like:

Event type: mob  Subtype: death
Trigger 10 to run script 1
victim is male
victim is human
world time_of_day 1700 2400
actor is wearing 'sword of zalkos'
Trigger 20 to run script 2

This first trigger would drive script 1 if a human male mob was killed in the
mobs presence between the hours of 1700 and midnight by someone wielding
the 'sword of zalkos'. If any of those conditions were not affected, script 2
would be triggered.

The scripts are written with a time offset and allow substitution from the
context of the event that triggered them:

Script 1
Line 10, delay 0 MPECHO Lightning flashes from the skies!
Line 20, delay 0, MPECHO Thunder rolls in the heavens!
Line 30, delay 1, emote rises and stretches!
Line 40, delay 2, say @a1, you have slain @v2!
Line 50, delay 3, say You have freed me from my long imprisonment!
Line 60, delay 4, say For this I reward you!
Line 70, delay 4, MPLOAD 'shield of zalkos' 50
Line 80, delay 4, give shield @at
Line 90, delay 4 MPJUNK shield

@_1 is the players/mobs short name, @_2 is its long description and @_t is
it's 'true name' - guarenteed unique.  The junk for the shield is to lose it in

incase the player has run away.  There is also a command set id for each script

line which allows them to be cancelled before they are executed.

All script and trigger setup is through OLC.

More documentation available from
    http://www.cthulhumud.cx
Latest CthulhuMud driver (6.5.3) and ReadMes from
    http://www.geocities.com/soho/cafe/2260/cthmud.html

Mik




_______________________________________________
MUD-Dev maillist  -  MUD-Dev at kanga.nu
http://www.kanga.nu/lists/listinfo/mud-dev




More information about the mud-dev-archive mailing list