<?xml version="1.0" encoding="utf-8"?>
<s1 title="Repeat"><table><strong class="highlight"><![CDATA[]]></strong><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Usage: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>repeat [optional # of times] </p>
</td></tr><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Example: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>repeat<br/>
repeat 5 </p>
</td></tr></table><p>The repeat command will simply repeat the previous line of script the specified number of times. No parameter, or a parameter of 0 (ie - repeat 0), will repeat the previous line indefinitely. </p>
<ul><li><source><![CDATA[//================================
// Attack 2 targets, then upgrade
// your cottages first, followed
// by your barracks
//================================
attack 245,325 Bubba arch:25000,warr:25000,t:1000
attack 222,324 any t:400,b:400
upgrade cottage
repeat 12
upgrade barrack
repeat 12

//================================
// Upgrade all of your buildings
// and resource fields to level 9:
//================================
upgrade
repeat]]></source></li>
</ul>
<p></p>

<br/>------------------------------------------------------------------------------<br/>
<p> </p>

<br/>------------------------------------------------------------------------------<br/>
<p> <jump href="/wiki/ScriptControlStructures">ScriptControlStructures</jump> </p>
</s1>