Old AI From youtube but his link is dead.
so all credit to him. I hope it is still usefull.
<rules>
<rule name="Stopped Enemy = Counter">
<conditions>
<condition name="target_state" state="stop"/>
</conditions>
<pattern>
<param_decl/>
<sequence>
<cmd name="prepare_skill" pet_skill="counter" try_cnt="1" timeout="0"/>
</sequence>
</pattern>
<event name="now_targeting"/>
</rule>
<rule name="Counter after Smash">
<conditions/>
<pattern>
<param_decl/>
<sequence>
<cmd name="prepare_skill" pet_skill="counter" try_cnt="0" timeout="0"/>
</sequence>
</pattern>
<event name="attack" pet_attackable_skill="smash" down="true"/>
</rule>
<rule name="Counter after N">
<conditions>
<condition name="target_state" state="shoved"/>
</conditions>
<pattern>
<param_decl/>
<sequence>
<cmd name="prepare_skill" pet_skill="counter" try_cnt="0" timeout="0"/>
</sequence>
</pattern>
<event name="attack" pet_attackable_skill="basic" down="false"/>
</rule>
<rule name="Counter after N KD">
<conditions/>
<pattern>
<param_decl/>
<sequence>
<cmd name="prepare_skill" pet_skill="counter" try_cnt="0" timeout="0"/>
</sequence>
</pattern>
<event name="attack" pet_attackable_skill="basic" down="true"/>
</rule>
<rule name="Smash after Counter">
<conditions/>
<pattern>
<param_decl/>
<sequence>
<cmd name="prepare_skill" pet_skill="smash" try_cnt="0" timeout="0"/>
<cmd name="melee_attack" timeout="5000"/>
</sequence>
</pattern>
<event name="attack" pet_attackable_skill="counter" down="true"/>
</rule>
<rule name="Rush N if enemy Casts">
<conditions/>
<pattern>
<param_decl/>
<sequence>
<cmd name="cancel_skill"/>
<cmd name="melee_attack" timeout="0"/>
</sequence>
</pattern>
<event name="target_magic_prepare"/>
</rule>
<rule name="Counter on hit">
<conditions/>
<pattern>
<param_decl/>
<sequence>
<cmd name="prepare_skill" pet_skill="counter" try_cnt="0" timeout="0"/>
</sequence>
</pattern>
<event name="attacked" master_skill="basic" down="false"/>
</rule>
<rule name="Counter if you can anytime">
<conditions>
<condition name="skill_preparable" pet_skill="counter"/>
</conditions>
<pattern>
<param_decl/>
<sequence>
<cmd name="prepare_skill" pet_skill="counter" try_cnt="0" timeout="0"/>
</sequence>
</pattern>
<event name="now_targeting"/>
</rule>
<rule name="Counter if alerted">
<conditions/>
<pattern>
<param_decl/>
<sequence>
<cmd name="prepare_skill" pet_skill="counter" try_cnt="0" timeout="0"/>
</sequence>
</pattern>
<event name="targeted" targeting_type="attack"/>
</rule>
<rule name="Free Act Stopper Rule">
<conditions/>
<pattern>
<param_decl/>
<sequence/>
</pattern>
<event name="now_targeting"/>
</rule>
</rules>