Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Target Highlighting in Mudlet

EdonEdon Member Posts: 7
I have a base target alias, but I am trying to get mudlet to highlight every instance of that variable in red, or anything really.

How would that look?

My target alias coding looks like:
target = matches[2]:title()
send("rt Targeting: "..target.."")

Just trying to make the 'target' noticeable amongst room description and other mobs.

thanks in advance!

Comments

  • AxrothAxroth Member Posts: 1
    Try this one:

    if id then killTrigger(id) end
    id = tempTrigger(target, function() selectString(target, 1) fg("red") deselect() resetFormat() end)
    Edon
  • EoghanEoghan Member, Immortal Posts: 935 mod
    edited August 2018
    Or this case-insensitive version:

    if targethighlight then killTrigger(targethighlight) end
    targethighlight = tempRegexTrigger("(?i)("..target..")", [[selectString(matches[2], 1) fg("red") resetFormat()]])
    Like what we're doing? Why not take a second to vote? Vote for Imperian at http://www.imperian.com/vote
    AxrothEdon
Sign In or Register to comment.