|
faulkner Newbie
Joined: 22 Jan 2009 Posts: 2
|
Posted: Mon Jan 26, 2009 9:12 pm
Alias/variable assistance. |
I just started using CMUD and I'm trying to get use to simple alias' and variables.
Right now I'm just trying to set up an alias and variable that will allow me to, for example if I was attacking a goblin, to type "t goblin" to set the target.
And then use a macro such as the 0 on my number pad to intiate and attack, like double slash for runewarden's in Achaea. I'm not sure how to set up the macro.
What I have currently is:
#VAR t %null
#ALIAS t {t=%1}
However, it seems that the alias is not allowing me to set the variable unless I type t=goblin.
From what I understood I was telling t to function as t=%1
I'm not certain why this isn't working. |
|
|
|
gamma_ray Magician
Joined: 17 Apr 2005 Posts: 496
|
Posted: Mon Jan 26, 2009 9:49 pm |
I'm unable to duplicate this in 3.03a. I copied and pasted directly from your post to my command line and then did
t goblin
#show @t
and it showed "goblin".
Maybe there is a typo in your alias? Perhaps copy and paste the XML here? |
|
|
|
faulkner Newbie
Joined: 22 Jan 2009 Posts: 2
|
Posted: Mon Jan 26, 2009 10:10 pm |
I'm currently using version 2.37, since I'm testing it out before buying.
Not certain why t goblin isn't working for me, but t=goblin works fine.
XML shows:
<var name="Target" id="16">#VAR t %null</var>
<alias name="Target" id="17">
<value>#ALIAS t {t=%1}</value>
</alias> |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
|
_________________ Asati di tempari! |
|
|
|
Arde Enchanter
Joined: 09 Sep 2007 Posts: 605
|
Posted: Mon Jan 26, 2009 11:04 pm |
faulkner wrote: |
<var name="Target" id="16">#VAR t %null</var> |
Since you did not have an intention to make an inline function, quoted setting is wrong. You should assign a value to your variable, not an expression. And here you've written #VAR t %null expression - it is good for an alias, not to a variable.
faulkner wrote: |
<alias name="Target" id="17">
<value>#ALIAS t {t=%1}</value>
</alias> |
This alias would create another alias with t=%1 code.
In both settings you are trying to create another settings. But I think you need something simple like this:
Code: |
<var name="Target" id="1"/>
<alias name="t" id="2">
<value>Target = %params</value>
</alias>
|
t goblin
#SAY @Target ---> will echo "goblin" |
|
_________________ My personal bug|wish list:
-Wrong Priority when copy-paste setting
-1 prompt trigger for Mapper, Session and General Options, not 3 different!
-#SECTION can terminate threads
-Buttons can't start threads |
|
|
|
gamma_ray Magician
Joined: 17 Apr 2005 Posts: 496
|
Posted: Mon Jan 26, 2009 11:26 pm |
To elaborate on what Arde said, the commands #var and #alias specifically CREATE variables and aliases. If you open up the settings editor and begin inputting things into your, for example, alias, you don't need to use the #alias command again because you've already created the alias (in the settings editor), instead you just need to input the commands you would like it to preform, in this case just
|
|
|
|
|
|