Code:
function NTA_DruidAttackPatternInt()
{
var _maxindex, _maxskill;
var _avgskilllevel = new Array();
_avgskilllevel[0] = me.GetSkill(245, 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[1] = 245;
NTConfig_AttackSkill[2] = 245;
NTConfig_AttackSkill[3] = 245;
NTConfig_AttackSkill[4] = 245;
NTConfig_AttackSkill[5] = 245;
NTConfig_AttackSkill[6] = 245;
break;
}
return (NTConfig_AttackSkill[1] && NTConfig_AttackSkill[3]);
}
function NTA_DruidAttackInt(target, firstorder)
{
var _primaryindex;
if(NTTMGR_CheckCurse(NTConfig_CheckSelfSafe&0x10, NTConfig_CheckMercSafe&0x10))
{
if(!NTTMGR_VisitTown())
return 0;
}
if(firstorder && NTConfig_AttackSkill[0] > 0 && NTA_GetResistance(target, _NTA_SkillDamage[0]) < 100)
{
if(GetDistance(me, target) > NTConfig_AttackSkill[0] || !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);
}
if(!NTC_CastSkill(NTConfig_AttackSkill[0], _NTA_SkillHand[0], target))
return 2;
return 3;
}
_primaryindex = (target.spectype&0x0A) ? 1 : 3;
if(me.GetSkill(245, true) > 1)
if(target.name == "Andariel" || target.name == "Baal" || target.name == "Mephisto" || target.name == "Diablo")
{
if(!NTA_DruidCastSkillIntNear(_primaryindex, target))
return 2;
return 3;
}
if(NTA_GetResistance(target, _NTA_SkillDamage[_primaryindex]) <= 90)
{
if(!NTA_DruidCastSkillInt(_primaryindex, target))
return 2;
return 3;
}
if(NTConfig_AttackSkill[5] > 0 && NTA_GetResistance(target, _NTA_SkillDamage[5]) <= 80)
{
if(!NTA_DruidCastSkillInt(5, target))
return 2;
return 3;
}
if(NTA_GetResistance(target, _NTA_SkillDamage[index]) < 100 || (_primaryindex == 1 && NTC_GetMerc()))
{
if(!NTA_DruidCastSkillInt(_primaryindex, target))
return 2;
return 3;
}
return 1;
}
function NTA_DruidCastSkillIntNear(index, target)
{
if(GetDistance(me, target) > 3 || !CheckCollision(me, target, 4))
NTM_MoveTo(target.areaid, target.x, target.y, 0);
return NTC_CastSkill(NTConfig_AttackSkill[index], _NTA_SkillHand[index], target);
if(NTConfig_AttackSkill[index+1] > 0)
{
if(GetDistance(me, target) > 3 || !CheckCollision(me, target, 4))
{
var _pos = me.GetOptimalAttackPos(target.areaid, target.x, target.y, 3, 4);
if(_pos)
NTM_MoveTo(target.areaid, _pos[0], _pos[1], 0);
}
return NTC_CastSkill(NTConfig_AttackSkill[index+1], _NTA_SkillHand[index+1], target);
}
}
function NTA_DruidCastSkillInt(index, target)
{
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);
}
if(!me.GetState(139))
NTC_CastSkill(223, NTC_HAND_RIGHT) // Werewolf
else if(!me.GetState(140))
NTC_CastSkill(228, NTC_HAND_RIGHT) // Werebear
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);
}
}
Bookmarks