|
xantharus Beginner
Joined: 21 Aug 2007 Posts: 29
|
Posted: Tue Aug 21, 2007 10:23 pm
Newbie zmudder trying to make a simple trigger |
I am very new to zmud and I am trying to make a simple trigger but have been really struggling to do so. The mud I play has it's own mud variables, such as {location} to tell which plane you are on, {*x*} to tell what you x-coordinate is, and {*y*} for your y-coordinate. I want to make a trigger that will display my location to any of my clan mates. If someone types "findxan" across a certain channel, I want it to fire back the contents of the variables I mentioned above. I have been able to make this work in 2 separate triggers.
Trigger 1
Pattern
^Guest tells you, ':%w: findxan.'$
Output
display {*name*} is in {location} at {*x*} {*y*}
This displays "Xantharus is in the Realm at 2000 -2000
I then have a 2nd trigger
Pattern
%w is in the Realm at (%d) (%d)$
Output
tell guest [>I am in the Realm at %1 %2
There has to be a better way to do this. Any help?
Thanks |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Tue Aug 21, 2007 11:05 pm |
The curly braces {}, square brackets [] and angle brackets <> are special characters in zMUD. You can tell zMUD that you don't want to use their special properties by putting a ~ before them. So your commands become
display ~{*name*~} is in ~{location~} at ~{*x*~} ~{*y*~}
tell guest ~[~>I am in the Realm at %1 %2
You might possibly need to quote the asterisks too, but I don't think so. |
|
|
|
xantharus Beginner
Joined: 21 Aug 2007 Posts: 29
|
Posted: Wed Aug 22, 2007 6:59 am |
That didn't help me too much. What I am trying to do is to get rid of the 2 step process. How can I read those mud variables into zmud variables or is there a way for me to just type tell guest "I am in {location} at {*x*} {*y*}"? Right now the display just echos the variables out to the screen and another trigger picks them up. Seems cumbersome.
|
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Wed Aug 22, 2007 7:18 am |
It is probably a limitation in your mud that only makes the variables available with the display command. You could try to see if they are available with other commands; perhaps starting with say, prompt, and trying tell. If they work then you can do it as the single command "tell guest [>I am in the realm at {*x*} {*y*}", otherwise you are doing it right.
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
xantharus Beginner
Joined: 21 Aug 2007 Posts: 29
|
Posted: Thu Aug 23, 2007 1:25 pm |
Thank you both for your help. I have rewritten this and it seems to work.
|
|
|
|
|
|