IRE Muds prompt subbing

Posted by Aznvt33 on Tue 24 Jul 2007 05:31 PM — 11 posts, 39,168 views.

#0
If you're unfamiliar with IRE muds, their prompts generally look like this:

1234h, 1234m, 12345e, 12345w ex-

The "e" at the end is for equilibrium, while the "x" is for balance. When you don't have either one, it disappears, and looks something like this:

1234h, 1234m, 12345e, 12345w e-
OR
1234h, 1234m, 12345e, 12345w x-
OR
1234h, 1234m, 12345e, 12345w -

Which is kinda annoying. I'd rather the "ex-" stay, but have the letters turn red if you're off balance. How could I do that?
USA #1
Gag the prompt entirely and reprint it using world.AnsiNote with whatever formatting, etc, you'd like.
#2
Would that work if I have other stuff that triggers off my prompt?
USA #3
Everything triggers off the prompt as normal, then the prompt is erased, then everything is written to the output window. I have some lines that match 3-4 triggers and get erased without interfering with each other.
#4
Okay I've written the trigger which works, except it won't omit the prompt coming in from the MUD. I have it sending to script after omit, and checked the omit from output box, but I dunno why it doesn't work? Here's the trigger:


<triggers>
  <trigger
   enabled="y"
   match="^(?P&lt;h&gt;\d+)h, (?P&lt;m&gt;\d+)m(?:, (?P&lt;e&gt;\d+)e|)(?:, (?P&lt;w&gt;\d+)w|) (?P&lt;str&gt;c?e?x?k?d?b?\@?)-(?P&lt;kai&gt;[+]{1,5}--)?$"
   omit_from_output="y"
   regexp="y"
   send_to="14"
   sequence="100"
  >
  <send>local a 
 a = string.match ("%5", "ex")
 if a == "ex" then
  AnsiNote (ANSI (32, 40), "%1h, %2m, %3e, %4w", ANSI (32, 1, 40), " %5-")
 end
 if a == nil then
  a = string.match ("%5", "x")
   if a == "x" then
  AnsiNote (ANSI (32, 40), "%1h, %2m, %3e, %4w", ANSI (31, 1, 40), " e", ANSI (32, 1, 40), "x-") 
  else
 a = string.match ("%5", "e")
   if a == "e" then
  AnsiNote (ANSI (32, 40), "%1h, %2m, %3e, %4w", ANSI (32, 1, 40), " e", ANSI (31, 1, 40), "x", ANSI (32, 1, 40), "-")
  end
 end
end
</send>
  </trigger>
</triggers>
USA #5
Is it printing the prompt coming in from the mud, and then the prompt you are printing out with AnsiNote?
Australia Forum Administrator #6
Your trigger seems to work for me, with only one line appearing. Maybe you have another trigger left in the trigger list from an earlier experiment?
#7
It actually prints the ANSI prompt before the prompt coming in from the MUD, which I thought was weird...
Amended on Thu 26 Jul 2007 02:29 PM by Aznvt33
Australia Forum Administrator #8
Is that the next prompt? Triggers are only processed on a newline, so the most recent one will stay there until something else arrives. You need to to force a linefeed somehow (see the MUSHclient FAQ). You may be able to configure the MUD to do that.
Netherlands #9
"Convert IAC/EOR GA to newline" is what you are after. That's what IRE muds use.
#10
ah yea, thanks. I thought I had already checked it.

EDIT: Nevermind I did already have it checked.