Quote:
If you change the line that reads:
Code:
if($text=~/i am new to the hall/i) {
To:
Code:
if($text=~/yes/i) {
Will that not do what you are saying in that particular example you gave?
|
it would, of course. But what i mean is
'yes' would be understood by the npc
ONLY after
Are you a [young Paladin of Brell] ? , and not in any other context.
To put it in other ways : you never get any answer in a quest to something like
'Yes.'. It wouldn't make sense. The NPC just could not find out what you say yes to. The best answer you could get is
'`Yes` what ?'. Thus, in every quest, you have to re-type more or less what the NPC said.
What i was thinking of is keeping track of the context (i.e. the current subject being discussed) so that :
'yes' means
'I am a young paladin of Brell' in that context,
but
'yes' would mean
'I'm thirsty' after the NPC had said
'Are you thirsty ?',
and have the NPC answer
'`Yes` what ?' when you answer
'yes' after
'where do you come from ?'
It's not the best way to implement such 'conversations', but yet could give the feel of the NPC understanding what you say, instead of of just matching words. Using a global 'conversation_subject' per NPC per player can give a cheap and funny improvement to quests.
i would'nt start a long discussion in this thread, but i'm planning to post on this subject whenever i'm done with the plugins stuff.