So, I tried to turn my hand to pet ais. It didn't turn out well.
See, I wanted a simple script that would let my jindo look for a fomor, smash it, defend, combo, defend and so on. Basically a attack-defend script. But it failed, and now everytime it succesfully defends a attack, it tries to smash the opponent. WHich I think is the fault of the first rule, but I don't know how to fix eet. Help?
[CODE]<rules>
<rule name="FInd">
<conditions/>
<pattern>
<param_decl/>
<sequence>
<cmd name="prepare_skill" pet_skill="smash" try_cnt="0" timeout="0"/>
</sequence>
</pattern>
<event name="seek_target"/>
</rule>
<rule name="Attack">
<conditions/>
<pattern>
<param_decl/>
<sequence>
<cmd name="melee_attack" timeout="5000"/>
</sequence>
</pattern>
<event name="now_targeting"/>
</rule>
<rule name="Use Defense">
<conditions>
<condition name="target_state" state="shoved"/>
</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="all" down="false"/>
</rule>
<rule name="Use Defense anyway">
<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="basic" down="true"/>
</rule>
<rule name="Attac kafter Defending">
<conditions/>
<pattern>
<param_decl/>
<sequence>
<cmd name="melee_attack" timeout="5000"/>
</sequence>
</pattern>
<event name="defence" defence_enable_skill="basic"/>
</rule>
<rule name="Attac kMagic">
<conditions/>
<pattern>
<param_decl/>
<sequence>
<cmd name="melee_attack" timeout="5000"/>
</sequence>
</pattern>
<event name="target_magic_prepare"/>
</rule>
<rule name="Attack Ranged">
<conditions/>
<pattern>
<param_decl/>
<sequence>
<cmd name="melee_attack" timeout="5000"/>
</sequence>
</pattern>
<event name="aimed"/>
</rule>
<rule name="Defend after being attacked">
<conditions/>
<pattern>
<param_decl/>
<sequence>
<cmd name="prepare_skill" pet_skill="defence" try_cnt="0" timeout="0"/>
</sequence>
</pattern>
<event name="attacked" master_skill="all" down="false"/>
</rule>
<rule name="Defend after being knocked down">
<conditions/>
<pattern>
<param_decl/>
<sequence>
<cmd name="prepare_skill" pet_skill="defence" try_cnt="0" timeout="0"/>
</sequence>
</pattern>
<event name="attacked" master_skill="all" down="true"/>
</rule>
<rule name="Smash a walker">
<conditions>
<condition name="target_state" state="walk"/>
</conditions>
<pattern>
<param_decl/>
<sequence>
<cmd name="prepare_skill" pet_skill="smash" try_cnt="0" timeout="0"/>
<cmd name="process_skill" target="enemy" timeout="0"/>
</sequence>
</pattern>
<event name="target_skill_prepare"/>
</rule>
</rules>
[/CODE]