%scriptCallMultiple()

Aliases%scriptCallMultiple( )
Parametersmixed @owner, string @name [, @param1 [, @param2 [, ...]]]

    Runs the script with @name presumably defined for each of the targets in
the @targets array. The parameters are passed to the script and assume the
variable names the script itself sets out for them. This function is used
in conjunction with the catch_call_script trigger type which is described
in the triggers documentation. Note that if the script returns a value you
can retrieve it by assigning the value of running the function. The
returned values will be returned in an array with indexes corresponding to
the index of the target in the @targets array.

Example:

//
// Calls a script on multiple targets (in this example all the mobs
// in zone @room->zoneId having the ID 145200.
//
@room = %getRoomPointer( @n )
@targets = %filterZoneId( %getMobsWithId( 145200 ), @room->zoneId )
%scriptCallMultiple( @targets, "huntIntruder", @n )