The scripts can be extremely simple. In pseudocode a script looks like this:
{{Code|Code=<pre>
if (condition)
exit 1
exit 0
end
}}</pre>
For a collection of scripts, please see this thread: http://forums.amahi.org/viewtopic.php?f=15&t=3320&p=16486#p16486