This function returns an array of mob pointers for mobiles that are found within the requested @radius of the @source. The @source may be the ID of a room or a pointer to a room, mobile, or item. Flags may be set to determine specific rules for room traversal. For instance, by default the room of origin is NOT included but this can be changed by setting the "includeOrigin" flag. Following is a list of currently supported flags:
includeOrigin - include the origin room in the results allowNoDirection - traverse exits flagged as noDirection allowSecret - traverse exits flagged as secret allowClosed - traverse closed doors allowDeathtrap - include deathtrap rooms
Example:
// // Hit mobiles within a 3 room radius with a sonic wave. //
@flags = %array( includeOrigin, allowClosed ) @mobs = %roomGetRadiusMobs( @caster, 5, @flags ) @mobs = %filterNotGroup( @mobs, @caster )
@damageFlags = %array( "magic", "hit", "skipMessages" );
foreach( @mobs as @mob ) { %nact( "You contort with pain as a sonic wave ripples " \ "through your flesh.", \ 0, @mob, null, null, actorOnly );
%nact( "$n contorts with pain as a sonic wave ripples " \ "through $s flesh.", \ 0, @mob, null, null, skipActor );
%damage( @caster, @mob, 10 + 1d20, @damageFlags, "crush" ) } endforeach |