=3.6. To in" /> =3.6. To in" /> =3.6. To in"/>

A script to "SHUA" H1-2 map of Mercenaries mode of Hearthstone

Overview

lushi_script

Introduction

This script is to "SHUA" H1-2 map of Mercenaries mode of Hearthstone

Installation

Make sure you installed python>=3.6. To install python, we recommand Anaconda Make sure you added python path into your $PATH system environment/variables

Run the following in your commandline/terminal

pip install opencv-python numpy pyautogui pillow pywin32

Run

In your commandline/terminal, CD to this folder, run the following

python lushi.py 
Comments
  • 当随机奖励为召唤物时,下一次战斗选择技能会卡死

    当随机奖励为召唤物时,下一次战斗选择技能会卡死

    比如队伍里有晨拥或者吉安娜的时候,随机出的嘲讽冰墙奖励,会使场上有四个单位

    https://github.com/zhoubin-me/lushi_script/blob/2156e07327b67cec4c9b40192b648c1758c67622/lushi.py#L182 这一行估计要加一个blacklist image,防止选择类似的奖励。

    opened by cncndl 9
  • 运行错误

    运行错误

    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'

    opened by mmnmm2021 6
  • 在加载的时候出现以下代码,并且退出进程,请问怎么解决?

    在加载的时候出现以下代码,并且退出进程,请问怎么解决?

    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

    opened by adf123 6
  • script works fine right until the combat starts. what to do?

    script works fine right until the combat starts. what to do?

    I installed python 3.7 and visual basic and did alll the things and got the latest script and all that. It even starts the game for me and goes into the fight. And then it doesn't try to do the combat and stay clicking on the bottom right doing nothing. I don't know why exactly tho so any help would be appreciated. thanks for the program btw it has been great saving my time and sanity. (It has been working on my laptop, but not on my desktop, same 1920x1080 resolution monitor and 1600x900 simplified chinese versions)

    opened by cachai 5
  • ModuleNotFoundError: No module named 'hearthstone'

    ModuleNotFoundError: No module named 'hearthstone'

    C:\Users\Administrator\Desktop\lushi_script-0.3.0>python lushi.py --lang chs Traceback (most recent call last): File "lushi.py", line 12, in from log_util.log_util import LogUtil File "C:\Users\Administrator\Desktop\lushi_script-0.3.0\log_util\log_util.py", line 1, in from hearthstone.enums import CardType, Zone, GameTag ModuleNotFoundError: No module named 'hearthstone'

    opened by ColinZYL 4
  • 改配置文件后出错

    改配置文件后出错

    用记事本编辑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 都不行

    opened by BrianLx 4
  • 填完选项发现main函数初始化失败

    填完选项发现main函数初始化失败

    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'

    opened by 519247893 4
Releases(v0.4.6)
  • v0.4.6(Jun 3, 2022)

    Note

    工作路径不能含有中文字符 The working path cannot contain non-ASCII 常规更新 Regular update 更新只需要将GitHub上代码下载下来进行替换,之后执行cn_update_requirements.bat即可。 To update, you only need to download and replace the code on GitHub, and then execute update_requirements.bat.


    What's Changed

    • 新英雄;max_dmg 战斗策略调整 by @littlewrite in https://github.com/zhoubin-me/lushi_script/pull/179
    • 新英雄加入,适应无2、3技能佣兵,不选择免疫、隐身佣兵。 by @littlewrite in https://github.com/zhoubin-me/lushi_script/pull/184
    • 英雄\宝藏 黑白名单;英文版素材更新 by @littlewrite in https://github.com/zhoubin-me/lushi_script/pull/185
    • 添加新英雄,调整截图策略 by @littlewrite in https://github.com/zhoubin-me/lushi_script/pull/191
    • 修复max_dmg会选择 隐身、免疫 佣兵问题 by @littlewrite in https://github.com/zhoubin-me/lushi_script/pull/193
      1. 新英雄。2. 图标更新。3 bug修复与优化 by @littlewrite in https://github.com/zhoubin-me/lushi_script/pull/194
    • 更改ui、后备队伍、参数保存等 by @lskyzero in https://github.com/zhoubin-me/lushi_script/pull/195
    • 修复add,按钮bug by @lskyzero in https://github.com/zhoubin-me/lushi_script/pull/196

    Full Changelog: https://github.com/zhoubin-me/lushi_script/compare/v0.4.5...v0.4.6

    Source code(tar.gz)
    Source code(zip)
    script_with_python37-0.4.6.7z(98.47 MB)
  • v0.4.5(Feb 28, 2022)

    What's Changed

    • 修复无旋涡的地图bug;尤朵拉炮台技能;支持抉择技能 by @littlewrite in https://github.com/zhoubin-me/lushi_script/pull/165
    • 添加新英雄,更新炉石包版本 by @littlewrite in https://github.com/zhoubin-me/lushi_script/pull/172
    • 新增英雄,修复bug by @littlewrite in https://github.com/zhoubin-me/lushi_script/pull/174
    • 优化战斗策略,抉择,休眠支持配置 by @littlewrite in https://github.com/zhoubin-me/lushi_script/pull/175
    • 坐标偏移修复。当任务栏位于屏幕非底部时,可修正按键坐标。 by @ioxv

    Note

    默认策略可以通过普通难度4-13。default configuration can be used to pass 4-13. 如果无法正常点击关卡,可尝试将空白坐标empty更新为travel的坐标值。If you cannot click the level normally, you can try to update the blank coordinate empty to the coordinate value of travel. 英语翻译尚未更新。 English translate may not update.

    Full Changelog: https://github.com/zhoubin-me/lushi_script/compare/v0.4.3...v0.4.5

    Source code(tar.gz)
    Source code(zip)
    script_with_python37-0.4.5.7z(88.33 MB)
  • v0.4.4-beta(Feb 5, 2022)

    What's Changed

    • 修复无旋涡的地图bug;尤朵拉炮台技能;支持抉择技能 by @littlewrite in https://github.com/zhoubin-me/lushi_script/pull/165
    • 添加新英雄,更新lu包版本 by @littlewrite in https://github.com/zhoubin-me/lushi_script/pull/172

    Note

    英文版本和翻译可能尚未更新。 English version and translation may not update.

    Full Changelog: https://github.com/zhoubin-me/lushi_script/compare/v0.4.3...v0.4.4

    Source code(tar.gz)
    Source code(zip)
    script_with_python37-0.4.4.7z(92.52 MB)
  • v0.4.3(Dec 19, 2021)

    修复了许多bug,默认的配置可以用来通过4-13,非常强大与智能,万分感谢@littlewrite Many bugs have been fixed and the default configuration can be used to pass 4-13. New version is very powerful and intelligent. Thank you so much @littlewrite

    What's Changed

    • 自动领宝藏调整,拼地图算法 by @littlewrite in https://github.com/zhoubin-me/lushi_script/pull/145
    • 指定 opencv 版本 by @littlewrite in https://github.com/zhoubin-me/lushi_script/pull/146
    • 添加opencv相关依赖 by @fulln in https://github.com/zhoubin-me/lushi_script/pull/148
    • feat:add hearth window functionality for macOS by @burning489 in https://github.com/zhoubin-me/lushi_script/pull/150
    • 路线直指神秘人;领任务前新增判断 by @littlewrite in https://github.com/zhoubin-me/lushi_script/pull/153
    • 更新素材, 移除opencv 版本依赖 by @littlewrite in https://github.com/zhoubin-me/lushi_script/pull/155
    • 修复地图寻找bug修复,win32api 修复,地图支持13上限 by @littlewrite in https://github.com/zhoubin-me/lushi_script/pull/156
    • 颜色克制;en英雄素材;宝藏黑名单优先级;1-13关卡坐标;boss策略 by @littlewrite in https://github.com/zhoubin-me/lushi_script/pull/159
    • fix check_and_screen return value when exception by @harryhare in https://github.com/zhoubin-me/lushi_script/pull/160
    • fix typo by @harryhare in https://github.com/zhoubin-me/lushi_script/pull/161
    • 修复boss关卡判断问题,调整默认配置 by @littlewrite in https://github.com/zhoubin-me/lushi_script/pull/162

    New Contributors

    • @fulln made their first contribution in https://github.com/zhoubin-me/lushi_script/pull/148
    • @burning489 made their first contribution in https://github.com/zhoubin-me/lushi_script/pull/150

    Full Changelog: https://github.com/zhoubin-me/lushi_script/compare/v0.4.2...v0.4.3

    Source code(tar.gz)
    Source code(zip)
    script_with_python37-0.4.3.zip(149.53 MB)
  • v0.4.2(Nov 20, 2021)

    写在前面(Write in Front)

    12月1日更新,请下载附件内hero_data.csv,替换到/resource路径下,即可添加新佣兵 final_reward.png和final_reward2.png替换到\resource\imgs_chs_1600x900\icons\下

    新版本必须要保存配置后运行才可保证不会出错 The new version must be run after saving the configuration to ensure that no errors occur 有问题请优先查看FAQ Please check the FAQ if you have any questions

    新的变动

    • 宝藏黑白名单,boss奖励截图统计,关卡奖励领取优化。 by @littlewrite in https://github.com/zhoubin-me/lushi_script/pull/138
    • 英文版支持自动提交任务 by @x014 in https://github.com/zhoubin-me/lushi_script/pull/141
    • 黑白名单重新加入,改进代码结构,各种优化 by @littlewrite in https://github.com/zhoubin-me/lushi_script/pull/143
    • bug修复,稳定性改进,增加多种截图选项,方便查询错误与白名单截图 by @Huangyan0804
    • ui改进 @ioxv
    • bug修复s by #blacksilvergeek

    What's changed

    • Treasure black and white list, boss reward screenshot stats, level reward collection optimization. by @littlewrite in https://github.com/zhoubin-me/lushi_script/pull/138
    • English version supports automatic quest submission by @x014 in https://github.com/zhoubin-me/lushi_script/pull/141
    • Black and white list re-added, improved code structure, various optimizations by @littlewrite in https://github.com/zhoubin-me/lushi_script/pull/143
    • Bug fixes, stability improvements, multiple screenshot options for error checking and whitelisting screenshots by @Huangyan0804
    • UI improvements by @ioxv
    • Bug fixes by @blacksilvergeek

    New Contributors

    • @littlewrite made their first contribution in https://github.com/zhoubin-me/lushi_script/pull/138
    • @x014 made their first contribution in https://github.com/zhoubin-me/lushi_script/pull/141
    • @Huangyan0804
    • @ioxv
    • @blacksilvergeek

    附件说明(Annex Notes)

    电脑没有python或者不愿意倒腾的情况下,优先选择下载script_with_python37(傻瓜版),解压运行"run.bat"即可

    如果不能正常运行可以下载source code通过自己电脑上的python运行

    If you don't have python on your computer, you can download script_with_python37, unzip it and run "run.bat".

    If it doesn't work, you can download the source code and run it with python on your computer.

    Full Changelog: https://github.com/zhoubin-me/lushi_script/compare/0.4.1...v0.4.2

    Source code(tar.gz)
    Source code(zip)
    FAQ_CN.html(40.06 KB)
    FAQ_CN.md(5.97 KB)
    final_reward.png(3.06 KB)
    final_reward2.png(2.94 KB)
    hero_data.csv(9.24 KB)
    script_with_python37-0.4.2.7z(94.51 MB)
  • 0.4.1(Nov 14, 2021)

    Update information

    1. Solve the memory leak problem
    2. Add automatic task submission function
    3. Add automatic screenshot function when an error is reported (under logs folder)
    4. Separate log and error files are provided
    5. Support search when selecting heroes
    6. Add 7,8,9 boss levels to the selection
    7. Press ctrl+Q to stop the script from running

    If you have questions, please check the FAQ first.

    Annex Notes

    If you don't have python on your computer, you can download script_with_python37, unzip it and run "run.bat".

    If it doesn't work, you can download the source code and run it with python on your computer.

    更新信息

    1. 解决了内存泄漏问题
    2. 增加了自动提交任务功能
    3. 增加了报错时自动截图功能(log文件夹下)
    4. 提供了单独的log和error文件
    5. 支持选择英雄时进行搜索
    6. 增加了7,8,9关的选择
    7. 按住ctrl+Q停止脚本运行

    有问题请优先查看FAQ

    附件说明

    电脑没有python的情况下,优先选择下载script_with_python37,解压运行"run.bat"即可

    如果不能正常运行可以下载source code通过自己电脑上的python运行

    Source code(tar.gz)
    Source code(zip)
    FAQ_CN.html(41.92 KB)
    FAQ_CN.md(5.64 KB)
    script_with_python37-0.4.1.7z(95.36 MB)
  • v0.4.0(Nov 5, 2021)

  • v0.3.0(Oct 30, 2021)

    • Thanks for the contribution from @Huangyan0804 with Power.log reading and battle AI function
    • Update Chinese Q&A Page, English version is ongoing, thanks for contribution from @dhnynu9xrf
    • Fix bugs of being stuck at spell selection
    • OpenCV based information reading for battle is abandoned
    Source code(tar.gz)
    Source code(zip)
  • v0.2.6.1(Oct 29, 2021)

  • v0.2.6(Oct 29, 2021)

    -修复了若干bug -加入了中控系统 -支持读取英雄血量,颜色,战斗更智能了 -但是识别不了带圣盾的英雄 -死英雄卡地图能自动投降了

    计划

    -加入地图识别功能,更好的寻路 -读取Power.log,获得更多信息

    Source code(tar.gz)
    Source code(zip)
  • v0.2.5(Oct 26, 2021)

    -Addded support for English Hearthstone, but can only run in 1024x768 resolution, convenient to run in virtual machine -中文用户暂时只能运行1600x900分辨率,但是我们更新了中文版的README和配置文件config_chs.yaml -英文版本对面偶数选不中目标的问题,请更改这里

    Next major update will support

    • Hearthstone process management
    • Smarter Battle Mode
    Source code(tar.gz)
    Source code(zip)
  • v0.2.4(Oct 26, 2021)

  • v0.2.3(Oct 25, 2021)

    Update

    • Fixed the bug when team number is 3, 4, 5
    • Fixed the bug that early stop not working

    Next Release Plan

    • Whitelist of Hero for collecting rewards
    • PVP mode support
    Source code(tar.gz)
    Source code(zip)
  • v0.2.2(Oct 24, 2021)

  • v0.2(Oct 24, 2021)

    • Fixed problem for boss selection
    • Support multi round battle skill choice
    • Use YAML for better configurations
    • Restructured for better coding reading
    Source code(tar.gz)
    Source code(zip)
Owner
null
Python script for transferring data between three drives in two separate stages

Waterlock Waterlock is a Python script meant for incrementally transferring data between three folder locations in two separate stages. It performs ha

David Swanlund 13 Nov 10, 2021
This is a python script to navigate and extract the FSD50K dataset

FSD50K navigator This is a script I use to navigate the sound dataset from FSK50K.

sweemeng 2 Nov 23, 2021
AptaMat is a simple script which aims to measure differences between DNA or RNA secondary structures.

AptaMAT Purpose AptaMat is a simple script which aims to measure differences between DNA or RNA secondary structures. The method is based on the compa

GEC UTC 3 Nov 3, 2022
The Spark Challenge Student Check-In/Out Tracking Script

The Spark Challenge Student Check-In/Out Tracking Script This Python Script uses the Student ID Database to match the entries with the ID Card Swipe a

null 1 Dec 9, 2021
Python script to automate the plotting and analysis of percentage depth dose and dose profile simulations in TOPAS.

topas-create-graphs A script to automatically plot the results of a topas simulation Works for percentage depth dose (pdd) and dose profiles (dp). Dep

Sebastian Schäfer 10 Dec 8, 2022
bot for hearthstone mercenaries

Hearthstone-Mercenaries-game-bot - prevention: Bot is not ready and now on the development stage estimated release date - 21.10.21 The main idea of th

Andrew Efimov 59 Dec 12, 2022
Script for generating Hearthstone card spoilers & checklists

This is a script for generating text spoilers and set checklists for Hearthstone. Installation & Running Python 3.6 or higher is required. Copy/clone

John T. Wodder II 1 Oct 11, 2022
Keval allows you to call arbitrary Windows kernel-mode functions from user mode, even (and primarily) on another machine.

Keval Keval allows you to call arbitrary Windows kernel-mode functions from user mode, even (and primarily) on another machine. The user mode portion

null 42 Dec 17, 2022
Transport Mode detection - can detect the mode of transport with the help of features such as acceeration,jerk etc

title emoji colorFrom colorTo sdk app_file pinned Transport_Mode_Detector ?? purple yellow gradio app.py false Configuration title: string Display tit

Nishant Rajadhyaksha 3 Jan 16, 2022
This is the card game like HearthStone and Magic

Territory War How to use it use pip3 to install django and channels: pip3 install Django pip3 install channels go to CardGame/first/consumers.py and g

Caesar 3 Oct 24, 2022
Replace MSFS2020's bing map to google map

English verison here 中文 免责声明 本教程提到的方法仅用于研究和学习用途。我不对使用、拓展该教程及方法所造成的任何法律责任和损失负责。 背景 微软模拟飞行2020的地景使用了Bing的卫星地图,然而卫星地图比较老旧,很多地区都是几年前的图设置直接是没有的。这种现象在全球不同地区

hesicong 272 Dec 24, 2022
Script that attempts to force M1 macs into RGB mode when used with monitors that are defaulting to YPbPr.

fix_m1_rgb Script that attempts to force M1 macs into RGB mode when used with monitors that are defaulting to YPbPr. No warranty provided for using th

Kevin Gao 116 Jan 1, 2023
Transpiler for Excel formula like language to Python. Support script and module mode

Transpiler for Excel formula like language to Python. Support script and module mode (formulas are functions).

Edward Villegas-Pulgarin 1 Dec 7, 2021
Battery conservation Python script for ubuntu to enable battery conservation mode at 60% 80% or 90%

Description Batteryconservation is a small python script wich creates an appindicator for ubuntu which can be used to enable / disable battery conserv

null 3 Jan 4, 2022
Script to create an animated data visualisation for categorical timeseries data - GIF choropleth map with annotations.

choropleth_ldn Simple script to create a chloropleth map of London with categorical timeseries data. The script in main.py creates a gif of the most f

null 1 Oct 7, 2021
Vim python-mode. PyLint, Rope, Pydoc, breakpoints from box.

Python-mode, a Python IDE for Vim This project needs contributors. Documentation: :help pymode https://github.com/python-mode/python-mode/wiki Importa

The Python-Mode 5.4k Jan 1, 2023
Change between dark/light mode depending on the ambient light intensity

svart Change between dark/light mode depending on the ambient light intensity Installation Install using pip $ python3 -m pip install --user svart Ins

Siddharth Dushantha 169 Nov 26, 2022
Custom TensorFlow2 implementations of forward and backward computation of soft-DTW algorithm in batch mode.

Batch Soft-DTW(Dynamic Time Warping) in TensorFlow2 including forward and backward computation Custom TensorFlow2 implementations of forward and backw

null 19 Aug 30, 2022
A small Blender addon for changing an object's local orientation while in edit mode

A small Blender addon for changing an object's local orientation while in edit mode.

Jonathan Lampel 50 Jan 6, 2023
Desktop application for checking sites connection in a background mode

Site connectivity checker Desktop application for checking site connection in a background mode by sending ICMP messages. Problem and solution Usually

Karina Singatullina 26 Dec 19, 2022