Haven't got a lot of stuff to salvage right now, so testing is a pain, but my guess is that you run into the fact that at times GetPing()+600 still is too fast and server disconnects you, but its a guess, untill i have time to really test.Quote:
It's working but still get disconnects (code=007).
Tried both American and Europe districts (live in Europe), tried the game minimized, out of focus, in focused.
Same "problem" as before, running nice and well, and at random gets the disconnect.
Am launching via GW launcher if that can cause any problems.
Salvage Bot by joeko.au3, Line 299:
Code:
Sleep(GetPing() + 600)
Code:
Sleep(GetPing() + 700)
Quickly looking over the code that was the one line that cought my attention, as this might very well be the issue.
To help explain better, say you have a Ping of 30 - 70 ms, your code ends up doing a Sleep(30-70 + 700), meaning it'll sleep for 0,73 to 0,77 seconds, so less than a second, if you bombard the server with actions/requests too often the server decides your game is acting up and it disconnects you ... anyway to get back to the numbers, lets say the server actually accepts 1 action/request pr 0,75 seconds this means that your code works when the sleep is 0,75 + seconds long, but every time you get a low Ping you end up with a 0,749 - seconds long sleep, resulting in trying to do 2 actions/requests during the 0,75 seconds, making the server Disconnect you ... note the math here is a simple example, you need to test you the exact action/request pr x seconds on your own, its just to try and explain what i think the code is doing and what i think is the issue.
Hope this helps you out.