├── .gitignore ├── README.md ├── apprcc.qrc ├── apprcc_rc.py ├── asset ├── group0 │ ├── item0.png │ ├── item1.png │ ├── item2.png │ ├── item3.png │ ├── item4.png │ ├── item5.png │ ├── item6.png │ └── item7.png ├── group1 │ ├── item0.png │ ├── item1.png │ ├── item2.png │ ├── item3.png │ ├── item4.png │ ├── item5.png │ ├── item6.png │ └── item7.png ├── group2 │ ├── item0.png │ ├── item1.png │ ├── item2.png │ ├── item3.png │ ├── item4.png │ ├── item5.png │ ├── item6.png │ └── item7.png ├── group3 │ ├── item0.png │ ├── item1.png │ ├── item2.png │ ├── item3.png │ ├── item4.png │ ├── item5.png │ ├── item6.png │ └── item7.png ├── group4 │ ├── 1BoBi.png │ ├── 1ELuoYi.png │ ├── 1EZ.png │ ├── 1GaiLun.png │ ├── 1KaMiEr.png │ ├── 1KaPai.png │ ├── 1KaSaDing.png │ ├── 1LaoShu.png │ ├── 1LianJin.png │ ├── 1NanQiang.png │ ├── 1NuoShou.png │ ├── 1NvJing.png │ ├── 1ZhaDanRen.png │ ├── 2DaZui.png │ ├── 2JiLan.png │ ├── 2JiQiRen.png │ ├── 2JieLa.png │ ├── 2JuMo.png │ ├── 2KaTe.png │ ├── 2KuiYin.png │ ├── 2LangRen.png │ ├── 2TaiLong.png │ ├── 2Wei.png │ ├── 2WuYa.png │ ├── 2XiaoPao.png │ ├── 3AiKe.png │ ├── 3BaoShi.png │ ├── 3ChuangZhang.png │ ├── 3DaChongZi.png │ ├── 3DaTou.png │ ├── 3LeiOuNa.png │ ├── 3LiSangZhuo.png │ ├── 3LuLu.png │ ├── 3MaErZhaHa.png │ ├── 3NvQiang.png │ ├── 3ShaMiLa.png │ ├── 3WeiGuSi.png │ ├── 3XiaoChou.png │ ├── 3ZhaKe.png │ ├── 4BuLong.png │ ├── 4EJiaTe.png │ ├── 4FaTiao.png │ ├── 4FengNv.png │ ├── 4JianJi.png │ ├── 4Jing.png │ ├── 4LaKeSi.png │ ├── 4MengDuo.png │ ├── 4SaLeFenNi.png │ ├── 4SaiEn.png │ ├── 4YongEn.png │ ├── 5AKaLi.png │ ├── 5JiaLiAo.png │ ├── 5JinKeSi.png │ ├── 5KaSha.png │ └── 5WeiKeTuo.png └── sys │ ├── NoFF.png │ ├── dead.png │ ├── inGame.png │ ├── oneStar.png │ ├── reStart0.png │ ├── reStart1.png │ ├── reStart2.png │ ├── reStart3.png │ ├── reStart4.png │ ├── reStart5.png │ ├── reStart6.png │ ├── twoStar.png │ └── wuqi.png ├── install.txt ├── noBB.py ├── noBB.spec ├── noBBui.py ├── noBBui.ui ├── qdark.qss ├── requirements.txt ├── source.py ├── source ├── publicQRcode.jpg ├── qtcode2.png ├── qtcode3.png ├── sponsorship.jpg └── tuBiao.ico ├── style.py └── test ├── 1_get_hero ├── hero.py └── source_hero_map.py ├── 2_change_group0_3_pic_name └── main.py ├── 3_get_pic_base64 ├── asset_file_list.py ├── create_pic_base64.py └── pic_test.py └── tmp ├── daibi.py ├── get_temp_link_code ├── config.ini └── get_temp_link_code.py ├── logs ├── fansile.py ├── loginAPI.py ├── set_status.py └── set_status_v4.5.3.py └── test.py /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # noBB 2 | 基于pyqt和pyautogui的自动挂机脚本 3 | 4 | 修改图片重新就能适应新版本 5 | 运行逻辑太过落后 6 | 精力不在python上导致项目长时间未维护 7 | 8 | - [] 补充文档(程序编译方式, 图片保存方式) 9 | 10 | 11 | # 不多BBv4.6.0(目前应该是s6了, 文档没有更新) 12 | 13 | LOL 云顶之弈刷代币自动挂机脚本 14 | 15 | | 最新版本 | 更新内容 | 更新日期 | 16 | | -------- | --------------------------------------- | -------------- | 17 | | v4.6.0 | 1. 将场下的二星棋子和场上的一星棋子交换 | 2021年02月10日 | 18 | 19 | 20 | ## 第一次使用 21 | 22 | 1. 任务栏不要隐藏, 保持在下面 23 | 2. 电脑分辨率设置为 `1920*1080`,`100%`缩放 24 | 3. LoL客户端默认`1280*720`分辨率,启动后位置不要移动 25 | 4. LoL 游戏内分辨率 `1920*1080`,窗口化 26 | 5. lol 进入云顶之弈房间 27 | 6. 使用基础棋盘 28 | 7. 右键图标使用 管理员模式 启动 `不多BB.exe` 29 | 8. 点击`开始挂机`,双手离开电脑,观察没问题后睡觉 30 | 9. `Alt+Tab`+ `Crtl+0`停止挂机 (英雄联盟游戏内屏蔽了一下快捷键, 所以需要切一下屏) 31 | 10. 有问题和建议可以到[腾讯文档BUG区](https://docs.qq.com/sheet/DSklsY0hZRmhycmJt?groupUin=IJjUw0eVIFNAuHRUyb66pQ%253D%253D&tab=BB08J2)留言 32 | 33 | ## 下载方法 34 | 35 | 1. 加QQ群 `808525936`,群文件直接下载最新版本 36 | 2. 百度网盘链接: 37 | 链接:https://pan.baidu.com/s/1JeIKOCtov_RShm8eZpBirA 38 | 提取码:78oc 39 | 40 | ## 常见问题临时解决方法 41 | 42 | ### 1. 脚本不会投降(不会买英雄)(不会走路)怎么办? 43 | 44 | - 检查是否窗口化 45 | - 检查任务栏是否被隐藏了 46 | - 游戏分辨率是否正确 47 | - 是否是管理员模式启动 48 | 49 | ### 2. 排队几十分钟进不去? 50 | 51 | - 客户端卡了,重启一下 52 | 53 | ### 3. 脚本点不了开始游戏 54 | 55 | - 使用管理员模式启动脚本 56 | - 客户端启动后不要移动位置,如果移动过重启游戏, 进入房间后再开脚本就行 57 | 58 | ### 4. 晚上睡觉前好好的,白天起来脚本不动了,只拿3只怪 59 | 60 | - 初步建议是 61 | - 不要关闭显示器 62 | - 笔记本不要盖上盖子 63 | - 息屏后,拔掉外接鼠标键盘,可能会导致脚本停止操作 64 | - 当然如果你关着显示器脚本正常的话就无所谓了 65 | 66 | ## 版本更新 67 | 68 | | 版本 | 更新内容 | 日期 | 69 | | ------ | ------------------------------------------------------------ | -------------- | 70 | | v4.6.0 | 1. 将场下的二星棋子和场上的一星棋子交换 | 2021年02月10日 | 71 | | v4.5.0 | 1. 更新内置阵容,适配S4.5赛季
2. 支持自定义阵容搭配
3. 修复重新连接,跳过等待,退出小队无法继续挂机的BUG
| 2021年01月15日 | 72 | | v4.2 | 1. 增加掉线重连
2. 2-1回合卖掉第一次选秀的怪 | 2020年11月10日 | 73 | | v4.0 | 1. 永不投降调整为前四投降
2. 会卖选秀和野怪爆的英雄 | 2020年11月3日 | 74 | | v3.0 | 1. 更新界面
2. 投降可以选择投降回合 | 2020年10月21日 | 75 | | v2.11 | 1. 启动前检测环境是否准备好
2. 延长脚本使用期限
3. 增加窗口置顶 | 2020年10月1日 | 76 | | v2.7 | 1. 调整操作频率
2. 新增`ctrl+0`快捷键结束挂机 | 2020年9月26日 | 77 | | v2.1 | 1. 支持快捷键开关脚本
2. 用户可以指定阵容抓牌,可以自定义指定阵容 | 2020年9月23日 | 78 | | v2.0 | 1. 拥有图像界面
2. 可以直接选择是否投降 | 2020年9月22日 | 79 | | v1.4 | 1. 优化终端输出,更好排查原因
1.1 如果时钟=0,说明没检测到inGame.png
1.2 如果金钱=0,说明没检测到inGameTag.png
1.3 用户可以根据输出自行判断,然后替换对应文件,重新在相应位置截图替换即可,名字要相同 | 2020年9月21日 | 80 | | v1.0 | 云顶之弈自动开局,3-4 自动投降,可自定义投降回合 | 2020年9月20日 | 81 | -------------------------------------------------------------------------------- /apprcc.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | source/tuBiao.ico 4 | source/qtcode2.png 5 | source/qtcode3.png 6 | source/publicQRcode.jpg 7 | source/sponsorship.jpg 8 | 9 | 10 | -------------------------------------------------------------------------------- /asset/group0/item0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group0/item0.png -------------------------------------------------------------------------------- /asset/group0/item1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group0/item1.png -------------------------------------------------------------------------------- /asset/group0/item2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group0/item2.png -------------------------------------------------------------------------------- /asset/group0/item3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group0/item3.png -------------------------------------------------------------------------------- /asset/group0/item4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group0/item4.png -------------------------------------------------------------------------------- /asset/group0/item5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group0/item5.png -------------------------------------------------------------------------------- /asset/group0/item6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group0/item6.png -------------------------------------------------------------------------------- /asset/group0/item7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group0/item7.png -------------------------------------------------------------------------------- /asset/group1/item0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group1/item0.png -------------------------------------------------------------------------------- /asset/group1/item1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group1/item1.png -------------------------------------------------------------------------------- /asset/group1/item2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group1/item2.png -------------------------------------------------------------------------------- /asset/group1/item3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group1/item3.png -------------------------------------------------------------------------------- /asset/group1/item4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group1/item4.png -------------------------------------------------------------------------------- /asset/group1/item5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group1/item5.png -------------------------------------------------------------------------------- /asset/group1/item6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group1/item6.png -------------------------------------------------------------------------------- /asset/group1/item7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group1/item7.png -------------------------------------------------------------------------------- /asset/group2/item0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group2/item0.png -------------------------------------------------------------------------------- /asset/group2/item1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group2/item1.png -------------------------------------------------------------------------------- /asset/group2/item2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group2/item2.png -------------------------------------------------------------------------------- /asset/group2/item3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group2/item3.png -------------------------------------------------------------------------------- /asset/group2/item4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group2/item4.png -------------------------------------------------------------------------------- /asset/group2/item5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group2/item5.png -------------------------------------------------------------------------------- /asset/group2/item6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group2/item6.png -------------------------------------------------------------------------------- /asset/group2/item7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group2/item7.png -------------------------------------------------------------------------------- /asset/group3/item0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group3/item0.png -------------------------------------------------------------------------------- /asset/group3/item1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group3/item1.png -------------------------------------------------------------------------------- /asset/group3/item2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group3/item2.png -------------------------------------------------------------------------------- /asset/group3/item3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group3/item3.png -------------------------------------------------------------------------------- /asset/group3/item4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group3/item4.png -------------------------------------------------------------------------------- /asset/group3/item5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group3/item5.png -------------------------------------------------------------------------------- /asset/group3/item6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group3/item6.png -------------------------------------------------------------------------------- /asset/group3/item7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group3/item7.png -------------------------------------------------------------------------------- /asset/group4/1BoBi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/1BoBi.png -------------------------------------------------------------------------------- /asset/group4/1ELuoYi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/1ELuoYi.png -------------------------------------------------------------------------------- /asset/group4/1EZ.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/1EZ.png -------------------------------------------------------------------------------- /asset/group4/1GaiLun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/1GaiLun.png -------------------------------------------------------------------------------- /asset/group4/1KaMiEr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/1KaMiEr.png -------------------------------------------------------------------------------- /asset/group4/1KaPai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/1KaPai.png -------------------------------------------------------------------------------- /asset/group4/1KaSaDing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/1KaSaDing.png -------------------------------------------------------------------------------- /asset/group4/1LaoShu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/1LaoShu.png -------------------------------------------------------------------------------- /asset/group4/1LianJin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/1LianJin.png -------------------------------------------------------------------------------- /asset/group4/1NanQiang.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/1NanQiang.png -------------------------------------------------------------------------------- /asset/group4/1NuoShou.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/1NuoShou.png -------------------------------------------------------------------------------- /asset/group4/1NvJing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/1NvJing.png -------------------------------------------------------------------------------- /asset/group4/1ZhaDanRen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/1ZhaDanRen.png -------------------------------------------------------------------------------- /asset/group4/2DaZui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/2DaZui.png -------------------------------------------------------------------------------- /asset/group4/2JiLan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/2JiLan.png -------------------------------------------------------------------------------- /asset/group4/2JiQiRen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/2JiQiRen.png -------------------------------------------------------------------------------- /asset/group4/2JieLa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/2JieLa.png -------------------------------------------------------------------------------- /asset/group4/2JuMo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/2JuMo.png -------------------------------------------------------------------------------- /asset/group4/2KaTe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/2KaTe.png -------------------------------------------------------------------------------- /asset/group4/2KuiYin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/2KuiYin.png -------------------------------------------------------------------------------- /asset/group4/2LangRen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/2LangRen.png -------------------------------------------------------------------------------- /asset/group4/2TaiLong.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/2TaiLong.png -------------------------------------------------------------------------------- /asset/group4/2Wei.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/2Wei.png -------------------------------------------------------------------------------- /asset/group4/2WuYa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/2WuYa.png -------------------------------------------------------------------------------- /asset/group4/2XiaoPao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/2XiaoPao.png -------------------------------------------------------------------------------- /asset/group4/3AiKe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/3AiKe.png -------------------------------------------------------------------------------- /asset/group4/3BaoShi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/3BaoShi.png -------------------------------------------------------------------------------- /asset/group4/3ChuangZhang.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/3ChuangZhang.png -------------------------------------------------------------------------------- /asset/group4/3DaChongZi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/3DaChongZi.png -------------------------------------------------------------------------------- /asset/group4/3DaTou.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/3DaTou.png -------------------------------------------------------------------------------- /asset/group4/3LeiOuNa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/3LeiOuNa.png -------------------------------------------------------------------------------- /asset/group4/3LiSangZhuo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/3LiSangZhuo.png -------------------------------------------------------------------------------- /asset/group4/3LuLu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/3LuLu.png -------------------------------------------------------------------------------- /asset/group4/3MaErZhaHa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/3MaErZhaHa.png -------------------------------------------------------------------------------- /asset/group4/3NvQiang.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/3NvQiang.png -------------------------------------------------------------------------------- /asset/group4/3ShaMiLa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/3ShaMiLa.png -------------------------------------------------------------------------------- /asset/group4/3WeiGuSi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/3WeiGuSi.png -------------------------------------------------------------------------------- /asset/group4/3XiaoChou.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/3XiaoChou.png -------------------------------------------------------------------------------- /asset/group4/3ZhaKe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/3ZhaKe.png -------------------------------------------------------------------------------- /asset/group4/4BuLong.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/4BuLong.png -------------------------------------------------------------------------------- /asset/group4/4EJiaTe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/4EJiaTe.png -------------------------------------------------------------------------------- /asset/group4/4FaTiao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/4FaTiao.png -------------------------------------------------------------------------------- /asset/group4/4FengNv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/4FengNv.png -------------------------------------------------------------------------------- /asset/group4/4JianJi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/4JianJi.png -------------------------------------------------------------------------------- /asset/group4/4Jing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/4Jing.png -------------------------------------------------------------------------------- /asset/group4/4LaKeSi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/4LaKeSi.png -------------------------------------------------------------------------------- /asset/group4/4MengDuo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/4MengDuo.png -------------------------------------------------------------------------------- /asset/group4/4SaLeFenNi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/4SaLeFenNi.png -------------------------------------------------------------------------------- /asset/group4/4SaiEn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/4SaiEn.png -------------------------------------------------------------------------------- /asset/group4/4YongEn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/4YongEn.png -------------------------------------------------------------------------------- /asset/group4/5AKaLi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/5AKaLi.png -------------------------------------------------------------------------------- /asset/group4/5JiaLiAo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/5JiaLiAo.png -------------------------------------------------------------------------------- /asset/group4/5JinKeSi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/5JinKeSi.png -------------------------------------------------------------------------------- /asset/group4/5KaSha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/5KaSha.png -------------------------------------------------------------------------------- /asset/group4/5WeiKeTuo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/group4/5WeiKeTuo.png -------------------------------------------------------------------------------- /asset/sys/NoFF.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/sys/NoFF.png -------------------------------------------------------------------------------- /asset/sys/dead.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/sys/dead.png -------------------------------------------------------------------------------- /asset/sys/inGame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/sys/inGame.png -------------------------------------------------------------------------------- /asset/sys/oneStar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/sys/oneStar.png -------------------------------------------------------------------------------- /asset/sys/reStart0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/sys/reStart0.png -------------------------------------------------------------------------------- /asset/sys/reStart1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/sys/reStart1.png -------------------------------------------------------------------------------- /asset/sys/reStart2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/sys/reStart2.png -------------------------------------------------------------------------------- /asset/sys/reStart3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/sys/reStart3.png -------------------------------------------------------------------------------- /asset/sys/reStart4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/sys/reStart4.png -------------------------------------------------------------------------------- /asset/sys/reStart5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/sys/reStart5.png -------------------------------------------------------------------------------- /asset/sys/reStart6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/sys/reStart6.png -------------------------------------------------------------------------------- /asset/sys/twoStar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/sys/twoStar.png -------------------------------------------------------------------------------- /asset/sys/wuqi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/asset/sys/wuqi.png -------------------------------------------------------------------------------- /install.txt: -------------------------------------------------------------------------------- 1 | pyqt 2 | pyautogui 3 | system_hotkey 4 | pypiwin32 5 | qdarkstyle 6 | requests 7 | pyinstaller -------------------------------------------------------------------------------- /noBB.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | import sys 4 | from PyQt5.QtWidgets import QApplication, QMainWindow 5 | from PyQt5 import QtGui # , QtCore, QtWidgets 6 | # import noBBui5 as noBBui 7 | import noBBui 8 | import source 9 | import os 10 | import random 11 | import base64 12 | 13 | 14 | BASE_PATH = source.BASE_PATH 15 | ASSET_PATH = source.ASSET_PATH 16 | ASSET_DIR = source.ASSET_DIR 17 | ASSET_FILE_LIST = source.ASSET_FILE_LIST 18 | 19 | VERSION_FILE = source.VERSION_FILE 20 | VERSION = source.VERSION 21 | 22 | CONFIG_FILE = source.CONFIG_FILE 23 | CONFIG = source.CONFIG 24 | 25 | 26 | def generate_random_str(randomlength=16): 27 | """ 28 | 生成一个指定长度的随机字符串 29 | """ 30 | random_str = '' 31 | base_str = 'ABCDEFGHIGKLMNOPQRSTUVWXYZabcdefghigklmnopqrstuvwxyz0123456789' 32 | length = len(base_str) - 1 33 | for i in range(randomlength): 34 | random_str += base_str[random.randint(0, length)] 35 | return random_str 36 | 37 | 38 | def del_asset_files(): 39 | file_list = [] 40 | for root, dirs, files in os.walk(ASSET_PATH): 41 | for f in files: 42 | file_list.append(os.path.join(root, f)) 43 | for i in file_list: 44 | os.remove(i) 45 | 46 | 47 | def load_asset_files(): 48 | 49 | for folder in ASSET_DIR: 50 | if not os.path.exists(folder): 51 | os.makedirs(folder) 52 | 53 | for file in ASSET_FILE_LIST: 54 | save_path = file[0] 55 | img_str = file[1] 56 | if not os.path.exists(save_path): 57 | # print(save_path, img_str) 58 | img_data = base64.b64decode(img_str) 59 | with open(save_path, 'wb') as f: 60 | f.write(img_data) 61 | 62 | 63 | def get_temp_code_link(): 64 | # 读最后一行的code 65 | with open(CONFIG_FILE, 'r') as f: 66 | lines = f.readlines() 67 | 68 | return lines[-1][19:] 69 | 70 | 71 | def load_files(): 72 | if not os.path.exists(BASE_PATH): 73 | os.makedirs(BASE_PATH) 74 | # 本机第一次启动脚本 75 | if not os.path.exists(VERSION_FILE): 76 | with open(VERSION_FILE, 'w', encoding='utf8') as f: 77 | f.write(VERSION) 78 | with open(CONFIG_FILE, 'w', encoding='utf8') as f: 79 | f.write(CONFIG) 80 | f.write("TEMPLINKCODE_VALUE=" + generate_random_str(16)) 81 | load_asset_files() 82 | else: 83 | with open(VERSION_FILE, 'r') as f: 84 | current_version = f.read() 85 | if current_version == VERSION: 86 | return 87 | 88 | # version改了 89 | with open(VERSION_FILE, 'w', encoding='utf8') as f: 90 | f.write(VERSION) 91 | current_config_temp_link_code = get_temp_code_link() 92 | with open(CONFIG_FILE, 'w', encoding='utf8') as f: 93 | f.write(CONFIG) 94 | f.write("TEMPLINKCODE_VALUE=" + current_config_temp_link_code) 95 | del_asset_files() 96 | load_asset_files() 97 | 98 | 99 | if __name__ == '__main__': 100 | load_files() 101 | 102 | app = QApplication(sys.argv) # 所有的PyQt5应用必须创建一个应用(Application)对象。 103 | app.setWindowIcon(QtGui.QIcon('./bitbug_favicon.ico')) 104 | # sys.argv参数是一个来自命令行的参数列表。 105 | myMainWindow = QMainWindow() # Qwidget组件是PyQt5中所有用户界面类的基础类。我们给QWidget提供了默认的构造方法。 不过这里用的是mainwindow 106 | # 默认构造方法没有父类。没有父类的widget组件将被作为窗口使用。 107 | 108 | myUi = noBBui.Ui_MainWindow() 109 | myUi.setupUi(myMainWindow) 110 | 111 | myMainWindow.show() # show()方法在屏幕上显示出widget。一个widget对象在这里第一次被在内存中创建,并且之后在屏幕上显示。 112 | sys.exit(app.exec_()) 113 | # 应用进入主循环。在这个地方,事件处理开始执行。主循环用于接收来自窗口触发的事件, 114 | # 并且转发他们到widget应用上处理。如果我们调用exit()方法或主widget组件被销毁,主循环将退出。 115 | # sys.exit()方法确保一个不留垃圾的退出。系统环境将会被通知应用是怎样被结束的。 116 | -------------------------------------------------------------------------------- /noBB.spec: -------------------------------------------------------------------------------- 1 | # -*- mode: python ; coding: utf-8 -*- 2 | 3 | block_cipher = None 4 | 5 | 6 | a = Analysis(['noBB.py'], 7 | pathex=['C:\\Projects\\PythonProjects\\noBB'], 8 | binaries=[], 9 | datas=[], 10 | hiddenimports=[], 11 | hookspath=[], 12 | runtime_hooks=[], 13 | excludes=[], 14 | win_no_prefer_redirects=False, 15 | win_private_assemblies=False, 16 | cipher=block_cipher, 17 | noarchive=False) 18 | pyz = PYZ(a.pure, a.zipped_data, 19 | cipher=block_cipher) 20 | exe = EXE(pyz, 21 | a.scripts, 22 | a.binaries, 23 | a.zipfiles, 24 | a.datas, 25 | [], 26 | name='noBB', 27 | debug=False, 28 | bootloader_ignore_signals=False, 29 | strip=False, 30 | upx=True, 31 | upx_exclude=[], 32 | runtime_tmpdir=None, 33 | console=False , icon='source\\tuBiao.ico') 34 | -------------------------------------------------------------------------------- /noBBui.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | from PyQt5 import QtGui, QtWidgets, QtCore 4 | from PyQt5.QtCore import QThread, pyqtSignal, QObject 5 | import time 6 | import pyautogui as auto 7 | import random 8 | import requests 9 | from system_hotkey import SystemHotkey 10 | import os 11 | import ctypes 12 | # import qdarkstyle 13 | import style 14 | import source 15 | # import base64 16 | import loginAPI 17 | 18 | 19 | os.environ["QT_API"] = "pyqt5" 20 | 21 | noBB_version = "不多BB" + source.VERSION 22 | 23 | 24 | class TS(QThread): 25 | strsin = pyqtSignal(str) 26 | isEnable = pyqtSignal() 27 | 28 | def __init__(self, group, ffturn, hero1, hero2, hero3, hero4, hero5, hero6, hero7, hero8, temp_link_code, rest): 29 | super(TS, self).__init__() 30 | self.DEBUG = source.DEBUG 31 | self.vip_time = source.vip_time 32 | self.debug_time = 0 33 | self.BASE_PATH = source.BASE_PATH 34 | self.ASSET_PATH = source.ASSET_PATH 35 | self.restart_list = source.restart_list 36 | self.hero_map = source.hero_map 37 | 38 | self.pic_inGame = source.pic_inGame 39 | self.all_pic_dead = source.all_pic_dead 40 | self.pic_one_star = source.pic_one_star 41 | self.pic_two_star = source.pic_two_star 42 | 43 | self.pic_wuqi = source.pic_wuqi 44 | self.btn_wuqi = source.btn_wuqi 45 | 46 | self.btn_start = source.btn_start 47 | self.btn_accept = source.btn_accept 48 | self.btn_ok = source.btn_ok 49 | self.btn_x = source.btn_x 50 | self.btn_ff_1 = source.btn_ff_1 51 | self.btn_ff_2 = source.btn_ff_2 52 | self.btn_ff_3 = source.btn_ff_3 53 | 54 | self.weapons = source.weapons 55 | self.chesses = source.chesses 56 | 57 | self.flag = 1 # 判断脚本是否允许 58 | self.first = 1 59 | self.TIMES = 0 # 判断当前是第几回合 60 | self.restart_times = 0 61 | self.INGAME = 0 # 判断当前是否在游戏中 62 | self.all_time = 0 # 上次心跳的时间 63 | self.f_time = 0 # 上次F的时间 64 | self.d_time = 0 # 上次D的时间 65 | self.z_time = 0 # 上次上装备的时间 66 | self.g_time = 0 # 判断当前游戏进行了多场时间了 67 | self.buy_time = 0 # 上次买牌的时间 68 | self.buy_flag_yes = 0 69 | self.buy_flag_no = 0 70 | self.walk_time = 0 # 上次买牌的时间 71 | self.switch_time = 0 72 | self.wuqi_time = 0 73 | self._2_1 = 0 # 判断当前是否是2-1回合 74 | self.chess_idx = 0 75 | 76 | self.rest = rest 77 | 78 | self.group = group # 判断是否固定阵容 79 | self.group_mode = 1 80 | if self.group == source.group_combox_list[0]: 81 | self.group_mode = 1 82 | if self.group == source.group_combox_list[1]: 83 | self.group_mode = 2 84 | if self.group == source.group_combox_list[2]: 85 | self.group_mode = 3 86 | if self.group == source.group_combox_list[3]: 87 | self.group_mode = 4 88 | if self.group == source.group_combox_list[4]: 89 | self.group_mode = 5 90 | if self.group == source.group_combox_list[5]: 91 | self.group = -2 92 | 93 | self.buy_bero_list_1 = [] 94 | for i in range(8): 95 | file_path = self.ASSET_PATH + "group0/item" + str(i) + ".png" 96 | self.buy_bero_list_1.append(file_path) 97 | self.buy_bero_list_2 = [] 98 | for i in range(8): 99 | file_path = self.ASSET_PATH + "group1/item" + str(i) + ".png" 100 | self.buy_bero_list_2.append(file_path) 101 | self.buy_bero_list_3 = [] 102 | for i in range(8): 103 | file_path = self.ASSET_PATH + "group2/item" + str(i) + ".png" 104 | self.buy_bero_list_3.append(file_path) 105 | self.buy_bero_list_4 = [] 106 | for i in range(8): 107 | file_path = self.ASSET_PATH + "group3/item" + str(i) + ".png" 108 | self.buy_bero_list_4.append(file_path) 109 | self.buy_bero_list_5 = [] 110 | self.buy_bero_list_5.append(self.ASSET_PATH + self.hero_map[hero1]) 111 | self.buy_bero_list_5.append(self.ASSET_PATH + self.hero_map[hero2]) 112 | self.buy_bero_list_5.append(self.ASSET_PATH + self.hero_map[hero3]) 113 | self.buy_bero_list_5.append(self.ASSET_PATH + self.hero_map[hero4]) 114 | self.buy_bero_list_5.append(self.ASSET_PATH + self.hero_map[hero5]) 115 | self.buy_bero_list_5.append(self.ASSET_PATH + self.hero_map[hero6]) 116 | self.buy_bero_list_5.append(self.ASSET_PATH + self.hero_map[hero7]) 117 | self.buy_bero_list_5.append(self.ASSET_PATH + self.hero_map[hero8]) 118 | 119 | self.buy_hero_list = { 120 | 1: self.buy_bero_list_1, 121 | 2: self.buy_bero_list_2, 122 | 3: self.buy_bero_list_3, 123 | 4: self.buy_bero_list_4, 124 | 5: self.buy_bero_list_5, 125 | } 126 | 127 | self.ffturn = ffturn # 判断投降回合 128 | self.FF_mode = 0 # 0 永不投降 1 前n投降 2 时间投降 129 | self.FF_1 = 0 130 | self.FF_2 = 0 131 | if self.ffturn == "永不投降": 132 | self.FF_mode = 0 133 | if self.ffturn == "前二投降": 134 | self.FF_mode = 1 135 | self.FF_1 = 2 136 | if self.ffturn == "前四投降": 137 | self.FF_mode = 1 138 | self.FF_1 = 4 139 | if self.ffturn == "前六投降": 140 | self.FF_mode = 1 141 | self.FF_1 = 6 142 | if self.ffturn == "10分钟投降": 143 | self.FF_mode = 2 144 | self.FF_2 = 10 145 | if self.ffturn == "11分钟投降": 146 | self.FF_mode = 2 147 | self.FF_2 = 11 148 | if self.ffturn == "12分钟投降": 149 | self.FF_mode = 2 150 | self.FF_2 = 12 151 | if self.ffturn == "13分钟投降": 152 | self.FF_mode = 2 153 | self.FF_2 = 13 154 | if self.ffturn == "14分钟投降": 155 | self.FF_mode = 2 156 | self.FF_2 = 14 157 | if self.ffturn == "15分钟投降": 158 | self.FF_mode = 2 159 | self.FF_2 = 15 160 | 161 | def go_text(self, x): 162 | """ 163 | 将文本输出到对话框中 164 | :param x: 165 | :return: 166 | """ 167 | if x is not None: 168 | self.strsin.emit('{} {}'.format(str(time.strftime("[%H:%M:%S]", time.localtime())), x)) 169 | time.sleep(0.1) 170 | QtWidgets.QApplication.processEvents() 171 | 172 | def click_2(self, x, y, button, shake=True): 173 | """ 174 | 模拟鼠标操作 双击 175 | :param shake: 判断鼠标位置是否抖动 176 | :param x: 鼠标X坐标 177 | :param y: 鼠标Y坐标 178 | :param button: 鼠标点击键 ’left‘ or ’right‘ 179 | :return: 180 | """ 181 | if shake is True: 182 | x = x + random.randint(-10, 10) 183 | y = y + random.randint(-10, 10) 184 | 185 | auto.mouseDown(x=x, y=y, button=button) 186 | auto.mouseUp(x=x, y=y, button=button, duration=1) 187 | self.sleep(1) 188 | auto.mouseDown(x=x, y=y, button=button) 189 | auto.mouseUp(x=x, y=y, button=button, duration=1) 190 | self.sleep(1) 191 | 192 | 193 | def click_1(self, x, y, button): 194 | """ 195 | 模拟鼠标操作 单机 196 | :param x: 鼠标X坐标 197 | :param y: 鼠标Y坐标 198 | :param button: 鼠标点击键 ’left‘ or ’right‘ 199 | :return: 200 | """ 201 | x = x + random.randint(-10, 10) 202 | y = y + random.randint(-10, 10) 203 | 204 | auto.mouseDown(x=x, y=y, button=button) 205 | # time.sleep(1) 206 | auto.mouseUp(x=x, y=y, button=button, duration=1) 207 | # time.sleep(1) 208 | 209 | @staticmethod 210 | def check_pic(needleImage, region=None): 211 | """ 212 | 在当前屏幕region区域是否存在needleImage 213 | :param needleImage: 要求识别的图片 214 | :param region: (x1, y1, x2, y2)左上角的坐标和右下角的坐标 215 | :return: 点击的中心坐标 216 | """ 217 | 218 | if region is None: 219 | region = (0, 0, 1920, 1080) 220 | haystackImage = auto.screenshot( 221 | region=(region[0], region[1], region[2] - region[0], region[3] - region[1])) 222 | # haystackImage.save(self.BASE_PATH+"sys/test"+needleImage[7]+".png") 223 | pic = auto.locate(needleImage, haystackImage, confidence=0.8) 224 | if pic is not None: 225 | pic = auto.center(pic) 226 | return [pic[0] + region[0], pic[1] + region[1]] 227 | 228 | return None 229 | 230 | @staticmethod 231 | def check_all_pic(needleImage, region=None, space=(0, 0)): 232 | """ 233 | 在当前屏幕region区域是否存在needleImage 234 | :param needleImage: 要求识别的图片 235 | :param region: (x1, y1, x2, y2)左上角的坐标和右下角的坐标 236 | :return: list 包含所有的pic的位置 237 | """ 238 | 239 | if region is None: 240 | region = (0, 0, 1920, 1080) 241 | pics = list(auto.locateAllOnScreen(needleImage, 242 | region=(region[0], region[1], region[2] - region[0], region[3] - region[1]), 243 | confidence=0.8)) 244 | pic_list = [] 245 | for pic in pics: 246 | pic = auto.center(pic) 247 | if not pic_list: 248 | pic_list.append((pic[0], pic[1])) 249 | elif pic[0] - pic_list[-1][0] >= space[0] and pic[1] - pic_list[-1][1] >= space[1]: 250 | pic_list.append((pic[0], pic[1])) 251 | 252 | # if pic_list and pic[0] - pic_list[-1][0] >= space[0] and pic[1] - pic_list[-1][1] >= space[1]: 253 | # pic_list.append((pic[0], pic[1])) 254 | # else: 255 | # pic_list.append((pic[0], pic[1])) 256 | return pic_list 257 | 258 | def Exit(self): 259 | if self.flag == 0: 260 | return 261 | 262 | def sleep(self, x): 263 | for i in range(x): 264 | time.sleep(1) 265 | if self.flag == 0: 266 | return 267 | 268 | # 开局三连 269 | def room(self): 270 | if self.check_pic(self.pic_inGame[0], region=self.pic_inGame[1]) is None: 271 | if self.INGAME == 1: 272 | # 从一局游戏中退出来 273 | self.INGAME = 0 274 | # 如果需要休息 275 | if self.rest: 276 | sleep_time_min = random.randint(4, 7) 277 | sleep_time_sec = random.randint(0, 59) 278 | self.go_text("> {}分{}秒后准备开始一局新的游戏".format(str(sleep_time_min), str(sleep_time_sec))) 279 | self.sleep(sleep_time_min*60+sleep_time_sec) 280 | if self.flag == 0: 281 | return 282 | 283 | self.click_2(self.btn_start[0], self.btn_start[1], "left") 284 | self.click_2(self.btn_accept[0], self.btn_accept[1], "left") 285 | self.click_2(self.btn_ok[0], self.btn_ok[1], "left") 286 | self.sleep(5) 287 | return 288 | 289 | return 290 | 291 | # 点击投降 292 | def ff_stage(self): 293 | """ 294 | noFF = 1, 前四投降 295 | noFF = 0, 根据ffturn进行投降 296 | :return: 297 | """ 298 | try: 299 | if self.INGAME == 0: 300 | return 301 | 302 | ff_times = 0 303 | if self.FF_mode == 1: 304 | pic = self.check_all_pic(self.all_pic_dead[0], region=self.all_pic_dead[1], space=self.all_pic_dead[2]) 305 | if len(pic) > 8 - self.FF_1 - 1: 306 | while self.check_pic(self.pic_inGame[0], region=self.pic_inGame[1]) is not None and ff_times < 5: 307 | ff_times += 1 308 | self.click_2(self.btn_ff_1[0], self.btn_ff_1[1], "left", shake=False) 309 | self.click_2(self.btn_ff_2[0], self.btn_ff_2[1], "left") 310 | self.click_2(self.btn_ff_3[0], self.btn_ff_3[1], "left") 311 | self.go_text("> 准备认输") 312 | self.sleep(10) 313 | if self.flag == 0: 314 | return 315 | 316 | if self.FF_mode == 2 and time.time() - self.g_time > self.FF_2 * 60: 317 | while self.check_pic(self.pic_inGame[0], region=self.pic_inGame[1]) is not None and ff_times < 5: 318 | ff_times += 1 319 | self.click_2(self.btn_ff_1[0], self.btn_ff_1[1], "left", shake=False) 320 | self.click_2(self.btn_ff_2[0], self.btn_ff_2[1], "left") 321 | self.click_2(self.btn_ff_3[0], self.btn_ff_3[1], "left") 322 | self.go_text("> 准备认输") 323 | self.sleep(10) 324 | if self.flag == 0: 325 | return 326 | 327 | if ff_times == 5: 328 | self.restart(fource=True) 329 | except: 330 | print('{} {}'.format(str(time.strftime("[%H:%M:%S]", time.localtime())), 'ff stage')) 331 | 332 | @staticmethod 333 | def sale(x, y): 334 | auto.moveTo(x, y, duration=0.25) 335 | auto.dragTo(970, 910, duration=0.5) 336 | auto.moveTo(random.randint(700, 1300), random.randint(200, 700), duration=0.25) 337 | 338 | def sale_1_2(self): 339 | region = (590, 190, 1324, 337) 340 | x = random.randint(region[0], region[2]) 341 | y = random.randint(region[1], region[3]) 342 | self.click_2(x, y, "right") 343 | self.sale(460, 740) 344 | self.sale(560, 740) 345 | 346 | def maintain(self, step=1): 347 | x = [460, 560, 670, 790, 900, 1000, 1110, 1220, 1330] 348 | y = 740 349 | 350 | if step > 2: 351 | step = 2 352 | 353 | for i in range(2, len(x), step): 354 | x0 = x[0] + random.randint(-10, 10) 355 | xi = x[i] + random.randint(-10, 10) 356 | yy = y + random.randint(-10, 10) 357 | auto.moveTo(x0, yy, duration=0.25) 358 | auto.dragTo(xi, yy, duration=(0.4+i*0.1)) 359 | 360 | if self.flag == 0: 361 | return 362 | 363 | if step > 1: 364 | for i in range(3, len(x), step): 365 | x0 = x[1] + random.randint(-10, 10) 366 | xi = x[i] + random.randint(-10, 10) 367 | yy = y + random.randint(-10, 10) 368 | auto.moveTo(x0, yy, duration=0.25) 369 | auto.dragTo(xi, yy, duration=(0.4+i*0.1*step)) 370 | 371 | if self.flag == 0: 372 | return 373 | 374 | self.sale_1_2() 375 | 376 | def game_walk(self, region=None): 377 | if region is None: 378 | region = (0, 0, 1920, 1080) 379 | 380 | x = random.randint(region[0], region[2]) 381 | y = random.randint(region[1], region[3]) 382 | self.click_2(x, y, "right") 383 | self.click_2(x, y, "left") 384 | self.sleep(2) 385 | self.sale_1_2() 386 | 387 | def game_buy_hero(self): 388 | try: 389 | num = 0 390 | pics_list = [] 391 | 392 | for hero in self.buy_hero_list[self.group_mode]: 393 | pics = self.check_all_pic(hero, region=(450, 800, 1500, 1080), space=(100, 0)) 394 | pics_list.extend(pics) 395 | 396 | if self.flag == 0: 397 | return 398 | 399 | self.sale_1_2() 400 | for pic in pics_list[:5]: 401 | x = pic[0] 402 | y = pic[1] 403 | self.click_2(x, y, "left") 404 | num += 1 405 | 406 | if self.flag == 0: 407 | return 408 | current_time = time.time() 409 | if num > 0: 410 | self.maintain(num) 411 | self.buy_flag_yes = current_time 412 | elif num == 0: 413 | self.buy_flag_no = current_time 414 | 415 | return num 416 | except: 417 | print('{} {}'.format(str(time.strftime("[%H:%M:%S]", time.localtime())), 'buy hero')) 418 | 419 | def in_game_init(self): 420 | if self.INGAME == 0: 421 | self.g_time = time.time() 422 | self.d_time = self.g_time 423 | self.f_time = self.g_time 424 | self.z_time = self.g_time 425 | self.buy_time = self.g_time 426 | self.buy_flag_no = self.g_time 427 | self.buy_flag_yes = self.g_time 428 | self.walk_time = self.g_time 429 | self.switch_time = self.g_time 430 | self.wuqi_time = self.g_time 431 | if self.group == -2: 432 | self.group_mode = random.randint(1, 4) 433 | self._2_1 = 0 434 | self.chess_idx = 0 435 | self.INGAME = 1 436 | self.TIMES = self.TIMES + 1 437 | self.go_text('> 第{}局开始'.format(str(self.TIMES))) 438 | 439 | def in_game_walk(self): 440 | current_time = time.time() 441 | if current_time - self.walk_time > 10: 442 | self.game_walk(region=(700, 200, 1300, 700)) 443 | self.click_2(830, 560, "left", shake=False) # 退出游戏按钮 444 | self.walk_time = current_time 445 | 446 | def in_game_2_1(self): 447 | current_time = time.time() 448 | if self._2_1 == 0 and current_time - self.g_time > 150: 449 | if self.DEBUG: 450 | tempImage = auto.screenshot() 451 | tempImage.save('{}{}{}.png'.format(self.BASE_PATH + 'test/', '2-1', 452 | str(time.strftime("[%Y-%m-%d %H-%M-%S]", time.localtime())))) 453 | self._2_1 = 1 454 | self.sale(960, 620) 455 | # self.game_walk(region=(700, 200, 1300, 700)) 456 | 457 | def in_game_buy(self): 458 | current_time = time.time() 459 | num = 0 460 | if current_time - self.buy_time > 20: 461 | num = self.game_buy_hero() 462 | self.buy_time = current_time 463 | return num 464 | 465 | def in_game_D(self): 466 | current_time = time.time() 467 | temp = 70 468 | run_time = current_time - self.g_time 469 | if run_time > 8 * 60: 470 | temp = 60 471 | if run_time > 13 * 60: 472 | temp = 50 473 | if run_time > 18 * 60: 474 | temp = 30 475 | 476 | if current_time - self.d_time > temp and current_time - self.g_time > 3 * 60: 477 | if self.DEBUG: 478 | self.go_text('> D, {}, {}, {}'.format(temp, current_time - self.d_time, current_time - self.g_time)) 479 | self.click_1(400, 1000, "left") 480 | self.d_time = current_time 481 | 482 | num = self.game_buy_hero() 483 | self.buy_time = current_time 484 | 485 | def in_game_F(self): 486 | current_time = time.time() 487 | temp = 70 488 | run_time = current_time - self.g_time 489 | if run_time > 5 * 60: 490 | temp = 60 491 | if run_time > 10 * 60: 492 | temp = 50 493 | if run_time > 25 * 60: 494 | temp = 100000000 495 | 496 | if current_time - self.f_time > temp and current_time - self.g_time > 3 * 60: 497 | if self.DEBUG: 498 | self.go_text('> F, {}, {}, {}'.format(temp, current_time - self.f_time, current_time - self.g_time)) 499 | self.click_1(400, 930, "left") 500 | self.f_time = current_time 501 | 502 | # 放装备 503 | def in_game_Z(self): 504 | current_time = time.time() 505 | if current_time - self.z_time < 90 or current_time - self.g_time < 4 * 60: 506 | return 507 | 508 | chesss = self.chesses[self.chess_idx] 509 | self.chess_idx = (self.chess_idx + 1) % 6 510 | 511 | for weapon in self.weapons[:5]: 512 | auto.moveTo(weapon[0], weapon[1], duration=0.25) 513 | auto.dragTo(chesss[0], chesss[1], duration=0.5) 514 | if self.flag == 0: 515 | return 516 | # self.game_walk(region=(700, 200, 1300, 700)) 517 | 518 | self.z_time = current_time 519 | 520 | if self.DEBUG: 521 | self.go_text('> 放装备{}'.format(self.chess_idx)) 522 | 523 | # 场下2星换场上1星 524 | def in_game_switch(self): 525 | current_time = time.time() 526 | if current_time - self.g_time < 5 * 60 or current_time - self.switch_time < 60: 527 | return 528 | 529 | down_x = [460, 560, 670, 790, 900, 1000, 1110, 1220, 1330] 530 | down_y = 740 531 | 532 | pic_two = self.check_pic(self.pic_two_star[0], region=self.pic_two_star[1]) 533 | pic_one = self.check_pic(self.pic_one_star[0], region=self.pic_one_star[1]) 534 | if pic_two is None or pic_one is None: 535 | return 536 | 537 | two_star_x, two_star_y = pic_two 538 | one_star_x, one_star_y = pic_one 539 | 540 | for i in down_x: 541 | if two_star_x < i: 542 | two_star_x = i 543 | two_star_y = down_y 544 | break 545 | 546 | one_star_x += 30 547 | one_star_y += 50 548 | 549 | auto.moveTo(two_star_x, two_star_y, duration=0.25) 550 | auto.dragTo(one_star_x, one_star_y, duration=0.5) 551 | 552 | self.switch_time = current_time 553 | 554 | if self.DEBUG: 555 | self.go_text('> switch') 556 | # print('一星位置 x={}, y={}'.format(one_star_x, one_star_y)) 557 | # print('二星位置 x={}, y={}'.format(two_star_x, two_star_y)) 558 | 559 | # s5 光明武器库 启用 560 | def in_game_wuqi(self): 561 | current_time = time.time() 562 | if current_time - self.wuqi_time < 60: 563 | return 564 | 565 | if self.check_pic(self.pic_wuqi[0], region=self.pic_wuqi[1]) is not None: 566 | self.click_2(self.btn_wuqi[0], self.btn_wuqi[1], "left") 567 | self.sale_1_2() 568 | 569 | self.wuqi_time = current_time 570 | 571 | def in_game_stage(self): 572 | """ 573 | 模拟抓牌买牌等操作 574 | :return: 575 | """ 576 | if self.check_pic(self.pic_inGame[0], region=self.pic_inGame[1]) is None: 577 | return None 578 | 579 | self.in_game_init() 580 | self.in_game_walk() 581 | self.in_game_2_1() 582 | num = self.in_game_buy() 583 | self.in_game_F() 584 | self.in_game_Z() 585 | self.in_game_switch() 586 | self.in_game_D() 587 | # self.in_game_wuqi() 588 | 589 | def restart(self, fource=False): 590 | try: 591 | flag_x = False 592 | current_time = time.time() 593 | if fource: 594 | flag_x = True 595 | elif current_time - min(self.buy_flag_yes, self.buy_flag_no) > 10 * 60 and self.INGAME == 1: 596 | self.go_text('> 准备重启{}'.format(int(current_time - min(self.buy_flag_yes, self.buy_flag_no)))) 597 | self.restart_times += 1 598 | flag_x = True 599 | 600 | if flag_x: 601 | self.click_2(self.btn_x[0], self.btn_x[1], 'left', shake=False) 602 | self.sleep(10) 603 | while self.check_pic(self.pic_inGame[0], region=self.pic_inGame[1]) is not None: 604 | self.click_2(self.btn_x[0], self.btn_x[1], 'left', shake=False) 605 | self.sleep(10) 606 | 607 | if self.check_pic(self.pic_inGame[0], region=self.pic_inGame[1]) is None: 608 | FLAG = True 609 | while FLAG: 610 | FLAG = False 611 | for i in self.restart_list: 612 | pic_path = i[0] 613 | click_pos = i[1] 614 | region = i[2] 615 | # print("> restart: ", pic_path) 616 | if self.check_pic(pic_path, region) is not None: 617 | if pic_path == "C:/Program Files/noBB/asset/sys/reStart4.png": 618 | click_pos = self.check_pic(pic_path, region) 619 | self.click_2(click_pos[0], click_pos[1], 'left', shake=False) 620 | FLAG = True 621 | self.sleep(10) 622 | 623 | if self.flag == 0: 624 | return 625 | except: 626 | print('{} {}'.format(str(time.strftime("[%H:%M:%S]", time.localtime())), 'restart')) 627 | 628 | # def heart_beat(self): 629 | # try: 630 | # current_time = time.time() 631 | # run_time = current_time - self.all_time 632 | # if run_time > 3 * 60 * 60: 633 | # res = self.login_check.heart_beat() 634 | # if res == -1: 635 | # self.go_text("$ 请检查网络连接") 636 | # self.stop() 637 | # return 638 | # 639 | # self.all_time = current_time 640 | # except: 641 | # print('{} {}'.format(str(time.strftime("[%H:%M:%S]", time.localtime())), 'heart beat')) 642 | 643 | def debug_func(self): 644 | if not self.DEBUG: 645 | return 646 | current_time = time.time() 647 | if current_time - self.debug_time > 30: 648 | tempImage = auto.screenshot() 649 | tempImage.save('{}{}{}.png'.format(self.BASE_PATH + 'test/', 'debug_func', 650 | str(time.strftime("[%Y-%m-%d %H-%M-%S]", time.localtime())))) 651 | self.debug_time = current_time 652 | 653 | def game(self): 654 | try: 655 | 656 | if self.check_pic(self.pic_inGame[0], region=self.pic_inGame[1]) is None: 657 | self.go_text("> 准备开始一局新的游戏") 658 | self.g_time = time.time() 659 | self.all_time = time.time() 660 | self.debug_time = time.time() 661 | 662 | while True: 663 | 664 | if self.flag == 1: 665 | self.restart() 666 | if self.flag == 0: 667 | return 668 | 669 | if self.flag == 1: 670 | self.room() 671 | if self.flag == 0: 672 | return 673 | 674 | if self.flag == 1: 675 | self.in_game_stage() 676 | if self.flag == 0: 677 | return 678 | 679 | if self.flag == 1: 680 | self.ff_stage() 681 | if self.flag == 0: 682 | return 683 | 684 | if self.flag == 1: 685 | self.debug_func() 686 | if self.flag == 0: 687 | return 688 | 689 | except Exception as e: 690 | print(e) 691 | 692 | def get_beijin_time(self): 693 | """ 694 | 联网获取北京时间 695 | :return: 北京时间时间戳 696 | """ 697 | try: 698 | # 设置头信息,没有访问会错误400!!! 699 | hea = {"User-Agent": "Mozilla/5.0"} 700 | # 设置访问地址,我们分析到的; 701 | url = r"http://time1909.beijing-time.org/time.asp" 702 | # 用requests get这个地址,带头信息的; 703 | r = requests.get(url=url, headers=hea) 704 | # 检查返回的通讯代码,200是正确返回; 705 | if r.status_code == 200: 706 | # 定义result变量存放返回的信息源码; 707 | result = r.text 708 | # self.go_text("> 当前时间为" + str(result)) 709 | # 通过;分割文本; 710 | data = result.split(";") 711 | # self.go_text("> 当前时间为" + str(data)) 712 | # ====================================================== 713 | # 以下是数据文本处理:切割、取长度,最最基础的东西就不描述了; 714 | year = data[1][len("nyear") + 3: len(data[1])] 715 | month = data[2][len("nmonth") + 3: len(data[2])] 716 | day = data[3][len("nday") + 3: len(data[3])] 717 | # wday = data[4][len("nwday")+1 : len(data[4])-1] 718 | hrs = data[5][len("nhrs") + 3: len(data[5])] 719 | minute = data[6][len("nmin") + 3: len(data[6])] 720 | sec = data[7][len("nsec") + 3: len(data[7])] 721 | # ====================================================== 722 | # 这个也简单把切割好的变量拼到beijinTimeStr变量里; 723 | beijin_time_str = "%s/%s/%s %s:%s:%s" % (year, month, day, hrs, minute, sec) 724 | # 把时间打印出来看看; 725 | # print(beijin_time_str) 726 | # self.go_text("> 当前时间为" + str(beijin_time_str)) 727 | # 将beijinTimeStr转为时间戳格式; 728 | beijin_time = time.mktime(time.strptime(beijin_time_str, "%Y/%m/%d %X")) 729 | # 返回时间戳; 730 | return beijin_time 731 | except: 732 | return -1 733 | 734 | def check_vip(self, TIME): 735 | """ 736 | 检查脚本是否过期 737 | :param TIME: string类型 格式 'YYYY-MM-DD hh:mm:ss' 738 | :return: -1表示过期, 1表示没过期 739 | """ 740 | beijinTime = self.get_beijin_time() 741 | if beijinTime == -1: 742 | self.go_text("$ 请连接网络") 743 | return -1 744 | vip = TIME 745 | timeArray = time.strptime(vip, "%Y-%m-%d %H:%M:%S") 746 | 747 | timeStamp = int(time.mktime(timeArray)) 748 | if (beijinTime > timeStamp): 749 | self.go_text("$ 该脚本已过期,请加QQ群905167917获取最新脚本") 750 | self.go_text("$ 或者从百度网盘链接:https://pan.baidu.com/s/1JeIKOCtov_RShm8eZpBirA 提取码:78oc 下载最新版本") 751 | return -1 752 | self.go_text("> 该版本可使用至{},马上开始脚本".format(TIME)) 753 | return 1 754 | 755 | def check_device_caps(self): 756 | # 检查电脑分辨率是否正确 757 | user32 = ctypes.windll.user32 758 | gdi32 = ctypes.windll.gdi32 759 | dc = user32.GetDC(0) 760 | width = gdi32.GetDeviceCaps(dc, 118) # 原始分辨率的宽度 761 | height = gdi32.GetDeviceCaps(dc, 117) # 原始分辨率的高度 762 | hdpi = gdi32.GetDeviceCaps(dc, 88) 763 | 764 | if width != 1920 or height != 1080 or hdpi != 96: 765 | return False 766 | 767 | return True 768 | 769 | def run(self): 770 | if not self.check_device_caps(): 771 | self.go_text("$ 请检查电脑分辨率为1920*1080, 缩放为100% !!!") 772 | self.stop() 773 | return 774 | 775 | self.go_text("> 电脑分辨率检查 OK") 776 | 777 | ############################################################################################################### 778 | 779 | vipTime = '2022-10-15 10:00:00' 780 | # 检查脚本是否过期 781 | 782 | isVIP = self.check_vip(vipTime) 783 | if isVIP == -1: 784 | self.stop() 785 | return 786 | 787 | self.go_text("> 脚本开始启动") 788 | self.game() 789 | self.stop() 790 | # self.test() 791 | 792 | def stop(self): 793 | self.flag = 0 794 | self.strsin.emit("$ 脚本停止!!") 795 | self.strsin.emit("$ 可以点击开始挂机重新开始!") 796 | self.strsin.emit("$ ------------------------") 797 | self.strsin.emit("$ 共完成{}局游戏,重启{}次".format(self.TIMES - self.restart_times, self.restart_times)) 798 | self.isEnable.emit() 799 | 800 | 801 | class Ui_MainWindow(QObject): 802 | sin = pyqtSignal() # 结束挂机信号 803 | sig_keyhot = pyqtSignal(str) # 热键信号 804 | 805 | def __init__(self): 806 | super(Ui_MainWindow, self).__init__() 807 | 808 | def setupUi(self, MainWindow): 809 | # 初始化设置 810 | self.config = QtCore.QSettings(source.CONFIG_FILE, QtCore.QSettings.IniFormat) 811 | self.GROUP = self.config.value("SETUP/GROUP_VALUE") 812 | self.FFTURN = self.config.value("SETUP/FFTURN_VALUE") 813 | self.HERO1 = self.config.value("SETUP/HERO1_VALUE") 814 | self.HERO2 = self.config.value("SETUP/HERO2_VALUE") 815 | self.HERO3 = self.config.value("SETUP/HERO3_VALUE") 816 | self.HERO4 = self.config.value("SETUP/HERO4_VALUE") 817 | self.HERO5 = self.config.value("SETUP/HERO5_VALUE") 818 | self.HERO6 = self.config.value("SETUP/HERO6_VALUE") 819 | self.HERO7 = self.config.value("SETUP/HERO7_VALUE") 820 | self.HERO8 = self.config.value("SETUP/HERO8_VALUE") 821 | self.TEMPLINKCODE = self.config.value("SETUP/TEMPLINKCODE_VALUE") 822 | self.REST = self.config.value("SETUP/REST_VALUE") 823 | 824 | MainWindow.setObjectName("MainWindow") 825 | # MainWindow.resize(276, 641) 826 | MainWindow.resize(310, 360) 827 | MainWindow.move(10, 10) 828 | icon = QtGui.QIcon() 829 | icon.addPixmap(QtGui.QPixmap(":/pic/source/tuBiao.ico"), QtGui.QIcon.Normal, QtGui.QIcon.On) 830 | MainWindow.setWindowIcon(icon) 831 | MainWindow.setWindowOpacity(0.85) 832 | 833 | self.centralwidget = QtWidgets.QWidget(MainWindow) 834 | self.centralwidget.setObjectName("centralwidget") 835 | 836 | self.central_VerticalLayout = QtWidgets.QVBoxLayout(self.centralwidget) 837 | self.central_VerticalLayout.setObjectName("central_VerticalLayout") 838 | 839 | self.tabWidget = QtWidgets.QTabWidget(self.centralwidget) 840 | self.tabWidget.setObjectName("tabWidget") 841 | 842 | # -tab 主界面 843 | 844 | self.Main_Tab = QtWidgets.QWidget() 845 | self.Main_Tab.setObjectName("Main_Tab") 846 | 847 | ## -box 848 | 849 | self.Main_Box = QtWidgets.QGroupBox(self.Main_Tab) 850 | self.Main_Box.setObjectName("Main_Box") 851 | 852 | ### -V 853 | 854 | self.Main_VerticalLayout = QtWidgets.QVBoxLayout(self.Main_Box) 855 | self.Main_VerticalLayout.setObjectName("Main_VerticalLayout") 856 | 857 | #### -H 开始按钮 858 | self.horizontalLayout_2 = QtWidgets.QHBoxLayout() 859 | self.horizontalLayout_2.setObjectName("horizontalLayout_2") 860 | self.qt_btn_start = QtWidgets.QPushButton(self.Main_Box) 861 | self.qt_btn_start.setObjectName("qt_btn_start") 862 | self.horizontalLayout_2.addWidget(self.qt_btn_start) 863 | 864 | #### -H 关闭按钮 865 | self.qt_btn_stop = QtWidgets.QPushButton(self.Main_Box) 866 | self.qt_btn_stop.setObjectName("qt_btn_stop") 867 | self.horizontalLayout_2.addWidget(self.qt_btn_stop) 868 | self.Main_VerticalLayout.addLayout(self.horizontalLayout_2) 869 | 870 | ### -V 运行日志输出 871 | 872 | self.qt_text_print = QtWidgets.QTextBrowser(self.Main_Box) 873 | self.qt_text_print.setObjectName("qt_text_print") 874 | self.Main_VerticalLayout.addWidget(self.qt_text_print) 875 | 876 | # self.central_VerticalLayout.addWidget(self.Main_Box) 877 | 878 | self.tabWidget.addTab(self.Main_Tab, "") 879 | 880 | # -tab 设置界面 881 | 882 | self.Setting_Tab = QtWidgets.QWidget() 883 | self.Setting_Tab.setObjectName("setting_Tab") 884 | 885 | # -box V 886 | 887 | self.Setting_Tab_VerticalLayout = QtWidgets.QVBoxLayout(self.Setting_Tab) 888 | self.Setting_Tab_VerticalLayout.setObjectName("Setting_Tab_VerticalLayout") 889 | 890 | ## -box Setting_Box 891 | 892 | self.Setting_Box = QtWidgets.QGroupBox(self.Setting_Tab) 893 | self.Setting_Box.setObjectName("Setting_Box") 894 | 895 | ### -V 896 | 897 | self.Setting_VerticalLayout = QtWidgets.QVBoxLayout(self.Setting_Box) 898 | self.Setting_VerticalLayout.setObjectName("Setting_VerticalLayout") 899 | 900 | #### -H 901 | self.Groupsetting_HorizontalLayout = QtWidgets.QHBoxLayout() 902 | self.Groupsetting_HorizontalLayout.setObjectName("Groupsetting_HorizontalLayout") 903 | 904 | ##### combox 阵容选择 905 | self.Group_combox = QtWidgets.QComboBox(self.Setting_Box) 906 | self.Group_combox.setObjectName("Group_combox") 907 | for i in range(6): 908 | self.Group_combox.addItem("") 909 | self.Group_combox.setCurrentIndex(int(self.GROUP)) 910 | self.Groupsetting_HorizontalLayout.addWidget(self.Group_combox) 911 | 912 | ##### label 913 | self.Group_label = QtWidgets.QLabel(self.Setting_Box) 914 | self.Group_label.setObjectName("Group_label") 915 | self.Groupsetting_HorizontalLayout.addWidget(self.Group_label) 916 | 917 | self.Setting_VerticalLayout.addLayout(self.Groupsetting_HorizontalLayout) 918 | 919 | #### -H 920 | 921 | self.FFsetting_HorizontalLayout = QtWidgets.QHBoxLayout() 922 | self.FFsetting_HorizontalLayout.setObjectName("FFsetting_HorizontalLayout") 923 | 924 | ##### combox 投降模式 925 | self.FFturn_combox = QtWidgets.QComboBox(self.Setting_Box) 926 | self.FFturn_combox.setObjectName("FFturn_combox") 927 | for i in range(10): 928 | self.FFturn_combox.addItem("") 929 | self.FFturn_combox.setCurrentIndex(int(self.FFTURN)) 930 | self.FFsetting_HorizontalLayout.addWidget(self.FFturn_combox) 931 | 932 | ##### label 933 | self.label_2 = QtWidgets.QLabel(self.Setting_Box) 934 | self.label_2.setObjectName("label_2") 935 | self.FFsetting_HorizontalLayout.addWidget(self.label_2) 936 | 937 | self.Setting_VerticalLayout.addLayout(self.FFsetting_HorizontalLayout) 938 | 939 | #### -H 940 | self.rest_HorizontalLayout = QtWidgets.QHBoxLayout() 941 | self.rest_HorizontalLayout.setObjectName("rest_HorizontalLayout") 942 | 943 | ##### checkbox 每局休息4-8分钟 944 | self.rest_check_box = QtWidgets.QCheckBox("每局结束后休息4-8分钟") 945 | self.rest_check_box.setObjectName("rest_check_box") 946 | if self.REST == "false": 947 | self.rest_check_box.setChecked(False) 948 | else: 949 | self.rest_check_box.setChecked(True) 950 | self.rest_HorizontalLayout.addWidget(self.rest_check_box) 951 | self.Setting_VerticalLayout.addLayout(self.rest_HorizontalLayout) 952 | 953 | # ----------------------- 954 | 955 | self.Customize_Box = QtWidgets.QGroupBox(self.Setting_Tab) 956 | self.Customize_Box.setObjectName("Customize_Box") 957 | 958 | self.Customize_Box_VerticalLayout = QtWidgets.QVBoxLayout(self.Customize_Box) 959 | self.Customize_Box_VerticalLayout.setObjectName("Customize_Box_VerticalLayout") 960 | 961 | # ---------------------------------------------------------------------------------- 962 | 963 | self.hero12_HorizontalLayout = QtWidgets.QHBoxLayout() 964 | self.hero12_HorizontalLayout.setObjectName("hero1_HorizontalLayout") 965 | 966 | self.hero1_combox = QtWidgets.QComboBox(self.Customize_Box) 967 | self.hero1_combox.setObjectName("hero1_combox") 968 | for i in source.hero_chi_name: 969 | self.hero1_combox.addItem(i) 970 | self.hero1_combox.setCurrentIndex(int(self.HERO1)) 971 | self.hero1_label = QtWidgets.QLabel(self.Customize_Box) 972 | self.hero1_label.setObjectName("hero1_label") 973 | 974 | self.hero2_combox = QtWidgets.QComboBox(self.Customize_Box) 975 | self.hero2_combox.setObjectName("hero2_combox") 976 | for i in source.hero_chi_name: 977 | self.hero2_combox.addItem(i) 978 | self.hero2_combox.setCurrentIndex(int(self.HERO2)) 979 | self.hero2_label = QtWidgets.QLabel(self.Customize_Box) 980 | self.hero2_label.setObjectName("hero2_label") 981 | 982 | self.hero12_HorizontalLayout.addWidget(self.hero1_combox) 983 | self.hero12_HorizontalLayout.addWidget(self.hero1_label) 984 | self.hero12_HorizontalLayout.addWidget(self.hero2_combox) 985 | self.hero12_HorizontalLayout.addWidget(self.hero2_label) 986 | 987 | self.Customize_Box_VerticalLayout.addLayout(self.hero12_HorizontalLayout) 988 | 989 | # ---------------------------------------------------------------------------------- 990 | 991 | self.hero34_HorizontalLayout = QtWidgets.QHBoxLayout() 992 | self.hero34_HorizontalLayout.setObjectName("hero34_HorizontalLayout") 993 | 994 | self.hero3_combox = QtWidgets.QComboBox(self.Customize_Box) 995 | self.hero3_combox.setObjectName("hero3_combox") 996 | for i in source.hero_chi_name: 997 | self.hero3_combox.addItem(i) 998 | self.hero3_combox.setCurrentIndex(int(self.HERO3)) 999 | self.hero3_label = QtWidgets.QLabel(self.Customize_Box) 1000 | self.hero3_label.setObjectName("hero3_label") 1001 | 1002 | self.hero4_combox = QtWidgets.QComboBox(self.Customize_Box) 1003 | self.hero4_combox.setObjectName("hero4_combox") 1004 | for i in source.hero_chi_name: 1005 | self.hero4_combox.addItem(i) 1006 | self.hero4_combox.setCurrentIndex(int(self.HERO4)) 1007 | self.hero4_label = QtWidgets.QLabel(self.Customize_Box) 1008 | self.hero4_label.setObjectName("hero4_label") 1009 | 1010 | self.hero34_HorizontalLayout.addWidget(self.hero3_combox) 1011 | self.hero34_HorizontalLayout.addWidget(self.hero3_label) 1012 | self.hero34_HorizontalLayout.addWidget(self.hero4_combox) 1013 | self.hero34_HorizontalLayout.addWidget(self.hero4_label) 1014 | 1015 | self.Customize_Box_VerticalLayout.addLayout(self.hero34_HorizontalLayout) 1016 | 1017 | # ---------------------------------------------------------------------------------- 1018 | 1019 | self.hero56_HorizontalLayout = QtWidgets.QHBoxLayout() 1020 | self.hero56_HorizontalLayout.setObjectName("hero56_HorizontalLayout") 1021 | 1022 | self.hero5_combox = QtWidgets.QComboBox(self.Customize_Box) 1023 | self.hero5_combox.setObjectName("hero5_combox") 1024 | for i in source.hero_chi_name: 1025 | self.hero5_combox.addItem(i) 1026 | self.hero5_combox.setCurrentIndex(int(self.HERO5)) 1027 | self.hero5_label = QtWidgets.QLabel(self.Customize_Box) 1028 | self.hero5_label.setObjectName("hero5_label") 1029 | 1030 | self.hero6_combox = QtWidgets.QComboBox(self.Customize_Box) 1031 | self.hero6_combox.setObjectName("hero6_combox") 1032 | for i in source.hero_chi_name: 1033 | self.hero6_combox.addItem(i) 1034 | self.hero6_combox.setCurrentIndex(int(self.HERO6)) 1035 | self.hero6_label = QtWidgets.QLabel(self.Customize_Box) 1036 | self.hero6_label.setObjectName("hero6_label") 1037 | 1038 | self.hero56_HorizontalLayout.addWidget(self.hero5_combox) 1039 | self.hero56_HorizontalLayout.addWidget(self.hero5_label) 1040 | self.hero56_HorizontalLayout.addWidget(self.hero6_combox) 1041 | self.hero56_HorizontalLayout.addWidget(self.hero6_label) 1042 | 1043 | self.Customize_Box_VerticalLayout.addLayout(self.hero56_HorizontalLayout) 1044 | 1045 | # ---------------------------------------------------------------------------------- 1046 | 1047 | self.hero78_HorizontalLayout = QtWidgets.QHBoxLayout() 1048 | self.hero78_HorizontalLayout.setObjectName("hero78_HorizontalLayout") 1049 | 1050 | self.hero7_combox = QtWidgets.QComboBox(self.Customize_Box) 1051 | self.hero7_combox.setObjectName("hero7_combox") 1052 | for i in source.hero_chi_name: 1053 | self.hero7_combox.addItem(i) 1054 | self.hero7_combox.setCurrentIndex(int(self.HERO7)) 1055 | self.hero7_label = QtWidgets.QLabel(self.Customize_Box) 1056 | self.hero7_label.setObjectName("hero7_label") 1057 | 1058 | self.hero8_combox = QtWidgets.QComboBox(self.Customize_Box) 1059 | self.hero8_combox.setObjectName("hero8_combox") 1060 | for i in source.hero_chi_name: 1061 | self.hero8_combox.addItem(i) 1062 | self.hero8_combox.setCurrentIndex(int(self.HERO8)) 1063 | self.hero8_label = QtWidgets.QLabel(self.Customize_Box) 1064 | self.hero8_label.setObjectName("hero8_label") 1065 | 1066 | self.hero78_HorizontalLayout.addWidget(self.hero7_combox) 1067 | self.hero78_HorizontalLayout.addWidget(self.hero7_label) 1068 | self.hero78_HorizontalLayout.addWidget(self.hero8_combox) 1069 | self.hero78_HorizontalLayout.addWidget(self.hero8_label) 1070 | 1071 | self.Customize_Box_VerticalLayout.addLayout(self.hero78_HorizontalLayout) 1072 | 1073 | # ---------------------------------------------------------------------------------- 1074 | self.Setting_Tab_VerticalLayout.addWidget(self.Setting_Box) 1075 | self.Setting_Tab_VerticalLayout.addWidget(self.Customize_Box) 1076 | self.tabWidget.addTab(self.Setting_Tab, "") 1077 | 1078 | ########################################################################################################### 1079 | 1080 | self.Intro_Tab = QtWidgets.QWidget() 1081 | self.Intro_Tab.setObjectName("Intro_Tab") 1082 | 1083 | self.Intro_Box = QtWidgets.QGroupBox(self.Intro_Tab) 1084 | self.Intro_Box.setObjectName("Intro_Box") 1085 | 1086 | self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.Intro_Box) 1087 | self.verticalLayout_2.setContentsMargins(0, 0, 0, 0) 1088 | self.verticalLayout_2.setSpacing(0) 1089 | self.verticalLayout_2.setObjectName("verticalLayout_2") 1090 | 1091 | self.label = QtWidgets.QLabel(self.Intro_Box) 1092 | self.label.setMinimumSize(QtCore.QSize(256, 256)) 1093 | self.label.setAcceptDrops(False) 1094 | self.label.setStyleSheet("image: url(:/pic/source/publicQRcode.jpg);") 1095 | self.label.setText("") 1096 | self.label.setObjectName("label") 1097 | 1098 | self.verticalLayout_2.addWidget(self.label) 1099 | self.tabWidget.addTab(self.Intro_Tab, "") 1100 | 1101 | ########################################################################################################### 1102 | 1103 | self.Sponsor_Tab = QtWidgets.QWidget() 1104 | self.Sponsor_Tab.setObjectName("Sponsor_Tab") 1105 | 1106 | self.Sponsor_Box = QtWidgets.QGroupBox(self.Sponsor_Tab) 1107 | self.Sponsor_Box.setObjectName("Sponsor_Box") 1108 | 1109 | self.SponsorVerticalLayout = QtWidgets.QVBoxLayout(self.Sponsor_Box) 1110 | self.SponsorVerticalLayout.setContentsMargins(0, 0, 0, 0) 1111 | self.SponsorVerticalLayout.setSpacing(0) 1112 | self.SponsorVerticalLayout.setObjectName("SponsorVerticalLayout") 1113 | 1114 | self.SponsorLabel = QtWidgets.QLabel(self.Sponsor_Box) 1115 | self.SponsorLabel.setMinimumSize(QtCore.QSize(256, 256)) 1116 | self.SponsorLabel.setAcceptDrops(False) 1117 | self.SponsorLabel.setStyleSheet("image: url(:/pic/source/sponsorship.jpg);") 1118 | self.SponsorLabel.setText("") 1119 | self.SponsorLabel.setObjectName("SponsorLabel") 1120 | 1121 | self.SponsorVerticalLayout.addWidget(self.SponsorLabel) 1122 | self.tabWidget.addTab(self.Sponsor_Tab, "") 1123 | 1124 | ########################################################################################################### 1125 | 1126 | self.central_VerticalLayout.addWidget(self.tabWidget) 1127 | 1128 | MainWindow.setCentralWidget(self.centralwidget) 1129 | 1130 | self.retranslateUi(MainWindow) 1131 | self.tabWidget.setCurrentIndex(2) 1132 | QtCore.QMetaObject.connectSlotsByName(MainWindow) 1133 | 1134 | # 设置样式 1135 | # MainWindow.setStyleSheet(qdarkstyle.load_stylesheet(qt_api="pyqt5")) 1136 | # with open(os.path.join('qdark.qss'), 'r') as f: 1137 | # qss = f.read() 1138 | # MainWindow.setStyleSheet(qss) 1139 | MainWindow.setStyleSheet(style.qss) 1140 | 1141 | self.qt_btn_stop.clicked.connect( 1142 | lambda: self.startOrStop(self.qt_btn_stop.objectName(), 1143 | self.Group_combox.currentText(), self.FFturn_combox.currentText(), 1144 | self.hero1_combox.currentText(), self.hero2_combox.currentText(), 1145 | self.hero3_combox.currentText(), self.hero4_combox.currentText(), 1146 | self.hero5_combox.currentText(), self.hero6_combox.currentText(), 1147 | self.hero7_combox.currentText(), self.hero8_combox.currentText(), 1148 | self.TEMPLINKCODE, self.rest_check_box.isChecked() 1149 | ) 1150 | ) 1151 | self.qt_btn_start.clicked.connect( 1152 | lambda: self.startOrStop(self.qt_btn_start.objectName(), 1153 | self.Group_combox.currentText(), self.FFturn_combox.currentText(), 1154 | self.hero1_combox.currentText(), self.hero2_combox.currentText(), 1155 | self.hero3_combox.currentText(), self.hero4_combox.currentText(), 1156 | self.hero5_combox.currentText(), self.hero6_combox.currentText(), 1157 | self.hero7_combox.currentText(), self.hero8_combox.currentText(), 1158 | self.TEMPLINKCODE, self.rest_check_box.isChecked() 1159 | ) 1160 | ) 1161 | 1162 | self.sig_keyhot.connect(self.MKey_pressEvent) 1163 | # 3. 初始化两个热键 1164 | self.hk_start, self.hk_stop = SystemHotkey(), SystemHotkey() 1165 | # 4. 绑定快捷键和对应的信号发送函数 1166 | # self.hk_start.register(("control", "9"), callback=lambda x: self.send_key_event("start")) 1167 | self.hk_stop.register(("control", "0"), callback=lambda x: self.send_key_event("stop")) 1168 | 1169 | MainWindow.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint) 1170 | 1171 | def MKey_pressEvent(self, i_str): 1172 | # print("按下的按键是%s" % (i_str,)) 1173 | # self.sin.emit() 1174 | self.qt_btn_stop.click() 1175 | 1176 | # 热键信号发送函数(将外部信号,转化成qt信号) 1177 | def send_key_event(self, i_str): 1178 | self.sig_keyhot.emit(i_str) 1179 | 1180 | def save_config(self): 1181 | self.config.setValue("SETUP/GROUP_VALUE", self.Group_combox.currentIndex()) 1182 | self.config.setValue("SETUP/FFTURN_VALUE", self.FFturn_combox.currentIndex()) 1183 | self.config.setValue("SETUP/HERO1_VALUE", self.hero1_combox.currentIndex()) 1184 | self.config.setValue("SETUP/HERO2_VALUE", self.hero2_combox.currentIndex()) 1185 | self.config.setValue("SETUP/HERO3_VALUE", self.hero3_combox.currentIndex()) 1186 | self.config.setValue("SETUP/HERO4_VALUE", self.hero4_combox.currentIndex()) 1187 | self.config.setValue("SETUP/HERO5_VALUE", self.hero5_combox.currentIndex()) 1188 | self.config.setValue("SETUP/HERO6_VALUE", self.hero6_combox.currentIndex()) 1189 | self.config.setValue("SETUP/HERO7_VALUE", self.hero7_combox.currentIndex()) 1190 | self.config.setValue("SETUP/HERO8_VALUE", self.hero8_combox.currentIndex()) 1191 | self.config.setValue("SETUP/REST_VALUE", self.rest_check_box.isChecked()) 1192 | 1193 | def startOrStop(self, text, group, ffturn, hero1, hero2, hero3, hero4, hero5, hero6, hero7, hero8, temp_link_code, rest): 1194 | try: 1195 | print(text) 1196 | 1197 | if text == "qt_btn_start": 1198 | self.save_config() 1199 | self.qt_text_print.clear() 1200 | self.ts1 = TS(group, ffturn, hero1, hero2, hero3, hero4, hero5, hero6, hero7, hero8, temp_link_code, rest) 1201 | self.ts1.strsin.connect(self.updateText) 1202 | # self.sin.connect(self.ts1.stop) 1203 | self.ts1.isEnable.connect(self.reStart) 1204 | self.ts1.flag = 1 1205 | self.qt_btn_start.setEnabled(False) 1206 | self.ts1.start() 1207 | elif text == "qt_btn_stop": 1208 | if self.ts1.flag == 0: 1209 | self.updateText("$ 脚本已经停止。") 1210 | else: 1211 | self.updateText("$ 脚本正在停止......") 1212 | self.ts1.flag = 0 1213 | self.ts1.exit() 1214 | # self.sin.emit() 1215 | except Exception as e: 1216 | print(e) 1217 | 1218 | def updateText(self, text): 1219 | self.qt_text_print.append(text) 1220 | 1221 | def reStart(self): 1222 | self.qt_btn_start.setEnabled(True) 1223 | 1224 | def retranslateUi(self, MainWindow): 1225 | _translate = QtCore.QCoreApplication.translate 1226 | MainWindow.setWindowTitle(_translate("MainWindow", noBB_version)) 1227 | self.tabWidget.setTabText(self.tabWidget.indexOf(self.Main_Tab), _translate("MainWindow", "主页面")) 1228 | self.Main_Box.setTitle(_translate("MainWindow", "使用前请看说明书1000000遍!!")) 1229 | self.qt_btn_start.setText(_translate("MainWindow", "开始挂机")) 1230 | self.qt_btn_stop.setText(_translate("MainWindow", "停止挂机(Alt+Tab,Ctrl+0)")) 1231 | 1232 | self.tabWidget.setTabText(self.tabWidget.indexOf(self.Setting_Tab), _translate("MainWindow", "设置")) 1233 | self.Setting_Box.setTitle(_translate("MainWindow", "使用前请看说明书1000000遍!!")) 1234 | for i in range(len(source.group_combox_list)): 1235 | self.Group_combox.setItemText(i, _translate("MainWindow", source.group_combox_list[i])) 1236 | 1237 | self.Group_label.setText(_translate("MainWindow", "阵容选择")) 1238 | self.FFturn_combox.setItemText(0, _translate("MainWindow", "10分钟投降")) 1239 | self.FFturn_combox.setItemText(1, _translate("MainWindow", "11分钟投降")) 1240 | self.FFturn_combox.setItemText(2, _translate("MainWindow", "12分钟投降")) 1241 | self.FFturn_combox.setItemText(3, _translate("MainWindow", "13分钟投降")) 1242 | self.FFturn_combox.setItemText(4, _translate("MainWindow", "14分钟投降")) 1243 | self.FFturn_combox.setItemText(5, _translate("MainWindow", "15分钟投降")) 1244 | self.FFturn_combox.setItemText(6, _translate("MainWindow", "前二投降")) 1245 | self.FFturn_combox.setItemText(7, _translate("MainWindow", "前四投降")) 1246 | self.FFturn_combox.setItemText(8, _translate("MainWindow", "前六投降")) 1247 | self.FFturn_combox.setItemText(9, _translate("MainWindow", "永不投降")) 1248 | self.label_2.setText(_translate("MainWindow", "投降模式")) 1249 | 1250 | self.Customize_Box.setTitle(_translate("MainWindow", "自定义阵容英雄选择")) 1251 | self.hero1_label.setText(_translate("MainWindow", "英雄1")) 1252 | self.hero2_label.setText(_translate("MainWindow", "英雄2")) 1253 | self.hero3_label.setText(_translate("MainWindow", "英雄3")) 1254 | self.hero4_label.setText(_translate("MainWindow", "英雄4")) 1255 | self.hero5_label.setText(_translate("MainWindow", "英雄5")) 1256 | self.hero6_label.setText(_translate("MainWindow", "英雄6")) 1257 | self.hero7_label.setText(_translate("MainWindow", "英雄7")) 1258 | self.hero8_label.setText(_translate("MainWindow", "英雄8")) 1259 | 1260 | self.tabWidget.setTabText(self.tabWidget.indexOf(self.Intro_Tab), _translate("MainWindow", "微信公众号")) 1261 | self.Intro_Box.setTitle(_translate("MainWindow", "最新版本下载,最新群号,使用说明书等")) 1262 | 1263 | self.tabWidget.setTabText(self.tabWidget.indexOf(self.Sponsor_Tab), _translate("MainWindow", "一元赞助")) 1264 | self.Sponsor_Box.setTitle(_translate("MainWindow", "一元赞助 升群人口 谢谢老板")) 1265 | 1266 | 1267 | import apprcc_rc -------------------------------------------------------------------------------- /noBBui.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | MainWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 310 10 | 491 11 | 12 | 13 | 14 | 不多BB 15 | 16 | 17 | 18 | :/pic/tuBiao.ico 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 0 27 | 28 | 29 | 30 | Tab 1 31 | 32 | 33 | 34 | 35 | 0 36 | 0 37 | 251 38 | 361 39 | 40 | 41 | 42 | 使用前请看说明书1000000遍! 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 永不投降 51 | 52 | 53 | 54 | 55 | 56 | 57 | 固定阵容 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 开始挂机 69 | 70 | 71 | 72 | 73 | 74 | 75 | 停止挂机 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | Tab 2 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | -------------------------------------------------------------------------------- /qdark.qss: -------------------------------------------------------------------------------- 1 | /* 2 | The MIT License 3 | 4 | Copyright (c) 2013-2018 Colin Duquesnoy https://github.com/ColinDuquesnoy/QDarkStyleSheet/blob/master/LICENSE.md 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 7 | documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to 9 | whom the Software is furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the 12 | Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 15 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 16 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 17 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT 18 | OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | */ 20 | 21 | 22 | QToolTip { 23 | border: 1px solid #76797C; 24 | background-color: #5A7566; 25 | color: white; 26 | padding: 0px; /*remove padding, for fix combobox tooltip.*/ 27 | opacity: 200; 28 | } 29 | 30 | QWidget { 31 | color: #eff0f1; 32 | background-color: #31363b; 33 | selection-background-color: #3daee9; 34 | selection-color: #eff0f1; 35 | background-clip: border; 36 | border-image: none; 37 | border: 0px transparent black; 38 | outline: 0; 39 | } 40 | 41 | QWidget:item:hover { 42 | background-color: #18465d; 43 | color: #eff0f1; 44 | } 45 | 46 | QWidget:item:selected { 47 | background-color: #18465d; 48 | } 49 | 50 | QGroupBox::indicator { 51 | width: 18px; 52 | height: 18px; 53 | } 54 | 55 | QGroupBox::indicator { 56 | margin-left: 2px; 57 | } 58 | 59 | QGroupBox::indicator:unchecked { 60 | image: url(:/qss_icons/rc/checkbox_unchecked.png); 61 | } 62 | 63 | QGroupBox::indicator:unchecked:hover, 64 | QGroupBox::indicator:unchecked:focus, 65 | QGroupBox::indicator:unchecked:pressed { 66 | border: none; 67 | image: url(:/qss_icons/rc/checkbox_unchecked_focus.png); 68 | } 69 | 70 | QGroupBox::indicator:checked { 71 | image: url(:/qss_icons/rc/checkbox_checked.png); 72 | } 73 | 74 | QGroupBox::indicator:checked:hover, 75 | QGroupBox::indicator:checked:focus, 76 | QGroupBox::indicator:checked:pressed { 77 | border: none; 78 | image: url(:/qss_icons/rc/checkbox_checked_focus.png); 79 | } 80 | 81 | QCheckBox::indicator:indeterminate { 82 | image: url(:/qss_icons/rc/checkbox_indeterminate.png); 83 | } 84 | 85 | QCheckBox::indicator:indeterminate:focus, 86 | QCheckBox::indicator:indeterminate:hover, 87 | QCheckBox::indicator:indeterminate:pressed { 88 | image: url(:/qss_icons/rc/checkbox_indeterminate_focus.png); 89 | } 90 | 91 | QCheckBox::indicator:checked:disabled, 92 | QGroupBox::indicator:checked:disabled { 93 | image: url(:/qss_icons/rc/checkbox_checked_disabled.png); 94 | } 95 | 96 | QCheckBox::indicator:unchecked:disabled, 97 | QGroupBox::indicator:unchecked:disabled { 98 | image: url(:/qss_icons/rc/checkbox_unchecked_disabled.png); 99 | } 100 | 101 | QRadioButton { 102 | spacing: 5px; 103 | outline: none; 104 | color: #eff0f1; 105 | margin-bottom: 2px; 106 | } 107 | 108 | QRadioButton:disabled { 109 | color: #76797C; 110 | } 111 | 112 | QRadioButton::indicator { 113 | width: 21px; 114 | height: 21px; 115 | } 116 | 117 | QRadioButton::indicator:unchecked { 118 | image: url(:/qss_icons/rc/radio_unchecked.png); 119 | } 120 | 121 | QRadioButton::indicator:unchecked:hover, 122 | QRadioButton::indicator:unchecked:focus, 123 | QRadioButton::indicator:unchecked:pressed { 124 | border: none; 125 | outline: none; 126 | image: url(:/qss_icons/rc/radio_unchecked_focus.png); 127 | } 128 | 129 | QRadioButton::indicator:checked { 130 | border: none; 131 | outline: none; 132 | image: url(:/qss_icons/rc/radio_checked.png); 133 | } 134 | 135 | QRadioButton::indicator:checked:hover, 136 | QRadioButton::indicator:checked:focus, 137 | QRadioButton::indicator:checked:pressed { 138 | border: none; 139 | outline: none; 140 | image: url(:/qss_icons/rc/radio_checked_focus.png); 141 | } 142 | 143 | QRadioButton::indicator:checked:disabled { 144 | outline: none; 145 | image: url(:/qss_icons/rc/radio_checked_disabled.png); 146 | } 147 | 148 | QRadioButton::indicator:unchecked:disabled { 149 | image: url(:/qss_icons/rc/radio_unchecked_disabled.png); 150 | } 151 | 152 | QMenuBar { 153 | background-color: #31363b; 154 | color: #eff0f1; 155 | } 156 | 157 | QMenuBar::item { 158 | background: transparent; 159 | } 160 | 161 | QMenuBar::item:selected { 162 | background: transparent; 163 | border: 1px solid #76797C; 164 | } 165 | 166 | QMenuBar::item:pressed { 167 | border: 1px solid #76797C; 168 | background-color: #3daee9; 169 | color: #eff0f1; 170 | margin-bottom: -1px; 171 | padding-bottom: 1px; 172 | } 173 | 174 | QMenu { 175 | border: 1px solid #76797C; 176 | color: #eff0f1; 177 | margin: 2px; 178 | } 179 | 180 | QMenu::icon { 181 | margin: 5px; 182 | } 183 | 184 | QMenu::item { 185 | padding: 5px 30px 5px 30px; 186 | border: 1px solid transparent; 187 | /* reserve space for selection border */ 188 | } 189 | 190 | QMenu::item:selected { 191 | color: #eff0f1; 192 | } 193 | 194 | QMenu::separator { 195 | height: 2px; 196 | background: lightblue; 197 | margin-left: 10px; 198 | margin-right: 5px; 199 | } 200 | 201 | QMenu::indicator { 202 | width: 18px; 203 | height: 18px; 204 | } 205 | 206 | 207 | /* non-exclusive indicator = check box style indicator 208 | (see QActionGroup::setExclusive) */ 209 | 210 | QMenu::indicator:non-exclusive:unchecked { 211 | image: url(:/qss_icons/rc/checkbox_unchecked.png); 212 | } 213 | 214 | QMenu::indicator:non-exclusive:unchecked:selected { 215 | image: url(:/qss_icons/rc/checkbox_unchecked_disabled.png); 216 | } 217 | 218 | QMenu::indicator:non-exclusive:checked { 219 | image: url(:/qss_icons/rc/checkbox_checked.png); 220 | } 221 | 222 | QMenu::indicator:non-exclusive:checked:selected { 223 | image: url(:/qss_icons/rc/checkbox_checked_disabled.png); 224 | } 225 | 226 | 227 | /* exclusive indicator = radio button style indicator (see QActionGroup::setExclusive) */ 228 | 229 | QMenu::indicator:exclusive:unchecked { 230 | image: url(:/qss_icons/rc/radio_unchecked.png); 231 | } 232 | 233 | QMenu::indicator:exclusive:unchecked:selected { 234 | image: url(:/qss_icons/rc/radio_unchecked_disabled.png); 235 | } 236 | 237 | QMenu::indicator:exclusive:checked { 238 | image: url(:/qss_icons/rc/radio_checked.png); 239 | } 240 | 241 | QMenu::indicator:exclusive:checked:selected { 242 | image: url(:/qss_icons/rc/radio_checked_disabled.png); 243 | } 244 | 245 | QMenu::right-arrow { 246 | margin: 5px; 247 | image: url(:/qss_icons/rc/right_arrow.png) 248 | } 249 | 250 | QWidget:disabled { 251 | color: #454545; 252 | background-color: #31363b; 253 | } 254 | 255 | QAbstractItemView { 256 | alternate-background-color: #31363b; 257 | color: #eff0f1; 258 | border: 1px solid #3A3939; 259 | border-radius: 2px; 260 | } 261 | 262 | QWidget:focus, 263 | QMenuBar:focus { 264 | border: 1px solid #3daee9; 265 | } 266 | 267 | QTabWidget:focus, 268 | QCheckBox:focus, 269 | QRadioButton:focus, 270 | QSlider:focus { 271 | border: none; 272 | } 273 | 274 | QLineEdit { 275 | background-color: #232629; 276 | padding: 5px; 277 | border-style: solid; 278 | border: 1px solid #76797C; 279 | border-radius: 2px; 280 | color: #eff0f1; 281 | } 282 | 283 | QAbstractItemView QLineEdit { 284 | padding: 0; 285 | } 286 | 287 | QGroupBox { 288 | border: 1px solid #76797C; 289 | border-radius: 2px; 290 | margin-top: 20px; 291 | } 292 | 293 | QGroupBox::title { 294 | subcontrol-origin: margin; 295 | subcontrol-position: top center; 296 | padding-left: 10px; 297 | padding-right: 10px; 298 | padding-top: 10px; 299 | } 300 | 301 | QAbstractScrollArea { 302 | border-radius: 2px; 303 | border: 1px solid #76797C; 304 | background-color: transparent; 305 | } 306 | 307 | QScrollBar:horizontal { 308 | height: 15px; 309 | margin: 3px 15px 3px 15px; 310 | border: 1px transparent #2A2929; 311 | border-radius: 4px; 312 | background-color: #2A2929; 313 | } 314 | 315 | QScrollBar::handle:horizontal { 316 | background-color: #605F5F; 317 | min-width: 5px; 318 | border-radius: 4px; 319 | } 320 | 321 | QScrollBar::add-line:horizontal { 322 | margin: 0px 3px 0px 3px; 323 | border-image: url(:/qss_icons/rc/right_arrow_disabled.png); 324 | width: 10px; 325 | height: 10px; 326 | subcontrol-position: right; 327 | subcontrol-origin: margin; 328 | } 329 | 330 | QScrollBar::sub-line:horizontal { 331 | margin: 0px 3px 0px 3px; 332 | border-image: url(:/qss_icons/rc/left_arrow_disabled.png); 333 | height: 10px; 334 | width: 10px; 335 | subcontrol-position: left; 336 | subcontrol-origin: margin; 337 | } 338 | 339 | QScrollBar::add-line:horizontal:hover, 340 | QScrollBar::add-line:horizontal:on { 341 | border-image: url(:/qss_icons/rc/right_arrow.png); 342 | height: 10px; 343 | width: 10px; 344 | subcontrol-position: right; 345 | subcontrol-origin: margin; 346 | } 347 | 348 | QScrollBar::sub-line:horizontal:hover, 349 | QScrollBar::sub-line:horizontal:on { 350 | border-image: url(:/qss_icons/rc/left_arrow.png); 351 | height: 10px; 352 | width: 10px; 353 | subcontrol-position: left; 354 | subcontrol-origin: margin; 355 | } 356 | 357 | QScrollBar::up-arrow:horizontal, 358 | QScrollBar::down-arrow:horizontal { 359 | background: none; 360 | } 361 | 362 | QScrollBar::add-page:horizontal, 363 | QScrollBar::sub-page:horizontal { 364 | background: none; 365 | } 366 | 367 | QScrollBar:vertical { 368 | background-color: #2A2929; 369 | width: 15px; 370 | margin: 15px 3px 15px 3px; 371 | border: 1px transparent #2A2929; 372 | border-radius: 4px; 373 | } 374 | 375 | QScrollBar::handle:vertical { 376 | background-color: #605F5F; 377 | min-height: 40px; 378 | border-radius: 4px; 379 | } 380 | 381 | QScrollBar::sub-line:vertical { 382 | margin: 3px 0px 3px 0px; 383 | border-image: url(:/qss_icons/rc/up_arrow_disabled.png); 384 | height: 10px; 385 | width: 10px; 386 | subcontrol-position: top; 387 | subcontrol-origin: margin; 388 | } 389 | 390 | QScrollBar::add-line:vertical { 391 | margin: 3px 0px 3px 0px; 392 | border-image: url(:/qss_icons/rc/down_arrow_disabled.png); 393 | height: 10px; 394 | width: 10px; 395 | subcontrol-position: bottom; 396 | subcontrol-origin: margin; 397 | } 398 | 399 | QScrollBar::sub-line:vertical:hover, 400 | QScrollBar::sub-line:vertical:on { 401 | border-image: url(:/qss_icons/rc/up_arrow.png); 402 | height: 10px; 403 | width: 10px; 404 | subcontrol-position: top; 405 | subcontrol-origin: margin; 406 | } 407 | 408 | QScrollBar::add-line:vertical:hover, 409 | QScrollBar::add-line:vertical:on { 410 | border-image: url(:/qss_icons/rc/down_arrow.png); 411 | height: 10px; 412 | width: 10px; 413 | subcontrol-position: bottom; 414 | subcontrol-origin: margin; 415 | } 416 | 417 | QScrollBar::up-arrow:vertical, 418 | QScrollBar::down-arrow:vertical { 419 | background: none; 420 | } 421 | 422 | QScrollBar::add-page:vertical, 423 | QScrollBar::sub-page:vertical { 424 | background: none; 425 | } 426 | 427 | QTextEdit { 428 | background-color: #232629; 429 | color: #eff0f1; 430 | border: 1px solid #76797C; 431 | } 432 | 433 | QPlainTextEdit { 434 | background-color: #232629; 435 | ; 436 | color: #eff0f1; 437 | border-radius: 2px; 438 | border: 1px solid #76797C; 439 | } 440 | 441 | QHeaderView::section { 442 | background-color: #76797C; 443 | color: #eff0f1; 444 | padding: 5px; 445 | border: 1px solid #76797C; 446 | } 447 | 448 | QSizeGrip { 449 | image: url(:/qss_icons/rc/sizegrip.png); 450 | width: 12px; 451 | height: 12px; 452 | } 453 | 454 | QMainWindow::separator { 455 | background-color: #31363b; 456 | color: white; 457 | padding-left: 4px; 458 | spacing: 2px; 459 | border: 1px dashed #76797C; 460 | } 461 | 462 | QMainWindow::separator:hover { 463 | background-color: #787876; 464 | color: white; 465 | padding-left: 4px; 466 | border: 1px solid #76797C; 467 | spacing: 2px; 468 | } 469 | 470 | QMenu::separator { 471 | height: 1px; 472 | background-color: #76797C; 473 | color: white; 474 | padding-left: 4px; 475 | margin-left: 10px; 476 | margin-right: 5px; 477 | } 478 | 479 | QFrame { 480 | border-radius: 2px; 481 | border: 1px solid #76797C; 482 | } 483 | 484 | QFrame[frameShape="0"] { 485 | border-radius: 2px; 486 | border: 1px transparent #76797C; 487 | } 488 | 489 | QStackedWidget { 490 | border: 1px transparent black; 491 | } 492 | 493 | QToolBar { 494 | border: 1px transparent #393838; 495 | background: 1px solid #31363b; 496 | font-weight: bold; 497 | } 498 | 499 | QToolBar::handle:horizontal { 500 | image: url(:/qss_icons/rc/Hmovetoolbar.png); 501 | } 502 | 503 | QToolBar::handle:vertical { 504 | image: url(:/qss_icons/rc/Vmovetoolbar.png); 505 | } 506 | 507 | QToolBar::separator:horizontal { 508 | image: url(:/qss_icons/rc/Hsepartoolbar.png); 509 | } 510 | 511 | QToolBar::separator:vertical { 512 | image: url(:/qss_icons/rc/Vsepartoolbar.png); 513 | } 514 | 515 | QToolButton#qt_toolbar_ext_button { 516 | background: #58595a 517 | } 518 | 519 | QPushButton { 520 | color: #eff0f1; 521 | background-color: #31363b; 522 | border-width: 0px; 523 | border-color: #76797C; 524 | border-style: solid; 525 | padding: 5px; 526 | border-radius: 2px; 527 | outline: none; 528 | } 529 | 530 | QPushButton:disabled { 531 | background-color: #31363b; 532 | border-width: 0px; 533 | border-color: #454545; 534 | border-style: solid; 535 | padding-top: 5px; 536 | padding-bottom: 5px; 537 | padding-left: 10px; 538 | padding-right: 10px; 539 | border-radius: 2px; 540 | color: #454545; 541 | } 542 | 543 | QPushButton:pressed { 544 | background-color: #3daee9; 545 | padding-top: -15px; 546 | padding-bottom: -17px; 547 | } 548 | 549 | QComboBox { 550 | selection-background-color: #3daee9; 551 | border-style: solid; 552 | border: 1px solid #76797C; 553 | border-radius: 2px; 554 | padding: 5px; 555 | } 556 | 557 | QPushButton:checked { 558 | background-color: #76797C; 559 | border-color: #6A6969; 560 | } 561 | 562 | QComboBox:hover, 563 | QPushButton:hover, 564 | QAbstractSpinBox:hover, 565 | QLineEdit:hover, 566 | QTextEdit:hover, 567 | QPlainTextEdit:hover, 568 | QAbstractView:hover, 569 | QTreeView:hover { 570 | border: 1px solid #3daee9; 571 | color: #eff0f1; 572 | } 573 | 574 | QComboBox:on { 575 | padding-top: 3px; 576 | padding-left: 4px; 577 | selection-background-color: #4a4a4a; 578 | } 579 | 580 | QComboBox QAbstractItemView { 581 | background-color: #232629; 582 | border-radius: 2px; 583 | border: 1px solid #76797C; 584 | selection-background-color: #18465d; 585 | } 586 | 587 | QComboBox::drop-down { 588 | subcontrol-origin: padding; 589 | subcontrol-position: top right; 590 | width: 15px; 591 | border-left-width: 0px; 592 | border-left-color: darkgray; 593 | border-left-style: solid; 594 | border-top-right-radius: 3px; 595 | border-bottom-right-radius: 3px; 596 | } 597 | 598 | QComboBox::down-arrow { 599 | image: url(:/pic/down_arrow_disabled.png); 600 | } 601 | 602 | QComboBox::down-arrow:on, 603 | QComboBox::down-arrow:hover, 604 | QComboBox::down-arrow:focus { 605 | image: url(:/pic/down_arrow.png); 606 | } 607 | 608 | QAbstractSpinBox { 609 | padding: 5px; 610 | border: 1px solid #76797C; 611 | background-color: #232629; 612 | color: #eff0f1; 613 | border-radius: 2px; 614 | min-width: 75px; 615 | } 616 | 617 | QAbstractSpinBox:up-button { 618 | background-color: transparent; 619 | subcontrol-origin: border; 620 | subcontrol-position: center right; 621 | } 622 | 623 | QAbstractSpinBox:down-button { 624 | background-color: transparent; 625 | subcontrol-origin: border; 626 | subcontrol-position: center left; 627 | } 628 | 629 | QAbstractSpinBox::up-arrow, 630 | QAbstractSpinBox::up-arrow:disabled, 631 | QAbstractSpinBox::up-arrow:off { 632 | image: url(:/qss_icons/rc/up_arrow_disabled.png); 633 | width: 10px; 634 | height: 10px; 635 | } 636 | 637 | QAbstractSpinBox::up-arrow:hover { 638 | image: url(:/qss_icons/rc/up_arrow.png); 639 | } 640 | 641 | QAbstractSpinBox::down-arrow, 642 | QAbstractSpinBox::down-arrow:disabled, 643 | QAbstractSpinBox::down-arrow:off { 644 | image: url(:/qss_icons/rc/down_arrow_disabled.png); 645 | width: 10px; 646 | height: 10px; 647 | } 648 | 649 | QAbstractSpinBox::down-arrow:hover { 650 | image: url(:/qss_icons/rc/down_arrow.png); 651 | } 652 | 653 | QLabel { 654 | border: 0px solid black; 655 | } 656 | 657 | QTabWidget { 658 | border: 0px transparent black; 659 | } 660 | 661 | QTabWidget::pane { 662 | border: 1px solid #76797C; 663 | padding: 5px; 664 | margin: 0px; 665 | } 666 | 667 | QTabWidget::tab-bar { 668 | /* left: 5px; move to the right by 5px */ 669 | } 670 | 671 | QTabBar { 672 | qproperty-drawBase: 0; 673 | border-radius: 3px; 674 | } 675 | 676 | QTabBar:focus { 677 | border: 0px transparent black; 678 | } 679 | 680 | QTabBar::close-button { 681 | image: url(:/qss_icons/rc/close.png); 682 | background: transparent; 683 | } 684 | 685 | QTabBar::close-button:hover { 686 | image: url(:/qss_icons/rc/close-hover.png); 687 | background: transparent; 688 | } 689 | 690 | QTabBar::close-button:pressed { 691 | image: url(:/qss_icons/rc/close-pressed.png); 692 | background: transparent; 693 | } 694 | 695 | 696 | /* TOP TABS */ 697 | 698 | QTabBar::tab:top { 699 | color: #eff0f1; 700 | border: 1px solid #76797C; 701 | border-bottom: 1px transparent black; 702 | background-color: #31363b; 703 | padding: 5px; 704 | min-width: 50px; 705 | border-top-left-radius: 2px; 706 | border-top-right-radius: 2px; 707 | } 708 | 709 | QTabBar::tab:top:selected { 710 | color: #eff0f1; 711 | background-color: #54575B; 712 | border: 1px solid #76797C; 713 | border-bottom: 2px solid #3daee9; 714 | border-top-left-radius: 2px; 715 | border-top-right-radius: 2px; 716 | } 717 | 718 | QTabBar::tab:top:!selected:hover { 719 | background-color: #3daee9; 720 | } 721 | 722 | 723 | /* BOTTOM TABS */ 724 | 725 | QTabBar::tab:bottom { 726 | color: #eff0f1; 727 | border: 1px solid #76797C; 728 | border-top: 1px transparent black; 729 | background-color: #31363b; 730 | padding: 5px; 731 | border-bottom-left-radius: 2px; 732 | border-bottom-right-radius: 2px; 733 | min-width: 50px; 734 | } 735 | 736 | QTabBar::tab:bottom:selected { 737 | color: #eff0f1; 738 | background-color: #54575B; 739 | border: 1px solid #76797C; 740 | border-top: 2px solid #3daee9; 741 | border-bottom-left-radius: 2px; 742 | border-bottom-right-radius: 2px; 743 | } 744 | 745 | QTabBar::tab:bottom:!selected:hover { 746 | background-color: #3daee9; 747 | } 748 | 749 | 750 | /* LEFT TABS */ 751 | 752 | QTabBar::tab:left { 753 | color: #eff0f1; 754 | border: 1px solid #76797C; 755 | border-left: 1px transparent black; 756 | background-color: #31363b; 757 | padding: 5px; 758 | border-top-right-radius: 2px; 759 | border-bottom-right-radius: 2px; 760 | min-height: 50px; 761 | } 762 | 763 | QTabBar::tab:left:selected { 764 | color: #eff0f1; 765 | background-color: #54575B; 766 | border: 1px solid #76797C; 767 | border-left: 2px solid #3daee9; 768 | border-top-right-radius: 2px; 769 | border-bottom-right-radius: 2px; 770 | } 771 | 772 | QTabBar::tab:left:!selected:hover { 773 | background-color: #3daee9; 774 | } 775 | 776 | 777 | /* RIGHT TABS */ 778 | 779 | QTabBar::tab:right { 780 | color: #eff0f1; 781 | border: 1px solid #76797C; 782 | border-right: 1px transparent black; 783 | background-color: #31363b; 784 | padding: 5px; 785 | border-top-left-radius: 2px; 786 | border-bottom-left-radius: 2px; 787 | min-height: 50px; 788 | } 789 | 790 | QTabBar::tab:right:selected { 791 | color: #eff0f1; 792 | background-color: #54575B; 793 | border: 1px solid #76797C; 794 | border-right: 2px solid #3daee9; 795 | border-top-left-radius: 2px; 796 | border-bottom-left-radius: 2px; 797 | } 798 | 799 | QTabBar::tab:right:!selected:hover { 800 | background-color: #3daee9; 801 | } 802 | 803 | QTabBar QToolButton::right-arrow:enabled { 804 | image: url(:/qss_icons/rc/right_arrow.png); 805 | } 806 | 807 | QTabBar QToolButton::left-arrow:enabled { 808 | image: url(:/qss_icons/rc/left_arrow.png); 809 | } 810 | 811 | QTabBar QToolButton::right-arrow:disabled { 812 | image: url(:/qss_icons/rc/right_arrow_disabled.png); 813 | } 814 | 815 | QTabBar QToolButton::left-arrow:disabled { 816 | image: url(:/qss_icons/rc/left_arrow_disabled.png); 817 | } 818 | 819 | QDockWidget { 820 | background: #31363b; 821 | border: 1px solid #403F3F; 822 | titlebar-close-icon: url(:/qss_icons/rc/close.png); 823 | titlebar-normal-icon: url(:/qss_icons/rc/undock.png); 824 | } 825 | 826 | QDockWidget::close-button, 827 | QDockWidget::float-button { 828 | border: 1px solid transparent; 829 | border-radius: 2px; 830 | background: transparent; 831 | } 832 | 833 | QDockWidget::close-button:hover, 834 | QDockWidget::float-button:hover { 835 | background: rgba(255, 255, 255, 10); 836 | } 837 | 838 | QDockWidget::close-button:pressed, 839 | QDockWidget::float-button:pressed { 840 | padding: 1px -1px -1px 1px; 841 | background: rgba(255, 255, 255, 10); 842 | } 843 | 844 | QTreeView, 845 | QListView { 846 | border: 1px solid #76797C; 847 | background-color: #232629; 848 | } 849 | 850 | QTreeView:branch:selected, 851 | QTreeView:branch:hover { 852 | background: url(:/qss_icons/rc/transparent.png); 853 | } 854 | 855 | QTreeView::branch:has-siblings:!adjoins-item { 856 | border-image: url(:/qss_icons/rc/transparent.png); 857 | } 858 | 859 | QTreeView::branch:has-siblings:adjoins-item { 860 | border-image: url(:/qss_icons/rc/transparent.png); 861 | } 862 | 863 | QTreeView::branch:!has-children:!has-siblings:adjoins-item { 864 | border-image: url(:/qss_icons/rc/transparent.png); 865 | } 866 | 867 | QTreeView::branch:has-children:!has-siblings:closed, 868 | QTreeView::branch:closed:has-children:has-siblings { 869 | image: url(:/qss_icons/rc/branch_closed.png); 870 | } 871 | 872 | QTreeView::branch:open:has-children:!has-siblings, 873 | QTreeView::branch:open:has-children:has-siblings { 874 | image: url(:/qss_icons/rc/branch_open.png); 875 | } 876 | 877 | QTreeView::branch:has-children:!has-siblings:closed:hover, 878 | QTreeView::branch:closed:has-children:has-siblings:hover { 879 | image: url(:/qss_icons/rc/branch_closed-on.png); 880 | } 881 | 882 | QTreeView::branch:open:has-children:!has-siblings:hover, 883 | QTreeView::branch:open:has-children:has-siblings:hover { 884 | image: url(:/qss_icons/rc/branch_open-on.png); 885 | } 886 | 887 | QListView::item:!selected:hover, 888 | QTreeView::item:!selected:hover { 889 | background: #18465d; 890 | outline: 0; 891 | color: #eff0f1 892 | } 893 | 894 | QListView::item:selected:hover, 895 | QTreeView::item:selected:hover { 896 | background: #287399; 897 | color: #eff0f1; 898 | } 899 | 900 | QTreeView::indicator:checked, 901 | QListView::indicator:checked { 902 | image: url(:/qss_icons/rc/checkbox_checked.png); 903 | } 904 | 905 | QTreeView::indicator:unchecked, 906 | QListView::indicator:unchecked { 907 | image: url(:/qss_icons/rc/checkbox_unchecked.png); 908 | } 909 | 910 | QTreeView::indicator:indeterminate, 911 | QListView::indicator:indeterminate { 912 | image: url(:/qss_icons/rc/checkbox_indeterminate.png); 913 | } 914 | 915 | QTreeView::indicator:checked:hover, 916 | QTreeView::indicator:checked:focus, 917 | QTreeView::indicator:checked:pressed, 918 | QListView::indicator:checked:hover, 919 | QListView::indicator:checked:focus, 920 | QListView::indicator:checked:pressed { 921 | image: url(:/qss_icons/rc/checkbox_checked_focus.png); 922 | } 923 | 924 | QTreeView::indicator:unchecked:hover, 925 | QTreeView::indicator:unchecked:focus, 926 | QTreeView::indicator:unchecked:pressed, 927 | QListView::indicator:unchecked:hover, 928 | QListView::indicator:unchecked:focus, 929 | QListView::indicator:unchecked:pressed { 930 | image: url(:/qss_icons/rc/checkbox_unchecked_focus.png); 931 | } 932 | 933 | QTreeView::indicator:indeterminate:hover, 934 | QTreeView::indicator:indeterminate:focus, 935 | QTreeView::indicator:indeterminate:pressed, 936 | QListView::indicator:indeterminate:hover, 937 | QListView::indicator:indeterminate:focus, 938 | QListView::indicator:indeterminate:pressed { 939 | image: url(:/qss_icons/rc/checkbox_indeterminate_focus.png); 940 | } 941 | 942 | QSlider::groove:horizontal { 943 | border: 1px solid #565a5e; 944 | height: 4px; 945 | background: #565a5e; 946 | margin: 0px; 947 | border-radius: 2px; 948 | } 949 | 950 | QSlider::handle:horizontal { 951 | background: #232629; 952 | border: 1px solid #565a5e; 953 | width: 16px; 954 | height: 16px; 955 | margin: -8px 0; 956 | border-radius: 9px; 957 | } 958 | 959 | QSlider::groove:vertical { 960 | border: 1px solid #565a5e; 961 | width: 4px; 962 | background: #565a5e; 963 | margin: 0px; 964 | border-radius: 3px; 965 | } 966 | 967 | QSlider::handle:vertical { 968 | background: #232629; 969 | border: 1px solid #565a5e; 970 | width: 16px; 971 | height: 16px; 972 | margin: 0 -8px; 973 | border-radius: 9px; 974 | } 975 | 976 | QToolButton { 977 | background-color: transparent; 978 | border: 1px transparent #76797C; 979 | border-radius: 2px; 980 | margin: 3px; 981 | padding: 5px; 982 | } 983 | 984 | QToolButton[popupMode="1"] { 985 | /* only for MenuButtonPopup */ 986 | padding-right: 20px; 987 | /* make way for the popup button */ 988 | border: 1px #76797C; 989 | border-radius: 5px; 990 | } 991 | 992 | QToolButton[popupMode="2"] { 993 | /* only for InstantPopup */ 994 | padding-right: 10px; 995 | /* make way for the popup button */ 996 | border: 1px #76797C; 997 | } 998 | 999 | QToolButton:hover, 1000 | QToolButton::menu-button:hover { 1001 | background-color: transparent; 1002 | border: 1px solid #3daee9; 1003 | padding: 5px; 1004 | } 1005 | 1006 | QToolButton:checked, 1007 | QToolButton:pressed, 1008 | QToolButton::menu-button:pressed { 1009 | background-color: #3daee9; 1010 | border: 1px solid #3daee9; 1011 | padding: 5px; 1012 | } 1013 | 1014 | 1015 | /* the subcontrol below is used only in the InstantPopup or DelayedPopup mode */ 1016 | 1017 | QToolButton::menu-indicator { 1018 | image: url(:/qss_icons/rc/down_arrow.png); 1019 | top: -7px; 1020 | left: -2px; 1021 | /* shift it a bit */ 1022 | } 1023 | 1024 | 1025 | /* the subcontrols below are used only in the MenuButtonPopup mode */ 1026 | 1027 | QToolButton::menu-button { 1028 | border: 1px transparent #76797C; 1029 | border-top-right-radius: 6px; 1030 | border-bottom-right-radius: 6px; 1031 | /* 16px width + 4px for border = 20px allocated above */ 1032 | width: 16px; 1033 | outline: none; 1034 | } 1035 | 1036 | QToolButton::menu-arrow { 1037 | image: url(:/qss_icons/rc/down_arrow.png); 1038 | } 1039 | 1040 | QToolButton::menu-arrow:open { 1041 | border: 1px solid #76797C; 1042 | } 1043 | 1044 | QPushButton::menu-indicator { 1045 | subcontrol-origin: padding; 1046 | subcontrol-position: bottom right; 1047 | left: 8px; 1048 | } 1049 | 1050 | QTableView { 1051 | border: 1px solid #76797C; 1052 | gridline-color: #383f46; 1053 | background-color: #232629; 1054 | } 1055 | 1056 | QTableView, 1057 | QHeaderView { 1058 | border-radius: 0px; 1059 | } 1060 | 1061 | QTableView::item:pressed, 1062 | QListView::item:pressed, 1063 | QTreeView::item:pressed { 1064 | background: #18465d; 1065 | color: #eff0f1; 1066 | } 1067 | 1068 | QTableView::item:selected:active, 1069 | QTreeView::item:selected:active, 1070 | QListView::item:selected:active { 1071 | background: #287399; 1072 | color: #eff0f1; 1073 | } 1074 | 1075 | QHeaderView { 1076 | background-color: #31363b; 1077 | border: 1px transparent; 1078 | border-radius: 0px; 1079 | margin: 0px; 1080 | padding: 0px; 1081 | } 1082 | 1083 | QHeaderView::section { 1084 | background-color: #31363b; 1085 | color: #eff0f1; 1086 | padding: 5px; 1087 | border: 1px solid #76797C; 1088 | border-radius: 0px; 1089 | text-align: center; 1090 | } 1091 | 1092 | QHeaderView::section::vertical::first, 1093 | QHeaderView::section::vertical::only-one { 1094 | border-top: 1px solid #76797C; 1095 | } 1096 | 1097 | QHeaderView::section::vertical { 1098 | border-top: transparent; 1099 | } 1100 | 1101 | QHeaderView::section::horizontal::first, 1102 | QHeaderView::section::horizontal::only-one { 1103 | border-left: 1px solid #76797C; 1104 | } 1105 | 1106 | QHeaderView::section::horizontal { 1107 | border-left: transparent; 1108 | } 1109 | 1110 | QHeaderView::section:checked { 1111 | color: white; 1112 | background-color: #334e5e; 1113 | } 1114 | 1115 | 1116 | /* style the sort indicator */ 1117 | 1118 | QHeaderView::down-arrow { 1119 | image: url(:/qss_icons/rc/down_arrow.png); 1120 | } 1121 | 1122 | QHeaderView::up-arrow { 1123 | image: url(:/qss_icons/rc/up_arrow.png); 1124 | } 1125 | 1126 | QTableCornerButton::section { 1127 | background-color: #31363b; 1128 | border: 1px transparent #76797C; 1129 | border-radius: 0px; 1130 | } 1131 | 1132 | QToolBox { 1133 | padding: 5px; 1134 | border: 1px transparent black; 1135 | } 1136 | 1137 | QToolBox::tab { 1138 | color: #eff0f1; 1139 | background-color: #31363b; 1140 | border: 1px solid #76797C; 1141 | border-bottom: 1px transparent #31363b; 1142 | border-top-left-radius: 5px; 1143 | border-top-right-radius: 5px; 1144 | } 1145 | 1146 | QToolBox::tab:selected { 1147 | /* italicize selected tabs */ 1148 | font: italic; 1149 | background-color: #31363b; 1150 | border-color: #3daee9; 1151 | } 1152 | 1153 | QStatusBar::item { 1154 | border: 0px transparent dark; 1155 | } 1156 | 1157 | QFrame[height="3"], 1158 | QFrame[width="3"] { 1159 | background-color: #76797C; 1160 | } 1161 | 1162 | QSplitter::handle { 1163 | border: 1px dashed #76797C; 1164 | } 1165 | 1166 | QSplitter::handle:hover { 1167 | background-color: #787876; 1168 | border: 1px solid #76797C; 1169 | } 1170 | 1171 | QSplitter::handle:horizontal { 1172 | width: 1px; 1173 | } 1174 | 1175 | QSplitter::handle:vertical { 1176 | height: 1px; 1177 | } 1178 | 1179 | QProgressBar { 1180 | border: 1px solid #76797C; 1181 | border-radius: 5px; 1182 | text-align: center; 1183 | } 1184 | 1185 | QProgressBar::chunk { 1186 | background-color: #05B8CC; 1187 | } 1188 | 1189 | QDateEdit { 1190 | selection-background-color: #3daee9; 1191 | border-style: solid; 1192 | border: 1px solid #3375A3; 1193 | border-radius: 2px; 1194 | padding: 1px; 1195 | min-width: 75px; 1196 | } 1197 | 1198 | QDateEdit:on { 1199 | padding-top: 3px; 1200 | padding-left: 4px; 1201 | selection-background-color: #4a4a4a; 1202 | } 1203 | 1204 | QDateEdit QAbstractItemView { 1205 | background-color: #232629; 1206 | border-radius: 2px; 1207 | border: 1px solid #3375A3; 1208 | selection-background-color: #3daee9; 1209 | } 1210 | 1211 | QDateEdit::drop-down { 1212 | subcontrol-origin: padding; 1213 | subcontrol-position: top right; 1214 | width: 15px; 1215 | border-left-width: 0px; 1216 | border-left-color: darkgray; 1217 | border-left-style: solid; 1218 | border-top-right-radius: 3px; 1219 | border-bottom-right-radius: 3px; 1220 | } 1221 | 1222 | QDateEdit::down-arrow { 1223 | image: url(:/qss_icons/rc/down_arrow_disabled.png); 1224 | } 1225 | 1226 | QDateEdit::down-arrow:on, 1227 | QDateEdit::down-arrow:hover, 1228 | QDateEdit::down-arrow:focus { 1229 | image: url(:/qss_icons/rc/down_arrow.png); 1230 | } -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | altgraph==0.17 2 | appdirs==1.4.4 3 | certifi==2020.6.20 4 | chardet==3.0.4 5 | click==7.1.2 6 | distlib==0.3.1 7 | filelock==3.0.12 8 | future==0.18.2 9 | helpdev==0.7.1 10 | idna==2.10 11 | MouseInfo==0.1.3 12 | numpy==1.19.2 13 | opencv-python==4.4.0.42 14 | pefile==2019.4.18 15 | Pillow==7.2.0 16 | PyAutoGUI==0.9.50 17 | pyDes==2.0.1 18 | PyGetWindow==0.0.8 19 | pyinstaller==4.0 20 | pyinstaller-hooks-contrib==2020.8 21 | PyMsgBox==1.0.8 22 | pynput==1.7.1 23 | pyperclip==1.8.0 24 | PyQt5==5.15.1 25 | PyQt5-sip==12.8.1 26 | pyqt5-tools==5.15.1.1.7.2 27 | PyRect==0.1.4 28 | PyScreeze==0.1.26 29 | python-dotenv==0.14.0 30 | PyTweening==1.0.3 31 | pywin32==228 32 | pywin32-ctypes==0.2.0 33 | QDarkStyle==2.8.1 34 | QtPy==1.9.0 35 | requests==2.24.0 36 | six==1.15.0 37 | system-hotkey==1.0.3 38 | urllib3==1.25.10 39 | virtualenv==20.0.31 40 | WMI==1.5.1 41 | -------------------------------------------------------------------------------- /source/publicQRcode.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/source/publicQRcode.jpg -------------------------------------------------------------------------------- /source/qtcode2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/source/qtcode2.png -------------------------------------------------------------------------------- /source/qtcode3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/source/qtcode3.png -------------------------------------------------------------------------------- /source/sponsorship.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/source/sponsorship.jpg -------------------------------------------------------------------------------- /source/tuBiao.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yywwann/TacticsScript/3a78e5eade851cd3f836b71a6c318bc05cec65c8/source/tuBiao.ico -------------------------------------------------------------------------------- /style.py: -------------------------------------------------------------------------------- 1 | qss = """ 2 | /* 3 | The MIT License 4 | 5 | Copyright (c) 2013-2018 Colin Duquesnoy https://github.com/ColinDuquesnoy/QDarkStyleSheet/blob/master/LICENSE.md 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 8 | documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to 9 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to 10 | whom the Software is furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the 13 | Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 16 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 18 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT 19 | OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20 | */ 21 | 22 | 23 | QToolTip { 24 | border: 1px solid #76797C; 25 | background-color: #5A7566; 26 | color: white; 27 | padding: 0px; /*remove padding, for fix combobox tooltip.*/ 28 | opacity: 200; 29 | } 30 | 31 | QWidget { 32 | color: #eff0f1; 33 | background-color: #31363b; 34 | selection-background-color: #3daee9; 35 | selection-color: #eff0f1; 36 | background-clip: border; 37 | border-image: none; 38 | border: 0px transparent black; 39 | outline: 0; 40 | } 41 | 42 | QWidget:item:hover { 43 | background-color: #18465d; 44 | color: #eff0f1; 45 | } 46 | 47 | QWidget:item:selected { 48 | background-color: #18465d; 49 | } 50 | 51 | QGroupBox::indicator { 52 | width: 18px; 53 | height: 18px; 54 | } 55 | 56 | QGroupBox::indicator { 57 | margin-left: 2px; 58 | } 59 | 60 | QGroupBox::indicator:unchecked { 61 | image: url(:/qss_icons/rc/checkbox_unchecked.png); 62 | } 63 | 64 | QGroupBox::indicator:unchecked:hover, 65 | QGroupBox::indicator:unchecked:focus, 66 | QGroupBox::indicator:unchecked:pressed { 67 | border: none; 68 | image: url(:/qss_icons/rc/checkbox_unchecked_focus.png); 69 | } 70 | 71 | QGroupBox::indicator:checked { 72 | image: url(:/qss_icons/rc/checkbox_checked.png); 73 | } 74 | 75 | QGroupBox::indicator:checked:hover, 76 | QGroupBox::indicator:checked:focus, 77 | QGroupBox::indicator:checked:pressed { 78 | border: none; 79 | image: url(:/qss_icons/rc/checkbox_checked_focus.png); 80 | } 81 | 82 | QCheckBox::indicator:indeterminate { 83 | image: url(:/qss_icons/rc/checkbox_indeterminate.png); 84 | } 85 | 86 | QCheckBox::indicator:indeterminate:focus, 87 | QCheckBox::indicator:indeterminate:hover, 88 | QCheckBox::indicator:indeterminate:pressed { 89 | image: url(:/qss_icons/rc/checkbox_indeterminate_focus.png); 90 | } 91 | 92 | QCheckBox::indicator:checked:disabled, 93 | QGroupBox::indicator:checked:disabled { 94 | image: url(:/qss_icons/rc/checkbox_checked_disabled.png); 95 | } 96 | 97 | QCheckBox::indicator:unchecked:disabled, 98 | QGroupBox::indicator:unchecked:disabled { 99 | image: url(:/qss_icons/rc/checkbox_unchecked_disabled.png); 100 | } 101 | 102 | QRadioButton { 103 | spacing: 5px; 104 | outline: none; 105 | color: #eff0f1; 106 | margin-bottom: 2px; 107 | } 108 | 109 | QRadioButton:disabled { 110 | color: #76797C; 111 | } 112 | 113 | QRadioButton::indicator { 114 | width: 21px; 115 | height: 21px; 116 | } 117 | 118 | QRadioButton::indicator:unchecked { 119 | image: url(:/qss_icons/rc/radio_unchecked.png); 120 | } 121 | 122 | QRadioButton::indicator:unchecked:hover, 123 | QRadioButton::indicator:unchecked:focus, 124 | QRadioButton::indicator:unchecked:pressed { 125 | border: none; 126 | outline: none; 127 | image: url(:/qss_icons/rc/radio_unchecked_focus.png); 128 | } 129 | 130 | QRadioButton::indicator:checked { 131 | border: none; 132 | outline: none; 133 | image: url(:/qss_icons/rc/radio_checked.png); 134 | } 135 | 136 | QRadioButton::indicator:checked:hover, 137 | QRadioButton::indicator:checked:focus, 138 | QRadioButton::indicator:checked:pressed { 139 | border: none; 140 | outline: none; 141 | image: url(:/qss_icons/rc/radio_checked_focus.png); 142 | } 143 | 144 | QRadioButton::indicator:checked:disabled { 145 | outline: none; 146 | image: url(:/qss_icons/rc/radio_checked_disabled.png); 147 | } 148 | 149 | QRadioButton::indicator:unchecked:disabled { 150 | image: url(:/qss_icons/rc/radio_unchecked_disabled.png); 151 | } 152 | 153 | QMenuBar { 154 | background-color: #31363b; 155 | color: #eff0f1; 156 | } 157 | 158 | QMenuBar::item { 159 | background: transparent; 160 | } 161 | 162 | QMenuBar::item:selected { 163 | background: transparent; 164 | border: 1px solid #76797C; 165 | } 166 | 167 | QMenuBar::item:pressed { 168 | border: 1px solid #76797C; 169 | background-color: #3daee9; 170 | color: #eff0f1; 171 | margin-bottom: -1px; 172 | padding-bottom: 1px; 173 | } 174 | 175 | QMenu { 176 | border: 1px solid #76797C; 177 | color: #eff0f1; 178 | margin: 2px; 179 | } 180 | 181 | QMenu::icon { 182 | margin: 5px; 183 | } 184 | 185 | QMenu::item { 186 | padding: 5px 30px 5px 30px; 187 | border: 1px solid transparent; 188 | /* reserve space for selection border */ 189 | } 190 | 191 | QMenu::item:selected { 192 | color: #eff0f1; 193 | } 194 | 195 | QMenu::separator { 196 | height: 2px; 197 | background: lightblue; 198 | margin-left: 10px; 199 | margin-right: 5px; 200 | } 201 | 202 | QMenu::indicator { 203 | width: 18px; 204 | height: 18px; 205 | } 206 | 207 | 208 | /* non-exclusive indicator = check box style indicator 209 | (see QActionGroup::setExclusive) */ 210 | 211 | QMenu::indicator:non-exclusive:unchecked { 212 | image: url(:/qss_icons/rc/checkbox_unchecked.png); 213 | } 214 | 215 | QMenu::indicator:non-exclusive:unchecked:selected { 216 | image: url(:/qss_icons/rc/checkbox_unchecked_disabled.png); 217 | } 218 | 219 | QMenu::indicator:non-exclusive:checked { 220 | image: url(:/qss_icons/rc/checkbox_checked.png); 221 | } 222 | 223 | QMenu::indicator:non-exclusive:checked:selected { 224 | image: url(:/qss_icons/rc/checkbox_checked_disabled.png); 225 | } 226 | 227 | 228 | /* exclusive indicator = radio button style indicator (see QActionGroup::setExclusive) */ 229 | 230 | QMenu::indicator:exclusive:unchecked { 231 | image: url(:/qss_icons/rc/radio_unchecked.png); 232 | } 233 | 234 | QMenu::indicator:exclusive:unchecked:selected { 235 | image: url(:/qss_icons/rc/radio_unchecked_disabled.png); 236 | } 237 | 238 | QMenu::indicator:exclusive:checked { 239 | image: url(:/qss_icons/rc/radio_checked.png); 240 | } 241 | 242 | QMenu::indicator:exclusive:checked:selected { 243 | image: url(:/qss_icons/rc/radio_checked_disabled.png); 244 | } 245 | 246 | QMenu::right-arrow { 247 | margin: 5px; 248 | image: url(:/qss_icons/rc/right_arrow.png) 249 | } 250 | 251 | QWidget:disabled { 252 | color: #454545; 253 | background-color: #31363b; 254 | } 255 | 256 | QAbstractItemView { 257 | alternate-background-color: #31363b; 258 | color: #eff0f1; 259 | border: 1px solid #3A3939; 260 | border-radius: 2px; 261 | } 262 | 263 | QWidget:focus, 264 | QMenuBar:focus { 265 | border: 1px solid #3daee9; 266 | } 267 | 268 | QTabWidget:focus, 269 | QCheckBox:focus, 270 | QRadioButton:focus, 271 | QSlider:focus { 272 | border: none; 273 | } 274 | 275 | QLineEdit { 276 | background-color: #232629; 277 | padding: 5px; 278 | border-style: solid; 279 | border: 1px solid #76797C; 280 | border-radius: 2px; 281 | color: #eff0f1; 282 | } 283 | 284 | QAbstractItemView QLineEdit { 285 | padding: 0; 286 | } 287 | 288 | QGroupBox { 289 | border: 1px solid #76797C; 290 | border-radius: 2px; 291 | margin-top: 20px; 292 | } 293 | 294 | QGroupBox::title { 295 | subcontrol-origin: margin; 296 | subcontrol-position: top center; 297 | padding-left: 10px; 298 | padding-right: 10px; 299 | padding-top: 10px; 300 | } 301 | 302 | QAbstractScrollArea { 303 | border-radius: 2px; 304 | border: 1px solid #76797C; 305 | background-color: transparent; 306 | } 307 | 308 | QScrollBar:horizontal { 309 | height: 15px; 310 | margin: 3px 15px 3px 15px; 311 | border: 1px transparent #2A2929; 312 | border-radius: 4px; 313 | background-color: #2A2929; 314 | } 315 | 316 | QScrollBar::handle:horizontal { 317 | background-color: #605F5F; 318 | min-width: 5px; 319 | border-radius: 4px; 320 | } 321 | 322 | QScrollBar::add-line:horizontal { 323 | margin: 0px 3px 0px 3px; 324 | border-image: url(:/qss_icons/rc/right_arrow_disabled.png); 325 | width: 10px; 326 | height: 10px; 327 | subcontrol-position: right; 328 | subcontrol-origin: margin; 329 | } 330 | 331 | QScrollBar::sub-line:horizontal { 332 | margin: 0px 3px 0px 3px; 333 | border-image: url(:/qss_icons/rc/left_arrow_disabled.png); 334 | height: 10px; 335 | width: 10px; 336 | subcontrol-position: left; 337 | subcontrol-origin: margin; 338 | } 339 | 340 | QScrollBar::add-line:horizontal:hover, 341 | QScrollBar::add-line:horizontal:on { 342 | border-image: url(:/qss_icons/rc/right_arrow.png); 343 | height: 10px; 344 | width: 10px; 345 | subcontrol-position: right; 346 | subcontrol-origin: margin; 347 | } 348 | 349 | QScrollBar::sub-line:horizontal:hover, 350 | QScrollBar::sub-line:horizontal:on { 351 | border-image: url(:/qss_icons/rc/left_arrow.png); 352 | height: 10px; 353 | width: 10px; 354 | subcontrol-position: left; 355 | subcontrol-origin: margin; 356 | } 357 | 358 | QScrollBar::up-arrow:horizontal, 359 | QScrollBar::down-arrow:horizontal { 360 | background: none; 361 | } 362 | 363 | QScrollBar::add-page:horizontal, 364 | QScrollBar::sub-page:horizontal { 365 | background: none; 366 | } 367 | 368 | QScrollBar:vertical { 369 | background-color: #2A2929; 370 | width: 15px; 371 | margin: 15px 3px 15px 3px; 372 | border: 1px transparent #2A2929; 373 | border-radius: 4px; 374 | } 375 | 376 | QScrollBar::handle:vertical { 377 | background-color: #605F5F; 378 | min-height: 40px; 379 | border-radius: 4px; 380 | } 381 | 382 | QScrollBar::sub-line:vertical { 383 | margin: 3px 0px 3px 0px; 384 | border-image: url(:/qss_icons/rc/up_arrow_disabled.png); 385 | height: 10px; 386 | width: 10px; 387 | subcontrol-position: top; 388 | subcontrol-origin: margin; 389 | } 390 | 391 | QScrollBar::add-line:vertical { 392 | margin: 3px 0px 3px 0px; 393 | border-image: url(:/qss_icons/rc/down_arrow_disabled.png); 394 | height: 10px; 395 | width: 10px; 396 | subcontrol-position: bottom; 397 | subcontrol-origin: margin; 398 | } 399 | 400 | QScrollBar::sub-line:vertical:hover, 401 | QScrollBar::sub-line:vertical:on { 402 | border-image: url(:/qss_icons/rc/up_arrow.png); 403 | height: 10px; 404 | width: 10px; 405 | subcontrol-position: top; 406 | subcontrol-origin: margin; 407 | } 408 | 409 | QScrollBar::add-line:vertical:hover, 410 | QScrollBar::add-line:vertical:on { 411 | border-image: url(:/qss_icons/rc/down_arrow.png); 412 | height: 10px; 413 | width: 10px; 414 | subcontrol-position: bottom; 415 | subcontrol-origin: margin; 416 | } 417 | 418 | QScrollBar::up-arrow:vertical, 419 | QScrollBar::down-arrow:vertical { 420 | background: none; 421 | } 422 | 423 | QScrollBar::add-page:vertical, 424 | QScrollBar::sub-page:vertical { 425 | background: none; 426 | } 427 | 428 | QTextEdit { 429 | background-color: #232629; 430 | color: #eff0f1; 431 | border: 1px solid #76797C; 432 | } 433 | 434 | QPlainTextEdit { 435 | background-color: #232629; 436 | ; 437 | color: #eff0f1; 438 | border-radius: 2px; 439 | border: 1px solid #76797C; 440 | } 441 | 442 | QHeaderView::section { 443 | background-color: #76797C; 444 | color: #eff0f1; 445 | padding: 5px; 446 | border: 1px solid #76797C; 447 | } 448 | 449 | QSizeGrip { 450 | image: url(:/qss_icons/rc/sizegrip.png); 451 | width: 12px; 452 | height: 12px; 453 | } 454 | 455 | QMainWindow::separator { 456 | background-color: #31363b; 457 | color: white; 458 | padding-left: 4px; 459 | spacing: 2px; 460 | border: 1px dashed #76797C; 461 | } 462 | 463 | QMainWindow::separator:hover { 464 | background-color: #787876; 465 | color: white; 466 | padding-left: 4px; 467 | border: 1px solid #76797C; 468 | spacing: 2px; 469 | } 470 | 471 | QMenu::separator { 472 | height: 1px; 473 | background-color: #76797C; 474 | color: white; 475 | padding-left: 4px; 476 | margin-left: 10px; 477 | margin-right: 5px; 478 | } 479 | 480 | QFrame { 481 | border-radius: 2px; 482 | border: 1px solid #76797C; 483 | } 484 | 485 | QFrame[frameShape="0"] { 486 | border-radius: 2px; 487 | border: 1px transparent #76797C; 488 | } 489 | 490 | QStackedWidget { 491 | border: 1px transparent black; 492 | } 493 | 494 | QToolBar { 495 | border: 1px transparent #393838; 496 | background: 1px solid #31363b; 497 | font-weight: bold; 498 | } 499 | 500 | QToolBar::handle:horizontal { 501 | image: url(:/qss_icons/rc/Hmovetoolbar.png); 502 | } 503 | 504 | QToolBar::handle:vertical { 505 | image: url(:/qss_icons/rc/Vmovetoolbar.png); 506 | } 507 | 508 | QToolBar::separator:horizontal { 509 | image: url(:/qss_icons/rc/Hsepartoolbar.png); 510 | } 511 | 512 | QToolBar::separator:vertical { 513 | image: url(:/qss_icons/rc/Vsepartoolbar.png); 514 | } 515 | 516 | QToolButton#qt_toolbar_ext_button { 517 | background: #58595a 518 | } 519 | 520 | QPushButton { 521 | color: #eff0f1; 522 | background-color: #31363b; 523 | border-width: 0px; 524 | border-color: #76797C; 525 | border-style: solid; 526 | padding: 5px; 527 | border-radius: 2px; 528 | outline: none; 529 | } 530 | 531 | QPushButton:disabled { 532 | background-color: #31363b; 533 | border-width: 0px; 534 | border-color: #454545; 535 | border-style: solid; 536 | padding-top: 5px; 537 | padding-bottom: 5px; 538 | padding-left: 10px; 539 | padding-right: 10px; 540 | border-radius: 2px; 541 | color: #454545; 542 | } 543 | 544 | QPushButton:pressed { 545 | background-color: #3daee9; 546 | padding-top: -15px; 547 | padding-bottom: -17px; 548 | } 549 | 550 | QComboBox { 551 | selection-background-color: #3daee9; 552 | border-style: solid; 553 | border: 1px solid #76797C; 554 | border-radius: 2px; 555 | padding: 5px; 556 | } 557 | 558 | QPushButton:checked { 559 | background-color: #76797C; 560 | border-color: #6A6969; 561 | } 562 | 563 | QComboBox:hover, 564 | QPushButton:hover, 565 | QAbstractSpinBox:hover, 566 | QLineEdit:hover, 567 | QTextEdit:hover, 568 | QPlainTextEdit:hover, 569 | QAbstractView:hover, 570 | QTreeView:hover { 571 | border: 1px solid #3daee9; 572 | color: #eff0f1; 573 | } 574 | 575 | QComboBox:on { 576 | padding-top: 3px; 577 | padding-left: 4px; 578 | selection-background-color: #4a4a4a; 579 | } 580 | 581 | QComboBox QAbstractItemView { 582 | background-color: #232629; 583 | border-radius: 2px; 584 | border: 1px solid #76797C; 585 | selection-background-color: #18465d; 586 | } 587 | 588 | QComboBox::drop-down { 589 | subcontrol-origin: padding; 590 | subcontrol-position: top right; 591 | width: 15px; 592 | border-left-width: 0px; 593 | border-left-color: darkgray; 594 | border-left-style: solid; 595 | border-top-right-radius: 3px; 596 | border-bottom-right-radius: 3px; 597 | } 598 | 599 | QComboBox::down-arrow { 600 | image: url(:/pic/down_arrow_disabled.png); 601 | } 602 | 603 | QComboBox::down-arrow:on, 604 | QComboBox::down-arrow:hover, 605 | QComboBox::down-arrow:focus { 606 | image: url(:/pic/down_arrow.png); 607 | } 608 | 609 | QAbstractSpinBox { 610 | padding: 5px; 611 | border: 1px solid #76797C; 612 | background-color: #232629; 613 | color: #eff0f1; 614 | border-radius: 2px; 615 | min-width: 75px; 616 | } 617 | 618 | QAbstractSpinBox:up-button { 619 | background-color: transparent; 620 | subcontrol-origin: border; 621 | subcontrol-position: center right; 622 | } 623 | 624 | QAbstractSpinBox:down-button { 625 | background-color: transparent; 626 | subcontrol-origin: border; 627 | subcontrol-position: center left; 628 | } 629 | 630 | QAbstractSpinBox::up-arrow, 631 | QAbstractSpinBox::up-arrow:disabled, 632 | QAbstractSpinBox::up-arrow:off { 633 | image: url(:/qss_icons/rc/up_arrow_disabled.png); 634 | width: 10px; 635 | height: 10px; 636 | } 637 | 638 | QAbstractSpinBox::up-arrow:hover { 639 | image: url(:/qss_icons/rc/up_arrow.png); 640 | } 641 | 642 | QAbstractSpinBox::down-arrow, 643 | QAbstractSpinBox::down-arrow:disabled, 644 | QAbstractSpinBox::down-arrow:off { 645 | image: url(:/qss_icons/rc/down_arrow_disabled.png); 646 | width: 10px; 647 | height: 10px; 648 | } 649 | 650 | QAbstractSpinBox::down-arrow:hover { 651 | image: url(:/qss_icons/rc/down_arrow.png); 652 | } 653 | 654 | QLabel { 655 | border: 0px solid black; 656 | } 657 | 658 | QTabWidget { 659 | border: 0px transparent black; 660 | } 661 | 662 | QTabWidget::pane { 663 | border: 1px solid #76797C; 664 | padding: 5px; 665 | margin: 0px; 666 | } 667 | 668 | QTabWidget::tab-bar { 669 | /* left: 5px; move to the right by 5px */ 670 | } 671 | 672 | QTabBar { 673 | qproperty-drawBase: 0; 674 | border-radius: 3px; 675 | } 676 | 677 | QTabBar:focus { 678 | border: 0px transparent black; 679 | } 680 | 681 | QTabBar::close-button { 682 | image: url(:/qss_icons/rc/close.png); 683 | background: transparent; 684 | } 685 | 686 | QTabBar::close-button:hover { 687 | image: url(:/qss_icons/rc/close-hover.png); 688 | background: transparent; 689 | } 690 | 691 | QTabBar::close-button:pressed { 692 | image: url(:/qss_icons/rc/close-pressed.png); 693 | background: transparent; 694 | } 695 | 696 | 697 | /* TOP TABS */ 698 | 699 | QTabBar::tab:top { 700 | color: #eff0f1; 701 | border: 1px solid #76797C; 702 | border-bottom: 1px transparent black; 703 | background-color: #31363b; 704 | padding: 5px; 705 | min-width: 50px; 706 | border-top-left-radius: 2px; 707 | border-top-right-radius: 2px; 708 | } 709 | 710 | QTabBar::tab:top:selected { 711 | color: #eff0f1; 712 | background-color: #54575B; 713 | border: 1px solid #76797C; 714 | border-bottom: 2px solid #3daee9; 715 | border-top-left-radius: 2px; 716 | border-top-right-radius: 2px; 717 | } 718 | 719 | QTabBar::tab:top:!selected:hover { 720 | background-color: #3daee9; 721 | } 722 | 723 | 724 | /* BOTTOM TABS */ 725 | 726 | QTabBar::tab:bottom { 727 | color: #eff0f1; 728 | border: 1px solid #76797C; 729 | border-top: 1px transparent black; 730 | background-color: #31363b; 731 | padding: 5px; 732 | border-bottom-left-radius: 2px; 733 | border-bottom-right-radius: 2px; 734 | min-width: 50px; 735 | } 736 | 737 | QTabBar::tab:bottom:selected { 738 | color: #eff0f1; 739 | background-color: #54575B; 740 | border: 1px solid #76797C; 741 | border-top: 2px solid #3daee9; 742 | border-bottom-left-radius: 2px; 743 | border-bottom-right-radius: 2px; 744 | } 745 | 746 | QTabBar::tab:bottom:!selected:hover { 747 | background-color: #3daee9; 748 | } 749 | 750 | 751 | /* LEFT TABS */ 752 | 753 | QTabBar::tab:left { 754 | color: #eff0f1; 755 | border: 1px solid #76797C; 756 | border-left: 1px transparent black; 757 | background-color: #31363b; 758 | padding: 5px; 759 | border-top-right-radius: 2px; 760 | border-bottom-right-radius: 2px; 761 | min-height: 50px; 762 | } 763 | 764 | QTabBar::tab:left:selected { 765 | color: #eff0f1; 766 | background-color: #54575B; 767 | border: 1px solid #76797C; 768 | border-left: 2px solid #3daee9; 769 | border-top-right-radius: 2px; 770 | border-bottom-right-radius: 2px; 771 | } 772 | 773 | QTabBar::tab:left:!selected:hover { 774 | background-color: #3daee9; 775 | } 776 | 777 | 778 | /* RIGHT TABS */ 779 | 780 | QTabBar::tab:right { 781 | color: #eff0f1; 782 | border: 1px solid #76797C; 783 | border-right: 1px transparent black; 784 | background-color: #31363b; 785 | padding: 5px; 786 | border-top-left-radius: 2px; 787 | border-bottom-left-radius: 2px; 788 | min-height: 50px; 789 | } 790 | 791 | QTabBar::tab:right:selected { 792 | color: #eff0f1; 793 | background-color: #54575B; 794 | border: 1px solid #76797C; 795 | border-right: 2px solid #3daee9; 796 | border-top-left-radius: 2px; 797 | border-bottom-left-radius: 2px; 798 | } 799 | 800 | QTabBar::tab:right:!selected:hover { 801 | background-color: #3daee9; 802 | } 803 | 804 | QTabBar QToolButton::right-arrow:enabled { 805 | image: url(:/qss_icons/rc/right_arrow.png); 806 | } 807 | 808 | QTabBar QToolButton::left-arrow:enabled { 809 | image: url(:/qss_icons/rc/left_arrow.png); 810 | } 811 | 812 | QTabBar QToolButton::right-arrow:disabled { 813 | image: url(:/qss_icons/rc/right_arrow_disabled.png); 814 | } 815 | 816 | QTabBar QToolButton::left-arrow:disabled { 817 | image: url(:/qss_icons/rc/left_arrow_disabled.png); 818 | } 819 | 820 | QDockWidget { 821 | background: #31363b; 822 | border: 1px solid #403F3F; 823 | titlebar-close-icon: url(:/qss_icons/rc/close.png); 824 | titlebar-normal-icon: url(:/qss_icons/rc/undock.png); 825 | } 826 | 827 | QDockWidget::close-button, 828 | QDockWidget::float-button { 829 | border: 1px solid transparent; 830 | border-radius: 2px; 831 | background: transparent; 832 | } 833 | 834 | QDockWidget::close-button:hover, 835 | QDockWidget::float-button:hover { 836 | background: rgba(255, 255, 255, 10); 837 | } 838 | 839 | QDockWidget::close-button:pressed, 840 | QDockWidget::float-button:pressed { 841 | padding: 1px -1px -1px 1px; 842 | background: rgba(255, 255, 255, 10); 843 | } 844 | 845 | QTreeView, 846 | QListView { 847 | border: 1px solid #76797C; 848 | background-color: #232629; 849 | } 850 | 851 | QTreeView:branch:selected, 852 | QTreeView:branch:hover { 853 | background: url(:/qss_icons/rc/transparent.png); 854 | } 855 | 856 | QTreeView::branch:has-siblings:!adjoins-item { 857 | border-image: url(:/qss_icons/rc/transparent.png); 858 | } 859 | 860 | QTreeView::branch:has-siblings:adjoins-item { 861 | border-image: url(:/qss_icons/rc/transparent.png); 862 | } 863 | 864 | QTreeView::branch:!has-children:!has-siblings:adjoins-item { 865 | border-image: url(:/qss_icons/rc/transparent.png); 866 | } 867 | 868 | QTreeView::branch:has-children:!has-siblings:closed, 869 | QTreeView::branch:closed:has-children:has-siblings { 870 | image: url(:/qss_icons/rc/branch_closed.png); 871 | } 872 | 873 | QTreeView::branch:open:has-children:!has-siblings, 874 | QTreeView::branch:open:has-children:has-siblings { 875 | image: url(:/qss_icons/rc/branch_open.png); 876 | } 877 | 878 | QTreeView::branch:has-children:!has-siblings:closed:hover, 879 | QTreeView::branch:closed:has-children:has-siblings:hover { 880 | image: url(:/qss_icons/rc/branch_closed-on.png); 881 | } 882 | 883 | QTreeView::branch:open:has-children:!has-siblings:hover, 884 | QTreeView::branch:open:has-children:has-siblings:hover { 885 | image: url(:/qss_icons/rc/branch_open-on.png); 886 | } 887 | 888 | QListView::item:!selected:hover, 889 | QTreeView::item:!selected:hover { 890 | background: #18465d; 891 | outline: 0; 892 | color: #eff0f1 893 | } 894 | 895 | QListView::item:selected:hover, 896 | QTreeView::item:selected:hover { 897 | background: #287399; 898 | color: #eff0f1; 899 | } 900 | 901 | QTreeView::indicator:checked, 902 | QListView::indicator:checked { 903 | image: url(:/qss_icons/rc/checkbox_checked.png); 904 | } 905 | 906 | QTreeView::indicator:unchecked, 907 | QListView::indicator:unchecked { 908 | image: url(:/qss_icons/rc/checkbox_unchecked.png); 909 | } 910 | 911 | QTreeView::indicator:indeterminate, 912 | QListView::indicator:indeterminate { 913 | image: url(:/qss_icons/rc/checkbox_indeterminate.png); 914 | } 915 | 916 | QTreeView::indicator:checked:hover, 917 | QTreeView::indicator:checked:focus, 918 | QTreeView::indicator:checked:pressed, 919 | QListView::indicator:checked:hover, 920 | QListView::indicator:checked:focus, 921 | QListView::indicator:checked:pressed { 922 | image: url(:/qss_icons/rc/checkbox_checked_focus.png); 923 | } 924 | 925 | QTreeView::indicator:unchecked:hover, 926 | QTreeView::indicator:unchecked:focus, 927 | QTreeView::indicator:unchecked:pressed, 928 | QListView::indicator:unchecked:hover, 929 | QListView::indicator:unchecked:focus, 930 | QListView::indicator:unchecked:pressed { 931 | image: url(:/qss_icons/rc/checkbox_unchecked_focus.png); 932 | } 933 | 934 | QTreeView::indicator:indeterminate:hover, 935 | QTreeView::indicator:indeterminate:focus, 936 | QTreeView::indicator:indeterminate:pressed, 937 | QListView::indicator:indeterminate:hover, 938 | QListView::indicator:indeterminate:focus, 939 | QListView::indicator:indeterminate:pressed { 940 | image: url(:/qss_icons/rc/checkbox_indeterminate_focus.png); 941 | } 942 | 943 | QSlider::groove:horizontal { 944 | border: 1px solid #565a5e; 945 | height: 4px; 946 | background: #565a5e; 947 | margin: 0px; 948 | border-radius: 2px; 949 | } 950 | 951 | QSlider::handle:horizontal { 952 | background: #232629; 953 | border: 1px solid #565a5e; 954 | width: 16px; 955 | height: 16px; 956 | margin: -8px 0; 957 | border-radius: 9px; 958 | } 959 | 960 | QSlider::groove:vertical { 961 | border: 1px solid #565a5e; 962 | width: 4px; 963 | background: #565a5e; 964 | margin: 0px; 965 | border-radius: 3px; 966 | } 967 | 968 | QSlider::handle:vertical { 969 | background: #232629; 970 | border: 1px solid #565a5e; 971 | width: 16px; 972 | height: 16px; 973 | margin: 0 -8px; 974 | border-radius: 9px; 975 | } 976 | 977 | QToolButton { 978 | background-color: transparent; 979 | border: 1px transparent #76797C; 980 | border-radius: 2px; 981 | margin: 3px; 982 | padding: 5px; 983 | } 984 | 985 | QToolButton[popupMode="1"] { 986 | /* only for MenuButtonPopup */ 987 | padding-right: 20px; 988 | /* make way for the popup button */ 989 | border: 1px #76797C; 990 | border-radius: 5px; 991 | } 992 | 993 | QToolButton[popupMode="2"] { 994 | /* only for InstantPopup */ 995 | padding-right: 10px; 996 | /* make way for the popup button */ 997 | border: 1px #76797C; 998 | } 999 | 1000 | QToolButton:hover, 1001 | QToolButton::menu-button:hover { 1002 | background-color: transparent; 1003 | border: 1px solid #3daee9; 1004 | padding: 5px; 1005 | } 1006 | 1007 | QToolButton:checked, 1008 | QToolButton:pressed, 1009 | QToolButton::menu-button:pressed { 1010 | background-color: #3daee9; 1011 | border: 1px solid #3daee9; 1012 | padding: 5px; 1013 | } 1014 | 1015 | 1016 | /* the subcontrol below is used only in the InstantPopup or DelayedPopup mode */ 1017 | 1018 | QToolButton::menu-indicator { 1019 | image: url(:/qss_icons/rc/down_arrow.png); 1020 | top: -7px; 1021 | left: -2px; 1022 | /* shift it a bit */ 1023 | } 1024 | 1025 | 1026 | /* the subcontrols below are used only in the MenuButtonPopup mode */ 1027 | 1028 | QToolButton::menu-button { 1029 | border: 1px transparent #76797C; 1030 | border-top-right-radius: 6px; 1031 | border-bottom-right-radius: 6px; 1032 | /* 16px width + 4px for border = 20px allocated above */ 1033 | width: 16px; 1034 | outline: none; 1035 | } 1036 | 1037 | QToolButton::menu-arrow { 1038 | image: url(:/qss_icons/rc/down_arrow.png); 1039 | } 1040 | 1041 | QToolButton::menu-arrow:open { 1042 | border: 1px solid #76797C; 1043 | } 1044 | 1045 | QPushButton::menu-indicator { 1046 | subcontrol-origin: padding; 1047 | subcontrol-position: bottom right; 1048 | left: 8px; 1049 | } 1050 | 1051 | QTableView { 1052 | border: 1px solid #76797C; 1053 | gridline-color: #383f46; 1054 | background-color: #232629; 1055 | } 1056 | 1057 | QTableView, 1058 | QHeaderView { 1059 | border-radius: 0px; 1060 | } 1061 | 1062 | QTableView::item:pressed, 1063 | QListView::item:pressed, 1064 | QTreeView::item:pressed { 1065 | background: #18465d; 1066 | color: #eff0f1; 1067 | } 1068 | 1069 | QTableView::item:selected:active, 1070 | QTreeView::item:selected:active, 1071 | QListView::item:selected:active { 1072 | background: #287399; 1073 | color: #eff0f1; 1074 | } 1075 | 1076 | QHeaderView { 1077 | background-color: #31363b; 1078 | border: 1px transparent; 1079 | border-radius: 0px; 1080 | margin: 0px; 1081 | padding: 0px; 1082 | } 1083 | 1084 | QHeaderView::section { 1085 | background-color: #31363b; 1086 | color: #eff0f1; 1087 | padding: 5px; 1088 | border: 1px solid #76797C; 1089 | border-radius: 0px; 1090 | text-align: center; 1091 | } 1092 | 1093 | QHeaderView::section::vertical::first, 1094 | QHeaderView::section::vertical::only-one { 1095 | border-top: 1px solid #76797C; 1096 | } 1097 | 1098 | QHeaderView::section::vertical { 1099 | border-top: transparent; 1100 | } 1101 | 1102 | QHeaderView::section::horizontal::first, 1103 | QHeaderView::section::horizontal::only-one { 1104 | border-left: 1px solid #76797C; 1105 | } 1106 | 1107 | QHeaderView::section::horizontal { 1108 | border-left: transparent; 1109 | } 1110 | 1111 | QHeaderView::section:checked { 1112 | color: white; 1113 | background-color: #334e5e; 1114 | } 1115 | 1116 | 1117 | /* style the sort indicator */ 1118 | 1119 | QHeaderView::down-arrow { 1120 | image: url(:/qss_icons/rc/down_arrow.png); 1121 | } 1122 | 1123 | QHeaderView::up-arrow { 1124 | image: url(:/qss_icons/rc/up_arrow.png); 1125 | } 1126 | 1127 | QTableCornerButton::section { 1128 | background-color: #31363b; 1129 | border: 1px transparent #76797C; 1130 | border-radius: 0px; 1131 | } 1132 | 1133 | QToolBox { 1134 | padding: 5px; 1135 | border: 1px transparent black; 1136 | } 1137 | 1138 | QToolBox::tab { 1139 | color: #eff0f1; 1140 | background-color: #31363b; 1141 | border: 1px solid #76797C; 1142 | border-bottom: 1px transparent #31363b; 1143 | border-top-left-radius: 5px; 1144 | border-top-right-radius: 5px; 1145 | } 1146 | 1147 | QToolBox::tab:selected { 1148 | /* italicize selected tabs */ 1149 | font: italic; 1150 | background-color: #31363b; 1151 | border-color: #3daee9; 1152 | } 1153 | 1154 | QStatusBar::item { 1155 | border: 0px transparent dark; 1156 | } 1157 | 1158 | QFrame[height="3"], 1159 | QFrame[width="3"] { 1160 | background-color: #76797C; 1161 | } 1162 | 1163 | QSplitter::handle { 1164 | border: 1px dashed #76797C; 1165 | } 1166 | 1167 | QSplitter::handle:hover { 1168 | background-color: #787876; 1169 | border: 1px solid #76797C; 1170 | } 1171 | 1172 | QSplitter::handle:horizontal { 1173 | width: 1px; 1174 | } 1175 | 1176 | QSplitter::handle:vertical { 1177 | height: 1px; 1178 | } 1179 | 1180 | QProgressBar { 1181 | border: 1px solid #76797C; 1182 | border-radius: 5px; 1183 | text-align: center; 1184 | } 1185 | 1186 | QProgressBar::chunk { 1187 | background-color: #05B8CC; 1188 | } 1189 | 1190 | QDateEdit { 1191 | selection-background-color: #3daee9; 1192 | border-style: solid; 1193 | border: 1px solid #3375A3; 1194 | border-radius: 2px; 1195 | padding: 1px; 1196 | min-width: 75px; 1197 | } 1198 | 1199 | QDateEdit:on { 1200 | padding-top: 3px; 1201 | padding-left: 4px; 1202 | selection-background-color: #4a4a4a; 1203 | } 1204 | 1205 | QDateEdit QAbstractItemView { 1206 | background-color: #232629; 1207 | border-radius: 2px; 1208 | border: 1px solid #3375A3; 1209 | selection-background-color: #3daee9; 1210 | } 1211 | 1212 | QDateEdit::drop-down { 1213 | subcontrol-origin: padding; 1214 | subcontrol-position: top right; 1215 | width: 15px; 1216 | border-left-width: 0px; 1217 | border-left-color: darkgray; 1218 | border-left-style: solid; 1219 | border-top-right-radius: 3px; 1220 | border-bottom-right-radius: 3px; 1221 | } 1222 | 1223 | QDateEdit::down-arrow { 1224 | image: url(:/qss_icons/rc/down_arrow_disabled.png); 1225 | } 1226 | 1227 | QDateEdit::down-arrow:on, 1228 | QDateEdit::down-arrow:hover, 1229 | QDateEdit::down-arrow:focus { 1230 | image: url(:/qss_icons/rc/down_arrow.png); 1231 | }""" -------------------------------------------------------------------------------- /test/1_get_hero/hero.py: -------------------------------------------------------------------------------- 1 | import source 2 | import os 3 | 4 | hero_eng_name = ['group4/1BoBi.png', 'group4/1ELuoYi.png', 'group4/1EZ.png', 'group4/1GaiLun.png', 'group4/1KaMiEr.png', 5 | 'group4/1KaPai.png', 'group4/1KaSaDing.png', 'group4/1LaoShu.png', 'group4/1LianJin.png', 6 | 'group4/1NanQiang.png', 'group4/1NuoShou.png', 'group4/1NvJing.png', 'group4/1ZhaDanRen.png', 7 | 'group4/2DaZui.png', 'group4/2JieLa.png', 'group4/2JiLan.png', 'group4/2JiQiRen.png', 8 | 'group4/2JuMo.png', 'group4/2KaTe.png', 'group4/2KuiYin.png', 'group4/2LangRen.png', 9 | 'group4/2TaiLong.png', 'group4/2Wei.png', 'group4/2WuYa.png', 'group4/2XiaoPao.png', 10 | 'group4/3AiKe.png', 'group4/3BaoShi.png', 'group4/3ChuangZhang.png', 'group4/3DaChongZi.png', 11 | 'group4/3DaTou.png', 'group4/3LeiOuNa.png', 'group4/3LiSangZhuo.png', 'group4/3LuLu.png', 12 | 'group4/3MaErZhaHa.png', 'group4/3NvQiang.png', 'group4/3ShaMiLa.png', 'group4/3WeiGuSi.png', 13 | 'group4/3XiaoChou.png', 'group4/3ZhaKe.png', 'group4/4BuLong.png', 'group4/4EJiaTe.png', 14 | 'group4/4FaTiao.png', 'group4/4FengNv.png', 'group4/4JianJi.png', 'group4/4Jing.png', 15 | 'group4/4LaKeSi.png', 'group4/4MengDuo.png', 'group4/4SaiEn.png', 'group4/4SaLeFenNi.png', 16 | 'group4/4YongEn.png', 'group4/5AKaLi.png', 'group4/5JiaLiAo.png', 'group4/5JinKeSi.png', 17 | 'group4/5KaSha.png', 'group4/5WeiKeTuo.png'] 18 | 19 | hero_chi_name = [ 20 | '1波比', '1俄洛伊', '1EZ', '1盖伦', '1卡尔玛', '1卡牌', '1卡萨丁', '1老鼠', '1炼金', '1男枪', '1诺手', '1女警', '1炸弹人', 21 | 22 | '2大嘴', '2婕拉', '2基兰', '2机器人', '2巨魔', '2卡特', '2奎因', '2狼人', '2泰隆', '2蔚', '2乌鸦', '2小炮', 23 | 24 | '3艾克', '3宝石', '3船长', '3大虫子', '3大头', '3蕾欧娜', '3丽桑卓', '3露露', '3马尔扎哈', '3女枪', '3莎弥拉', '3薇古丝', '3小丑', '3扎克', 25 | 26 | '4布隆', '4厄加特', '4发条', '4风女', '4剑姬', '4烬', '4拉克丝', '4蒙多', '4塞恩', '4萨勒芬妮', '4永恩', 27 | 28 | '5阿卡丽', '5加里奥', '5金克斯', '5卡莎', '5维克托' 29 | ] 30 | 31 | 32 | def getGroup4(): 33 | file_list = os.listdir('C:/Projects/PythonProjects/noBB/asset/group4') 34 | list = [] 35 | for file in file_list: 36 | file = 'group4/' + file 37 | list.append(file) 38 | print(list) 39 | 40 | 41 | def get_hero_map(): 42 | fo = open('source_hero_map.py', 'w', encoding='utf8') 43 | fo.write('hero_map = {\n') 44 | for i, j in zip(hero_chi_name, hero_eng_name): 45 | fo.write("\t\"{}\": \"{}\",\n".format(i, j)) 46 | fo.write("}\n") 47 | 48 | 49 | getGroup4() 50 | get_hero_map() 51 | -------------------------------------------------------------------------------- /test/1_get_hero/source_hero_map.py: -------------------------------------------------------------------------------- 1 | hero_map = { 2 | "1波比": "group4/1BoBi.png", 3 | "1俄洛伊": "group4/1ELuoYi.png", 4 | "1EZ": "group4/1EZ.png", 5 | "1盖伦": "group4/1GaiLun.png", 6 | "1卡尔玛": "group4/1KaMiEr.png", 7 | "1卡牌": "group4/1KaPai.png", 8 | "1卡萨丁": "group4/1KaSaDing.png", 9 | "1老鼠": "group4/1LaoShu.png", 10 | "1炼金": "group4/1LianJin.png", 11 | "1男枪": "group4/1NanQiang.png", 12 | "1诺手": "group4/1NuoShou.png", 13 | "1女警": "group4/1NvJing.png", 14 | "1炸弹人": "group4/1ZhaDanRen.png", 15 | "2大嘴": "group4/2DaZui.png", 16 | "2婕拉": "group4/2JieLa.png", 17 | "2基兰": "group4/2JiLan.png", 18 | "2机器人": "group4/2JiQiRen.png", 19 | "2巨魔": "group4/2JuMo.png", 20 | "2卡特": "group4/2KaTe.png", 21 | "2奎因": "group4/2KuiYin.png", 22 | "2狼人": "group4/2LangRen.png", 23 | "2泰隆": "group4/2TaiLong.png", 24 | "2蔚": "group4/2Wei.png", 25 | "2乌鸦": "group4/2WuYa.png", 26 | "2小炮": "group4/2XiaoPao.png", 27 | "3艾克": "group4/3AiKe.png", 28 | "3宝石": "group4/3BaoShi.png", 29 | "3船长": "group4/3ChuangZhang.png", 30 | "3大虫子": "group4/3DaChongZi.png", 31 | "3大头": "group4/3DaTou.png", 32 | "3蕾欧娜": "group4/3LeiOuNa.png", 33 | "3丽桑卓": "group4/3LiSangZhuo.png", 34 | "3露露": "group4/3LuLu.png", 35 | "3马尔扎哈": "group4/3MaErZhaHa.png", 36 | "3女枪": "group4/3NvQiang.png", 37 | "3莎弥拉": "group4/3ShaMiLa.png", 38 | "3薇古丝": "group4/3WeiGuSi.png", 39 | "3小丑": "group4/3XiaoChou.png", 40 | "3扎克": "group4/3ZhaKe.png", 41 | "4布隆": "group4/4BuLong.png", 42 | "4厄加特": "group4/4EJiaTe.png", 43 | "4发条": "group4/4FaTiao.png", 44 | "4风女": "group4/4FengNv.png", 45 | "4剑姬": "group4/4JianJi.png", 46 | "4烬": "group4/4Jing.png", 47 | "4拉克丝": "group4/4LaKeSi.png", 48 | "4蒙多": "group4/4MengDuo.png", 49 | "4塞恩": "group4/4SaiEn.png", 50 | "4萨勒芬妮": "group4/4SaLeFenNi.png", 51 | "4永恩": "group4/4YongEn.png", 52 | "5阿卡丽": "group4/5AKaLi.png", 53 | "5加里奥": "group4/5JiaLiAo.png", 54 | "5金克斯": "group4/5JinKeSi.png", 55 | "5卡莎": "group4/5KaSha.png", 56 | "5维克托": "group4/5WeiKeTuo.png", 57 | } 58 | -------------------------------------------------------------------------------- /test/2_change_group0_3_pic_name/main.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | def main (path): 4 | filename_list = os.listdir(path) 5 | """os.listdir(path) 扫描路径的文件,将文件名存入存入列表""" 6 | 7 | a = 0 8 | for i in filename_list: 9 | used_name = path + filename_list[a] 10 | new_name = path + "item" + str(a) + used_name[used_name.index('.'):] # 保留原后缀 11 | os.rename(used_name, new_name) 12 | print("文件\t%s\t重命名成功,\t新的文件名为\t%s" %(used_name, new_name)) 13 | a += 1 14 | 15 | if __name__=='__main__': 16 | for i in range(4): 17 | path = "C:/Projects/PythonProjects/noBB/asset/group" + str(i) + "/" # 目标路径 18 | main(path) -------------------------------------------------------------------------------- /test/3_get_pic_base64/create_pic_base64.py: -------------------------------------------------------------------------------- 1 | import os 2 | import base64 3 | 4 | ''' 5 | 将项目里asset文件夹里的内容全部转成base64码 6 | ''' 7 | 8 | BASE_PATH = 'C:/Projects/PythonProjects/noBB/' 9 | ASSET_PATH = 'asset/' 10 | ASSET_FOLDERS = ['', 'group0/', 'group1/', 'group2/', 'group3/', 'group4/', 'sys/'] 11 | file_list = [] 12 | 13 | 14 | def get_all_files(dir_path): 15 | file_list = [] 16 | folder_list = [] 17 | for root, dirs, files in os.walk(dir_path): 18 | 19 | # root 表示当前正在访问的文件夹路径 20 | # dirs 表示该文件夹下的子目录名list 21 | # files 表示该文件夹下的文件list 22 | 23 | # 遍历文件 24 | for f in files: 25 | print(os.path.join(root, f)) 26 | file_list.append(os.path.join(root, f).replace("\\", "/")) 27 | 28 | # 遍历所有的文件夹 29 | # for d in dirs: 30 | # print(os.path.join(root, d)) 31 | # folder_list.append(os.path.join(root, d)) 32 | 33 | return file_list 34 | 35 | 36 | 37 | def writePic(file_list): 38 | dirs = 'C:/Program Files/noBB/asset/' 39 | fo = open('C:/Projects/PythonProjects/noBB/test/3_get_pic_base64/asset_file_list.py', 'w') 40 | fo.write("ASSET_FILE_LIST = [\n") 41 | for file_name in file_list: 42 | file_path = file_name[len(BASE_PATH)+len(ASSET_PATH):] 43 | save_path = dirs + file_path 44 | # print(file_path, save_path) 45 | with open(file_name, "rb") as f: 46 | # b64encode是编码,b64decode是解码 47 | base64_data = base64.b64encode(f.read()) 48 | # print(base64_data) # 输出生成的base64码 49 | fo.write("\t(\"{}\", {}),\n".format(save_path, base64_data)) 50 | fo.write("]\n") 51 | fo.close() 52 | 53 | file_list = get_all_files(BASE_PATH+ASSET_PATH) 54 | # print(file_list) 55 | writePic(file_list) 56 | -------------------------------------------------------------------------------- /test/tmp/daibi.py: -------------------------------------------------------------------------------- 1 | import time 2 | import pyautogui as auto 3 | 4 | while True: 5 | auto.moveTo(1370, 370, duration=0.25) 6 | auto.dragTo(1370, 830, duration=0.25) 7 | 8 | auto.doubleClick(840, 480) 9 | time.sleep(3) 10 | 11 | auto.doubleClick(1048, 672) 12 | time.sleep(3) 13 | 14 | auto.doubleClick(1048, 835) 15 | time.sleep(3) 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /test/tmp/get_temp_link_code/config.ini: -------------------------------------------------------------------------------- 1 | [SETUP] 2 | GROUP_VALUE=0 3 | FFTURN_VALUE=0 4 | HERO1_VALUE=0 5 | HERO2_VALUE=0 6 | HERO3_VALUE=0 7 | HERO4_VALUE=0 8 | HERO5_VALUE=0 9 | HERO6_VALUE=0 10 | HERO7_VALUE=0 11 | HERO8_VALUE=0 12 | TEMPLINKCODE_VALUE=1234567890abcdef -------------------------------------------------------------------------------- /test/tmp/get_temp_link_code/get_temp_link_code.py: -------------------------------------------------------------------------------- 1 | 2 | 3 | config_path = './config.ini' 4 | 5 | f = open(config_path, 'r') 6 | lines = f.readlines() 7 | f.close() 8 | 9 | print(lines[-1][19:]) 10 | print('---') -------------------------------------------------------------------------------- /test/tmp/logs/fansile.py: -------------------------------------------------------------------------------- 1 | import requests 2 | import time 3 | 4 | while True: 5 | params = {} 6 | headers = {} 7 | url = 'http://42.192.50.232:8002/fansile' 8 | requests.request('get', url, json=params, headers=headers) 9 | time.sleep(60*60) -------------------------------------------------------------------------------- /test/tmp/logs/loginAPI.py: -------------------------------------------------------------------------------- 1 | # -*- coding:UTF-8 -*- 2 | 3 | import requests 4 | import time 5 | 6 | # from jsonpath import jsonpath 7 | 8 | ''' 9 | 1: ok, 可以使用 10 | -4: code过期 11 | -3: code在线数量上限 12 | -2: code不存在 13 | -1: 网络连接失败 14 | ''' 15 | 16 | 17 | class noBBLogin(object): 18 | def __init__(self, url, cdkey_code, cdkeylog_temp_link_code): 19 | self.url = url 20 | self.cdkey_code = cdkey_code 21 | self.cdkey_id = 0 22 | self.cdkeylog_temp_link_code = cdkeylog_temp_link_code 23 | self.cdkeylog_id = 0 24 | self.update_flag = 1 25 | self.log_params = { 26 | "cdkey_id": self.cdkey_id, 27 | "login_time": self.get_current_time(), 28 | "logout_time": self.get_current_time(), 29 | "temp_link_code": self.cdkeylog_temp_link_code, 30 | "status": 0, 31 | } 32 | 33 | def login(self): 34 | print("#-----start login--------#") 35 | self.update_flag = 0 36 | status_code, cdkey = self.get_cdkeys(cdkey_code=self.cdkey_code) 37 | # 确认网络连接 38 | if status_code == -1 or status_code != 200: 39 | return -1 40 | 41 | # 检查验证码是否存在 42 | if cdkey is []: 43 | return -2 44 | 45 | cdkey = cdkey[0] 46 | self.cdkey_id = cdkey['id'] 47 | # print(cdkey) 48 | # 检查是否达到同时在线人数上限 49 | if cdkey['available_nums'] == cdkey['online_nums']: 50 | return -3 51 | 52 | # 检查验证码是否过期 53 | status_code = self.check_time(cdkey['expire_time']) 54 | if status_code == -1 or status_code == -4: 55 | return status_code 56 | 57 | # put 58 | params = cdkey 59 | params['online_nums'] = params['online_nums'] + 1 60 | status_code, cdkey = self.put_cdkeys(params) 61 | if status_code == -1 or status_code != 200: 62 | return -1 63 | 64 | # post logs 65 | self.log_params['cdkey_id'] = self.cdkey_id 66 | status_code, cdkey = self.post_cdkeylogs(self.log_params) 67 | if status_code == -1 or status_code != 201: 68 | return -1 69 | # print(status_code) 70 | self.cdkeylog_id = cdkey['id'] 71 | self.log_params['id'] = self.cdkeylog_id 72 | 73 | return 1 74 | 75 | def heart_beat(self): 76 | print("#-----start heart_beat--------#") 77 | # status_code, cdkeylog = self.get_cdkeylogs(cdkeylog_id=self.cdkeylog_id) 78 | # if status_code == -1 or status_code != 200: 79 | # return -1 80 | 81 | self.log_params["logout_time"] = self.get_current_time() 82 | status_code, cdkey = self.put_cdkeylogs(self.log_params) 83 | if status_code == -1 or status_code != 200: 84 | return -1 85 | 86 | return 1 87 | 88 | def logout(self): 89 | print("#-----start logout--------#") 90 | self.update_flag = 1 91 | status_code, cdkey = self.get_cdkeys(cdkey_id=self.cdkey_id) 92 | if status_code == -1 or status_code != 200: 93 | return -1 94 | 95 | params = cdkey 96 | params['online_nums'] = max(0, params['online_nums'] - 1) 97 | status_code, cdkey = self.put_cdkeys(params) 98 | if status_code == -1 or status_code != 200: 99 | return -1 100 | 101 | # status_code, cdkeylog = self.get_cdkeylogs(cdkeylog_id=self.cdkeylog_id) 102 | # if status_code == -1 or status_code != 200: 103 | # return -1 104 | 105 | # params = cdkeylog 106 | self.log_params["logout_time"] = self.get_current_time() 107 | self.log_params["status"] = 1 108 | status_code, cdkey = self.put_cdkeylogs(self.log_params) 109 | if status_code == -1 or status_code != 200: 110 | return -1 111 | 112 | return 1 113 | 114 | def get_cdkeys(self, cdkey_code=None, cdkey_id=None): 115 | params = {} 116 | headers = {} 117 | if cdkey_code is not None: 118 | url = self.url + 'cdkeys/?format=json&code=' + cdkey_code 119 | try: 120 | res = requests.request('get', url, json=params, headers=headers) 121 | # print('> get_cdkeys by code: ', res.json()) 122 | return res.status_code, res.json() 123 | except: 124 | return -1, [] 125 | elif cdkey_id is not None: 126 | url = self.url + 'cdkeys/' + str(cdkey_id) + '/?format=json' 127 | try: 128 | res = requests.request('get', url, json=params, headers=headers) 129 | # print('> get_cdkeys by id: ', res.json()) 130 | return res.status_code, res.json() 131 | except: 132 | return -1, [] 133 | else: 134 | url = self.url + 'cdkeys/?format=json' 135 | try: 136 | res = requests.request('get', url, json=params, headers=headers) 137 | # print('> get_cdkeys by id: ', res.json()) 138 | return res.status_code, res.json() 139 | except: 140 | return -1, [] 141 | 142 | def put_cdkeys(self, params=None): 143 | headers = {} 144 | url = self.url + 'cdkeys/' + str(params['id']) + '/' 145 | try: 146 | res = requests.request('put', url, json=params, headers=headers) 147 | # print('> put_cdkeys: ', res.json()) 148 | return res.status_code, res.json() 149 | except: 150 | return -1, [] 151 | 152 | def post_cdkeylogs(self, params): 153 | headers = {} 154 | url = self.url + 'cdkeylogs/' 155 | try: 156 | res = requests.request('post', url, json=params, headers=headers) 157 | # print('> post_cdkeylogs: ', res.json()) 158 | return res.status_code, res.json() 159 | except: 160 | return -1, [] 161 | 162 | def get_cdkeylogs(self, cdkeylog_id=None, param=None): 163 | if param is None: 164 | param = "" 165 | params = {} 166 | headers = {} 167 | if cdkeylog_id is not None: 168 | url = self.url + 'cdkeylogs/' + str(cdkeylog_id) + '/?format=json' 169 | try: 170 | res = requests.request('get', url, json=params, headers=headers) 171 | # print('> get_cdkeylogs: ', res.json()) 172 | return res.status_code, res.json() 173 | except: 174 | return -1, [] 175 | else: 176 | url = self.url + 'cdkeylogs/' + param + '&format=json' 177 | try: 178 | res = requests.request('get', url, json=params, headers=headers) 179 | # print('> get_cdkeylogs: ', res.json()) 180 | return res.status_code, res.json() 181 | except: 182 | return -1, [] 183 | 184 | def put_cdkeylogs(self, params=None): 185 | headers = {} 186 | url = self.url + 'cdkeylogs/' + str(params['id']) + '/' 187 | try: 188 | res = requests.request('put', url, json=params, headers=headers) 189 | # print('> put_cdkeylogs: ', res.json()) 190 | return res.status_code, res.json() 191 | except: 192 | return -1, [] 193 | 194 | def get_beijin_time(self): 195 | """ 196 | 联网获取北京时间 197 | :return: 北京时间时间戳 198 | """ 199 | try: 200 | # 设置头信息,没有访问会错误400!!! 201 | hea = {"User-Agent": "Mozilla/5.0"} 202 | # 设置访问地址,我们分析到的; 203 | url = r"http://time1909.beijing-time.org/time.asp" 204 | # 用requests get这个地址,带头信息的; 205 | r = requests.get(url=url, headers=hea) 206 | # 检查返回的通讯代码,200是正确返回; 207 | if r.status_code == 200: 208 | # 定义result变量存放返回的信息源码; 209 | result = r.text 210 | # self.go_text("> 当前时间为" + str(result)) 211 | # 通过;分割文本; 212 | data = result.split(";") 213 | # self.go_text("> 当前时间为" + str(data)) 214 | # ====================================================== 215 | # 以下是数据文本处理:切割、取长度,最最基础的东西就不描述了; 216 | year = data[1][len("nyear") + 3: len(data[1])] 217 | month = data[2][len("nmonth") + 3: len(data[2])] 218 | day = data[3][len("nday") + 3: len(data[3])] 219 | # wday = data[4][len("nwday")+1 : len(data[4])-1] 220 | hrs = data[5][len("nhrs") + 3: len(data[5])] 221 | minute = data[6][len("nmin") + 3: len(data[6])] 222 | sec = data[7][len("nsec") + 3: len(data[7])] 223 | # ====================================================== 224 | # 这个也简单把切割好的变量拼到beijinTimeStr变量里; 225 | beijin_time_str = "%s/%s/%s %s:%s:%s" % (year, month, day, hrs, minute, sec) 226 | # 把时间打印出来看看; 227 | # print(beijin_time_str) 228 | # self.go_text("> 当前时间为" + str(beijin_time_str)) 229 | # 将beijinTimeStr转为时间戳格式; 230 | beijin_time = time.mktime(time.strptime(beijin_time_str, "%Y/%m/%d %X")) 231 | # 返回时间戳; 232 | return beijin_time 233 | except: 234 | return -1 235 | 236 | @staticmethod 237 | def RCF3339_to_mktime(RCF3339_time): 238 | year = RCF3339_time[0:4] 239 | month = RCF3339_time[5:7] 240 | day = RCF3339_time[8:10] 241 | hrs = RCF3339_time[11:13] 242 | minute = RCF3339_time[14:16] 243 | sec = RCF3339_time[17:19] 244 | mktime_time = "%s/%s/%s %s:%s:%s" % (year, month, day, hrs, minute, sec) 245 | mktime_time = time.mktime(time.strptime(mktime_time, "%Y/%m/%d %X")) 246 | return mktime_time 247 | 248 | def check_time(self, expire_time): 249 | beijin_time = self.get_beijin_time() 250 | if beijin_time == -1: 251 | return -1 252 | # print("北京时间:", beijin_time) 253 | # print("过期时间", expire_time) 254 | expire_time = self.RCF3339_to_mktime(expire_time) 255 | # print("过期时间", expire_time) 256 | if beijin_time > expire_time: 257 | return -4 258 | return 1 259 | 260 | @staticmethod 261 | def get_current_time(): 262 | strtime = time.strftime('%Y-%m-%dT%H:%M:%S+08:00', time.localtime()) 263 | return strtime 264 | 265 | 266 | # vipTime = '2020-11-30 10:00:00' 267 | # 检查脚本是否过期 268 | # isVIP = self.check_vip(vipTime) 269 | # if isVIP == -1: 270 | # self.stop() 271 | # return 272 | # 273 | # def check_vip(self, TIME): 274 | # """ 275 | # 检查脚本是否过期 276 | # :param TIME: string类型 格式 'YYYY-MM-DD hh:mm:ss' 277 | # :return: -1表示过期, 1表示没过期 278 | # """ 279 | # beijinTime = self.get_beijin_time() 280 | # if beijinTime == -1: 281 | # # print("请连接网络") 282 | # self.go_text("$ 请连接网络") 283 | # return -1 284 | # # print(beijinTime) 285 | # vip = TIME 286 | # timeArray = time.strptime(vip, "%Y-%m-%d %H:%M:%S") 287 | # 288 | # timeStamp = int(time.mktime(timeArray)) 289 | # # print(timeStamp) 290 | # if (beijinTime > timeStamp): 291 | # # print("该脚本已过期,请联系QQ1489514329获取新脚本") 292 | # # time.sleep(10) 293 | # # exit() 294 | # self.go_text("$ 该脚本已过期,请加QQ群237967793获取最新脚本") 295 | # self.go_text("$ 或者从百度网盘链接:https://pan.baidu.com/s/1JeIKOCtov_RShm8eZpBirA 提取码:78oc 下载最新版本") 296 | # return -1 297 | # self.go_text("> 该脚本还在有效期内,马上开始脚本") 298 | # return 1 299 | 300 | if __name__ == "__main__": 301 | 302 | # cdkey_code = input() 303 | login_check = noBBLogin('cccccccccchy_1', "xxx") 304 | # login_check.post_cdkeylogs(6, 'ttt') 305 | # print(login_check.login()) 306 | # time.sleep(10) 307 | # print(login_check.logout()) 308 | # login_check = noBBLogin('cccccccccchy_4') 309 | print(login_check.get_current_time()) 310 | print(time.time()) 311 | print(login_check.RCF3339_to_mktime(login_check.get_current_time())) 312 | 313 | -------------------------------------------------------------------------------- /test/tmp/logs/set_status.py: -------------------------------------------------------------------------------- 1 | # -*- coding:UTF-8 -*- 2 | 3 | import loginAPI 4 | import time 5 | 6 | 7 | if __name__ == "__main__": 8 | login_check = loginAPI.noBBLogin('http://42.192.50.232/api/', 'xxx', "xxx") 9 | 10 | status_code, cdkeylogs = login_check.get_cdkeylogs(param="?status=0") 11 | with open('./status0logs.log', 'w') as f: 12 | f.write(str(cdkeylogs)) 13 | -------------------------------------------------------------------------------- /test/tmp/logs/set_status_v4.5.3.py: -------------------------------------------------------------------------------- 1 | # -*- coding:UTF-8 -*- 2 | 3 | import loginAPI 4 | import time 5 | 6 | if __name__ == "__main__": 7 | login_check = loginAPI.noBBLogin('http://42.192.50.232/api/', 'xxxxx', "test") 8 | # login_check = loginAPI.noBBLogin('http://127.0.0.1:8000/api/', 'xxx', "xxx") 9 | 10 | login_check.log_params = { 11 | "id": 9999999999999, 12 | "cdkey_id": 999, 13 | "login_time": login_check.get_current_time(), 14 | "logout_time": login_check.get_current_time(), 15 | "temp_link_code": "test", 16 | "status": 0, 17 | } 18 | status_code, cdkey = login_check.put_cdkeylogs(login_check.log_params) 19 | if status_code == -1 or status_code != 200: 20 | 21 | print(status_code, 'no') 22 | # time.sleep(60 * 60) 23 | -------------------------------------------------------------------------------- /test/tmp/test.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | #! /usr/bin/env python 3 | import time 4 | import pyautogui as auto 5 | import random 6 | import os 7 | import sys 8 | sys.path.append("..") 9 | import source 10 | import loginAPI 11 | 12 | 13 | class TEST(object): 14 | 15 | def __init__(self, group, ffturn, hero1, hero2, hero3, hero4, hero5, hero6, hero7, hero8, temp_link_code): 16 | self.DEBUG = source.DEBUG 17 | self.debug_time = 0 18 | self.BASE_PATH = source.BASE_PATH 19 | self.ASSET_PATH = source.ASSET_PATH 20 | self.restart_list = source.restart_list 21 | self.hero_map = source.hero_map_s4_5 22 | 23 | self.pic_inGame = source.pic_inGame 24 | self.all_pic_dead = source.all_pic_dead 25 | self.pic_one_star = source.pic_one_star 26 | self.pic_two_star = source.pic_two_star 27 | 28 | self.btn_start = source.btn_start 29 | self.btn_accept = source.btn_accept 30 | self.btn_ok = source.btn_ok 31 | self.btn_x = source.btn_x 32 | self.btn_ff_1 = source.btn_ff_1 33 | self.btn_ff_2 = source.btn_ff_2 34 | self.btn_ff_3 = source.btn_ff_3 35 | 36 | self.weapons = source.weapons 37 | self.chesses = source.chesses 38 | 39 | self.url = source.URL 40 | self.CDKEY = source.CDKEY 41 | self.temp_link_code = temp_link_code 42 | self.login_check = loginAPI.noBBLogin(self.url, self.CDKEY, self.temp_link_code) 43 | 44 | self.flag = 1 # 判断脚本是否允许 45 | self.TIMES = 0 # 判断当前是第几回合 46 | self.restart_times = 0 47 | self.INGAME = 0 # 判断当前是否在游戏中 48 | self.all_time = 0 # 上次心跳的时间 49 | self.f_time = 0 # 上次F的时间 50 | self.d_time = 0 # 上次D的时间 51 | self.z_time = 0 # 上次上装备的时间 52 | self.g_time = 0 # 判断当前游戏进行了多场时间了 53 | self.buy_time = 0 # 上次买牌的时间 54 | self.buy_flag_yes = 0 55 | self.buy_flag_no = 0 56 | self.walk_time = 0 # 上次买牌的时间 57 | self.switch_time = 0 58 | self._2_1 = 0 # 判断当前是否是2-1回合 59 | self.chess_idx = 0 60 | 61 | self.group = group # 判断是否固定阵容 62 | self.group_mode = 1 63 | if self.group == source.group_combox_list[0]: 64 | self.group_mode = 1 65 | if self.group == source.group_combox_list[1]: 66 | self.group_mode = 2 67 | if self.group == source.group_combox_list[2]: 68 | self.group_mode = 3 69 | if self.group == source.group_combox_list[3]: 70 | self.group_mode = 4 71 | if self.group == source.group_combox_list[4]: 72 | self.group_mode = 5 73 | if self.group == source.group_combox_list[5]: 74 | self.group = -2 75 | 76 | self.buy_bero_list_1 = [] 77 | for i in range(8): 78 | file_path = self.ASSET_PATH + "group0/item" + str(i) + ".png" 79 | self.buy_bero_list_1.append(file_path) 80 | self.buy_bero_list_2 = [] 81 | for i in range(8): 82 | file_path = self.ASSET_PATH + "group1/item" + str(i) + ".png" 83 | self.buy_bero_list_2.append(file_path) 84 | self.buy_bero_list_3 = [] 85 | for i in range(8): 86 | file_path = self.ASSET_PATH + "group2/item" + str(i) + ".png" 87 | self.buy_bero_list_3.append(file_path) 88 | self.buy_bero_list_4 = [] 89 | for i in range(8): 90 | file_path = self.ASSET_PATH + "group3/item" + str(i) + ".png" 91 | self.buy_bero_list_4.append(file_path) 92 | self.buy_bero_list_5 = [] 93 | self.buy_bero_list_5.append(self.ASSET_PATH + self.hero_map[hero1]) 94 | self.buy_bero_list_5.append(self.ASSET_PATH + self.hero_map[hero2]) 95 | self.buy_bero_list_5.append(self.ASSET_PATH + self.hero_map[hero3]) 96 | self.buy_bero_list_5.append(self.ASSET_PATH + self.hero_map[hero4]) 97 | self.buy_bero_list_5.append(self.ASSET_PATH + self.hero_map[hero5]) 98 | self.buy_bero_list_5.append(self.ASSET_PATH + self.hero_map[hero6]) 99 | self.buy_bero_list_5.append(self.ASSET_PATH + self.hero_map[hero7]) 100 | self.buy_bero_list_5.append(self.ASSET_PATH + self.hero_map[hero8]) 101 | 102 | self.buy_hero_list = { 103 | 1: self.buy_bero_list_1, 104 | 2: self.buy_bero_list_2, 105 | 3: self.buy_bero_list_3, 106 | 4: self.buy_bero_list_4, 107 | 5: self.buy_bero_list_5, 108 | } 109 | 110 | self.ffturn = ffturn # 判断投降回合 111 | self.FF_mode = 0 # 0 永不投降 1 前n投降 2 时间投降 112 | self.FF_1 = 0 113 | self.FF_2 = 0 114 | if self.ffturn == "永不投降": 115 | self.FF_mode = 0 116 | if self.ffturn == "前二投降": 117 | self.FF_mode = 1 118 | self.FF_1 = 2 119 | if self.ffturn == "前四投降": 120 | self.FF_mode = 1 121 | self.FF_1 = 4 122 | if self.ffturn == "前六投降": 123 | self.FF_mode = 1 124 | self.FF_1 = 6 125 | if self.ffturn == "10分钟投降": 126 | self.FF_mode = 2 127 | self.FF_2 = 10 128 | if self.ffturn == "11分钟投降": 129 | self.FF_mode = 2 130 | self.FF_2 = 11 131 | if self.ffturn == "12分钟投降": 132 | self.FF_mode = 2 133 | self.FF_2 = 12 134 | if self.ffturn == "13分钟投降": 135 | self.FF_mode = 2 136 | self.FF_2 = 13 137 | if self.ffturn == "14分钟投降": 138 | self.FF_mode = 2 139 | self.FF_2 = 14 140 | if self.ffturn == "15分钟投降": 141 | self.FF_mode = 2 142 | self.FF_2 = 15 143 | 144 | def check_pic(self, needleImage, region=None): 145 | """ 146 | 在当前屏幕region区域是否存在needleImage 147 | :param needleImage: 要求识别的图片 148 | :param region: (x1, y1, x2, y2)左上角的坐标和右下角的坐标 149 | :return: 点击的中心坐标 150 | """ 151 | 152 | if region is None: 153 | region = (0, 0, 1920, 1080) 154 | haystackImage = auto.screenshot( 155 | region=(region[0], region[1], region[2] - region[0], region[3] - region[1])) 156 | # haystackImage.save("assert/test"+needleImage[7]+".png") 157 | pic = auto.locate(needleImage, haystackImage, confidence=0.9) 158 | if pic is not None: 159 | pic = auto.center(pic) 160 | return [pic[0] + region[0], pic[1] + region[1]] 161 | 162 | return None 163 | 164 | def check_all_pic(self, needleImage, region=None): 165 | """ 166 | 在当前屏幕region区域是否存在needleImage 167 | :param needleImage: 要求识别的图片 168 | :param region: (x1, y1, x2, y2)左上角的坐标和右下角的坐标 169 | :return: list 包含所有的pic的位置 170 | """ 171 | 172 | if region is None: 173 | region = (0, 0, 1920, 1080) 174 | pics = list(auto.locateAllOnScreen(needleImage, 175 | region=(region[0], region[1], region[2] - region[0], region[3] - region[1]), 176 | confidence=0.99)) 177 | pic_list = [] 178 | for pic in pics: 179 | pic = auto.center(pic) 180 | pic_list.append((pic[0] + region[0], pic[1] + region[1])) 181 | return pic_list 182 | 183 | def in_game_switch(self): 184 | down_x = [460, 560, 670, 790, 900, 1000, 1110, 1220, 1330] 185 | down_y = 740 186 | # current_time = time.time() 187 | # if current_time - self.g_time < 5 * 60 or current_time - self.switch_time < 120: 188 | # return 189 | 190 | pic_two = self.check_pic(self.pic_two_star[0], region=self.pic_two_star[1]) 191 | pic_one = self.check_pic(self.pic_one_star[0], region=self.pic_one_star[1]) 192 | if pic_two is None or pic_one is None: 193 | return 194 | 195 | two_star_x, two_star_y = pic_two 196 | one_star_x, one_star_y = pic_one 197 | 198 | for i in down_x: 199 | if two_star_x < i: 200 | two_star_x = i 201 | two_star_y = down_y 202 | break 203 | 204 | one_star_x += 30 205 | one_star_y += 50 206 | 207 | 208 | 209 | print('一星位置 x={}, y={}'.format(one_star_x, one_star_y)) 210 | print('二星位置 x={}, y={}'.format(two_star_x, two_star_y)) 211 | 212 | 213 | if __name__ == "__main__": 214 | ts = TEST(0, 0, '1豹女', '1豹女', '1豹女', '1豹女', '1豹女', '1豹女', '1豹女', '1豹女', '0') 215 | time.sleep(5) 216 | ts.in_game_switch() --------------------------------------------------------------------------------