Skip to content

D2BotMain.dbj#60

Open
jaenster wants to merge 3 commits intoDevelopmentfrom
D2BotMain.dbl
Open

D2BotMain.dbj#60
jaenster wants to merge 3 commits intoDevelopmentfrom
D2BotMain.dbl

Conversation

@jaenster
Copy link
Owner

Basically a modern copy of the D2BotLead.

@Nishimura-Katsuo / @ryancrunchi / @Zombenstein Could any of you review? Thanks =)

Copy link
Collaborator

@Nishimura-Katsuo Nishimura-Katsuo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't even know what's going on, lol.

// Setup difficulty
if (HeartBeat.gameInfo.difficulty.toLowerCase() === 'highest') {
if (!Control.Hell.click() && !Control.Nightmare.click() && !Control.Normal.click()) {
print('Cant select dificulty, wtf?');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dificulty / difficulty

while (true) {
delay(1000);
}
} No newline at end of file
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New line at the end of your file, jerk!

});

// Not sure what it presses, stolen from D2BotLead
LocationEvents.on(sdk.locations.Gateway, () => ControlAction.click(6, 436, 538, 96, 32));
Copy link

@zmanowar zmanowar Nov 24, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like the right most "Cancel" button on the gateway selection screen.


include("OOG.js") && include('common/Misc.js') && include('sdk.js') && include('polyfill.js') && include('common/prototypes.js');
if (!FileTools.exists("data/" + me.profile + ".json")) DataFile.create();
let nextGame = DataFile.getStats()['nextGame'];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should set up some linting to standardize when to use let/const and other code smells.

Copy link

@zmanowar zmanowar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to move these helper functions out into their own file. For instance locationTimeout is redefined in most of the .dbj files.

It seems like the majority of the content of this file should be the config at the top (which might also benefit from being broken out into a "default" config) and registering event handlers.

However, it's outside of the scope of this PR to do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants