|
Rijda Newbie
Joined: 21 Jul 2007 Posts: 2
|
Posted: Sun Jul 22, 2007 12:01 am
Totally new to zMud, need some assistance |
I'm at a loss.
What I'm asking is likely a simple answer to those of you zMud code-junkies, but I am, I afraid, too computer-illiterate to understand the waves and waves of technical assistance upon the various threads and FAQs, sadly.
What I want to do is make various buff triggers that will activate when a certain line is sent to my client, I.E.:
Joebob gives you 100 gold pieces.
The trick here is, I can't seem to get my client to respond to a particular name. I.E.:
Joebob gives you 100 gold pieces.
cast haste joebob
Assigning "Joebob" to a variable to be used in a subsequent trigger (or series of triggers) is proving to be rather difficult. Seems I can't quite process the mechanics of it.
In addition, I have no idea how to have my cleint respond to color codes, I.E. only to respond when Joebob gives you 100 gold pieces. is listed in yellow text.
Please help a desperate noob? |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sun Jul 22, 2007 12:32 am |
Replace Joebob with (%w).
That's the best I can do, unfortunately, without a better understanding of how names work on your MUD. FYI, %w = any one-word combination of letters (no numbers, no whitespace, and no symbols) and the parentheses = put this part of the pattern into a %1...%99 system variable.
Your command would then be cast haste %1 |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
Rijda Newbie
Joined: 21 Jul 2007 Posts: 2
|
Posted: Sun Jul 22, 2007 3:41 am |
Thank you! Got the trigger to work now, and working like a dream. However:
Making the trigger respond to specific color codes is a problem. While I have the option checked off in the Options tab and the correct colors marked (in this case, yellow text and black background) the trigger fails to go off with the proper text, in this case:
Joebob gives you 100 gold coins. (in yellow text upon a black background)
Name interface in the MUD I play is singular, so that fixed worked well. However, no matter how I try with MXPTRIGGER or other tags, I can't seem to get it to work right.
Please keep in mind I'm terribly illiterate in these matters, but the trigger I have up so far is:
#MXPTRIGGER {color yellow} {%w gives you 100 gold coins.} {cast haste %1}
Obviously I'm doing something wrong, but hopefully you get the jist. |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sun Jul 22, 2007 6:28 am |
Yeah, #MXPTRIGGER is for triggering on the mxp tag itself, not the results of that tag. You probably want to go with a regular #TRIGGER that's set to look for a specific color.
To make one, set up a normal colorless trigger like you did (not the mxp version). On the options tab you will find a checkbox with the caption of Line Color. Check this box, choose the color in the box to the right, and it should match for you. If it's not matching on the color, play around with the color box options. |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sun Jul 22, 2007 11:30 am |
You can also copy the line in question to the clipboard, check the ANSI Trigger option, and then paste the line into the pattern box - CMUD will recreate the colour codes that're present on the line.
|
|
|
|
|
|