Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/runhey/OnmyojiAutoScript
/ functions
Functions
1,281 in github.com/runhey/OnmyojiAutoScript
⨍
Functions
1,281
◇
Types & classes
410
↳
Endpoints
15
↓ 509 callers
Method
appear
:param target: 匹配的目标可以是RuleImage, 也可以是RuleOcr :param interval: :param threshold: :return:
tasks/base_task.py:109
↓ 469 callers
Method
screenshot
截图 引入中间函数的目的是 为了解决如协作的这类突发的事件 :return:
tasks/base_task.py:58
↓ 356 callers
Method
appear_then_click
出现了就点击,默认点击图片的位置,如果添加了click参数,就点击click的位置 :param duration: 如果是长按,可以手动指定duration,不指定默认.单位是ms!!!! :param action: 可以是RuleClick,
tasks/base_task.py:136
↓ 122 callers
Method
sleep
Args: second(int, float, tuple):
module/device/connection.py:640
↓ 97 callers
Method
ui_goto
Args: destination (Page): confirm_wait: skip_first_screenshot:
tasks/GameUi/game_ui.py:161
↓ 96 callers
Method
ui_get_current_page
获取当前页面 :param skip_first_screenshot: :return:
tasks/GameUi/game_ui.py:83
↓ 75 callers
Method
ocr
(self, image, keyword=None)
module/atom/ocr.py:29
↓ 74 callers
Method
click
点击或者长按 :param interval: :param click: :return:
tasks/base_task.py:286
↓ 71 callers
Function
print
(*objects: ConsoleRenderable, **kwargs)
module/logger.py:282
↓ 63 callers
Method
ui_click
(click, stop)
tasks/Delegation/script_task.py:47
↓ 58 callers
Method
link
(self, button, destination)
tasks/GameUi/page.py:27
↓ 55 callers
Method
reset
(self)
module/base/timer.py:128
↓ 53 callers
Method
start
(self)
module/base/timer.py:100
↓ 52 callers
Method
set_next_run
设置下次运行时间 当然这个也是可以重写的 :param target: 可以自定义的下次运行时间 :param server: True :param success: 判断是成功的还是失败的时间间隔 :param
tasks/base_task.py:426
↓ 46 callers
Method
reached
Returns: bool
module/base/timer.py:120
↓ 42 callers
Method
ui_click_until_disappear
点击一个按钮直到消失 :param click: :return:
tasks/base_task.py:510
↓ 39 callers
Method
run_general_battle
运行脚本 :return:
tasks/Component/GeneralBattle/general_battle.py:23
↓ 34 callers
Method
wait_until_appear
等待直到出现目标 :param wait_time: 等待时间,单位秒 :param target: :param skip_first_screenshot: :return:
tasks/base_task.py:171
↓ 31 callers
Method
coord
获取一个区域,随机返回一个坐标 :return:
module/atom/ocr.py:39
↓ 30 callers
Method
adb_shell
Equivalent to `adb -s <serial> shell <*cmd>` Args: cmd (list, str): stream (bool): Return stream instead of
module/device/connection.py:156
↓ 29 callers
Method
match
:param threshold: :param image: :return:
module/atom/image.py:104
↓ 27 callers
Method
get
Get an attribute from each grid. Args: attr: Attribute name. Returns: list:
module/map/map_grids.py:149
↓ 27 callers
Method
ocr_appear_click
ocr识别目标,如果目标存在,则触发动作 :param target: :param action: :param interval: :param duration: :return:
tasks/base_task.py:365
↓ 26 callers
Method
is_in_room
判断是否在房间里面 :return:
tasks/Component/GeneralInvite/general_invite.py:152
↓ 24 callers
Method
stuck_record_add
当你要设置这个时候检测为长时间的时候,你需要在这里添加 如果取消后,需要在`stuck_record_clear`中清除 :param button: :return:
module/device/device.py:103
↓ 22 callers
Method
execute
Args: command (str): allow_failure (bool): output(bool): Returns: bool: If success.
deploy/config.py:126
↓ 22 callers
Method
swipe
:param interval: :param swipe: :return:
tasks/base_task.py:256
↓ 20 callers
Method
click_record_clear
(self)
module/device/device.py:149
↓ 19 callers
Method
ui_reward_appear_click
如果出现 ‘获得奖励’ 就点击 :return:
tasks/base_task.py:446
↓ 18 callers
Function
del_cached_property
Delete a cached property safely. Args: obj: name (str):
module/base/decorator.py:106
↓ 18 callers
Method
ocr_appear
ocr识别目标 :param interval: :param target: :return: 如果target有keyword或者是keyword存在,返回是True,否则返回False 但是没有
tasks/base_task.py:320
↓ 17 callers
Function
point2str
Args: x (int, float): y (int, float): length (int): Align length. Returns: str: String with numbers right al
module/base/utils.py:357
↓ 17 callers
Method
stuck_record_clear
(self)
module/device/device.py:112
↓ 16 callers
Function
random_rectangle_point
Choose a random point in an area. Args: area: (upper_left_x, upper_left_y, bottom_right_x, bottom_right_y). n (int): The amount o
module/base/utils.py:31
↓ 15 callers
Method
adb_reconnect
Reboot adb client if no device found, otherwise try reconnecting device.
module/device/connection.py:575
↓ 15 callers
Method
touch
Touch screen Args: x: horizontal position y: vertical position action: ACTION_DOWN | ACTION_UP |
module/device/method/scrcpy/control.py:74
↓ 14 callers
Method
buy_more
购买多个物品 :param start_click: :param number: 不指定就是拉满 :return:
tasks/Component/Buy/buy.py:75
↓ 14 callers
Function
convert_to_underscore
大驼峰形式的字符串转换为下划线形式的字符串,并在数字前插入下划线。如果字符串中已经包含下划线,则会直接返回原始字符串。 :param text: :return:
module/config/utils.py:160
↓ 14 callers
Method
open_buff
打开buff的总界面 :return:
tasks/Component/GeneralBuff/general_buff.py:18
↓ 14 callers
Method
run_switch_soul
保证在式神录的界面 :return:
tasks/Component/SwitchSoul/switch_soul.py:26
↓ 14 callers
Method
ui_get_reward
传进来一个点击图片 或是 一个ocr, 会点击这个图片,然后等待‘获得奖励’, 最后当获得奖励消失后 退出 :param click_image: :return:
tasks/base_task.py:455
↓ 13 callers
Method
close_buff
关闭buff的总界面, 但是要确保buff界面已经打开了 :return:
tasks/Component/GeneralBuff/general_buff.py:39
↓ 13 callers
Function
func
(config: str, state_queue: multiprocessing.Queue, log_pipe_in)
module/server/script_process.py:116
↓ 12 callers
Method
commit
add minitouch command: 'c\n'
module/device/method/minitouch.py:223
↓ 12 callers
Method
detect_and_ocr
注意:这里使用了预处理和后处理 :param image: :return:
module/ocr/base_ocr.py:161
↓ 11 callers
Method
add
Args: grids(SelectedGrids): Returns: SelectedGrids:
module/map/map_grids.py:184
↓ 11 callers
Method
run_switch_soul_by_name
保证在式神录的界面 :return:
tasks/Component/SwitchSoul/switch_soul.py:157
↓ 10 callers
Method
exit_room
退出房间 :return:
tasks/Component/GeneralInvite/general_invite.py:167
↓ 10 callers
Method
gold_100
金币100buff :param is_open: 是否打开 :return:
tasks/Component/GeneralBuff/general_buff.py:112
↓ 9 callers
Method
buy_mall_one
针对只能买一个的 :param buy_button: :param buy_check: :param money_ocr: :param buy_money: 买这一个花多少 :return:
tasks/RichMan/mall/friendship_points.py:35
↓ 9 callers
Method
gold_50
金币50buff :param is_open: 是否打开 :return:
tasks/Component/GeneralBuff/general_buff.py:83
↓ 9 callers
Method
minitouch_send
(self)
module/device/method/minitouch.py:442
↓ 9 callers
Method
push
(self, **kwargs)
module/notify/notify.py:49
↓ 9 callers
Method
select
Args: **kwargs: Attributes of Grid. Returns: SelectedGrids:
module/map/map_grids.py:67
↓ 8 callers
Method
connect
()
module/device/method/minitouch.py:499
↓ 8 callers
Method
copy
复制一个配置文件 :param file: 不带json后缀 :param template: :return:
module/gui/context/add.py:54
↓ 8 callers
Function
limit_in
Limit x within range (lower, upper) Args: x: lower: upper: Returns: int, float:
module/base/utils.py:228
↓ 8 callers
Method
run_general_battle_back
进入挑战然后直接返回 :param config: :return:
tasks/Component/GeneralBattle/general_battle.py:72
↓ 8 callers
Method
save
保存配置文件 :return:
module/config/config.py:161
↓ 8 callers
Method
wait_until_disappear
(self, target: RuleImage)
tasks/base_task.py:214
↓ 8 callers
Method
write
Write `self.config` into deploy config.
module/server/config.py:44
↓ 7 callers
Method
_special_check_remain
检查这个种类的剩余, 要求必须这个出现在当前的页面 :param target: :return:
tasks/RichMan/mall/special.py:149
↓ 7 callers
Method
broadcast_state
(self, data: dict)
module/server/script_websocket.py:25
↓ 7 callers
Method
buy_mall_more
针对可以买多个的 :param money_ocr: 检查钱的第几个 :param remain_number: 是否需要检查剩余数量 :param buy_button: :param buy_number:
tasks/RichMan/mall/friendship_points.py:67
↓ 7 callers
Function
fun
(ev: threading.Event)
server.py:8
↓ 7 callers
Function
handle_adb_error
Args: e (Exception): Returns: bool: If should retry
module/device/method/utils.py:111
↓ 7 callers
Method
run
:param command: 大写驼峰命名的任务名字 :return:
script.py:337
↓ 6 callers
Method
__setattr__
Catch __setattr__, copy to `self.config`, write deploy config.
module/server/config.py:50
↓ 6 callers
Method
boss
(self, battle: RuleImage, collect: bool=False)
tasks/AreaBoss/script_task.py:74
↓ 6 callers
Method
check_lock
检查是否锁定阵容, 要求在八岐大蛇界面 :param lock: :return:
tasks/Orochi/script_task.py:93
↓ 6 callers
Method
check_script
检查脚本是否存在 :param config: :return:
module/gui/context/process_manager.py:215
↓ 6 callers
Method
combine
Args: road (RoadGrids): Returns: RoadGrids:
module/map/map_grids.py:363
↓ 6 callers
Method
create_ensure
创建确认 :return:
tasks/Component/GeneralRoom/general_room.py:79
↓ 6 callers
Method
create_room
创建队伍 一般是下方的黄色按钮 :return:
tasks/Component/GeneralRoom/general_room.py:21
↓ 6 callers
Method
delegate_one
委派一个任务 :param name: :return:
tasks/Delegation/script_task.py:41
↓ 6 callers
Method
detect_select
在当前的页面检测是否有好友, 如果有就选中这个好友 :return:
tasks/Component/GeneralInvite/general_invite.py:295
↓ 6 callers
Method
find_anyone
在这些图片中找到其中一个 :param img: :return: 如果没有找到返回None
module/atom/image_grid.py:16
↓ 6 callers
Method
get_orientation
Rotation of the phone Returns: int: 0: 'Normal' 1: 'HOME key on the right'
module/device/connection.py:656
↓ 6 callers
Method
load
(self, string)
module/base/filter.py:22
↓ 6 callers
Function
name_transform
转换名称, 把小写的转化为大写的, 带有数字的不变,有下划线继续有下划线, 如果是全部的大写就不管 :param name: 任务名 :return: 转换后的名称
dev_tools/assets_extract.py:30
↓ 6 callers
Function
point_limit
Limit point in an area. Args: point: (x, y). area: (upper_left_x, upper_left_y, bottom_right_x, bottom_right_y). Return
module/base/utils.py:279
↓ 6 callers
Method
publish
:param topic: :param msg: 必须是一个字典 :return:
module/team_flow/mqtt.py:88
↓ 6 callers
Method
read
Read and update deploy config, copy `self.configs` to properties.
module/server/config.py:33
↓ 6 callers
Function
retry_sleep
(trial)
module/device/method/utils.py:96
↓ 6 callers
Method
run_invite
队长!!身份。。。在组队界面邀请好友( 如果开启is_first) 等待队员进入开启挑战 请注意,返回的时候成功时是进入战斗了!!! 如果是失败,那就是没有队友进入,然后会退出房间的界面 :param config:
tasks/Component/GeneralInvite/general_invite.py:45
↓ 6 callers
Method
scrcpy_ensure_running
(self)
module/device/method/scrcpy/core.py:57
↓ 6 callers
Method
set_context_property
设置上下文 :param name: :param context: :return:
module/gui/fluent_app.py:56
↓ 6 callers
Method
task_delay
设置下次运行时间 当然这个也是可以重写的 :param target: 可以自定义的下次运行时间 :param server: True :param success: 判断是成功的还是失败的时间间隔 :param
module/config/config.py:274
↓ 6 callers
Method
update
更新配置文件的数据 :return:
module/gui/context/settings.py:42
↓ 6 callers
Method
wait
add minitouch command: 'w <ms>\n'
module/device/method/minitouch.py:233
↓ 5 callers
Method
_enter_sundry
进入杂货铺 :return:
tasks/RichMan/mall/navbar.py:39
↓ 5 callers
Method
all_script_files
获取所有的脚本文件 除了tmplate :return: ['oas1', 'oas2']
module/server/config_manager.py:12
↓ 5 callers
Method
check_zones
确认副本的名称,并选中 :param name: :return:
tasks/Component/GeneralRoom/general_room.py:117
↓ 5 callers
Method
click_battle
(self)
tasks/Secret/script_task.py:233
↓ 5 callers
Method
detect_package
Show all possible packages with the given keyword on this device.
module/device/connection.py:819
↓ 5 callers
Method
down
add minitouch command: 'd <contact> <x> <y> <pressure>\n'
module/device/method/minitouch.py:244
↓ 5 callers
Method
droidcast_url
Check APIs from source code: https://github.com/rayworks/DroidCast/blob/master/app/src/main/java/com/rayworks/droidcast/Main.java
module/device/method/droidcast.py:106
↓ 5 callers
Function
ensure_time
Ensure to be time. Args: second (int, float, tuple): time, such as 10, (10, 30), '10, 30' n (int): The amount of numbers in simul
module/base/utils.py:143
↓ 5 callers
Method
exp_100
经验100buff :param is_open: 是否打开 :return:
tasks/Component/GeneralBuff/general_buff.py:170
↓ 5 callers
Method
exp_50
经验50buff :param is_open: 是否打开 :return:
tasks/Component/GeneralBuff/general_buff.py:141
next →
1–100 of 1,281, ranked by callers