Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Do While (True)
- 'Every 1 sec, reduce cooldown
- Try
- For i As Integer = 0 To GlobalParameters.ClientCount - 1
- Dim c As Client = GlobalParameters.Clients(i)
- 'Ticking
- c.TickTillLastAction += 1
- c.TickTillLastRequest += 1
- 'Cooldown
- If c.Cooldown > 0 Then
- c.Cooldown -= 1
- c.ws_sendinfocd()
- ElseIf c.TickTillLastAction > 120 Then
- c.LastActionType = 0
- End If
- If c.Cooldown = 0 Then
- If c.AfkWork > 0 Then
- PlayerWorking(c)
- c.LastActionType = 2
- End If
- End If
- 'Captcha // Fail after 10 min
- If c.waitingForCaptcha Then
- If DateTime.Now > c.timeCurrentCaptcha.AddMinutes(10) Then
- 'Auto-fail the captcha
- c.captchaFailed += 1
- c.waitingForCaptcha = False
- c.timeLastCaptcha = DateTime.Now
- c.ws_unblock()
- c.ws_sendNotification("Failed Captcha")
- If c.captchaFailed >= 3 Then
- c.ws_SendMessage("KICKED")
- c.ws_Disconnect()
- End If
- End If
- End If
- If c.muted Then
- If DateTime.Now > c.mutedtill Then
- c.muted = False
- c.ws_sendNotification("You are no longer muted")
- End If
- End If
- Next
- Catch ex As Exception
- GlobalParameters.AddLog("ERROR - PCDProcess - " & ex.Message)
- End Try
- Threading.Thread.Sleep(1000)
- Loop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement