Blizzhackers

Home of the Dupe since 2001

* Login   * Register    * FAQ    * Search

Join us on IRC: #bh@irc.synirc.net (or Mibbit Web IRC)


MuleFactory


It is currently Mon Sep 01, 2014 2:37 pm


All times are UTC [ DST ]





Post new topic Reply to topic  [ 106 posts ]  Go to page 1, 2, 3, 4, 5 ... 8  Next
Author Message
 Post subject: [D2NT Release] Druid Script
PostPosted: Tue May 18, 2010 12:08 am 
 
User
User
User avatar

Joined: Sun Apr 04, 2010 1:44 am
Location: the big apple
Quote:
.: 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:

If you have no edits to your current NTAttack.ntl you can just copy paste mine (has some pally edits and other things): http://pastebin.com/raw.php?i=nQga8atc and skip to step 4

Quote:
Step [1]: Open NTAttack, add these case codes for spell range:
         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:
Step [2]: Find
Quote:
NTA_IsValidMonster
copy this 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);
      
   }

and paste it above:
return true;


Quote:
Step 3]: Now, replace these functions:
function NTA_DruidAttackPatternInt(), function NTA_DruidAttackInt(target, firstorder), function NTA_DruidCastSkillInt(index, target)


with this 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.

Quote:
Step [4]: Copy a Sorcoress NTConfig and rename it like so:
Quote:
NTConfig_Druid_(charnamehere)


Quote:
Step [5]: Open the new config file.

Quote:
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

For Feral Druid don't leave the attacks to 0. For Elemental Druids tornado is defaulted to all attacks unless you change it.
Don't forget to config everything else (bosses, chicken settings, etc)

Quote:

Let me know if you have any issues, questions or if you find any bugs.


Quote:
Version 1.0: Initial Release

Top
 Profile  
 Post subject:
PostPosted: Sat May 22, 2010 11:37 pm 
 
User
User

Joined: Sun Apr 18, 2010 12:24 pm
How to set Hurricane as first skill?

thanks

Top
 Profile  
 Post subject:
PostPosted: Sat May 22, 2010 11:59 pm 
 
User
User
User avatar

Joined: Sun Apr 04, 2010 1:44 am
Location: the big apple
druid will auto-cast hurricane, oak, and or cyclone armor if it doesn't have it when it attacks

Top
 Profile  
 Post subject:
PostPosted: Sun May 23, 2010 4:57 pm 
 
User
User

Joined: Sat Apr 07, 2007 10:41 pm
can't wait to test it out. thanks a lot man :)

Top
 Profile  
 Post subject:
PostPosted: Sun May 23, 2010 5:13 pm 
 
User
User

Joined: Thu Aug 09, 2007 11:31 am
Works very nice for me :)

Top
 Profile  
 Post subject:
PostPosted: Mon May 24, 2010 1:37 am 
 
User
User

Joined: Sat Apr 07, 2007 10:41 pm
Really nice, especially the precasting. Ghost dies and will be recasted instantly.
But i noticed one problem:

Since tornados don't fly straight you don't hit enemies sometimes.
It's the only major bug i've seen yet.

Great work man :P

Top
 Profile  
 Post subject:
PostPosted: Mon May 24, 2010 1:47 am 
 
User
User
User avatar

Joined: Sun Apr 04, 2010 1:44 am
Location: the big apple
thats the problem with the wind druid. must be close. you can make the druid get closer to the target by changing NTA_SkillRange[i] = 9 to a lower number like 6 or 3

Top
 Profile  
 Post subject:
PostPosted: Mon May 24, 2010 2:41 am 
 
User
User

Joined: Sat Apr 07, 2007 10:41 pm
Gonna test it the following days and will help to improve - as far as i can do.
Thanks for the advice.

Top
 Profile  
 Post subject:
PostPosted: Mon May 24, 2010 6:12 pm 
 
User
User

Joined: Sat Apr 07, 2007 10:41 pm
Yep setting the sillrange of tornado to 3 fixes almost every problem.
Thanks a lot :)

Top
 Profile  
 Post subject:
PostPosted: Tue May 25, 2010 1:57 am 
 
User
User

Joined: Sat Apr 07, 2007 10:41 pm
Now tested with BaalLeechFighter, works without any problem.
Kills wave2 at Baal fast and efficiently, also it pushes your characters' life.

Will now aim on going for Infy/Hdin/Druid diabaals :D

Top
 Profile  
 Post subject:
PostPosted: Tue May 25, 2010 3:03 am 
 
User
User
User avatar

Joined: Sun Apr 04, 2010 1:44 am
Location: the big apple
:)

Top
 Profile  
 Post subject:
PostPosted: Tue Jun 01, 2010 2:20 am 
 
User
User

Joined: Sun Mar 29, 2009 4:26 pm
anyway to eliminate it casting oak? it makes the rest of my party chicken when it goes in to fight baal!

Top
 Profile  
 Post subject:
PostPosted: Tue Jun 01, 2010 2:25 am 
 
User
User
User avatar

Joined: Sun Apr 04, 2010 1:44 am
Location: the big apple
remove if from precast and in NTAttack remove this code
if(!me.GetState(149))
         NTC_CastSkill(226, NTC_HAND_RIGHT);


Last edited by bigapple90 on Tue Jun 01, 2010 2:46 am, edited 1 time in total.
Top
 Profile  
 Post subject:
PostPosted: Tue Jun 01, 2010 2:31 am 
 
User
User

Joined: Sun Mar 29, 2009 4:26 pm
bigapple90 wrote:
remove if from precast and in NTAttack remove this code
if(!me.GetState(151))
         NTC_CastSkill(235, NTC_HAND_RIGHT);


I removed it from the ntattack. where else do i remove it from?

Top
 Profile  
 Post subject:
PostPosted: Tue Jun 01, 2010 2:32 am 
 
User
User
User avatar

Joined: Sun Apr 04, 2010 1:44 am
Location: the big apple
in NTPrecast, druid section

Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 106 posts ]  Go to page 1, 2, 3, 4, 5 ... 8  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron