rickybuchanan
Feb 13 2006, 01:23 PM
I want Savitar to catch everything that I type, and prepend say before it is sent to the mud.
I tried a trigger matching input line starts with $$foo and substituting say %%foo,but it doesn't seem to catch anything... how should I do it?
Regards,
Ricky
[[ Please excuse odd mistakes or brevity, typed via on-screen keyboard ]]
anon
May 28 2006, 11:30 PM
You're not going to get Savitar to prepend it before sending the original command (exactly what you typed in the input pane) Savitar sends it to the mud before referencing what your trigger is for, so it sends it to the mud BEFORE it translates it to whatever your trigger results in to the mud, I've noticed that's just how Savitar works.
If i were you, i'd set it as an input trigger, regular expression, and put
(^)(.*)($)
and in the trigger pane, put
say %%2
I don't know everything about regexes, but I know that
1. you should bracket everything off with ()s, that is what deliminates the ()s into %%1, %%2, etc.
2. ^ signifies the start of a line
3. $ signifies the end of a line
4. . signifies any character
5. * signifies one or more of the previous character (not whatever character it happens to be, but the variable . itself.
So yeah, (^)(.*)($)
means
(start of line)(any amount of text NOT including a linebreak)(linebreak)
Hope this helps.