|
bcglassman Newbie
Joined: 13 Mar 2007 Posts: 5
|
Posted: Tue Mar 13, 2007 7:39 am
how do I pass a value to a variable in an alias at the time of execution? |
ok ...
I want to pass a value to the alias when I invoke it ... for example
I type .. cf critter and it spits out abjure cosmicfire critter
I created an alias called "cf" but I can't figure out how to pass the value to the alias. I've tried using $1 %1 @1 ... $0 %0 @0 ... etc
it's the most basic thing on earth ... and yet .. I can't find this ANYWHERE in the help files or on this forum .. or have I been taking crazy pills.
what is the global variable for values passed in the command line ??? |
|
Last edited by bcglassman on Tue Mar 13, 2007 7:57 am; edited 1 time in total |
|
|
|
bcglassman Newbie
Joined: 13 Mar 2007 Posts: 5
|
Posted: Tue Mar 13, 2007 7:56 am |
just to be clear ... I know how to #VAR target %1 ... but that takes 2 lines of input before my spell gets cast ... one line to define my target and another line to cast the spell at the target.
|
|
|
|
Odoth Wanderer
Joined: 13 Nov 2004 Posts: 54 Location: Visalia, CA
|
Posted: Tue Mar 13, 2007 8:30 am |
Using %1 in an alias represents the first argument provided. %2,%3, etc. work the same way. %-1 will use the full argument provided. However, when arguments aren't used in the value of the alias, the alias basically performs as if it has %-1 tacked on at the end. So from what I can see from your post, all you need to do is:
Code: |
#alias cf {abjure cosmicfire}
|
So after this alias is set up, hitting "cf critter" will send to the mud "abjure cosmicfire critter". Hope this helps. |
|
_________________ *ribbit* |
|
|
|
bcglassman Newbie
Joined: 13 Mar 2007 Posts: 5
|
Posted: Tue Mar 13, 2007 7:27 pm |
thank you
|
|
|
|
|
|