Originally Posted by
Cluster
Hey Chancity, how would I incorporate that in to the script? I am a total scripting noob and don't understand it lol, so far I have:
I haven't tested this cause I;m never dcing, but think this should work. This will first click the ok button then wait till you have a connection again and then send password and start the bot again.
Change it to this:
Code:
ElseIf CheckFor("Disconnect", "", Round(700 * $x_ratio), Round(340 * $y_ratio), Round(1200 * $x_ratio), Round(600 * $y_ratio), 1, 140) Then
GUICtrlSetData($lblStatus, "Status: Network Disconnect window up")
MouseClick("left", Round(960 * $x_ratio), Round(632 * $y_ratio))
Sleep(100)
Send("{SPACE}")
Return
ElseIf CheckFor("lostconnection", "", Round(700 * $x_ratio), Round(340 * $y_ratio), Round(1200 * $x_ratio), Round(600 * $y_ratio), 1, 140) Then
GUICtrlSetData($lblStatus, "Status: Lost connection window up")
MouseClick("left", Round(960 * $x_ratio), Round(632 * $y_ratio),1)
Do
sleep(500)
Until internetconnection() = 1
sleep(500)
Send($gamePassword)
Sleep(500)
Send("{ENTER}")
Sleep($gameStartTime)
Return
Else
GUICtrlSetData($lblStatus, "ERROR: Cannot find Resume button")
Return
EndIf
At the bottom of the script add the check internet function:
Code:
Func internetconnection()
$ping = Ping("www.google.com")
If $ping >= 1 then Return 1
Return 0
EndFunc