↓ Skip to main content

lastLine, lineBefore, and duplicate line "+" echo

·128 words·1 min

Here’s a simple one that I like.

Define these vars in your definitions script:

lastLine=lastLine or ""

lineBefore=lineBefore or ""

Then make a new trigger and name it LAST LINE TRIGGER, or wutever

regex trigger:

(^[A-Z].*)

block:

if matches[2]==lastLine then

selectCurrentLine()

deleteLine()

cecho("+")

end

lineBefore=lastLine

lastLine=matches[2]


Now anytime you get a duplicate line from the mud, it will be deleted, and a maroon + will appear at the end of the preceeding line. Also now you can access the var lineBefore in your scripts which can be handy.

what’s an example of when this would be handy?

You could add a check to the xp updater for example to see what lastLine is and you could track averages on the xp that your strikes or blasts were doing.