Page 1 of 1

lastLine, lineBefore, and duplicate line "+" echo

PostPosted: Thu Feb 25, 2016 10:44 pm
by *juggleblood*
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("<maroon>+<reset>")
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.

Re: lastLine, lineBefore, and duplicate line "+" echo

PostPosted: Fri Feb 26, 2016 3:06 am
by Madigan
what's an example of when this would be handy?

Re: lastLine, lineBefore, and duplicate line "+" echo

PostPosted: Sat Feb 27, 2016 12:01 am
by *juggleblood*
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.