|
Halk Newbie
Joined: 12 Jul 2003 Posts: 8 Location: United Kingdom
|
Posted: Sat Jul 12, 2003 12:04 pm
Quick question |
I'm looking to capture whatever I specify to bash.
So my alias looks like...
#alias {bash} {#va bashtarget %1;bas %1}
I.e. it sets @bashtarget as the word after bash (I'd type bash troll) and then sends out 'bas troll'
However, when I'm in combat and type bash, it gives me
Variable: mob troll
Which is annoying.
I did think to get around it with -
#if %1="" {bas} {bas %1}
But that didn't work, how do I test if something is empty like this? |
|
|
|
Halk Newbie
Joined: 12 Jul 2003 Posts: 8 Location: United Kingdom
|
Posted: Sat Jul 12, 2003 12:07 pm |
Sorry about the double post. Some kind of cache problem in Mozilla made me think it had rejected my first one.
|
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Sat Jul 12, 2003 1:48 pm |
You have to put parenthesis around the expression for #IF.
#AL bash {#IF (%1="") {bas} {#VAR bashtarget %1;bas %1}}
If you don't actually use the variable for anything then you don't need the alias. |
|
|
|
Halk Newbie
Joined: 12 Jul 2003 Posts: 8 Location: United Kingdom
|
Posted: Sat Jul 12, 2003 3:17 pm |
I need the variable so that if my auto rebash set is on then when the mob stands up (it grabs (*) is sent sprawling... it sends another bash, generally I'm engaged on that mob, but sometimes I could be fighting a room full of mobs, and only trying to bash say a cleric and not particularly worried about the warriors reescuing me off the cleric.
|
|
|
|
Halk Newbie
Joined: 12 Jul 2003 Posts: 8 Location: United Kingdom
|
Posted: Sat Jul 12, 2003 3:20 pm |
Incidentally, what you suggested unfortunatly does not work.
#if (%1="") {bas} {bas %1}
Returns
Variable: mob mercenary
(mercenary was the last mob that I bashed with an arguement)
It's always send the command 'bas' to the MUD, but it's just annoying to get the cyan warning thing, I have cyan warnings appear for certain events in combat, which are intended to make me wake up and read what's going on because something important has happened. |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Sat Jul 12, 2003 7:29 pm |
Nothing posted so far explains why variable 'mob' is having defined issues
You can also use something like:
#ALIAS bash {#IF (%numParam() > 0) {bash %1;#VAR bashtarget %1} {bash @bashtarget}} |
|
|
|
|
|