Ok, there are a couple problems w/ that snippet.
1: Very short alien names might mess it up. Short trader names definately will because of the cutText. It needs fixed for that.
2: As a general rule "EP says this command is faster" isn't always true. Much depends on how a command is implemented and what parameters are passed. Let's actually speed test it ourselves so we know for sure?
When I did a side by side comparison of your code to mine I got...
Yours: Milliseconds per execution: 0.0531
Mine: Milliseconds per execution: 0.0491
Maybe you can speed yours up, I don't know. I can probably speed mine up, too. I haven't messed with it for well over a year so it's a bit outdated there. IIRC some of getText was changed in 2.04, so perhaps getText was much slower in 2.03 than it is now... I don't know about that. But I encourage you to speed test the resultant code yourself and see.
I'll work a bit on the problem today and see if I can get something that beats both. When we get this fast it's a bit tricky since wierd randomy factors can swing things .01 either direction.
Edit:
Ok, dinked around a bit and came up with this. Speed tested it at .0416 over 100000 trials, which is about as fast as I think I'm going to get this.
Code:
getWord CURRENTANSILINE $alien_check 6
getWordPos $alien_check $apos #27 & "[1;36m" & #27 & "["
if ($apos > 0)
echo "*ALIEN!!**"
else
echo "*TRADER!**"
end
Didn't even need a getText or cutText there at all.
Edit:
BAH! I beat it already. Put new code over on the alien filter discussion thread.