67298 Posts in 7232 Topics- by 12877 Members - Latest Member: boomboom0105123

Erinn Timer
Untitled Page
Time
Erinn Time 12:34
Local 56:78
Server 90:00
Moongate [ + / - ]
11:11 Tir Chonaill
12:22 Dunbarton
13:33 Emain Macha
14:44 Bangor
14:44 Emain Macha
16:66 Emain Macha

Ceo in days.

Price [ + / - ]
11:11 Tir Chonaill
12:22 Dunbarton
Rua [ + / - ]
11:11 Resting
12:22 Working

Welcome, Guest. Please login or register.
Sep 02, 2010, 02:36:30 PM

Login with username, password and session length
IRC Channel
Web Based: #mabinogi

Client Based: #mabinogi

Current Theme

Members
Total Members: 12877
Latest: boomboom0105123
Stats
Total Posts: 67298
Total Topics: 7232
Online Today: 110
Online Ever: 737
(Aug 11, 2008, 04:24:25 PM)
Users Online
Users: 6
Guests: 105
Total: 111
Livescreen
Google Ads
Pages: [1]   Go Down
  Print  
Author Topic: Better than Smart-Pet-O-Matic AI  (Read 2642 times)
Warrensworth
Old Milletian
*
Offline Offline

Supports:

Posts: 6


« on: Jul 30, 2009, 10:23:12 PM »

...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:
Code:
<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
« Last Edit: Jan 30, 2010, 12:06:39 AM by Warrensworth » Logged
Warrensworth
Old Milletian
*
Offline Offline

Supports:

Posts: 6


« Reply #1 on: Sep 17, 2009, 04:33:49 PM »

Bump, version 1.3 is up.

-Warrensworth, Mari Server
Logged
Drizzt
Iria Traveler
*****
Offline Offline

Supports:

Posts: 1322


Surrender now, or prepare to fight.


« Reply #2 on: Sep 18, 2009, 09:50:46 PM »

Thanks for posting this. I'm using it on my best pet in Alby INT for 1 right now. It works great!
Logged

Yoshiboy510
Guest
« Reply #3 on: Sep 23, 2009, 11:59:51 AM »

How do you put that in? Do I have to copy and paste it?

I would like to have it.

Edit: Nevermind. I got it.
« Last Edit: Sep 24, 2009, 08:10:18 AM by Caellian » Logged
Warrensworth
Old Milletian
*
Offline Offline

Supports:

Posts: 6


« Reply #4 on: Sep 28, 2009, 09:16:10 AM »

Thanks for posting this. I'm using it on my best pet in Alby INT for 1 right now. It works great!

No problem, thanks for using it :)
Logged
RC
Castle Guard
*
Offline Offline

Supports:

Posts: 699



« Reply #5 on: Sep 28, 2009, 12:13:08 PM »

I'll try it out next time I use a pet for combat. =)
Logged
Warrensworth
Old Milletian
*
Offline Offline

Supports:

Posts: 6


« Reply #6 on: Jan 30, 2010, 12:10:10 AM »

Version 1.4 is now up.
Logged
RC
Castle Guard
*
Offline Offline

Supports:

Posts: 699



« Reply #7 on: Feb 25, 2010, 08:52:33 PM »

Sorry for never getting back to you but I've been using this AI ever since that post, it's really great and has made my Mabi life a lot easier. Thankyou! =)
Logged
Warrensworth
Old Milletian
*
Offline Offline

Supports:

Posts: 6


« Reply #8 on: Feb 27, 2010, 12:38:25 AM »

Thanks! Glad it's served you well =)
Logged
Yuwyn
Tutorial Master
*
Offline Offline

Supports:

Posts: 32



« Reply #9 on: Mar 25, 2010, 10:33:41 PM »

Heheheh I named this custom AI after you in my window xD
Logged

Lvl 3XX atm :3

RC
Castle Guard
*
Offline Offline

Supports:

Posts: 699



« Reply #10 on: Mar 25, 2010, 10:47:09 PM »

Me too, I'll never forget your name, that's for sure.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to: