Jelajahi Sumber

!2 update shili

pcacc 3 bulan lalu
induk
melakukan
ba75da9ae4

+ 4 - 2
app_dongri.py

@@ -172,12 +172,12 @@ def handle_read_cfg():
     cfg = read_cfg()
     emit('processing_cfg', cfg)
 
-def restart_game():
+def restart_game(type=0):
     global isGameBegin
     isGameBegin = False
     while True:
         task_close_game()
-        if True == task_start_game():
+        if True == task_start_game(type):
             break
         else:
             send_status("启动失败")
@@ -483,6 +483,7 @@ def auto_task(data):
         always = False
         cureNumber = 500
         lineCheck = False
+        switch = False
         
     else:
         isMaxCollect = data['maxCollect']
@@ -496,6 +497,7 @@ def auto_task(data):
         always = data['always']
         cureNumber = data['cureNumber']
         lineCheck = data['lineCheck']
+        switch = data['switch']
 
     g_cureNum = cureNumber
     set_lineCheck(lineCheck)

TEMPAT SAMPAH
dongri_img/gameStart/second_game.png


TEMPAT SAMPAH
dongri_img/special_activity/shili_120_2.png


TEMPAT SAMPAH
dongri_img/special_activity/shili_2.png


+ 3 - 0
dongri_pic.py

@@ -2,6 +2,7 @@
 class gameStart_img:
     # = R'dongri_img\gameStart\.png'
     ico = R'dongri_img\gameStart\ico.png'
+    second_game = R'dongri_img\gameStart\second_game.png'
     close = R'dongri_img\gameStart\close.png'
     not_upgrade = R'dongri_img\gameStart\not_upgrade.png'
 
@@ -222,8 +223,10 @@ class special_activity_img:
     lianmeng = R'dongri_img\special_activity\lianmeng.png'
     lianmeng2 = R'dongri_img\special_activity\lianmeng2.png'
     shili = R'dongri_img\special_activity\shili.png'
+    shili_2 = R'dongri_img\special_activity\shili_2.png'
     shili2 = R'dongri_img\special_activity\shili2.png'
     shili_120 = R'dongri_img\special_activity\shili_120.png'
+    shili_120_2 = R'dongri_img\special_activity\shili_120_2.png'
     shili_860 = R'dongri_img\special_activity\shili_860.png'
     shili_860_2 = R'dongri_img\special_activity\shili_860_2.png'
     shili_860_3 = R'dongri_img\special_activity\shili_860_3.png'

+ 13 - 6
dongri_task.py

@@ -213,7 +213,7 @@ def task_close_game():
     subprocess.call(f"taskkill /f /im MuMuVMMSVC.exe")
     myTimeSleep_big()
 
-def task_start_game():
+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'
@@ -222,8 +222,14 @@ def task_start_game():
     elif os.path.exists(path2):
         subprocess.Popen(path2)
     waitClickImg_withBool(gameStart_img.not_upgrade, 20, 10)
-    if waitClickImg_withBool(gameStart_img.ico, 100, 0) == False:
-        return False
+    if type == 0:
+        if waitClickImg_withBool(gameStart_img.ico, 100, 0) == False:
+            return False
+    else:
+        if waitClickImg_withBool(gameStart_img.second_game, 100, 0) == False:
+            return False
+        if waitClickImg_withBool(gameStart_img.ico, 5, 0) == False:
+            return False
     
     waitFindImg_withBool(place_img.gameIn, 10, 20)
     basic_operate.go_town()
@@ -1001,11 +1007,11 @@ class task_activity_lianmeng(dongri_task):
             down_tryTimes = 3
             while down_tryTimes > 0:
                 down_tryTimes -= 1
-                if waitClickImg_noWait_withBool((special_activity_img.shili_120, special_activity_img.shili_860_2, special_activity_img.shili_430), 1, 0.5, True) == True:
+                if waitClickImg_noWait_withBool((special_activity_img.shili_120_2, special_activity_img.shili_860_2, special_activity_img.shili_430), 1, 0.5, True) == True:
                     if waitClickImg_noWait_withBool(special_activity_img.accept_task, 2, 1) == False:
                         return False
                     break
-                elif waitFindImg_withBool(special_activity_img.shili, 1, 0.5) == True:
+                elif waitFindImg_withBool(special_activity_img.shili_2, 1, 0.5) == True:
                     save_game_screen()
 
                 yys_dragAuto(special_activity_img.move_down)
@@ -1285,7 +1291,8 @@ if __name__ == '__main__':
     #task_fightMonster(False, False,False).run()
     #task_checkHelp().run()
     #task_checkStoreRoom().run()
-    task_activity_lianmeng().run()
+    task_start_game(0)
+    #task_activity_lianmeng().run()
     #task_fight_yongbing(True).run()
     #task_collect([4,3,2,1]).run()
     #task_train("upgrade").run()

+ 5 - 0
templates/index_dongri.html

@@ -89,6 +89,7 @@
                 </select>
             </label>
             <label><input type="checkbox" id="SimpleCheckbox"> 是否小号</label>
+            <label><input type="checkbox" id="switchCheckbox"> 是否切换</label>
             <label><input type="checkbox" id="lineCheckbox"> 预留队列</label>
             <label><input type="checkbox" id="AddStrenghCheckbox"> 是否添加体力</label>
             <label><input type="checkbox" id="participateJijieCheckbox"> 是否参与集结</label>
@@ -147,6 +148,7 @@
             const cureNumberInput = document.getElementById('cureNumberCheckbox'); // 文本输入框
             const jiNaSelect = document.getElementById('JiNaCheckbox'); // 下拉列表
             const simpleCheckbox = document.getElementById('SimpleCheckbox'); // 复选框
+            const switchCheckbox = document.getElementById('switchCheckbox'); // 复选框
             const lineCheckbox = document.getElementById('lineCheckbox'); // 复选框
             const AddStrenghCheckbox = document.getElementById('AddStrenghCheckbox'); // 复选框
             const participateJijieCheckbox = document.getElementById('participateJijieCheckbox'); // 复选框
@@ -164,6 +166,7 @@
             cureNumberInput.value = msg['cureNumber']; // 设置文本输入框的值
             jiNaSelect.value = msg['jina']; // 设置下拉列表的值
             simpleCheckbox.checked = msg['simple']; // 设置复选框的状态
+            switchCheckbox.checked = msg['switch']; // 设置复选框的状态
             lineCheckbox.checked = msg['lineCheck']; // 设置复选框的状态
             AddStrenghCheckbox.checked = msg['add_strength']; // 设置复选框的状态
             AcitivitySelect.value = msg['activity']; // 设置下拉列表的值
@@ -216,6 +219,7 @@
             const cureNumberValue = document.getElementById('cureNumberCheckbox').value; // 获取文本输入框的值
             const jiNaValue = document.getElementById('JiNaCheckbox').value; // 获取下拉列表的值
             const isSimple = document.getElementById('SimpleCheckbox').checked; // 获取复选框的状态
+            const switchValue = document.getElementById('switchCheckbox').checked; // 获取复选框的状态
             const lineCheck = document.getElementById('lineCheckbox').checked; // 获取复选框的状态
             const isAddStrengh = document.getElementById('AddStrenghCheckbox').checked; // 获取复选框的状态
             const activityValue = document.getElementById('AcitivityCheckbox').value; // 获取下拉列表的值
@@ -234,6 +238,7 @@
                 cureNumber: cureNumberValue, // 发送文本输入框的值
                 jina: jiNaValue, // 发送下拉列表的值
                 simple: isSimple // 发送复选框的状态
+                ,switch:switchValue
                 ,lineCheck:lineCheck
                 ,add_strength:isAddStrengh
                 ,activity:activityValue