Quest Examples

OK, before we can get to the examples, we have to have some mobs and objects to do stuff with. Let's pretend that you have an area called "Village", and you've already completed village.zon, village.mob, village.obj, and village.wld. Some of the mobs and objects with their vnums are listed below:

VNUM MOB
1000 the little boy
1001 the salt merchant
1002 the dog
1003 the farmer
1004 the mother
1005 the father
1006 the sister
VNUM OBJ
1000 the ball
1001 the lollipop
1002 the potato
1003 the bone
1004 the paddle
1005 a bowl of stew
1006 a hunk of salt
VNUM ROOM
1000 the dining room

Example 1: How to do a simple conversation--

#1000
M
hi hello~
The little boy looks at you and says "Can you help me?"
~
M
help~
The little boy nods and says "My little dog is lost! He's my best friend!"
~
M
dog lost friend~
The little boy starts to cry and says "Yeah, noone else loves me...I'm such a pitiful little brat!"
~
S

Example 2: How to do a simple conversation ending with an exchange of items. (This assumes that you already have the item called "lollipop".)

#1000
M
hi hello~
The little boy glares at you and says "No! You can't have my ball!"
~
M
ball~
The little boy clutches the ball to his chest and says "MINE! My two
favoritest things in the world are my ball and lollipops!"
~
M
lollipop lollipops~
The little boy starts to drool and says "Lollipop? You have a lollipop?
Um...well...I'd be willing to trade my ball for a lollipop!"
~
Q
The boy smiles happily, stuffs the lollipop in his mouth and mumbles
"fank you" as he hands you his snot covered ball.
~
G I 1001
R I 1000
S

Example 3: An example of an exchange of items and money and a mob that disappears at the end. This assumes that you have the item "paddle".

#1005
M
hi hello~
The father looks at you absently and says "not now...I have to find that snotnosed kid!"
~
M
kid snotnosed~
The father grins at you and says "yep, that brat is gonna get a royal
woopin'! Too bad I don't have a paddle to wallop him with. All I got is
my bare hands.
~
M
paddle~
The father sighs and says "if I just had me a paddle....say, you wouldn't
happen to have one, would you? I'd pay ya handsomely..."
~
Q
The father grins wickedly, hefts the paddle, and takes a few practice swipes. Digging deeply into his pockets, he hands you some coins.
~
G I 1004
R C 500
D
With a last wicked grin, the father rushes off, calling out "I have a surprise for you boy!"
~
S

Example 4: Putting it all together.

Note that I've used a couple of tricks in this one to avoid having to put together a shop file for just one or two items. Since these are arranged by the mob's vnum, sometimes it can get confusing especially since you'll have to go from one mob to another as a player to gather up the items. I make up a list with three headings: mob, wants, and gives. That way I have everything diagrammed out in advance.

#1001
M
hi hello~
The salt merchant looks at you and says "get yer salt here! Salt...get yer salt here"
~
M
salt~
The merchant sighs and says "yes, that's what I said...SALT...are you hard of hearing? Sheesh...you wanna buy some or not?"
~
M
buy~
The merchant nods and says "That's more like it...you can have this nice block of salt for just 1 silver piece..."
~
Q
The merchant counts the coins carefully, then hands you a large block of salt as big as your head.
~
G C 10
R I 1006
D
The merchant says "a pleasure doing business with ya", then moves along looking for more suckers.
~
S
#1002
M
hi hello~
The dog looks at you and gives a muffled growl, clenching the bone tight in his mouth.
~
M
ball~
The dog starts to wag his tail furiously, almost dropping his bone.
~
Q
The dog grabs the ball from your hand, dropping the bone in its place.
~
G I 1000
R I 1003
D
Overjoyed, the dog runs off to look for someone to play fetch with.
~
S
#1003
M
hi hello~
The farmer smiles in greeting, asking you "be ye in need of any vegetables today? Farm fresh!"
~
M
vegetables fresh~
The farmer nods and opens his basket of veggies, saying "I've got all the best here...I've got carrots, beans, beets, and just LOOK at this huge potato!"
~
M
potato~
The farmer says "Yep, this is a beauty, ain't it? It can be yours for just 15 silvers!"
~
Q
The farmer says "Thanks friend...enjoy! I've heard it's great in stews", then he hands you the tuber and smiles happily.
~
G C 150
R I 1002
S
#1004
M
hi hello~
The mother looks up from her cooking and says "don't bother me now, I'm very busy!"
~
M
busy~
The mother brushes the hair from her face and says "Yup! I'm making me some homemade stew!"
~
M
stew homemade~

The mother pulls out a recipe card and says "the heartiest stew in the world. Guaranteed to fill ya for a week per bowl!" Looking over the list, the mother snaps her fingers and says "Darn! Wouldn't ya know it! I'm missing a key ingredient! I don't have no potatoes!"

~
Q

The mother thanks you heartily, plunks the potato whole into the bubbling pot, then slaps her forehead saying "SALT! I'm missing salt...how could I be SO stupid...you wouldn't happen to have any salt on ya, would ya?"

~
G I 1002
Q

The mother grabs the salt from your hands saying "I hope it isn't too late!", then drops the entire block of salt into the bubbling pot. She stirs the revolting mixture for a while, then stops and says "needs calcium....you wouldn't happen to have a bone, would ya? If ya did, I'd be able to finish the stew, and I'd even pay ya for yer trouble with some coins and a portion."

~
G I 1006
Q

The mother smiles in satisfaction, and drops the whole bone into the pot. After stirring it for an hour or so, she hands you a few coins and a steaming bowl of fresh bone/salt/potato stew.

~
G I 1003
R I 1005
R C 10
D
Humming a happy song, the mother rushes off to feed her family.
~
S

Example 5: Getting a mob to follow and then reward at the destination

In this example, note that the player engages the mob in conversation, performs a basic task of retrieving an item, and then when it is brough to the mob, she follows the player. When he arrives in room 1006, it triggers the reward portion via the A command. Using this technique, you can create escort quests designed to bring mobs to different locations.

#1006
M
hi hello~
The sister looks up from the ground and digs her toe in the dirt sheepishly. "Hi there, is it time for dinner?"
~
M
dinner~
"Ok good, I'm so hungry. But before we go, can you get me a potato to bring in? Thank you!"
~
Q
The sister beams a smile at you. "Wonderful, can you bring me there so we can eat? Thank you!"
~
G I 1001
R F
A 1006
The sister bounces over to the table and grabs up a bowl of stew. "Here you go, now you can have some dinner too. Thanks so much for bringing me inside!"
~
R I 1005
D
Suddenly she blushes and scampers away, saying something about needing to wash up first.
~
S