Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Halk
Newbie


Joined: 12 Jul 2003
Posts: 8
Location: United Kingdom

PostPosted: 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?
Reply with quote
Halk
Newbie


Joined: 12 Jul 2003
Posts: 8
Location: United Kingdom

PostPosted: 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.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: 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.
Reply with quote
Halk
Newbie


Joined: 12 Jul 2003
Posts: 8
Location: United Kingdom

PostPosted: 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.
Reply with quote
Halk
Newbie


Joined: 12 Jul 2003
Posts: 8
Location: United Kingdom

PostPosted: 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.
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Sat Jul 12, 2003 7:29 pm   
 
Nothing posted so far explains why variable 'mob' is having defined issues Wink

You can also use something like:

#ALIAS bash {#IF (%numParam() > 0) {bash %1;#VAR bashtarget %1} {bash @bashtarget}}
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net