mirror of
https://github.com/TheFunny/ArisuAutoSweeper
synced 2026-02-06 19:45:14 +00:00
Compare commits
No commits in common. "1113094cf5c849f3d7493901ae824359e142d53d" and "61fa6ad28b712de6d56a0f83a002103255ae8b79" have entirely different histories.
1113094cf5
...
61fa6ad28b
31
README.en.md
31
README.en.md
@ -1,31 +0,0 @@
|
||||
<img width="150" height="150" align="left" style="float: left; margin: 0 10px 0 0;" alt="AAS icon" src="docs/resources/aas_icon.svg"/>
|
||||
|
||||
# ArisuAutoScript
|
||||
|
||||
**Blue Archive Automation Script**
|
||||
|
||||
**| English | [简体中文](README.md) |**
|
||||
|
||||
## Features
|
||||
|
||||
The script is still under active development. The following features have been implemented:
|
||||
|
||||
- [x] **Cafe** Claim rewards / Interact / Second cafe
|
||||
- [x] **Circle** Claim AP
|
||||
- [x] **Mailbox** Claim rewards
|
||||
- [x] **Tactical Challenge** Claim rewards / Auto battle
|
||||
|
||||
_Currently only supports JP server._
|
||||
|
||||
## Relative projects
|
||||
|
||||
- [AzurLaneAutoScript](https://github.com/LmeSzinc/AzurLaneAutoScript): Azur Lane auto script
|
||||
- [StarRailCopilot](https://github.com/LmeSzinc/StarRailCopilot): A bot for Honkai: Star Rail, based on the next
|
||||
generation of ALAS framework.
|
||||
|
||||
## Acknowledgements
|
||||
|
||||
Thanks to [6bir](https://github.com/6bir) for the icon design.
|
||||
|
||||
Thanks to [Alas](https://github.com/LmeSzinc/AzurLaneAutoScript) and [SRC](https://github.com/LmeSzinc/StarRailCopilot)
|
||||
for the development framework.
|
||||
30
README.md
30
README.md
@ -1,30 +0,0 @@
|
||||
<img width="150" height="150" align="left" style="float: left; margin: 0 10px 0 0;" alt="AAS icon" src="docs/resources/aas_icon.svg"/>
|
||||
|
||||
# ArisuAutoScript
|
||||
|
||||
**蔚蓝档案自动化脚本**
|
||||
|
||||
**| [English](README.en.md) | 简体中文 |**
|
||||
|
||||
## 功能
|
||||
|
||||
当前脚本还在活跃开发中,已经实现的功能有:
|
||||
|
||||
- [x] **咖啡厅** 领取奖励 / 互动 / 第二咖啡厅
|
||||
- [x] **公会** 领取体力
|
||||
- [x] **邮箱** 领取奖励
|
||||
- [x] **战术对抗战** 领取奖励 / 自动战斗
|
||||
|
||||
_目前仅支持日服。_
|
||||
|
||||
## 相关项目
|
||||
|
||||
- [AzurLaneAutoScript](https://github.com/LmeSzinc/AzurLaneAutoScript): 碧蓝航线自动化脚本
|
||||
- [StarRailCopilot](https://github.com/LmeSzinc/StarRailCopilot): 崩坏:星穹铁道脚本,基于下一代Alas框架
|
||||
|
||||
## 鸣谢
|
||||
|
||||
感谢 [6bir](https://github.com/6bir) 为本项目设计的图标。
|
||||
|
||||
感谢 [Alas](https://github.com/LmeSzinc/AzurLaneAutoScript) 以及 [SRC](https://github.com/LmeSzinc/StarRailCopilot)
|
||||
提供的开发框架。
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 5.4 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 7.6 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 5.2 KiB |
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 36 KiB |
@ -172,7 +172,7 @@ class Control(Hermit, Minitouch, Scrcpy, MaaTouch):
|
||||
self.click(ClickButton(button=area_offset(point_random, p2), name=name))
|
||||
|
||||
# just used in cafe
|
||||
def pinch(self, box=(35, 130, 1250, 560), name='PINCH'):
|
||||
def pinch(self, box=(33, 130, 1247, 569), name='PINCH'):
|
||||
self.handle_control_check(name)
|
||||
middle_point = (box[0] + box[2]) // 2, (box[1] + box[3]) // 2
|
||||
width = box[2] - middle_point[0]
|
||||
|
||||
@ -103,26 +103,6 @@ GOT_REWARD = ButtonWrapper(
|
||||
button=(561, 501, 718, 556),
|
||||
),
|
||||
)
|
||||
INVENTORY = ButtonWrapper(
|
||||
name='INVENTORY',
|
||||
jp=Button(
|
||||
file='./assets/jp/cafe/INVENTORY.png',
|
||||
area=(553, 94, 725, 122),
|
||||
search=(533, 74, 745, 142),
|
||||
color=(198, 205, 213),
|
||||
button=(1130, 94, 1156, 120),
|
||||
),
|
||||
)
|
||||
MOMOTALK_CLOSE = ButtonWrapper(
|
||||
name='MOMOTALK_CLOSE',
|
||||
jp=Button(
|
||||
file='./assets/jp/cafe/MOMOTALK_CLOSE.png',
|
||||
area=(824, 82, 850, 108),
|
||||
search=(804, 62, 870, 128),
|
||||
color=(252, 182, 194),
|
||||
button=(824, 82, 850, 108),
|
||||
),
|
||||
)
|
||||
OCR_CAFE = ButtonWrapper(
|
||||
name='OCR_CAFE',
|
||||
jp=Button(
|
||||
|
||||
@ -71,9 +71,7 @@ class Cafe(UI):
|
||||
return [point for point in zip(*loc[::-1])]
|
||||
|
||||
def _get_clickable_buttons(self, threshold=0.8, offset=(0, 0)):
|
||||
image = self.device.image
|
||||
h, w = image.shape[:2]
|
||||
cv2.rectangle(image, (0, 10), (w - 25, h - 10), (0, 0, 0), 50)
|
||||
image = cv2.copyMakeBorder(self.device.image, 20, 20, 10, 80, cv2.BORDER_CONSTANT, value=(0, 0, 0))
|
||||
image = self._extract_clickable_from_image(image)
|
||||
points = self._match_clickable_points(image, threshold)
|
||||
points = self.merge_points(points)
|
||||
@ -122,13 +120,6 @@ class Cafe(UI):
|
||||
logger.attr('Reward', num)
|
||||
return num
|
||||
|
||||
def _cafe_additional(self) -> bool:
|
||||
if self.appear_then_click(INVENTORY):
|
||||
return True
|
||||
if self.appear_then_click(MOMOTALK_CLOSE):
|
||||
return True
|
||||
return False
|
||||
|
||||
def _handle_cafe(self, status):
|
||||
match status:
|
||||
case CafeStatus.STUDENT_LIST:
|
||||
@ -215,7 +206,7 @@ class Cafe(UI):
|
||||
|
||||
self.device.screenshot()
|
||||
|
||||
if self.ui_additional() or self._cafe_additional():
|
||||
if self.ui_additional():
|
||||
continue
|
||||
|
||||
if not loading_timer.reached():
|
||||
|
||||
Loading…
Reference in New Issue
Block a user