Skip to content

Commit

Permalink
Merge pull request #226 from Night-stars-1/master
Browse files Browse the repository at this point in the history
fix: 将(0,0)调整为获取坐标,更改更新策略
  • Loading branch information
Night-stars-1 authored May 18, 2023
2 parents 5110b93 + c842f2c commit 28dcccd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions Honkai_Star_Rail.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

def main():
main_start()
up_data()
start = input('请输入起始地图(如果从头开始请输入0):')
if "-" in start and "_" in start or start == '0':
log.info("脚本将自动切换至游戏窗口,请保持游戏窗口激活")
Expand Down Expand Up @@ -110,8 +109,14 @@ def up_data():
try:
if not pyuac.isUserAdmin():
pyuac.runAsAdmin()
else:
main()
else:
title = "请选择操作"
options = ['启动脚本', '检查更新']
option = questionary.select(title, options).ask()
if option == "启动脚本":
main()
elif option == "检查更新":
up_data()
except ModuleNotFoundError as e:
print(traceback.format_exc())
os.system("pip install -r requirements.txt")
Expand Down
2 changes: 1 addition & 1 deletion tools/calculated.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def auto_map(self, map, old=True):
if value == 1: # 进战斗
self.fighting()
elif value == 2: # 障碍物
self.Click((0, 0))
self.Click(win32api.GetCursorPos())
time.sleep(1)
else:
raise Exception(f"map数据错误, fighting参数异常:{map_filename}", map)
Expand Down

0 comments on commit 28dcccd

Please sign in to comment.