Search FAQ

MUSHclient scripting

Description of MUSHclient world function: world.ReadNamesFile


Name ReadNamesFile
Type Method
Summary Loads in a file for generating character names
Prototype long ReadNamesFile(BSTR FileName);
Description

This is used to load in a file of character names for the random name generator.

The names file should be loaded before calling GenerateName.

The file should contain lines with "[start]", "[middle]", "[end]" and "[stop]" in it (see below for example). Using the example file below, a generated name might be Wicorebwyn (Wic - ore - bwyn). By setting up different files you can generate names with a different "feel" to them.

Example names file:

[start]
A
Ab
Ac
Ad
W
Wic
[middle]
a
ae
ore
u
y

[end]
a
and
b
bwyn
baen
bard
[stop]

VBscript example
world.readnamesfile "mynames.nam"
Jscript example
world.readnamesfile("mynames.nam");
PerlScript example
$world->readnamesfile("mynames.nam");
Python example
world.readnamesfile("mynames.nam")
Lua example
ReadNamesFile ("mynames.nam")
Returns eNoNameSpecified: File name cannot be blank
eCouldNotOpenFile: Could not open file, or file was not a valid names file
eOK: Processed file OK

See also ...

Function Description
GenerateName Generates a random character name

Search for script function

Enter a word or phrase in the box below to narrow the list down to those that match.

The function name, prototype, summary, and description are searched.

Search for:   

Leave blank to show all functions.


Return codes

Many functions return a "code" which indicates the success or otherwise of the function.

You can view a list of the return codes


Function prototypes

The "prototype" part of each function description lists exactly how the function is called (what arguments, if any, to pass to it).

You can view a list of the data types used in function prototypes


View all functions

[Back]

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.