kolton / d2bot-with-kolbot

d2bot game manager by D3STROY3R with kolbot libs by kolton for d2bs
345 stars 332 forks source link

there is a way to stand still while attacking a immune? #415

Open fromanm1 opened 6 years ago

fromanm1 commented 6 years ago

there is a way to stand still while attacking a immune?

hi guys, first, thanks for this amazing tool, I'm having a lot of fun with this.

to the problem.

this happens always my hammerdin attacks a magic immune monster, but it doesn't bothers me, except on the second wave of baal runs. I have the holy bolt configured to attack magic immunes, and it works, but the holy bolt hits a lot less than my merc and my paladiin is always teleporting all over the place and does't leave the merc do his job. Also, many times the merc goes between my paladin and the monster and holy bolt hits him instead the monster.

so, there is a way to stand still over the throne or in the same place it waits for a new weve and shoot holy bolts from there but without jumping arround and let the merc work?

PS: I also tried enabling telestomp, sometimes is better, sometimes not, but when I pause the bot and stand still and manually attack with holy bolt it's a LOT quicker.

greetings!

RfBz commented 6 years ago

just set it to cast hammers @ imunes it will kill all the skellys and ur merc can get the champs still not perfect but it works ok

fromanm1 commented 6 years ago

I tried that too, but is the same problem, it keep teleporting to kill the skellys and the merc can't kill the immunes.

fromanm1 commented 6 years ago

so fat I get to this. it works pretty well

I managed to stand still while attacking achmel and his friends, it stays in the middle and cast holy bolt to immunes.

this is the code. (is very rudimentary, but it works, don't laugh :P

add this to your char config:


Config.CastStatic = 0; // Cast static until the target is at designated life percent. 100 = disabled.
        Config.StaticList = ["achmel the cursed", "unraveler", "horadrim ancient", 103, 668];

and add this before "// Low mana skill" on file: kolbot/libs/common/Attacks/Paladin.js

// Static
                if (Config.CastStatic < 100 && me.getSkill(101, 1) && Attack.checkResist(unit, "lightning")  && Config.StaticList.some(
                                function (id) {
                                        if (unit) {
                                                switch (typeof id) {
                                                case "number":
                                                        if (unit.classid && unit.classid === id) {
                                                                return true;
                                                        }

                                                        break;
                                                case "string":
                                                        if (unit.name && unit.name.toLowerCase() === id.toLowerCase()) {
                                                                return true;
                                                        }

                                                        break;
                                                default:
                                                        throw new Error("Bad Config.StaticList settings.");
                                                }
                                        }

                                        return false;
                                }
                        ) && Math.round(unit.hp * 100 / unit.hpmax) > Config.CastStatic) {
                        staticRange = Math.floor((me.getSkill(101, 1) + 4) * 2 / 3);

                        while (!me.dead && Math.round(unit.hp * 100 / unit.hpmax) > Config.CastStatic && Attack.checkMonster(unit)) {
                                if (getDistance(me, unit) > staticRange || checkCollision(me, unit, 0x4)) {
                                        if (!Attack.getIntoPosition(unit, staticRange, 0x4)) {
                                                return false;
                                        }
                                }

                                Pather.moveToUnit(unit);
                                if (!this.doCast(unit, Config.AttackSkill[5], Config.AttackSkill[6])) {
                                break;
                                }
                        }
                }

https://pastebin.com/R1K21P2c

hope this helps everyone!

krazy03 commented 6 years ago

My way of doing this was simple.... Natures Peace.

Hdin kills skeles, they can't be revived therefore paladin doesn't go crazy killing them over and over. Merc kills wave 2 on his own really fast (pally stands there with con aura turned on merc does 10k)

wave 2 takes about 1~2 min

fromanm1 commented 6 years ago

my merc with insight does 8.5k damage. my holy bolt does 2k

the second wave is 35 seconds average with my method ;)

noah- commented 6 years ago

Have you tried telestomp? I noticed it is only in the sorc config, but I think it actually works with all characters.

fromanm1 commented 6 years ago

I tried that, same thing, dont stop teleporting and merc cant kill the immunes.

it's already solved.

capicorp123 commented 6 years ago

I have another question guys. I just downloaded the kolbot and it seems to work fine until it gets the to the boss.. it finds the boss then just goes back to town and tele to the next boss without actually killing anything.

m-misiewicz commented 5 years ago

try using smite and concentration as attack vs magic immunes...that way hdin won't tele around so much....works very well for me :)

MathusQ commented 5 years ago

I used your solution that you figured out. It works pretty well, but I hope it doesnt interfere with anything in the future. Let me know if you ever found a cleaner resolution to this problem, I will be looking too.

This comes up first page on a google search for this problem so I'm sure info here would be useful to others.

Also, my first attempts at getting a quicker kill on wave 2 was putting cannot be frozen on my merc and altering the skills I was using vs immunity. When frozen he is so slow I wasn't sure my other item was really adding the damage when it counted most. Together with your solution, and using holy bolt, gett the paladin to stand close to the group, I am killing wave 2 much quicker.

JohnRambo990 commented 4 years ago

Hi guys - im having some issues here. Im getting an error with the workaround that Fromam1 postet. It actually works, as intended but I get a warning message. On this line:

"staticRange = Math.floor((me.getSkill(101, 1) + 4) * 2 / 3);"

The error message is this: https://i.imgur.com/jJR9XFq.png STRICT warning 156 - File(kolbot/libs/common/attacks/paladin.js:78) Assignment to undeclared variable staticRange

What have I done wrong?

JohnRambo990 commented 4 years ago

https://imgur.com/jJR9XFq

fromanm1 commented 4 years ago

be careful with spaces, try to copy/paste instead of write the code.

JohnRambo990 commented 4 years ago

be careful with spaces, try to copy/paste instead of write the code.

I have done that exactly, but the code is still looking a bit different than the one from my soso attack file - like the pala one is moved in to the right a bit more?

JohnRambo990 commented 4 years ago

be careful with spaces, try to copy/paste instead of write the code.

Dude? Can you help?

jadastreon commented 3 years ago

be careful with spaces, try to copy/paste instead of write the code.

Dude? Can you help?

Hey so I know this is like 1 year plus years old now but I was having this issue, and using the fix posted here, also got your error message, STRICT warning 156

I did some more poking around and found this #1396 issue about opening chests, they had the same STRICT warning 156

I have little to no coding experience so i guess some terminology was missed here

I tried and tested this myself and the STRICT error is gone

following the format in the issue #1396

staticRange = Math.floor((me.getSkill(101, 1) + 4) * 2 / 3);

Should be

let staticRange = Math.floor((me.getSkill(101, 1) + 4) * 2 / 3);

the term 'let' gets accepted by notepad++ (turns green) and the error goes away

hope this helps anyone still trying to solve

MagicalOneOne commented 2 years ago

You are aware that the game has a stand still button right? Just tell your bot to press left shift during hammer casting.