Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.58 KB | None | 0 0
  1. from PIL import Image
  2. import time
  3. import decimal
  4. import random
  5. import pytesseract
  6. import pyautogui
  7. rand_number = rand_number = float(decimal.Decimal(random.randrange(10, 75))/100)
  8. pyautogui.moveTo(1280, 720)
  9. pyautogui.click()
  10. while True:
  11.  
  12. pyautogui.keyDown('w')
  13. time.sleep(rand_number)
  14. pyautogui.keyUp('w')
  15. pyautogui.keyDown('s')
  16. time.sleep(rand_number)
  17. pyautogui.keyUp('s')
  18. time.sleep(rand_number)
  19. pyautogui.keyDown('w')
  20. time.sleep(rand_number)
  21. pyautogui.keyUp('w')
  22. pyautogui.keyDown('s')
  23. time.sleep(rand_number)
  24. pyautogui.keyUp('s')
  25. time.sleep(rand_number)
  26. pyautogui.keyDown('w')
  27. time.sleep(rand_number)
  28. pyautogui.keyUp('w')
  29. pyautogui.keyDown('s')
  30. time.sleep(rand_number)
  31. pyautogui.keyUp('s')
  32. pyautogui.screenshot(r'started.png', region=(385,1283,75,15))
  33. startedtext = pytesseract.image_to_string(Image.open('started.png'))
  34. print(startedtext)
  35. if 'Eame Started' or 'Tum' in startedtext:
  36. print ('Battle started')
  37. pyautogui.screenshot(r'C:\Users\crimp\AppData\Local\Programs\Python\Python36-32\ss1.png', region=(352,140,29,17))
  38. pyautogui.screenshot(r'C:\Users\crimp\AppData\Local\Programs\Python\Python36-32\ss2.png', region=(969,204,250,20))
  39. pokename = pytesseract.image_to_string(Image.open('ss1.png'))
  40. hypnosis = pytesseract.image_to_string(Image.open('ss2.png'))
  41. print('pokename', pokename)
  42. if 'Glhle' in pokename:
  43. print('OHHHH SHIIIIT!!! OKAY, THIS IS EPIC.')
  44. pyautogui.moveTo(1272, 1220) #hynosis coord
  45. time.sleep(rand_number)
  46. pyautogui.click()
  47. pyautogui.moveTo(1396, 1225) #hynosis coord
  48. time.sleep(rand_number)
  49. pyautogui.click()
  50. time.sleep(1.0)
  51. pyautogui.screenshot(r'C:\Users\crimp\AppData\Local\Programs\Python\Python36-32\ss2.png', region=(969,204,250,20))
  52. hypnosis = pytesseract.image_to_string(Image.open('ss2.png'))
  53. print(hypnosis)
  54. time.sleep(1.0)
  55. pyautogui.screenshot(r'C:\Users\crimp\AppData\Local\Programs\Python\Python36-32\ss2.png', region=(969,204,250,20))
  56. hypnosis = pytesseract.image_to_string(Image.open('ss2.png'))
  57. print(hypnosis)
  58. pyautogui.screenshot(r'C:\Users\crimp\AppData\Local\Programs\Python\Python36-32\ss2.png', region=(969,204,250,20))
  59. hypnosis = pytesseract.image_to_string(Image.open('ss2.png'))
  60. time.sleep(1.0)
  61. pyautogui.screenshot(r'C:\Users\crimp\AppData\Local\Programs\Python\Python36-32\ss2.png', region=(969,204,250,20))
  62. hypnosis = pytesseract.image_to_string(Image.open('ss2.png'))
  63. print(hypnosis)
  64. time.sleep(1.0)
  65. pyautogui.screenshot(r'C:\Users\crimp\AppData\Local\Programs\Python\Python36-32\ss2.png', region=(969,204,250,20))
  66. hypnosis = pytesseract.image_to_string(Image.open('ss2.png'))
  67. print(hypnosis)
  68. pyautogui.screenshot(r'C:\Users\crimp\AppData\Local\Programs\Python\Python36-32\ss2.png', region=(969,204,250,20))
  69. hypnosis = pytesseract.image_to_string(Image.open('ss2.png'))
  70. time.sleep(1.0)
  71. pyautogui.screenshot(r'C:\Users\crimp\AppData\Local\Programs\Python\Python36-32\ss2.png', region=(969,204,250,20))
  72. hypnosis = pytesseract.image_to_string(Image.open('ss2.png'))
  73. print(hypnosis)
  74. time.sleep(1.0)
  75. pyautogui.screenshot(r'C:\Users\crimp\AppData\Local\Programs\Python\Python36-32\ss2.png', region=(969,204,250,20))
  76. hypnosis = pytesseract.image_to_string(Image.open('ss2.png'))
  77. print(hypnosis)
  78. if "Emla IS fast aslaa '" or "Emla IS fast asleep," in hypnosis:
  79. time.sleep(rand_number)
  80. pyautogui.moveTo(1276, 1293) #item
  81. time.sleep(rand_number)
  82. pyautogui.click()
  83. time.sleep(rand_number)
  84. pyautogui.moveTo(1178, 571)
  85. pyautogui.click()
  86. time.sleep(rand_number)
  87. pyautogui.moveTo(1360, 610)
  88. pyautogui.click()
  89. #else:
  90. # pyautogui.moveTo(1272, 1220) #hynosis coord
  91. #time.sleep(rand_number)
  92. # pyautogui.moveTo(1239, 1225) #hynosis coord
  93. else:
  94. time.sleep(1)
  95. print('womp womp ' + pokename + hypnosis)
  96. pyautogui.moveTo(1445, 1279)
  97. pyautogui.click()
  98. else:
  99. continue
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement