Priority of attack

This place is for Closed bug reports only. NOT for asking help!

Moderators: Moderators, Developers

Click
Human
Human
Posts: 39
Joined: 15 Apr 2008, 06:08
Noob?: Yes
Location: Russia, Velikiy Novgorod

Priority of attack

#1 Post by Click »

original theme http://rofan.ru/viewtopic.php?t=4860&po ... c&start=30
bad work $config{attackChangeTarget}
Attacking: Monster Condor (1)
[ 86/100] You attack Monster Condor (1) - Dmg: 37 (delay 61.6)
[ 86/100] Monster Condor (1) attacks you - Dmg: 3 (delay 64.8)
[ 86/100] Monster Condor (0) attacks you - Dmg: 5 (delay 64.8)
Target died
Attacking: Monster Willow (3)
[ 72/100] Monster Fabre (2) attacks you - Dmg: 1 (delay 67.2)
[ 72/100] Monster Condor (0) attacks you - Dmg: 5 (delay 45.4)
[ 86/100] You attack Monster Willow (3) - Dmg: 22 (delay 61.6)
Target died
[ 71/100] Monster Condor (0) attacks you - Dmg: 5 (delay 45.4)
[ 64/100] Monster Fabre (2) attacks you - Dmg: Miss! (delay 67.2)
Attacking: Monster Roda frog (5)
[ 64/100] Monster Condor (0) attacks you - Dmg: Miss!! (delay 45.4)
[ 88/100] Monster Fabre (2) attacks you - Dmg: Miss! (delay 67.2)
[ 84/100] You attack Monster Roda frog (5) - Dmg: 38 (delay 61.6)
[ 79/100] Monster Roda frog (5) attacks you - Dmg: 4 (delay 81.6)
Target died
[ 76/100] Monster Condor (0) attacks you - Dmg: Miss! (delay 45.4)
[ 75/100] Monster Fabre (2) attacks you - Dmg: 1 (delay 67.2)
Calculating random route to: Training Ground(new_3-3): 118, 51
Attacking: Monster Super Picky (6)
[ 71/100] Monster Condor (0) attacks you - Dmg: 4 (delay 45.4)
[ 66/100] Monster Fabre (2) attacks you - Dmg: 1 (delay 67.2)
[ 77/100] You attack Monster Super Picky (6) - Dmg: 21 (delay 61.6)
[ 73/100] Monster Super Picky (6) attacks you - Dmg: 1 (delay 28.8)
[Jun 11 11:58:39 2008.64] Attacking: Monster Fabre (13)
[Jun 11 11:58:40 2008.13] [ 57/100] Monster Condor (4) attacks you - Dmg: Miss! (delay 64.8)
[Jun 11 11:58:40 2008.19] Monster Condor (6) is casting Wind Attack on you (time 500ms)
[Jun 11 11:58:40 2008.57] [ 57/100] Monster Condor (3) attacks you - Dmg: Miss! (delay 64.8)
[Jun 11 11:58:40 2008.63] [ 57/100] Monster Condor (5) attacks you - Dmg: 6 (delay 64.8)
[Jun 11 11:58:40 2008.69] [ 57/100] Monster Condor (6) uses Wind Attack (lvl 3) on you - Dmg: Miss! (delay 64.8)
[Jun 11 11:58:40 2008.94] [ 57/100] Monster Condor (6) attacks you - Dmg: Miss! (delay 64.8)
[Jun 11 11:58:41 2008.26] [ 57/100] Monster Condor (4) attacks you - Dmg: Miss! (delay 64.8)
[Jun 11 11:58:41 2008.76] [ 55/100] Monster Condor (3) attacks you - Dmg: Miss! (delay 64.8)
[Jun 11 11:58:41 2008.82] [ 55/100] Monster Condor (5) attacks you - Dmg: Miss! (delay 64.8)
[Jun 11 11:58:42 2008.13] [ 55/100] Monster Condor (6) attacks you - Dmg: Miss! (delay 64.8)
[Jun 11 11:58:42 2008.38] [ 55/100] Monster Condor (4) attacks you - Dmg: Miss! (delay 64.8)
[Jun 11 11:58:42 2008.88] [ 55/100] Monster Condor (3) attacks you - Dmg: Miss! (delay 64.8)
[Jun 11 11:58:42 2008.95] [ 55/100] Monster Condor (5) attacks you - Dmg: Miss! (delay 64.8)
[Jun 11 11:58:43 2008.13] [ 55/100] You attack Monster Fabre (13) - Dmg: 32 (delay 33)
[Jun 11 11:58:43 2008.32] [ 55/100] Monster Condor (6) attacks you - Dmg: Miss! (delay 64.8)
[Jun 11 11:58:43 2008.45] [ 55/100] Monster Fabre (13) attacks you - Dmg: Miss! (delay 67.2)
[Jun 11 11:58:43 2008.57] Monster Condor (4) is casting Adrenaline Rush on itself (time 1500ms)
[Jun 11 11:58:43 2008.82] [ 55/100] You attack Monster Fabre (13) - Dmg: 28 (delay 33)
[Jun 11 11:58:44 2008.12] [ 55/100] Monster Fabre (1) attacks you - Dmg: Miss! (delay 67.2)
[Jun 11 11:58:44 2008.72] [ 55/100] Monster Condor (3) attacks you - Dmg: Miss! (delay 64.8)
[Jun 11 11:58:44 2008.13] [ 55/100] Monster Condor (5) attacks you - Dmg: Miss! (delay 64.8)
[Jun 11 11:58:44 2008.38] [ 55/100] Monster Condor (6) attacks you - Dmg: Miss! (delay 64.8)
[Jun 11 11:58:44 2008.44] [ 55/100] You attack Monster Fabre (13) - Dmg: 39 (delay 33)
[Jun 11 11:58:44 2008.76] Exp gained: 3/2 (0.16%/0.38%)
[Jun 11 11:58:44 2008.77] Target died
[Jun 11 11:58:45 2008.74] Monster Condor (4) uses Adrenaline Rush on itself : Lv 1
[Jun 11 11:58:45 2008.19] [ 56/100] Monster Condor (3) attacks you - Dmg: Miss! (delay 64.8)
[Jun 11 11:58:45 2008.20] Monster Condor (5) is casting Wind Attack on you (time 500ms)
[Jun 11 11:58:45 2008.27] Attacking: Monster Lunatic (8)
[Jun 11 11:58:45 2008.50] [ 56/100] Monster Condor (4) attacks you - Dmg: Miss! (delay 45.3)
[Jun 11 11:58:45 2008.57] [ 56/100] Monster Condor (6) attacks you - Dmg: 6 (delay 64.8)
[Jun 11 11:58:45 2008.69] [ 56/100] Monster Fabre (1) attacks you - Dmg: Miss! (delay 67.2)
[Jun 11 11:58:45 2008.70] [ 56/100] Monster Condor (5) uses Wind Attack (lvl 3) on you - Dmg: Miss! (delay 64.8)
if change misc.pm

Code: Select all

            } elsif ($config{attackChangeTarget}) { 
               warning TF("Check change Target %s %s %s\n",AI::action,AI::action(1),AI::action(2)); 

               if ($config{attackChangeTarget} && ((AI::action eq "route" && AI::action(1) eq "attack") || (AI::action eq "move" && AI::action(2) eq "attack"))) { 
               warning TF("Check change Target %d %d \n",AI::args->{attackID},$ID1);                
               if (AI::args->{attackID} && AI::args()->{attackID} ne $ID1) {
then
[Jun 11 13:34:41 2008.74] [attacked] [100/100] Monster Wolf (2) attacks you - Dmg: 1 (delay 50.4)
[Jun 11 13:34:42 2008.30] [console] Attacking: Monster Roda frog (4)
[Jun 11 13:34:42 2008.80] [console] Check change Target route attack
[Jun 11 13:34:42 2008.81] [console] Check change Target 0 0
$args->{attackID} == undef always?
hakore
Super Moderators
Super Moderators
Posts: 200
Joined: 16 May 2008, 08:28
Noob?: No

Re: Priority of attack

#2 Post by hakore »

Nope, it's not undef. You just didn't unpack it correctly.

Since IDs are packed long integers, you cannot display them correctly as strings unless you use the unpack function, like so:

Code: Select all

my $stringID = unpack('V', $ID1);
Also, can you please post the Openkore version used and the relative attack config and mon_control entries? I cannot deduce the problem lies solely on attackChangeTarget code.
Whatever...
DInvalid
Noob
Noob
Posts: 2
Joined: 22 Jun 2008, 05:23
Noob?: No

Re: Priority of attack

#3 Post by DInvalid »

hakore wrote:Also, can you please post the Openkore version used and the relative attack config and mon_control entries? I cannot deduce the problem lies solely on attackChangeTarget code.
Hi.
This problem was mine.
OK version was 6317 and 6343.
mon_control file didn't change at all
attack config is

Code: Select all

attackAuto 2
attackAuto_party 0
attackAuto_onlyWhenSafe 0
attackAuto_followTarget 1
attackAuto_inLockOnly 1
attackDistance 1.5
attackDistanceAuto 0
attackMaxDistance 2.5
attackMaxRouteDistance 100
attackMaxRouteTime 4
attackMinPlayerDistance 2
attackMinPortalDistance 4
attackUseWeapon 1
attackNoGiveup 0
attackCanSnipe 0
attackCheckLOS 0
attackLooters 0
attackChangeTarget 1
aggressiveAntiKS 0

And, now i see that problem is in "sub processAutoAttack", there clean monster was add to
@aggressives.

Thx.
hakore
Super Moderators
Super Moderators
Posts: 200
Joined: 16 May 2008, 08:28
Noob?: No

Re: Priority of attack

#4 Post by hakore »

Yeah, the attack AI was a bit screwed. I already fixed some parts a few days ago, like the clean monsters thingy and the unnecessary check for attackMaxDistance. The latest SVN should work more properly now.

I still am looking at the codes to fix problems with attackCheckLOS. For now, notice that your bot will always check LOS even when attackCheckLOS is set to 0. I'm working on it right now.

Thanks.
Whatever...
hakore
Super Moderators
Super Moderators
Posts: 200
Joined: 16 May 2008, 08:28
Noob?: No

Re: Priority of attack

#5 Post by hakore »

attack AI is fixed now. Please update SVN (Revision 6428)
Whatever...
User avatar
kLabMouse
Administrator
Administrator
Posts: 1301
Joined: 24 Apr 2008, 12:02

Re: Priority of attack

#6 Post by kLabMouse »

Fixed.
Closed.