Good afternoon @ponuryzniwiarz
Sorry for the late gettin’ back to this. While looking at the curse casting part of the Necro’s attack script, something which may or may not help came to mind. What if the necro did not curse a monster which it has already cursed? No guarantees that this will work. If it does, awesome!
Let’s go back to this file:
- kolbot/d2bs/kolbot/libs/common/Attacks/Necromancer.js
There are two lines which we need to address:
#107. Skill.cast(Config.Curse[0], 0, unit);
&
#119. Skill.cast(Config.Curse[1], 0, unit);
Let’s create a check to see if the monster is already cursed and which we will place before each of those aforementioned function calls…
if (unit.getState(60)) return 1; // 60: state for decrepify, you may be using another type of curse, so change the state value. These check to see if the monster is already cursed with a lower resist curse
&
if (unit.getState(61)) return 1; // 61: state for lower resist
If you do not mind testing these and if they actually work, that would be awesome! Again, sorry I cannot test them at the moment. And, good luck!
Just so that my messy note is not misunderstood, here is what the code ought to look like when it is in the Necromancer.js file (click on the triangle to reveal the code alterations):
alter the code in the Necromancer.js
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;
}
}
if (unit.getState(60) return 1; // checks monster if it is already cursed w/ decrepify
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;
}
}
if (unit.getState(61)) return 1; // checks monster if it is already cursed with lower resist
Skill.cast(Config.Curse[1], 0, unit);
return 1;
}