PenUltima Online

It is currently Fri Sep 05, 2008 4:07 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: <random> name manualy
PostPosted: Mon May 05, 2008 8:27 am 
Offline

Joined: Tue Apr 22, 2008 6:09 am
Posts: 21
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?


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 05, 2008 11:02 am 
Offline

Joined: Tue Mar 20, 2007 7:17 am
Posts: 99
Location: Poland
now readconfigfile(file with list of names); //(::names - as i presume)

then choose randomly from it and set it as a parm


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 05, 2008 12:30 pm 
Offline

Joined: Tue Apr 22, 2008 6:09 am
Posts: 21
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..


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 05, 2008 1:06 pm 
Offline

Joined: Tue Apr 22, 2008 6:09 am
Posts: 21
heh, read this fu**ng debug.log :)
in include/randName im replacing "names" on "::names" :)
its worked...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: Yahoo [Bot] and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl