|
lottiz Newbie
Joined: 24 Apr 2003 Posts: 4 Location: Sweden
|
Posted: Thu Apr 24, 2003 2:02 pm
script that gets the monster-name needed! |
how to write a trigger that picks out the names of the monsters in a room?
eg. in a room is:
an old woman
the whole 'an old woman' wont work for commands like 'exa' or 'consider'
i need a trigger that only get 'woman' and then makes commands like 'exa woman'
anyone understod? please help me! |
|
|
|
Talahaski Enchanter
Joined: 10 Oct 2000 Posts: 656 Location: USA
|
Posted: Thu Apr 24, 2003 3:06 pm |
hmm, its not as easy as it first looks because If the "woman" speaks, you don't want the trigger to get executed from that.
Is it possible for you to create a list of all the items list "woman" that you want the script to execute off of.
Perhaps some additional mud text would help to show us what it looks like when there is 1 thing in the room that you want to concider, and when there are more than 1 things in the room to consider.
Here is something, but I don't think its really what you are looking for.
#tr {an old (woman|man)} {consider %1}
Talahaski
Processor PIII 1000
Memory 265MB
Video NVIDIA 64MB
Windows XP
Zmud Version 6.56
Zmapper Version 1.14
http://www.dartmud.com |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Thu Apr 24, 2003 4:54 pm |
As Talahaski said you give too little to figure out how to determine what is a mob in a room.
Once you can capture the entire short description of the mob (lets say to variable Mob_Short_Desc) you could attempt to use the last word of it:
%word(@Mob_Short_Desc,%numwords(@Mob_Short_Desc))
Ton Diening |
|
|
|
lottiz Newbie
Joined: 24 Apr 2003 Posts: 4 Location: Sweden
|
Posted: Sat Apr 26, 2003 12:13 am |
ok.. here we go.. this is an eg. of how it could look:
You are walking in a road. The pavement is made of grey stones, which radiate cold. There are some weeds growing from the cracks on the road. The city looks abandoned. There are only few buildings up.
There are five obvious exits: north, northeast, south, west and northwest.
Yrja the tiny wild cat (following lottiz)
A villager walking around
A little girl with a doll sits in the grass
There is so many kinds of monsters that it's impossible to write all their names. I need perhaps an variable that captures the name of the people in the room, but not their descriptions.
Is it possible? How to make it? |
|
|
|
AzCowboy Adept
Joined: 09 Nov 2000 Posts: 222 Location: USA
|
Posted: Sat Apr 26, 2003 1:48 am |
No, it's not really possible...
If you trigger to capture the first word, you get:
Yrja
A
A
If you trigger on the second word, you get:
the
villager
little
If you trigger the third word, you get:
tiny
walking
girl
..... How in the world is it supposed to know what the proper keyword is???? |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Sat Apr 26, 2003 2:22 am |
You need human interaction or rigourous testing with hopefully a social that only works for mobiles and not objects.
Ton Diening |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sat Apr 26, 2003 6:23 am |
The best you're ever going to do is to assemble a database of long names, associated keyword, and associated descriptions. The long name and associated description will provide the necessary clues to zoom in on the mob line (as opposed to any mob-action lines), and the long name will also provide a convenient link to the keyword.
li'l shmoe of Dragon's Gate MUD |
|
|
|
lottiz Newbie
Joined: 24 Apr 2003 Posts: 4 Location: Sweden
|
Posted: Sat Apr 26, 2003 1:26 pm |
Ok.. well thanx anyway=))
|
|
|
|
|
|