kolton / d2bot-with-kolbot

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

New Curse config for Souls #2686

Open mtz33 opened 4 years ago

mtz33 commented 4 years ago

Dear all, I am looking for a way of casting diminish vision only for Souls. I tried config.custom attack but it's not working (Am i doing it well ?)

/* Advanced Attack config. Allows custom skills to be used on custom monsters.
     *  Format: "Monster Name": [timed skill id, untimed skill id]
     *  Multiple entries are separated by commas
     */
    Config.CustomAttack = {
        "BurningSoul, BlackSoul": [92, 71]
    };

(92 psn nova 71 dim vision)

I am no expert at all but from:


// Class specific config
    Config.Curse[0] = 87; // Boss curse. Use skill number or set to 0 to disable.
    Config.Curse[1] = 91; // Other monsters curse. Use skill number or set to 0 to disable.

Is it possible to edit the char config and necromancer.js and add a Config.Curse[2] = 71 dedicated to souls? I checked the code but it's chinese for me at this point. See below :


if (Config.Curse[0] > 0 && this.isCursable(unit) && (unit.spectype & 0x7) && !unit.getState(this.curseState[0])) {
            if (getDistance(me, unit) > 25 || checkCollision(me, unit, 0x4)) {
                if (!Attack.getIntoPosition(unit, 25, 0x4)) {
                    return 0;
                }
            }

            Skill.cast(Config.Curse[0], 0, unit);

            return 1;
        }

        if (Config.Curse[1] > 0 && this.isCursable(unit) && !(unit.spectype & 0x7) && !unit.getState(this.curseState[1])) {
            if (getDistance(me, unit) > 25 || checkCollision(me, unit, 0x4)) {
                if (!Attack.getIntoPosition(unit, 25, 0x4)) {
                    return 0;
                }
            }

            Skill.cast(Config.Curse[1], 0, unit);

Any clues?

Cheers all

luisfilipepena commented 4 years ago

You Should make a Custom Attack, so u don't rly need to modify scripts. U might not get the "unique" monster name, but u can add latter to that list all the names u see or just cast on regular ones and the unique will get too ofc.

Config.CustomAttack = {
        "Infector of Souls": [xx,xx],
        "Black Soul": [xx,xx],
        "Burning Soul": [xx,xx]
};

I'm pretty sure this works because I've been using custom attack.