How do I run a terminal command for different values
medbot is right that you should really do this as a shell script but since it's hard to do dialog boxes like in Applescript here's the answer:

display dialog "how many leafs?" default answer ""

set i to the text returned of result as integer
repeat while i &gt; 0
    tell application "Terminal"
        do script "cd /Users/xxx/zTree; wine explorer /desktop=" &amp; i &amp; ",640x480 zleaf.exe /language english /name lab" &amp; i
    end tell
set i to i - 1
end repeat