I am trying to make a trigger or series of triggers to to change color of a line depending on distance
So and so, is 1.2 miles to the east.
what i want to do is make a trigger to have that in green and if they come closer to say 1.0- .5 another color and .1 - .4 a different color wondering if this is possible at all.
Just In general, Try and make your forum topics a bit more descriptive, We assume that youll end up needing help/clarification/etc or are just feeling lonely if youre posting here. But it makes it a LOT easier to backreference (and search for) old topics (so we dont have to answer the same question eighteen times) years down the road if we have topics that actually describe the problem at hand.
If its only one decimal place, then you could easily do it without any coding at all, with three triggers.
Next time try and copy/paste exact examples from the mud. It'll make things much easier.
I'll assume there is no comma, since it doesnt seem to me like there should be.
First Trigger: (Change color to green, Regexp, Keep Evaluating, Sequence:100)
^(.*?) is (.*?) miles to the east\.$
Second Trigger (Change Color To Blue(?), Regexp, Keep Evaluating, Sequence:100):
^(.*?) is (1\.0|0\.[56789]) miles to the east\.$
Third Trigger (Change Color To Red, RegExp, Keep Evaluating, Sequence:100):
^(.*?) is (0\.[1234]) miles to the east\.$
You could do it with a script, I'll bet you can do some searching and find a script version of here (search the forums) since I seem to remember something like that in the past. But for something with that few things, this should do the trick. Of course, if you were only giving examples, and in reality you want something huge, then you might need a more complicated solution.
My bad. the exact thing that is displayed is
You see Bob to the east 1.60 miles away.
and using what you gave me, i couldn't figure it out hehe
First trigger, it needs to be sequence 99 or lower. (and make SURE keep evaluating is checked)
^You see (.*?) to the (east|west|north|south) (.*?) miles away\.$
Trigger2:
^You see (.*) to the (east|west|north|south) (1\.0|0\.[5-9][0-9]) miles away\.$
Trigger3:
^You see (.*) to the (east|west|north|south) (0\.[0-4][0-9]) miles away\.$
Reason trigger 1 is lower sequence, is because it will match on EVERYTHING (or rather, any distance), and change it, then if its a lower distance, it'll catch on either of the second two triggers, and change again (to the appropriate color).
Same flags apply for all of them, only change the triggers is the match text, and the sequence for the first.