I’m running a toon through cow level. I managed to have it receive BO before starting clearing the cows but sometimes the buff expires before the level is cleared which makes it quite dangerous. Therefore I wanted to edit the cow script to test if my toon still had BO and if not make it go and get the buff before continuing.
Has anyone any idea how to test whether or not a character has BO?
My BO duration is around 530sec, Will check your change but looks like it’s doing exactly what I’m after. Thanks a lot for that.
Edit: Just had a look at all your new scripts, looks like it will require some changes as I’ve changed lots of things in my scripts, I’ll also need to spend some time to understand all it does, but looks neat.
I haven’t added the lines in class config files, because maybe those will be more simpler in the near future.
you’ll find the required char config setting in lines 18-21 of …\libs\config_BaseConfigFile.js.
it’s something that will run in the background, like TownCheck.
maybe that PR will be merged soon, so you need only to update your files.
Edit:
for the moment some parts of initial pull-request were reverted.
I finally managed to build up my mf team for Hell, so tried to implement the changes. If I understood well, you removed the changes as it was causing issues with other scripts and basically for the moment the only option (apart from having a CTA) is to get BO at the start of each script?
not every script, because even with crap equipment the lower value from BC-Shout-BO barbarian skills is around 300+ seconds so only longer scripts need that movement.
maybe that should be reforged like a town activity which won’t break the running script. Either, the counter for BO moving should be placed properly.
I’ll give it another go but from what I’ve seen tonight it was working rather fine for most of the team except for the leader who was just running around in town like a headless chicken, was kind of weird.
Will spend a bit more time on it later but as far as I’m concerned the only script I really need that for is the Cow level which is in Act1 so shouldn’t create any issue.
Hey, I haven’t used the script for quite some time so I’m not too sure about how I made this all work, but as far as I can tell I have a script for all my toons to make them take the BO:
/**
@filename getBO.js
@author nobody
@desc Send the toon to the Catacomb 2 WP and stay there until it’s got BO
get the required lines for character config files from ...\libs\config\_BaseConfigFile.js
*/
const GetBO = () => {
Pather.useWaypoint(35, true); // take Boer wp
Pather.moveTo(me.x + 5, me.y + 5);
while (!me.getState(32)){
delay(1000);
}
delay(3000);
Pather.useWaypoint(1);
return true;
}
Then in each of my toon script, I have:
Scripts.GetBO = true;
Now for the barb, I have this script:
/**
@filename BattleOrders.js
@author nag0k
@desc give Battle Orders buff modded for hardcore, with barbarian waiting whole game on Catacombs 2 wp
- the values in lines 14-16 are customizable.
- in barbarian config file you should have Scripts.BattleOrders = true; and Config.QuitList = ["..."]; should be completed.
- other chars should have in the running area scripts the lines to get the wp where Boer is:
Pather.useWaypoint(35, true); // take Boer wp
Pather.moveTo(me.x + 5, me.y + 5);
delay(3000);
*/
const BattleOrders = () => {
const BO_WP = 35; // area to buff - 35 is catacombs level 2
const TOWN_NEARBY_MONSTER = true; // go to town if monsters nearby
const TOWN_MANA = 20; // go refill mana if mana drops below this percent
const shouldHealMana = amount => me.mp < Math.floor(me.mpmax * amount / 100)
const healMana = () => {
Pather.useWaypoint(1);
Town.initNPC("Heal", "heal");
Pather.useWaypoint(BO_WP);
};
const shouldBuff = unit => (
Misc.inMyParty(unit) &&
getDistance(me, unit) < 10 &&
unit.name !== me.name &&
!unit.dead &&
!unit.inTown
)
const giveBuff = () => {
const unit = getUnit(0);
do {
if (shouldBuff(unit)) {
Precast.doPrecast(true);
}
} while(unit.getNext());
};
const monsterNear = () => {
const unit = getUnit(1);
if (unit) {
do {
if (Attack.checkMonster(unit) && getDistance(me, unit) < 20) {
return true;
}
} while(unit.getNext());
}
return false;
};
if (!Config.QuitList) {
showConsole();
print('Set Config.QuitList in character settings');
print('If you don\'t I will idle indefinitely');
}
if (me.playertype && Config.LifeChicken <= 0) {
showConsole();
print('ON HARDCORE');
print('YOU SHOULD SET CHICKEN LIFE');
print('MONSTERS CAN FIND THEIR WAY TO WPS..');
}
if (shouldHealMana(TOWN_MANA)) {
Town.initNPC("Heal", "heal");
}
Town.heal(); // incase our life is low as well
try {
Pather.useWaypoint(BO_WP);
} catch (e) {
showConsole();
print('Failed to move to BO WP');
print('Make sure I have ' + Pather.getAreaName(BO_WP) + ' waypoint');
delay(20000);
return true;
}
Pather.moveTo(me.x + 4, me.y + 4);
while (true) {
giveBuff();
if (TOWN_NEARBY_MONSTER && monsterNear()) {
if (!Pather.useWaypoint(1)) {
break;
}
}
if (shouldHealMana(TOWN_MANA)) {
healMana();
}
delay(25);
}
return true;
}
This doesn’t check the BO status tho, so not sure that will answer your question. I’ll have a closer look and see if I can remember how I did that.