kolton / d2bot-with-kolbot

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

Mercwatch only for certain bosses? #1763

Open croboy opened 5 years ago

croboy commented 5 years ago

Hello

Just wanted to see if anyone knows.

I dont want my merc to be revived all the time, i only want him to be revived when he is doing Uber making organ sets because i need him to help kill Duriel.

I was going to try this in my Paladin.js file, but before i do, wanted to see if you guys think this is right.

So at the top of Paladin.js, i was going to add my script below this line:

if (Config.MercWatch && Town.needMerc()) { print("mercwatch"); Town.visitTown(); }

//MY ADDED PART if (unit.classid === 708 && Town.needMerc()) { print("mercwatch"); Town.visitTown(); }

So only if i am attacking 708 (Uber Duriel) and need merc, it will visit town instantly? Does this look correct? every other scenario the bot can wait till im next in town to revive him

5noop commented 5 years ago

Yeah it should work, or you can simply write this:

if ((Config.MercWatch || unit.classid === 708 ) && Town.needMerc()) {
print("mercwatch");
Town.visitTown();
}
croboy commented 5 years ago

if ((Config.MercWatch || unit.classid === 708 ) && Town.needMerc()) { print("mercwatch"); Town.visitTown(); }

Dude you are a legend, thanks for all your help lately :) really appreciate it