Skip to content

Commit

Permalink
fix ctrl_t_spd识别
Browse files Browse the repository at this point in the history
  • Loading branch information
tkkcc committed Jun 2, 2022
1 parent c6b8da8 commit 88c4271
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 44 deletions.
22 changes: 10 additions & 12 deletions 0.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
git -C release commit --amend --allow-empty-message -m ""
git -C release push --force

cp ../dlt/0.py dlt.py
cp ../dlt/dlt.py dlt.py

git add -u
git status
Expand Down Expand Up @@ -239,38 +239,36 @@ prts.wiki/images/a/a0/Bskill_meet_spd1.png

# === adb 修改模式
dlt() {
./dlt.py dlt
../dlt/dlt.py dlt
}
m() {
./dlt.py mode "$@"
../dlt/dlt.py mode "$@"
}
u() {
./dlt.js upload --search=$1' ' --path=$D/qq.jpg
../dlt/dlt.js upload --search=$1' ' --path=$D/qq.jpg
}
d() {
# ./dlt.js detail --search=$1' '
./dlt.py DLT detail "$1"
../dlt/dlt.py DLT detail "$1"
}
o() {
# ./dlt.js order --search=$1' '
./dlt.py DLT order "$@"
../dlt/dlt.py DLT order "$@"
}
submit() {
# ./dlt.js order --search=$1' '
./dlt.py DLT submit "$@"
../dlt/dlt.py DLT submit "$@"
}
over() {
# ./dlt.js order --search=$1' '
./dlt.py DLT over "$1"
../dlt/dlt.py DLT over "$1"
}
my() {
./dlt.py DLT my "$@"
../dlt/dlt.py DLT my "$@"
}
serial() {
./dlt.py DLT all2serial $@
../dlt/dlt.py DLT all2serial $@
}


"$@"
wait
}
24 changes: 15 additions & 9 deletions dlt.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ def help():

def hyi():
# 华云 系统精简
adb("shell","""
adb(
"shell",
"""
pm uninstall -k --user 0 com.android.nfc
pm uninstall -k --user 0 com.android.appstore
Expand All @@ -72,9 +74,8 @@ def hyi():
pm uninstall -k --user 0 com.iflytek.inputmethod.miui
pm uninstall -k --user 0 com.cxinventor.file.explorer
reboot
""")


""",
)

def hy():
# 华云 adb root hook
Expand Down Expand Up @@ -411,7 +412,7 @@ def rg2(operator=None, times=None, skill=None, level=None):
# 重启
restart(rg=True)

def restart(account="", hide=True, rg=False, game=False):
def restart(account="", hide=True, rg=False, crontab=False, game=False):
if account:
x = load("config_multi_account.json")
c(
Expand All @@ -422,11 +423,15 @@ def restart(account="", hide=True, rg=False, game=False):
save("config_multi_account.json", x)

x = load("config_debug.json")
x["after_require_hook"] = (
c(
x,
"after_require_hook",
"clear_hook();"
+ ("saveConfig('hideUIOnce','true')" if hide else "")
+ ("extra_mode=[[战略前瞻投资]]" if rg else "")
+ ("saveConfig('hideUIOnce','true');" if hide else "")
+ ("extra_mode=[[战略前瞻投资]];" if rg else "")
+ ("crontab_enable_only=1;" if crontab else ""),
)

save("config_debug.json", x)
oppid = "com.hypergryph.arknights"
bppid = "com.hypergryph.arknights.bilibili"
Expand All @@ -447,7 +452,7 @@ def normal(name=None, weekday_only=None, fight=None):
for i in range(13):
c(x, f"now_job_ui" + str(i), True)
c(x, f"now_job_ui8", False)
c(x, f"crontab_text", '8:00 16:00 0:00')
c(x, f"crontab_text", "8:00 16:00 0:00")
save("config_main.json", x)

x = load("config_debug.json")
Expand Down Expand Up @@ -515,6 +520,7 @@ def top():

return locals()[f](*args, **kwargs)


m = mode

def t(x):
Expand Down
6 changes: 3 additions & 3 deletions docs/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
## 最近更新


- 默认定期`重启acc进程`来保证长时间运行内存稳定,如果出现无障碍启动失败、游戏启动失败等可以禁用
- 默认定期`重启acc进程`来保证内存稳定,如多次出现无障碍启动失败、游戏启动失败,可禁用
<!-- - 默认不自动重启acc进程,但这样刷肉鸽每小时内存泄漏44M,一天1G。启用后会定期释放脚本内存,但在部分设备上会造成启动失败与闪退。 -->
<!-- - 单号最大剿灭次数默认为1。 -->
- 华云需手动运行指定命令,才有完整root权限。
<!-- - 5月19日前下载的用户需要重下apk,可覆盖安装,设置不丢 -->
<!-- - 幕后筹备抽空升级默认开启,高级设置中可关 -->
<!-- - 控制中枢与会客厅换班默认开启,高级设置中可关 -->
- 多账号跳过空账密默认开启,高级设置中可关
<!-- - 多账号跳过空账密默认开启,高级设置中可关 -->
<!-- - 自动用全权委托 -->
<!-- - 新增活动关SN-1~SN-10,1280x720分辨率可用关卡名,**其他分辨率只能用`上一次`** -->
<!-- - 新增CE-6、LS-6 -->
Expand Down Expand Up @@ -209,7 +209,7 @@ ce => ce-6*99 ce-5*99 ...
ls/ap/sk/ca 同 ce
pr => pr-b-2*99 pr-a-2*99 pr-c-2*99 pr-d-2*99 pr-b-1*99 pr-a-1*99 pr-c-1*99 pr-d-1*99
```
简写后不可再接次数。
简写后不可再接次数。jm应与最大剿灭次数联用。
:::


Expand Down
2 changes: 1 addition & 1 deletion main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ default_findcolor_confidence = 95 / 100
-- 设成1000//30时,真机同时开着B服与官服时会出现点着点着脚本就停(从基建开始做邮件)
frame_milesecond = 1000 // 30
milesecond_after_click = frame_milesecond
release_date = "2022.06.02 15:03"
release_date = "2022.06.02 16:25"
ui_submit_color = "#ff0d47a1"
ui_cancel_color = "#ff1976d2"
ui_warn_color = "#ff33ccff"
Expand Down
2 changes: 1 addition & 1 deletion path.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4292,7 +4292,7 @@ path.前瞻投资 = function(lighter)
captureqqimagedeliver(table.join(qqmessage, ' ') .. " " .. info, QQ)
end

if not findOne("常规行动") then return end
-- if not findOne("常规行动") then return end

-- log(zl_coin, zl_level)
-- exit()
Expand Down
2 changes: 1 addition & 1 deletion release
Submodule release updated from e8619b to 002c36
30 changes: 20 additions & 10 deletions skill.lua
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ discover = still_wrapper(function(operators, pngdata, pageid, mood_only)
end
end

log(114, card)
-- card = table.slice(card, 1, 1)
-- card = table.slice(card, 4, 4)
-- log(114, card)
local empty1_num = 0
for idx, v in pairs(card) do
-- 技能判断
Expand All @@ -144,6 +144,7 @@ discover = still_wrapper(function(operators, pngdata, pageid, mood_only)
local icon2 = {
v[1] + scale(70), v[2] + scale(18), v[1] + scale(123), v[2] + scale(70),
}
-- log(147, icon1)
local png = ''
local png2 = ''
if not mood_only then
Expand Down Expand Up @@ -778,16 +779,18 @@ findBuildingSkill = function(x1, y1, x2, y2, pngdata)
-- if k == 'bskill_tra_lappland2' then log(663, score, tmp) end
-- if k == 'bskill_meet_spd3' then log(663, score, tmp) end
-- if k == 'bskill_meet_spd2' then log(662, score, tmp) end
if k == 'bskill_man_spd2' then log(663, score, tmp) end
if k == 'bskill_man_exp2' then log(662, score, tmp) end
-- if k == 'bskill_man_spd2' then log(663, score, tmp) end
-- if k == 'bskill_man_exp2' then log(662, score, tmp) end
-- if k == 'bskill_ctrl_t_spd' then log('t', score, tmp) end
-- if k == 'bskill_ctrl_c_spd' then log('c', score, tmp) end
-- exit()

if best_score > score then
best_score = score
best = k
end
end
log(2208, best_score, best, x1, y1, x2, y2)
-- log(2208, best_score, best, x1, y1, x2, y2)
-- exit()
return best
end
Expand Down Expand Up @@ -925,7 +928,7 @@ chooseOperator = function(stationType, goodType, stationLevel,

start_time = time()

log(671, operator)
-- log(671, operator)
-- exit()

-- TODO 滑动时就可以开始计算
Expand Down Expand Up @@ -1088,14 +1091,21 @@ controlStationOperatorBest = function(operator)
local trading_acc = false

for _, o in pairs(operator) do
if o[1] == 'bskill_ctrl_t_spd' or o[2] == 'bskill_ctrl_t_spd' then
if table.includes({o[1], o[2]}, 'bskill_ctrl_t_spd') then
if not trading_acc then
trading_acc = true
table.insert(best, o)
end
-- c与p有概率判错,直接舍弃老鲤
elseif o[1] == 'bskill_ctrl_p_spd' or o[2] == 'bskill_ctrl_p_spd' or o[1] ==
'bskill_ctrl_c_spd' or o[2] == 'bskill_ctrl_c_spd' then
elseif table.includes({o[1], o[2]}, 'bskill_ctrl_c_spd') and
not table.includes({o[1], o[2]}, 'bskill_ctrl_lda') then
-- 老鲤c与t会判错
if not trading_acc then
trading_acc = true
table.insert(best, o)
end
elseif table.includes({o[1], o[2]}, 'bskill_ctrl_p_spd') then
-- or o[1] ==
-- 'bskill_ctrl_c_spd' or o[2] == 'bskill_ctrl_c_spd' then
if not manu_acc then
manu_acc = true
table.insert(best, o)
Expand Down
14 changes: 7 additions & 7 deletions util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3556,6 +3556,13 @@ predebug_hook = function()
-- swip("HD-1")
-- ssleep(1)
-- exit()
local operator = {}
initPngdata()
discover(operator, controlPngdata, 1)
-- discover(operator, manufacturingPngdata, 1)

log(operator)
exit()
local zl_coin_check = function()
-- if not (str2int(zl_max_coin, 0) > 0) then return 0 end
local prex = -1
Expand Down Expand Up @@ -3753,13 +3760,6 @@ predebug_hook = function()
-- path.
ssleep(1)
exit(0)
local operator = {}
initPngdata()
discover(operator, tradingPngdata, 1)
-- discover(operator, manufacturingPngdata, 1)

log(operator)
exit()

-- unZip("/sdcard/skill.zip", "/sdcard/skill")
-- unZip(getWorkPath() .. "/skill.zip", getWorkPath() .. "/skill")
Expand Down

0 comments on commit 88c4271

Please sign in to comment.