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
geniusclown
Magician


Joined: 23 Apr 2003
Posts: 358
Location: USA

PostPosted: Fri Jun 25, 2004 9:24 pm   

Alias, Temp, and %1
 
The following alias is called when a person enters the room, and checks for wounds for my healer:
quote:

#ALIAS checkem {
checkem=%1
#CLASS {Characters|Enigma|Healing|check|temp}
#TEMP {^{You see *<@checkem>|I could not find}} {
#GAG
#IF (%1="I could not find") {#SET 1}
}
#COND {^{He|She} (&%wtemp)} {
#GAG
#WIN Healing {<@checkem> is %if( @temp="is", "fine", "injured").}
} {within|param=2}
#CLASS 0
look %1 wound
}


My problem is in the initial #TEMP command. I want the temp trigger to check %1 when it fires, but instead it assigns the %1 from the alias to the trigger. That is, if I do "checkem steve", then the temp trigger is created with the statement "#IF (steve="I could not find") {#SET 1}".

Question is, how can I get the trigger to be created with "%1" on that line? Alternatively, is there a way to assign &temp with a list like that?
Reply with quote
DeReP
Adept


Joined: 14 Jun 2003
Posts: 222
Location: Chile

PostPosted: Fri Jun 25, 2004 9:46 pm   
 
maybe making 2 temporary triggers
#TEMP {^You see *<@checkem>} {#GAG}
#TEMP {I could not find} {#GAG;#SET 1}
Reply with quote
geniusclown
Magician


Joined: 23 Apr 2003
Posts: 358
Location: USA

PostPosted: Fri Jun 25, 2004 10:27 pm   
 
Thanks for the suggestion, but that won't work in this situation. When I'm checking the health of folks in the room, I may be checking a bunch all at once and need the names associated with injuries, hence the need for a multi-state temporary trigger.
Reply with quote
DeReP
Adept


Joined: 14 Jun 2003
Posts: 222
Location: Chile

PostPosted: Fri Jun 25, 2004 10:45 pm   
 
well you could do it in another way, untidier
#VAR find %null
#TEMP {^{You see *<@checkem>|I could not &find}} {
#GAG
#IF (@find != %null) {#SET 1}
#VAR find %null
}
#COND {^{He|She} (&%wtemp)} {
#GAG
#WIN Healing {<@checkem> is %if( @temp="is", "fine", "injured").}
} {within|param=2}
#CLASS 0
look %1 wound
}
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Fri Jun 25, 2004 10:46 pm   
 
%%1
Reply with quote
DeReP
Adept


Joined: 14 Jun 2003
Posts: 222
Location: Chile

PostPosted: Fri Jun 25, 2004 10:48 pm   
 
Lol thats an easier way, I totally forgot
Reply with quote
geniusclown
Magician


Joined: 23 Apr 2003
Posts: 358
Location: USA

PostPosted: Fri Jun 25, 2004 11:09 pm   
 
Exactly what I needed, and prolly the one thing I didn't try. Thanks again, 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