Hmm. Few issues here. First off.. getRecentLines returns a 'block' of lines, so you are trying to compare an array with a string. This probably won't work. You need something more like:
for each Teststr in WorldReply
if Teststr like "..." then
...
end if
next
Second problem.. This isn't zMud, in zMud scripts are processed parallel to the input/output of the client. What do I mean by this? Example:
Mud lines Script
--------- ------
Fred says: ... line 1 (trigger on Fred)
You say: ... line 2
line 3
line 1 (timer)
Fred says: ... line 2 (timer) + line 1 (trigger on Fred)
line 2
You say: ... line 3
The lines being executed above could be anything, from any trigger, alias, timer, etc., or even several at the same time. The point is that scripts run continuously as needed. In Mushclient it works like this:
Mud lines Script
--------- ------
Fred says: ... line 1 (trigger on Fred)
line 2
line 3
You say: ...
line 1 (timer)
line 2
Fred says: ... line 1 (trigger on Fred)
line 2
line 3
New input from you *or* the mud cannot be accepted in Mushclient until 'after' the script finishes. So Even though VBScript and others provide things like 'do until', they should always be avoided, unless they are being used to process something you are 100% sure will never loop endlessly. In your case it will loop endlessly, since this happens:
1. Script called.
2. Script retrieves last 3 lines.
3. There are no lines to retrieve.
4. Tests with 'like' and fails to exit.
5. Tries to retrieve the last 3 lines again.
6. Since the script is active and no lines *can* be recieved while it is active, the array is still empty.
7. Repeat steps 4-7.
Needless to say, this isn't going to work. What you need to do instead is use a trigger that matches on all lines to call the script, then test that line with a simple if-then, or one of the callbacks like OnPluginLineRecieved, where it makes sense to employ the getRecentLines function. But in that case you still need to change the method to a 'for each'.
I am sure Nick can give a better explaination as to why scripts don't run parallel to the input/output. I believe it has something to do with the use of the external script engine, instead of a built in one. With a built in one you have more flexibility, but you have to have a fairly complex system to handle execution, not unlike what muds themselves employ to handle mob programs and user commands. Like such mud systems, it is prone to error though, since unexpected delays in execution and unintended interactions are possible. Nor are such interactions always consistent. Personally, I think that 'some' parallel scripting, for cases like what you tried or a few other situations, like trying to use Windows Internet Controls to read in a web page, without IE. Some situations have unknown delay times or require loops, both of which badly lag or just plain hung the client. However, in most cases, like what you are trying to do, there is a way around it and the result is usually more reliable.