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
➜ Bug reports
➜ Triggering the last line
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Neijel
(2 posts) Bio
|
Date
| Wed 03 Aug 2005 08:00 PM (UTC) |
Message
| Hello everybody!
I'm not sure this is a bug, probably I'm missing something in the config options but, anyway, there it goes!
I've been having this weird problem with triggers when they have to match a pattern in the last line: they do match it, but only after a new line comes in. Let me give you an example, as I know it's quite confusing.
----------------------------------
[...]
You see exits leading north, southeast, south, and southwest.
4024h, 3568m exdb-
----------------------------------
I guess that's quite clear. The last line is the prompt. Now, I have a trigger that should be matching it and calling a vbscript function called GetPrompt().
The problem is that that function is not called when the prompt is written, but right after a new line comes. Then it matches it and calls the function.
I've tried changing colors instead of calling functions, just in case, but there's the same problem.. the line doesn't change until something happens, like:
------------------------------------
[...]
You see exits leading north, southeast, south, and southwest.
4024h, 3568m exdb-
Occasional raindrops fall on your head as the drizzle continues.
4024h, 3568m exdb-
-------------------------------------
In this case, the first promt would call the function as soon as "Occasional raindrops..." appeared, and the second prompt would stay there, like waiting.
This is the trigger:
Pattern: ^(.*)h\, (.*)m (.*)\-$
Send: GetPrompt %1, %2
Send to: Script
Optiones checked: Enabled, Keep evaluating, Regular expression.
I haven't been really worrying about it because, even if it doesn't really call the function right after getting the prompt, usually something else comes in before one or two seconds, but I'm trying to tune all the whole system and this is becoming a bit annoying.
Maybe it has something to do with wrapping? Is the pattern wrong? Any ideas?
Thanks in advance!
Neijel. | Top |
|
Posted by
| Tsunami
USA (204 posts) Bio
|
Date
| Reply #1 on Wed 03 Aug 2005 08:33 PM (UTC) |
Message
| this is an old problem actually which has quite a history on these boards. anyways, whats happening is that the IRE mud you are playing is not sending a newline, but IAC EOR. in order to remedy this get the latest version of MC, 3.66 isn't it?, and use that.
then under world options you will find a nice little check box called 'convert IAC EOR to newline' or something like that. check that, and your triggers will begin to match prompt lines immediately as they come in.
what you will also notice is a lot of extra whitespace. what i do is just have a regex trigger '^$' set to gag which i turn on during combat so i don't have a lot of extra spam. hope that helps! | Top |
|
Posted by
| Neijel
(2 posts) Bio
|
Date
| Reply #2 on Thu 04 Aug 2005 06:18 AM (UTC) |
Message
| Thank you very much!
I already tried downloading the last version before asking, but I didn't check for new options, yep :-)
Thanks, really :-) | 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.
13,309 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top