LmeSzinc / AzurLaneAutoScript

Azur Lane bot (CN/EN/JP/TW) 碧蓝航线脚本 | 无缝委托科研,全自动大世界
https://alas.azurlane.cloud
GNU General Public License v3.0
6.98k stars 839 forks source link

自动买图纸卡点太准时导致的显示异常 #2196

Closed icateav closed 1 year ago

icateav commented 1 year ago

在提问之前...

描述你的问题

在log中可以看见,原本10w左右物资在买完10张彩图纸后,购买金图纸前物资直接变为6w4,同时当时彩图纸显示的是未购买,金图纸正常购买了 我看彩图纸没买于是又买了10张,这时发现物资少一截,回去翻log,确定我没记错物资数量 但是重新登录发现彩图纸折扣为0 意味着我买了20张,与物资消耗对得上

仔细想想大概是卡点太准时了 买完了才刷新为无消耗 所以物资显示错误 我偏偏又看见了手贱又买了10张 总之血亏4w物资,提醒一下其他人别犯这种错误

不过这种准时刷新的项目稍微加一点延迟会不会好点

如何复现

  1. 前往 '...'
  2. 点击 '....'
  3. 滑动到 '....'
  4. 出现问题

预期行为

No response

相关 Logs

═══════════════════════════════════════════════════════════════════════════════════
                                     SHIPYARD                                      
═══════════════════════════════════════════════════════════════════════════════════
INFO     04:00:03.164 │ <<< UI ENSURE >>>                                          
INFO     04:00:03.169 │ UI get current page                                        
INFO     04:00:03.192 │ [UI] page_main                                             
INFO     04:00:03.199 │ Already at page_main                                       
INFO     04:00:03.227 │ Loading OCR model: ./bin/cnocr_models/azur_lane            
INFO     04:00:03.493 │ [SHOP_GOLD_COINS 0.289s] 109267                            
INFO     04:00:03.546 │ [SHOP_GEMS 0.047s] 6364                                    
INFO     04:00:03.550 │ Gold coins: 109267, Gems: 6364                             
INFO     04:00:03.557 │ <<< UI GOTO PAGE_SHIPYARD >>>                              
INFO     04:00:03.734 │ Page switch: page_main -> page_reshmenu                    
INFO     04:00:03.741 │ Click ( 768,  693) @ MAIN_GOTO_RESHMENU                    
INFO     04:00:04.842 │ Page switch: page_reshmenu -> page_shipyard                
INFO     04:00:04.849 │ Click ( 662,  348) @ RESHMENU_GOTO_SHIPYARD                
INFO     04:00:06.384 │ Page arrive: page_shipyard                                 
INFO     04:00:06.388 │ <<< UI CLICK >>>                                           
INFO     04:00:06.488 │ Click (  96,  687) @ SHIPYARD_SERIES_SELECT_ENTER          
INFO     04:00:06.949 │ <<< UI CLICK >>>                                           
INFO     04:00:06.987 │ Click ( 787,  282) @ SHIPYARD_SERIES_GRID_1_0              
INFO     04:00:07.861 │ SHIPYARD_FACE_GRID set to left=5                           
INFO     04:00:07.870 │ Nav item active: 0 from range (0, 5)                       
INFO     04:00:07.873 │ Click (1043,  639) @ SHIPYARD_FACE_GRID_4_0                
INFO     04:00:08.122 │ Nav item active: 4 from range (0, 5)                       
INFO     04:00:10.038 │ Click (1111,  456) @ SHIPYARD_GO_FATE                      
INFO     04:00:11.704 │ [OCR_BP_COUNT 0.115s] [66, 14, 53, 0, 0, 0]                
INFO     04:00:11.708 │ Can buy all 10 BPs                                         
INFO     04:00:11.819 │ [SHIPYARD_TOTAL_FATE 0.073s] 0                             
INFO     04:00:12.240 │ Click (1208,  479) @ SHIPYARD_PLUS_FATE                    
INFO     04:00:12.642 │ Click (1223,  477) @ SHIPYARD_PLUS_FATE                    
INFO     04:00:13.080 │ Click (1219,  469) @ SHIPYARD_PLUS_FATE                    
INFO     04:00:13.513 │ Click (1208,  469) @ SHIPYARD_PLUS_FATE                    
INFO     04:00:13.882 │ Click (1225,  465) @ SHIPYARD_PLUS_FATE                    
INFO     04:00:14.257 │ Click (1218,  464) @ SHIPYARD_PLUS_FATE                    
INFO     04:00:14.645 │ Click (1213,  476) @ SHIPYARD_PLUS_FATE                    
INFO     04:00:15.043 │ Click (1220,  470) @ SHIPYARD_PLUS_FATE                    
INFO     04:00:15.415 │ Click (1210,  474) @ SHIPYARD_PLUS_FATE                    
INFO     04:00:15.809 │ Click (1213,  478) @ SHIPYARD_PLUS_FATE                    
INFO     04:00:16.419 │ [SHIPYARD_TOTAL_FATE 0.061s] 10                            
INFO     04:00:16.422 │ Capable of consuming all 10 BPs                            
INFO     04:00:16.447 │ Click (1176,  545) @ SHIPYARD_CONFIRM_FATE                 
INFO     04:00:16.962 │ Click ( 785,  519) @ POPUP_CONFIRM_BP_BUY                  
INFO     04:00:21.492 │ <<< UI ENSURE >>>                                          
INFO     04:00:21.495 │ UI get current page                                        
INFO     04:00:21.543 │ Unknown ui page                                            
INFO     04:00:21.559 │ Click (1230,   27) @ GOTO_MAIN                             
INFO     04:00:21.789 │ Unknown ui page                                            
INFO     04:00:22.174 │ [Package_name] com.bilibili.azurlane                       
INFO     04:00:22.224 │ [Device Orientation] 0 (Normal)                            
INFO     04:00:22.340 │ [UI] page_main                                             
INFO     04:00:22.342 │ Already at page_main                                       
INFO     04:00:22.405 │ [SHOP_GOLD_COINS 0.060s] 64267                             
INFO     04:00:22.461 │ [SHOP_GEMS 0.052s] 6364                                    
INFO     04:00:22.469 │ Gold coins: 64267, Gems: 6364                              
INFO     04:00:22.472 │ <<< UI GOTO PAGE_SHIPYARD >>>                              
INFO     04:00:22.487 │ Page switch: page_main -> page_reshmenu                    
INFO     04:00:22.491 │ Click ( 698,  676) @ MAIN_GOTO_RESHMENU                    
INFO     04:00:23.291 │ Page switch: page_reshmenu -> page_shipyard                
INFO     04:00:23.294 │ Click ( 641,  322) @ RESHMENU_GOTO_SHIPYARD                
INFO     04:00:24.143 │ Page arrive: page_shipyard                                 
INFO     04:00:24.149 │ <<< UI CLICK >>>                                           
INFO     04:00:24.155 │ Click ( 102,  664) @ SHIPYARD_SERIES_SELECT_ENTER          
INFO     04:00:24.469 │ <<< UI CLICK >>>                                           
INFO     04:00:24.481 │ Click ( 499,  367) @ SHIPYARD_SERIES_GRID_0_1              
INFO     04:00:25.343 │ SHIPYARD_FACE_GRID set to left=4                           
INFO     04:00:25.350 │ Nav item active: 0 from range (0, 5)                       
INFO     04:00:25.358 │ Click ( 823,  656) @ SHIPYARD_FACE_GRID_3_0                
INFO     04:00:25.660 │ Nav item active: 3 from range (0, 5)                       
INFO     04:00:27.482 │ Click (1121,  456) @ SHIPYARD_GO_FATE                      
WARNING  04:00:29.110 │ OCR OCR_BP_COUNT: Result "" is revised to "0"              
INFO     04:00:29.115 │ [OCR_BP_COUNT 0.136s] [0, 0, 168, 0, 145, 0]               
INFO     04:00:29.122 │ Can buy all 10 BPs                                         
INFO     04:00:29.207 │ [SHIPYARD_TOTAL_FATE 0.067s] 0                             
INFO     04:00:29.616 │ Click (1217,  463) @ SHIPYARD_PLUS_FATE                    
INFO     04:00:30.001 │ Click (1216,  477) @ SHIPYARD_PLUS_FATE                    
INFO     04:00:30.422 │ Click (1219,  458) @ SHIPYARD_PLUS_FATE                    
INFO     04:00:30.800 │ Click (1211,  459) @ SHIPYARD_PLUS_FATE                    
INFO     04:00:31.230 │ Click (1222,  457) @ SHIPYARD_PLUS_FATE                    
INFO     04:00:31.600 │ Click (1216,  470) @ SHIPYARD_PLUS_FATE                    
INFO     04:00:31.941 │ Click (1212,  463) @ SHIPYARD_PLUS_FATE                    
INFO     04:00:32.346 │ Click (1221,  475) @ SHIPYARD_PLUS_FATE                    
INFO     04:00:32.722 │ Click (1220,  468) @ SHIPYARD_PLUS_FATE                    
INFO     04:00:33.147 │ Click (1212,  473) @ SHIPYARD_PLUS_FATE                    
INFO     04:00:33.809 │ [SHIPYARD_TOTAL_FATE 0.066s] 10                            
INFO     04:00:33.813 │ Capable of consuming all 10 BPs                            
INFO     04:00:33.824 │ Click (1167,  542) @ SHIPYARD_CONFIRM_FATE                 
INFO     04:00:34.351 │ Click ( 786,  517) @ POPUP_CONFIRM_BP_BUY                  
INFO     04:00:38.859 │ Delay task `Shipyard` to 2023-02-03 04:00:00               
         (server_update='04:00')                                                   
INFO     04:00:38.889 │ Bind task {'Alas', 'Shipyard', 'General'}                  
INFO     04:00:38.892 │ Save config ./config\mumu.json,                            
         Shipyard.Scheduler.NextRun=datetime.datetime(2023, 2, 3, 4, 0)            
INFO     04:00:39.052 │ Scheduler: End task `Shipyard`                             
INFO     04:00:39.057 │ [Server] cn                                                
INFO     04:00:39.091 │ Bind task {'Alas', 'General'}                              
INFO     04:00:39.099 │ No task pending                                            
INFO     04:00:39.106 │ [Task] Commission (Enable, 2023-02-02 04:10:40)            
INFO     04:00:39.109 │ Bind task {'Alas', 'Commission', 'General'}                
INFO     04:00:39.125 │ Wait until 2023-02-02 04:10:40 for task `Commission`       
INFO     04:00:39.128 │ Goto main page during wait                                 
INFO     04:00:39.491 │ [Package_name] com.bilibili.azurlane                       
INFO     04:00:39.494 │ App is already running, goto main page                     
INFO     04:00:39.500 │ <<< UI ENSURE >>>                                          
INFO     04:00:39.506 │ UI get current page                                        
INFO     04:00:39.553 │ Unknown ui page                                            
INFO     04:00:39.557 │ Click (1223,   34) @ GOTO_MAIN                             
INFO     04:00:39.703 │ Unknown ui page                                            
INFO     04:00:39.836 │ [Package_name] com.bilibili.azurlane                       
INFO     04:00:39.938 │ [Device Orientation] 0 (Normal)                            
INFO     04:00:40.002 │ [UI] page_main                                             
INFO     04:00:40.005 │ Already at page_main                                       
[mumu] exited. Reason: Manual stop

截图

No response

还有别的吗?

No response

bookbug666 commented 1 year ago

image

你可以嘗試調整這個選項

LmeSzinc commented 1 year ago

看起来是客户端与服务端不同步,alas按时间去买,服务端也是正确计算的。不手动操作游戏就没有问题,或者可以4点重启游戏来强制让客户端从服务端同步。