Hello All,

I've been trying to get my D2NT 3.3 Bot to work on my Fishymancer, but I have yet to find a working script for this build.

After doing some research on necro scripts for d2nt, I got my necro working; however, he does not want to use his attacks (Corpse Explosion + Bone Spear) after his skellies and mages are maxed out.

Can someone help with the NTAttack file to get this up and running?

Here is my Attack Configuration under NTConfig_Necromancer_Swanson


Code:
//------------------------------------------------------------------------------
	// Attack configuration
	//------------------------------------------------------------------------------
	//------------------------------------------------------------------------------
	// Curses / Curse States & Golems
	//------------------------------------------------------------------------------
	// Amplify Damage = 66 
	// 
        // Dim Vision     = 71 
	//	
        // Weaken         = 72 
	// Corpse Explositon = 74
	//	
        // Iron maiden    = 76 
	//
	// Terror 	  = 77 
	//	
        // Confuse 	  = 81 
	//	
 	// Life Tap       = 82 
	// Bone Spear	  = 84
	//	
 	// Attract        = 86 
	//	
 	// Decrepify      = 87 
	//	
 	// Lower Resist   = 91
	// 
	// No Golem / You already have an Iron Golem out = 0
	//	
	// Clay Golem	  = 1
	// 
	// Blood Golem    = 2
	// 
	// Fire Golem     = 3
	//-----------------------------------------------------------------------------	
	
	NTConfig_Curse = 66;		// Place curse to cast (above)
	NTConfig_Skele = 15;            // Number of Skeletons you can summon
	NTConfig_Mage = 15;             // Number of Mages you can summon
	NTConfig_Revive = 0;            //Number of Revives you want to summon
	NTConfig_Golem = 1;           // The golem you want to use (above)
	NTConfig_AttackSkill[0] = 84;	// First skill. Set to 0 if you won't
	NTConfig_AttackSkill[1] = 84;	// Primary skill to boss.
	NTConfig_AttackSkill[2] = 84;	// Primary untimed skill to boss. Set to 0 if you won't
	NTConfig_AttackSkill[3] = 74;	// Primary skill to others.
	NTConfig_AttackSkill[4] = 84;	// Primary untimed skill to others. Set to 0 if you won't
	NTConfig_AttackSkill[5] = 74;	// Secondary skill in case monster is immune to primary skill. Set to 0 if you won't
	NTConfig_AttackSkill[6] = 74;	// Secondary untimed skill. Set to 0 if you won't
	NTConfig_ClearPosition = false;	// Set to true if you want to clear area after killing boss.


	// Check self safe in field (NOT in town). Set to 0 if you won't
	// 0x01 : Potion, 0x02 : Poison, 0x04 : Amplify Damage, 0x08 : Weaken, 0x10 : Iron Maiden, 0x20 : Decrepify, 0x40 : Lower Resist
	NTConfig_CheckSelfSafe = 0x40;
	// Check merc's safe in field (NOT in town). Set to 0 if you won't
	// 0x01 : Death, 0x02 : Poison, 0x04 : Amplify Damage, 0x08 : Weaken, 0x10 : Iron Maiden, 0x20 : Decrepify, 0x40 : Lower Resist
	NTConfig_CheckMercSafe = 0x40;
}

I am assuming the error is in this section of the NTAttack file:


Code:
function NTA_NecromancerAttackPatternInt()
{
	
	var _maxindex, _maxskill;
	var _avgskilllevel = new Array();


	_avgskilllevel[0] = me.GetSkill(84, false);
	_avgskilllevel[0] = me.GetSkill(74, false);


	_maxindex = -1;
	_maxskill = 0;


	for(var i = 0 ; i < _avgskilllevel.length ; i++)
	{
		if(_avgskilllevel[i] > _maxskill)
		{
			_maxindex = i;
			_maxskill = _avgskilllevel[i];
		}
	}


	switch(_maxindex)
	{
	case 0:
		NTConfig_AttackSkill[0] = 84;	
		NTConfig_AttackSkill[1] = 84;	
		NTConfig_AttackSkill[2] = 84;	
		NTConfig_AttackSkill[3] = 74;	
		NTConfig_AttackSkill[4] = 84;	
		NTConfig_AttackSkill[5] = 74;	
		NTConfig_AttackSkill[6] = 74;
		break;
	
	}


	return (NTConfig_AttackSkill[1] && NTConfig_AttackSkill[3]);
}


function GetCurseState(skillid)
{
    if(NTConfig_Curse == 66)
	
	return 9;


	if(NTConfig_Curse == 71)
	
	return 23;


	if(NTConfig_Curse == 76)
	
	return 55;


	if(NTConfig_Curse == 77)
	
	return 56;


	if(NTConfig_Curse == 81)
	
	return 59;


	if(NTConfig_Curse == 82)
	
	return 58;


	if(NTConfig_Curse == 86)
	
	return 57;


	if(NTConfig_Curse == 87)
	
	return 60;


	if(NTConfig_Curse == 91)
	
	return 61;
}


function NTA_NecromancerAttackInt(target, firstorder)
{


	if(NTTMGR_CheckCurse(NTConfig_CheckSelfSafe&0x10, NTConfig_CheckMercSafe&0x10))
	{
		if(!NTTMGR_VisitTown())
			return 0;
	}


	//Ensure target is cursed
	if(!target.GetState(GetCurseState()))
		NTC_CastSkill(NTConfig_Curse, NTC_HAND_RIGHT, target);
	
	if(GetDistance(me, target) > 10)
	{
		var _pos = me.GetOptimalAttackPos(target.areaid, target.x, target.y, 10, 4);


		if(_pos)
			NTM_MoveTo(target.areaid, _pos[0], _pos[1], 0);
	}


	if(_SkeleCount < NTConfig_Skele || _MageCount < NTConfig_Mage || _ReviveCount < NTConfig_Revive)
	{
		RaiseDead();
		NTC_Delay(200);
		return 3;
	}
	if(!NTConfig_UseAttack)
	{
		NTC_Delay(200);
		return 3;	
	}
	else
	{
		var _primaryindex;


		//Pick attack type (boss/other)
		_primaryindex = (target.spectype&0x0A) ? 1 : 3;


		if(NTA_GetResistance(target, _NTA_SkillDamage[_primaryindex]) <= 90)
		{
			if(!NTA_NecromancerCastSkillInt(_primaryindex, target))
				return 2;
	
			return 3;
		}


		//Use alternate attack if first two are resisted
		if(NTConfig_AttackSkill[5] > 0 && NTA_GetResistance(target, _NTA_SkillDamage[5]) <= 80)
		{		
			if(target.name == "Horadrim Ancient")
			{
				NTM_MoveTo(target.areaid, target.x, target.y, 0);
				NTC_PingDelay(1000);
			}
			else 
			{
				NTA_NecromancerCastSkillInt(5, target);
				return 2;
			}
			return 3;
		}
	


		if(NTA_GetResistance(target, _NTA_SkillDamage[_primaryindex]) < 100 || (_primaryindex == 1 && NTC_GetMerc()))
		{
			if(!NTA_NecromancerCastSkillInt(_primaryindex, target))
				return 2;


			return 3;
		}


		return 1;
	}
}


function NTA_NecromancerCastSkillInt(index, target)
{
	if(me.GetSkillStatus(NTConfig_AttackSkill[index]) != 8)
	{
		if(GetDistance(me, target) > _NTA_SkillRange[index] || !CheckCollision(me, target, 4))
		{
			var _pos = me.GetOptimalAttackPos(target.areaid, target.x, target.y, _NTA_SkillRange[index], 4);


			if(_pos)
				NTM_MoveTo(target.areaid, _pos[0], _pos[1], 0);
		}


		return NTC_CastSkill(NTConfig_AttackSkill[index], _NTA_SkillHand[index], target);
	}


	if(NTConfig_AttackSkill[index+1] > 0)
	{
		if(GetDistance(me, target) > _NTA_SkillRange[index+1] || !CheckCollision(me, target, 4))
		{
			var _pos = me.GetOptimalAttackPos(target.areaid, target.x, target.y, _NTA_SkillRange[index+1], 4);


			if(_pos)
				NTM_MoveTo(target.areaid, _pos[0], _pos[1], 0);
		}


		return NTC_CastSkill(NTConfig_AttackSkill[index+1], _NTA_SkillHand[index+1], target);
	}


	for(var i = 0 ; i < 25 ; i++)
	{
		NTC_Delay(NTC_DELAY_FRAME);


		if(me.GetSkillStatus(NTConfig_AttackSkill[index]) != 8)
			break;
	}


	return false;
}

Can someone either pinpoint the error or send me a working NTAttack file for a necro who uses Skellies+Mages+CE+Golem?


All Help is greatly appreciated.