뽑기 매크로
2748 단어 게임
import pyautogui
import cv2
def kinsure(x):
pyautogui.screenshot('filename.png')
img = cv2.imread("filename.png", 0)
temp = cv2.imread(x, 0)
result = cv2.matchTemplate(img, temp, cv2.TM_CCOEFF_NORMED)
min_val, max_val, min_loc, max_loc = cv2.minMaxLoc(result)
if max_val >= 0.95:
pyautogui.click(max_loc)
pyautogui.FAILSAFE = True
pyautogui.PAUSE = 2
while 1:
kinsure("test7.png")
pyautogui.screenshot('filename.png')
img = cv2.imread("filename.png", 0)
temp = cv2.imread("test8.png", 0)
result = cv2.matchTemplate(img, temp, cv2.TM_CCOEFF_NORMED)
min_val, max_val, min_loc, max_loc = cv2.minMaxLoc(result)
if max_val >= 0.95:
pyautogui.PAUSE = 10
pyautogui.click(max_loc)
kinsure("test9.png")
kinsure("test10.png")
kinsure("test11.png")
kinsure("test12.png")
kinsure("test13.png")
kinsure("test14.png")
pyautogui.PAUSE = 2
2초마다 test7.png 또는 test8.png 찾기
test7.png가 발견되면 거기를 클릭하여 2초마다 모니터링을 계속합니다.
test8.png가 발견되면 (즉, 가방이 가득 차면) 10 초 간격으로 test9 ~ 14.png를 클릭하십시오.
이하 test7.png ~ test14.png
![](https://s1.md5.ltd/image/8fd234dc64410c70f9b9771a1c9a2d34.png)
![](https://s1.md5.ltd/image/618dd6be042235d6da41471d82bc0d2b.png)
![](https://s1.md5.ltd/image/96925d7008a31fbef53d2fc783425cf7.png)
![](https://s1.md5.ltd/image/81bb3b0d87c87448aed5c2d837d05eea.png)
![](https://s1.md5.ltd/image/d0c4d9f124c2b3c130ea93e63e696117.png)
![](https://s1.md5.ltd/image/e6148085b8b63f0e2239bd6121bca1e0.png)
![](https://s1.md5.ltd/image/73223a4d28211ea0ff04455ff68dce65.png)
![](https://s1.md5.ltd/image/49681815e9c7bbd9f67ace37b7885b0b.png)
가방이 가득 찰 때까지 가챠를 돌려 가방이 가득 차면 일괄 분해하고 다시 가챠를 돌려주는 매크로를 만들 수 있습니다.
while 문 안을 다시 써서 자신만의 매크로를 만들자!
Reference
이 문제에 관하여(뽑기 매크로), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/gacchamacro/items/7a54f13a56721a6f6d70텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)