world.GenerateName

MUSHclient script function (Method)

Generates a random character name

Prototype

VARIANT GenerateName();

Data type meanings

Description

Generates a random character name based on the names in the names file previously loaded with ReadNamesFile.

VBscript example

' generate 20 names
for i = 1 to 20
  world.note world.generatename
next

Jscript example

// generate 20 names
for (i = 0; i < 20; i++)
  world.note(world.generatename ());

PerlScript example

# generate 20 names
for ($i = 0; $i < 20; $i++)
  {
  $world->note($world->generatename ());
  }

Python example

# generate 20 names
for i in range (20):
  world.note(world.generatename )

Lua example

-- generate 20 names
for i = 1, 20 do
  Note(GenerateName())
end

Return value

If a names file has not been loaded, the return value is a NULL variant.
Otherwise, the return value is the generated name.

Related topic

Utilities

See also

FunctionDescription
ReadNamesFileLoads in a file for generating character names