Blizzhackers

Home of the Dupe since 2001

* Login   * Register    * FAQ    * Search

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


It is currently Thu Feb 22, 2018 9:31 pm


All times are UTC [ DST ]





Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Need help with paladin de seis attack sequence
PostPosted: Wed Sep 06, 2017 1:29 pm 
 
User
User

Joined: Fri Nov 01, 2013 11:08 am
In the past I liked how paladin goes bellow seis group and starts casting as they approach him slowly
But now that I have a druid helper not so much, pala with 7k hp is casting hammers from a distance and druid with 3.5k is taking hits coz he tp's in the middle of the group.

My question is:
Which part of the script contains this behavior on pala so that i can change their roles
I have some experience in JS(novice) and am willing to give it a shot, just need the files which contain my problem

Thanks in advance


e: figured it out, for those that want the same thing do the following:

To remove precast of paladin hammers and start killing as soon as seal mobs spawn:
In Diablo.js find a section called this.chaosPreattack and delete all except break; in case 3 ( case 3 is paladin )
It should look like this:
   this.chaosPreattack = function (name, amount) {
      var i, n, target, positions;

      switch (me.classid) {
      case 0:
         break;
      case 1:
         break;
      case 2:
         break;
      case 3:
         break;
      case 4:
         break;
      case 5:
         break;
      case 6:
         break;
      }
   };


It works great ( if your character can take a few hits ) in combination with

Config.BossPriority = true;

from character configuration file.

To add a timed delay with casting of tornado on druid:
To DiabloHelper.js add a whole block before this.getBoss section so it looks like this:
   
this.chaosPreattack = function (name, amount) {
      var i, n, target, positions;

      switch (me.classid) {
      case 0:
         break;
      case 1:
         break;
      case 2:
         break;
      case 3:
         break;
      case 4:
         break;
      case 5:
            target = getUnit(1, name);

         if (!target) {
            return;
         }

         positions = [[6, 11], [0, 8], [8, -1], [-9, 2], [0, -11], [8, -8]];

         for (i = 0; i < positions.length; i += 1) {
            if (Attack.validSpot(target.x + positions[i][0], target.y + positions[i][1])) { // check if we can move there
               Pather.moveTo(target.x + positions[i][0], target.y + positions[i][1]);
               Skill.setSkill(Config.AttackSkill[1], 0);

               for (n = 0; n < amount; n += 1) {
                  Skill.cast(Config.AttackSkill[1], 0, target.x, target.y);
               }

               break;
            }
         }
         break;
      case 6:
         break;
      }
   };
this.getBoss = function (name) {...};


The case 5 ( case 5 is druid ) is edited from paladins precast ( case 3 from Diablo.js ).
Positions are kept since I have no idea how those are calculated and they do the trick ( druid stays away from the group while casting tornado for a number of times )

Skill.setSkill(Config.AttackSkill[1], 0);


This is changed to use the right skill ( right index is found in the configuration file ).

Skill.cast(Config.AttackSkill[1], 0, target.x, target.y);


This is changed to use the right skill and direction it should be casted at.

Now that we have our function we need to add it to the this.getBoss so it does something
It should look like this:
   this.getBoss = function (name) {
      var i, boss, glow;

      while (true) {
         if (!this.preattack(name)) {
            delay(500);
         }

         glow = getUnit(2, 131);

         if (glow) {
            break;
         }
      }

      for (i = 0; i < 16; i += 1) {         
         boss = getUnit(1, name);

         if (boss) {
            this.chaosPreattack(name, 8);
            return Attack.clear(40, 0, name, this.sort);
         }

         delay(250);
      }

      return !!glow;
   };


Here the only thing changed from the original is that this.chaosPreattack(name, 8 ); is added
8 is number of the attacks made ( I think )

Code can be a bit more cleaner but meh fuck it, does the job. If anyone has something to add or improve this it would be nice

Can some dev tell me if using target.x and target.y is a problem? I got the inspiration from precast on diablo before he spawns but instead of hardcoded coordinates I used this for the direction of the attack.

Cheers

Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 4 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