Browse Source

!2 update mumu game

pcacc 2 tuần trước cách đây
mục cha
commit
3943ef4821

BIN
dongri_img/gameStart/ico.png


BIN
dongri_img/place/ico3.png


BIN
dongri_img/place/title.png


+ 1 - 0
dongri_pic.py

@@ -11,6 +11,7 @@ class place_img:
     title = R'dongri_img\place\title.png'
     ico = R'dongri_img\place\ico.png'
     ico2 = R'dongri_img\place\ico2.png'
+    ico3 = R'dongri_img\place\ico3.png'
     back1 = R'dongri_img\place\back1.png'
     back2 = R'dongri_img\place\back2.png'
     back3 = R'dongri_img\place\back3.png'

+ 10 - 9
dongri_task.py

@@ -122,7 +122,7 @@ class basic_operate:
             return ret
         ret, pos = waitFindImg(place_img.title, 1, 0)
         if ret:
-            pcacc_mouse.click(pos[0] + 20, pos[1] + 80)
+            pcacc_mouse.click(pos[0] - 20, pos[1] + 80)
 
     @staticmethod
     def backToGame(preTime = 0):
@@ -234,7 +234,7 @@ def task_return_game():
     tryTimes = 3
     while tryTimes > 0:
         if False == waitFindImg_withBool([place_img.title], 2, 0):
-            waitClickImg_noWait([place_img.ico, place_img.ico2], 1, 0)
+            waitClickImg_noWait([place_img.ico, place_img.ico2, place_img.ico3], 1, 0)
             myTimeSleep_big()
             tryTimes -= 1
             if tryTimes == 0:
@@ -253,17 +253,18 @@ def task_save_compress_pic():
         f.write(compressed_data)
 
 def task_close_game():
-    subprocess.call(f"taskkill /f /im MuMuPlayer.exe")
+    subprocess.call(f"taskkill /f /im MuMuNxMain.exe")
     subprocess.call(f"taskkill /f /im MuMuVMMHeadless.exe")
     subprocess.call(f"taskkill /f /im MuMuVMMSVC.exe")
     myTimeSleep_big()
 
 def task_start_game(type=0):
     isSuccess = True
-    path1 = R'C:\\Program Files\\Netease\\MuMuPlayer-12.0\\shell\\MuMuPlayer.exe'
-    path2 = R'C:\Program Files\Netease\MuMu Player 12\shell\MuMuPlayer.exe'
+    path1 = R'C:\\Program Files\\Netease\\MuMu Player 12\\nx_main\\MuMuNxMain.exe'
+    path2 = R'C:\Program Files\Netease\MuMu Player 12\shell\MuMuNxMain.exe'
+    param = " -v 0"
     if os.path.exists(path1):
-        subprocess.Popen(path1)
+        subprocess.Popen(path1 + param)
     elif os.path.exists(path2):
         subprocess.Popen(path2)
     waitClickImg_withBool(gameStart_img.not_upgrade, 20, 10)
@@ -1751,10 +1752,10 @@ if __name__ == '__main__':
     #yys_ocrAuto(check_img.line_orc)
     #basic_operate.go_town()
     #basic_operate.add_strength()
-    task_fightMonster(False, True,False).run()
+    #task_fightMonster(False, True,False).run()
     #task_checkHelp().run()
     #task_checkStoreRoom().run()
-    #task_start_game(1)
+    task_start_game(1)
     #check_safe_collect().run()
     #task_fight_campion().run()
     #task_activity_lianmeng().run()
@@ -1765,7 +1766,7 @@ if __name__ == '__main__':
     #check_buildOrResearch().run()
     #task_checkDonata().run()
     #task_checkUnionTreasure().run()
-    task_checkAdventure2().run()
+    #task_checkAdventure2().run()
     #task_collect(1).run()
     #task_collect(2).run()
     #task_collect(3).run()

+ 5 - 5
scriptBase/comon.py

@@ -243,7 +243,7 @@ def find_window_pos(title):
         return False, None
 
 def find_yys_pos():
-    return find_window_pos('Mumu模拟器12')
+    return find_window_pos('MuMu安卓设备12')
 
 def get_first_single_digit(string):
     pattern = r'\d'  # 匹配一个独立的单个数字
@@ -283,10 +283,10 @@ def ocrAuto(gamestr, positions):
     return lineStr
 
 def yys_ocrAuto(positions):
-    return ocrAuto('Mumu模拟器12', positions)
+    return ocrAuto('MuMu安卓设备12', positions)
 
 def yys_dragAuto(positions, isQuick=False):
-    return dragAuto('Mumu模拟器12', positions, isQuick)
+    return dragAuto('MuMu安卓设备12', positions, isQuick)
 
 def getRegion(gamestr, region, isWidth):
     tmpRet, tmpPos = find_window_pos(gamestr)
@@ -297,7 +297,7 @@ def getRegion(gamestr, region, isWidth):
     else:
         return (region[0] + tmpPos[0], region[1] + tmpPos[1], region[2] + tmpPos[0], region[3] + tmpPos[1])
 def game_region():
-    tmpRet, tmpPos = find_window_pos('Mumu模拟器12',)
+    tmpRet, tmpPos = find_window_pos('MuMu安卓设备12',)
     return tmpRet, tmpPos
 
 def save_game_screen(fileHeader=""):
@@ -334,7 +334,7 @@ def stop_recording():
 
 
 def yys_getRegion(region, isWidth= False):
-    return getRegion('Mumu模拟器12', region, isWidth)
+    return getRegion('MuMu安卓设备12', region, isWidth)
 
 def click_waitimg(pos_x,pos_y,img):
     retry_times = 3

+ 4 - 4
yys_task.py

@@ -136,15 +136,15 @@ def task_close_game():
     if waitClickImg_withBool(gameStart_img.close, 5, 1):
         myTimeSleep(10)
 
-    subprocess.call(f"taskkill /f /im MuMuPlayer.exe")
+    subprocess.call(f"taskkill /f /im MuMuNxMain.exe")
     subprocess.call(f"taskkill /f /im MuMuVMMHeadless.exe")
     subprocess.call(f"taskkill /f /im MuMuVMMSVC.exe")
     myTimeSleep_big()
 
 def task_start_game():
     isSuccess = False
-    path1 = R'C:\\Program Files\\Netease\\MuMuPlayer-12.0\\shell\\MuMuPlayer.exe'
-    path2 = R'C:\Program Files\Netease\MuMu Player 12\shell\MuMuPlayer.exe'
+    path1 = R'C:\\Program Files\\Netease\\MuMuNxMain-12.0\\shell\\MuMuNxMain.exe'
+    path2 = R'C:\Program Files\Netease\MuMu Player 12\shell\MuMuNxMain.exe'
     if os.path.exists(path1):
         subprocess.Popen(path1)
     elif os.path.exists(path2):
@@ -696,7 +696,7 @@ if __name__ == '__main__':
         task_fightYaoqi(YAOQI.RIHEFANG).run()
     task_baigui().run()
     
-    tmpRet, tmpPos = find_window_pos('Mumu模拟器12')
+    tmpRet, tmpPos = find_window_pos('MuMu安卓设备12')
     pyautogui.screenshot(imageFilename='yys.png', region=tmpPos)
     #print(task_goto_place(PLACE.OUTSIDE))