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
Atreides_096
Wanderer


Joined: 21 Jan 2005
Posts: 99
Location: Solvang, CA

PostPosted: Thu Sep 28, 2006 8:41 pm   

Wildcards in alias names or #oninput syntax
 
I'm looking for a way to gag the original input when a #oninput trigger is activated, or to set up wild cards in aliases. By this what I mean is, if I have a trigger:
Code:
#oninput {^mh-(%w)$} {#exe %db(@MH_DB, %1)}

I'd like it to send just the exe command, and not the original typed command. Alternatively, an alias that did the same thing would be fine. I've experiemented with #gag, #sub, etc..I can't seem to get it right. Any suggestions? Thanks a lot :)
Reply with quote
Seb
Wizard


Joined: 14 Aug 2004
Posts: 1269

PostPosted: Thu Sep 28, 2006 9:32 pm   
 
Do you have to type something of the form {^mh-(%w)$}? Is typing something like {^mh (%w)$} not OK? If it is OK then you can just make "mh" an alias, and %1 is the 1st argument you give to the mh alias. I expect you know this though!
Reply with quote
Atreides_096
Wanderer


Joined: 21 Jan 2005
Posts: 99
Location: Solvang, CA

PostPosted: Thu Sep 28, 2006 9:56 pm   
 
Nods I do know... the problem is I've got about 8000 aliases (mostly speedwalks) all in that format... XX-XX. After years of having this style of settings, it's incredibally tough to break the typing habit.. but it's been an issue for a long time that my settings file is too big because of this, and I'm looking for a way to condense it. Since the aliases are used in a sort of speed competition, I don't really want to change it all if it's avoidable.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Thu Sep 28, 2006 11:10 pm   
 
Use #SUB instead of #EXEC with your #ONINPUT triggers.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Atreides_096
Wanderer


Joined: 21 Jan 2005
Posts: 99
Location: Solvang, CA

PostPosted: Thu Sep 28, 2006 11:33 pm   
 
The problem is, I'm trying to link an alias out of the database.. (there's a command on the MUD, "run" which makes speedwalking faster. Run is also an alias for me, sent as ~run, which updates mapper location). Using #sub just sends a parsed output to the mud... how do I sub it into an executed alias?
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Fri Sep 29, 2006 9:18 am   
 
Using just your run command in the trigger will also do the substitute. Failing that, you can use #GAG to cause the original text to not be sent then use use your command.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
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