|
Parleone Newbie
Joined: 16 Apr 2009 Posts: 1
|
Posted: Thu Apr 16, 2009 10:35 pm
Alias Setting Triggers with Variables - Possible? |
Hi Everyone
This is my doubt on zMUD:
I want to be able to set an Alias (lets say it's called DIE) that, followed by a certain parameter (name), sets up a trigger for coloring that name every time it appears.
I thought this could work:
The Alias Die would do this:
#CLASS Die
#VAR die %1
#TRIGGER {{@die}} {#CW "#FF0000"}
But it seems the Trigger doesn't recognise (when it's being set) the variable or any wildcard, right? How can I go around this?
Thank you |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Fri Apr 17, 2009 4:02 pm |
This worked for me. Are you saying you want to store a wild card, e.g. '?', '*' in the die variable?
If I run the test with just cow it works fine.
My zMud memory is getting rusty, but I'm fairly sure that you can't use wildcards in variable list expansions like you are doing with the trigger. If I've completely missed what you mean can you explain in more detail exactly what is not working. |
|
_________________ Asati di tempari! |
|
|
|
ralgith Sorcerer
Joined: 13 Jan 2006 Posts: 715
|
Posted: Fri Apr 17, 2009 7:59 pm |
Isn't there an option you can turn on to allow that?
|
|
_________________ CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Fri Apr 17, 2009 11:55 pm |
There's an option on I believe the General Preferences page called "Use wildcards in stringlists" or something similar. Barring that, you could try for the [] pattern, which inherently allows you to use wildcards in them (ie, [%w] is the same as [A-z]).
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
ralgith Sorcerer
Joined: 13 Jan 2006 Posts: 715
|
Posted: Sat Apr 18, 2009 2:42 pm |
Ok, now that I'm revisiting this, I can see where he's gone wrong anyways. He'll want a stringlist for die, not a straight up var.
So your script should be:
Code: |
#CLASS {Die Highlight}
#ALIAS die {#CLASS {Die Highlight};#ADDITEM die_list "%1$";#CLASS 0}
#VAR die_list {}
#TRIGGER {{@die_list}} {#CW "#FF0000"}
#CLASS 0 |
And if you want to be able to add a wildcard such as:
die George*
to the stringlist and have it work for matching then you need to turn on the option Matt mentions above. The one I couldn't remember if it existed or not.
Good Luck |
|
_________________ CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate |
|
|
|
xiangwei Beginner
Joined: 17 Apr 2004 Posts: 18
|
Posted: Mon May 11, 2009 10:11 am |
looking of you
thank you
good luck |
|
|
|
|
|