Re: [Code:][Newbie] introduction code

From: Tony Robbins (tonyr@pacific101.com)
Date: 08/12/99


----- Original Message -----
From: Emil Nilimaa <kyos_overlord@hotmail.com>
To: <CIRCLE@post.queensu.ca>
Sent: Thursday, August 12, 1999 5:28 AM
Subject:  [Code:][Newbie] introduction code


[snip]

> I am working on some sort of introduction code for my game.
> Using ascii pfiles,

Discussed at least four times in the past month...

> so if you are introduced to someone it should show a name,
> otherwise not. (show name thing is easy, the part i cant
> figure is how to check if the character is introduced to the
> other)

Gary McNickle released a patch for RoM MUDs a while back, and it's easily[1]
converted to Circle.  In fact, I did it[2].  It's good that you're using
ASCII pfiles, because otherwise you wouldn't be able to legitimately save
the expanding array of IDnums for known characters[3].

> How should this be added easiest..
> perhaps save those who the character are introduced to into his
> pfile? the id num of the introduced character or sumfin.
> and check through that somehow?

That's exactly what it does.  Although, you might want to add some other
stuff, because builders tend to introduce mobiles for you, which sort of
defeats the purpose of introduction.  Maybe a structure like:

struct introduction_data {
  bool is_npc;
  int  idnum;
};

That way, you just add an extra string for if a player has been introduced
somehow to the mobile, and use idnum to store its VNUM.  Of course, that's
only one option.

> anyone did this and can give some advice, info?
> (or is good enough coder to just figure it out in the head)

You had it figured out, but, IMHO, I think you were afraid to jump into it.
Just go for it.

-k.

[1] - easily, meaning that you have to be able to identify the comparative
structures, the similar functions, etc.
[2] - I won't release it, because it's not so hard to do I'd rather have it
appear in tons of MUDs through an amount of effort, rather than
snippet-itus.
[3] - Because the binary pfiles wouldn't have space.  You could make it a
fixed size, but then the character wouldn't know some people, or would
possibly have to forget the people they've known for the longest time.


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST