@@ -29,6 +29,7 @@ m.enabled =
29
29
m .getTaskEnabled = function () return cloud_get_task and m .enabled () end
30
30
31
31
m .heartBeat = function ()
32
+ -- log("32",32)
32
33
local data = {status = m .status , deviceToken = m .deviceToken }
33
34
local res , code = httpPost (m .server .. " /heartBeat" , JsonEncode (data ), 30 ,
34
35
" Content-Type: application/json" )
@@ -37,13 +38,15 @@ m.heartBeat = function()
37
38
end
38
39
39
40
m .getTask = function ()
41
+ -- log("40",40)
40
42
local res , code = httpGet (m .server .. " /getTask?" .. " deviceToken=" ..
41
43
m .deviceToken , 30 ,
42
44
' Content-Type: application/json' )
43
45
return res , code
44
46
end
45
47
46
48
m .addLog = function (img , info )
49
+ -- log("48",48)
47
50
if not m .enabled () then return end
48
51
local x = cloud_task or {}
49
52
local data = {
@@ -69,6 +72,7 @@ m.addLog = function(img, info)
69
72
end
70
73
71
74
m .failTask = function (imageUrl , lineBusy )
75
+ -- log("73",73)
72
76
if not m .getTaskEnabled () then return end
73
77
imageUrl = imageUrl or ' '
74
78
local res , code = httpPost (m .server .. " /failTask?deviceToken=" ..
@@ -80,6 +84,7 @@ m.failTask = function(imageUrl, lineBusy)
80
84
end
81
85
82
86
m .completeTask = function (imageUrl )
87
+ -- log("84",84)
83
88
if not m .getTaskEnabled () then return end
84
89
imageUrl = imageUrl or ' '
85
90
local res , code = httpPost (m .server .. " /completeTask?deviceToken=" ..
@@ -99,7 +104,7 @@ m.fetchSolveTask = function()
99
104
-- log("res", res)
100
105
local status , data
101
106
status , data = pcall (JsonDecode , res )
102
- -- log("data",data)
107
+ log (" data" ,data )
103
108
if type (data ) == ' table' and type (data .data ) == ' table' then
104
109
m .solveTask (data .data )
105
110
end
@@ -129,6 +134,7 @@ restartSimpleMode = function(data)
129
134
local password = data .password
130
135
local server = data .server
131
136
local config = data .config
137
+ local taskType = data .taskType
132
138
-- local x
133
139
-- set recommend config over default
134
140
-- x = loadOneUIConfig("main")
@@ -216,10 +222,10 @@ server=]] .. server
216
222
-- log("65",64)
217
223
218
224
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
220
226
221
227
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
223
229
224
230
hook = hook .. [[ ;now_job_ui1=]] .. str (get (config , ' daily' , ' mail' ))
225
231
hook = hook .. [[ ;now_job_ui3=]] .. str (get (config , ' daily' , ' friend' ))
@@ -255,13 +261,13 @@ server=]] .. server
255
261
256
262
-- 肉鸽
257
263
hook = hook .. [[ ;zl_best_operator=]] ..
258
- str (get (config , ' rogue' , ' operator' , ' index' ))
264
+ str2int (get (config , ' rogue' , ' operator' , ' index' ))
259
265
hook = hook .. [[ ;zl_skill_times=]] ..
260
- str (get (config , ' rogue' , ' operator' , ' num' ))
266
+ str2int (get (config , ' rogue' , ' operator' , ' num' ))
261
267
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' ))
265
271
hook = hook .. [[ ;zl_more_repertoire=false]]
266
272
hook = hook .. [[ ;zl_more_experience=true]]
267
273
hook = hook .. [[ ;zl_skip_coin=]] .. str (get (config , ' rogue' , ' skip' , ' coin' ))
@@ -284,7 +290,7 @@ server=]] .. server
284
290
285
291
hook = hook .. [[ ;saveConfig("restart_mode_hook",]] ..
286
292
string.format (" %q" , hook ) .. ' )'
287
- -- log("hook", hook)
293
+ log (" hook" , hook )
288
294
-- ssleep(1000)
289
295
saveConfig (" hideUIOnce" , " true" )
290
296
saveConfig (" restart_mode_hook" , hook )
0 commit comments