zhoubin-me / lushi_script Goto Github PK
View Code? Open in Web Editor NEWThis script is to save your time from Mercenaries mode of Hearthstone
License: MIT License
This script is to save your time from Mercenaries mode of Hearthstone
License: MIT License
Traceback (most recent call last):
File "c:\Users\Desktop\python\lushi_script-main\lushi.py", line 298, in
main()
File "c:\Users\Desktop\python\lushi_script-main\lushi.py", line 293, in main
agent = Agent(team_id=team_id, heros_id=heros_id, skills_id=skills_id, targets_id=targets_id)
File "c:\Users\Desktop\python\lushi_script-main\lushi.py", line 70, in init
self.icons = Icons()
File "c:\Users\Desktop\python\lushi_script-main\lushi.py", line 18, in init
setattr(self, k, self.fname2img(v))
File "c:\Users\Desktop\python\lushi_script-main\lushi.py", line 22, in fname2img
return cv2.cvtColor(cv2.imread(fname), cv2.COLOR_BGR2GRAY)
cv2.error: OpenCV(4.5.4-dev) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'
炉石默认没有1600900的分辨率
我调整了配置文件,修改到了1600900,画质为高
进入炉石运行之后点的位置都不对
然后也识别不了界面
我把识别阈值调低后可以识别,但是点击的位置不对。。
屏幕分辨率2560*1600
缩放我125%试过不行
100%也不行
请问这是什么问题所导致的?
欢迎各位参加新版本与功能测试
QQ群:832946624
现版本会主动做任务吗,不会的话希望加上
还有就是先做上检测到完成任务去收取一下,毕竟有些任务第一个技能就能完成
提示
D:\Program Files (x86)\lushi_script-main>python lushi.py
Traceback (most recent call last):
File "D:\Program Files (x86)\lushi_script-main\lushi.py", line 292, in
main()
File "D:\Program Files (x86)\lushi_script-main\lushi.py", line 283, in main
assert(team_id in [0, 1, 2] and hero_cnt <= 6)
AssertionError
依赖已经安装了
不然有时候第三个上的英雄放在第一个了
cmd 里一直跳 blue_portal的位置 但是没有下一步操作
final_confirm: [794, 800]
随机漩涡选到绝命炸弹会卡住
如果遇到暗中破坏,脚本会一直点暗中破坏
没截图 当出现三个英雄技能释放不一致(比如1释放 23没释放)时会卡住 (循环变为1没释放 23释放)<->(1释放 23没释放)
连续两个操作之间的延迟,这个配置并不是对所有操作生效,战斗接受后点击下一场战斗时,左键点的非常快,没有延迟,有时会拖动路线图,然后就卡在那里了,基本打几把就会遇到。目前发现这个延迟生效只在选择佣兵上场的时候有用。选择技能,放弃战斗,这些操作都是瞬间完成的,没有延迟,有几次就卡在点放弃那里,点的太快,反应不过来,电脑配置应该没问题(4800h rtx2060 16g)。
领取奖励后结束游戏,这个配置也并不总是生效,有时会卡在选择神秘人那里不动,就是要三选一的时候不选择,有时选择完后不会放弃,继续打完,有时会。
怎么设置1600x900的分辨率啊🤣
![屏幕截图 2021-10-27 135011](https://user-images.githubusercontent.com/40064420/139007340-966fa984-edf5-4315-878c-8cf3996082cd.png
)
神秘人优先选择白名单有的人物,这样的好处是神秘人任务没满的时候可以选择自己想要的任务,神秘人任务满的时候可以刷自己想要的碎片
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1125)'))': /simple/opencv-python/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1125)'))': /simple/opencv-python/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1125)'))': /simple/opencv-python/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1125)'))': /simple/opencv-python/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1125)'))': /simple/opencv-python/
Could not fetch URL https://pypi.org/simple/opencv-python/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/opencv-python/ (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1125)'))) - skipping
ERROR: Could not find a version that satisfies the requirement opencv-python
ERROR: No matching distribution found for opencv-python
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1125)'))) - skipping
现在就差第一次打完后,点不到怪物按钮上这个问题,鼠标太偏了,不知道怎么调
还有就是选择关卡的问题了
分辨率改配置解决了,但是发现只要队伍里多一个角色(比如与炸弹和晨拥冰墙)时,程序就和陷入死循环,是否可以通过不选择这类宝藏来避免
现象: 重复在刀油左右点击但是无法选中,然后鼠标点击初始位置,然后再回来在导游左右点击
后台信息:
{'map_not_ready': ((1521, 792), 0.9922804832458496)}, surprise side: right, surprise in middle: False, last battle info : win
{'map_not_ready': ((1521, 792), 0.9922800064086914)}, surprise side: right, surprise in middle: False, last battle info : win
{'map_not_ready': ((1521, 792), 0.9922794699668884)}, surprise side: right, surprise in middle: False, last battle info : win
{'map_not_ready': ((1521, 792), 0.992278516292572)}, surprise side: right, surprise in middle: False, last battle info : win
{'map_not_ready': ((1521, 792), 0.9922800064086914)}, surprise side: right, surprise in middle: False, last battle info : win
{'map_not_ready': ((1521, 792), 0.9922800064086914)}, surprise side: right, surprise in middle: False, last battle info : win
{'map_not_ready': ((1521, 792), 0.9922794699668884)}, surprise side: right, surprise in middle: False, last battle info : win
{'map_not_ready': ((1521, 792), 0.9922804832458496)}, surprise side: right, surprise in middle: False, last battle info : win
选中之后不放技能
欢迎各位留言反馈
我设置的early_stop: 0
在神秘选项选到炸弹后在下一个本进去以后就直接退出了
比如队伍里有晨拥或者吉安娜的时候,随机出的嘲讽冰墙奖励,会使场上有四个单位
Line 182 in 2156e07
会自动寻加速宝藏,那就断了连击
召唤物那段改成
if ('summoned_demon' in states) and (states['summoned_demon'][0][1] > self.locs.resolution[1] / 2):
print('Found Summoned Demon, checking coordinates', states)
print("Surrendering due to extra minion on our side", states)
pyautogui.click(rect[0] + self.locs.options[0], rect[1] + self.locs.options[1])
pyautogui.click(rect[0] + self.locs.surrender[0], rect[1] + self.locs.surrender[1])
continue
可以避免对面出现召唤物时卡住,反复输出Found Summoned Demon, checking coordinates。
另外,在选路的三次点击操作后再加一个神秘人为横坐标的点击,这样不容易选错路。在出现炸弹或传送门时,可以先点选择再投降,增加投降产出。
5个箱子只能打开3个
C:\Users\Administrator\Desktop\lushi_script-main>python lushi.py --lang chs
Traceback (most recent call last):
File "C:\Users\Administrator\Desktop\lushi_script-main\lushi.py", line 11, in
from util import find_lushi_window, find_icon_location, restart_game, set_top_window
File "C:\Users\Administrator\Desktop\lushi_script-main\util.py", line 6, in
import psutil
ModuleNotFoundError: No module named 'psutil'
改英文运行 不断杀程序重启
我两天前开始使用这个脚本,今天开始发现有些战斗开始时,佣兵的排位发生了变化,似乎是随机的。队伍满6个英雄,前两天没有这个问题,不知是否有遇到同样情况的。
打3-1boss的时候,火焰队全体技能选完之后不点结束,会点到BOSS头上,然后循环重新选技能,打了好几遍都是这样
用记事本编辑config.txt后运行会出现如下错误:
C:\lushi>python lushi.py
Traceback (most recent call last):
File "lushi.py", line 292, in
main()
File "lushi.py", line 278, in main
team_id, hero_cnt = [int(s.strip()) for s in team_id.strip().split(' ') if not s.startswith('#')]
File "lushi.py", line 278, in
team_id, hero_cnt = [int(s.strip()) for s in team_id.strip().split(' ') if not s.startswith('#')]
ValueError: invalid literal for int() with base 10: '\ufeff2'
编辑后的config.txt内容我也贴上来:
2 6 #出场队伍序号和队伍英雄数量,2为第三支队伍,6为队伍中有六个英雄
0 4 5 #出场英雄的序号,0为第一个,1为第二个
1 0 0 #英雄技能编号,0为第一个,1为第二个
1 1 1 #指向目标编号,-1为无指向性的随机或AOE,1为第二个目标
1 #再领取奖励后是否立即提前结束副本,0为继续打完,1为提前结束
0.8 #连续两个操作之间的延迟,跟网速有关,有时候太快会点不到就宕机了
是保存格式的原因吗?试了ANSI、UTF-8、Unicode 都不行
Traceback (most recent call last):
File "E:/炉石/lushi_script-main/lushi.py", line 309, in
main()
File "E:/炉石/lushi_script-main/lushi.py", line 304, in main
agent.run()
File "E:/炉石/lushi_script-main/lushi.py", line 144, in run
states, rect = self.check_state()
File "E:/炉石/lushi_script-main/lushi.py", line 255, in check_state
lushi, image = find_lushi_window()
File "E:/炉石/lushi_script-main/lushi.py", line 27, in find_lushi_window
win32gui.SetWindowPos(hwnd, win32con.HWND_TOPMOST, 0,0,0,0, win32con.SWP_NOMOVE | win32con.SWP_NOSIZE)
pywintypes.error: (5, 'SetWindowPos', '拒绝访问。')
进程已结束,退出代码为 1
# option button
options: [1580, 970] # [x, y]
# surrender button
surrender: [815, 393] # [x, y]
# view team members button
view_team: [647, 885]
# give up button
give_up: [929, 906]
# give up confirm button
give_up_cfm: [712, 260]
互投区人已经多起来了,能不能加一个PVP投降的功能,也可以刷很多碎片
我之前用按键精灵刷2-5,进去AOE之后就走,但是发现有白嫖的路线多走在放弃东西会多。
本来把那个冰霜的图改成那个27的本,以为能刷。TnT
这个放弃会出紫碎片跟橙,适合挂机弄新碎片。
如题,暴雪已经修改了神秘人的概率,可否加入 1-1 来刷币, 2-5,2-6 刷神秘人
以1600*900分辨率运行 每次打完BOSS无法正常拾取宝箱
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.