Skip to content

Commit

Permalink
chore: 输出议价信息
Browse files Browse the repository at this point in the history
  • Loading branch information
Night-stars-1 committed May 31, 2024
1 parent 44cc452 commit 245a5c0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
3 changes: 2 additions & 1 deletion auto/run_business/buy.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Author: Night-stars-1 nujj1042633805@gmail.com
Date: 2024-04-04 17:54:58
LastEditTime: 2024-05-19 21:32:57
LastEditTime: 2024-05-31 20:10:25
LastEditors: Night-stars-1 nujj1042633805@gmail.com
"""

Expand Down Expand Up @@ -220,6 +220,7 @@ def click_bargain_button(num=0):
参数:
:param num: 议价次数
"""
logger.info(f"议价次数: {num}")
start = time.perf_counter()
while time.perf_counter() - start < 15:
if num <= 0:
Expand Down
3 changes: 1 addition & 2 deletions auto/run_business/main.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Author: Night-stars-1 nujj1042633805@gmail.com
Date: 2024-04-05 17:14:29
LastEditTime: 2024-05-21 02:13:27
LastEditTime: 2024-05-31 20:13:45
LastEditors: Night-stars-1 nujj1042633805@gmail.com
"""

Expand Down Expand Up @@ -61,7 +61,6 @@ def run(routes: RoutesModel):
if routes.city_data[0].sell_city_name == city_name:
routes.city_data = [routes.city_data[1], routes.city_data[0]]
for city in routes.city_data:
logger.info(list(city.goods_data.keys()))
if city.profit == 0:
logger.info("没有数据")
return False
Expand Down
5 changes: 3 additions & 2 deletions auto/run_business/sell.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Author: Night-stars-1 nujj1042633805@gmail.com
Date: 2024-04-05 15:17:19
LastEditTime: 2024-04-30 02:56:30
LastEditTime: 2024-05-31 20:50:51
LastEditors: Night-stars-1 nujj1042633805@gmail.com
"""

Expand Down Expand Up @@ -57,13 +57,14 @@ def click_bargain_button(num=0):
参数:
:param num: 议价次数
"""
logger.info(f"议价次数: {num}")
start = time.perf_counter()
while time.perf_counter() - start < 15:
if num <= 0:
return True
bgr = get_bgr(screenshot(), (1176, 461))
logger.debug(f"抬价界面颜色检查: {bgr}")
if BGRGroup([0, 170, 240], [2, 183, 253]) == bgr:
if BGRGroup([0, 170, 240], [2, 185, 253]) == bgr:
input_tap((1177, 461))
time.sleep(1.0)
elif bgr == [251, 253, 253]:
Expand Down
7 changes: 4 additions & 3 deletions core/presets/station.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,12 @@ def wait(self):
reach_bgrs = get_bgrs(
image, [(839, 354), (814, 359), (1051, 641), (658, 690)]
)
logger.debug(f"行车攻击检测: {attack_bgrs}")
logger.debug(f"行车检测: {reach_bgrs}")
if (
BGRGroup([8, 168, 234], [9, 171, 245]) == attack_bgrs[0]
and BGRGroup([8, 168, 234], [9, 171, 245]) == attack_bgrs[1]
and BGRGroup([8, 168, 234], [9, 171, 245]) == attack_bgrs[2]
BGRGroup([8, 168, 234], [10, 171, 245]) == attack_bgrs[0]
and BGRGroup([8, 168, 234], [10, 171, 245]) == attack_bgrs[1]
and BGRGroup([8, 168, 234], [10, 171, 245]) == attack_bgrs[2]
):
logger.info("检测到拦截,进行攻击")
self.join_wait_fight()
Expand Down

0 comments on commit 245a5c0

Please sign in to comment.