|
发表于 2022-1-10 23:09:25
|
显示全部楼层
- function checkJob()
- if job.last ~= 'hqgzc' then
- -- messageShow('当前理相:'..score.xiangyun)
- if score.xiangyun=='死' then
- messageShow('当前理相:'..score.xiangyun..'。开始判断上次做菜时间')
- local fn = 'logs\\hqgzc_mark_'..score.id..'.log'
- local f = io.open(fn,"r")
- if not f then
- return hqgzc()
- else
- local s = f:read()
- f:close()
- if s ~= os.date("%Y%m%d%H") then
- if os.date("%Y%m%d%H") - s >= 100 then
- local x=tostring(os.date("%Y%m%d%H"))
- local y1=tonumber(string.sub(x,-4,-3))
- if y1==1 then
- local y=tonumber(string.sub(x,-2,-1))
- s=tostring(s)
- local z=tonumber(string.sub(s,-2,-1))
- if y>=z then
- return hqgzc()
- end
- else
- return hqgzc()
- end
- end
- end
- end
- end
- end
复制代码 |
|