The condition allows you to specify your own custom filter (on top of the event type and subtype selections) which determines when your script is run. When an event of the chosen type and one of the chosen subtypes occurs, it will be subjected to filtering by the condition you specify. If it passes that as well, your script will be run.
The condition must be a valid Java boolean expression. While it may sound a
bit scary at first, it is really quite easy - all you have to do is write down a
list of simple conditions, such as oppRating > 2000 or
gameResult.equals("win"), surround them with round brackets and then connect
them with either && or || strings, where &&
stands for "and" and || stands for "or".
Here are some examples so you see how easy it is:
(myTime > 10) || (oppRating >= 1800)
(sender.equals("AlexTheGreat")) && (message.equals("Hello"))
(oppRating > 2300) || (oppTitle.indexOf("GM") != -1)
indexOf. That function looks for the specified
string ("GM" in our case) inside the string it was called on (oppTitle in our
case) and returns the index of its first appearance. More importantly, if it
doesn't find the string "GM" inside oppTitle (in our example), it will
return -1. Thus what we are checking with oppTitle.indexOf("GM") != -1 is
basically that "GM" is a substring of the opponent's title, meaning that he is
a Grandmaster (On ICC and FICS, at least).
Finally, the two parts are connected with the "or" sign, meaning that the
whole expression will be true if at least one of the parts is true.
Note that if you don't specify a condition, a default condition which always evaluates to true will be generated for you (meaning that the script will always be run if an event of the proper type and subtype occurs).
A list and documentation of the variables (such as oppRating, myTime etc.) you can use when writing scripts for various event types/subtypes, is available here.
When you finish writing your script and click the "OK" button, Jin will try to test your condition by evaluating it with dummy values for the variables to make sure that it's valid. Since the variables it uses have dummy values, it may sometimes tell you that the condition is malformed even though it is ok. This should, however, happen very rarely, so make sure to check your condition again before going ahead and telling Jin to use it anyway.