Mobs greeting PC's. Can it be done?

For builders to discuss and ask building questions.
Post Reply
Kirkus
Sword Grand Master
Sword Grand Master
Posts: 449
Joined: Mon Aug 04, 2003 8:08 pm
Location: Zhentil Keep
Contact:

Mobs greeting PC's. Can it be done?

Post by Kirkus » Sat Oct 09, 2004 4:25 am

I have some mobs that I would like to blend in with the population of FK. Mainly I want them to look like pc's before you deal with them. Basicly I was hoping the mobs could greet the pc's then the pc's would know the mobs real name. Can this be done?
I am ready to meet my Maker. Whether my Maker is prepared for the great ordeal of meeting me is another matter.
Gwain

Post by Gwain » Sat Oct 09, 2004 6:51 am

I've seen scripts that have mobs responding to a pc's greet. basically the word greet is a trigger for the mod to say its name and title I guess you could have it also greet. The mob for this might have to transform or remove an illusion of its original form to this player after it greets though.
Dalvyn
Sword Grand Master
Sword Grand Master
Posts: 4708
Joined: Tue Jul 15, 2003 9:26 pm
Location: House of Wonder, Waterdeep

Post by Dalvyn » Sat Oct 09, 2004 12:48 pm

All you can do is change the mob's name at some point. But then the name will change for everybody. That means that, once the mob has ''greeted'' someone, he will have greeted everybody. You cannot have a mob who is seen by different characters under different names.
Image
Gwain

Post by Gwain » Sat Oct 09, 2004 4:26 pm

What about creating an unremovable flag over the pc so that they can only see the mob a certain way because by being greeted the flag was placed?
Bear in mind that I have no knowledge of programming and the feasability of this.
Dalvyn
Sword Grand Master
Sword Grand Master
Posts: 4708
Joined: Tue Jul 15, 2003 9:26 pm
Location: House of Wonder, Waterdeep

Post by Dalvyn » Sat Oct 09, 2004 6:05 pm

There is something slightly similar, but different, in an area. There's an altar that is defaced and a quest to restore it.

Now, when someone, alone, enters the room, the object 'altar' is renamed either to 'a defaced altar' or 'a restored alter' according to whether or not the character has completed the quest or not. As long as people enters the room alone and you never have 2 characters at the same time in the room, everything is fine. And, with those conditions, everything would be fine with the greeting mob idea as well. You would just have to use something like :

Code: Select all

>all_greet_prog 100~
if (quest bit shows that mob has greeted entering character)
  mpmset self short Albert
  mpmset self long Albert is here.
else
  mpmset self short an old bearded man
  mpmset self long An old bearded man is here.
endif
~
The problems start as soon as two persons can be in the room at the same time. If person1 enters the room and has already been greeted, the mob will be named 'Albert'. If person2, who has not been greeted, enters the room afterwards, its name will be replaced with 'an old bearded man'. At this point, if person1 'look's in the room, he will see 'An old bearded man is here', not Albert. And it makes no real sense here to forget the mob's name.

Same problem if person1 and person2 are grouped and enters the room at the same time.

A possible way to fix that (but then again, it's not 100% error-proof, since you can look in a direction and see who is a few rooms away), would be to make the room solitary (only one character can go in, it's too small for two or more characters).
Image
Post Reply