PenUltima Online Forum Index Official Core: 096.7
Official Core: 097 2008-02-26
Donate towards the POL web hosting bill!
 POL Home   FAQ   Search    Memberlist   Usergroups    Register    Profile   Log in to check your private messages   Log in
<random> name manualy

 
Post new topic   Reply to topic    PenUltima Online Forum Index -> General Help 096
Display posts from previous:   

Author Message
BELL



Joined: 22 Apr 2008
Posts: 21

PostPosted: Mon May 05, 2008 12:27 pm    Post subject: <random> name manualy Reply with quote

i based player merchants on WoD scripts, i have:

npcdecs.cfg
Code:
NpcTemplate playermerchant
{
   Name         <random>
   script      playermerchant
   ObjType      0x190
   Color      33784
   TrueColor....

and script part:
Code:
   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?

Author Message
coltain



Joined: 20 Mar 2007
Posts: 97
Location: Poland

PostPosted: Mon May 05, 2008 3:02 pm    Post subject: Reply with quote

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

then choose randomly from it and set it as a parm

Author Message
BELL



Joined: 22 Apr 2008
Posts: 21

PostPosted: Mon May 05, 2008 4:30 pm    Post subject: Reply with quote

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

Code:
      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..

Author Message
BELL



Joined: 22 Apr 2008
Posts: 21

PostPosted: Mon May 05, 2008 5:06 pm    Post subject: Reply with quote

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

Post new topic   Reply to topic    PenUltima Online Forum Index -> General Help 096 All times are GMT - 4 Hours
Page 1 of 1

 




Powered by phpBB © 2001, 2005 phpBB Group :: Theme & Graphics by GHS & Scott E. Royalty