An option to evaluate incomplete lines.

Posted by Zet Hikari on Tue 06 Jun 2006 12:36 AM — 4 posts, 19,881 views.

USA #0
There should be an option for triggers that allows them to evaluate incomplete lines, for a trigger to stop evaluating a line at a character.

An example would be the prompt for Achaea, which does not end with a linefeed, and therefore cannot be accurately evaluated by triggers. But the prompt's last character, as far as triggers would be concerned at least, is a hyphen. Having a trigger that evalutates the 'incomplete' line up to the hyphen could prove useful.
Russia #1
There is already such an option (in a way) - the OnPluginPartialLine callback. It doesn't allow triggers to match on partial lines, but lets you get early access to them via scripting.

As for Achaean prompts... You can look at this plugin for a way to make triggers match on them: http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=6606.
Another way is to enable the "Convert EOR/GA to newline" option under World properties -> Appearance -> Output. The plugin is better though, since it doesn't leave extra newlines in the output, and cleans up those duplicate newlines that are sent by the MUD.
Amended on Tue 06 Jun 2006 01:56 AM by Ked
USA #2
The problem I have is that I lack the coding skills to create a plugin, but I would like to be able to make a trigger that can remove the prompt and make a status window from it.
Russia #3
You can just install the plugin the link to which I posted and match normal triggers on your prompts. The plugin terminates the prompts with newlines before triggers get to them, so your triggers will match without problems.