 |
user0101 Apprentice
Joined: 01 Aug 2003 Posts: 100 Location: USA
|
Posted: Mon Jan 05, 2004 12:42 am
Passing Parameters |
Alias name: Boar
Value:
#IF (%numparam( )>0) {#if (%numparam=2) {ink boar on %param(2) of %param(1);#NOOP};#if (%numparam=3) {#math bodypart %param(2)+" "+%param(3);ink boar on @bodypart of %param(1);#NOOP}} {outr purple ink;outr red ink;outr red ink;ink boar on head}
I was wondering if there was an easier/faster way to do this, possibly without a variable. The syntax for this alias is BOAR PLAYERNAME BODYPART. As you can see, the bodypart can be multiple words. |
|
|
 |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Mon Jan 05, 2004 1:07 am |
Aliases treat each word (words are defined as a string of letters and symbols separated by spaces) as one parameter:
Alias %1 %2 %3 etc
If you have parameters which are more than one word, you have two options depending on where the multi-word parameter lies:
Alias %1 %2 %-3 //if the multi-word parameter is at the very end of the list, %-3 will capture everything from the 3rd word onward: Alias this is a test
Alias %1 "%2" %3 //if the multi-word parameter is in the middle or front of the list, you need to use quotes or other kind of braces, which will force ZMud to treat that multi-word parameter as a single-word parameter: Alias this "is a" test |
|
|
 |
user0101 Apprentice
Joined: 01 Aug 2003 Posts: 100 Location: USA
|
Posted: Mon Jan 05, 2004 1:39 am |
Thanks, I figured there was a much easier way.
|
|
|
 |
|
|