pcacc 4 сар өмнө
parent
commit
2c88c87649
1 өөрчлөгдсөн 24 нэмэгдсэн , 0 устгасан
  1. 24 0
      app_dongri.py

+ 24 - 0
app_dongri.py

@@ -224,6 +224,23 @@ def auto_ranshuang():
             handle_restart_game()
             break
 
+def auto_palace():
+    global g_times, g_cureNum
+    timeout = 180 * 60
+    start_time = time.time()  # 记录开始时间
+    while not event.is_set():
+        if len(task_queue) < 4:
+            task_queue.appendleft(task_fight_enemy())
+            task_queue.appendleft(task_cure(True, g_cureNum))
+
+        myTimeSleep_big()
+        current_time = time.time()
+        elapsed_time = current_time - start_time
+        
+        if elapsed_time >= timeout:
+            handle_restart_game()
+
+
     
 
 def add_auto_task(isMaxCollect, isJina, isSimple = False, isAddStrengh = False, activity = 'None', isAutoParticipate = True, isDailyConfig = False, train_type = 'None', always = False):  
@@ -480,6 +497,13 @@ def handle_auto_ranshuang():
     send_status(f'开始自动燃霜')
     executor.submit(auto_ranshuang)
 
+@socketio.on('auto_place')
+def handle_auto_place():
+    global autoTask
+    send_status(f'开始自动王城')
+    executor.submit(auto_place)
+
+
 if __name__ == '__main__':
     init()
     if '--reset' in sys.argv: