Skip to content

Commit ab93145

Browse files
committed
fix cloud rogue task
1 parent 1ddf7b7 commit ab93145

File tree

7 files changed

+166
-171
lines changed

7 files changed

+166
-171
lines changed

cloud.lua

+15-9
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ m.enabled =
2929
m.getTaskEnabled = function() return cloud_get_task and m.enabled() end
3030

3131
m.heartBeat = function()
32+
-- log("32",32)
3233
local data = {status = m.status, deviceToken = m.deviceToken}
3334
local res, code = httpPost(m.server .. "/heartBeat", JsonEncode(data), 30,
3435
"Content-Type: application/json")
@@ -37,13 +38,15 @@ m.heartBeat = function()
3738
end
3839

3940
m.getTask = function()
41+
-- log("40",40)
4042
local res, code = httpGet(m.server .. "/getTask?" .. "deviceToken=" ..
4143
m.deviceToken, 30,
4244
'Content-Type: application/json')
4345
return res, code
4446
end
4547

4648
m.addLog = function(img, info)
49+
-- log("48",48)
4750
if not m.enabled() then return end
4851
local x = cloud_task or {}
4952
local data = {
@@ -69,6 +72,7 @@ m.addLog = function(img, info)
6972
end
7073

7174
m.failTask = function(imageUrl, lineBusy)
75+
-- log("73",73)
7276
if not m.getTaskEnabled() then return end
7377
imageUrl = imageUrl or ''
7478
local res, code = httpPost(m.server .. "/failTask?deviceToken=" ..
@@ -80,6 +84,7 @@ m.failTask = function(imageUrl, lineBusy)
8084
end
8185

8286
m.completeTask = function(imageUrl)
87+
-- log("84",84)
8388
if not m.getTaskEnabled() then return end
8489
imageUrl = imageUrl or ''
8590
local res, code = httpPost(m.server .. "/completeTask?deviceToken=" ..
@@ -99,7 +104,7 @@ m.fetchSolveTask = function()
99104
-- log("res", res)
100105
local status, data
101106
status, data = pcall(JsonDecode, res)
102-
-- log("data",data)
107+
log("data",data)
103108
if type(data) == 'table' and type(data.data) == 'table' then
104109
m.solveTask(data.data)
105110
end
@@ -129,6 +134,7 @@ restartSimpleMode = function(data)
129134
local password = data.password
130135
local server = data.server
131136
local config = data.config
137+
local taskType = data.taskType
132138
-- local x
133139
-- set recommend config over default
134140
-- x = loadOneUIConfig("main")
@@ -216,10 +222,10 @@ server=]] .. server
216222
-- log("65",64)
217223

218224
x = get(config, 'daily', 'sanity', 'drug')
219-
if x then hook = hook .. [[;max_drug_times=]] .. str(x) end
225+
if x then hook = hook .. [[;max_drug_times=]] .. str2int(x) end
220226

221227
x = get(config, 'daily', 'sanity', 'stone')
222-
if x then hook = hook .. [[;max_stone_times=]] .. str(x) end
228+
if x then hook = hook .. [[;max_stone_times=]] .. str2int(x) end
223229

224230
hook = hook .. [[;now_job_ui1=]] .. str(get(config, 'daily', 'mail'))
225231
hook = hook .. [[;now_job_ui3=]] .. str(get(config, 'daily', 'friend'))
@@ -255,13 +261,13 @@ server=]] .. server
255261

256262
-- 肉鸽
257263
hook = hook .. [[;zl_best_operator=]] ..
258-
str(get(config, 'rogue', 'operator', 'index'))
264+
str2int(get(config, 'rogue', 'operator', 'index'))
259265
hook = hook .. [[;zl_skill_times=]] ..
260-
str(get(config, 'rogue', 'operator', 'num'))
266+
str2int(get(config, 'rogue', 'operator', 'num'))
261267
hook = hook .. [[;zl_skill_idx=]] ..
262-
str(get(config, 'rogue', 'operator', 'skill'))
263-
hook = hook .. [[;zl_max_coin=]] .. str(get(config, 'rogue', 'coin'))
264-
hook = hook .. [[;zl_max_level=]] .. str(get(config, 'rogue', 'level'))
268+
str2int(get(config, 'rogue', 'operator', 'skill'))
269+
hook = hook .. [[;zl_max_coin=]] .. str2int(get(config, 'rogue', 'coin'))
270+
hook = hook .. [[;zl_max_level=]] .. str2int(get(config, 'rogue', 'level'))
265271
hook = hook .. [[;zl_more_repertoire=false]]
266272
hook = hook .. [[;zl_more_experience=true]]
267273
hook = hook .. [[;zl_skip_coin=]] .. str(get(config, 'rogue', 'skip', 'coin'))
@@ -284,7 +290,7 @@ server=]] .. server
284290

285291
hook = hook .. [[;saveConfig("restart_mode_hook",]] ..
286292
string.format("%q", hook) .. ')'
287-
-- log("hook", hook)
293+
log("hook", hook)
288294
-- ssleep(1000)
289295
saveConfig("hideUIOnce", "true")
290296
saveConfig("restart_mode_hook", hook)

docs/guide.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,19 @@
77

88
问题反馈:[github.com/tkkcc/ArkLights/issues](https://github.com/tkkcc/ArkLights/issues)
99

10-
源码与其他明日方舟脚本:[github.com/tkkcc/ArkLights](https://github.com/tkkcc/ArkLights)
10+
源码与其他明日方舟脚本:[github.com/tkkcc/ArkLights](https://github.com/tkkcc/ArkLights)
11+
云控前端:[github.com/AegirTech/IberiaEye](https://github.com/AegirTech/IberiaEye)
12+
云控后端:[github.com/AegirTech/Inquisition](https://github.com/AegirTech/Inquisition)
1113
觉得好用请在github上给个star,这是对开发者最大的帮助。
1214

1315
## 最近更新
1416

17+
- 建议用611版本。
18+
- 默认定期重启脚本,保证内存稳定,可在高级设置调整,有问题请反馈。
1519
- 华云必须执行[外置root指令](#云手机)才能正常使用。
16-
- 建议勾选“启用完全重启”,彻底保证脚本内存稳定,遇到定时启动失败的请反馈。
1720
- 可使用pushplus通知,支持微信公众号、邮件等多种渠道,有图,无需自建服务。
1821
- 标题时间异常、弹“停止运行”,重装最新安装包后清除缓存,设置不丢。
1922
- 活动关内存泄漏严重,2G内存设备将内存清理间隔设为900才能稳定挂机。
20-
- 已root设备上会`重启acc进程`来保证脚本内存稳定。如果出现脚本启动失败且只是短时间使用,可禁用。
2123
- magisk hide设备需**手动关闭root授权提示**
2224
<!-- - 默认不自动重启acc进程,但这样刷肉鸽每小时内存泄漏44M,一天1G。启用后会定期释放脚本内存,但在部分设备上会造成启动失败与闪退。 -->
2325
<!-- - 单号最大剿灭次数默认为1。 -->
@@ -70,8 +72,6 @@ adb -s 123.456.789.101:234 shell "nohup sh -c 'nc -klp49876 -e sh' > /dev/null 2
7072

7173
注意 游戏内异形屏适配设为0,系统关游戏模式,关游戏工具箱,关全局侧边栏,关深色夜间护眼模式,关隐藏刘海,虚拟键要位于右侧,边缘全面屏手势可能影响脚本点击。
7274

73-
部分已root真机可能需要勾选`禁用重启acc进程`
74-
7575
如需小窗模式/后台运行/熄屏运行,请用手机虚拟机或云手机。
7676

7777
#### 手机虚拟机

main.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ default_findcolor_confidence = 95 / 100
5050
-- 设成1000//30时,真机同时开着B服与官服时会出现点着点着脚本就停(从基建开始做邮件)
5151
frame_milesecond = 1000 // 30
5252
milesecond_after_click = frame_milesecond
53-
release_date = "2022.06.22 20:31"
53+
release_date = "2022.06.23 21:13"
5454
ui_submit_color = "#ff0d47a1"
5555
ui_cancel_color = "#ff1976d2"
5656
ui_warn_color = "#ff33ccff"

path.lua

+3-3
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,7 @@ path.基建收获 = function()
739739
log(findAny({"小蓝圈", "进驻总览"}))
740740
log(134)
741741

742-
if findOne("小蓝圈") and findOne("训练室") then
742+
if false and findOne("小蓝圈") and findOne("训练室") then
743743
tap("点击全部收取2")
744744
zoom()
745745
if not wait(function()
@@ -2672,9 +2672,9 @@ path.开始游戏 = function(x, disable_ptrs_check)
26722672
-- log(findOne("开始行动"))
26732673
-- safeexit()
26742674

2675-
if not appear("代理指挥开", 1) then
2675+
if not appear("代理指挥开", .5) then
26762676
tap("代理指挥开1")
2677-
if not appear("代理指挥开", 1) then
2677+
if not appear("代理指挥开", .5) then
26782678
-- clean_fight(x)
26792679
-- fight_failed_times[cur_fight] = (fight_failed_times[cur_fight] or 0) + 1
26802680
if not appear("主页") then back() end

point.lua

+3-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ point = {
2626
阿米娅2 = "777|300|FAEAD1,714|369|3DD1E2",
2727
阿米娅右列表 = {{1771, 841}, {1300, 832}},
2828
阿米娅左列表 = {{364, 913}},
29-
注册协议 = {text = "鹰角网络用户注册协议"},
29+
-- 注册协议 = {text = "鹰角网络用户注册协议"},
30+
注册协议 = "949|328|CCCCCC,963|328|313131,958|351|FFFFFF,1372|756|FCFCFC",
3031
注册协议1 = "972|753|FCFCFC",
3132
注册协议2 = "972|843|616161",
3233
同意并继续 = {text = "同意并继续"},
@@ -1248,6 +1249,7 @@ autojs提供OCR、图像匹配、速度没测过。OCR看现有明日方舟辅
12481249
--]]
12491250

12501251
center = {
1252+
注册协议 = "center_center",
12511253
注册协议1 = "center_center",
12521254
注册协议2 = "center_center",
12531255
剿灭接管作战 = "center_center",

release

Submodule release updated from e3741d9 to 1f595c5

0 commit comments

Comments
 (0)