and if you want to specify after a certain number of times, all you need is to use a 'count' variable~attribute, an example:
<game name="blah">
// blah code lines
<attr name="choose_count" type="int">0</attr>
</game>
<command name="choose_command">
<pattern>choose</pattern>
<script>
choose_function
</script>
</command>
<function name="choose_function"><![CDATA[
if (game.choose_count = 5) {
msg ("sorry, you've reached the max you can do this thing")
} else {
// blah scripts for doing whatever you want to do
game.choose_count = game.choose_count + 1
}
</function>
you can also take a look at this code too:
viewtopic.php?f=5&t=4094&hilit=rock%2C+paper%2C+scissorsif you want to see how to allow the person playing the game, to select the max number of times for doing a scripting of~for something.