diff --git a/globalVar.py b/globalVar.py index c9dfa0e..eb0ce89 100644 --- a/globalVar.py +++ b/globalVar.py @@ -15,13 +15,22 @@ def init(): global version global exitCode -# 执行程序所需参数 +# 执行任务的数量和选项所需参数 exeCfg = {"EXPCount": 0, "ThreadCount": 0, "MirrorCount": 0, "ActivityCount": 0, "WinSwitch": 0, "PrizeSwitch": 0, "MirrorSwitch": 0 , "LunacyToEnkephalinSwitch": 0} # 程序执行结果 exeResult = {"EXPFinishCount":0, "ThreadFinishCount":0, "MirrorFinishCount":0, "ActivityFinishCount":0} +# 罪人的对应 +sinnerNumber = {"YiSang":1,"Faust":2,"DonQuixote":3, + "Ryoshu":4,"Meursault":5,"HongLu":6, + "heathcliff":7,"Ishmael":8,"Rodion":9, + "Sinclair":10,"Outis":11,"Gregor":12} + +# 选人的顺序 +sinnerOrder = {} + # 版本 # 样例:V2.1.9_Realease version = "V2.1.10_Realease" diff --git a/pic/CONNECTING.png b/pic/CONNECTING.png deleted file mode 100644 index b865328..0000000 Binary files a/pic/CONNECTING.png and /dev/null differ diff --git a/pic/back/Give Up.png b/pic/back/Give Up.png new file mode 100644 index 0000000..b127cf8 Binary files /dev/null and b/pic/back/Give Up.png differ diff --git a/pic/back/SceneSetting.png b/pic/back/SceneSetting.png new file mode 100644 index 0000000..fcd4b5a Binary files /dev/null and b/pic/back/SceneSetting.png differ diff --git a/pic/back/To WIndow.png b/pic/back/To WIndow.png new file mode 100644 index 0000000..0bf2271 Binary files /dev/null and b/pic/back/To WIndow.png differ diff --git a/pic/back/blackBackGroundConfirm.png b/pic/back/blackBackGroundConfirm.png new file mode 100644 index 0000000..359b83b Binary files /dev/null and b/pic/back/blackBackGroundConfirm.png differ diff --git a/pic/back/mainMenuSetting.png b/pic/back/mainMenuSetting.png new file mode 100644 index 0000000..d523f89 Binary files /dev/null and b/pic/back/mainMenuSetting.png differ diff --git a/pic/back/settingGear.png b/pic/back/settingGear.png new file mode 100644 index 0000000..1a01222 Binary files /dev/null and b/pic/back/settingGear.png differ diff --git a/pic/back/whiteBackGroundConfirm.png b/pic/back/whiteBackGroundConfirm.png new file mode 100644 index 0000000..48fb301 Binary files /dev/null and b/pic/back/whiteBackGroundConfirm.png differ diff --git a/pic/error/JSchoolNetError.png b/pic/error/JSchoolNetError.png deleted file mode 100644 index 646a80f..0000000 Binary files a/pic/error/JSchoolNetError.png and /dev/null differ diff --git a/pic/error/JSchoolNetSignIn.png b/pic/error/JSchoolNetSignIn.png deleted file mode 100644 index 7a3f1c8..0000000 Binary files a/pic/error/JSchoolNetSignIn.png and /dev/null differ diff --git a/pic/error/PingYin.png b/pic/error/PingYin.png deleted file mode 100644 index 703c75b..0000000 Binary files a/pic/error/PingYin.png and /dev/null differ diff --git a/pic/error/WIFI.png b/pic/error/WIFI.png deleted file mode 100644 index 52e26c9..0000000 Binary files a/pic/error/WIFI.png and /dev/null differ diff --git a/pic/error/WuBi.png b/pic/error/WuBi.png deleted file mode 100644 index b581846..0000000 Binary files a/pic/error/WuBi.png and /dev/null differ diff --git a/pic/event/ToBattle.png b/pic/event/ToBattle.png index 120cc31..6aaaf20 100644 Binary files a/pic/event/ToBattle.png and b/pic/event/ToBattle.png differ diff --git a/pic/luxcavation/EXPDifficultyLv38.png b/pic/luxcavation/EXPDifficultyLv38.png new file mode 100644 index 0000000..382679c Binary files /dev/null and b/pic/luxcavation/EXPDifficultyLv38.png differ diff --git a/pic/luxcavation/ThreadDifficultyLv40.png b/pic/luxcavation/ThreadDifficultyLv40.png new file mode 100644 index 0000000..fece235 Binary files /dev/null and b/pic/luxcavation/ThreadDifficultyLv40.png differ diff --git a/pic/luxcavation/ThreadHard.png b/pic/luxcavation/ThreadHard.png deleted file mode 100644 index fd4467b..0000000 Binary files a/pic/luxcavation/ThreadHard.png and /dev/null differ diff --git a/pic/mirror/mirror3/BuyCoin.png b/pic/mirror/mirror3/BuyCoin.png new file mode 100644 index 0000000..714fcca Binary files /dev/null and b/pic/mirror/mirror3/BuyCoin.png differ diff --git a/pic/mirror/mirror3/ClaimRewards.png b/pic/mirror/mirror3/ClaimRewards.png new file mode 100644 index 0000000..903d2cf Binary files /dev/null and b/pic/mirror/mirror3/ClaimRewards.png differ diff --git a/pic/mirror/mirror3/EGOGiftOwned.png b/pic/mirror/mirror3/EGOGiftOwned.png new file mode 100644 index 0000000..92086cb Binary files /dev/null and b/pic/mirror/mirror3/EGOGiftOwned.png differ diff --git a/pic/mirror/mirror3/Enter.png b/pic/mirror/mirror3/Enter.png new file mode 100644 index 0000000..918676e Binary files /dev/null and b/pic/mirror/mirror3/Enter.png differ diff --git a/pic/mirror/mirror3/Gear.png b/pic/mirror/mirror3/Gear.png new file mode 100644 index 0000000..2856fd4 Binary files /dev/null and b/pic/mirror/mirror3/Gear.png differ diff --git a/pic/mirror/mirror3/LeftArrow.png b/pic/mirror/mirror3/LeftArrow.png new file mode 100644 index 0000000..a08c6b2 Binary files /dev/null and b/pic/mirror/mirror3/LeftArrow.png differ diff --git a/pic/mirror/mirror3/Mirror3Normal.png b/pic/mirror/mirror3/Mirror3Normal.png new file mode 100644 index 0000000..dcaf635 Binary files /dev/null and b/pic/mirror/mirror3/Mirror3Normal.png differ diff --git a/pic/mirror/mirror3/MirrorDungeons.png b/pic/mirror/mirror3/MirrorDungeons.png new file mode 100644 index 0000000..f5df650 Binary files /dev/null and b/pic/mirror/mirror3/MirrorDungeons.png differ diff --git a/pic/mirror/mirror3/Preset.png b/pic/mirror/mirror3/Preset.png new file mode 100644 index 0000000..6174e97 Binary files /dev/null and b/pic/mirror/mirror3/Preset.png differ diff --git a/pic/mirror/mirror3/Receive.png b/pic/mirror/mirror3/Receive.png new file mode 100644 index 0000000..98cfc59 Binary files /dev/null and b/pic/mirror/mirror3/Receive.png differ diff --git a/pic/mirror/mirror3/Resume.png b/pic/mirror/mirror3/Resume.png new file mode 100644 index 0000000..fc3aa1f Binary files /dev/null and b/pic/mirror/mirror3/Resume.png differ diff --git a/pic/mirror/mirror3/blackConfirm.png b/pic/mirror/mirror3/blackConfirm.png new file mode 100644 index 0000000..f05e944 Binary files /dev/null and b/pic/mirror/mirror3/blackConfirm.png differ diff --git a/pic/mirror/mirror3/ego/RandomEGOGift.png b/pic/mirror/mirror3/ego/RandomEGOGift.png new file mode 100644 index 0000000..035d90b Binary files /dev/null and b/pic/mirror/mirror3/ego/RandomEGOGift.png differ diff --git a/pic/mirror/mirror3/ego/SelectEGOGift.png b/pic/mirror/mirror3/ego/SelectEGOGift.png new file mode 100644 index 0000000..7f891ad Binary files /dev/null and b/pic/mirror/mirror3/ego/SelectEGOGift.png differ diff --git a/pic/mirror/mirror3/ego/confirmRandomEGOGift.png b/pic/mirror/mirror3/ego/confirmRandomEGOGift.png new file mode 100644 index 0000000..62522d9 Binary files /dev/null and b/pic/mirror/mirror3/ego/confirmRandomEGOGift.png differ diff --git a/pic/mirror/mirror3/ego/egoGift.png b/pic/mirror/mirror3/ego/egoGift.png new file mode 100644 index 0000000..b005a93 Binary files /dev/null and b/pic/mirror/mirror3/ego/egoGift.png differ diff --git a/pic/mirror/mirror3/firstTeamConfirm.png b/pic/mirror/mirror3/firstTeamConfirm.png new file mode 100644 index 0000000..a96031e Binary files /dev/null and b/pic/mirror/mirror3/firstTeamConfirm.png differ diff --git a/pic/mirror/mirror3/way/Battle/BattleLH.png b/pic/mirror/mirror3/way/Battle/BattleLH.png new file mode 100644 index 0000000..c5096ea Binary files /dev/null and b/pic/mirror/mirror3/way/Battle/BattleLH.png differ diff --git a/pic/mirror/mirror3/way/Battle/BattleLL.png b/pic/mirror/mirror3/way/Battle/BattleLL.png new file mode 100644 index 0000000..1325b56 Binary files /dev/null and b/pic/mirror/mirror3/way/Battle/BattleLL.png differ diff --git a/pic/mirror/mirror3/way/Battle/BattleLM.png b/pic/mirror/mirror3/way/Battle/BattleLM.png new file mode 100644 index 0000000..c083cc4 Binary files /dev/null and b/pic/mirror/mirror3/way/Battle/BattleLM.png differ diff --git a/pic/mirror/mirror3/way/Battle/BattleM.png b/pic/mirror/mirror3/way/Battle/BattleM.png new file mode 100644 index 0000000..c44c008 Binary files /dev/null and b/pic/mirror/mirror3/way/Battle/BattleM.png differ diff --git a/pic/mirror/mirror3/way/Battle/BattleRH.png b/pic/mirror/mirror3/way/Battle/BattleRH.png new file mode 100644 index 0000000..2caea61 Binary files /dev/null and b/pic/mirror/mirror3/way/Battle/BattleRH.png differ diff --git a/pic/mirror/mirror3/way/Battle/BattleRL.png b/pic/mirror/mirror3/way/Battle/BattleRL.png new file mode 100644 index 0000000..53b7ddb Binary files /dev/null and b/pic/mirror/mirror3/way/Battle/BattleRL.png differ diff --git a/pic/mirror/mirror3/way/Battle/BattleRM.png b/pic/mirror/mirror3/way/Battle/BattleRM.png new file mode 100644 index 0000000..2e63245 Binary files /dev/null and b/pic/mirror/mirror3/way/Battle/BattleRM.png differ diff --git a/pic/mirror/mirror3/way/BigSelf.png b/pic/mirror/mirror3/way/BigSelf.png new file mode 100644 index 0000000..805254e Binary files /dev/null and b/pic/mirror/mirror3/way/BigSelf.png differ diff --git a/pic/mirror/mirror3/way/Boss/BossLH.png b/pic/mirror/mirror3/way/Boss/BossLH.png new file mode 100644 index 0000000..7640d57 Binary files /dev/null and b/pic/mirror/mirror3/way/Boss/BossLH.png differ diff --git a/pic/mirror/mirror3/way/Boss/BossLL.png b/pic/mirror/mirror3/way/Boss/BossLL.png new file mode 100644 index 0000000..bfef7d6 Binary files /dev/null and b/pic/mirror/mirror3/way/Boss/BossLL.png differ diff --git a/pic/mirror/mirror3/way/Boss/BossLM.png b/pic/mirror/mirror3/way/Boss/BossLM.png new file mode 100644 index 0000000..7337b41 Binary files /dev/null and b/pic/mirror/mirror3/way/Boss/BossLM.png differ diff --git a/pic/mirror/mirror3/way/Boss/BossM.png b/pic/mirror/mirror3/way/Boss/BossM.png new file mode 100644 index 0000000..434a5aa Binary files /dev/null and b/pic/mirror/mirror3/way/Boss/BossM.png differ diff --git a/pic/mirror/mirror3/way/Boss/BossRH.png b/pic/mirror/mirror3/way/Boss/BossRH.png new file mode 100644 index 0000000..80c8012 Binary files /dev/null and b/pic/mirror/mirror3/way/Boss/BossRH.png differ diff --git a/pic/mirror/mirror3/way/Boss/BossRL.png b/pic/mirror/mirror3/way/Boss/BossRL.png new file mode 100644 index 0000000..4e119e8 Binary files /dev/null and b/pic/mirror/mirror3/way/Boss/BossRL.png differ diff --git a/pic/mirror/mirror3/way/Boss/BossRM.png b/pic/mirror/mirror3/way/Boss/BossRM.png new file mode 100644 index 0000000..fbdcb16 Binary files /dev/null and b/pic/mirror/mirror3/way/Boss/BossRM.png differ diff --git a/pic/mirror/mirror3/way/Bus/BusLH.png b/pic/mirror/mirror3/way/Bus/BusLH.png new file mode 100644 index 0000000..137d07b Binary files /dev/null and b/pic/mirror/mirror3/way/Bus/BusLH.png differ diff --git a/pic/mirror/mirror3/way/Bus/BusLL.png b/pic/mirror/mirror3/way/Bus/BusLL.png new file mode 100644 index 0000000..809f24a Binary files /dev/null and b/pic/mirror/mirror3/way/Bus/BusLL.png differ diff --git a/pic/mirror/mirror3/way/Bus/BusLM.png b/pic/mirror/mirror3/way/Bus/BusLM.png new file mode 100644 index 0000000..ed038ed Binary files /dev/null and b/pic/mirror/mirror3/way/Bus/BusLM.png differ diff --git a/pic/mirror/mirror3/way/Bus/BusM.png b/pic/mirror/mirror3/way/Bus/BusM.png new file mode 100644 index 0000000..bdd9eb5 Binary files /dev/null and b/pic/mirror/mirror3/way/Bus/BusM.png differ diff --git a/pic/mirror/mirror3/way/Bus/BusRH.png b/pic/mirror/mirror3/way/Bus/BusRH.png new file mode 100644 index 0000000..db0e0c3 Binary files /dev/null and b/pic/mirror/mirror3/way/Bus/BusRH.png differ diff --git a/pic/mirror/mirror3/way/Bus/BusRL.png b/pic/mirror/mirror3/way/Bus/BusRL.png new file mode 100644 index 0000000..22f6606 Binary files /dev/null and b/pic/mirror/mirror3/way/Bus/BusRL.png differ diff --git a/pic/mirror/mirror3/way/Bus/BusRM.png b/pic/mirror/mirror3/way/Bus/BusRM.png new file mode 100644 index 0000000..ce8e460 Binary files /dev/null and b/pic/mirror/mirror3/way/Bus/BusRM.png differ diff --git a/pic/mirror/mirror3/way/Chair/ChairLH.png b/pic/mirror/mirror3/way/Chair/ChairLH.png new file mode 100644 index 0000000..dc60247 Binary files /dev/null and b/pic/mirror/mirror3/way/Chair/ChairLH.png differ diff --git a/pic/mirror/mirror3/way/Chair/ChairLL.png b/pic/mirror/mirror3/way/Chair/ChairLL.png new file mode 100644 index 0000000..a86c669 Binary files /dev/null and b/pic/mirror/mirror3/way/Chair/ChairLL.png differ diff --git a/pic/mirror/mirror3/way/Chair/ChairLM.png b/pic/mirror/mirror3/way/Chair/ChairLM.png new file mode 100644 index 0000000..4c18006 Binary files /dev/null and b/pic/mirror/mirror3/way/Chair/ChairLM.png differ diff --git a/pic/mirror/mirror3/way/Chair/ChairM.png b/pic/mirror/mirror3/way/Chair/ChairM.png new file mode 100644 index 0000000..7ccb221 Binary files /dev/null and b/pic/mirror/mirror3/way/Chair/ChairM.png differ diff --git a/pic/mirror/mirror3/way/Chair/ChairRH.png b/pic/mirror/mirror3/way/Chair/ChairRH.png new file mode 100644 index 0000000..e37ffaa Binary files /dev/null and b/pic/mirror/mirror3/way/Chair/ChairRH.png differ diff --git a/pic/mirror/mirror3/way/Chair/ChairRL.png b/pic/mirror/mirror3/way/Chair/ChairRL.png new file mode 100644 index 0000000..de5dfab Binary files /dev/null and b/pic/mirror/mirror3/way/Chair/ChairRL.png differ diff --git a/pic/mirror/mirror3/way/Chair/ChairRM.png b/pic/mirror/mirror3/way/Chair/ChairRM.png new file mode 100644 index 0000000..15102a6 Binary files /dev/null and b/pic/mirror/mirror3/way/Chair/ChairRM.png differ diff --git a/pic/mirror/mirror3/way/Confirm.png b/pic/mirror/mirror3/way/Confirm.png new file mode 100644 index 0000000..3426e28 Binary files /dev/null and b/pic/mirror/mirror3/way/Confirm.png differ diff --git a/pic/mirror/mirror3/way/Encounter/EncounterLH.png b/pic/mirror/mirror3/way/Encounter/EncounterLH.png new file mode 100644 index 0000000..41dcdae Binary files /dev/null and b/pic/mirror/mirror3/way/Encounter/EncounterLH.png differ diff --git a/pic/mirror/mirror3/way/Encounter/EncounterLL.png b/pic/mirror/mirror3/way/Encounter/EncounterLL.png new file mode 100644 index 0000000..9c5175d Binary files /dev/null and b/pic/mirror/mirror3/way/Encounter/EncounterLL.png differ diff --git a/pic/mirror/mirror3/way/Encounter/EncounterLM.png b/pic/mirror/mirror3/way/Encounter/EncounterLM.png new file mode 100644 index 0000000..aab7e00 Binary files /dev/null and b/pic/mirror/mirror3/way/Encounter/EncounterLM.png differ diff --git a/pic/mirror/mirror3/way/Encounter/EncounterM.png b/pic/mirror/mirror3/way/Encounter/EncounterM.png new file mode 100644 index 0000000..0ffa417 Binary files /dev/null and b/pic/mirror/mirror3/way/Encounter/EncounterM.png differ diff --git a/pic/mirror/mirror3/way/Encounter/EncounterRH.png b/pic/mirror/mirror3/way/Encounter/EncounterRH.png new file mode 100644 index 0000000..71f27c3 Binary files /dev/null and b/pic/mirror/mirror3/way/Encounter/EncounterRH.png differ diff --git a/pic/mirror/mirror3/way/Encounter/EncounterRL.png b/pic/mirror/mirror3/way/Encounter/EncounterRL.png new file mode 100644 index 0000000..b71b396 Binary files /dev/null and b/pic/mirror/mirror3/way/Encounter/EncounterRL.png differ diff --git a/pic/mirror/mirror3/way/Encounter/EncounterRM.png b/pic/mirror/mirror3/way/Encounter/EncounterRM.png new file mode 100644 index 0000000..fe1777a Binary files /dev/null and b/pic/mirror/mirror3/way/Encounter/EncounterRM.png differ diff --git a/pic/mirror/mirror3/way/Enter.png b/pic/mirror/mirror3/way/Enter.png new file mode 100644 index 0000000..242038c Binary files /dev/null and b/pic/mirror/mirror3/way/Enter.png differ diff --git a/pic/mirror/mirror3/way/Fight/FightLH.png b/pic/mirror/mirror3/way/Fight/FightLH.png new file mode 100644 index 0000000..2389093 Binary files /dev/null and b/pic/mirror/mirror3/way/Fight/FightLH.png differ diff --git a/pic/mirror/mirror3/way/Fight/FightLL.png b/pic/mirror/mirror3/way/Fight/FightLL.png new file mode 100644 index 0000000..6bb5f41 Binary files /dev/null and b/pic/mirror/mirror3/way/Fight/FightLL.png differ diff --git a/pic/mirror/mirror3/way/Fight/FightLM.png b/pic/mirror/mirror3/way/Fight/FightLM.png new file mode 100644 index 0000000..9f41dcc Binary files /dev/null and b/pic/mirror/mirror3/way/Fight/FightLM.png differ diff --git a/pic/mirror/mirror3/way/Fight/FightM.png b/pic/mirror/mirror3/way/Fight/FightM.png new file mode 100644 index 0000000..02eb44d Binary files /dev/null and b/pic/mirror/mirror3/way/Fight/FightM.png differ diff --git a/pic/mirror/mirror3/way/Fight/FightRH.png b/pic/mirror/mirror3/way/Fight/FightRH.png new file mode 100644 index 0000000..1f7387f Binary files /dev/null and b/pic/mirror/mirror3/way/Fight/FightRH.png differ diff --git a/pic/mirror/mirror3/way/Fight/FightRL.png b/pic/mirror/mirror3/way/Fight/FightRL.png new file mode 100644 index 0000000..1042567 Binary files /dev/null and b/pic/mirror/mirror3/way/Fight/FightRL.png differ diff --git a/pic/mirror/mirror3/way/Fight/FightRM.png b/pic/mirror/mirror3/way/Fight/FightRM.png new file mode 100644 index 0000000..dacc391 Binary files /dev/null and b/pic/mirror/mirror3/way/Fight/FightRM.png differ diff --git a/pic/mirror/mirror3/way/QuesionMark/QuesionMarkLH.png b/pic/mirror/mirror3/way/QuesionMark/QuesionMarkLH.png new file mode 100644 index 0000000..c1da39c Binary files /dev/null and b/pic/mirror/mirror3/way/QuesionMark/QuesionMarkLH.png differ diff --git a/pic/mirror/mirror3/way/QuesionMark/QuesionMarkLL.png b/pic/mirror/mirror3/way/QuesionMark/QuesionMarkLL.png new file mode 100644 index 0000000..da10c33 Binary files /dev/null and b/pic/mirror/mirror3/way/QuesionMark/QuesionMarkLL.png differ diff --git a/pic/mirror/mirror3/way/QuesionMark/QuesionMarkLM.png b/pic/mirror/mirror3/way/QuesionMark/QuesionMarkLM.png new file mode 100644 index 0000000..2d005b6 Binary files /dev/null and b/pic/mirror/mirror3/way/QuesionMark/QuesionMarkLM.png differ diff --git a/pic/mirror/mirror3/way/QuesionMark/QuesionMarkM.png b/pic/mirror/mirror3/way/QuesionMark/QuesionMarkM.png new file mode 100644 index 0000000..a936c6f Binary files /dev/null and b/pic/mirror/mirror3/way/QuesionMark/QuesionMarkM.png differ diff --git a/pic/mirror/mirror3/way/QuesionMark/QuesionMarkRH.png b/pic/mirror/mirror3/way/QuesionMark/QuesionMarkRH.png new file mode 100644 index 0000000..1ddd6c2 Binary files /dev/null and b/pic/mirror/mirror3/way/QuesionMark/QuesionMarkRH.png differ diff --git a/pic/mirror/mirror3/way/QuesionMark/QuesionMarkRL.png b/pic/mirror/mirror3/way/QuesionMark/QuesionMarkRL.png new file mode 100644 index 0000000..10de2e7 Binary files /dev/null and b/pic/mirror/mirror3/way/QuesionMark/QuesionMarkRL.png differ diff --git a/pic/mirror/mirror3/way/QuesionMark/QuesionMarkRM.png b/pic/mirror/mirror3/way/QuesionMark/QuesionMarkRM.png new file mode 100644 index 0000000..6ddf2aa Binary files /dev/null and b/pic/mirror/mirror3/way/QuesionMark/QuesionMarkRM.png differ diff --git a/pic/mirror/mirror3/way/Self.png b/pic/mirror/mirror3/way/Self.png new file mode 100644 index 0000000..15bf87f Binary files /dev/null and b/pic/mirror/mirror3/way/Self.png differ diff --git a/pic/mirror/mirror3/way/mirror3MapSign.png b/pic/mirror/mirror3/way/mirror3MapSign.png new file mode 100644 index 0000000..e1b9199 Binary files /dev/null and b/pic/mirror/mirror3/way/mirror3MapSign.png differ diff --git a/pic/mirror/mirror3/whiteConfirm.png b/pic/mirror/mirror3/whiteConfirm.png new file mode 100644 index 0000000..f86c36c Binary files /dev/null and b/pic/mirror/mirror3/whiteConfirm.png differ diff --git a/src/common/autoFindOrClick.py b/src/common/autoFindOrClick.py index 6880385..82cde2e 100644 --- a/src/common/autoFindOrClick.py +++ b/src/common/autoFindOrClick.py @@ -71,7 +71,7 @@ def autoSinClick(img_model_path, name, addX=0, addY=0,waitTime = 0.9, clickCount def autoMulClick(img_model_path, name, addX=0, addY=0, waitTime = 0.5, clickCount = 1, correctRate = 0.9): """ - 输入一个图片模板,自动点击截图中一个 + 输入一个图片模板,自动点击截图中多个 :param img_model_path: 图片模板相对坐标 :param name:当前进程名字/代号 :param addX:x坐标偏移,默认为0 diff --git a/src/common/pressKey.py b/src/common/pressKey.py index f6178df..c70c981 100644 --- a/src/common/pressKey.py +++ b/src/common/pressKey.py @@ -31,6 +31,6 @@ def pressKey(key): keybd_event(asciiIndex,scanIndex,0,0) mySleep(0.2) keybd_event(asciiIndex,scanIndex,KEYEVENTF_KEYUP,0) - + mySleep(0.2) diff --git a/src/gui/myGUI.py b/src/gui/myGUI.py index 3ce1eee..53e5b43 100644 --- a/src/gui/myGUI.py +++ b/src/gui/myGUI.py @@ -260,10 +260,6 @@ def setMainPageRightFrame(self): self.LunacyToEnkephalinSwitch.place(width=180, height=40, x=0, y=45) - tk.Label(settingFrame, text="更多设置,等我用qt重构图形化界面再加\n承蒙各位厚爱!\n现在准备要加的设置有:\n1、镜牢第三层提前退出;\n2、镜牢可选择是否使用加成;\n3、会保留上次使用的设置;\n4、还有什么可以github提issue\n但记得看看有无重复\n\n!!为了奖励最大化\n尽量用完每周加成再使用本程序!!\nPS:近期时间安排紧张\n一段时间内只能不定期维护LALC现有功能\n", - font=("微软雅黑", 10), - justify="left", - anchor="w").place(width=400, height=390, x=0, y=100) """右边布局 按钮交互""" self.buttonFrame = tk.Frame(self.rightMainPageFrame, padx=5, pady=5) @@ -320,9 +316,9 @@ def checkInputIsInt(content): anchor="w").place(width=180, height=20, x=0, y=320) self.SetMirror = ttk.Combobox(self.taskFrame) - self.SetMirror['values'] = ["镜牢1", "镜牢2Normal"] + self.SetMirror['values'] = ["镜牢1", "镜牢2Normal", "镜牢3Normal"] self.SetMirror.configure(state="readonly") - self.SetMirror.current(1) + self.SetMirror.current(2) self.SetMirror.place(width=180, height=40, x=0, y=345) self.MirrorSpin = tk.Spinbox(self.taskFrame, from_=0, to=maxCount, width=10, textvariable=self.MirrorCount, @@ -468,7 +464,7 @@ def checkScriptExitCode(self, ExitCode): msg += "\nEXP:{} Thread:{} Mirror:{} Activity:{}".format( - globalVar.exeResult["EXPFinishCount"], globalVar.exeResult["EXPFinishCount"], globalVar.exeResult["ThreadFinishCount"], globalVar.exeResult["MirrorFinishCount"], globalVar.exeResult["ActivityFinishCount"]) + globalVar.exeResult["EXPFinishCount"], globalVar.exeResult["ThreadFinishCount"], globalVar.exeResult["MirrorFinishCount"], globalVar.exeResult["ActivityFinishCount"]) msgbox.showinfo("本次程序运行情况", msg) @@ -538,6 +534,8 @@ def outputList(self): globalVar.exeCfg["MirrorSwitch"] = 1 elif(strSetMirror == "镜牢2Normal"): globalVar.exeCfg["MirrorSwitch"] = 2 + elif(strSetMirror == "镜牢3Normal"): + globalVar.exeCfg["MirrorSwitch"] = 3 # print(str(globalVar.exeCfg["WinSwitch"]) + " " + str(globalVar.exeCfg["PrizeSwitch"])) diff --git a/src/gui/scriptGUI.py b/src/gui/scriptGUI.py index 839f45b..b7502d7 100644 --- a/src/gui/scriptGUI.py +++ b/src/gui/scriptGUI.py @@ -8,6 +8,7 @@ ''' from src.gui.myGUI import myGUI from src.test.tryClick import tryClick +from src.test.tryFind import tryFind from src.test.checkScreenScale import checkScreenScale from src.test.checkAdmin import checkAdmin @@ -19,7 +20,9 @@ def scriptGUI(): checkScreenScale() # 测试识图 - # tryClick("./pic/initMenu/FirstBuy.png", "26Lunary", 0, 0, 0.7, 1, 0.825) + # tryFind("./pic/event/ToBattle.png", "ToBattle!", 0.80) + # tryClick("./pic/event/ToBattle.png", "ToBattle!", 0, 0, 0.7, 1, 0.80) + gui = myGUI() gui.showWin() diff --git a/src/script/classBridge.py b/src/script/classBridge.py index 1cf5d23..34233b3 100644 --- a/src/script/classBridge.py +++ b/src/script/classBridge.py @@ -12,6 +12,7 @@ from src.error.myError import * from src.log.myLog import myLog from src.script.scheme import scriptTasks +import globalVar @@ -30,8 +31,7 @@ class _bridgeGuiAndScript(Thread): def __init__(self): '''构造函数''' super(_bridgeGuiAndScript, self).__init__() - global exitCode - exitCode = 0 + globalVar.exitCode = 0 self.exception = None self.exc_traceback = '' @@ -39,70 +39,69 @@ def __init__(self): def run(self): - '''捕捉错误并更改exitCode''' + '''捕捉错误并更改globalVar.exitCode''' lock = Lock() - global exitCode - exitCode = 0 + globalVar.exitCode = 0 - # myLog("debug", "ExitCode:" + str(exitCode)) + # myLog("debug", "globalVar.exitCode:" + str(globalVar.exitCode)) try: self._run() except screenScaleError as e: with lock: - exitCode = 13 + globalVar.exitCode = 13 self.exception = e except previousClaimRewardError as e: with lock: - exitCode = 12 + globalVar.exitCode = 12 self.exception = e except userStopError as e: with lock: - exitCode = -1 + globalVar.exitCode = -1 self.exception = e except mirrorInProgressError as e: with lock: - exitCode = 11 + globalVar.exitCode = 11 self.exception = e except noSavedPresetsError as e: with lock: - exitCode = 10 + globalVar.exitCode = 10 self.exception = e except unexpectNumError as e: with lock: - exitCode = 9 + globalVar.exitCode = 9 self.exception = e except cannotOperateGameError as e: with lock: - exitCode = 8 + globalVar.exitCode = 8 self.exception = e except netWorkUnstableError as e: with lock: - exitCode = 7 + globalVar.exitCode = 7 self.exception = e except backMainWinError as e: with lock: - exitCode = 6 + globalVar.exitCode = 6 self.exception = e except withOutGameWinError as e: with lock: - exitCode = 5 + globalVar.exitCode = 5 self.exception = e except notWaitError as e: with lock: - exitCode = 4 + globalVar.exitCode = 4 self.exception = e except withOutPicError as e: with lock: - exitCode = 3 + globalVar.exitCode = 3 self.exception = e except withOutAdminError as e: with lock: - exitCode = 2 + globalVar.exitCode = 2 self.exception = e except Exception as e: with lock: - exitCode = 1 + globalVar.exitCode = 1 self.exception = e finally: self.exc_traceback = ''.join( @@ -111,14 +110,13 @@ def run(self): def kill(self): '''终止函数''' - '''判定为正常终止''' - global exitCode - exitCode = -1 + '''判定为用户手动终止''' + globalVar.exitCode = -1 @staticmethod def getExitCode(): - '''exitCode向外传值接口''' - global exitCode + '''globalVar.exitCode向外传值接口''' + exitCode = globalVar.exitCode return exitCode def _run(self): diff --git a/src/script/classLux.py b/src/script/classLux.py index 99d7cd9..01fc46a 100644 --- a/src/script/classLux.py +++ b/src/script/classLux.py @@ -10,6 +10,7 @@ from src.script.classTask import _task, checkAndExit, beginAndFinishLog from src.common.myTime import mySleep from src.log.myLog import myLog +import globalVar from src.script.classScript import _script @@ -58,6 +59,7 @@ def ScriptTaskEXP(self): if(self.EXPPrize()): self.EXPFinishCount += 1 + globalVar.exeResult["EXPFinishCount"] += 1 msg = "EXP Success " + str(self.EXPFinishCount) + " Times!" myLog("info", msg) @@ -84,6 +86,7 @@ def ScriptTaskThread(self): if(self.ThreadPrize()): self.ThreadFinishCount += 1 + globalVar.exeResult["ThreadFinishCount"] += 1 msg = "Thread Success " + str(self.ThreadFinishCount) + " Times!" myLog("info", msg) @@ -96,37 +99,7 @@ def EXPOrThreadPrepareBattle(self): '''负责进入副本后选人到进入战斗 :param result:是否成功进入战斗 ''' - result = False - i = 1 - self.cap_win() - while(not self.is_find("./pic/team/FullTeam55.png", "FullTeam5/5", 0.94) and\ - self.is_find("./pic/team/Announcer.png", "prepareBattle")): - if(i > 12): - i = 1 - if(i < 7): - addX = i * 140 - addY = 0 - else: - addX = (i - 6) * 140 - addY = 200 - - self.cap_win() - self.single_target_click("./pic/team/Announcer.png", "Member", addX, addY + 100, 0.2) - self.cap_win() - i += 1 - - self.cap_win() - self.single_target_click("./pic/team/Announcer.png", "ToBattle", 1000, 400, 5) - self.cap_win() - if(self.is_find("./pic/Wait.png", "Wait Sign")): - self.myWait() - - self.cap_win() - if(self.single_target_click("./pic/battle/Start.png", "Start", 0, 0, 0.7, 1, 0.7) or\ - self.single_target_click("./pic/battle/WinRate.png", "WinRate") or\ - self.is_find("./pic/battle/battlePause.png", "Fighting Sign")): - result = True - return result + self.prepareBattle() @@ -159,7 +132,7 @@ def EXPEnter(self): self.cap_win() self.single_target_click("./pic/luxcavation/luxcavationEntrance.png", "luxcavationEntrance") self.cap_win() - self.single_target_click("./pic/luxcavation/EXPHard.png", "EXPHard", 0, 0, 3) + self.single_target_click("./pic/luxcavation/EXPDifficultyLv38.png", "Lv38", 0, 0, 3) result = self.EXPOrThreadPrepareBattle() return result @@ -219,7 +192,7 @@ def ThreadEnter(self): self.cap_win() self.single_target_click("./pic/luxcavation/Enter.png", "Enter") self.cap_win() - self.single_target_click("./pic/luxcavation/ThreadHard.png", "ThreadHard", 0, 0, 3) + self.single_target_click("./pic/luxcavation/ThreadDifficultyLv40.png", "Lv40",0, 0, 3, 1, 0.90) result = self.EXPOrThreadPrepareBattle() return result diff --git a/src/script/classMir.py b/src/script/classMir.py index 77d8260..f247b9d 100644 --- a/src/script/classMir.py +++ b/src/script/classMir.py @@ -13,7 +13,7 @@ from src.error.myError import unexpectNumError,noSavedPresetsError, mirrorInProgressError, previousClaimRewardError from src.common.mouseScroll import littleUpScroll from src.log.myLog import myLog - +import globalVar from src.script.classScript import _script notFullFlag = 0 @@ -35,6 +35,8 @@ def start(self): self.ScriptTaskMirror1() elif(self.mirrorSwitch == 2): self.ScriptTaskMirror2Normal() + elif(self.mirrorSwitch == 3): + self.ScriptTaskMirror3Normal() else: raise unexpectNumError("镜牢选择数字未设置") @@ -42,6 +44,41 @@ def start(self): def getMirrorFinishCount(self): '''返回镜牢完成次数''' return self.mirrorFinishCount + + @checkAndExit + @beginAndFinishLog + def ScriptTaskMirror3Normal(self): + '''镜牢3一次流程''' + mir = _MirrorOfTheLake() + loopCount = 0 + while(self.mirrorFinishCount < self.mirrorCount): + self.errorRetry() + # print("mirror LoopCount :" + str(loopCount)) + if not mir.mirror3(): + loopCount += 1 + if loopCount == 2 and not mir.noWayFlag: + mir.noWayFlag = False + mir.mirror3Leave() + self.ScriptBackToInitMenu() + else: + loopCount = 0 + + if(mir.mirror3Prize()): + loopCount = 0 + self.mirrorFinishCount += 1 + msg = "mirror3 Success " + str(self.mirrorFinishCount) + " Times!" + globalVar.exeResult["MirrorFinishCount"] += 1 + myLog("info", msg) + self.ScriptBackToInitMenu() + continue + + if loopCount > 4: + myLog("warning","Hard to continue! Next Mission!") + #离开进入函数 + self.mirrorCount = 0 + + msg = "mirror3 Loop " + str(loopCount) + " Times!" + myLog("info", msg) @checkAndExit @@ -67,6 +104,7 @@ def ScriptTaskMirror2Normal(self): loopCount = 0 self.mirrorFinishCount += 1 msg = "Mirror2 Success " + str(self.mirrorFinishCount) + " Times!" + globalVar.exeResult["MirrorFinishCount"] += 1 myLog("info", msg) self.ScriptBackToInitMenu() self.convertPai() @@ -104,6 +142,7 @@ def ScriptTaskMirror1(self): if(mir.mirror1Prize()): loopCount = 0 self.mirrorFinishCount += 1 + globalVar.exeResult["MirrorFinishCount"] += 1 msg = "Mirror1 Success " + str(self.mirrorFinishCount) + " Times!" myLog("info", msg) self.ScriptBackToInitMenu() @@ -120,10 +159,558 @@ def ScriptTaskMirror1(self): # mySleep(2) +class _MirrorOfTheLake(_script): + '''镜牢3的相关函数''' + __slots__ = {"noWayFlag"} + + def mirror3(self): + '''镜牢3进入、寻路、处理交互的集合''' + result = False + self.noWayFlag = False + self.mirror3Entry() + #有地图标识才寻路,否则仅作事件处理 + self.cap_win() + if(self.is_find("./pic/mirror/mirror3/way/mirror3MapSign.png", "mirror3MapSign") and\ + (self.is_find("./pic/mirror/mirror3/way/BigSelf.png", "BigSelf", 0.8) or\ + self.is_find("./pic/mirror/mirror3/way/Self.png", "Self", 0.8))): + self.noWayFlag = self.mirror3SinCoreFindWay() + + result = self.mirror3Cope() + + return result + + + + def mirror3Prize(self): + '''镜牢3获取奖励的流程''' + result = False + self.cap_win() + self.single_target_click("./pic/battle/confirm.png", "Final_Fight") + self.cap_win() + self.single_target_click("./pic/mirror/mirror3/ClaimRewards.png","ClaimRewards") + self.cap_win() + self.single_target_click("./pic/mirror/mirror3/Receive.png","Receive") + self.cap_win() + if self.single_target_click("./pic/mirror/mirror3/whiteConfirm.png","FirstConfirm"): + self.cap_win() + if self.single_target_click("./pic/mirror/mirror3/way/Confirm.png","SecondConfirm"): + result = True + return result + + + @checkAndExit + @beginAndFinishLog + def mirror3Leave(self): + '''镜牢3离开时处理notFullFlag''' + global notFullFlag + notFullFlag = 0 + + + + @checkAndExit + @beginAndFinishLog + def mirror3Entry(self): + '''进入镜牢3流程''' + if(self.is_find("./pic/mirror/mirror3/way/mirror3MapSign.png", "mirror3MapSign")): + return + self.cap_win() + self.single_target_click("./pic/initMenu/drive.png", "Drive") + self.cap_win() + self.single_target_click("./pic/mirror/mirror3/MirrorDungeons.png", "MirrorDungeons", 0, 0, 1, 1, 0.9) + self.cap_win() + if(self.is_find("./pic/mirror/previousClaimReward.png", "previousClaimReward")): + raise previousClaimRewardError("有上周的镜牢奖励未领取") + self.single_target_click("./pic/mirror/mirror3/mirror3Normal.png", "mirror3Normal") + self.cap_win() + if(self.is_find("./pic/mirror/MirrorInProgress.png", "MirrorInProgress")): + raise mirrorInProgressError("有其他镜牢未结束") + if(self.single_target_click("./pic/mirror/mirror3/Enter.png", "Enter", 0, 0, 5) or\ + self.single_target_click("./pic/mirror/mirror3/Resume.png", "Resume", 0, 0, 5)): + self.cap_win() + self.single_target_click("./pic/mirror/mirror3/ego/RandomEGOGift.png", "egoGift") + self.cap_win() + self.single_target_click("./pic/mirror/mirror3/ego/confirmRandomEGOGift.png", "EGOGift") + self.cap_win() + self.single_target_click("./pic/mirror/mirror3/ego/SelectEGOGift.png", "SelectEGOGift", 0, 0, 5) + self.cap_win() + self.single_target_click("./pic/mirror/mirror3/firstTeamConfirm.png", "Confirm") + self.cap_win() + self.single_target_click("./pic/mirror/mirror3/firstTeamConfirm.png", "Confirm", 0, 0, 5) + if(self.is_find("./pic/Wait.png", "Wait Sign")): + self.myWait() + + + def mirror3Cope(self): + '''处理镜牢3交互的各种情况''' + result = False + self.cap_win() + if(self.is_find("./pic/team/Announcer.png", "Announcer")): + self.mirror3PrepareBattle() + self.mirror3BattlePart() + result = True + elif(self.is_find("./pic/battle/WinRate.png", "battleSign")): + self.mirror3BattlePart() + result = True + elif(self.is_find("./pic/event/Skip.png", "Skip")): + self.eventPart() + result = True + elif(self.is_find("./pic/mirror/mirror3/way/Confirm.png", "EGOGift")): + self.single_target_click("./pic/mirror/mirror3/way/Confirm.png", "confirmEGOGift", 0, 0, 1, 2) + result = True + elif(self.single_target_click("./pic/mirror/mirror3/ego/egoGift.png", "ChooseEgoGift")): + self.cap_win() + self.single_target_click("./pic/mirror/mirror3/ego/SelectEGOGift.png", "SelectEGOGift", 0, 0, 6) + result = True + elif(self.single_target_click("./pic/mirror/mirror3/way/Enter.png", "Enter", 0, 0, 2)): + result = True + elif(self.is_find("./pic/Wait.png", "Wait Sign")): + self.myWait() + result = True + + return result + -class _MirrorOfMirrors(): + #根据已选人数和队伍可容纳人数做情况分类 + #检测5/5;6/6;7/7最好就一个标准,能省不少时间 + def mirror3JudTeamCondition(self): + '''判断当前队伍状况''' + resultCondition = -1 + if(self.is_find("./pic/team/FullTeam77.png", "FullTeam7/7", 0.94) or\ + self.is_find("./pic/team/FullTeam66.png", "FullTeam6/6", 0.94) or\ + self.is_find("./pic/team/FullTeam55.png", "FullTeam5/5", 0.94)): + resultCondition = 0 + elif(self.is_find("./pic/team/EmptyTeam05.png", "EmptyTeam0/5", 0.94)): + resultCondition = 1 + elif(self.is_find("./pic/team/EmptyTeam06.png", "EmptyTeam0/6", 0.94) or\ + self.is_find("./pic/team/NotFullTeam56.png", "NotFullTeam5/6", 0.94)): + resultCondition = 2 + elif(self.is_find("./pic/team/EmptyTeam07.png", "EmptyTeam0/7", 0.94) or\ + self.is_find("./pic/team/NotFullTeam67.png", "NotFullTeam6/7", 0.94)): + resultCondition = 3 + return resultCondition + + + #满队标准 + def mirror3JudFullTeam(self,condition): + '''判断队伍是否人满''' + result = False + if(condition == 0): + result = True + elif(condition == 1): + if(self.is_find("./pic/team/FullTeam55.png", "FullTeam5/5", 0.94)): + result = True + elif(condition == 2): + if(self.is_find("./pic/team/FullTeam66.png", "FullTeam6/6", 0.94)): + result = True + elif(condition == 3): + if(self.is_find("./pic/team/FullTeam77.png", "FullTeam7/7", 0.94)): + result = True + else: + if(self.is_find("./pic/team/FullTeam77.png", "FullTeam7/7", 0.94) or\ + self.is_find("./pic/team/FullTeam66.png", "FullTeam6/6", 0.94) or\ + self.is_find("./pic/team/FullTeam55.png", "FullTeam5/5", 0.94)): + result = True + return result + + + @checkAndExit + @beginAndFinishLog + def mirror3PrepareBattle(self): + '''镜牢3准备战斗的流程''' + i = 1 + global notFullFlag + countFlag = 0 + condition = self.mirror3JudTeamCondition() + while(not self.mirror3JudFullTeam(condition) and (notFullFlag == 0)): + #i的归零 + if(i > 12): + i = 1 + countFlag += 1 + if(countFlag > 1): + myLog("warning","Can't make team full") + notFullFlag = 1 + break + self.cap_win() + if(i < 7): + addX = i * 140 + addY = 0 + else: + addX = (i - 6) * 140 + addY = 200 + + self.single_target_click("./pic/team/Announcer.png", "Member", addX, addY + 100, 0.2) + self.cap_win() + i += 1 + + #即使选不到满人,也要尽可能多选人 + if(notFullFlag == 1 and\ + (self.is_find("./pic/team/EmptyTeam05.png", "EmptyTeam0/5", 0.94)or\ + self.is_find("./pic/team/EmptyTeam06.png", "EmptyTeam0/6", 0.94)or\ + self.is_find("./pic/team/EmptyTeam07.png", "EmptyTeam0/7", 0.94)or\ + self.is_find("./pic/team/NotFullTeam15.png", "NotFullTeam1/5", 0.94)or\ + self.is_find("./pic/team/NotFullTeam16.png", "NotFullTeam1/6", 0.94)or\ + self.is_find("./pic/team/NotFullTeam17.png", "NotFullTeam1/7", 0.94)) + ): + for i in range(1,13): + self.cap_win() + if(i < 7): + addX = i * 140 + addY = 0 + else: + addX = (i - 6) * 140 + addY = 200 + + self.single_target_click("./pic/team/Announcer.png", "Member", addX, addY + 100, 0.2) + + + self.single_target_click("./pic/team/Announcer.png", "ToBattle", 1000, 400, 5) + self.cap_win() + if(self.is_find("./pic/Wait.png", "Wait Sign")): + self.myWait() + + + @checkAndExit + @beginAndFinishLog + def mirror3BattlePart(self): + self.allWinRateBattle() + + + + @checkAndExit + @beginAndFinishLog + def mirror3SinCoreFindWay(self): + '''镜牢3单进程寻路流程''' + result = False + + # 滚动滑轮以保持视图大小不变 + littleUpScroll() + + self.single_target_click("./pic/mirror/mirror3/way/Self.png", "Self") + self.cap_win() + + if(self.single_target_click("./pic/mirror/mirror3/way/Enter.png", "Enter", 0, 0, 2)): + result = True + return result + self.mirror3SinCoreQuesionMark() + if(self.single_target_click("./pic/mirror/mirror3/way/Enter.png", "Enter", 0, 0, 2)): + result = True + return result + self.mirror3SinCoreChair() + if(self.single_target_click("./pic/mirror/mirror3/way/Enter.png", "Enter", 0, 0, 2)): + result = True + return result + self.mirror3SinCoreBus() + if(self.single_target_click("./pic/mirror/mirror3/way/Enter.png", "Enter", 0, 0, 2)): + result = True + return result + self.mirror3SinCoreFight() + if(self.single_target_click("./pic/mirror/mirror3/way/Enter.png", "Enter", 0, 0, 2)): + result = True + return result + self.mirror3SinCoreBoss() + if(self.single_target_click("./pic/mirror/mirror3/way/Enter.png", "Enter", 0, 0, 2)): + result = True + return result + self.mirror3SinCoreBattle() + if(self.single_target_click("./pic/mirror/mirror3/way/Enter.png", "Enter", 0, 0, 2)): + result = True + return result + self.mirror3SinCoreEncounter() + if(self.single_target_click("./pic/mirror/mirror3/way/Enter.png", "Enter", 0, 0, 2)): + result = True + return result + return result + + + #椅子部分 + def mirror3SinCoreChair(self): + '''镜牢3单进程找椅子''' + if self.single_target_click("./pic/mirror/mirror3/way/Chair/ChairM.png", "ChairMiddle"): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + + if self.single_target_click("./pic/mirror/mirror3/way/Chair/ChairRH.png", "ChairRightHigh"): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + if self.single_target_click("./pic/mirror/mirror3/way/Chair/ChairRM.png", "ChairRightMiddle"): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + if self.single_target_click("./pic/mirror/mirror3/way/Chair/ChairRL.png", "ChairRightLow", 0, -10): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + if self.single_target_click("./pic/mirror/mirror3/way/Chair/ChairLH.png", "ChairLeftHigh"): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + if self.single_target_click("./pic/mirror/mirror3/way/Chair/ChairLM.png", "ChairLeftMiddle"): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + if self.single_target_click("./pic/mirror/mirror3/way/Chair/ChairLL.png", "ChairLeftLow", 0, -10): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + #异想体部分 + def mirror3SinCoreEncounter(self): + '''镜牢3单进程找异想体''' + if self.single_target_click("./pic/mirror/mirror3/way/Encounter/EncounterM.png", "EncounterMiddle"): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + if self.single_target_click("./pic/mirror/mirror3/way/Encounter/EncounterRH.png", "EncounterRightHigh"): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + if self.single_target_click("./pic/mirror/mirror3/way/Encounter/EncounterRM.png", "EncounterRightMiddle"): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + if self.single_target_click("./pic/mirror/mirror3/way/Encounter/EncounterRL.png", "EncounterRightLow", 0, -10): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + if self.single_target_click("./pic/mirror/mirror3/way/Encounter/EncounterLH.png", "EncounterLeftHigh"): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + + if self.single_target_click("./pic/mirror/mirror3/way/Encounter/EncounterLM.png", "EncounterLeftMiddle"): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + + if self.single_target_click("./pic/mirror/mirror3/way/Encounter/EncounterLL.png", "EncounterLeftLow", 0, -10): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + + #巴士部分 + def mirror3SinCoreBus(self): + '''镜牢3单进程找巴士''' + if self.single_target_click("./pic/mirror/mirror3/way/Bus/BusM.png", "BusMiddle"): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + if self.single_target_click("./pic/mirror/mirror3/way/Bus/BusRH.png", "BusRightHigh"): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + if self.single_target_click("./pic/mirror/mirror3/way/Bus/BusRM.png", "BusRightMiddle"): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + if self.single_target_click("./pic/mirror/mirror3/way/Bus/BusRL.png", "BusRightLow", 0, -10): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + + if self.single_target_click("./pic/mirror/mirror3/way/Bus/BusLH.png", "BusLeftHigh"): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + + if self.single_target_click("./pic/mirror/mirror3/way/Bus/BusLM.png", "BusLeftMiddle"): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + if self.single_target_click("./pic/mirror/mirror3/way/Bus/BusLL.png", "BusLeftLow", 0, -10): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + + + #困难战斗部分 + def mirror3SinCoreBattle(self): + '''镜牢3单进程找困难战斗''' + if self.single_target_click("./pic/mirror/mirror3/way/Battle/BattleM.png", "BattleMiddle"): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + if self.single_target_click("./pic/mirror/mirror3/way/Battle/BattleRH.png", "BattleRightHigh"): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + if self.single_target_click("./pic/mirror/mirror3/way/Battle/BattleRM.png", "BattleRightMiddle"): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + if self.single_target_click("./pic/mirror/mirror3/way/Battle/BattleRL.png", "BattleRightLow", 0, -10): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + if self.single_target_click("./pic/mirror/mirror3/way/Battle/BattleLH.png", "BattleLeftHigh"): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + if self.single_target_click("./pic/mirror/mirror3/way/Battle/BattleLM.png", "BattleLeftMiddle"): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + if self.single_target_click("./pic/mirror/mirror3/way/Battle/BattleLL.png", "BattleLeftLow", 0, -10): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + + + #首领部分 + def mirror3SinCoreBoss(self): + '''镜牢3单进程找首领''' + if self.single_target_click("./pic/mirror/mirror3/way/Boss/BossM.png", "BossMiddle"): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + + if self.single_target_click("./pic/mirror/mirror3/way/Boss/BossRH.png", "BossRightHigh"): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + if self.single_target_click("./pic/mirror/mirror3/way/Boss/BossRM.png", "BossRightMiddle"): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + if self.single_target_click("./pic/mirror/mirror3/way/Boss/BossRL.png", "BossRightLow", 0, -10): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + + if self.single_target_click("./pic/mirror/mirror3/way/Boss/BossLH.png", "BossLeftHigh"): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + if self.single_target_click("./pic/mirror/mirror3/way/Boss/BossLM.png", "BossLeftMiddle"): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + if self.single_target_click("./pic/mirror/mirror3/way/Boss/BossLL.png", "BossLeftLow", 0, -10): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + + + #问号事件部分 + def mirror3SinCoreQuesionMark(self): + '''镜牢3单进程找问号''' + if self.single_target_click("./pic/mirror/mirror3/way/QuesionMark/QuesionMarkM.png", "QuesionMarkMiddle"): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + if self.single_target_click("./pic/mirror/mirror3/way/QuesionMark/QuesionMarkRH.png", "QuesionMarkRightHigh"): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + if self.single_target_click("./pic/mirror/mirror3/way/QuesionMark/QuesionMarkRM.png", "QuesionMarkRightMiddle"): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + if self.single_target_click("./pic/mirror/mirror3/way/QuesionMark/QuesionMarkRL.png", "QuesionMarkRightLow", 0, -10): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + if self.single_target_click("./pic/mirror/mirror3/way/QuesionMark/QuesionMarkLH.png", "QuesionMarkLeftHigh"): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + if self.single_target_click("./pic/mirror/mirror3/way/QuesionMark/QuesionMarkLM.png", "QuesionMarkLeftMiddle"): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + if self.single_target_click("./pic/mirror/mirror3/way/QuesionMark/QuesionMarkLL.png", "QuesionMarkLeftLow", 0, -10): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + + #战斗部分 + def mirror3SinCoreFight(self): + '''镜牢3单进程找普通战斗''' + if self.single_target_click("./pic/mirror/mirror3/way/Fight/FightM.png", "FightMiddle"): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + if self.single_target_click("./pic/mirror/mirror3/way/Fight/FightRH.png", "FightRightHigh"): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + if self.single_target_click("./pic/mirror/mirror3/way/Fight/FightRM.png", "FightRightMiddle"): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + if self.single_target_click("./pic/mirror/mirror3/way/Fight/FightRL.png", "FightRightLow", 0, -10): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + if self.single_target_click("./pic/mirror/mirror3/way/Fight/FightLH.png", "FightLeftHigh"): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + if self.single_target_click("./pic/mirror/mirror3/way/Fight/FightLM.png", "FightLeftMiddle"): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + if self.single_target_click("./pic/mirror/mirror3/way/Fight/FightLL.png", "FightLeftLow", 0, -10): + self.cap_win() + if self.is_find("./pic/mirror/mirror3/way/Enter.png", "Enter"): + return + + + + +class _MirrorOfMirrors(_script): '''镜牢2相关函数集合类''' __slots__ = ("noWayFlag") @@ -375,14 +962,14 @@ def mirror2PrepareBattle(self): @beginAndFinishLog def mirror2BattlePart(self): '''镜牢战斗处理''' - self.cap_win() + '''self.cap_win() loopCount = 0 while(True): self.cap_win() condition = False - if (self.single_target_click("./pic/battle/WinRate.png", "WinRate")): + if (self.is_find("./pic/battle/WinRate.png", "WinRate")): self.cap_win() - if (self.single_target_click("./pic/battle/Start.png", "Start")): + if (self.is_find("./pic/battle/Start.png", "StartBattle")): condition = True elif(self.is_find("./pic/battle/battlePause.png", "Fighting Sign")): mySleep(2) @@ -401,7 +988,9 @@ def mirror2BattlePart(self): break else: loopCount = 0 - mySleep(0.9) + mySleep(0.9)''' + self.allWinRateBattle() + @checkAndExit @@ -470,7 +1059,7 @@ def mirror2SinCoreChair(self): if self.is_find("./pic/mirror/mirror2/way/Enter.png", "Enter"): return - if self.single_target_click("./pic/mirror/mirror2/way/Chair/ChairRL.png", "ChairRightLow"): + if self.single_target_click("./pic/mirror/mirror2/way/Chair/ChairRL.png", "ChairRightLow", 0, -10): self.cap_win() if self.is_find("./pic/mirror/mirror2/way/Enter.png", "Enter"): return @@ -485,7 +1074,7 @@ def mirror2SinCoreChair(self): if self.is_find("./pic/mirror/mirror2/way/Enter.png", "Enter"): return - if self.single_target_click("./pic/mirror/mirror2/way/Chair/ChairLL.png", "ChairLeftLow"): + if self.single_target_click("./pic/mirror/mirror2/way/Chair/ChairLL.png", "ChairLeftLow", 0, -10): self.cap_win() if self.is_find("./pic/mirror/mirror2/way/Enter.png", "Enter"): return @@ -508,7 +1097,7 @@ def mirror2SinCoreEncounter(self): if self.is_find("./pic/mirror/mirror2/way/Enter.png", "Enter"): return - if self.single_target_click("./pic/mirror/mirror2/way/Encounter/EncounterRL.png", "EncounterRightLow"): + if self.single_target_click("./pic/mirror/mirror2/way/Encounter/EncounterRL.png", "EncounterRightLow", 0, -10): self.cap_win() if self.is_find("./pic/mirror/mirror2/way/Enter.png", "Enter"): return @@ -525,7 +1114,7 @@ def mirror2SinCoreEncounter(self): return - if self.single_target_click("./pic/mirror/mirror2/way/Encounter/EncounterLL.png", "EncounterLeftLow"): + if self.single_target_click("./pic/mirror/mirror2/way/Encounter/EncounterLL.png", "EncounterLeftLow", 0, -10): self.cap_win() if self.is_find("./pic/mirror/mirror2/way/Enter.png", "Enter"): return @@ -551,7 +1140,7 @@ def mirror2SinCoreBus(self): if self.is_find("./pic/mirror/mirror2/way/Enter.png", "Enter"): return - if self.single_target_click("./pic/mirror/mirror2/way/Bus/BusRL.png", "BusRightLow"): + if self.single_target_click("./pic/mirror/mirror2/way/Bus/BusRL.png", "BusRightLow", 0, -10): self.cap_win() if self.is_find("./pic/mirror/mirror2/way/Enter.png", "Enter"): return @@ -568,7 +1157,7 @@ def mirror2SinCoreBus(self): if self.is_find("./pic/mirror/mirror2/way/Enter.png", "Enter"): return - if self.single_target_click("./pic/mirror/mirror2/way/Bus/BusLL.png", "BusLeftLow"): + if self.single_target_click("./pic/mirror/mirror2/way/Bus/BusLL.png", "BusLeftLow", 0, -10): self.cap_win() if self.is_find("./pic/mirror/mirror2/way/Enter.png", "Enter"): return @@ -593,7 +1182,7 @@ def mirror2SinCoreBattle(self): if self.is_find("./pic/mirror/mirror2/way/Enter.png", "Enter"): return - if self.single_target_click("./pic/mirror/mirror2/way/Battle/BattleRL.png", "BattleRightLow"): + if self.single_target_click("./pic/mirror/mirror2/way/Battle/BattleRL.png", "BattleRightLow", 0, -10): self.cap_win() if self.is_find("./pic/mirror/mirror2/way/Enter.png", "Enter"): return @@ -608,7 +1197,7 @@ def mirror2SinCoreBattle(self): if self.is_find("./pic/mirror/mirror2/way/Enter.png", "Enter"): return - if self.single_target_click("./pic/mirror/mirror2/way/Battle/BattleLL.png", "BattleLeftLow"): + if self.single_target_click("./pic/mirror/mirror2/way/Battle/BattleLL.png", "BattleLeftLow", 0, -10): self.cap_win() if self.is_find("./pic/mirror/mirror2/way/Enter.png", "Enter"): return @@ -634,7 +1223,7 @@ def mirror2SinCoreBoss(self): if self.is_find("./pic/mirror/mirror2/way/Enter.png", "Enter"): return - if self.single_target_click("./pic/mirror/mirror2/way/Boss/BossRL.png", "BossRightLow"): + if self.single_target_click("./pic/mirror/mirror2/way/Boss/BossRL.png", "BossRightLow", 0, -10): self.cap_win() if self.is_find("./pic/mirror/mirror2/way/Enter.png", "Enter"): return @@ -650,7 +1239,7 @@ def mirror2SinCoreBoss(self): if self.is_find("./pic/mirror/mirror2/way/Enter.png", "Enter"): return - if self.single_target_click("./pic/mirror/mirror2/way/Boss/BossLL.png", "BossLeftLow"): + if self.single_target_click("./pic/mirror/mirror2/way/Boss/BossLL.png", "BossLeftLow", 0, -10): self.cap_win() if self.is_find("./pic/mirror/mirror2/way/Enter.png", "Enter"): return @@ -675,7 +1264,7 @@ def mirror2SinCoreQuesionMark(self): if self.is_find("./pic/mirror/mirror2/way/Enter.png", "Enter"): return - if self.single_target_click("./pic/mirror/mirror2/way/QuesionMark/QuesionMarkRL.png", "QuesionMarkRightLow"): + if self.single_target_click("./pic/mirror/mirror2/way/QuesionMark/QuesionMarkRL.png", "QuesionMarkRightLow", 0, -10): self.cap_win() if self.is_find("./pic/mirror/mirror2/way/Enter.png", "Enter"): return @@ -690,7 +1279,7 @@ def mirror2SinCoreQuesionMark(self): if self.is_find("./pic/mirror/mirror2/way/Enter.png", "Enter"): return - if self.single_target_click("./pic/mirror/mirror2/way/QuesionMark/QuesionMarkLL.png", "QuesionMarkLeftLow"): + if self.single_target_click("./pic/mirror/mirror2/way/QuesionMark/QuesionMarkLL.png", "QuesionMarkLeftLow", 0, -10): self.cap_win() if self.is_find("./pic/mirror/mirror2/way/Enter.png", "Enter"): return @@ -714,7 +1303,7 @@ def mirror2SinCoreFight(self): if self.is_find("./pic/mirror/mirror2/way/Enter.png", "Enter"): return - if self.single_target_click("./pic/mirror/mirror2/way/Fight/FightRL.png", "FightRightLow"): + if self.single_target_click("./pic/mirror/mirror2/way/Fight/FightRL.png", "FightRightLow", 0, -10): self.cap_win() if self.is_find("./pic/mirror/mirror2/way/Enter.png", "Enter"): return @@ -729,7 +1318,7 @@ def mirror2SinCoreFight(self): if self.is_find("./pic/mirror/mirror2/way/Enter.png", "Enter"): return - if self.single_target_click("./pic/mirror/mirror2/way/Fight/FightLL.png", "FightLeftLow"): + if self.single_target_click("./pic/mirror/mirror2/way/Fight/FightLL.png", "FightLeftLow", 0, -10): self.cap_win() if self.is_find("./pic/mirror/mirror2/way/Enter.png", "Enter"): return @@ -737,7 +1326,7 @@ def mirror2SinCoreFight(self): -class _MirrorOfTheBeginning(): +class _MirrorOfTheBeginning(_script): '''镜牢1相关函数集合类''' __slots__ = ("noWayFlag") @@ -986,14 +1575,14 @@ def mirror1PrepareBattle(self): @beginAndFinishLog def mirror1BattlePart(self): '''镜牢战斗处理''' - self.cap_win() + '''self.cap_win() loopCount = 0 while(True): self.cap_win() condition = False - if (self.single_target_click("./pic/battle/WinRate.png", "WinRate")): + if (self.is_find("./pic/battle/WinRate.png", "WinRate")): self.cap_win() - if (self.single_target_click("./pic/battle/Start.png", "Start")): + if (self.is_find("./pic/battle/Start.png", "StartBattle")): condition = True elif(self.is_find("./pic/battle/battlePause.png", "Fighting Sign")): mySleep(2) @@ -1016,7 +1605,8 @@ def mirror1BattlePart(self): loopCount = 0 else: loopCount = 0 - mySleep(0.9) + mySleep(0.9)''' + self.allWinRateBattle() @@ -1092,7 +1682,7 @@ def mirror1SinCoreBus(self): if self.is_find("./pic/mirror/mirror1/way/Enter.png", "Enter"): return - if self.single_target_click("./pic/mirror/mirror1/way/Bus/BusRL.png", "BusRightLow"): + if self.single_target_click("./pic/mirror/mirror1/way/Bus/BusRL.png", "BusRightLow", 0, -10): self.cap_win() if self.is_find("./pic/mirror/mirror1/way/Enter.png", "Enter"): return @@ -1109,7 +1699,7 @@ def mirror1SinCoreBus(self): if self.is_find("./pic/mirror/mirror1/way/Enter.png", "Enter"): return - if self.single_target_click("./pic/mirror/mirror1/way/Bus/BusLL.png", "BusLeftLow"): + if self.single_target_click("./pic/mirror/mirror1/way/Bus/BusLL.png", "BusLeftLow", 0, -10): self.cap_win() if self.is_find("./pic/mirror/mirror1/way/Enter.png", "Enter"): return @@ -1135,7 +1725,7 @@ def mirror1SinCoreChair(self): if self.is_find("./pic/mirror/mirror1/way/Enter.png", "Enter"): return - if self.single_target_click("./pic/mirror/mirror1/way/Chair/ChairRL.png", "ChairRightLow"): + if self.single_target_click("./pic/mirror/mirror1/way/Chair/ChairRL.png", "ChairRightLow", 0, -10): self.cap_win() if self.is_find("./pic/mirror/mirror1/way/Enter.png", "Enter"): return @@ -1150,7 +1740,7 @@ def mirror1SinCoreChair(self): if self.is_find("./pic/mirror/mirror1/way/Enter.png", "Enter"): return - if self.single_target_click("./pic/mirror/mirror1/way/Chair/ChairLL.png", "ChairLeftLow"): + if self.single_target_click("./pic/mirror/mirror1/way/Chair/ChairLL.png", "ChairLeftLow", 0, -10): self.cap_win() if self.is_find("./pic/mirror/mirror1/way/Enter.png", "Enter"): return @@ -1174,7 +1764,7 @@ def mirror1SinCoreEncounter(self): if self.is_find("./pic/mirror/mirror1/way/Enter.png", "Enter"): return - if self.single_target_click("./pic/mirror/mirror1/way/Encounter/EncounterRL.png", "EncounterRightLow"): + if self.single_target_click("./pic/mirror/mirror1/way/Encounter/EncounterRL.png", "EncounterRightLow", 0, -10): self.cap_win() if self.is_find("./pic/mirror/mirror1/way/Enter.png", "Enter"): return @@ -1191,7 +1781,7 @@ def mirror1SinCoreEncounter(self): return - if self.single_target_click("./pic/mirror/mirror1/way/Encounter/EncounterLL.png", "EncounterLeftLow"): + if self.single_target_click("./pic/mirror/mirror1/way/Encounter/EncounterLL.png", "EncounterLeftLow", 0, -10): self.cap_win() if self.is_find("./pic/mirror/mirror1/way/Enter.png", "Enter"): return @@ -1215,7 +1805,7 @@ def mirror1SinCoreBattle(self): if self.is_find("./pic/mirror/mirror1/way/Enter.png", "Enter"): return - if self.single_target_click("./pic/mirror/mirror1/way/Battle/BattleRL.png", "BattleRightLow"): + if self.single_target_click("./pic/mirror/mirror1/way/Battle/BattleRL.png", "BattleRightLow", 0, -10): self.cap_win() if self.is_find("./pic/mirror/mirror1/way/Enter.png", "Enter"): return @@ -1230,7 +1820,7 @@ def mirror1SinCoreBattle(self): if self.is_find("./pic/mirror/mirror1/way/Enter.png", "Enter"): return - if self.single_target_click("./pic/mirror/mirror1/way/Battle/BattleLL.png", "BattleLeftLow"): + if self.single_target_click("./pic/mirror/mirror1/way/Battle/BattleLL.png", "BattleLeftLow", 0, -10): self.cap_win() if self.is_find("./pic/mirror/mirror1/way/Enter.png", "Enter"): return @@ -1256,7 +1846,7 @@ def mirror1SinCoreBoss(self): if self.is_find("./pic/mirror/mirror1/way/Enter.png", "Enter"): return - if self.single_target_click("./pic/mirror/mirror1/way/Boss/BossRL.png", "BossRightLow"): + if self.single_target_click("./pic/mirror/mirror1/way/Boss/BossRL.png", "BossRightLow", 0, -10): self.cap_win() if self.is_find("./pic/mirror/mirror1/way/Enter.png", "Enter"): return @@ -1272,7 +1862,7 @@ def mirror1SinCoreBoss(self): if self.is_find("./pic/mirror/mirror1/way/Enter.png", "Enter"): return - if self.single_target_click("./pic/mirror/mirror1/way/Boss/BossLL.png", "BossLeftLow"): + if self.single_target_click("./pic/mirror/mirror1/way/Boss/BossLL.png", "BossLeftLow", 0, -10): self.cap_win() if self.is_find("./pic/mirror/mirror1/way/Enter.png", "Enter"): return @@ -1297,7 +1887,7 @@ def mirror1SinCoreQuesionMark(self): if self.is_find("./pic/mirror/mirror1/way/Enter.png", "Enter"): return - if self.single_target_click("./pic/mirror/mirror1/way/QuesionMark/QuesionMarkRL.png", "QuesionMarkRightLow"): + if self.single_target_click("./pic/mirror/mirror1/way/QuesionMark/QuesionMarkRL.png", "QuesionMarkRightLow", 0, -10): self.cap_win() if self.is_find("./pic/mirror/mirror1/way/Enter.png", "Enter"): return @@ -1312,7 +1902,7 @@ def mirror1SinCoreQuesionMark(self): if self.is_find("./pic/mirror/mirror1/way/Enter.png", "Enter"): return - if self.single_target_click("./pic/mirror/mirror1/way/QuesionMark/QuesionMarkLL.png", "QuesionMarkLeftLow"): + if self.single_target_click("./pic/mirror/mirror1/way/QuesionMark/QuesionMarkLL.png", "QuesionMarkLeftLow", 0, -10): self.cap_win() if self.is_find("./pic/mirror/mirror1/way/Enter.png", "Enter"): return @@ -1336,7 +1926,7 @@ def mirror1SinCoreFight(self): if self.is_find("./pic/mirror/mirror1/way/Enter.png", "Enter"): return - if self.single_target_click("./pic/mirror/mirror1/way/Fight/FightRL.png", "FightRightLow"): + if self.single_target_click("./pic/mirror/mirror1/way/Fight/FightRL.png", "FightRightLow", 0, -10): self.cap_win() if self.is_find("./pic/mirror/mirror1/way/Enter.png", "Enter"): return @@ -1351,7 +1941,7 @@ def mirror1SinCoreFight(self): if self.is_find("./pic/mirror/mirror1/way/Enter.png", "Enter"): return - if self.single_target_click("./pic/mirror/mirror1/way/Fight/FightLL.png", "FightLeftLow"): + if self.single_target_click("./pic/mirror/mirror1/way/Fight/FightLL.png", "FightLeftLow", 0, -10): self.cap_win() if self.is_find("./pic/mirror/mirror1/way/Enter.png", "Enter"): return diff --git a/src/script/classScript.py b/src/script/classScript.py index 166b276..a041553 100644 --- a/src/script/classScript.py +++ b/src/script/classScript.py @@ -20,9 +20,6 @@ class _script(_task): def __init__(self): pass - - - @checkAndExit def errorRetry(self): @@ -42,78 +39,62 @@ def ScriptBackToInitMenu(self): loopCount = 0 self.cap_win() while(not self.single_target_click("./pic/initMenu/Window.png", "mainMenuSign")): + - # 战斗或事件中 - if(self.is_find("./pic/battle/WinRate.png", "battleSign1") or - self.is_find("./pic/battle/Start.png", "battleSign2")): + self.cap_win() + + # 战斗中,完成 + if(self.is_find("./pic/battle/WinRate.png", "battleSign")): self.allWinRateBattle() - loopCount = 0 - elif(self.is_find("./pic/event/Skip.png", "Skip")): - # 事件过程 - self.eventPart() - loopCount = 0 - elif self.single_target_click("./pic/battle/confirm.png", "Confirm"): - # 战斗结算 - loopCount = 0 - elif self.single_target_click("./pic/battle/levelUpConfirm.png", "LevelUpConfirm"): - # 升级结算 - loopCount = 0 - elif self.single_target_click("./pic/scene/QuitScene.png", "QuitScene"): - # 剧情退出 - self.cap_win() - self.single_target_click("./pic/scene/SkipScene.png", "SkipScene") + + # 镜本中途的返回主界面 + if self.single_target_click("./pic/back/To Window.png", "To Window"): self.cap_win() - self.single_target_click("./pic/scene/SkipConfirm.png", "SkipConfirm") - loopCount = 0 - elif(self.single_target_click("./pic/team/LeftArrow.png", "ExitPrepareTeam")): - # 组队过程中 - loopCount = 0 - elif(self.single_target_click("./pic/mirror/mirror2/ego/egoGift.png", "ChooseEgoGift")): - # 选择ego + self.single_target_click("./pic/back/whiteBackGroundConfirm.png", "whiteConfirm") + + # 战斗结算的确认 + self.single_target_click("./pic/back/blackBackGroundConfirm.png", "blackCOnfirm") + + # 在剧情中退出 + if self.single_target_click("./pic/back/SceneSetting.png", "SceneSetting"): + self.press_key("esc") self.cap_win() - self.single_target_click("./pic/mirror/mirror2/ego/SelectEGOGift.png", "SelectEGOGift", 0, 0, 6) - loopCount = 0 + self.single_target_click("./pic/back/whiteBackGroundConfirm.png", "whiteConfirm") + + # 镜本结算 + if self.single_target_click("./pic/mirror/mirror3/ClaimRewards.png","ClaimRewards"): + for i in range(5): + self.press_key("enter") + + # 在ego选择退出 + if self.single_target_click("./pic/back/settingGear.png", "settingGear"): + continue + + + # 等待加载情况 if(self.is_find("./pic/Wait.png", "Wait Sign")): - self.myWait() + self.myWait() + + if(self.is_find("./pic/back/mainMenuSetting.png", "main menu setting")): + self.press_key("esc") self.cap_win() - # 经验本或者纽本的情况 - if(self.is_find("./pic/luxcavation/ThreadEntrance.png", "ThreadEntrance")): - self.single_target_click("./pic/goBack/leftArrow.png", "leftArrow") - loopCount = 0 - # 镜牢的情况 - elif(self.is_find("./pic/mirror/mirror2/way/mirror2MapSign.png", "mirror2MapSign") - or self.is_find("./pic/mirror/mirror2/EGOGiftOwned.png", "EGOGiftOwned")): - if self.single_target_click("./pic/mirror/mirror2/Gear.png", "ExitGear"): - self.cap_win() - self.single_target_click( - "./pic/mirror/mirror2/LeftArrow.png", "ToWindow") - self.cap_win() - self.single_target_click("./pic/mirror/mirror2/whiteConfirm.png", "Confirm", 0, 0, 5) - loopCount = 0 - elif self.single_target_click("./pic/mirror/mirror2/ClaimRewards.png","ClaimRewards", 0, 0, 0.7, 1, 0.7): - self.cap_win() - self.single_target_click("./pic/mirror/mirror2/Receive.png","Receive") - self.cap_win() - if self.single_target_click("./pic/mirror/mirror2/whiteConfirm.png","FirstConfirm"): - self.cap_win() - if self.single_target_click("./pic/mirror/mirror2/way/Confirm.png","SecondConfirm"): - loopCount = 0 - + # 退出的通用步骤esc + self.press_key("esc") + + loopCount += 1 + #在循环里必须有应对错误的情况 self.errorRetry() - self.cap_win() - # 第二次也不行时,一定是出现了脚本中没有的情况 - if loopCount > 2: + if loopCount > 30: myLog( "warning", "Can't Find The Way MainMenu. Must be Unknown Situation. Please Restart the Game and the Script") raise backMainWinError("无法返回主界面,不能进行下一步") - loopCount += 1 def allWinRateBattle(self): '''全部采用WinRate战斗''' @@ -126,7 +107,7 @@ def allWinRateBattle(self): self.is_find("./pic/battle/Start.png", "StartBattle")): self.press_key("p") - #self.single_target_click("./pic/battle/WinRate.png", "WinRate") + #self.is_find("./pic/battle/WinRate.png", "WinRate") self.press_key("enter") condition = True elif(self.is_find("./pic/battle/battlePause.png", "Fighting Sign")): @@ -161,7 +142,14 @@ def eventPart(self): self.cap_win() self.single_target_click("./pic/event/Skip.png", "Skip", 0, 0, 0.3, 3) + + # 对bus/chair的出口第一时间反应 + self.cap_win() + if(self.single_target_click("./pic/event/Leave.png", "Leave")): + self.cap_win() + self.single_target_click("./pic/mirror/mirror2/whiteConfirm.png", "Confirm") + #对判定事件的处理,优先择高概率 self.cap_win() if(self.is_find("./pic/event/ChooseCheck.png","ChooseCheck")): @@ -184,9 +172,6 @@ def eventPart(self): if(self.is_find("./pic/event/Choices.png","Choices")): self.copeWithWhateverEvent() - if(self.single_target_click("./pic/event/Leave.png", "Leave")): - self.cap_win() - self.single_target_click("./pic/mirror/mirror2/whiteConfirm.png", "Confirm") mySleep(1) if(not self.is_find("./pic/event/Skip.png", "Skip")): @@ -251,9 +236,100 @@ def waitSign(self): result = False if(self.is_find("./pic/Wait.png", "Wait Sign")): result = True - elif(self.is_find("./pic/WholeBlack.png", "WholeBlack")): + elif(self.is_find("./pic/WholeBlack.png", "WholeBlack", 0.99)): result = True - elif(self.is_find("./pic/CONNECTING.png", "CONNECTING")): + return result + + + #根据已选人数和队伍可容纳人数做情况分类 + #检测3/3;4/4;5/5;6/6;7/7最好就一个标准,能省不少时间 + def judTeamCondition(self): + '''判断当前队伍状况''' + resultCondition = -1 + if(self.is_find("./pic/team/FullTeam77.png", "FullTeam7/7", 0.94) or\ + self.is_find("./pic/team/FullTeam66.png", "FullTeam6/6", 0.94) or\ + self.is_find("./pic/team/FullTeam55.png", "FullTeam5/5", 0.94) or\ + self.is_find("./pic/team/FullTeam44.png", "FullTeam4/4", 0.94) or\ + self.is_find("./pic/team/FullTeam33.png", "FullTeam3/3", 0.94)): + resultCondition = 0 + elif(self.is_find("./pic/team/EmptyTeam03.png", "EmptyTeam0/3", 0.94)): + resultCondition = 1 + elif(self.is_find("./pic/team/EmptyTeam04.png", "EmptyTeam0/4", 0.94) or\ + self.is_find("./pic/team/NotFullTeam34.png", "NotFullTeam3/4", 0.94)): + resultCondition = 2 + elif(self.is_find("./pic/team/EmptyTeam05.png", "EmptyTeam0/5", 0.94)): + resultCondition = 3 + elif(self.is_find("./pic/team/EmptyTeam06.png", "EmptyTeam0/6", 0.94) or\ + self.is_find("./pic/team/NotFullTeam56.png", "NotFullTeam5/6", 0.94)): + resultCondition = 4 + elif(self.is_find("./pic/team/EmptyTeam07.png", "EmptyTeam0/7", 0.94) or\ + self.is_find("./pic/team/NotFullTeam67.png", "NotFullTeam6/7", 0.94)): + resultCondition = False + return resultCondition + + + #满队标准 + def judFullTeam(self,condition): + '''判断队伍是否人满''' + result = False + if(condition == 0): result = True + elif(condition == 1): + if(self.is_find("./pic/team/FullTeam33.png", "FullTeam3/3", 0.94)): + result = True + elif(condition == 2): + if(self.is_find("./pic/team/FullTeam44.png", "FullTeam4/4", 0.94)): + result = True + elif(condition == 3): + if(self.is_find("./pic/team/FullTeam55.png", "FullTeam5/5", 0.94)): + result = True + elif(condition == 4): + if(self.is_find("./pic/team/FullTeam66.png", "FullTeam6/6", 0.94)): + result = True + elif(condition == 5): + if(self.is_find("./pic/team/FullTeam77.png", "FullTeam7/7", 0.94)): + result = True + else: + if(self.is_find("./pic/team/FullTeam77.png", "FullTeam7/7", 0.94) or\ + self.is_find("./pic/team/FullTeam66.png", "FullTeam6/6", 0.94) or\ + self.is_find("./pic/team/FullTeam55.png", "FullTeam5/5", 0.94) or\ + self.is_find("./pic/team/FullTeam44.png", "FullTeam4/4", 0.94) or\ + self.is_find("./pic/team/FullTeam33.png", "FullTeam3/3", 0.94)): + result = True return result + + @checkAndExit + @beginAndFinishLog + def prepareBattle(self): + '''准备战斗的流程''' + self.cap_win() + i = 1 + countFlag = 0 + condition = self.judTeamCondition() + while(not self.judFullTeam(condition)): + #i的归零 + if(i > 12): + i = 1 + countFlag += 1 + if(countFlag > 1): + myLog("warning","Can't make team full") + break + self.cap_win() + if(i < 7): + addX = i * 140 + addY = 0 + else: + addX = (i - 6) * 140 + addY = 200 + + self.single_target_click("./pic/team/Announcer.png", "Member", addX, addY + 100, 0.2) + self.cap_win() + i += 1 + + self.press_key("enter") + mySleep(5) + # self.single_target_click("./pic/team/Announcer.png", "ToBattle", 1000, 400, 5) + self.cap_win() + if(self.is_find("./pic/Wait.png", "Wait Sign")): + self.myWait() diff --git a/src/script/classTask.py b/src/script/classTask.py index 5d161c6..d7e2b55 100644 --- a/src/script/classTask.py +++ b/src/script/classTask.py @@ -21,19 +21,51 @@ class _task(): '''在这里做前后台的切换''' __slots__ = () - def single_target_click(self,img_model_path, name, addX=0, addY=0,waitTime = 0.9, clickCount = 1, correctRate = 0.7): + def single_target_click(self,img_model_path, name, addX=0, addY=0,waitTime = 0.8, clickCount = 1, correctRate = 0.75): + """ + 输入一个图片模板,自动点击截图中一个 + :param img_model_path: 图片模板相对坐标 + :param name:当前进程名字/代号 + :param addX:x坐标偏移,默认为0 + :param addY:y坐标偏移,默认为0 + :param waitTime:点击一次后的等待时间 + :param clickCount:点击次数,默认为1 + :param correctRate:准确率,0.7起步会比较准确 + :return: 是否完成点击 + """ return autoSinClick(img_model_path, name, addX, addY,waitTime, clickCount, correctRate) def press_key(self,key): pressKey(key) - def multiple_target_click(self,img_model_path, name, addX=0, addY=0,waitTime = 0.5, clickCount = 1, correctRate = 0.7): + def multiple_target_click(self,img_model_path, name, addX=0, addY=0,waitTime = 0.5, clickCount = 1, correctRate = 0.75): + """ + 输入一个图片模板,自动点击截图中多个 + :param img_model_path: 图片模板相对坐标 + :param name:当前进程名字/代号 + :param addX:x坐标偏移,默认为0 + :param addY:y坐标偏移,默认为0 + :param waitTime:点击一次后的等待时间 + :param clickCount:点击次数,默认为1 + :param correctRate:准确率,0.7起步会比较准确 + :return: 是否完成点击 + """ return autoMulClick(img_model_path, name, addX, addY,waitTime, clickCount, correctRate) def cap_win(self): + ''' + 截屏函数,并将图片保存为screenshot.png + ''' winCap() def is_find(self,img_model_path, name, correctRate = 0.7): + """ + 输入一个图片模板,自动点击 + :param img_model_path: 图片模板相对坐标 + :param name:当前进程名字/代号 + :param correctRate:准确率,0.7起步会比较准确 + :param return: 是否在截屏中找到目标模板 + """ return autoFind(img_model_path, name, correctRate) def beginAndFinishLog(func): @@ -53,13 +85,13 @@ def checkAndExit(func): '''检查globalVar.exitCode符合条件结束该线程(程序)''' def wrapper(*args, **kw): - if(globalVar.exitCode != 0): + if(globalVar.exitCode == -1): raise userStopError("用户主动终止程序") # 真正函数 func(*args, **kw) - if(globalVar.exitCode != 0): + if(globalVar.exitCode == -1): raise userStopError("用户主动终止程序") return wrapper diff --git a/src/script/scheme.py b/src/script/scheme.py index 4edeb43..0156014 100644 --- a/src/script/scheme.py +++ b/src/script/scheme.py @@ -36,22 +36,29 @@ def scriptTasks(): # 全流程 # 初始化游戏窗口 win.winTask() + # 从Start界面到主菜单界面 trans.ScriptGameStart() trans.ScriptBackToInitMenu() + # 狂气购买脑啡肽 trans.buyEnkephalin() + # 脑啡肽换饼 trans.convertPai() + # EXP lux.ScriptTaskEXP() # 每完成一次任务,获取完成次数 globalVar.exeResult["EXPFinishCount"] = lux.getEXPFinishCount() + # Thread lux.ScriptTaskThread() globalVar.exeResult["ThreadFinishCount"] = lux.getThreadFinishCount() + # Mirror mir.start() globalVar.exeResult["MirrorFinishCount"] = mir.getMirrorFinishCount() + # Prize prize.getPrize() \ No newline at end of file diff --git a/src/test/tryClick.py b/src/test/tryClick.py index e8e220d..70c8591 100644 --- a/src/test/tryClick.py +++ b/src/test/tryClick.py @@ -9,7 +9,7 @@ from src.common import getPic, autoFindOrClick as afc def tryClick(img_model_path, name, addX=0, addY=0,waitTime = 0.7, clickCount = 1, correctRate = 0.8): - self.cap_win() - self.single_target_click(img_model_path, name, addX, addY,waitTime, clickCount , correctRate) + getPic.winCap() + afc.autoSinClick(img_model_path, name, addX, addY,waitTime, clickCount , correctRate) diff --git a/src/test/tryFind.py b/src/test/tryFind.py new file mode 100644 index 0000000..c8221af --- /dev/null +++ b/src/test/tryFind.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- +''' +* Author: LuYaoQi +* Time : 2023/12/27 21:52 +* File : tryFind.py +* Project :LixAssistantLimbusCompany +* Function :实验性识图测试 +''' +from src.common import getPic, autoFindOrClick as afc + +def tryFind(img_model_path, name, correctRate = 0.8): + getPic.winCap() + afc.autoFind(img_model_path, name, correctRate) +