--local expireTime = os.time({year=2026, month=3, day=1})if not pcall(gg.makeRequest, "http://www.baidu.com") then os.exit()end if os.time() > expireTime then gg.alert("脚本异常") os.exit()end --========== 核心修改功能 ========== function CodMon(qmnb, qmxg) local start_time = os.clock() gg.setVisible(false) gg.clearResults() local search_value = qmnb[3]["value"] or qmnb[3][1] local value_type = qmnb[3]["type"] or qmnb[3][2] local feature_name = qmnb[2]["name"] or qmnb[2][1] gg.setRanges(qmnb[1]["memory"] or qmnb[1][1]) gg.searchNumber(search_value, value_type) local result_count = gg.getResultCount() if result_count == 0 then local time_used = os.clock() - start_time gg.toast(feature_name.." 搜索失败 耗时: "..string.format("%.3f", time_used).."秒\n请重新选择游戏进程再开启功能修改") return end gg.refineNumber(search_value, value_type) local results = gg.getResults(5000) local xgsl = 0 local xgjg = false for i = 1, #results do local valid = true for v = 4, #qmnb do if valid then local verify_addr = results[i].address + (qmnb[v]["offset"] or qmnb[v][2]) local verify_val = gg.getValues({{ address = verify_addr, flags = qmnb[v]["type"] or qmnb[v][3] }}) local expected = tostring(qmnb[v]["lv"] or qmnb[v][1]):gsub(",", "") local actual = tostring(verify_val[1].value):gsub(",", "") if expected ~= actual then valid = false break end end end if valid then local base_addr = results[i].address for x = 1, #qmxg do local modify_addr = base_addr + (qmxg[x]["offset"] or qmxg[x][2]) local new_value = qmxg[x]["value"] or qmxg[x][1] local modify_type = qmxg[x]["type"] or qmxg[x][3] local freeze = qmxg[x]["freeze"] or qmxg[x][4] if freeze then gg.addListItems({{ address = modify_addr, flags = modify_type, value = new_value, freeze = freeze }}) else gg.setValues({{ address = modify_addr, flags = modify_type, value = new_value }}) end xgsl = xgsl + 1 end xgjg = true end end local time_used = os.clock() - start_time if xgjg then gg.toast(feature_name.." 成功 共修改"..xgsl.."条数值 耗时"..string.format("%.3f", time_used).."秒") else gg.toast(feature_name.." 失败 耗时: "..string.format("%.3f", time_used).."秒请点击该兵种再开启修改功能") end end function ColdMoon() choice = gg.choice({ "僵尸改跳跳僵尸", "返回" }, nil, "冷月制作脚本") if choice == 1 then a() elseif choice == 2 then os.exit() end end function a() CodMon( {{32}, {"修改"}, {879430414, 4},{-1020260711, 0xC, 4}}, {{1190813288877400428, -0x4, 32}}) CodMon( {{32}, {"修改"}, {668373996, 32},{256, 0x40, 4}}, {{360000, 0x64, 4}}) CodMon( {{32}, {"修改"}, {96127012, 4},{0, 0xC, 4}}, {{12000, 0x8, 4}}) end while true do if gg.isVisible(true) then gg.setVisible(false) ColdMoon() end end