|
dane Beginner
Joined: 27 Apr 2005 Posts: 18
|
Posted: Sun Apr 27, 2008 11:14 pm
Trigger question. |
Here's the problem.
I have a walking script which tracks from monster to monster.
### You sense a trail south from here...
Is the message I see. And easily enough, I just pull out the direction and send it to the mud.
The problem rises when the imms like to mess with it and change it to.
### You sense a trail quit from here...
It makes me quit obviously.
The question is how can I change it so that I only take directions.
Can I do something like ### You sense a trail {west,north,south,east,down,up} from here...
I can't quite make it work for me.
Thanks |
|
|
|
Progonoi Magician
Joined: 28 Jan 2007 Posts: 430
|
Posted: Sun Apr 27, 2008 11:21 pm |
Code: |
#var GoodDirs {west|north|south|east|down|up}
#trigger {~#~#~# You sense a trail (%w) from here~.~.~.} {#if (%ismember(%1,@GoodDirs)) {%1} {#say Imms are messing, pay attention!}}
|
Prog |
|
_________________ The Proud new owner of CMud.
--------------------------------
Intel Core i5-650 3,2GHz
4 DD3 RAM
GTX 460 768MB
Win 7 Home Premium 64x
-------------------------------- |
|
|
|
dane Beginner
Joined: 27 Apr 2005 Posts: 18
|
Posted: Sun Apr 27, 2008 11:22 pm |
Thanks!
|
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Mon Apr 28, 2008 2:07 am |
You could try the %t wildcard, but I haven't bothered to get familiar with exactly how it works. I've thought to use it several times only to get frustrated as to why it wasn't working correctly. According to the helpfile, it's supposed to work on directions but it doesn't clarify if it's the entire word, the short version, or just the #DIRECTION version (which is often the short version anyways, but would also match reverse directions).
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
|
|