Skip to content

Commit

Permalink
fix cloud rogue task
Browse files Browse the repository at this point in the history
  • Loading branch information
tkkcc committed Jun 23, 2022
1 parent 1ddf7b7 commit ab93145
Show file tree
Hide file tree
Showing 7 changed files with 166 additions and 171 deletions.
24 changes: 15 additions & 9 deletions cloud.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ m.enabled =
m.getTaskEnabled = function() return cloud_get_task and m.enabled() end

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

m.getTask = function()
-- log("40",40)
local res, code = httpGet(m.server .. "/getTask?" .. "deviceToken=" ..
m.deviceToken, 30,
'Content-Type: application/json')
return res, code
end

m.addLog = function(img, info)
-- log("48",48)
if not m.enabled() then return end
local x = cloud_task or {}
local data = {
Expand All @@ -69,6 +72,7 @@ m.addLog = function(img, info)
end

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

m.completeTask = function(imageUrl)
-- log("84",84)
if not m.getTaskEnabled() then return end
imageUrl = imageUrl or ''
local res, code = httpPost(m.server .. "/completeTask?deviceToken=" ..
Expand All @@ -99,7 +104,7 @@ m.fetchSolveTask = function()
-- log("res", res)
local status, data
status, data = pcall(JsonDecode, res)
-- log("data",data)
log("data",data)
if type(data) == 'table' and type(data.data) == 'table' then
m.solveTask(data.data)
end
Expand Down Expand Up @@ -129,6 +134,7 @@ restartSimpleMode = function(data)
local password = data.password
local server = data.server
local config = data.config
local taskType = data.taskType
-- local x
-- set recommend config over default
-- x = loadOneUIConfig("main")
Expand Down Expand Up @@ -216,10 +222,10 @@ server=]] .. server
-- log("65",64)

x = get(config, 'daily', 'sanity', 'drug')
if x then hook = hook .. [[;max_drug_times=]] .. str(x) end
if x then hook = hook .. [[;max_drug_times=]] .. str2int(x) end

x = get(config, 'daily', 'sanity', 'stone')
if x then hook = hook .. [[;max_stone_times=]] .. str(x) end
if x then hook = hook .. [[;max_stone_times=]] .. str2int(x) end

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

-- 肉鸽
hook = hook .. [[;zl_best_operator=]] ..
str(get(config, 'rogue', 'operator', 'index'))
str2int(get(config, 'rogue', 'operator', 'index'))
hook = hook .. [[;zl_skill_times=]] ..
str(get(config, 'rogue', 'operator', 'num'))
str2int(get(config, 'rogue', 'operator', 'num'))
hook = hook .. [[;zl_skill_idx=]] ..
str(get(config, 'rogue', 'operator', 'skill'))
hook = hook .. [[;zl_max_coin=]] .. str(get(config, 'rogue', 'coin'))
hook = hook .. [[;zl_max_level=]] .. str(get(config, 'rogue', 'level'))
str2int(get(config, 'rogue', 'operator', 'skill'))
hook = hook .. [[;zl_max_coin=]] .. str2int(get(config, 'rogue', 'coin'))
hook = hook .. [[;zl_max_level=]] .. str2int(get(config, 'rogue', 'level'))
hook = hook .. [[;zl_more_repertoire=false]]
hook = hook .. [[;zl_more_experience=true]]
hook = hook .. [[;zl_skip_coin=]] .. str(get(config, 'rogue', 'skip', 'coin'))
Expand All @@ -284,7 +290,7 @@ server=]] .. server

hook = hook .. [[;saveConfig("restart_mode_hook",]] ..
string.format("%q", hook) .. ')'
-- log("hook", hook)
log("hook", hook)
-- ssleep(1000)
saveConfig("hideUIOnce", "true")
saveConfig("restart_mode_hook", hook)
Expand Down
10 changes: 5 additions & 5 deletions docs/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,19 @@

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

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

## 最近更新

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

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

部分已root真机可能需要勾选`禁用重启acc进程`

如需小窗模式/后台运行/熄屏运行,请用手机虚拟机或云手机。

#### 手机虚拟机
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.22 20:31"
release_date = "2022.06.23 21:13"
ui_submit_color = "#ff0d47a1"
ui_cancel_color = "#ff1976d2"
ui_warn_color = "#ff33ccff"
Expand Down
6 changes: 3 additions & 3 deletions path.lua
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ path.基建收获 = function()
log(findAny({"小蓝圈", "进驻总览"}))
log(134)

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

if not appear("代理指挥开", 1) then
if not appear("代理指挥开", .5) then
tap("代理指挥开1")
if not appear("代理指挥开", 1) then
if not appear("代理指挥开", .5) then
-- clean_fight(x)
-- fight_failed_times[cur_fight] = (fight_failed_times[cur_fight] or 0) + 1
if not appear("主页") then back() end
Expand Down
4 changes: 3 additions & 1 deletion point.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ point = {
阿米娅2 = "777|300|FAEAD1,714|369|3DD1E2",
阿米娅右列表 = {{1771, 841}, {1300, 832}},
阿米娅左列表 = {{364, 913}},
注册协议 = {text = "鹰角网络用户注册协议"},
-- 注册协议 = {text = "鹰角网络用户注册协议"},
注册协议 = "949|328|CCCCCC,963|328|313131,958|351|FFFFFF,1372|756|FCFCFC",
注册协议1 = "972|753|FCFCFC",
注册协议2 = "972|843|616161",
同意并继续 = {text = "同意并继续"},
Expand Down Expand Up @@ -1248,6 +1249,7 @@ autojs提供OCR、图像匹配、速度没测过。OCR看现有明日方舟辅
--]]

center = {
注册协议 = "center_center",
注册协议1 = "center_center",
注册协议2 = "center_center",
剿灭接管作战 = "center_center",
Expand Down
2 changes: 1 addition & 1 deletion release
Submodule release updated from e3741d to 1f595c
Loading

1 comment on commit ab93145

@vercel
Copy link

@vercel vercel bot commented on ab93145 Jun 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

arklights – ./

arklights.vercel.app
arklights-tkkcc.vercel.app
arklights-git-lr-tkkcc.vercel.app

Please sign in to comment.