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
➜ Prompt Woes
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Kairuni
(8 posts) Bio
|
Date
| Mon 30 Aug 2010 09:41 AM (UTC) Amended on Mon 30 Aug 2010 09:14 PM (UTC) by Kairuni
|
Message
| Been trying to help out someone who's blind with an interesting problem that they're having with their screenreader, for the past few days.
Without 'Convert IAC EOR/GA to new line' checked while playing IRE MUDs (Achaea/etc), the prompt line is not parsed for trigger matches until the next line comes in.
He has been using this to gag the prompt, but still have it at the bottom of the output so he can check his health, mana, endurance, and willpower.
Unfortunately, with how the IRE MUDs work, you often want to pull data from the prompt, and the difference between the time his triggers can pull data from the prompt and the time it takes him to hear his health can fairly easily get him killed.
DeleteLines cannot be called from a plugin callback, else I would simply delete a line if the prompt was the most recently displayed when one is received, or a packet is received, and using DeleteLines when you receive a line just deletes that line, not the one before it.
Goal is to keep the prompt at the bottom, but still allow it to be used for scripting purposes.
Any ideas? | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #1 on Mon 30 Aug 2010 10:10 AM (UTC) |
Message
| Well first I would enable the EOR/GA stuff. That way the trigger matches.
Second I would have some sort of trigger that matches the prompt, and simply reads out when the health changes (based on what it was before). Eg. "gained 5 hp" |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Worstje
Netherlands (899 posts) Bio
|
Date
| Reply #2 on Mon 30 Aug 2010 11:14 AM (UTC) Amended on Mon 30 Aug 2010 11:16 AM (UTC) by Worstje
|
Message
| Edit: Note to self - read the full topic instead of briefly skimming it. Still, it might be of some use.
I wrote a plugin for this same problem ages ago, be it for Aetolia.
It assumes prompts start out like H:1234 M:567. Assuming prompts are the same, you should be able to use it without a problem, but if they are not, you might want to change the trigger inside the plugin to match your prompt. If you do not know how to, feel free to ask here.
 |
To save and install the PromptFix plugin do this:
- Copy between the lines below (to the Clipboard)
- Open a text editor (such as Notepad) and paste the plugin into it
- Save to disk on your PC, preferably in your plugins directory, as PromptFix.xml
- Go to the MUSHclient File menu -> Plugins
- Click "Add"
- Choose the file PromptFix.xml (which you just saved in step 3) as a plugin
- Click "Close"
|
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<muclient>
<plugin
name="PromptFix"
author="Worstje"
id="2d63e3c55b2caec463c4e891"
language="Lua"
purpose="Fixing blank lines directly after a prompt."
save_state="y"
date_written="2007-02-28 21:34:19"
requires="3.70"
version="1.0"
>
<description trim="y">
<![CDATA[
While the Configuration, Output, "Convert IAC EOR/GA to new line" setting makes
it possible to trigger on the prompt in MUSHclient, it also creates extra blank
lines as a by-product. This plugin fixes that.
Note: The option "Regular Expressions can match on an empty string", which can
be found under the "Global Preferences" General tab needs to be checked for
this plugin to work.
]]>
</description>
</plugin>
<triggers>
<trigger
enabled="y"
keep_evaluating="y"
match="^H\:([0-9]+) M\:([0-9]+) "
regexp="y"
script="GotPrompt"
sequence="0"
>
</trigger>
<trigger
keep_evaluating="y"
match=".*"
name="got_other_line"
regexp="y"
script="GotOtherLine"
group="prompt_cleanup"
sequence="2"
>
</trigger>
<trigger
match="^$"
name="empty_line"
omit_from_output="y"
regexp="y"
script="GotEmptyLine"
group="prompt_cleanup"
sequence="1"
>
</trigger>
</triggers>
<!-- Script -->
<script>
<![CDATA[
function GotPrompt(name, line, wildcs)
world.EnableTriggerGroup("prompt_cleanup", 1)
end
function GotEmptyLine(name, line, wildcs)
world.EnableTriggerGroup("prompt_cleanup", 0)
end -- GotEmptyLine
function GotOtherLine(name, line, wildcs)
world.EnableTriggerGroup("prompt_cleanup", 0)
end -- GotOtherLine
]]>
</script>
</muclient>
| 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.
12,985 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top