 |
zeiuszeppo Novice
Joined: 22 Nov 2001 Posts: 48 Location: Italy
|
Posted: Fri Mar 22, 2002 6:19 pm
grab any text send to mud |
Hi guys
I'd like to trigger every command i send
to the mud . My goal is to create an auto
hide setting that send the command hide to
the mud every time another command is sent.
Without add the command to every singol alias
or trigger (I have a 220k settings file:P) |
|
|
 |
TonDiening GURU

Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Fri Mar 22, 2002 7:10 pm |
sounds like you are interested in:
quote:
Syntax: #ONINPUT pattern commands
Related: #TRIGGER
Creates a command input trigger. See the #TRIGGER command for more information on triggers. Instead of matching the pattern against lines received from the MUD, command input triggers test their pattern against commands you enter on the command line. Output from command input triggers will replace the command that you entered. You can also use the #SUB command in a trigger to replace parts of your command with other text.
TonDiening
Beta Upgrading to 6.26 |
|
|
 |
zeiuszeppo Novice
Joined: 22 Nov 2001 Posts: 48 Location: Italy
|
Posted: Fri Mar 22, 2002 9:27 pm |
great....thanks:)
|
|
|
 |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Fri Mar 22, 2002 11:14 pm |
quote:
sounds like you are interested in:
quote:
Syntax: #ONINPUT pattern commands
Related: #TRIGGER
Creates a command input trigger. See the #TRIGGER command for more information on triggers. Instead of matching the pattern against lines received from the MUD, command input triggers test their pattern against commands you enter on the command line. Output from command input triggers will replace the command that you entered. You can also use the #SUB command in a trigger to replace parts of your command with other text.
TonDiening
Beta Upgrading to 6.26
While TonDiening made a good suggestion, don't listen to him--#ONINPUT will only work when you are typing in commands from the commandline; it will not work for any commands you send to the mud via alias, trigger, button, or any other scripted setting.
Since you don't want to mess with the other triggers, aliases, and whatever, take a look at this setup:
#VARIABLE MUD_Commands {Command1|Command2|Command3|...}
#trigger {^(*)$} {#if ("%1" ~= {@MUD_Commands}) {
;yep, this is a command alright, let's change it to hide
#NOOP replace this entire line with your hide command
} {
;Nope, this is not a command, so do nothing
#NOOP
}}
li'l shmoe of Dragon's Gate MUD |
|
|
 |
zeiuszeppo Novice
Joined: 22 Nov 2001 Posts: 48 Location: Italy
|
Posted: Mon Mar 25, 2002 12:08 pm |
ok, i understand this solution, but the
MUDS_command var-list seems to grow really
faster as the mud support a large set of
commands. Is the another solution? |
|
|
 |
Charbal GURU
Joined: 15 Jun 2001 Posts: 654 Location: USA
|
Posted: Mon Mar 25, 2002 5:51 pm |
quote:
ok, i understand this solution, but the
MUDS_command var-list seems to grow really
faster as the mud support a large set of
commands. Is the another solution?
Yes. There is another solution but it is not as simple as these; you can use the UserInput procedure of a plugin to catch commands going to the MUD and do whatever you want to them. As a bonus, text sent through #send does not trigger UserInput (although that going through aliases, triggers, etc does) so this method can be used to send the hiding commands like you want.
The real problem is then finding someone to make a plugin for you (or make your own)...
- Charbal |
|
|
 |
kognesty Newbie
Joined: 08 Jan 2001 Posts: 8 Location: USA
|
Posted: Thu Mar 28, 2002 7:53 am |
Now I am not saying this is going to work but if you are simply trying to send hide everytime you send a command to the mud how about doing it this way and I might add this is a big time cheat of a way:
#TRIGGER {[%lascom]} {hide}
Unfortunately this will send hide after every single command, be it macro, trigger, alias, or typed. So you could end up with a lot of spam of hide. |
|
|
 |
|
|