line is a special variable containing the whole current line in plain text being processed, selectString selects text in buffer and returns -1 if there is no more to select, setFgColor sets the color, resetFormat resets coloring.
Word/Name Highlighting triggers
Re: Word/Name Highlighting triggers
Whenever it find a name, it calls this function:
Re: Word/Name Highlighting triggers
Heiko,Heiko wrote:Rakon, do you honestly believe that I'll bother to answer any further questions of yours in the future if you behave like this? It's more than obvious that you've never ever tried out the package, let alone bothered to look into the script to find out how things are done yourself.Rakon wrote:That does nothing to answer any of my questions whatsoever.
I know that you , AND vadi both have packages with an enemy highlighter functionality. However, your script package appears to have the same issue I'm having in instance two. It highlights the word/enemy regardless of respecting a word boundary.
I asked a question in great detail about certain nuances of Mudlet. I gave examples, posted code, asked 'smart' questions, and even gave screen shots. I was redirected to a DEMO script with no explanation to any of my questions.
Do you think I'll ask any more questions, or assist others after getting responses like that??
THAT is extremely frustrating. I agree with tsuujin (and thank YOU for the code and well written post explaining), if you redirect to another script without answering the questions at hand, could you at least explain the script?? It's great if people want to use the pre-made packages, but for those of us trying to write our own code for Mudlet, UNDERSTANDING how/why Mudlet does something, is better than handing off code.
I've figured out enough through my own trial and error now to have MY enemy highlighter working the way I want, with all the provisions of my first post met except instance 1. I've come to accept that this is either a limitation, or bug in Mudlet (or my function) that does NOT highlight the word at the end of a line.
I honestly, don't know how I could've phrased my first post better in order to get a well thought out, proper response of an explanation for Mudlets behavior in the given situation. I am trying to be a useful contributor so that in case I DID run across a bug,it could be fixed.
In the future, I'll just ask if anyone has a script to do what I need instead.
- Alexander Divine
- Posts: 65
- Joined: Mon Dec 21, 2009 7:01 pm
Re: Word/Name Highlighting triggers
Well, I don't know if that's the best way to go about it, either. I would simply state that rather than wanting to look at a script, one learns better from building code onesself, step-by-step, and would much prefer to figure out how to implement a solution at each step.
Re: Word/Name Highlighting triggers
If you're talking about my highligher, then it's a feature not a bug that the last word on the line isn't highlighted. I forget the reason now though.