Line prepending without reparse and oninput functions

Posted by Dontarion on Sun 10 Jul 2011 01:27 AM — 5 posts, 20,952 views.

USA #0
So I'm trying to work out two odd things right now.

A: I've tried hijacking the newish timestamp setup to add in prepending lines but I only want the prepend on the lines that come in after it's been changed. The easiest way to say this is can I SetAlphaOption("timestamp_input", string) without having the system reparse the entire buffer? If there is a better way then this then I'll certainly give it a try.

B: Is there a method so that I can trigger a function to go off whenever I send any input to the mud from the command prompt?
Australia Forum Administrator #1
I don't understand "A" - can you give an example?

As for "B", one of these should help:

http://www.gammon.com.au/scripts/doc.php?general=plugin_callbacks
USA #2
For A: Let's say someone is doing something that is going to kill me in a very spammy situation (large group raids in Achaea). One of the best ways to make sure I get this is to prepend lines with something saying "X BEHEADING." I tried hijacking the timestamp options but they go through and reparse the entire buffer, which isn't what I wanted to accomplish (Every single line says X BEHEADING prepended). I just want the lines that have a prepending text of say "X BEHEADING" to display "X BEHEADING" in a permanent manner and not on all lines if possible.

Going to tinker with the OnPluginCommandEntered functions. Looks great.
Australia Forum Administrator #3
How about this? ...

Template:post=9225
Please see the forum thread: http://gammon.com.au/forum/?id=9225.

USA #4
Oh good lord you just killed two birds with one stone.

Another thing I've been looking at is setting up popup windows like that which fade away fairly quickly for status updates like say you're getting destroyed.

Time to tinker with that. Thanks.