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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
kjaerhus
Magician


Joined: 18 Dec 2006
Posts: 317
Location: Denmark

PostPosted: Thu Mar 25, 2010 10:28 pm   

Using named parameters in a trigger
 
Hi

I have an alias looking somehing like below. My goal is to use the value of the parameter $command both to send to the mud and to filter the command from my screen. However, CMUD contructs the temp trigger differently than I hoped for as it will interpret what I put inside the {} literally. Any hints?

Code:
<alias name="doWait" id="430">
    <value>
        #IF ($hideOption == "hide") {
            #TEMP {$command} {gagLine} "" input
        }
        #EXECUTE $command
    </value>
    <arglist>$command, $hideOption</arglist>
</alias>
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Thu Mar 25, 2010 11:27 pm   
 
Have you looked into command-input triggers? You can use #NOINPUT to intercept the stuff you typed on the command line, preventing it from both going to the game as well as going to the screen. If you capture the pattern, you can then use #SEND/#SENDRAW to send it to the game without showing on the screen.

To answer your question, though, I think you might need to concat the #temp command together and then #execute the result.
_________________
EDIT: I didn't like my old signature
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Fri Mar 26, 2010 3:49 am   
 
MattLofton is correct. You'll need to do:

#EXEC %concat("#TEMP {",$command,"} {gagLine} ",%char(34),%char(34)," input")

for it to work. I think doubling up the quotes will also work, but I tend to use %char instead. However, Matt's suggestion of #ONINPUT might be what you want to do instead.

Charneus
Reply with quote
kjaerhus
Magician


Joined: 18 Dec 2006
Posts: 317
Location: Denmark

PostPosted: Fri Mar 26, 2010 4:32 pm   
 
Great answers both. I didn't think of actually putting the creation og the trigger inside a function. I tried everything inside the brackets but all that seems to go unprocessed to the trigger pattern. In the end Í might just do a sendraw and then write the same command in the "log" window. I forgot this opportunity and then I don't need a trigger.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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