One customized script to run more boss/areas scripts

Im working on a script (much like getkeys.js)
I am making it go to the areas to collect the 4 essence. What I would like however is to choose “true, False” for each script.
How would you do this?
example:
scripts.Andariel = True;
scripts.Duriel = False;
but in its own script to pull each script. similar to getkeys.

1 Like

Do you really need this to work when you could just do this instead to get tokens while running the appropriate boss scripts?

Config.Cubing = true;

Config.Recipes.push([Recipe.Token]); // Make Token of Absolution

If you still want it to work the other way, I unfortunately won’t be much help.

Unfortunately that is no different than selecting each individual boss script to get the 4 essences.
Like the “get keys” is one js file that runs 3 scripts.
I want one js file to run 5 scripts with Andy and Duriel being a “choose one”
Now I got Andy to work, and I got Meph to work with Andy (each runs the full course), I’m stuck on how to do Diablo (without copy/paste the entire script) use load function somehow to call up the diablo script.
And I’m still stuck on how to make Andy and Duriel a choice (although since it’s just for me, I don’t do Duriel runs as drops are garbage so it’s not important)

1 Like

the same as other scripts. the sub-variables of Diablo will be read from character config, even you have there Scripts.Diablo = false; .
Other choice can be FastDiablo.js

Diablo is different than the other 2 as it has to search fir and open the portals before Diablo will appear. other than copy and paste the entire diablo script (which is redundant)
I gues what you are misunderstanding is the why…
I change chars a lot and go from norm to hell a lot and right now each time I have to scroll through and true/false every script I use. This way I can select this one script to run the 4 rooms when I want to do essence hunting.
I run getkeys when I need keys, etc etc… just tired of scrolling through and changing 10 things when I could break it down into just 1.
hope that clears up the why.

now back to the script… I have tried require (“Diablo.js”), include (“diablo.js”), and even jQuery.getScript(“Diablo.js”) all to no avail.
If my only option is to copy and paste so be it, but the longer the script the longer it takes to load.

in fact all area/boss scripts are javascript functions in kolbot. So I suggest to do the same thing when you load Andariel and Duriel, for every other script, like Diablo, FastDiablo, and Baal.

I’m not understanding your meaning.
For Andy it’s a simple 20 lines:
image

This works.

The root is in libs so you need include("bots/Diablo.js") and then you can simply call Diablo() like any other function.

“root” ???

Include will look for files in a root or base folder if you prefer, so you have to specify the path from there as I showed in my example.

oh I think I understand now. Ill try it and get back to you.

yea, NO that didnt work either. it “fails” and ends script.

So lets change the entire plan.
Can I just write a script calling up each script to run top down?
for example I have my sorc.js and in it are all of the scripts. Can I just have the lines:Norm, Nightmare, Hell, Keys, essence, MF to do specific runs when set to true? that way I can run all the scripts I want on that particular run.

will clearAnyArea work again in the same script for a different area?

I thought it was the goal from the beginning. Use include as i showed you and if the script doesnt work put it on pastebin and give us the link here.

1 Like

no need for pastebin, its a very short script.
function GetEssence () {
town.doChores()’
if (!me.findItems(“pk1”) || me.findItems (“pk1”).length <3) {
try {
print (“yc2Diablo”) ;
include (“bots/Diablo.js”);
Scripts.Diablo = true;
pickit.pickItems();
} catch (DiabloError) {
print (“yc2Diablo Failed”);
}
}
}

1 Like

Still painful to read without indentation.

include ("bots/Diablo.js");

function GetEssence () {
	if (!me.findItems(“pk1”) || me.findItems (“pk1”).length <3) {
		Diablo();
	}
}
1 Like

OH mannn, thats right, it goes BEFORE the function… ley me try it again. Ill post results.
and is pastebin a website?