An IRE mud, getting a two-line attack input.
Like this:
Someone brings a blackened warhammer bearing fangs before his face, as a corona
of light begins emanating from within.
I would like to capture this as a single trigger, do my logic and then replace it with my own string.
Im not fully sure how to attach the second line to the first. And in IRE muds can I be sure that
the attack text breaks at the same place always or is it dependent on the name length or weapon name length for example.
Capturing and subsituting 2 lines together
Re: Capturing and subsituting 2 lines together
The length of it, and the break point, are both dependant on the weapon name. Since it is an IRE mud, there are two ways that are obvious to me that could solve this problem.timoomit wrote:An IRE mud, getting a two-line attack input.
Like this:
Someone brings a blackened warhammer bearing fangs before his face, as a corona
of light begins emanating from within.
I would like to capture this as a single trigger, do my logic and then replace it with my own string.
Im not fully sure how to attach the second line to the first. And in IRE muds can I be sure that
the attack text breaks at the same place always or is it dependent on the name length or weapon name length for example.
1: Use a trigger that uses regex to match the first part of the line. For example:
This would match it for most weapon names(anything which pushes face, down onto the next line would break it).^\w+ brings a .*+ before (?:his|her) face, .*+$
2: Within every IRE mud, there is a config option that would send the whole string in a single line(depending on the client, it may not display as a single line, but it will be matched as one). If memory serves, it is CONFIG WRAPWIDTH <0-*>, with 0 being no wrapping due to width by the game. If you do this, you could easily just use the regex:
^\w+ brings a .*+ before (?:his|her) face\, as a corona of light begins emanating from within\.$
Re: Capturing and subsituting 2 lines together
The last time I started a character on Imperian they didn't have an option to disable wrapping (which was frustrating enough that I just lost interest and went back to another game after a few hours)
Re: Capturing and subsituting 2 lines together
Hmm. Just checked, and CONFIG WRAPWIDTH 0 does work on Imperian(in fact, if memory serves, I believe it is a requirement for IMTS, which has been around for more than a few years).tsuujin wrote:The last time I started a character on Imperian they didn't have an option to disable wrapping (which was frustrating enough that I just lost interest and went back to another game after a few hours)
Re: Capturing and subsituting 2 lines together
Cannot seem to find the config on midkemiaonline though.
Re: Capturing and subsituting 2 lines together
It seems they changed it on MKO. Try using CONFIG SCREENWIDTH 0timoomit wrote:Cannot seem to find the config on midkemiaonline though.