linktree Atrinik.org - Multiplayer Online Role Playing Game  >  Development  >  Tutorials
linktree Topic: Making a NPC talk like a in-game character
Pages: [1]   Go Down
  Print  
Author Topic: Making a NPC talk like a in-game character  (Read 3773 times)
0 Members and 1 Guest are viewing this topic. Bookmarked by 0 members.
Offline ghost101

Necroposter :P
Posts: 156
Gender: Male
« on: July 23, 2010, 08:54:05 am »

To make a NPC talk like a in-game character like a farmer named John.
So to make John talk you could say:

@match ^HI$|^HEY$|^HELLO$
John will say: Hello there. You here to help out on the farm?
 
but '@match has to be before ie '^HI$'

SO John will say: Hello there. You here to ^help^ out on the farm?

now the ^help^ is to click and or say 'help' will make him say another message

@match ^HELP$
Yes, this farm just suffered a terrible natural ^disaster^.

And again clicking or saying ^disaster^ will take you to say a new message.

@match ^DISASTER$
Well, I wouldn't call it natural but we were raided by a gang of evil monsters. You might want to talk to my ^wife^.
@match ^WIFE$
Yes you can find her cooking in the middle of the village.

And remember it doesnt matter if its @match ^DISASTER$ uppercase or lower case @match ^disaster. But in the text most likely make it fit in the sentence.

So something like this should be put in the Msg Text of a NPC:
Code: [Select]
@match ^HI$|^HEY$|^HELLO$
Hello there, you must be here to ^help^ out on the farm?
@match ^HELP$
Yes, this farm has just suffered a terrible ^disaster^
@match ^DISASTER$
Well, I wouldn't call it a natural one, but we were just raided by a gang of evil monsters. You might want to talk to my ^wife^.
@match ^WIFE$
Yes, you can find her cooking in the middle of the village.


Mk instructions: keyword-syntax- @match <keyword1>|<keyword2>

     for any number of keywords
from one to infinite is allowed.
But make sure folks that they're seperated by a "|"

Examples: @match ^hello$
                 @match ^hello$|^whats up$

         
« Last Edit: May 09, 2011, 09:05:03 am by Kiana »  Logged

I keel yew.
Offline Mamoru
Developer
Edwin Miltenburg

Posts: 625
Gender: Male
« Reply #1 on: July 23, 2010, 10:25:44 am »

Nice guide so far.
Could you add info about the ^ | and $ characters in the @match phrase?
And could you explain using colours in the text?
Some colours are ~ | and ^ of which ^ will also give a link in NPC texts.
~Kiana~
 Logged
Offline idicus
Developer

Posts: 136
Gender: Male
« Reply #2 on: August 07, 2010, 05:26:29 pm »

ya please post more, i need to start figuring out how to make a mob give quests.
 Logged

I am not retreating! i am simply attacking in a different Direction!
Offline Mamoru
Developer
Edwin Miltenburg

Posts: 625
Gender: Male
« Reply #3 on: August 07, 2010, 06:38:55 pm »


ya please post more, i need to start figuring out how to make a mob give quests.

For that have a look at the python test map (/dev/testmaps/testmap_python)
~Kiana~
 Logged
Offline idicus
Developer

Posts: 136
Gender: Male
« Reply #4 on: August 08, 2010, 01:02:56 am »

i tried, it says "this map is closed" and i know i type /goto ect correctly *shrug*
 Logged

I am not retreating! i am simply attacking in a different Direction!
Offline Mamoru
Developer
Edwin Miltenburg

Posts: 625
Gender: Male
« Reply #5 on: August 08, 2010, 02:29:40 am »

It's easier to open it in the editor. You'll see the attributes used for the demonstrated quests :)
~Kiana~
 Logged
Pages: [1]   Go Up
  Print  
 
Jump to: