mirror of
https://github.com/TheFunny/ArisuAutoSweeper
synced 2026-02-06 11:05:12 +00:00
Compare commits
5 Commits
61fa6ad28b
...
1113094cf5
| Author | SHA1 | Date | |
|---|---|---|---|
| 1113094cf5 | |||
| 60e6710181 | |||
| 9708ec05d7 | |||
| 77f0ded95f | |||
| 937a7c63e8 |
31
README.en.md
Normal file
31
README.en.md
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
<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
Normal file
30
README.md
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<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)
|
||||||
|
提供的开发框架。
|
||||||
BIN
assets/jp/cafe/INVENTORY.BUTTON.png
Normal file
BIN
assets/jp/cafe/INVENTORY.BUTTON.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.4 KiB |
BIN
assets/jp/cafe/INVENTORY.png
Normal file
BIN
assets/jp/cafe/INVENTORY.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.6 KiB |
BIN
assets/jp/cafe/MOMOTALK_CLOSE.png
Normal file
BIN
assets/jp/cafe/MOMOTALK_CLOSE.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.2 KiB |
7
docs/resources/aas_icon.svg
Normal file
7
docs/resources/aas_icon.svg
Normal file
File diff suppressed because one or more lines are too long
|
After 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))
|
self.click(ClickButton(button=area_offset(point_random, p2), name=name))
|
||||||
|
|
||||||
# just used in cafe
|
# just used in cafe
|
||||||
def pinch(self, box=(33, 130, 1247, 569), name='PINCH'):
|
def pinch(self, box=(35, 130, 1250, 560), name='PINCH'):
|
||||||
self.handle_control_check(name)
|
self.handle_control_check(name)
|
||||||
middle_point = (box[0] + box[2]) // 2, (box[1] + box[3]) // 2
|
middle_point = (box[0] + box[2]) // 2, (box[1] + box[3]) // 2
|
||||||
width = box[2] - middle_point[0]
|
width = box[2] - middle_point[0]
|
||||||
|
|||||||
@ -103,6 +103,26 @@ GOT_REWARD = ButtonWrapper(
|
|||||||
button=(561, 501, 718, 556),
|
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(
|
OCR_CAFE = ButtonWrapper(
|
||||||
name='OCR_CAFE',
|
name='OCR_CAFE',
|
||||||
jp=Button(
|
jp=Button(
|
||||||
|
|||||||
@ -71,7 +71,9 @@ class Cafe(UI):
|
|||||||
return [point for point in zip(*loc[::-1])]
|
return [point for point in zip(*loc[::-1])]
|
||||||
|
|
||||||
def _get_clickable_buttons(self, threshold=0.8, offset=(0, 0)):
|
def _get_clickable_buttons(self, threshold=0.8, offset=(0, 0)):
|
||||||
image = cv2.copyMakeBorder(self.device.image, 20, 20, 10, 80, cv2.BORDER_CONSTANT, value=(0, 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 = self._extract_clickable_from_image(image)
|
image = self._extract_clickable_from_image(image)
|
||||||
points = self._match_clickable_points(image, threshold)
|
points = self._match_clickable_points(image, threshold)
|
||||||
points = self.merge_points(points)
|
points = self.merge_points(points)
|
||||||
@ -120,6 +122,13 @@ class Cafe(UI):
|
|||||||
logger.attr('Reward', num)
|
logger.attr('Reward', num)
|
||||||
return 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):
|
def _handle_cafe(self, status):
|
||||||
match status:
|
match status:
|
||||||
case CafeStatus.STUDENT_LIST:
|
case CafeStatus.STUDENT_LIST:
|
||||||
@ -206,7 +215,7 @@ class Cafe(UI):
|
|||||||
|
|
||||||
self.device.screenshot()
|
self.device.screenshot()
|
||||||
|
|
||||||
if self.ui_additional():
|
if self.ui_additional() or self._cafe_additional():
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if not loading_timer.reached():
|
if not loading_timer.reached():
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user