|
 |
|
In zMUD you could use multiple % or @ characters to "delay" the expansion of variables or arguments. This is no longer supported in CMUD. Instead, using local variables or "named arguments" can be used and result in scripts that are easier to understand.
For example:
Code: |
zMUD:
#ALIAS make {#ALIAS %1 {cast %1 %%1}}
CMUD:
#ALIAS make($spell) {#ALIAS $spell($target) {cast $spell $target}} |
The zMUD example is hard to figure out. The CMUD version is easier to understand. As an example of using this alias, typing:
make heal
creates the following alias:
Code: |
zMUD:
#ALIAS heal {cast heal %1}
CMUD:
#ALIAS heal($target) {cast heal $target} |
In both of these cases you now have a "heal" alias that can be used to cast a spell on a specific target.
Notice that in CMUD, you can give a *name* to the arguments of an alias, instead of just using %1..%99. Since arguments are named, there is no longer any need for the wierd %%1 syntax. |
|