<rules>
<rule name="enemy stop">
<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="smash->counter">
<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="attack(not down)->counter">
<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="attack(down)->counter">
<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="counter->diffence">
<conditions/>
<pattern>
<param_decl/>
<sequence>
<cmd name="prepare_skill" pet_skill="defence" try_cnt="0" timeout="0"/>
</sequence>
</pattern>
<event name="attack" pet_attackable_skill="counter" down="true"/>
</rule>
<rule name="deffence->attack">
<conditions/>
<pattern>
<param_decl/>
<sequence>
<cmd name="melee_attack" timeout="0"/>
</sequence>
</pattern>
<event name="defence" defence_enable_skill="basic"/>
</rule>
<rule name="For Arrow">
<conditions/>
<pattern>
<param_decl/>
<sequence>
<cmd name="cancel_skill"/>
<cmd name="melee_attack" timeout="0"/>
</sequence>
</pattern>
<event name="aimed"/>
</rule>
<rule name="For Magic">
<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="received attacked -> counter">
<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="received arrow -> attack">
<conditions/>
<pattern>
<param_decl/>
<sequence>
<cmd name="cancel_skill"/>
<cmd name="melee_attack" timeout="0"/>
</sequence>
</pattern>
<event name="attacked" master_skill="ranged_attack" down="false"/>
</rule>
<rule name="received magnam -> attack">
<conditions/>
<pattern>
<param_decl/>
<sequence>
<cmd name="cancel_skill"/>
<cmd name="melee_attack" timeout="0"/>
</sequence>
</pattern>
<event name="attacked" master_skill="magnum_shot" down="true"/>
</rule>
<rule name="counter2">
<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="ararm -> counter">
<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 activity prohibition">
<conditions/>
<pattern>
<param_decl/>
<sequence/>
</pattern>
<event name="now_targeting"/>
</rule>
</rules>
Copypasta. Basically will have the pet function effectively against most monsters, using various tactics mostly involving counter and the melee skills. Will rush archers, but propably not outrun ARers, will defeat most meleeing monsters besides extremely fast speed ones, or passive defensive ones, and therefor this is the AI I like best