Advertisement
Guest User

Untitled

a guest
Apr 19th, 2016
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.07 KB | None | 0 0
  1. Do While (True)
  2. 'Every 1 sec, reduce cooldown
  3. Try
  4. For i As Integer = 0 To GlobalParameters.ClientCount - 1
  5. Dim c As Client = GlobalParameters.Clients(i)
  6.  
  7. 'Ticking
  8. c.TickTillLastAction += 1
  9. c.TickTillLastRequest += 1
  10.  
  11. 'Cooldown
  12. If c.Cooldown > 0 Then
  13. c.Cooldown -= 1
  14. c.ws_sendinfocd()
  15. ElseIf c.TickTillLastAction > 120 Then
  16. c.LastActionType = 0
  17. End If
  18.  
  19.  
  20. If c.Cooldown = 0 Then
  21. If c.AfkWork > 0 Then
  22. PlayerWorking(c)
  23. c.LastActionType = 2
  24. End If
  25. End If
  26.  
  27. 'Captcha // Fail after 10 min
  28. If c.waitingForCaptcha Then
  29. If DateTime.Now > c.timeCurrentCaptcha.AddMinutes(10) Then
  30. 'Auto-fail the captcha
  31. c.captchaFailed += 1
  32. c.waitingForCaptcha = False
  33. c.timeLastCaptcha = DateTime.Now
  34. c.ws_unblock()
  35. c.ws_sendNotification("Failed Captcha")
  36. If c.captchaFailed >= 3 Then
  37. c.ws_SendMessage("KICKED")
  38. c.ws_Disconnect()
  39. End If
  40. End If
  41. End If
  42.  
  43. If c.muted Then
  44. If DateTime.Now > c.mutedtill Then
  45. c.muted = False
  46. c.ws_sendNotification("You are no longer muted")
  47. End If
  48. End If
  49.  
  50.  
  51. Next
  52. Catch ex As Exception
  53. GlobalParameters.AddLog("ERROR - PCDProcess - " & ex.Message)
  54. End Try
  55. Threading.Thread.Sleep(1000)
  56.  
  57. Loop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement