%randPlayer()

Aliases%randPlayer( )
Parameters[array @criteria]

    Retrieves the name of a player at random from the database based on
criteria set in the @criteria array. The following criteria are supported:

global - if set to 1 then a player name will be retrieved
from the database regardless of whether the player
is logged in or not. If set to 0 then a name will
only be returned for a player currently logged in.
This option has a default value of 1.

minLevel - restricts the random player name to any player whose
level is greater than or equal to minLevel.

maxLevel - restricts the random player name to any player whose
level is less than or equal to maxLevel. This option
has a default value of 150 (thus by default
immortals will not be returned).

minExperience - restricts the random player name to any player whose
experience is greater than or equal to minExperience.

maxExperience - restricts the random player name to any player whose
experience is less than or equal to minExperience.

This function is used in many of the help files where examples of command
use take mobile targets. For example, you can see its effect if you view
the help for headbutt.

Example:
--------------------------------------------------------------------------

@criteria->global = 0
@criteria->maxLevel = 10

@name = %randPlayer( @criteria )

commune @name sucks!!!