Re: DG Scripts

From: Peter Ajamian (
Date: 07/30/00

Torgny Bjers wrote:
> Hello Peter,
> There's one slight problem.  How can I target a player with a random
> trigger?  It doesn't have any variables that can target players, has it?  Or
> if it does, please explain how I would write a script that somehow loops
> through ALL the characters in a specific room and then use like REWARD on
> them or something like that.

From the DG Scripts web site documentation, variable fields...



The next character in the room, or an empty return.




The first character in the room, or an empty return.

So given a room trigger you would do something like this...

set nextplr %self.people%
while ("%nextplr%" != "")
  * Do stuff with %nextplr% here.
  set nextplr %nextplr.next_in_room%

Note, these are both fairly new fields for DG Scripts, if you have an
older version of DG Scripts you'll have to add them to the source, you
can download the latest patch, then just open up the file and pull the
two fields right from the patch itself and add them to your source
(hint, search the patch for "next_in_room" and "people" with the

Regards, Peter

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  |

This archive was generated by hypermail 2b30 : 04/10/01 PDT