kolton / d2bot-with-kolbot

d2bot game manager by D3STROY3R with kolbot libs by kolton for d2bs
345 stars 332 forks source link

Telestomp Configuration #1129

Open smile025 opened 5 years ago

smile025 commented 5 years ago

Is there a way to configure it so that it won't start telestomping when there are bunch of other units around the immune? Even though i have it set up so that it won't prioritize the boss/champions, it still will try to telestomp when there are bunch of other units around and just get beaten to death. Thanks.

semirotta commented 5 years ago

Id like to know this aswell, quite often times the bot seems to ignore the trash or other enemies around the one elite, eventually ending up in the middle of the cluster f*ck and alost die.

expl0 commented 5 years ago

Add this to the very beginning of Attack.sortMonsters:

if (!Attack.canAttack(unitA)) {
    return 1;
}
if (!Attack.canAttack(unitB)){
    return -1;
}
semirotta commented 5 years ago

Didnt find where to add it -.-

expl0 commented 5 years ago

File location: d2bs.kolbot.libs.common.Attack.js Function: sortMonsters

The first few lines of code of function sortMonsters should look something like this after you added it:

sortMonsters: function (unitA, unitB) {
        if (!Attack.canAttack(unitA)) {
            return 1;
        }
        if (!Attack.canAttack(unitB)){
            return -1;
        }

               .
               .
               .
}
smile025 commented 5 years ago

thanks i'll try this out!