Closed ARkaine2 closed 4 years ago
The code you posted last will make the bot clear those 5 areas.
fa-b posted here that you can change the order the scripts are executed by changing the order in the config file. Im having a bit of a hard time understanding what your bot does with your code posted above.
Is Maggots Lair being cleared before Travincal? Maybe you can quickly post a list of what is done and in which order? From my understanding you want this:
I want to move the ClearAnyArea Script in my own config as well, to make my multiple characters synch up better, so im really interested in solving your issue as well.
From my understanding, the config files are "sending" their values to another script at the activation of a profile. If "Scripts.ClearAnyArea" is present at multiple stages of the config files, the values in AreaList are being "send" multiple times, each time overwriting the values that have been stored before. In you case, "River of Flames" is the last setting that overrides the previous runs, so only that area will be cleared. Sadly, my understanding of the inner works of the bot are very limited and Im hoping someone will answer this question before I will try it out myself.
Maybe the script can be executed multiple times be creating copies of the script (eg. ClearAnyAreaA, ClearAnyAreaB etc) and adding those to the general config as well. If I dont get any answer for this, I will try it out myself, most likely killing my bot in the process ^^
I tried to create multiple versions of ClearAnyArea.js And I got error "Invalid script function name". I found this (https://github.com/kolton/d2bot-with-kolbot/issues/1257) thread and there was solution: I renamed "function ClearAnyArea" in each file. But i got another problem: Scripts ClearAnyAreaA, ClearAnyAreaB, ClearAnyAreaC, ClearAnyAreaD start from last location of them and then only repeat it. For example: ClearAnyAreaA runs River of Flames, then ClearAnyAreaB, ClearAnyAreaC, ClearAnyAreaD runs already cleared River of Flames etc, untill all ClearAnyArea scripts will be completed.
InterestingIndeed, any success?
InterestingIndeed, if you are interested, i found solution.
We should change AreaList to other name (for example for AreaList1 like in this code):
function ClearAnyArea1() {
var i;
Town.doChores();
for (i = 0; i < Config.ClearAnyArea.AreaList1.length; i += 1) {
if (Pather.journeyTo(Config.ClearAnyArea.AreaList1[i])) {
Attack.clearLevel(Config.ClearType);
}
}
return true;
}
Is it possible to run one script twice per game? For example in such case:
ClearAnyArea script works as River of Flame in place of Maggot Lair, then in runs Diablo script and ends game.
Is it possible to make ClearAnyArea script run all arreas separatly, not in a row, if we choose something like: