Skip to content

Commit

Permalink
mirror3 suitable
Browse files Browse the repository at this point in the history
  • Loading branch information
HSLix committed Dec 27, 2023
1 parent 5687baf commit 204bfa0
Show file tree
Hide file tree
Showing 102 changed files with 878 additions and 178 deletions.
11 changes: 10 additions & 1 deletion globalVar.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Binary file removed pic/CONNECTING.png
Binary file not shown.
Binary file added pic/back/Give Up.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pic/back/SceneSetting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pic/back/To WIndow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pic/back/blackBackGroundConfirm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pic/back/mainMenuSetting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pic/back/settingGear.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pic/back/whiteBackGroundConfirm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed pic/error/JSchoolNetError.png
Binary file not shown.
Binary file removed pic/error/JSchoolNetSignIn.png
Binary file not shown.
Binary file removed pic/error/PingYin.png
Binary file not shown.
Binary file removed pic/error/WIFI.png
Binary file not shown.
Binary file removed pic/error/WuBi.png
Binary file not shown.
Binary file modified pic/event/ToBattle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pic/luxcavation/EXPDifficultyLv38.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pic/luxcavation/ThreadDifficultyLv40.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed pic/luxcavation/ThreadHard.png
Binary file not shown.
Binary file added pic/mirror/mirror3/BuyCoin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pic/mirror/mirror3/ClaimRewards.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pic/mirror/mirror3/EGOGiftOwned.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pic/mirror/mirror3/Enter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pic/mirror/mirror3/Gear.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pic/mirror/mirror3/LeftArrow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pic/mirror/mirror3/Mirror3Normal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pic/mirror/mirror3/MirrorDungeons.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pic/mirror/mirror3/Preset.png
Binary file added pic/mirror/mirror3/Receive.png
Binary file added pic/mirror/mirror3/Resume.png
Binary file added pic/mirror/mirror3/blackConfirm.png
Binary file added pic/mirror/mirror3/ego/RandomEGOGift.png
Binary file added pic/mirror/mirror3/ego/SelectEGOGift.png
Binary file added pic/mirror/mirror3/ego/confirmRandomEGOGift.png
Binary file added pic/mirror/mirror3/ego/egoGift.png
Binary file added pic/mirror/mirror3/firstTeamConfirm.png
Binary file added pic/mirror/mirror3/way/Battle/BattleLH.png
Binary file added pic/mirror/mirror3/way/Battle/BattleLL.png
Binary file added pic/mirror/mirror3/way/Battle/BattleLM.png
Binary file added pic/mirror/mirror3/way/Battle/BattleM.png
Binary file added pic/mirror/mirror3/way/Battle/BattleRH.png
Binary file added pic/mirror/mirror3/way/Battle/BattleRL.png
Binary file added pic/mirror/mirror3/way/Battle/BattleRM.png
Binary file added pic/mirror/mirror3/way/BigSelf.png
Binary file added pic/mirror/mirror3/way/Boss/BossLH.png
Binary file added pic/mirror/mirror3/way/Boss/BossLL.png
Binary file added pic/mirror/mirror3/way/Boss/BossLM.png
Binary file added pic/mirror/mirror3/way/Boss/BossM.png
Binary file added pic/mirror/mirror3/way/Boss/BossRH.png
Binary file added pic/mirror/mirror3/way/Boss/BossRL.png
Binary file added pic/mirror/mirror3/way/Boss/BossRM.png
Binary file added pic/mirror/mirror3/way/Bus/BusLH.png
Binary file added pic/mirror/mirror3/way/Bus/BusLL.png
Binary file added pic/mirror/mirror3/way/Bus/BusLM.png
Binary file added pic/mirror/mirror3/way/Bus/BusM.png
Binary file added pic/mirror/mirror3/way/Bus/BusRH.png
Binary file added pic/mirror/mirror3/way/Bus/BusRL.png
Binary file added pic/mirror/mirror3/way/Bus/BusRM.png
Binary file added pic/mirror/mirror3/way/Chair/ChairLH.png
Binary file added pic/mirror/mirror3/way/Chair/ChairLL.png
Binary file added pic/mirror/mirror3/way/Chair/ChairLM.png
Binary file added pic/mirror/mirror3/way/Chair/ChairM.png
Binary file added pic/mirror/mirror3/way/Chair/ChairRH.png
Binary file added pic/mirror/mirror3/way/Chair/ChairRL.png
Binary file added pic/mirror/mirror3/way/Chair/ChairRM.png
Binary file added pic/mirror/mirror3/way/Confirm.png
Binary file added pic/mirror/mirror3/way/Encounter/EncounterLH.png
Binary file added pic/mirror/mirror3/way/Encounter/EncounterLL.png
Binary file added pic/mirror/mirror3/way/Encounter/EncounterLM.png
Binary file added pic/mirror/mirror3/way/Encounter/EncounterM.png
Binary file added pic/mirror/mirror3/way/Encounter/EncounterRH.png
Binary file added pic/mirror/mirror3/way/Encounter/EncounterRL.png
Binary file added pic/mirror/mirror3/way/Encounter/EncounterRM.png
Binary file added pic/mirror/mirror3/way/Enter.png
Binary file added pic/mirror/mirror3/way/Fight/FightLH.png
Binary file added pic/mirror/mirror3/way/Fight/FightLL.png
Binary file added pic/mirror/mirror3/way/Fight/FightLM.png
Binary file added pic/mirror/mirror3/way/Fight/FightM.png
Binary file added pic/mirror/mirror3/way/Fight/FightRH.png
Binary file added pic/mirror/mirror3/way/Fight/FightRL.png
Binary file added pic/mirror/mirror3/way/Fight/FightRM.png
Binary file added pic/mirror/mirror3/way/Self.png
Binary file added pic/mirror/mirror3/way/mirror3MapSign.png
Binary file added pic/mirror/mirror3/whiteConfirm.png
2 changes: 1 addition & 1 deletion src/common/autoFindOrClick.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/common/pressKey.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


12 changes: 5 additions & 7 deletions src/gui/myGUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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"]))

Expand Down
5 changes: 4 additions & 1 deletion src/gui/scriptGUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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()
Expand Down
48 changes: 23 additions & 25 deletions src/script/classBridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from src.error.myError import *
from src.log.myLog import myLog
from src.script.scheme import scriptTasks
import globalVar



Expand All @@ -30,79 +31,77 @@ class _bridgeGuiAndScript(Thread):
def __init__(self):
'''构造函数'''
super(_bridgeGuiAndScript, self).__init__()
global exitCode
exitCode = 0
globalVar.exitCode = 0
self.exception = None
self.exc_traceback = ''




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(
Expand All @@ -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):
Expand Down
39 changes: 6 additions & 33 deletions src/script/classLux.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)

Expand All @@ -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)

Expand All @@ -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()



Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
Loading

0 comments on commit 204bfa0

Please sign in to comment.