When evaluating expressions you should NOT expand variables and you should quote strings. The reason it's not working is because it's treating Regeneration as an unparseable token (eg. a variable name which doesn't exist) and comparing it with an expanded string token.
The correct syntax would be:
[...snip...]DO; FOREACH(effects); IF((EFFECTNAME = "Regeneration") && (EFFECTTIME < 6)); LOG("%EFFECTNAME% Left: %EFFECTTIME% Seconds!"); ENDIF; NEXT; WAIT(1); LOOP;
I have used...
IFMATCHES(%CHATCLEAN%,"^\string_to_search_for\s)...in a chatfilter script to search for certain patterns. I know Joel7050's script doesn't require RegEx, but given the speed at which RegEx typically returns a match, I was just wondering which method is more efficient?