kolton / d2bot-with-kolbot

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

Enchant - Follower #2750

Open Yeahs92 opened 4 years ago

Yeahs92 commented 4 years ago

Hi all, short scope: I have amazon and ench sorc. want amazon to run cows. I was able to setup their sequence as Leader - Follower so that ench sorc gets cow opened for Ama. Issue: My Ench sorc runs the script enchant after cowsgetter, but it never chants my Amazon and her merc.

    Scripts.CowsGetter = true; //opens portal for Amazon
    Scripts.Enchant = true;
        Config.Enchant.Triggers = ["chant", "cows", "wps"]; // Chat commands for enchant, cow level and waypoint giving
        Config.Enchant.GetLeg = false; // Get Wirt's Leg from Tristram. If set to false, it will check for the leg in town.
        Config.Enchant.AutoChant = true; // Automatically enchant nearby players and their minions
        Config.Enchant.GameLength = 5; // Game length in minutes

What is changed from original: copied cows.js twice and created CowsGetter.js & CowsLead.js and made some changes so that bot defines characters as: 1)Ench opens TP 2)Ama clears cow Ench config Ama Config p.s. to keep it short I want the Ench sorc to run script cowsgetter and then give enchant to my Ama and her merc. Maybe add somewhere interval (not sure how to correctly appy setInterval and where should it be inserted)? Any ideas?

gtoilet commented 4 years ago

that should work as you want it and how you have it set up since in game chats are broke atm the autochant should enchant when she sits town and when your zon comes close enuf to get it try to /w (ench sorc) chant make sure the enchant script works as supposed to could be a glitch some where

Wooked commented 4 years ago

Can't you just set the commands that leader "says" to whisper messages so that the commands still go through with the chat bug and all?

On Sat, Sep 5, 2020, 6:37 PM chase notifications@github.com wrote:

that should work as you want it and how you have it set up since in game chats are broke atm the autochant should enchant when she sits town and when your zon comes close enuf to get it try to /w (ench sorc) chant make sure the enchant script works as supposed to could be a glitch some where

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kolton/d2bot-with-kolbot/issues/2750#issuecomment-687685499, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQ2UWMAHYLODCSWNMEWVMVTSELRVVANCNFSM4Q25E4AA .

Yeahs92 commented 4 years ago

Hey, thanks for contributing. Let me add smth further - when ench opens the portal she goes to the spot (where all usual TP's appear) that means while she moves by the script she is not yet set to autoenchant, she does it only after she get to the point. AND at the same time while she moves to blue tps spot, Amazon just simply enters the RED one :(

gtoilet commented 4 years ago

enchant.js > in bots folder change line 436 / 451 from Town.move("portalspot"); to Town.move("stash");

Yeahs92 commented 4 years ago

this sounds quite legit, sir, let me try this and I will get back, thanks :)

gtoilet commented 4 years ago

if you need more time for the amazon to wait for enchant add a delay in the cowslead.js line 235 add delay to look like this

Town.move("stash"); delay(3500);

should get it

Yeahs92 commented 4 years ago

Ingame error after adding those lines: image "Error in CowsLead (cowslead.js #14) getRoom(...) is undefined" when adding those lines it looks like this: image

So the script becomes broken not sure how is it connected with just adding an interval, but when reverting back to when it was not addeed (original cowslead) it works fine (without enchant :( )

gtoilet commented 4 years ago

that #14 is reference to the line its got the error on so put the delay before Pather.usePortal(39);

going to assume when you added it before something else was added and threw off the script also i might have been wrong on the line i think i ment 225 .... should look like this below

Town.goToTown(1); Town.doChores(); Town.move("stash"); delay(3500); var maxSecondsWaitForLeg = 120; while (!Pather.getPortal(39)) { if(maxSecondsWaitForLeg == 0) { break; } delay(1000); maxSecondsWaitForLeg -= 1; } Pather.usePortal(39); Precast.doPrecast(false); this.clearCowLevel(); return true; }