06-30-2010, 10:04 AM
credits to bigapple90
.: Druid Class Script :.
.:.: Version 1.0 May 17 2010 :.:.
Step [2]: Find
and paste it above:
Step 3]: Now, replace these functions:
with this code:
Step [5]: Open the new config file.
Step [6]:
Version 1.0: Initial Release
.: Druid Class Script :.
.:.: Version 1.0 May 17 2010 :.:.
Quote:NOTES:
• Supports werewolf/werebear druid.
• If you want to teleport with a feral druid (lol) the bot will tele to target then shapeshift to attack. Works good for single places like Andariel/Meph/Eldritch etc. Would not work well in a place like chaos sanc (teles there, shapeshifts, attacks, then walks the rest of the way. Maybe feral bot can be useful for a baal leech fight.
• Elemental druid will always tele ontop of Andy, Meph, Baal, and Diablo to hit them better with tornado.
Quote:step [1]: Open NTAttack, add these case codes for spell range:
If you have no edits to your current NTAttack.ntl you can just copy paste mine (has some pally edits and other things): RAW OUTPUT nQga8atc and skip to step 4
Code:
case 225: //Fire Storm
case 229: //Molten Boulder
case 230: //Arctic Blast
case 232: //Feral Rage
case 233: //Maul
case 238: //Rabies
case 239: //Fire Claws
case 240: //Twister
case 242: //Hunger
case 243: //Shockwave
case 244: //Volcano
_NTA_SkillRange[i] = 3;
break;
case 245: //Tornado
_NTA_SkillRange[i] = 9;
break;
case 248: //Fury
_NTA_SkillRange[i] = 3;
break;
Quote: NTA_IsValidMonstercopy this code:
Code:
if(me.classid == NTC_CHAR_CLASS_DRUID)
{
if(!me.GetState(144))
NTC_CastSkill(250, NTC_HAND_RIGHT);
if(!me.GetState(151))
NTC_CastSkill(235, NTC_HAND_RIGHT);
if(!me.GetState(149))
NTC_CastSkill(226, NTC_HAND_RIGHT);
}
Code:
return true;
Code:
function NTA_DruidAttackPatternInt(), function NTA_DruidAttackInt(target, firstorder), function NTA_DruidCastSkillInt(index, target)
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);
}
}
Quote:Save and close NTAttack.Step [4]: Copy a Sorcoress NTConfig and rename it like so:
Quote:NTConfig_Druid_(charnamehere)
Step [5]: Open the new config file.
Step [6]:
Quote://------------------------------------------------------------------------------
// Attack configuration
//------------------------------------------------------------------------------
// 225: //Fire Storm
// 229: //Molten Boulder
// 230: //Arctic Blast
// 232: //Feral Rage
// 233: //Maul
// 238: //Rabies
// 239: //Fire Claws
// 240: //Twister
// 242: //Hunger
// 243: //Shockwave
// 244: //Volcano
// 245: //Tornado
// 248: //Fury
NTConfig_AttackSkill[0] = 0; // First skill. Set to 0 if you won't
NTConfig_AttackSkill[1] = 0; // Primary skill to boss.
NTConfig_AttackSkill[2] = 0; // Primary untimed skill to boss. Set to 0 if you won't
NTConfig_AttackSkill[3] = 0; // Primary skill to others.
NTConfig_AttackSkill[4] = 0; // Primary untimed skill to others. Set to 0 if you won't
NTConfig_AttackSkill[5] = 0; // Secondary skill in case monster is immune to primary skill. Set to 0 if you won't
NTConfig_AttackSkill[6] = 0; // Secondary untimed skill. Set to 0 if you won't
Quote:For Feral Druid don't leave the attacks to 0. For Elemental Druids tornado is defaulted to all attacks unless you change it.Let me know if you have any issues, questions or if you find any bugs.
Don't forget to config everything else (bosses, chicken settings, etc)
Version 1.0: Initial Release
[SIGPIC]http://yfrog.com/mhskidudecopyg[/SIGPIC]