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
➜ General
➜ Strange trigger with prompt behavior?
Strange trigger with prompt behavior?
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Accolades
(6 posts) Bio
|
Date
| Thu 18 Jul 2002 02:54 AM (UTC) |
Message
| Hey guys, I'm still on my quest to write code for my own external application for use with MUSHclient, although I've come across a strange occurance when setting up triggers.
The MUD I'm using for this is called "Act of War" It is your stereo-typical Diku-style MUD with those annoying prompts that flood your screen with your current HP/Mana/Movement, my goal is to code this into an external application so that I can get rid of the prompt. Unfortunately, when I try to Trigger on the prompt ( in this case lets just say <100hp 106mn 100mv> )
My trigger might look like <*hp*mn*mv> however, when I activate the trigger, it doesn't work as I expect. It DOES capture the prompt text I like, and it actually forces the prompt to act sort of like a prompt SHOULD act (ie. the prompt stays on the bottom of the output window instead of flooding it) I DO have "omit from output" selected, but something is very wrong. It's allowing the prompt to pass anyways. Any ideas on what might be going on here?
Thanks in advance
- Tim - | Top |
|
Posted by
| Magnum
Canada (580 posts) Bio
|
Date
| Reply #1 on Thu 18 Jul 2002 03:08 AM (UTC) |
Message
| Heh... I tried out a SMAUG based mud and found it way to spammy. I ended up quitting, which is too bad, because Realms of Despair is well established, and based in my home town (Toronto). Ah well... this is the script I wrote:
Sub Display_PromptLine (CallSource, OutputLine, arrWildcards)
Dim ColourStack
ColourStack = World.NoteColourFore
World.NoteColourFore = &h82004B
World.Note World.GetVariable("LastPrompt")
World.NoteColourFore = ColourStack
End Sub
Sub Grab_Prompt (CallSource, OutputLine, arrWildcards)
If World.GetVariable("LastPrompt") <> OutputLine Then
World.SetVariable "LastPrompt", OutputLine
Display_PromptLine "Grab_Prompt", OutputLine, arrWildcards
End If
End Sub
The two subroutines were designed so that I would World.Note the promptline only if there was a change. By gagging the actual prompt with a trigger, this greatly reduced the spam... I ended up with the effect your described, the most recent prompt "stuck" to the bottom of the screen.
This happens because an endline (LF) character is not sent after the prompt, so it doesn't get gagged until there is some kind of update. In my case, I purposely echoed a copy of the old promptline... in your case, there is probably some subtle difference in the line that has in not trip your trigger(s). |
Get my plugins here: http://www.magnumsworld.com/muds/
Constantly proving I don't know what I am doing...
Magnum. | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #2 on Thu 01 Aug 2002 01:00 AM (UTC) |
Message
|
Quote:
(ie. the prompt stays on the bottom of the output window instead of flooding it)
This will always happen, as the trigger fires when the newline character (\n) arrives, and it doesn't on a prompt line (because the cursor is after the prompt). Thus, the prompt is omitted after another line arrives. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | 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.
14,037 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top