-
Notifications
You must be signed in to change notification settings - Fork 332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IPHunter improvements #1953
base: master
Are you sure you want to change the base?
IPHunter improvements #1953
Conversation
Mercoory
commented
Oct 13, 2019
- More beeps when IP found
- More often movement when IP found (Anti drop measure)
- Overhead messages with countdown
- Logs to D2BS console
- More beeps when IP found - More often movement when IP found (Anti drop measure) - Overhead messages with countdown - Logs to D2BS console
@jaenster improved the variable declaration. Co-Authored-By: Jan Stoots <[email protected]>
This looks like a nice improvement, any reason it's not merged ? |
Work's great Thank you |
for (let i = (Config.IPHunter.GameLength * 60); i > 0; i -= 1) { | ||
me.overhead(":( IP : [" + (ip) + "] NG: " + w + " sec"); | ||
delay(1000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get an error on variable "w". Shouln't this be "i" instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice improvements that I would like to see get merged! Just fix the one issue with "w" variable on line 49.
I was thinking about adding one additional useful feature. Currently, the way I understand the script, is that it will wait for X seconds when the game is on the wrong IP. It will do this wait regardless of the actual time the game has already been open (for example, if your mf bot first did a few runs, then checks the IP it will still wait the full time). Putting the IPHunt script at some different place doesn't change this. I propose adding this snippet instead of the hardcoded wait amount:
|
*/ | ||
|
||
function IPHunter() { | ||
var ip = Number(me.gameserverip.split(".")[3]); | ||
let ip = Number(me.gameserverip.split(".")[3]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Doesn't this work like below? And in case gameserverip for some reason is not there, shouldn't there be an if condition to check it like if (me.gameserverip)
?
let ip = +me.gameserverip.split(".")[3];
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you tell me what the +
(plus symbol) syntax does and why you think it is more appropriate than Number(...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just syntactic sugar and can be ignored. But I believe that existence of gameserverip and it having 3 dots should be checked.
Town.move("waypoint"); | ||
Town.move("stash"); | ||
} catch (e) { | ||
// ensure it doesnt leave game by failing to walk due to desyncing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't the error be logged to see what's the problem so it doesn't repeat?