Necro setup skills

Hi, Have some questions about skills. My setup is:
> Config.AttackSkill[0] = -1;

Config.AttackSkill[1] = 70;
Config.AttackSkill[2] = -1;
Config.AttackSkill[3] = 70;
Config.AttackSkill[4] = -1;
Config.AttackSkill[5] = -1;
Config.AttackSkill[6] = -1;

Config.LowManaSkill[0] = 1;
Config.LowManaSkill[1] = -1;

    Config.Curse[0] = 87;

Config.Curse[1] = 66;

Config.ExplodeCorpses = 0;
Config.Golem = “1”;
Config.Skeletons = 5;
Config.SkeletonMages = 5;
Config.Revives = 5;
Config.PoisonNovaDelay = 2;
Config.ActiveSummon = false;
Config.ReviveUnstackable = true;
Config.IronGolemChicken = 30;
Problem is that if necro got max 5 skeletons he revive new ones and waste mana. Can I do something with this? And not revive clay golem…

1 Like

Yes. Please, put either:

  • Config.Golem = 0;
    or
  • Config.Golem = “None”;

Choose one of those to replace your line: Config.Golem = “1”;

Now, did you want to only revive clay golem once? And, not again?
If that is the case, I may need a few moments to find where the golem is revived and then see if we can insert a clay golem is revived check, so as not to revive again.

In case you wanted to only revive the clay golem only once, please do these steps:

  • Open this file with a text editor: kolbot/d2bs/kolbot/libs/common/Precast.js

  • Find this case condition in that file. It ought to be line 183

      	case 1:
      	case "Clay":
      		this.summon(75);
      		break;
    
  • Change that code to look like this:

      	case 1:
      	case "Clay":
      		if (getUnit(1, 289)) break; // this checks if a clay golem has already been revived
      		this.summon(75);
      		break;
    

If that is what you needed and the checking on the clay golem works by not trying to revive again, then awesome. If the check on the clay golem does not work, I may have the value id of the clay golem wrong. So, just fire off a message and I’ll see if there is another value id. Hope it works and have fun! :video_game:

Hi! explained wrong but your post helps in reviving golem. Because before necro won’t revive golem. But now would like to change that skeletons reviving. At this moment in my char is possible to revive 5 skeletons, char skill config is to 5 skeletons. Necro starting run to tristram and during fighting reviving skeletons even if skeletons quantity is 5. Same with curse, necro repeats curse often even 3-4 times on small group monsters. How to change periodicity of curse and skeletons, detect actual quantity of skeletons.

1 Like

Good morning.
This may be helpful for reviving only the max number of skeletons. It is an actual feature in the necro’s profile file.

  • Change: Config.Skeletons = 5;
    to
  • Config.Skeletons = “max”;

That will only revive the max number that you have available to your character. Even if you are bo’d and you revive 6 skeletons, when the bo’s effect finishes and returns your skelly count to 5, it will then only revive 5. It’s a great addition to the new version of d2bs.

As for changing the periodicity of curses, that would require a little digging into the necro specific attack file that is located in here:

  • kolbot/d2bs/kolbot/libs/common/Attacks/Necromancer.js

Forgive me as I do not have time to comb through that now. If you can wait, I will be able to later on today. Thanks!

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;
	}

Get something like this when testing…
Error in ClearAnyArea (attack.js #556) ClassAttack is not defined

1 Like

Shoot! I made a noob error in the condition. Forgot the closing bracket. Sorry!

the error: if (unit.getState(60) return 1;
please change to: if (unit.getState(60)) return 1;

I missed a closing bracket.