Skip to content

Commit

Permalink
fix group
Browse files Browse the repository at this point in the history
  • Loading branch information
pur1fying committed Jan 17, 2024
1 parent 1f25de3 commit c080a40
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 32 deletions.
Binary file removed img.png
Binary file not shown.
44 changes: 13 additions & 31 deletions module/group.py
Original file line number Diff line number Diff line change
@@ -1,36 +1,18 @@
from core import color, image
from core import picture


def implement(self):
self.quick_method_to_main_page()
if self.server == 'CN' or self.server == 'JP':
possible = {
'main_page_home-feature': (578, 648),
}
end = [
'group_sign-up-reward',
'group_menu',
]
res = image.detect(self, end, possible, skip_first_screenshot=True)
if res == 'group_sign-up-reward':
self.logger.info('get 10 AP')
elif self.server == "Global":
res = to_club(self)
if res == "club_attendance_reward":
self.logger.info("get 10 AP")
self.click(1236, 39, wait=False, count=2)
return True


def to_club(self):
click_pos = [
[562, 656]
rgb_possible = {'main_page': (578, 648)}
img_possible = {'main_page_home-feature': (578, 648)}
img_ends = [
'group_sign-up-reward',
'group_menu',
'group_join-club'
]
los = [
"main_page"
]
ends = [
"club",
"club_attendance_reward"
]
return color.common_rgb_detect_method(self, click_pos, los, ends, True)
res = picture.co_detect(self, None,rgb_possible, img_possible, img_ends,True)
if res == 'group_sign-up-reward':
self.logger.info('GET 10 AP')
elif res == 'group_join-club':
self.logger.warning('NOT in a club')
return True
Binary file added src/images/Global/group/join-club.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion src/images/Global/x_y_range/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
path = "group"
x_y_range = {
'menu': (107, 9, 256, 40),
'sign-up-reward': (445, 141, 829, 176)
'sign-up-reward': (445, 141, 829, 176),
'join-club': (107, 9, 256, 40),
}

0 comments on commit c080a40

Please sign in to comment.