Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ Tips and tricks
➜ achaea chat redirecting
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Brothfeder
(16 posts) Bio
|
Date
| Sat 11 Jul 2015 07:29 AM (UTC) Amended on Sun 12 Jul 2015 04:11 AM (UTC) by Brothfeder
|
Message
| I hate to throw this issue on you, but I can't get this chat redirecting miniwindow to work. I'm using the chat redirecting miniwindow by fiendish. The window pops up after the plugin is installed, however it will not capture anything. Furthermore I thought the triggers were made for achaea but aren't working.
Some output examples...
You say in a confident, yet reserved voice, "Test."
You tell Ula, "Didn't work, but thanks."
Ula tells you, "Nope, i use the nexus client."
Jonesey's voice sizzles as he tells you, "Sorry, mudlet."
(Ashtan): Ula says, "So, what the hell is happening now?!"
(Fledglings): Jonesey says, "Bye."
<triggers>
<trigger
enabled="y"
match="^((.+): )?[A-Za-z]+ (says|yells|tells you), ".+""
script="chats"
omit_from_output="y"
sequence="100"
>
</trigger>
<trigger
enabled="y"
match="^You (say|tell|whisper) .+, ".+""
script="chats"
omit_from_output="y"
sequence="100"
>
</trigger>
</triggers>
There was a $ symbol somewhere at the end of the match= lines that I may have butchered. Like everyone says on these forums - i'm not a coder, ect. I'm just tired of trying but really need something to capture all communication. | Top |
|
Posted by
| Brothfeder
(16 posts) Bio
|
Date
| Reply #1 on Sat 11 Jul 2015 12:08 PM (UTC) |
Message
| I've been working on the Say|tell|whisper part and tried this. I feel this should capture my says. But no dice.
<trigger
enabled="y"
match="^You (say|tell|whisper) .+, ".+"$"
script="chats"
omit_from_output="y"
sequence="100"
>
</trigger>
example say:
You say in a confident, yet reserved voice, "Test." | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #2 on Sat 11 Jul 2015 09:46 PM (UTC) |
Message
| That looks like a regular expression, but you have not checked the "regexp" box. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Brothfeder
(16 posts) Bio
|
Date
| Reply #3 on Sun 12 Jul 2015 04:27 AM (UTC) |
Message
| The 2nd trigger never had one to my knowledge. | Top |
|
Posted by
| Fiendish
USA (2,535 posts) Bio
Global Moderator |
Date
| Reply #4 on Mon 13 Jul 2015 02:22 PM (UTC) |
Message
| Well you need it now, because you made a regexp pattern. |
https://github.com/fiendish/aardwolfclientpackage | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #5 on Mon 13 Jul 2015 08:28 PM (UTC) |
Message
| With "regexp" not checked:
^You (say|tell|whisper) .+, ".+"$
That only matches on literally receiving that from the MUD, which probably won't happen. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Brothfeder
(16 posts) Bio
|
Date
| Reply #6 on Mon 13 Jul 2015 09:35 PM (UTC) Amended on Tue 14 Jul 2015 08:44 PM (UTC) by Nick Gammon
|
Message
| First of all thank you for your input. I actually didn't know what/how to set regular expressions. I've now read up on them. Even after making them regular expressions they still needed work. I got it to work, MOSTLY with this:
<triggers>
<trigger
enabled="y"
match="^(\(.+\)\: )?[A-Za-z]+ ? (say|says|yells|tells you), ".+"$"
script="chats"
omit_from_output="y"
sequence="100"
regexp="y"
>
</trigger>
<trigger
enabled="y"
match="^You (say|tell|whisper) .+ ".+"$"
script="chats"
omit_from_output="y"
sequence="100"
regexp="y"
>
</trigger>
I say MOSTLY because if someone adds an adverb it doesn't catch it, and I can't figure how to get it to do it. Example output:
Ronit helpfully tells you, "Sure."
You happily tell Ronit, "Ooops sorry that didn't work."
I know you guys don't want to do my work for me - I get that. But your experts! If someone could just suggest a change that might work..it would be SOO helpful and time saving.
BTW the addition of the ? on the first trigger is not necessary for it to function. I just put it in to try to get adverbs to show up. It seems to be doing nothing noticeable. I've tried many other regular expressions too...
Thank you.
[EDIT] Code tags added. | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #7 on Tue 14 Jul 2015 08:49 PM (UTC) |
Message
| In the case of " ? " that means:
- Zero or one spaces
- Followed by one space
That could probably be better written as:
" +" - meaning one or more spaces.
As for the adverb, and I assume you don't want to list them all, you could make an optional "word", eg.
[A-Za-z]+(?: +[A-Za-z]+)? +(say|says|yells|tells you)
That makes the "word" in the brackets, with a preceding space, be optional (it has a "?" after the whole bracket).
The ?: stops it being turned into a capture (in case you already have capture numbers in use, which you don't appear to in this case). |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Brothfeder
(16 posts) Bio
|
Date
| Reply #8 on Fri 17 Jul 2015 03:46 AM (UTC) Amended on Fri 17 Jul 2015 03:56 AM (UTC) by Brothfeder
|
Message
| I'll be damned that worked, but I want to learn from this. Let me just break it apart.
match="^(\(.+\)\: )?[A-Za-z]+(?: +[A-Za-z]+)? +(say|says|yells|tells you|says to|asks), ".+"$"
(\(.+\)\: )?
says match a channel name with format (channel:) 0 or more times.
[A-Za-z]+
Match any string of letters/words at least once - its for the character's name in this case.
(?: +[A-Za-z]+)? +
The (?: +) says match this pattern but don't 'capture' for later use. The + says match the space before me at least once. The rest of the line says match any worlds/letters at least once. Finally, match whatever is in the ( ) 0 or more times and the last + says match the preceding 'space' 1 or more times.
Kinda crazy post, hope its understandable :P. Am I starting to get the hang of interpreting these regular expressions?
So if I wanted to trigger on this:
Acknu says in a deep, raspy voice, "Take a passage there.".
Id have to write under match= :
"^[A-Za-z]+(says)+(?: +[A-Za-za])?,?(?:[A-Za-z]), ".+"$"
Look right? | Top |
|
Posted by
| Brothfeder
(16 posts) Bio
|
Date
| Reply #9 on Fri 17 Jul 2015 03:57 AM (UTC) |
Message
| eer actually I think I mean:
match="^[A-Za-z]+ +(says) +(?: +[A-Za-za])?, +(?:[A-Za-z]), ".+"$"
for Acknu says in a deep, raspy voice, "Take a passage there." | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
26,668 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top