limited attackChangeTarget distance, how?

Forum closed. All further discussion to be discussed at https://github.com/OpenKore/

Moderator: Moderators

Message
Author
c4c1n6kr3m1
The Way Of Human
The Way Of Human
Posts: 150
Joined: 24 Mar 2012, 04:13
Noob?: Yes

limited attackChangeTarget distance, how?

#1 Post by c4c1n6kr3m1 »

Code: Select all

if (
	!($accountID eq $targetID ? $attackTarget->{dmgToYou} : $attackTarget->{dmgToPlayer}{$targetID})
	&& !($accountID eq $targetID ? $attackTarget->{dmgToYou} : $attackTarget->{dmgFromPlayer}{$targetID})
	&& distance($monster->{pos_to}, calcPosition($player)) <= $attackSeq->{attackMethod}{distance}
) {
what is $accountID? what is $targetID? what is the distance check for?
my situation is like this , i want to attack Gullinbursti, it has 5 savage slave.
but if savage attack my bot first, it will change target to savage. no, i don't want it to change target, because Gullinbursti only few steps left.( i have set Gullinbursti in priority.txt )
so i do not want attackChangeTarget work if my main target distance is less than 5.
how to check distance to main target?

Locked