kolton / d2bot-with-kolbot

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

How to get bot to skip "Dark Archers" in the pit? #1752

Open Tannerd00 opened 5 years ago

Tannerd00 commented 5 years ago

My infinity takes off lite immune so my bot attacks them but sometimes they will make my bot chicken because I still do too little damage to them. I want to skip the archer packs but keep the same place to farm. Thanks!

CinderLordTurtle commented 5 years ago

Change the variable maxres = 100; on line 1472 to 80 or less. Ennemies that have more that maxres will be considered as immune. Changing it to 80 will make your bot skip those having above 80% resist. Infinity is calculated within so don't worry.

d2bs\kolbot\libs\common\Attack.js line 1462 - 1473

...
    // Check if a monster is immune to specified attack type
    checkResist: function (unit, val, maxres) {
        // Ignore player resistances
        if (unit.type === 0) {
            return true;
        }

        var damageType = typeof val === "number" ? this.getSkillElement(val) : val;

        if (maxres === undefined) {
            maxres = 100; // change it to 80
        }
...