<random> name manualy

Here you can post threads requesting help on the official POL Ultima Online Emulator Core 096.
Note: Core 096 is no longer officially supported.
Post Reply
BELL
Journeyman Poster
Posts: 68
Joined: Tue Apr 22, 2008 6:09 am

<random> name manualy

Post by BELL »

i based player merchants on WoD scripts, i have:

npcdecs.cfg

Code: Select all

NpcTemplate playermerchant
{
	Name			<random>
	script		playermerchant
	ObjType		0x190
	Color		33784
	TrueColor....
and script part:

Code: Select all

	var parms := {};
	if (!gender)
		SendSysMessage (character, "Canceled.");
		return;
	elseif (gender.index == 1)
		parms.+gender := 0;
	elseif (gender.index == 2)
		parms.+gender := 1;
	else
		parms.+gender := RandomInt (2);
		parms.+name := "<random>";
		set_critical (1);
		var merchant := CreateNpcFromTemplate (":player_merchants:playermerchant", where.x, where.y, where.z, parms);
NPC name really is <random>.... help?
coltain
Grandmaster Poster
Posts: 159
Joined: Tue Mar 20, 2007 7:17 am

Post by coltain »

now readconfigfile(file with list of names); //(::names - as i presume)

then choose randomly from it and set it as a parm
BELL
Journeyman Poster
Posts: 68
Joined: Tue Apr 22, 2008 6:09 am

Post by BELL »

aa.. im including include/randName from distro pack and

Code: Select all

		var merchant := CreateNpcFromTemplate (":player_merchants:playermerchant", where.x, where.y, where.z, parms);
		if (!merchant)
			SendSysMessage (character, "Can't place there.");
			return;
		endif
		SetName(merchant, RandomName(merchant));
has no effect...

thx, im go coding.. load names and etc..
BELL
Journeyman Poster
Posts: 68
Joined: Tue Apr 22, 2008 6:09 am

Post by BELL »

heh, read this fu**ng debug.log :)
in include/randName im replacing "names" on "::names" :)
its worked...
Post Reply