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
poon
Beginner


Joined: 11 Oct 2001
Posts: 12
Location: USA

PostPosted: Mon Dec 17, 2001 12:49 am   

Attacking only certain targets.
 
What I am wanting to do is set up a way of
attacking ONLY certain targets... for example
I set up my kill alias as:
#ALIAS {h} {hurl %if( %null(%1), @target,
%1)}

With this setup, if I type 'h' then the
command 'hurl target' is sent (and if I have
target var set as vognus, then I will hurl
vognus if he is in the room), but if I type
'h vraurk' then the command 'hurl vraurk' is
sent. Now, with all that said, is there a
way to set up the variable (or any other way)
to try and hurl several different names?

So, if I have 'hagar', 'vraurk' and 'grunk'
in the target variable, and I walk into a
room that does not have any of these people
in there and type 'h' then I don't attack
anyone at all.... but if I walk into a room
and vraurk is there, and I type 'h' then
'hurl vraurk' is sent to the room... is there
any way of setting that up?



Poon
Zmud 6.16
Win95
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon Dec 17, 2001 4:08 pm   
 
How will you know if any of these people are in the room? What do you want to do if more than one of them is present?

The simplest approach would be to just hurl at all three of them. If none of them are present you should just get 3 error messages but if one or more of them is present you'll attack.

#VAR target {hagar|vraurk|grunk}
#ALIAS {h} {#IF (%1) {hurl %1) {#FORALL @target {hurl %i}}}

LightBulb
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