...at least I think it's better than Smart-Pet-O-Matic, and that's not just because I wrote it ^_^
If you find a problem with this AI or know how it could be better, please let me know. I'd be happy to update!What does this AI do?- Auto-melees mobs on sight (it can usually clear a room of rats without owner intervention)
- Attack sequence goes melee-->counter-->defense-->repeat
- Proactively attacks probable defenders, mages, and ranged attackers
- Light team support for owner's ranged attacks
What doesn't this AI do?- Does not cancel its defense if the enemy is going to smash (the conditions to perform this behavior are either bugged or I haven't discovered it yet)
- Does not do any team attacks with owner's magic spells, and will not stop to heal you
- Does not drop counter skill when its enemy is defeated and no other enemy is in range to auto-attack (I suggest having your pet's "cancel skill" or "come!" command hot-keyed)
Warrensworth's Pet AI v1.3:Update-Warrensworth's Pet AI v1.4:
<rules>
<rule name="Initiate Basic Attack on Unaware Mob">
<conditions/>
<pattern>
<param_decl/>
<sequence>
<cmd name="cancel_skill"/>
<cmd name="melee_attack" timeout="5000"/>
</sequence>
</pattern>
<event name="seek_target"/>
</rule>
<rule name="Counter Follows Basic Attack (enemy knocked down)">
<conditions/>
<pattern>
<param_decl/>
<sequence>
<cmd name="prepare_skill" pet_skill="counter" timeout="0"/>
</sequence>
</pattern>
<event name="attack" pet_attackable_skill="basic" down="true"/>
</rule>
<rule name="Defense Follows Basic Attack (enemy knocked back)">
<conditions>
<condition name="target_state" state="blowaway"/>
<condition name="target_state" state="shoved"/>
</conditions>
<pattern>
<param_decl/>
<sequence>
<cmd name="prepare_skill" pet_skill="defence" timeout="0"/>
</sequence>
</pattern>
<event name="attack" pet_attackable_skill="basic" down="false"/>
</rule>
<rule name="Defense Follows Counter">
<conditions/>
<pattern>
<param_decl/>
<sequence>
<cmd name="prepare_skill" pet_skill="defence" timeout="0"/>
</sequence>
</pattern>
<event name="attack" pet_attackable_skill="counter" down="true"/>
</rule>
<rule name="Counter Follows Lightning (enemy stunned)">
<conditions/>
<pattern>
<param_decl/>
<sequence>
<cmd name="prepare_skill" pet_skill="counter" timeout="0"/>
</sequence>
</pattern>
<event name="attack" pet_attackable_skill="lightningbolt" down="false"/>
</rule>
<rule name="Counter Follows Lightning (enemy knocked down)">
<conditions/>
<pattern>
<param_decl/>
<sequence>
<cmd name="prepare_skill" pet_skill="counter" timeout="0"/>
</sequence>
</pattern>
<event name="attack" pet_attackable_skill="lightningbolt" down="true"/>
</rule>
<rule name="Counter Follows Ice (enemy stunned)">
<conditions/>
<pattern>
<param_decl/>
<sequence>
<cmd name="prepare_skill" pet_skill="counter" timeout="0"/>
</sequence>
</pattern>
<event name="attack" pet_attackable_skill="icebolt" down="false"/>
</rule>
<rule name="Counter Follows Ice (enemy knocked down)">
<conditions/>
<pattern>
<param_decl/>
<sequence>
<cmd name="prepare_skill" pet_skill="counter" timeout="0"/>
</sequence>
</pattern>
<event name="attack" pet_attackable_skill="icebolt" down="true"/>
</rule>
<rule name="Counter Follows Fire">
<conditions/>
<pattern>
<param_decl/>
<sequence>
<cmd name="prepare_skill" pet_skill="counter" timeout="0"/>
</sequence>
</pattern>
<event name="attack" pet_attackable_skill="firebolt" down="true"/>
</rule>
<rule name="Basic Attack After Pet Defends a Basic Attack">
<conditions/>
<pattern>
<param_decl/>
<sequence>
<cmd name="melee_attack" timeout="5000"/>
</sequence>
</pattern>
<event name="defence" defence_enable_skill="basic"/>
</rule>
<rule name="Counter Follows Smash">
<conditions/>
<pattern>
<param_decl/>
<sequence>
<cmd name="prepare_skill" pet_skill="counter" timeout="0"/>
</sequence>
</pattern>
<event name="attack" pet_attackable_skill="smash" down="true"/>
</rule>
<rule name="Punish Enemy Defense">
<conditions>
<condition name="target_state" state="walk"/>
</conditions>
<pattern>
<param_decl/>
<sequence>
<cmd name="cancel_skill" timeout="0"/>
<cmd name="prepare_skill" pet_skill="smash" timeout="0"/>
<cmd name="melee_attack" timeout="7000"/>
</sequence>
</pattern>
<event name="target_skill_prepare"/>
</rule>
<rule name="Punish Ranged Attacker">
<conditions/>
<pattern>
<param_decl/>
<sequence>
<cmd name="cancel_skill" timeout="0"/>
<cmd name="melee_attack" timeout="0"/>
</sequence>
</pattern>
<event name="aimed"/>
</rule>
<rule name="Punish Magic Attacker">
<conditions/>
<pattern>
<param_decl/>
<sequence>
<cmd name="cancel_skill" timeout="0"/>
<cmd name="melee_attack" timeout="0"/>
</sequence>
</pattern>
<event name="target_magic_prepare"/>
</rule>
<rule name="Rush Ranged Attacker (pet stunned)">
<conditions/>
<pattern>
<param_decl/>
<sequence>
<cmd name="melee_attack" timeout="0"/>
</sequence>
</pattern>
<event name="attacked" master_skill="ranged_attack" down="false"/>
</rule>
<rule name="Rush Ranged Attacker (pet down)">
<conditions/>
<pattern>
<param_decl/>
<sequence>
<cmd name="melee_attack" timeout="0"/>
</sequence>
</pattern>
<event name="attacked" master_skill="ranged_attack" down="true"/>
</rule>
<rule name="Rush Magnum Attacker (pet down)">
<conditions/>
<pattern>
<param_decl/>
<sequence>
<cmd name="prepare_skill" pet_skill="smash" timeout="0"/>
<cmd name="melee_attack" timeout="0"/>
</sequence>
</pattern>
<event name="attacked" master_skill="magnum_shot" down="true"/>
</rule>
<rule name="Pet Down, Use Counter">
<conditions/>
<pattern>
<param_decl/>
<sequence>
<cmd name="prepare_skill" pet_skill="counter" timeout="0"/>
</sequence>
</pattern>
<event name="attacked" master_skill="all" down="true"/>
</rule>
<rule name="Pet Stunned, Use Counter">
<conditions/>
<pattern>
<param_decl/>
<sequence>
<cmd name="prepare_skill" pet_skill="counter" timeout="0"/>
</sequence>
</pattern>
<event name="attacked" master_skill="all" down="false"/>
</rule>
<rule name="Enemy Aggros First, Use Counter">
<conditions/>
<pattern>
<param_decl/>
<sequence>
<cmd name="prepare_skill" pet_skill="counter" timeout="0"/>
</sequence>
</pattern>
<event name="targeted" targeting_type="attack"/>
</rule>
<rule name="Master's Ranged Attack Support">
<conditions/>
<pattern>
<param_decl/>
<sequence>
<cmd name="cancel_skill" timeout="0"/>
<cmd name="melee_attack" timeout="0"/>
</sequence>
</pattern>
<event name="master_attack" master_skill="ranged_attack"/>
</rule>
<rule name="Master's Magnum Shot Support">
<conditions/>
<pattern>
<param_decl/>
<sequence>
<cmd name="cancel_skill" timeout="0"/>
<cmd name="melee_attack" timeout="0"/>
</sequence>
</pattern>
<event name="master_attack" master_skill="magnum_shot"/>
</rule>
<rule name="Cancel Skill and Melee if Enemy Hit">
<conditions>
<condition name="target_state" state="shoved"/>
<condition name="target_state" state="blowaway"/>
</conditions>
<pattern>
<param_decl/>
<sequence>
<cmd name="cancel_skill" timeout="0"/>
<cmd name="melee_attack" timeout="0"/>
</sequence>
</pattern>
<event name="now_targeting"/>
</rule>
<rule name="When All Else Fails, Warrensworth Says Do Nothing v1.4">
<conditions/>
<pattern>
<param_decl/>
<sequence/>
</pattern>
<event name="now_targeting"/>
</rule>
</rules>
-
Warrensworth, Mari Server