Quote:
Originally Posted by xXziroXx
PHP Code:
this.arrayWithNames = { "Foo", "Bar", "Baz" };
echo("My name is" SPC randomstring(this.arrayWithnames) @ "!");
Then you could just have a second array with surnames and randomly pair them together upon onCreated().
|
and to make it apply to the NPC:
PHP Code:
function onCreated() {
this.firstNames = { "Foo", "Bar", "Baz" };
this.lastNames = { "Foo", "Bar", "Baz" };
this.nick = randomstring(this.firstNames) SPC randomstring(this.lastNames);
}
And you would put that script in the NPC itself