View Single Post
  #3  
Old 02-13-2009, 07:17 PM
thatdwarf thatdwarf is offline
Former UN Dev Admin
Join Date: Nov 2005
Posts: 42
thatdwarf is on a distinguished road
Quote:
Originally Posted by xXziroXx View Post
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.firstNamesSPC randomstring(this.lastNames);

And you would put that script in the NPC itself
Reply With Quote