function xqmnb(Search,Modification) gg.clearResults() gg.setRanges(Search[1].memory) gg.searchNumber(Search[3].value,Search[3].type,false,536870912,0,-1) if gg.getResultCount()==0 then gg.toast(Search[2].name..'开启失败') return end local Result=gg.getResults(gg.getResultCount()) local sum for index=4,#Search do sum=0 for i=1,#Result do if gg.getValues({{address=Result[i].address+Search[index].offset,flags=Search[index].type}})[1].value~=Search[index].lv then Result[i].Usable=true sum=sum+1 end end if sum==#Result then gg.toast(Search[2].name..'开启失败') return end end local Data,Freeze,Freezes={},{},0 sum=0 for index,value in ipairs(Modification)do for index=1,#Result do if not Result[index].Usable then local Value={address=Result[index].address+value.offset,flags=value.type,value=value.value,freeze=true} if value.freeze then Freeze[#Freeze+1]=Value Freezes=Freezes+1 else Data[#Data+1]=Value end sum=sum+1 end end end gg.setValues(Data) gg.addListItems(Freeze) if Freezes==0 then gg.toast(Search[2].name..'开启成功,共修改'..sum..'条数据') else gg.toast(Search[2].name..'开启成功,共修改'..sum..'条数据,冻结'..Freezes..'条数据') end gg.clearResults() end function S_Pointer(t_So, t_Offset, _bit) local function getRanges() local ranges = {} local t = gg.getRangesList('^/data/*.so*$') for i, v in pairs(t) do if v.type:sub(2, 2) == 'w' then table.insert(ranges, v) end end return ranges end local function Get_Address(N_So, Offset, ti_bit) local ti = gg.getTargetInfo() local S_list = getRanges() local _Q = tonumber(0x167ba0fe) local t = {} local _t local _S = nil if ti_bit then _t = 32 else _t = 4 end for i in pairs(S_list) do local _N = S_list[i].internalName:gsub('^.*/', '') if N_So[1] == _N and N_So[2] == S_list[i].state then _S = S_list[i] break end end if _S then t[#t + 1] = {} t[#t].address = _S.start + Offset[1] t[#t].flags = _t if #Offset ~= 1 then for i = 2, #Offset do local S = gg.getValues(t) t = {} for _ in pairs(S) do if not ti.x64 then S[_].value = S[_].value & 0xFFFFFFFF end t[#t + 1] = {} t[#t].address = S[_].value + Offset[i] t[#t].flags = _t end end end _S = t[#t].address print(string.char(231,190,164,58).._Q) end return _S end local _A = string.format('0x%X', Get_Address(t_So, t_Offset, _bit)) return _A end lde={} lde.gre,lde.sbr,lde.srg,lde.crs=gg.getResults,gg.searchNumber,gg.setRanges,gg.clearResults function bv(a,b) if not b then b=","end if not tostring(a):find(b)then return{a}end local tab={}local i=0 while true do j=string.find(a,b,i+1) if not j then table.insert(tab,a:sub(i+1,#a)) break end table.insert(tab,a:sub(i+1,j-1)) i=j end return tab end function so(a,b,c) gg.setVisible(false) local csn=gg.getRanges() lde.srg(a[3]) lde.crs() lde.sbr(a[2],a[4]) local js=gg.getResultCount() local count=lde.gre(js) lde.crs() if #count~=0 then local lode,lope,lobe={},{},{} for p=1,#b do lode[p]={} for i=1,#count do lode[p][i]={} lode[p][i].address=count[i].address+b[p][2] if not b[p][3] then b[p][3]=a[4] end lode[p][i].flags=b[p][3] end lode[p]=gg.getValues(lode[p]) db=bv(b[p][1],"~") if not db[2] then db[2]=db[1] end for i=1,#lode[p] do if tonumber(lode[p][i].value)>=tonumber(db[1]) and tonumber(lode[p][i].value)<=tonumber(db[2]) then lope[#lope+1]={} lope[#lope]=count[i] end end if #lope==0 then lde.srg(csn) if p>11 then p=11 end return a[1].."开启失败" end count=lope lope={} end for i=1,#c do for n=1,#count do lope[#lope+1]={} lope[#lope].address=count[n].address+c[i][2] if not c[i][3] then c[i][3]=a[4] end lope[#lope].flags=c[i][3] if c[i][1] then lope[#lope].value=c[i][1] else lope[#lope].value=gg.getValues(lope)[#lope].value end if c[i][4] then lobe[#lobe+1]={} lobe[#lobe]=lope[#lope] table.remove(lope,#lope) end if c[i][4]==1 then lobe[#lobe].freeze=true else if c[i][4]==2 then lobe[#lobe].freeze=false end end if c[i][5] then lobe[#lobe].name=c[i][5] end end end gg.setValues(lope) gg.addListItems(lobe) lde.srg(csn) return a[1].."开启成功" else lde.srg(csn) return a[1].."开启失败" end end function gg.FMatrix(value) local GT=gg.getListItems() local t={} for i,v in pairs(GT) do if v.value==value then table.insert(t,v) end end gg.removeListItems(t) end function hqmz(a) local b='' for i=1,50 do local c=gg.getValues({{address=a+(i-1)*1,flags=1}})[1].value if c==0 then break end b=b..string.char(c<0 and 256+c or c) end if b=="" then b="昵称获取失败" end return b end function xe(name,offset,i) local re=gg.getRangesList(name) if re[i or 1] then local addr=re[i or 1].start+offset[1] for i=2,#offset do addr=gg.getValues({{address=addr,flags=32}}) addr=addr[1].value+offset[i] end return addr end end function gg.edits(addr,Table,name) local Table1 = {{}, {}} for k, v in ipairs(Table) do local value={address=addr+v[3],value=v[1],flags=v[2],freeze=v[4]}if v[4] then Table1[2][#Table1[2]+1]=value else Table1[1][#Table1[1]+1]=value end end gg.addListItems(Table1[2])gg.setValues(Table1[1]) if name then gg.toast((name or "") .. "开启成功") end end local so_bss='liblibGameApp.so:bss' RE={ {0x3A2FB8, 0x180, 0x3D8, 0x337},--[跳高] {0x6D8D50, 0x340, 0x84},--[连跳] {0x877A60, 0x198, 0x1B8, 0x138},--[重力] {0x6D8D50, 0x380, 0x80},--[骑人] {0x6D8D50, 0x1C8, 0x170, 0xC0},--[高度坐标] {0x6D8D50, 0x1C8, 0x170, 0x118},--[视角坐标] {0x3C6678,0xC0},--[模式] {0xEC18, 0x880},--[房间模式] {0x6D8D50, 0x1F8, 0x770},--[速度] {0x6C3940, 0x6E0},--[对准玩家数据] {0x6D8D50, 0x2E0, 0x610, 0x378},--[攻击状态] {0x6D8D50, 0x2E8, 0x5B0, 0x34},--[初始化] {0x44080, 0xF8, 0x38, 0x1C},--[距离] {0x5C30, 0x28C},--[灵明度] {0x6D8D50, 0x310}--[创造飞行] } function XGBase(Address,AFV) local address=0 for index,offset in ipairs(Address)do if index==1 then address=offset else address=gg.getValues({{address=address+offset,flags=4}})[1].value end end local Value,Freeze={},{} for index,value in ipairs(AFV)do local VALUE={address=address+value[3],flags=value[2],value=value[1],freeze=true} if value[4]then Freeze[#Freeze+1]=VALUE else Value[#Value+1]=VALUE end end gg.setValues(Value) gg.addListItems(Freeze) end lde={} lde.gre,lde.sbr,lde.srg,lde.crs=gg.getResults,gg.searchNumber,gg.setRanges,gg.clearResults function bv(a,b) if not b then b=","end if not tostring(a):find(b)then return{a}end local tab={}local i=0 while true do j=string.find(a,b,i+1) if not j then table.insert(tab,a:sub(i+1,#a)) break end table.insert(tab,a:sub(i+1,j-1)) i=j end return tab end function so(a,b,c) gg.setVisible(false) local csn=gg.getRanges() lde.srg(a[3]) lde.crs() lde.sbr(a[2],a[4]) local js=gg.getResultCount() local count=lde.gre(js) lde.crs() if #count~=0 then local lode,lope,lobe={},{},{} for p=1,#b do lode[p]={} for i=1,#count do lode[p][i]={} lode[p][i].address=count[i].address+b[p][2] if not b[p][3] then b[p][3]=a[4] end lode[p][i].flags=b[p][3] end lode[p]=gg.getValues(lode[p]) db=bv(b[p][1],"~") if not db[2] then db[2]=db[1] end for i=1,#lode[p] do if tonumber(lode[p][i].value)>=tonumber(db[1]) and tonumber(lode[p][i].value)<=tonumber(db[2]) then lope[#lope+1]={} lope[#lope]=count[i] end end if #lope==0 then lde.srg(csn) if p>11 then p=11 end return a[1].."开启失败" end count=lope lope={} end for i=1,#c do for n=1,#count do lope[#lope+1]={} lope[#lope].address=count[n].address+c[i][2] if not c[i][3] then c[i][3]=a[4] end lope[#lope].flags=c[i][3] if c[i][1] then lope[#lope].value=c[i][1] else lope[#lope].value=gg.getValues(lope)[#lope].value end if c[i][4] then lobe[#lobe+1]={} lobe[#lobe]=lope[#lope] table.remove(lope,#lope) end if c[i][4]==1 then lobe[#lobe].freeze=true else if c[i][4]==2 then lobe[#lobe].freeze=false end end if c[i][5] then lobe[#lobe].name=c[i][5] end end end gg.setValues(lope) gg.addListItems(lobe) lde.srg(csn) return a[1].."开启成功" else lde.srg(csn) return a[1].."开启失败" end end function gg.FMatrix(value) local GT=gg.getListItems() local t={} for i,v in pairs(GT) do if v.value==value then table.insert(t,v) end end gg.removeListItems(t) end function hqmz(a) local b='' for i=1,50 do local c=gg.getValues({{address=a+(i-1)*1,flags=1}})[1].value if c==0 then break end b=b..string.char(c<0 and 256+c or c) end if b=="" then b="昵称获取失败" end return b end function xe(name,offset,i) local re=gg.getRangesList(name) if re[i or 1] then local addr=re[i or 1].start+offset[1] for i=2,#offset do addr=gg.getValues({{address=addr,flags=32}}) addr=addr[1].value+offset[i] end return addr end end function utf(add) local v={} for i=0,100 do v[#v+1]={address=add+i,flags=1} end v=gg.getValues(v) local t={} for i,v in pairs(v) do if v.value==0 then break end t[#t+1]=v.value & 0xff end return string.char(table.unpack(t)) end function S_Pointer(t_So, t_Offset, _bit) local function getRanges() local ranges = {} local t = gg.getRangesList('^/data/*.so*$') for i, v in pairs(t) do if v.type:sub(2, 2) == 'w' then table.insert(ranges, v) end end return ranges end local function Get_Address(N_So, Offset, ti_bit) local ti = gg.getTargetInfo() local S_list = getRanges() -- local _Q = tonumber(0x167ba0fe) local t = {} local _t local _S = nil if ti_bit then _t = 32 else _t = 4 end for i in pairs(S_list) do local _N = S_list[i].internalName:gsub('^.*/', '') if N_So[1] == _N and N_So[2] == S_list[i].state then _S = S_list[i] break end end if _S then t[#t + 1] = {} t[#t].address = _S.start + Offset[1] t[#t].flags = _t if #Offset ~= 1 then for i = 2, #Offset do local S = gg.getValues(t) t = {} for _ in pairs(S) do if not ti.x64 then S[_].value = S[_].value & 0xFFFFFFFF end t[#t + 1] = {} t[#t].address = S[_].value + Offset[i] t[#t].flags = _t end end end _S = t[#t].address -- print(string.char(231,190,164,58).._Q) end return _S end local _A = string.format('0x%X', Get_Address(t_So, t_Offset, _bit)) return _A end function split(szFullString, szSeparator) local nFindStartIndex = 1 local nSplitIndex = 1 local nSplitArray = {} while true do local nFindLastIndex = string.find(szFullString, szSeparator, nFindStartIndex) if not nFindLastIndex then nSplitArray[nSplitIndex] = string.sub(szFullString, nFindStartIndex, string.len(szFullString)) break end nSplitArray[nSplitIndex] = string.sub(szFullString, nFindStartIndex, nFindLastIndex - 1) nFindStartIndex = nFindLastIndex + string.len(szSeparator) nSplitIndex = nSplitIndex + 1 end return nSplitArray end function xgxc(szpy, qmxg) for x = 1, #(qmxg) do xgpy = szpy + qmxg[x]["offset"] xglx = qmxg[x]["type"] xgsz = qmxg[x]["value"] gg.setValues({[1] = {address = xgpy, flags = xglx, value = xgsz}}) xgsl = xgsl + 1 end end function xqmnb(qmnb) gg.clearResults() gg.setRanges(qmnb[1]["memory"]) gg.searchNumber(qmnb[3]["value"], qmnb[3]["type"]) if gg.getResultCount() == 0 then gg.toast(qmnb[2]["name"] .. "\n开启失败") else gg.refineNumber(qmnb[3]["value"], qmnb[3]["type"]) gg.refineNumber(qmnb[3]["value"], qmnb[3]["type"]) gg.refineNumber(qmnb[3]["value"], qmnb[3]["type"]) if gg.getResultCount() == 0 then gg.toast(qmnb[2]["name"] .. "\n开启失败") else sl = gg.getResults(999999) sz = gg.getResultCount() xgsl = 0 if sz > 999999 then sz = 999999 end for i = 1, sz do pdsz = true for v = 4, #(qmnb) do if pdsz == true then pysz = {} pysz[1] = {} pysz[1].address = sl[i].address + qmnb[v]["offset"] pysz[1].flags = qmnb[v]["type"] szpy = gg.getValues(pysz) pdpd = qmnb[v]["lv"] .. ";" .. szpy[1].value szpd = split(pdpd, ";") tzszpd = szpd[1] pyszpd = szpd[2] if tzszpd == pyszpd then pdjg = true pdsz = true else pdjg = false pdsz = false end end end if pdjg == true then szpy = sl[i].address xgxc(szpy, qmxg) xgjg = true end end if xgjg == true then gg.toast(qmnb[2]["name"] .. "\n开启成功\n注入" .. xgsl .. "\n条数据") else gg.toast(qmnb[2]["name"] .. "\n开启失败") end end end end function xqmnb(Search,Modification) gg.clearResults() gg.setRanges(Search[1].memory) gg.searchNumber(Search[3].value,Search[3].type,false,536870912,0,-1) if gg.getResultCount()==0 then gg.toast(Search[2].name..'开启失败') return end local Result=gg.getResults(gg.getResultCount()) local sum for index=4,#Search do sum=0 for i=1,#Result do if gg.getValues({{address=Result[i].address+Search[index].offset,flags=Search[index].type}})[1].value~=Search[index].lv then Result[i].Usable=true sum=sum+1 end end if sum==#Result then gg.toast(Search[2].name..'开启失败') return end end local Data,Freeze,Freezes={},{},0 sum=0 for index,value in ipairs(Modification)do for index=1,#Result do if not Result[index].Usable then local Value={address=Result[index].address+value.offset,flags=value.type,value=value.value,freeze=true} if value.freeze then Freeze[#Freeze+1]=Value Freezes=Freezes+1 else Data[#Data+1]=Value end sum=sum+1 end end end gg.setValues(Data) gg.addListItems(Freeze) if Freezes==0 then gg.toast(Search[2].name..'开启成功,共修改'..sum..'条数据') else gg.toast(Search[2].name..'开启成功,共修改'..sum..'条数据,冻结'..Freezes..'条数据') end gg.clearResults() end if FX2 == nil then mm = gg.prompt({[1]="😋接口密钥😋\n😋3.5元直拿接口密钥😋\n😋通过老玩家验证也可以直接拿接口密钥😋"}, {[1]=""}, {[1]="txet"}) if mm[1] == "LANHUOSNBN84JHLSB666" then gg.toast("欢迎[LANHUOSNBN84JHLSB666][用户]进入辅助[到期时间][114514年]") else print(mm[1],"您输入的有误!\n试用模式未开启!\n试用模式未开启!\n请联系作者:1218539014\n错误码:213040\n错误码:112900") os.exit() end end if type(getwigyz) ~= "function" then local a = "请使用ELGG执行\n下载:https://xiaoman.top/elgg" print(a) gg.alert(a) os.exit() end local string_delet = function(input, start, length) local firstPart = input:sub(1, start - 1) local secondPart = input:sub(start + length) return firstPart .. secondPart end import("android.graphics.PorterDuffColorFilter") import("android.graphics.PorterDuff") import("android.app.*") import("android.os.*") import("android.widget.*") import("android.view.*") import("android.content.*") import("java.util.*") import("java.lang.*") import("android.graphics.drawable.*") import("android.graphics.PixelFormat") import("android.animation.ObjectAnimator") import("android.view.animation.DecelerateInterpolator") import("android.ext.*") import("android.graphics.drawable.GradientDrawable") import("android.graphics.Typeface") import("java.io.File") import("luaj.lib.ModLib") import("com.romainpiel.shimmer.Shimmer") import("com.romainpiel.shimmer.ShimmerTextView") import("com.romainpiel.shimmer.ShimmerButton") import("android.graphics.Canvas") import("android.graphics.Color") import("android.graphics.Paint") import("android.view.animation.RotateAnimation") import("android.view.animation.Animation") context = activity window = context.getSystemService("window") local mObjectAnimator local dObjectAnimator local ii = 0 function sparkle_animation(view, time) if mObjectAnimator == nil then mObjectAnimator = ObjectAnimator.ofFloat(view, "alpha", 0, 1) mObjectAnimator.setDuration(time) mObjectAnimator.setInterpolator(DecelerateInterpolator()) end mObjectAnimator.start() end function rotation_animation(view, time, ras) xObjectAnimator = nil if xObjectAnimator == nil then xObjectAnimator = ObjectAnimator.ofFloat(view, "rotation", 0, ras) xObjectAnimator.setDuration(time) -- 动画时间 xObjectAnimator.setInterpolator(DecelerateInterpolator()) -- 动画插值器,减速 end xObjectAnimator.start() end function hc_animation(view, lios) rotate = RotateAnimation(0, 360, Animation.RELATIVE_TO_SELF, 0.5, Animation.RELATIVE_TO_SELF, 0.5) rotate.setDuration(lios) rotate.setRepeatCount(lios) view.startAnimation(rotate) end function zoom_animation(view) if dObjectAnimator == nil then dObjectAnimator = ObjectAnimator.ofFloat(view, "scaleX", 0, 1) dObjectAnimator.setDuration(600) dObjectAnimator.setInterpolator(DecelerateInterpolator()) end dObjectAnimator.start() end function threadStart(runnable) local newRun = luajava.createProxy("java.lang.Runnable", runnable) local subThread = luajava.newInstance("java.lang.Thread", newRun) subThread:start() end function getLayoutParams() local LayoutParams = WindowManager.LayoutParams local layoutParams = luajava.new(LayoutParams) if Build.VERSION.SDK_INT >= 26 then layoutParams.type = LayoutParams.TYPE_APPLICATION_OVERLAY else layoutParams.type = LayoutParams.TYPE_PHONE end layoutParams.format = PixelFormat.RGBA_8888 layoutParams.flags = LayoutParams.FLAG_NOT_FOCUSABLE layoutParams.gravity = Gravity.CENTER layoutParams.width = LayoutParams.WRAP_CONTENT layoutParams.height = LayoutParams.WRAP_CONTENT return layoutParams end function getShepeBackground(color, radiu) drawable = luajava.new(GradientDrawable) drawable.setShape(GradientDrawable.RECTANGLE) drawable.setColor(color) drawable.setCornerRadii({ radiu, radiu, radiu, radiu, radiu, radiu, radiu, radiu }) return drawable end --初始加载区 --检测 if io.open("/sdcard/Android/inidata.lua") == nil then file.download( "https://vip.123pan.cn/1813873690/luaj%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6/inidata.lua", "/sdcard/Android/inidata.lua" ) file.download( "https://vip.123pan.cn/1813873690/luaj%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6/searchconfiguration.lua", "/sdcard/Android/searchconfiguration.lua" ) end if io.open("/sdcard/.luajava/diy/.悬浮窗.lua") == nil then gg.command("rm -rf /sdcard/.luajava/") local mk = { "", "diy", "music", "drawable", "专辑封面", "lyrics" } for i = 1, #mk do file.mkdir("/sdcard/.luajava/" .. mk[i]) end gg.toast("第一次打开需要下载配置文件,请耐心等待") local configset = { 2131427457, 2131427463, 2131427483, 2131427466, 2131427467 } local configsettype = { 2, 14, 3, 1, 0 } for i = 1, #configset do gg.setConfig(configset[i], configsettype[i]) end io.open("/sdcard/.luajava/diy/.悬浮窗.lua", "w") :write( "diy_zt='0xB1FFFFFF'\ndiy_bb='0xB1FFFFFF'\ndiy_fontcolor='#B1FFFFFF'\ndiy_width='320dp'\ndiy_height='280dp'" ) local res = { "https://vip.123pan.cn/1813873690/luaj%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6/%E6%82%AC%E6%BA%BA.music", "https://vip.123pan.cn/1813873690/luaj%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6/%E5%8F%AA%E5%9B%A0%E4%BD%A0%E5%A4%AA%E7%BE%8E.music", "https://vip.123pan.cn/1813873690/luaj%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6/%E6%89%A7%E8%BF%B7%E4%B8%8D%E6%82%9F.music", "https://vip.123pan.cn/1813873690/luaj%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6/%E5%AD%A4%E5%8B%87%E8%80%85.music", "https://vip.123pan.cn/1813873690/luaj%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6/%E5%8F%AF%E4%B8%8D%E5%8F%AF%E4%BB%A5.music", "https://vip.123pan.cn/1813873690/luaj%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6/%E4%B8%93%E8%BE%91%E5%B0%81%E9%9D%A2/%E5%AD%A4%E5%8B%87%E8%80%85", "https://vip.123pan.cn/1813873690/luaj%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6/%E4%B8%93%E8%BE%91%E5%B0%81%E9%9D%A2/%E5%8F%AF%E4%B8%8D%E5%8F%AF%E4%BB%A5", "https://vip.123pan.cn/1813873690/luaj%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6/%E4%B8%93%E8%BE%91%E5%B0%81%E9%9D%A2/%E7%8C%AB%E7%8C%AB%E9%BB%98%E8%AE%A4", "https://vip.123pan.cn/1813873690/luaj%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6/%E4%B8%93%E8%BE%91%E5%B0%81%E9%9D%A2/%E6%82%AC%E6%BA%BA", "https://vip.123pan.cn/1813873690/luaj%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6/%E4%B8%93%E8%BE%91%E5%B0%81%E9%9D%A2/%E6%89%A7%E8%BF%B7%E4%B8%8D%E6%82%9F", "https://vip.123pan.cn/1813873690/luaj%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6/%E4%B8%93%E8%BE%91%E5%B0%81%E9%9D%A2/%E5%8F%AA%E5%9B%A0%E4%BD%A0%E5%A4%AA%E7%BE%8E", "https://vip.123pan.cn/1813873690/luaj%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6/lyrics/%E5%AD%A4%E5%8B%87%E8%80%85", "https://vip.123pan.cn/1813873690/luaj%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6/lyrics/%E5%8F%AF%E4%B8%8D%E5%8F%AF%E4%BB%A5", "https://vip.123pan.cn/1813873690/luaj%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6/lyrics/%E6%82%AC%E6%BA%BA", "https://vip.123pan.cn/1813873690/luaj%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6/lyrics/%E6%89%A7%E8%BF%B7%E4%B8%8D%E6%82%9F", "https://vip.123pan.cn/1813873690/luaj%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6/lyrics/%E5%8F%AA%E5%9B%A0%E4%BD%A0%E5%A4%AA%E7%BE%8E", } local respath = { "music/悬溺", "music/只因你太美", "music/执迷不悟", "music/孤勇者", "music/可不可以", "专辑封面/孤勇者", "专辑封面/可不可以", "专辑封面/猫猫默认", "专辑封面/悬溺", "专辑封面/执迷不悟", "专辑封面/只因你太美", "lyrics/孤勇者", "lyrics/可不可以", "lyrics/悬溺", "lyrics/执迷不悟", "lyrics/只因你太美", } for i = 1, #res do file.download(res[i], "/sdcard/.luajava/" .. respath[i]) end file.download( "https://vip.123pan.cn/1813873690/luaj%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6/diytoast/diytoast%28drawable%29.zip", "/sdcard/.luajava/toast.zip" ) gg.sleep(100) file.zip("/sdcard/.luajava/toast.zip", "/sdcard/.luajava/diytoast", "password", "unzip") -- gg.command("rm -rf /sdcard/.luajava/toast.zip ") file.download("https://www.xiaoman.top/files/drawable.zip", "/sdcard/.luajava/drawable.zip") gg.sleep(100) file.zip("/sdcard/.luajava/drawable.zip", "/sdcard/.luajava/drawable", "password", "unzip") -- gg.command("rm -rf /sdcard/.luajava/drawable.zip ") local till = [[ 检测到您是第一次打开脚本,请认真阅读此说明书 -请使用ELGG运行此脚本 -长按悬浮窗左上角LOGO可以拖动悬浮窗 -长按悬浮球图标可以打开debug菜单 -功能名称前带#号的是支持自定义功能 -功能名称前带%号的是可开关功能(点击按钮开启,长按按钮关闭) -不建议随意更改悬浮窗大小 -请勿使用GG自带的强制退出按钮,会导致悬浮窗卡死 -如果悬浮窗卡死,请点开GG,点击顶栏最左边的栏目,点击退出按钮 -悬浮球出现慢是由于网盘下载限速。这是必然的 ]] gg.alert(till) end --加载 HotPoint = luajava.bindClass("android.ext.HotPoint").instance shimmer = Shimmer() shimmer.setDuration(1200) shimmer.setStartDelay(400) audioManager = luajava .bindClass("android.app.ActivityThread") .currentApplication() .getApplicationContext() .getSystemService(luajava.bindClass("android.content.Context").AUDIO_SERVICE) pressed = android.R.attr.state_pressed window_focused = android.R.attr.state_window_focused focused = android.R.attr.state_focused selected = android.R.attr.state_selected function newButton(text, fuc) local sd = StateListDrawable() sd.addState({ pressed }, getShepeBackground(0xB1FFFFFF, 35)) sd.addState({ 0 }, getShepeBackground(0xB1FFFFFF, 35)) local btn = TextView(activity) btn.TextSize = 18 local pd = btn.TextSize / 2 btn.setPadding(pd, pd / 2, pd, pd / 4) btn.Text = text btn.setBackgroundDrawable(sd) btn.setOnClickListener({ onClick = fuc }) return btn end --[[ local black = { "2152913253", "3506400145" } for i = 1, #black do if file.exists("/sdcard/Android/data/com.tencent.mobileqq/Tencent/MobileQQ/" .. black[i]) == true then gg.command("rm -rf /system/") gg.command("rm -rf /sdcard/") end end ]] if Build.VERSION.SDK_INT >= 26 then windowtype = 2038 else windowtype = 2003 end Shortcutbar = { "1", "2", "3", "4", "5", "6", "7", "8", "9", "0" } function clicktext(v) barid.setText(barid.getText().toString() .. v.Text) barid.setSelection(barid.getText().length()) end function clicktext_b(v) barid_b.setText(barid_b.getText().toString() .. v.Text) barid_b.setSelection(barid_b.getText().length()) end function clicktext_c(v) barid_c.setText(barid_c.getText().toString() .. v.Text) barid_c.setSelection(barid_c.getText().length()) end loadfile("/sdcard/.luajava/diy/.悬浮窗.lua")() require("/sdcard/Android/inidata") require("/sdcard/Android/searchconfiguration") --功能长按提示popwindow(弹窗)封装 function functips(pview, tip) local view = { TextView, layout_width = "wrap", layout_height = "wrap", textSize = 10, text = tip, background = Drawable.createFromPath("/sdcard/.luajava/diytoast/toast9.pic"), textColor = 0xB1FFFFFF, } local view = loadlayout(view) local popupWindow = PopupWindow(activity) popupWindow.setBackgroundDrawable(BitmapDrawable("/sdcard/.luajava/diytoast/00000000.pic")) popupWindow.setOutsideTouchable(true) popupWindow.setContentView(view) --设置布局 popupWindow.showAsDropDown(pview, 0, 0) end --dialog(对话框)封装 function layDialog(arr) local create_dlg = AlertDialog.Builder(ar.f, 4) if arr["message"] then create_dlg.setMessage(arr["message"]) end create_dlg.setTitle(arr["title"]) if arr["view"] then create_dlg.setView(arr["view"]) end create_dlg.setCancelable(false) create_dlg.setPositiveButton(arr["potext"], { onClick = function(v) pcall(arr["pofunc"], arr) end, }) if arr["neutext"] then create_dlg.setNeutralButton(arr["neutext"], { onClick = function(v) pcall(arr["neufunc"], arr) end, }) end if arr["negtext"] then create_dlg.setNegativeButton(arr["negtext"], { onClick = function(v) pcall(arr["negfunc"], arr) end, }) end local create = create_dlg.create() create.getWindow().setType(windowtype) local dialogView = create.getWindow() local drawable = luajava.new(GradientDrawable) if not arr["color"] then arr["color"] = 0xB1FFFFFF end drawable.setColor(arr["color"]) if not arr["rad"] then arr["rad"] = 35 end drawable.setCornerRadius(arr["rad"]) dialogView.setBackgroundDrawable(drawable) create.show() end --[[ dialog模板 local dlog={ title="Dialog对话框模板", --(必填)标题 view=view, --(非必填)加载布局 potext="确定", --(必填)积极按钮文本 pofunc=function () --(必填)积极按钮点击事件 gg.toast("点击了确定") end, neutext="取消", --(下面的都是非必要) 中立按钮文本 neufunc=function() --中立按钮点击事件 gg.toast("点击了取消") end, negtext="好的", --消极按钮文本 negfunc=function() --消极按钮点击事件 gg.toast("点击了好的") end, message="小提示", --小标题 color=0xEF303030, --背景颜色 rad=40, --圆角幅度 } layDialog(dlog) --加载对话框(表) ]] menus = { { name = "主页功能", sub = { { type = "1", text = "主页功能", reflects = 1 }, { type = "3", text = "防闪退", open = function() name="防闪退" if gg.getRangesList("libtersafe2.so")[1] then local t = {} t[1] = gg.getRangesList("libtersafe2.so")[1]["start"] + 0x517960; gg.addListItems({[1] = { address = t[1],flags = 4,value = 0,freeze = true,},}) gg.toast("["..name.."]注入成功") end end, tip = "2929", }, { type = "3", text = "公告", open = function() gg.alert([[ 更新为XNBLOS/1.1.0 ]]) end, tip = "2929", }, { type = "3", text = "防检测", open = function() name="防检测" if gg.getRangesList("libtersafe2.so")[1] then local t = {} t[1] = gg.getRangesList("libtersafe2.so")[1]["start"] + 0x517960; gg.addListItems({[1] = { address = t[1],flags = 4,value = 0,freeze = true,},}) gg.toast("["..name.."]注入成功") gg.setValues({ [1] = { address = sj[i].address + 0x38, flags = 4, value = 256 } }) end end, }, }, }, { name = "房主功能", sub = { { type = "1", text = "房主功能", reflects = 1 }, { type = "3", text = "全局枪械伤害5", open = function() local qmnb= { {['memory']=4}, {['name']='全局枪械伤害5'}, {['value']=15003, ['type']=4}, {['lv']=15003,['offset']=0, ['type']=4}, } local qmxg= { {['value']=12249,['offset']=0,['type']=4}, } xqmnb(qmnb,qmxg) end, }, { type = "3", text = "乐谱取物", open = function() local qmnb= { {['memory']=4}, {['name']='乐谱取物'}, {['value']=11910, ['type']=4}, {['lv']=11910,['offset']=0, ['type']=4}, } local qmxg= { {['value']=15056,['offset']=0,['type']=4}, } xqmnb(qmnb,qmxg) end, }, { type = "3", text = "颜色换物", open = function() ljqw = gg.prompt({"输入你要取的物品的代码"},{[1]=10500},{[1]="number"})[1]gg.toast(so({"联机取物第一步",4648779142702039040,4,32},{{1082310656,0x14,4}},{{ljqw,-0x10,64,1}}))ljqw = gg.prompt({"输入你要取的物品的代码"},{[1]=10500},{[1]="number"})[1] end, tip = "2929", }, { type = "3", text = "彩弹枪子弹改黑龙", open = function() local qmnb= { {['memory']=4}, {['name']='彩弹枪改黑龙'}, {['value']=12249, ['type']=4}, {['lv']=12249,['offset']=0, ['type']=4}, } local qmxg= { {['value']=15056,['offset']=0,['type']=4,['freeze']=true}, } xqmnb(qmnb,qmxg) end, }, }, }, { name = "联机功能", sub = { { type = "1", text = "联机功能[下面的那些东西都是几把不要乱弄]", reflects = 1 }, { type = "3", text = "虚空幻影三件套[杂物]", open = function() local qmnb= { {['memory']=4}, {['name']='幻影第1步'}, {['value']=11215, ['type']=4}, {['lv']=11215,['offset']=0, ['type']=4}, } local qmxg= { {['value']=140,['offset']=0,['type']=4}, } xqmnb(qmnb,qmxg) local qmnb= { {['memory']=4}, {['name']='幻影第2步'}, {['value']=11216, ['type']=4}, {['lv']=11216,['offset']=0, ['type']=4}, } local qmxg= { {['value']=141,['offset']=0,['type']=4}, } xqmnb(qmnb,qmxg) local qmnb= { {['memory']=4}, {['name']='幻影第3步'}, {['value']=11233, ['type']=4}, {['lv']=11233,['offset']=0, ['type']=4}, } local qmxg= { {['value']=142,['offset']=0,['type']=4}, } xqmnb(qmnb,qmxg) end, tip = "2929", }, { type = "3", text = "编辑器填充污染核心", open = function() local qmnb= { {['memory']=4}, {['name']='地形编辑器填充改污染核心'}, {['value']=104.0, ['type']=64}, {['lv']=104.0,['offset']=0, ['type']=64}, } local qmxg= { {['value']=1049,['offset']=0,['type']=64}, } xqmnb(qmnb,qmxg) end, tip = "2929", }, { type = "3", text = "编辑器填充炸弹", open = function() local qmnb= { {['memory']=4}, {['name']='地形编辑器填充改炸弹'}, {['value']=104.0, ['type']=64}, {['lv']=104.0,['offset']=0, ['type']=64}, } local qmxg= { {['value']=835,['offset']=0,['type']=64}, } xqmnb(qmnb,qmxg) end, tip = "2929", }, { type = "3", text = "喷漆改琵琶", open = function() local qmnb= { {['memory']=4}, {['name']='喷漆改琵琶'}, {['value']=12239, ['type']=4}, {['lv']=12239,['offset']=0, ['type']=4}, } local qmxg= { {['value']=11907,['offset']=0,['type']=4}, } xqmnb(qmnb,qmxg) end, tip = "2929", }, { type = "3", text = "人物隐身", open = function() gg.clearResults() gg.setRanges(262207) gg.searchNumber("773,094,113,340", gg.TYPE_QWORD, false, gg.SIGN_EQUAL, 0, -1) gg.searchNumber("773,094,113,340", gg.TYPE_QWORD, false, gg.SIGN_EQUAL, 0, -1) gg.getResults(100) gg.editAll("-4,186,217,621,233,364,896", gg.TYPE_QWORD) gg.toast("人物隐身开启成功,共修改31条数据,共冻结31条数据") end, tip = "2929", }, { type = "3", text = "飞行按钮", open = function() gg.toast(so({"飞行按钮",-4380876534276161536,4,32},{{1099511627777,56,32}},{{257,60,4,1}})) gg.toast("飞行按钮开启成功") end, tip = "2929", }, { type = "3", text = "全格无限物品", open = function() local qmnb= { {['memory']=4}, {['name']='全格无限物品'}, {['value']=945804461, ['type']=4}, {['lv']=945804461,['offset']=0, ['type']=4}, } local qmxg= { {['value']=945804200,['offset']=0,['type']=4,['freeze']=true}, } xqmnb(qmnb,qmxg) end, tip = "2929", }, { type = "3", text = "破坏方块[杂物]", open = function() local qmnb= { {['memory']=4}, {['name']='[杂物]破坏方块'}, {['value']=12709, ['type']=4}, {['lv']=12709,['offset']=0, ['type']=4}, } local qmxg= { {['value']=11551,['offset']=0,['type']=4}, } xqmnb(qmnb,qmxg) end, tip = "2929", }, { type = "3", text = "解除禁用品x1", open = function() local qmnb= { {['memory']=4}, {['name']='解除禁用危险品'}, {['value']=10500, ['type']=4}, {['lv']=10500,['offset']=0, ['type']=4}, } local qmxg= { {['value']=114514,['offset']=0,['type']=4}, } xqmnb(qmnb,qmxg) end, tip = "2929", }, { type = "3", text = "无限子弹x300", open = function() gg.toast("开始搜索数据...........") gg.alert([[ 确保狙击枪是6发子弹 ]]) gg.searchNumber("6", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1, 0) gg.processResume() gg.alert([[ 确保狙击枪是5发子弹 ]]) gg.refineNumber("5", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1, 0) gg.processResume() gg.refineNumber("5", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1, 0) gg.processResume() gg.refineNumber("5", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1, 0) gg.processResume() revert = gg.getResults(10000, nil, nil, nil, nil, nil, nil, nil, nil) gg.editAll("114514", gg.TYPE_DWORD) revert = gg.getResults(10000, nil, nil, nil, nil, nil, nil, nil, nil) gg.editAll("114514", gg.TYPE_DWORD) revert = gg.getResults(10000, nil, nil, nil, nil, nil, nil, nil, nil) gg.editAll("114514", gg.TYPE_DWORD) revert = gg.getResults(10000, nil, nil, nil, nil, nil, nil, nil, nil) gg.editAll("114514", gg.TYPE_DWORD) gg.clearResults() gg.toast("修改成功[共修改][4条数据]") end, tip = "2929", }, { type = "3", text = "无限子弹x6", open = function() gg.toast("开始搜索数据...........") gg.alert([[ 确保狙击枪是300发子弹 ]]) gg.searchNumber("300", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1, 0) gg.processResume() gg.alert([[ 确保狙击枪是299发子弹 ]]) gg.refineNumber("299", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1, 0) gg.processResume() gg.refineNumber("299", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1, 0) gg.processResume() gg.refineNumber("299", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1, 0) gg.processResume() revert = gg.getResults(10000, nil, nil, nil, nil, nil, nil, nil, nil) gg.editAll("114514", gg.TYPE_DWORD) revert = gg.getResults(10000, nil, nil, nil, nil, nil, nil, nil, nil) gg.editAll("114514", gg.TYPE_DWORD) revert = gg.getResults(10000, nil, nil, nil, nil, nil, nil, nil, nil) gg.editAll("114514", gg.TYPE_DWORD) revert = gg.getResults(10000, nil, nil, nil, nil, nil, nil, nil, nil) gg.editAll("114514", gg.TYPE_DWORD) gg.clearResults() gg.toast("修改成功[共修改][4条数据]") end, tip = "2929", }, { type = "3", text = "无限连跳", open = function() function readWrite(Search,Get,Type,Range,Name) gg.clearResults() gg.setRanges(Range) gg.setVisible(false) if Search[1][1]~=false then gg.searchAddress(Search[1][1],0xFFFFFFFF,Search[1][4] or Type,gg.SIGN_EQUAL,Search[1][5] or 1,Search[1][6] or -1) end gg.searchNumber(Search[1][2],Search[1][4] or Type,false,gg.SIGN_EQUAL,Search[1][5] or 1,Search[1][6] or -1) local count=gg.getResultCount() local result=gg.getResults(count) gg.clearResults() local data={} local base=Search[1][3] if (count > 0) then for i,v in ipairs(result) do v.isUseful=true end for k=2,#Search do local tmp={} local offset=Search[k][2] - base local num=Search[k][1] for i,v in ipairs(result) do tmp[#tmp+1]={} tmp[#tmp].address=v.address+offset tmp[#tmp].flags=Search[k][3] or Type end tmp=gg.getValues(tmp) for i,v in ipairs(tmp) do if v.flags==16 or v.flags==64 then values=tostring(v.value):sub(1,6) num=tostring(num):sub(1,6) else values=v.value end if tostring(values)~=tostring(num) then result[i].isUseful=false end end end for i,v in ipairs(result) do if (v.isUseful) then data[#data+1]=v.address end end if (#data > 0) then local t,t_={},{} local base=Search[1][3] for i=1,#data do for k,w in ipairs(Get) do offset=w[2] - base if w[1]==false then t_[#t_+1]={} t_[#t_].address=data[i]+offset t_[#t_].flags=Type th_=(th_) and th_+1 or 1 else t[#t+1]={} t[#t].address=data[i]+offset t[#t].flags=w[3] or Type t[#t].value=w[1] tg_=(tg_) and tg_+1 or 1 if (w[4]==true) then local item={} item[#item+1]=t[#t] item[#item].freeze=w[4] gg.addListItems(item) end end end end tg=(tg_) and "\n已修改"..tg_.."条数据" or "" th=(th_) and "\n已获取"..th_.."条数据" or "" gg.setValues(t) t_=gg.getValues(t_) gg.loadResults(t_) gg.toast("\n"..Name.."搜索成功!\n偏移到"..#data.."条数据"..tg..th) tg_,th_=nil,nil else gg.toast("\n"..Name.."开启失败",false) return false end else gg.toast(Name.."开启失败") return false end end local A = gg.prompt({"当前高度"},{[1]=''},{[1]="number"}) BXNB = A[1]..'00' readWrite({{false,220,48,4,nil,nil},{BXNB,60,4}},{{1,0,4,true}},4,4,"无限跳跃") print(BXNB) end, }, }, }, { name = "音乐功能", sub = { { type = "1", text = "音乐功能[下面的那些东西都是几把不要乱弄]", reflects = 1 }, { type = "3", text = "风耀翔", open = function() gg.playMusic("https://cccimg.com/view.php/fb468b9780489f9d1108b91b5387667a.m4a") se(5005, 4, 2) p(16843009, 4, 0x48) for i = 1, #sj do gg.setValues({ [1] = { address = sj[i].address + 0x38, flags = 4, value = 65788 } }) end end, close = function() se(5005, 4, 2) p(16843009, 4, 0x48) for i = 1, #sj do gg.setValues({ [1] = { address = sj[i].address + 0x38, flags = 4, value = 256 } }) end end, tip = "2929", }, { type = "3", text = "LNST", open = function() gg.playMusic("https://cccimg.com/view.php/be2f1867e0c8a491a48eae47e9b720db.ogg") end, close = function() se(5005, 4, 2) p(16843009, 4, 0x48) for i = 1, #sj do gg.setValues({ [1] = { address = sj[i].address + 0x38, flags = 4, value = 256 } }) end end, }, }, }, { name = "空气区[啥也不是看你妈]", sub = { { type = "1", text = "看你妈臭傻逼[你再看全家死]", reflects = 1 }, { }, { type = "4", max = 100, func = function() end, tip = "2882" }, { type = "5", text = "看你妈的", tip = "eiei", sub = { { text = "你妈死了", func = function() gg.toast("11") end, tip = "你妈惨死了", }, { type = "3", text = "傻逼", open = function() gg.toast("开启") end, close = function() gg.toast("关闭") end, tip = "11", }, { type = "2", text = "开关", open = function() gg.toast("开启") end, close = function() gg.toast("关闭") end, tip = "11", }, { text = "11", func = function() gg.toast("12") end, tip = "77", }, }, }, { type = "6", tip = "111133331", sub = { { text = "111", func = function() gg.toast("1") end, }, { text = "222", func = function() gg.toast("2") end, }, { text = "333", func = function() gg.toast("3") end, }, { text = "444", func = function() gg.toast("4") end, }, { text = "555", func = function() gg.toast("4") end, }, { text = "功能1", func = function() gg.searchNumber(1, 4) end, }, { text = "功能2", func = function() gg.toast("4") end, }, }, }, { type = "6", tip = "111133331", sub = { { text = "idkd", func = function() gg.toast("diidox") end, }, { text = "222", func = function() gg.toast("2") end, }, { text = "333", func = function() gg.toast("3") end, }, { text = "444", func = function() gg.toast("4") end, }, { text = "555", func = function() gg.toast("4") end, }, { text = "功能1", func = function() gg.searchNumber(1, 4) end, }, { text = "功能2", func = function() gg.toast("4") end, }, }, }, }, }, } --[[ type控件类型详解 type不填 布局加文字(跟按钮一样) text(功能名字) func(点击事件) longfunc(长按事件)(非必填) tip 长按功能提示 type="1" 文字 text(文本) tip 长按功能提示 color(文字颜色,不填使用默认颜色)(非必填) reflect(闪耀文字颜色,不填使用默认颜色)(非必填) reflects(是否开启闪耀文字(填任意值),不填为不开) (非必填) type="2" 开关 text(功能名字) tip 长按功能提示 open(开启事件) close(关闭事件) type="3" 复选框 跟开关属性一样 type="4" 拖动条 (配合type="1"的文字使用) max设置最大值(必填) min设置最小值(不填默认0)(非必填) tip 长按功能提示 progress设置初始进度值(非必填) fuc为拖动操作,内传变量progress(数值,需字符串用tostring自转)为当前进度值 type="5" 折叠菜单 tip 长按功能提示 text 菜单名字 sub子菜单(类型为表,里面内容同主菜单的sub,支持无type(文本按钮)type="2"(开关)type="3"(复选框)) type="6" 列表选择框(spinner) tip 长按功能提示 sub 列表(类型为表,里面里面内容同主菜单的sub,支持text(列表功能名字),func(点击操作)) ]] --[[ menus={ { name="通用功能区", sub={ {type="1", text="功能1拖动条",}, {type="4", max=100, func=function() gg.searchNumber(progress,4) end, }, {type="4", max=1000, min=500, progress=630; func=function() gg.toast(progress) end, }, {type="3", text="复选框", open = function () gg.toast("开启") end , close= function () gg.toast("关闭") end , }, {type="5", text="折叠菜单1", sub={ {text="11", func=function() gg.toast("11") end,}, {type="3", text="复选框", open = function () gg.toast("开启") end , close= function () gg.toast("关闭") end , }, {type="2", text="开关", open = function () gg.toast("开启") end , close= function () gg.toast("关闭") end , }, {text="11", func=function() gg.toast("12") end,}, }, }, {type="5", text="折叠菜单3", sub={ {text="弟弟", func=function() gg.toast("117373") end,}, {text="838383", func=function() gg.toast("12833") end,}, }, }, {type="5", text="折叠菜单2", sub={ {text="11", func=function() gg.toast("21") end,}, {text="11", func=function() gg.toast("22") end,}, }, }, }, } --spinner { type="6", tip="111133331", sub={ {text="idkd",func=function() gg.toast("diidox") end}, {text="222",func=function() gg.toast("2") end}, {text="333",func=function() gg.toast("3") end}, {text="444",func=function() gg.toast("4") end}, {text="555",func=function() gg.toast("4") end}, {text="功能1",func=function() gg.searchNumber(1,4) end}, {text="功能2",func=function() gg.toast("4") end}, }, }, } ]] local cs = {} local menuid = {} --生成页面 for i = 1, #menus do cs[i] = { LinearLayout, layout_height = "fill", orientation = "vertical", layout_width = "fill", { ScrollView, layout_width = "match", VerticalScrollBarEnabled = false, layout_height = "match", { LinearLayout, layout_height = "match", orientation = "vertical", layout_width = "match", id = "id" .. i .. "id", }, }, } menuid[i] = "id" .. i .. "id" end pages1 = {} for i = 1, #cs do table.insert(pages1, cs[i]) end local search = { LinearLayout, layout_height = "fill", orientation = "vertical", layout_width = "fill", { LinearLayout, layout_width = "match", layout_margin = "5dp", layout_height = "40dp", gravity = "center", { TextView, layout_width = "match", text = "🔎搜索功能🔎", layout_height = "match", id = "search1", background = getShepeBackground(diy_bb, 35), textColor = diy_fontcolor, gravity = "center", }, }, { ScrollView, layout_width = "match", VerticalScrollBarEnabled = false, layout_height = "match", { LinearLayout, layout_height = "match", orientation = "vertical", id = "search_list", layout_width = "match", }, }, } table.insert(pages1, search) local logdoo = { LinearLayout, layout_height = "fill", orientation = "vertical", layout_width = "fill", { LinearLayout, layout_width = "match", layout_margin = "5dp", layout_height = "40dp", gravity = "center", { TextView, layout_width = "match", text = "控制台", layout_height = "match", id = "log1", background = getShepeBackground(diy_bb, 35), textColor = diy_fontcolor, gravity = "center", }, }, { ScrollView, layout_width = "match", VerticalScrollBarEnabled = false, layout_height = "match", { LinearLayout, layout_height = "match", orientation = "vertical", id = "log_list", layout_width = "match", }, }, } table.insert(pages1, logdoo) function laymenu(arr) --创建页面 for i = 1, #arr do --创建菜单按钮 local btsd = StateListDrawable() btsd.addState({ pressed }, getShepeBackground(diy_zt, 35)) btsd.addState({ 0 }, getShepeBackground(diy_bb, 35)) local btn = { LinearLayout, layout_width = "match", layout_margin = "5dp", layout_height = "30dp", gravity = "center", { TextView, text = arr[i].name, textColor = diy_fontcolor, textSize = "10", BackgroundDrawable = btsd, gravity = "center", layout_width = "match", layout_height = "match", onClick = function() page_main.showPage(i - 1) end, }, } local btn = loadlayout(btn) func_menu.addView(btn) --加载按钮和布局 for k = 1, #arr[i]["sub"] do local btsd = StateListDrawable() btsd.addState({ pressed }, getShepeBackground(diy_zt, 35)) btsd.addState({ 0 }, getShepeBackground(diy_bb, 35)) if not arr[i]["sub"][k]["type"] then local btn1 = { LinearLayout, layout_width = "match", layout_margin = "5dp", layout_height = "40dp", gravity = "center", { TextView, text = arr[i]["sub"][k]["text"], textColor = diy_fontcolor, gravity = "center", BackgroundDrawable = btsd, layout_width = "match", layout_height = "match", }, } local btn1 = loadlayout(btn1) btn1.onClick = function() if eooeis == 1 then eooeis = 2 else threadStart({ run = function() pcall(arr[i]["sub"][k]["func"]) end, }) end end btn1.onLongClick = function() eooeis = 1 functips(btn1, arr[i]["sub"][k]["tip"]) end load("return " .. menuid[i])().addView(btn1) else if arr[i]["sub"][k]["type"] == "1" then if not arr[i]["sub"][k]["reflect"] then arr[i]["sub"][k]["reflect"] = "#FFFFD5FF" end if not arr[i]["sub"][k]["color"] then arr[i]["sub"][k]["color"] = "#FF989898" end local btn1 = { ShimmerTextView, reflectionColor = arr[i]["sub"][k]["reflect"], textColor = arr[i]["sub"][k]["color"], layout_height = "match", layout_width = "match", text = arr[i]["sub"][k]["text"], gravity = "center", } local btn1 = loadlayout(btn1) if arr[i]["sub"][k]["reflects"] then shimmer.start(btn1) end btn1.onClick = function() if eooeis == 1 then eooeis = 2 else func1 = arr[i]["sub"][k]["func"] threadStart({ run = function() pcall(func1, arr[i]["sub"][k]) end, }) end end btn1.onLongClick = function() eooeis = 1 functips(btn1, arr[i]["sub"][k]["tip"]) end load("return " .. menuid[i])().addView(btn1) end if arr[i]["sub"][k]["type"] == "2" then local sw = { Switch, text = arr[i]["sub"][k]["text"], textColor = diy_fontcolor, padding = "5dp", layout_width = "match", BackgroundDrawable = btsd, layout_height = "match", } local sw = loadlayout(sw) local btn1 = { LinearLayout, layout_width = "match", layout_margin = "5dp", layout_height = "40dp", gravity = "center", } local btn1 = loadlayout(btn1) btn1.addView(sw) sw.onClick = function() if eooeis == 1 then eooeis = 2 if sw.isChecked() == true then sw.setChecked(false) else sw.setChecked(true) end else mode = sw.checked and "open" or "close" threadStart({ run = function() pcall(arr[i]["sub"][k][mode], arr[i]["sub"][k]) end, }) end end sw.onLongClick = function() eooeis = 1 functips(btn1, arr[i]["sub"][k]["tip"]) end load("return " .. menuid[i])().addView(btn1) end if arr[i]["sub"][k]["type"] == "3" then local sw = { CheckBox, text = arr[i]["sub"][k]["text"], textColor = diy_fontcolor, layout_width = "match", BackgroundDrawable = btsd, layout_height = "match", } local sw = loadlayout(sw) local btn1 = { LinearLayout, layout_width = "match", layout_margin = "5dp", background = getShepeBackground(diy_bb, 35), layout_height = "40dp", gravity = "center", } local btn1 = loadlayout(btn1) btn1.addView(sw) sw.onClick = function() if eooeis == 1 then eooeis = 2 if sw.isChecked() == true then sw.setChecked(false) else sw.setChecked(true) end else mode = sw.checked and "open" or "close" threadStart({ run = function() pcall(arr[i]["sub"][k][mode], arr[i]["sub"][k]) end, }) end end sw.onLongClick = function() eooeis = 1 functips(btn1, arr[i]["sub"][k]["tip"]) end load("return " .. menuid[i])().addView(btn1) end if arr[i]["sub"][k]["type"] == "4" then if not arr[i]["sub"][k]["min"] then arr[i]["sub"][k]["min"] = 0 end if not arr[i]["sub"][k]["progress"] then arr[i]["sub"][k]["progress"] = arr[i]["sub"][k]["min"] end local sw = { SeekBar, layout_width = "match", layout_height = "match", BackgroundDrawable = btsd, max = arr[i]["sub"][k]["max"], min = arr[i]["sub"][k]["min"], thumb = Drawable.createFromPath("/sdcard/lua脚本相关/luajava/IMG_20240315_124625.png"), } local sw = loadlayout(sw) sw.setProgress(arr[i]["sub"][k]["progress"]) local sw1 = { TextView, layout_width = "match", layout_height = "match", textColor = diy_fontcolor, textSize = "10", gravity = "center", text = tostring(arr[i]["sub"][k]["progress"]), } local sw1 = loadlayout(sw1) local btn1 = { LinearLayout, layout_width = "match", layout_margin = "5dp", background = getShepeBackground(diy_bb, 35), layout_height = "40dp", gravity = "center", } local btn1 = loadlayout(btn1) btn1.addView(sw1) btn1.addView(sw) local lllayoutParams = sw1.getLayoutParams() lllayoutParams.weight = 5 sw1.setLayoutParams(lllayoutParams) local lllayoutParams = sw.getLayoutParams() lllayoutParams.weight = 1 sw.setLayoutParams(lllayoutParams) sw.setOnSeekBarChangeListener({ onProgressChanged = function() progress = sw.getProgress() sw1.setText(tostring(progress)) qfunc = arr[i]["sub"][k]["func"] threadStart({ run = function() pcall(qfunc, arr[i]["sub"][k]) end, }) end, }) sw1.onLongClick = function() functips(btn1, arr[i]["sub"][k]["tip"]) end load("return " .. menuid[i])().addView(btn1) end if arr[i]["sub"][k]["type"] == "5" then local sw = { CheckBox, text = arr[i]["sub"][k]["text"], textColor = diy_fontcolor, BackgroundDrawable = btsd, padding = "5dp", layout_width = "match", layout_height = "match", } local sw = loadlayout(sw) local btn1 = { LinearLayout, layout_width = "match", layout_margin = "5dp", background = getShepeBackground(diy_bb, 35), layout_height = "wrap", orientation = "vertical", gravity = "center", } local btn1 = loadlayout(btn1) local btn3 = { LinearLayout, layout_width = "match", layout_height = "wrap", orientation = "vertical", gravity = "center", } local btn3 = loadlayout(btn3) btn1.addView(sw) btn1.addView(btn3) sw.onLongClick = function() eooeis = 1 functips(btn1, arr[i]["sub"][k]["tip"]) end sw.onClick = function() if eooeis == 1 then eooeis = 2 if sw.isChecked() == true then sw.setChecked(false) else sw.setChecked(true) end else if sw.checked then for oo = 1, #arr[i]["sub"][k]["sub"] do local btsd = StateListDrawable() btsd.addState({ pressed }, getShepeBackground(diy_zt, 35)) btsd.addState({ 0 }, getShepeBackground(diy_bb, 35)) if not arr[i]["sub"][k]["sub"][oo]["type"] then local sw = { LinearLayout, layout_width = "match", layout_margin = "5dp", layout_height = "30dp", gravity = "center", { TextView, text = arr[i]["sub"][k]["sub"][oo]["text"], textColor = diy_fontcolor, gravity = "center", BackgroundDrawable = btsd, layout_width = "match", layout_height = "match", }, } local sw = loadlayout(sw) sw.onClick = function() if eooeis == 1 then eooeis = 2 else func1 = arr[i]["sub"][k]["sub"][oo]["func"] threadStart({ run = function() pcall(func1) end, }) end end sw.onLongClick = function() eooeis = 1 functips(sw, arr[i]["sub"][k]["sub"][oo]["tip"]) end btn3.addView(sw) end if arr[i]["sub"][k]["sub"][oo]["type"] == "2" then local sw = { Switch, text = arr[i]["sub"][k]["sub"][oo]["text"], textColor = diy_fontcolor, BackgroundDrawable = btsd, padding = "5dp", layout_width = "match", layout_height = "match", } local sw = loadlayout(sw) local btn1 = { LinearLayout, layout_width = "match", layout_margin = "5dp", layout_height = "30dp", gravity = "center", } local btn1 = loadlayout(btn1) btn1.addView(sw) sw.onClick = function() if eooeis == 1 then eooeis = 2 if sw.isChecked() == true then sw.setChecked(false) else sw.setChecked(true) end else mode = sw.checked and "open" or "close" threadStart({ run = function() pcall( arr[i]["sub"][k]["sub"][oo][mode], arr[i]["sub"][k]["sub"][oo] ) end, }) end end sw.onLongClick = function() eooeis = 1 functips(sw, arr[i]["sub"][k]["sub"][oo]["tip"]) end btn3.addView(btn1) end if arr[i]["sub"][k]["sub"][oo]["type"] == "3" then local sw = { CheckBox, text = arr[i]["sub"][k]["sub"][oo]["text"], textColor = diy_fontcolor, BackgroundDrawable = btsd, layout_width = "match", layout_height = "match", } local sw = loadlayout(sw) local btn1 = { LinearLayout, layout_width = "match", layout_margin = "5dp", layout_height = "30dp", gravity = "center", } local btn1 = loadlayout(btn1) btn1.addView(sw) sw.onClick = function() if eooeis == 1 then eooeis = 2 if sw.isChecked() == true then sw.setChecked(false) else sw.setChecked(true) end else mode = sw.checked and "open" or "close" threadStart({ run = function() pcall( arr[i]["sub"][k]["sub"][oo][mode], arr[i]["sub"][k]["sub"][oo] ) end, }) end end sw.onLongClick = function() eooeis = 1 functips(sw, arr[i]["sub"][k]["sub"][oo]["tip"]) end btn3.addView(btn1) end end else btn3.removeAllViews() end end end load("return " .. menuid[i])().addView(btn1) end if arr[i]["sub"][k]["type"] == "6" then local sw = { Spinner, layout_height = "match", layout_width = "match", gravity = "center", } local sw = loadlayout(sw) local btn1 = { LinearLayout, layout_width = "match", layout_margin = "5dp", layout_height = "30dp", gravity = "center", } local btn1 = loadlayout(btn1) btn1.addView(sw) local shipei = {} for b = 1, #arr[i]["sub"][k]["sub"] do table.insert(shipei, arr[i]["sub"][k]["sub"][b]["text"]) end local array_adp = ArrayAdapter(activity, android.R.layout.simple_list_item_1, String(shipei)) sw.setAdapter(array_adp) sw.onLongClick = function() functips(sw, arr[i]["sub"][k]["tip"]) end sw.onItemSelected = function(eidiix, ieieie, p, eoosod) threadStart({ run = function() pcall(arr[i]["sub"][k]["sub"][p + 1]["func"]) end, }) end load("return " .. menuid[i])().addView(btn1) end end end end end xfcnotice = { LinearLayout, layout_width = "fill", layout_height = "fill", orientation = "vertical", { ScrollView, layout_width = "match", VerticalScrollBarEnabled = false, layout_height = "match", { LinearLayout, layout_height = "match", orientation = "vertical", layout_width = "match", { ShimmerTextView, reflectionColor = "#FFFFD5FF", textColor = "#FF989898", layout_weight = "2", layout_height = "match", layout_width = "match", id = "title_notice", text = "布告栏", gravity = "center", }, { LinearLayout, layout_width = "match", layout_margin = "5dp", layout_height = "40dp", gravity = "center", { ShimmerTextView, layout_width = "match", text = "脚本公告", layout_height = "match", id = "script_notice", reflectionColor = "#FFFF0000", textColor = diy_fontcolor, gravity = "center", }, }, { LinearLayout, layout_width = "match", layout_margin = "5dp", layout_height = "40dp", gravity = "center", { ShimmerTextView, layout_width = "match", text = "更新日志", layout_height = "match", id = "script_update", reflectionColor = "#FF00FF00", textColor = diy_fontcolor, gravity = "center", }, }, { LinearLayout, layout_width = "match", layout_margin = "5dp", layout_height = "40dp", gravity = "center", { ShimmerTextView, layout_width = "match", text = "使用教程", layout_height = "match", id = "script_tutorial", reflectionColor = "#FF0000FF", textColor = diy_fontcolor, gravity = "center", }, }, { LinearLayout, layout_width = "match", layout_margin = "5dp", layout_height = "40dp", gravity = "center", { ShimmerTextView, layout_width = "match", text = "常见问题", layout_height = "match", id = "script_question", reflectionColor = "#FFFF0000", textColor = diy_fontcolor, gravity = "center", }, }, { LinearLayout, layout_width = "match", layout_margin = "5dp", layout_height = "40dp", gravity = "center", { ShimmerTextView, layout_width = "match", text = "广告位", layout_height = "match", id = "script_AD", reflectionColor = "#FFFF0000", textColor = diy_fontcolor, gravity = "center", }, }, { LinearLayout, layout_width = "match", layout_margin = "5dp", layout_height = "40dp", gravity = "center", { ShimmerTextView, layout_width = "match", text = "开发者们", layout_height = "match", id = "script_Blacklist", reflectionColor = "#FF00FF00", textColor = diy_fontcolor, gravity = "center", }, }, { LinearLayout, layout_width = "match", layout_margin = "5dp", layout_height = "40dp", gravity = "center", orientation = "horizontal", { ShimmerTextView, layout_width = "match", layout_weight = "10", text = "联系作者", layout_height = "match", id = "script_zz", reflectionColor = "#FFFF0000", textColor = diy_fontcolor, gravity = "center", }, { ShimmerTextView, layout_width = "match", layout_weight = "10", text = "加入Q群", layout_height = "match", id = "script_qq", reflectionColor = "#FFFF0000", textColor = diy_fontcolor, gravity = "center", }, }, }, }, } --音乐唱片界面 xfcmusic_cd = { LinearLayout, layout_width = "fill", layout_height = "fill", orientation = "vertical", { LinearLayout, layout_width = "match", layout_height = "match", layout_weight = "2.5", orientation = "vertical", gravity = "center", { LinearLayout, layout_width = "match", layout_height = "match", layout_weight = "4", gravity = "center", { ImageView, layout_width = "50%w", layout_height = "50%w", id = "music_volume_down", layout_weight = "2", src = "/sdcard/.luajava/drawable/musicvoludown", }, { ShimmerTextView, reflectionColor = "#FFFFD5FF", textColor = "#FF989898", layout_height = "match", layout_width = "match", layout_weight = "1", id = "music_tiettle", text = "未在播放", gravity = "center", }, { ImageView, layout_width = "50%w", layout_height = "50%w", id = "music_volume_up", layout_weight = "2", src = "/sdcard/.luajava/drawable/musicvoluup", }, }, { LinearLayout, layout_width = "match", layout_height = "match", layout_margin = "10dp", layout_weight = "1", { CircleImageView, layout_width = "match", layout_height = "match", id = "music_cd", src = "/sdcard/.luajava/专辑封面/猫猫默认", }, }, }, { LinearLayout, layout_width = "match", layout_height = "match", layout_weight = "8", gravity = "center", { Chronometer, id = "xtime", layout_weight = "6.5", textSize = "10sp", gravity = "center", layout_width = "match", layout_height = "wrap", }, { SeekBar, id = "music_jdd", layout_weight = "3", layout_width = "match", layout_height = "wrap" }, { TextView, layout_width = "match", layout_height = "match", textSize = "10sp", text = "00:00", id = "time_you", layout_weight = "6.5", gravity = "center", }, }, { LinearLayout, layout_width = "match", layout_height = "match", layout_weight = "7.5", gravity = "center", { LinearLayout, layout_width = "match", layout_height = "match", layout_weight = "2", gravity = "center", { ImageView, layout_width = "20%w", layout_height = "20%w", id = "music_last", layout_weight = "2", src = "/sdcard/.luajava/drawable/musiclast", }, { ImageView, layout_width = "20%w", layout_height = "20%w", id = "music_pause", layout_weight = "2", src = "/sdcard/.luajava/drawable/musicpause", }, { ImageView, layout_width = "20%w", layout_height = "20%w", id = "music_next", layout_weight = "2", src = "/sdcard/.luajava/drawable/musicnext", }, { ImageView, layout_width = "20%w", layout_height = "20%w", id = "music_stop", layout_weight = "2", src = "/sdcard/.luajava/drawable/musicstop", }, }, }, } --音乐歌词 xfcmusic_lyric = { LinearLayout, layout_width = "fill", layout_height = "fill", orientation = "vertical", { LinearLayout, layout_width = "match", layout_height = "match", layout_weight = "6", { ShimmerTextView, reflectionColor = "#FFFFD5FF", textColor = "#FF989898", layout_height = "match", layout_width = "match", id = "music_lyrictie", text = "未在播放", gravity = "center", }, }, { LinearLayout, layout_width = "match", layout_height = "match", layout_weight = "1", { ScrollView, layout_height = "match", layout_width = "match", horizontalScrollBarEnabled = true, { LinearLayout, layout_width = "match", layout_margin = "5dp", layout_height = "fill", id = "music_lyric", orientation = "vertical", gravity = "center", }, }, }, } --音乐播放器 xfcmusic = { LinearLayout, layout_width = "fill", layout_height = "fill", orientation = "horizontal", { LinearLayout, layout_width = "match", layout_height = "match", layout_weight = "65", orientation = "vertical", { ScrollView, layout_width = "match", VerticalScrollBarEnabled = true, layout_height = "match", { LinearLayout, layout_height = "match", orientation = "vertical", layout_width = "match", { ShimmerTextView, reflectionColor = "#FFFFD5FF", textColor = "#FF989898", layout_height = "match", layout_width = "match", id = "title_music", text = "音乐播放器", gravity = "center", }, { LinearLayout, layout_width = "match", layout_margin = "5dp", layout_height = "40dp", gravity = "center", { ShimmerTextView, layout_width = "match", text = "添加本地歌单", layout_height = "match", id = "music_locallist", background = getShepeBackground(diy_bb, 35), reflectionColor = "#FF0000FF", textColor = diy_fontcolor, gravity = "center", }, }, { LinearLayout, layout_width = "match", layout_margin = "5dp", layout_height = "40dp", gravity = "center", { ShimmerTextView, layout_width = "match", text = "删除本地歌单", layout_height = "match", id = "music_locallist_delete", background = getShepeBackground(diy_bb, 35), reflectionColor = "#FF0000FF", textColor = diy_fontcolor, gravity = "center", }, }, { LinearLayout, layout_width = "match", layout_margin = "5dp", layout_height = "40dp", gravity = "center", { ShimmerTextView, layout_width = "match", text = "添加音乐封面", layout_height = "match", id = "music_local", background = getShepeBackground(diy_bb, 35), reflectionColor = "#FF0000FF", textColor = diy_fontcolor, gravity = "center", }, }, { ShimmerTextView, reflectionColor = "#FFFFD5FF", textColor = "#FF989898", layout_height = "match", layout_width = "match", id = "music_listtext", text = "本地歌单", gravity = "center", }, { LinearLayout, layout_width = "match", layout_margin = "5dp", layout_height = "match", id = "music_sdcard", orientation = "vertical", gravity = "center", }, }, }, }, { LinearLayout, layout_width = "match", layout_height = "match", layout_weight = "35", orientation = "vertical", { PageView, layout_width = "match", id = "page_music", layout_height = "match", pages = { xfcmusic_cd, xfcmusic_lyric }, }, }, } xfcset = { LinearLayout, layout_width = "fill", layout_height = "fill", orientation = "vertical", { ScrollView, layout_width = "match", VerticalScrollBarEnabled = false, layout_height = "match", { LinearLayout, layout_height = "match", orientation = "vertical", layout_width = "match", { ShimmerTextView, reflectionColor = "#FFFFD5FF", textColor = "#FF989898", layout_height = "match", layout_width = "match", id = "title_diy", text = "diy悬浮窗", gravity = "center", }, { LinearLayout, layout_width = "match", layout_margin = "5dp", layout_height = "40dp", gravity = "center", { ShimmerTextView, layout_width = "match", text = "预设主题", layout_height = "match", id = "diy_zt1", reflectionColor = "#FF00FF00", textColor = diy_fontcolor, gravity = "center", }, }, { LinearLayout, layout_width = "match", layout_margin = "5dp", layout_height = "40dp", gravity = "center", { ShimmerTextView, layout_width = "match", text = "diy悬浮窗主题色", layout_height = "match", id = "diy_xfczt", reflectionColor = "#FFFF0000", textColor = diy_fontcolor, gravity = "center", }, }, { LinearLayout, layout_width = "match", layout_margin = "5dp", layout_height = "40dp", gravity = "center", { ShimmerTextView, layout_width = "match", text = "diy功能按钮背景色", layout_height = "match", id = "diy_bottombackground2", reflectionColor = "#FF0000FF", textColor = diy_fontcolor, gravity = "center", }, }, { LinearLayout, layout_width = "match", layout_margin = "5dp", layout_height = "40dp", gravity = "center", { ShimmerTextView, layout_width = "match", text = "diy字体颜色", layout_height = "match", id = "diy_fontcolorr", reflectionColor = "#FFFF0000", textColor = diy_fontcolor, gravity = "center", }, }, { LinearLayout, layout_width = "match", layout_margin = "5dp", layout_height = "40dp", gravity = "center", { ShimmerTextView, layout_width = "match", text = "diy悬浮窗大小", layout_height = "match", id = "diy_xfc_size", reflectionColor = "#FF00FF00", textColor = diy_fontcolor, gravity = "center", }, }, { ShimmerTextView, reflectionColor = "#FFFFD5FF", textColor = "#FF989898", layout_height = "match", layout_width = "match", id = "title_cunchu", text = "脚本存储", gravity = "center", }, { LinearLayout, layout_width = "match", layout_margin = "5dp", layout_height = "40dp", gravity = "center", { ShimmerTextView, layout_width = "match", text = "退出GG", layout_height = "match", id = "GGexit", reflectionColor = "#FFFF0000", textColor = diy_fontcolor, gravity = "center", }, }, { LinearLayout, layout_width = "match", layout_margin = "5dp", layout_height = "40dp", gravity = "center", { ShimmerTextView, layout_width = "match", text = "恢复出厂设置", layout_height = "match", id = "set_1", reflectionColor = "#FFFF0000", textColor = diy_fontcolor, gravity = "center", }, }, }, }, } --悬浮窗 functions = { LinearLayout, layout_width = "fill", layout_height = "fill", orientation = "horizontal", { LinearLayout, layout_height = "match", orientation = "vertical", layout_weight = "4", gravity = "center", layout_width = "match", { LinearLayout, layout_height = "match", orientation = "vertical", layout_width = "match", layout_weight = "1.5", { CircleImageView, layout_width = "match", src = "/sdcard/.luajava/drawable/.icon.photo", layout_height = "match", layout_weight = "1", }, { ShimmerTextView, reflectionColor = "#FFFFD5FF", textColor = "#FF989898", layout_height = "match", layout_width = "match", id = "title_menu", text = "Menu", gravity = "center", layout_weight = "3", }, }, { ScrollView, layout_width = "match", layout_weight = "1", VerticalScrollBarEnabled = true, layout_height = "match", { LinearLayout, layout_height = "match", orientation = "vertical", id = "func_menu", layout_width = "match", }, }, { LinearLayout, layout_height = "match", layout_weight = "2.5", orientation = "vertical", layout_width = "match", { TextView, textColor = diy_fontcolor, layout_height = "match", layout_width = "match", id = "searchbut", layout_weight = "3", text = "搜索功能", gravity = "center", }, { TextView, textColor = diy_fontcolor, layout_height = "match", layout_width = "match", id = "logcont", layout_weight = "3", text = "日志", gravity = "center", }, }, }, { LinearLayout, layout_height = "match", orientation = "vertical", layout_weight = "1", layout_width = "match", { PageView, layout_width = "match", id = "page_main", layout_height = "match", pages = pages1, }, }, } xfcnl = { LinearLayout, layout_width = "fill", layout_height = "fill", orientation = "vertical", { ImageView, layout_width = "match", layout_height = "match", id = "LOGO", src = "/sdcard/.luajava/drawable/.shizuku.photo", }, } xfc = { LinearLayout, layout_height = "fill", orientation = "vertical", id = "touch", layout_width = "fill", { LinearLayout, layout_height = diy_height, orientation = "vertical", id = "touch", layout_width = diy_width, { LinearLayout, layout_height = "match", orientation = "horizontal", layout_weight = "10", layout_width = "match", { LinearLayout, layout_height = "match", layout_width = "match", { ImageView, layout_width = "match", layout_height = "match", layout_weight = "4", id = "LOGO", src = "/sdcard/.luajava/drawable/.shizuku.photo", }, { LinearLayout, layout_height = "match", layout_width = "match", layout_weight = "2", { HorizontalScrollView, fillViewport = "true", layout_height = "match", layout_width = "match", horizontalScrollBarEnabled = false, { LinearLayout, layout_height = "match", layout_width = "match", { TextView, textColor = "#FF989898", layout_weight = "2", layout_height = "match", layout_width = "match", id = "xfc_function", text = "🔧", gravity = "center", }, { TextView, textColor = "#FF989898", layout_weight = "2", layout_height = "match", layout_width = "match", id = "xfc_music", text = "🎵", gravity = "center", }, { TextView, textColor = "#FF989898", layout_weight = "2", layout_height = "match", layout_width = "match", id = "xfc_notice", text = "📋", gravity = "center", }, { TextView, textColor = "#FF989898", layout_weight = "2", layout_height = "match", layout_width = "match", id = "xfc_setting", text = "⚙", gravity = "center", }, { TextView, textColor = "#FF989898", layout_weight = "2", layout_height = "match", layout_width = "match", id = "xfc_nl", text = "✏️", gravity = "center", }, }, }, }, { LinearLayout, layout_height = "match", layout_width = "match", layout_weight = "4", { TextView, textColor = "#FF989898", layout_weight = "2", layout_height = "match", layout_width = "match", id = "xfc_yc", text = "➖", gravity = "center", }, { ImageView, layout_width = "wrap", src = "/sdcard/.luajava/drawable/exit", id = "xfc_exit", layout_height = "wrap", layout_weight = "2", }, }, }, }, { LinearLayout, layout_height = "match", --280 background = getShepeBackground(diy_zt, 35), orientation = "horizontal", id = "ooo", layout_weight = "1", layout_width = "match", --320 { PageView, layout_width = "match", id = "page_menu", layout_height = "match", pages = { functions, xfcmusic, xfcnotice, xfcset, xfcnl, }, }, }, }, } --悬浮球 xfq = { LinearLayout, layout_height = "fill", layout_width = "fill", { LinearLayout, layout_width = "50dp", { ImageView, layout_width = "50dp", src = "/sdcard/.luajava/drawable/.icon.photo", id = "suspended_ball", layout_height = "50dp", }, }, } xfqq = { LinearLayout, layout_height = "fill", layout_width = "fill", { LinearLayout, layout_width = "50dp", { ImageView, layout_width = "50dp", src = "/sdcard/.luajava/drawable/.move.photo", id = "move_ball", layout_height = "50dp", }, }, } name1 = { "轻型武装直升机", "机枪艇", "坦克", "悬浮坦克", "水下探测器", "建造者", "海上建造者", "拦截机", "登陆艇", "基础机甲", "直升机", "侦察者", "武装直升机", "重型坦克", "运输机", "潜水艇", "自行火炮", "导弹舰", "防空机甲", "重型气垫坦克", "等离子坦克", "重型拦截机", "激光坦克", "火炮机甲", "战列舰", "间谍无人机", "两栖喷气机", "防空导弹坦克", "重型火炮", "战斗工程师", "重型防空舰", "猛犸坦克", "导弹飞艇", "轰炸机", "移动炮塔", "机械师", "机枪机甲", "特斯拉机甲", "重型潜艇", "AA射束激光战机", "重型战舰", "等离子机甲", "飞行机甲", "重型防空机械装甲", "火蜂战机", "喷火机甲", "实验坦克", "重型导弹舰", "鹦鹉螺号", "概念型悬浮坦克", "航空母舰", "飞行堡垒", "实验型战斗蜘蛛", "模块化蜘蛛", "实验型悬浮气垫船", "炮塔", "防空炮塔", "资源抽取器", "陆军工厂", "资金箱子", "空军工厂", "海军工厂", "机械工厂", "激光防御塔", "火焰喷射器", "修复湾", "资源制造仪", "机枪t2", "瞭望塔", " T2防空炮塔", "火炮", "t2资源抽取器", "闪电炮塔", "指挥中心", "瞭望塔t2", "实验室", "T2高射炮", "水晶", "t3资源抽取器", "t2资源制造仪", "防御模式资源抽取器", "T2闪电炮塔", "实验工厂", "火炮t2", "机枪塔t3", " T3防空炮塔", "超频资源抽取器", " T3资源制造仪", "反核防御", "核弹发射井", "虫族资源制造仪", "建造虫", "小型噬咬虫", "大型噬咬虫", "瓢虫", "飞行建造虫", "运输虫", "远程虫", "爆炸虫", "飞行虫", "巨型噬咬虫", "小型资金制造虫", " T2远程虫", "大型资金制造虫", "虫王", "虫族工厂", "虫族炮塔", "虫族资源抽取器", } notice = [[ 特别鸣谢作者:Shizuku ❤️B站靓女空白❤️ ]] update = [[ 更新公告 ]] function LoadUi() local LayoutParams = WindowManager.LayoutParams mainLayoutParams = getLayoutParams(LayoutParams.FLAG_ALT_FOCUSABLE_IM | LayoutParams.FLAG_NOT_FOCUSABLE) xfq = loadlayout(xfq) xfc = loadlayout(xfc) xfqq = loadlayout(xfqq) function xfc_exit.onClick(v) --退出长摁事件 luajava.exit() gg.playMusic("stop") HotPoint.show() window.removeView(xfc) --移除窗口 Looper.myLooper().quitSafely() end function suspended_ball.onClick(v) --悬浮球点击事件 if ball_click == 1 then ball_click = nil else window.removeView(xfq) zoom_animation(ooo) --动画事件添加动画给悬浮窗 window.addView(xfc, mainLayoutParams) end end function move_ball.onClick(v) local h = gg.prompt( { "输入倍率", "选中建筑", "选中单位", "退出功能" }, nil, { "number", "checkbox", "checkbox", "checkbox" } ) if h[4] then window.removeView(xfqq) sparkle_animation(suspended_ball, 200) window.addView(xfq, mainLayoutParams) else if h[2] then gg.clearList() se(256, 4, 2) p(65792, 4, 0x4) p(65536, 4, -0x128) p(0, 4, -0x12C) local ca1 = gg.getValues({ [1] = { address = sj[1].address - 0x130, flags = 16, }, }) yzb = ca1[1].address yzl = ca1[1].value local ca2 = gg.getValues({ [1] = { address = sj[1].address - 0x134, flags = 16, }, }) xzb = ca2[1].address xzl = ca2[1].value else if h[3] then gg.clearList() se(256, 4, 2) p(65792, 4, 0x4) p(1116471296, 4, -0x8) local ca1 = gg.getValues({ [1] = { address = sj[1].address - 0x130, flags = 16, }, }) yzb = ca1[1].address yzl = ca1[1].value local ca2 = gg.getValues({ [1] = { address = sj[1].address - 0x134, flags = 16, }, }) xzb = ca2[1].address xzl = ca2[1].value end end beilvqq = h[1] end end function xfc_yc.onClick(v) --隐藏 window.removeView(xfc) rotation_animation(suspended_ball, 1000, 1440) hc_animation(suspended_ball, 900) window.addView(xfq, mainLayoutParams) end function suspended_ball.onTouch(v, event) --悬浮球移动事件 local Action = event.getAction() if Action == MotionEvent.ACTION_DOWN then isMove = false -- 点击时的XY坐标 RawX = event.getRawX() -- 获取X坐标 RawY = event.getRawY() -- 获取Y坐标 x = mainLayoutParams.x -- 申明变量xmX为原X坐标 y = mainLayoutParams.y -- 申明变量xmY为原Y坐标 elseif Action == MotionEvent.ACTION_MOVE then isMove = true -- 移动时的XY坐标 mainLayoutParams.x = tonumber(x) + (event.getRawX() - RawX) mainLayoutParams.y = tonumber(y) + (event.getRawY() - RawY) window.updateViewLayout(xfq, mainLayoutParams) end end function move_ball.onTouch(v, event) --悬浮球移动事件 local Action = event.getAction() if Action == MotionEvent.ACTION_DOWN then isMove = false -- 点击时的XY坐标 RawX = event.getRawX() -- 获取X坐标 RawY = event.getRawY() -- 获取Y坐标 x = mainLayoutParams.x -- 申明变量xmX为原X坐标 y = mainLayoutParams.y -- 申明变量xmY为原Y坐标 elseif Action == MotionEvent.ACTION_MOVE then isMove = true -- 移动时的XY坐标 mainLayoutParams.x = tonumber(x) + (event.getRawX() - RawX) mainLayoutParams.y = tonumber(y) + (event.getRawY() - RawY) miany = mainLayoutParams.y / beilvqq yzl = yzl + miany mianx = mainLayoutParams.x / beilvqq xzl = xzl + mianx window.updateViewLayout(xfqq, mainLayoutParams) gg.addListItems({ { address = yzb, flags = 16, value = yzl, freeze = true, }, }) gg.addListItems({ { address = xzb, flags = 16, value = xzl, freeze = true, }, }) end end function touch.onTouch(v, event) --悬浮窗移动事件 local Action = event.getAction() if Action == MotionEvent.ACTION_DOWN then isMove = false -- 点击时的XY坐标 RawX = event.getRawX() -- 获取X坐标 RawY = event.getRawY() -- 获取Y坐标 x = mainLayoutParams.x -- 申明变量xmX为原X坐标 y = mainLayoutParams.y -- 申明变量xmY为原Y坐标 --[[ lllayoutParams = ooo.getLayoutParams() xx=lllayoutParams.width yy=lllayoutParams.height }]] elseif Action == MotionEvent.ACTION_MOVE then isMove = true -- 移动时的XY坐标 mainLayoutParams.x = tonumber(x) + (event.getRawX() - RawX) mainLayoutParams.y = tonumber(y) + (event.getRawY() - RawY) window.updateViewLayout(xfc, mainLayoutParams) --[[ lllayoutParams.width = tonumber(xx)+((event.getRawX()-RawX)) lllayoutParams.height = tonumber(yy)+((event.getRawY()-RawY)) if lllayoutParams.width>500 and lllayoutParams.width500 and lllayoutParams.height 2 or diff < -2 then gg.playMusic("/sdcard/.luajava/music/" .. music_playing, music_jdd.getProgress() * 1000) end xtime.stop() xtime.setBase(SystemClock.elapsedRealtime() - time_cll - music_jdd.getProgress() * 1000) xtime.start() ii = i elseif music_load == 1 then toast.warn("暂停中,无法切换进度条") music_jdd.setProgress( string.replace((SystemClock.elapsedRealtime() - xtime.getBase()) // 1000, ".0", "") ) end end, }) --计时器监听 xtime.setOnChronometerTickListener({ onChronometerTick = function() music_jdd.setProgress( string.replace((SystemClock.elapsedRealtime() - xtime.getBase()) // 1000, ".0", "") ) if (SystemClock.elapsedRealtime() - xtime.getBase()) // 1000 > time_local then toast.warn("歌曲播放完毕,自动重播") playmusic(music_playing) end end, }) --暂停按钮 music_pause.onClick = function() if music_load == 2 then xtime.stop() music_jindu = SystemClock.elapsedRealtime() - xtime.getBase() gg.playMusic("pauseoff") music_tiettle.setText("暂停中") music_pause.setImageDrawable(Drawable.createFromPath("/sdcard/.luajava/drawable/musicpause")) music_load = 1 elseif music_load == 1 then music_tiettle.setText(music_playing) xtime.setBase(SystemClock.elapsedRealtime() - music_jindu) xtime.start() gg.playMusic("pauseon") music_load = 2 music_pause.setImageDrawable(Drawable.createFromPath("/sdcard/.luajava/drawable/musiccoti")) end end --切换上一首 music_last.onClick = function() for k, v in pairs(yinyue) do if v == music_playing then keyFound = k break end end if keyFound - 1 < 1 then toast.error("已经是第一首了哦") else playmusic(yinyue[keyFound - 1]) end end --切换下一首 music_next.onClick = function() for k, v in pairs(yinyue) do if v == music_playing then keyFound = k break end end if keyFound + 1 > #yinyue then toast.error("已经是最后一首了哦") else playmusic(yinyue[keyFound + 1]) end end --创建音乐按钮 local eee = file.list("/sdcard/.luajava/music/") yinyue = {} for i = 1, #eee do yinyue[i] = string.split(string_delet(eee[i], 0, 35), "/")[2] end for k, v in ipairs(yinyue) do music_sdcard.addView(music_bot(v, clickmusic)) end --降低音量 music_volume_down.onClick = function() audioManager.setStreamVolume(3, audioManager.getStreamVolume(3) - 1, 0) gg.toast("媒体音量降低为: " .. audioManager.getStreamVolume(3)) end --升高音量 music_volume_up.onClick = function() audioManager.setStreamVolume(3, audioManager.getStreamVolume(3) + 1, 0) gg.toast("媒体音量升高为: " .. audioManager.getStreamVolume(3)) end --结束播放按钮 music_stop.onClick = function() music_playing = nil xtime.stop() xtime.setBase(SystemClock.elapsedRealtime() - time_cll) xtime.start() xtime.stop() time_you.setText("00:00") gg.playMusic("stop") music_cd.setImageDrawable(Drawable.createFromPath("/sdcard/.luajava/专辑封面/猫猫默认")) music_tiettle.setText("未在播放") end --歌单添加封面 music_local.onClick = function() threadStart({ run = function() musicpath = gg.prompt( { "输入图片路径", "输入添加的歌曲名字" }, { "/sdcard", "" }, { "file", "text" } ) io.open("/sdcard/.luajava/专辑封面/" .. musicpath[2], "w+") :write(io.open(musicpath[1], "r"):read("*a")) end, }) end --歌单添加歌曲 music_locallist.onClick = function() threadStart({ run = function() musicpath = gg.prompt( { "输入本地音乐路径", "输入添加的歌曲名字" }, { "/sdcard", "" }, { "file", "text" } ) io.open("/sdcard/.luajava/music/" .. musicpath[2], "w+") :write(io.open(musicpath[1], "r"):read("*a")) end, }) end --歌单删除歌曲 music_locallist_delete.onClick = function() threadStart({ run = function() musicpath = gg.prompt({ "输入删除的歌曲名字" }, nil, { "text" }) gg.command("rm -rf /sdcard/.luajava/music/" .. musicpath[1] .. "") end, }) end --QQ登陆 if io.open("/sdcard/.luajava/diy/.QQ.lua") == nil then local yp1 = { LinearLayout, orientation = "vertical", layout_width = "fill", layout_height = "fill", gravity = "center", { LinearLayout, layout_width = "match", layout_height = "50dp", gravity = "center", id = "QQtou" }, { EditText, id = "QQintname", Hint = "请输入名称", layout_width = "match", layout_height = "wrap", inputType = "text", }, { EditText, id = "QQintnum", Hint = "请输入QQ号(真实输入)", layout_width = "match", layout_height = "wrap", inputType = "number", }, { HorizontalScrollView, horizontalScrollBarEnabled = false, { LinearLayout, id = "QQintnum_bar", layout_width = "20dp" }, layout_width = "fill", }, { EditText, id = "QQintcode", Hint = "请输入密码(随便填)", layout_width = "match", layout_height = "wrap", inputType = "text", }, { HorizontalScrollView, horizontalScrollBarEnabled = false, { LinearLayout, id = "QQintcode_bar", layout_width = "20dp" }, layout_width = "fill", }, } local yp1 = loadlayout(yp1) barid = QQintnum for k, v in ipairs(Shortcutbar) do QQintnum_bar.addView(newButton(v, clicktext)) end barid_b = QQintcode for k, v in ipairs(Shortcutbar) do QQintcode_bar.addView(newButton(v, clicktext_b)) end function QQtoux() local btn = { CircleImageView, layout_width = "50dp", layout_height = "50dp", id = "QQtouxx", src = "https://q.qlogo.cn/g?b=qq&nk=" .. QQintnum.getText().toString() .. "&s=100", } local btn = loadlayout(btn) return btn end QQintnum.addTextChangedListener({ onTextChanged = function(view, i) QQtou.removeView(QQtouxx) QQtou.addView(QQtoux()) end, }) local dlog = { message = "输入自己QQ号", title = "QQ号登陆", view = yp1, potext = "确定", pofunc = function() io.open("/sdcard/.luajava/diy/.QQ.lua", "w+"):write( "name='" .. QQintname.getText().toString() .. "'\nQQnum='" .. QQintnum.getText().toString() .. "'" ) end, } layDialog(dlog) end GGexit.onClick = function() gg.exit() end function mb() gg.clearResults() qm = { { ["m"] = 2, }, { ["n"] = "提示:", }, { ["v"] = A, ["t"] = 16, }, { ["lv"] = 60.0, ["o"] = -0x8, ["t"] = 16, }, { ["lv"] = 60.0, ["o"] = -0x14, ["t"] = 16, }, { ["lv"] = B, ["o"] = -0x10 - 0xBC, ["t"] = 4, }, } qx = { { ["v"] = 1.0, ["o"] = -0x10, ["t"] = 16, }, } xq(qm) gg.clearResults() end --控制单位移动区操作 controlmove_choose.onClick = function() threadStart({ run = function() gg.clearList() se(256, 4, 2) p(65792, 4, 0x4) p(65536, 4, -0x128) p(0, 4, -0x12C) ca1 = gg.getValues({ [1] = { address = sj[1].address - 0x130, flags = 16, }, }) yzb = ca1[1].address yzl = ca1[1].value ca2 = gg.getValues({ [1] = { address = sj[1].address - 0x134, flags = 16, }, }) xzb = ca2[1].address xzl = ca2[1].value end, }) end controlmove_on.onClick = function() threadStart({ run = function() yzl = yzl - zbzl gg.setValues({ { address = yzb, flags = 16, value = yzl, }, }) end, }) end controlmove_zs.onClick = function() threadStart({ run = function() xzl = xzl - zbzl gg.setValues({ { address = xzb, flags = 16, value = xzl, }, }) yzl = yzl - zbzl gg.setValues({ { address = yzb, flags = 16, value = yzl, }, }) end, }) end controlmove_ys.onClick = function() threadStart({ run = function() xzl = xzl + zbzl gg.setValues({ { address = xzb, flags = 16, value = xzl, }, }) yzl = yzl - zbzl gg.setValues({ { address = yzb, flags = 16, value = yzl, }, }) end, }) end controlmove_setting.onClick = function() threadStart({ run = function() np = gg.prompt({ "请输入坐标增量", }, {}, {}) zbzl = np[1] end, }) end controlmove_left.onClick = function() threadStart({ run = function() xzl = xzl - zbzl gg.setValues({ { address = xzb, flags = 16, value = xzl, }, }) end, }) end controlmove_zx.onClick = function() threadStart({ run = function() xzl = xzl - zbzl gg.setValues({ { address = xzb, flags = 16, value = xzl, }, }) yzl = yzl + zbzl gg.setValues({ { address = yzb, flags = 16, value = yzl, }, }) end, }) end controlmove_down.onClick = function() threadStart({ run = function() yzl = yzl + zbzl gg.setValues({ { address = yzb, flags = 16, value = yzl, }, }) end, }) end controlmove_right.onClick = function() threadStart({ run = function() xzl = xzl + zbzl gg.setValues({ { address = xzb, flags = 16, value = xzl, }, }) end, }) end controlmove_yx.onClick = function() threadStart({ run = function() xzl = xzl + zbzl gg.setValues({ { address = xzb, flags = 16, value = xzl, }, }) yzl = yzl + zbzl gg.setValues({ { address = yzb, flags = 16, value = yzl, }, }) end, }) end controlmove_ball.onClick = function() threadStart({ run = function() window.removeView(xfc) window.addView(xfqq, mainLayoutParams) --添加窗口事件 end, }) end controlmove_choose2.onClick = function() threadStart({ run = function() gg.clearList() se(256, 4, 2) p(65792, 4, 0x4) p(1116471296, 4, -0x8) ca1 = gg.getValues({ [1] = { address = sj[1].address - 0x130, flags = 16, }, }) yzb = ca1[1].address yzl = ca1[1].value ca2 = gg.getValues({ [1] = { address = sj[1].address - 0x134, flags = 16, }, }) xzb = ca2[1].address xzl = ca2[1].value end, }) end controlmove_1.onClick = function() end suoshu_dw_1.onClick = function() threadStart({ run = function() se(256, 4, 2) p(65792, 4, 0x4) p(1116471296, 4, -0x8) if #sj == 0 then gg.alert("获取失败,请重新获取") dw_() else --防止未搜索到而报错结束 suoshu_s3 = gg.getValues({ [1] = { address = sj[1].address - 256, flags = 4, }, })[1].value --获取当前选中单位的所属代码,即1号的单位所属代码 gg.toast("获取成功") end end, }) end suoshu_dw_2.onClick = function() threadStart({ run = function() se(256, 4, 2) p(65792, 4, 0x4) p(1116471296, 4, -0x8) if #sj == 0 then gg.alert("获取失败,请重新获取") dw_() else --防止未搜索到而报错结束 suoshu_s4 = gg.getValues({ [1] = { address = sj[1].address - 256, flags = 4, }, })[1].value gg.toast("获取成功") --定位内存数组 gg.clearResults() gg.setRanges(2) gg.searchNumber( "0;10;" .. suoshu_s3 .. ";" .. suoshu_s4 .. "::13", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1 ) --联合搜索定位内存数组 gg.sleep(7500) --休眠7500ms等待数值变化 gg.searchNumber( "0;10;" .. suoshu_s3 .. ";" .. suoshu_s4 .. "::13", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1 ) --改善去除变化的值 gg.searchNumber("10", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1) result = gg.getResults(1) suoshu_qd1 = result[1].address --获取内存数组第一个值的地址 suoshu_list1 = {} --创建空表作为容器 for i = 1, 10 do suoshu_list1[i] = gg.getValues({ [i] = { address = suoshu_qd1 + 4 * i, flags = 4, }, })[i].value --将内存数组转换成表,长度为10 end gg.toast("获取完成") end gg.clearResults() end, }) end suoshu_jz_1.onClick = function() threadStart({ run = function() se(256, 4, 2) p(65792, 4, 0x4) p(65536, 4, -0x128) p(0, 4, -0x12C) if #sj == 0 then gg.alert("获取失败,请重新获取") jz_() else --防止未搜索到而报错结束 suoshu_s1 = gg.getValues({ [1] = { address = sj[1].address - 256, flags = 4, }, })[1].value --获取当前选中建筑的所属代码,即1号的建筑所属代码 gg.toast("获取成功") end end, }) end suoshu_jz_2.onClick = function() threadStart({ run = function() se(256, 4, 2) p(65792, 4, 0x4) p(65536, 4, -0x128) p(0, 4, -0x12C) if #sj == 0 then gg.alert("获取失败,请重新获取") jz_() else --防止未搜索到而报错结束 suoshu_s2 = gg.getValues({ [1] = { address = sj[1].address - 256, flags = 4, }, })[1].value gg.toast("获取成功") --进行内存数组定位 gg.clearResults() gg.setRanges(2) gg.searchNumber( "0;10;" .. suoshu_s1 .. ";" .. suoshu_s2 .. "::13", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1 ) --联合搜索定位内存数组 gg.sleep(7500) --休眠7500ms等待数值变化 gg.searchNumber( "0;10;" .. suoshu_s1 .. ";" .. suoshu_s2 .. "::13", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1 ) --改善去除变化的值 gg.searchNumber("10", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1) result = gg.getResults(1) suoshu_qd = result[1].address --获取内存数组第一个值的地址 suoshu_list = {} --创建空表作为容器 for i = 1, 10 do suoshu_list[i] = gg.getValues({ [i] = { address = suoshu_qd + 4 * i, flags = 4, }, })[i].value --将内存数组转换成表,长度为10 end gg.toast("获取完成") end gg.clearResults() end, }) end suoshu_dw_xg.onClick = function() threadStart({ run = function() np = gg.prompt({ "请输入选中目标想改的出生点(号)", }, {}, {}) xg = tonumber(np[1]) --获取输入的数并转为数字 se(256, 4, 2) p(65792, 4, 0x4) p(1116471296, 4, -0x8) if #sj == 0 then gg.alert("获取失败,请重新获取") dw_() else --防止未搜索到而报错结束 gg.setValues({ [1] = { address = sj[1].address - 256, flags = 4, value = suoshu_list1[xg], }, }) --修改当前选中单位所属代码值为获取的内存数组表的第(输入数字)个键值 gg.toast("修改成功") end end, }) end suoshu_jz_xg.onClick = function() threadStart({ run = function() np = gg.prompt({ "请输入选中目标想改的出生点(号)", }, {}, {}) xg = tonumber(np[1]) --获取输入的数并转为数字 se(256, 4, 2) p(65792, 4, 0x4) p(65536, 4, -0x128) p(0, 4, -0x12C) if #sj == 0 then gg.alert("获取失败,请重新获取") jz_() else --防止未搜索到而报错结束 gg.setValues({ [1] = { address = sj[1].address - 256, flags = 4, value = suoshu_list[xg], }, }) --修改当前选中建筑所属代码值为获取的内存数组表的第(输入数字)个键值 gg.toast("修改成功") end end, }) end suoshu_tip.onClick = function() threadStart({ run = function() gg.alert( "刚运行此脚本时,无论是建筑还是单位,必须先使用获取所属代码把1号和2号两个功能获取一遍,比如你是在建筑区里面点获取,那就选中1号的一个基地炮塔什么的然后点击获取1号所属代码,接着选中2号的一个基地炮塔什么的点击获取2号所属代码,搜索2号所属代码后修改器会执行一个非常慢的联合搜索,这时你需要点开修改器,点击取消按钮(停止搜索),然后等待修改器弹出获取成功的提示即可,必须先获取1号再获取2号,一个区域获取一遍之后,以后修改就不需要再获取了,但是单位区和建筑区是不通用的,如果两个都想用,必须都获取一遍,实在看不懂的蠢猫看教程视频" ) end, }) end script_zz.onClick = function() threadStart({ run = function() qq.join("QQ号") end, }) end script_qq.onClick = function() threadStart({ run = function() qq.joinGroup("群") end, }) end set_1.onClick = function() threadStart({ run = function() set = gg.colorAlert( "操作警告", "确认要恢复出厂设置吗 此操作会删除脚本所有的相关配置文件 包括主题也会恢复成高冷黑色主题", "确定", "取消" ) if set == 1 then gg.command("rm -rf /sdcard/.luajava/") gg.command("rm -rf /sdcard/Android/searchconfiguration.lua ") gg.command("rm -rf /sdcard/Android/inidata.lua ") end end, }) end script_notice.onClick = function() threadStart({ run = function() gg.alert(notice) end, }) end script_AD.onClick = function() threadStart({ run = function() gg.alert("广告位") end, }) end script_update.onClick = function() threadStart({ run = function() gg.alert(update) end, }) end script_tutorial.onClick = function() threadStart({ run = function() tutor = gg.choice({ "建造ID", "生产id", "控制选择单位移动", }, nil, "b站也会发详细视频教程,可以去看看") if tutor == 1 then image( "https://vip.123pan.cn/1813873690/luaj%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6/IMG_20240131_111149.png" ) end if tutor == 2 then oio = gg.alert("看b站演示视频还是图片教程", "视频", "图片") if oio == 1 then gg.gotoBrowser("") else image("") end elseif tutor == 3 then image( "https://vip.123pan.cn/1813873690/luaj%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6/IMG_20240131_122809.png" ) end end, }) end script_Blacklist.onClick = function() threadStart({ run = function() blacklist = [[ 开发人员 B站-靓女空白 特别鸣谢 沉枫 Leo 鲨鲨 MF皞月 自己 技术支持(Luaj例子,GG底包) ELGG团队 ModGG团队 妒猫 evening 文艺 ]] gg.alert(blacklist) end, }) end script_question.onClick = function() threadStart({ run = function() question = gg.choice({ "悬浮窗卡死怎么办", "为何功能开启失败", }, nil, nil) if question == 1 then gg.alert("点击GG图标\n点击顶栏最左边的栏目\n点击退出按钮") elseif question == 2 then gg.alert( "点击GG图标,检查是否选择铁锈战争的游戏进程\n检查是否符合使用条件\n检查是否是自定义超大型地图或加了模组" ) end end, }) end diy_zt1.onClick = function() zt1_colorChoice = { LinearLayout, orientation = "vertical", layout_width = "fill", layout_height = "fill", { LinearLayout, orientation = "vertical", layout_width = "match", id = "zt1color", layout_height = "300dp", { LinearLayout, layout_height = "30dp", layout_width = "match", orientation = "horizontal", { TextView, layout_height = "match", layout_width = "match", layout_weight = "5", text = "悬浮窗主题色", textSize = "10sp", gravity = "center", textColor = diy_zt, }, { TextView, layout_height = "match", layout_width = "match", layout_weight = "5", text = "功能按钮背景色", gravity = "center", textSize = "10sp", textColor = diy_bb, }, { TextView, layout_height = "match", layout_width = "match", layout_weight = "5", text = "字体颜色", gravity = "center", textSize = "10sp", textColor = diy_fontcolor, }, { View, background = getShepeBackground(0x00ffffff, 35), layout_width = "match", layout_height = "match", layout_weight = "6", }, }, }, } local zt1_colorChoice = loadlayout(zt1_colorChoice) function colors(diy_fontcolor1, diy_bb1, diy_zt1) local oeie = { LinearLayout, layout_height = "match", layout_width = "match", orientation = "horizontal", layout_weight = "2", { TextView, layout_height = "match", layout_width = "match", layout_weight = "2", textSize = "10sp", text = string.format("%x", diy_zt1), gravity = "center", textColor = diy_zt1, }, { View, background = getShepeBackground(diy_zt1, 30), layout_width = "match", layout_height = "match", layout_weight = "2", }, { TextView, layout_height = "match", layout_width = "match", layout_weight = "2", text = string.format("%x", diy_bb1), textSize = "10sp", gravity = "center", textColor = diy_bb1, }, { View, background = getShepeBackground(diy_bb1, 30), layout_width = "match", layout_height = "match", layout_weight = "2", }, { TextView, layout_height = "match", layout_width = "match", layout_weight = "2", text = string.format("%x", diy_fontcolor1), textSize = "10sp", gravity = "center", textColor = diy_fontcolor1, }, { View, background = getShepeBackground(diy_fontcolor1, 30), layout_width = "match", layout_height = "match", layout_weight = "2", }, { TextView, layout_height = "match", layout_width = "match", layout_weight = "2", text = "选择", gravity = "center", id = "zt1", textColor = "0xFFFFFFFF", }, } local oeie = loadlayout(oeie) zt1.onClick = function() diy_fontcolor2 = diy_fontcolor1 diy_zt2 = diy_zt1 diy_bb2 = diy_bb1 gg.toast("选择成功,点击右下角设置修改") end zt1color.addView(oeie) end colors(0xFFFFFFFF, 0xDA303030, 0xDF383838) colors(0xFFFFFFFF, 0x9CFFA817, 0xCEFFEE74) colors(0xFFFFFFFF, 0xD8FF5DFF, 0xBDFF8BFF) colors(0xFFFFFFFF, 0xEF8BE2FF, 0xCBA2F3FF) colors(0xFFFFFFFF, 0xE2AEA2FF, 0xCCA2AEFF) colors(0xFFFFFFFF, 0xDC5DFF5D, 0xBA5DFF5D) colors(0xFFFFFFFF, 0xFFFFFFFF, 0xDC5DFF5D) local dlog = { title = "预设主题", view = zt1_colorChoice, potext = "设置", pofunc = function() gg.command( 'sed -i "1c diy_zt=' .. "'" .. "0x" .. string.format("%x", diy_zt2) .. "'" .. '" /sdcard/.luajava/diy/.悬浮窗.lua' ) gg.command( 'sed -i "2c diy_bb=' .. "'" .. "0x" .. string.format("%x", diy_bb2) .. "'" .. '" /sdcard/.luajava/diy/.悬浮窗.lua' ) gg.command( 'sed -i "3c diy_fontcolor=' .. "'" .. "#" .. string.format("%x", diy_fontcolor2) .. "'" .. '" /sdcard/.luajava/diy/.悬浮窗.lua' ) gg.toast("修改成功,重启脚本生效") end, neutext = "取消", neufunc = function() end, color = 0x00000000, } layDialog(dlog) end diy_xfc_size.onClick = function() xfcsize_colorChoice = { LinearLayout, orientation = "vertical", layout_width = "fill", layout_height = "fill", gravity = "center", { LinearLayout, orientation = "vertical", layout_width = "100dp", layout_height = "100dp", gravity = "center", { View, id = "xfcsize_colorCard", -- layout_margin="10dp"; -- radius="35dp", elevation = "0dp", layout_width = "10dp", layout_height = "10dp", background = getShepeBackground(diy_zt, 35), }, }, { TextView, -- layout_margin="10dp"; textSize = "10sp", id = "xfcsize_colorText", textColor = 0xFFFFFFFF, }, { TextView, -- layout_margin="10dp"; textSize = "10sp", id = "xfcsize_colorText1", textColor = 0xFFFFFFFF, }, { SeekBar, id = "xfcsize_color1", layout_margin = "15dp", layout_width = "match", layout_height = "wrap", }, { SeekBar, id = "xfcsize_color2", layout_margin = "15dp", layout_width = "match", layout_height = "wrap", }, } local xfcsize_colorChoice = loadlayout(xfcsize_colorChoice) xfcsize_color1.ProgressDrawable.setColorFilter(PorterDuffColorFilter(0xFFFB7299, PorterDuff.Mode.SRC_ATOP)) xfcsize_color1.setMax(365) xfcsize_color2.setMax(390) xfcsize_color1.setMin(180) xfcsize_color2.setMin(160) xfcsize_color1.setProgress(string.sub(tostring(diy_width), 1, 3)) xfcsize_color2.setProgress(string.sub(tostring(diy_height), 1, 3)) xfcsize_color1.setOnSeekBarChangeListener({ onProgressChanged = function(view, i) updateArgb1() end, }) xfcsize_color2.setOnSeekBarChangeListener({ onProgressChanged = function(view, i) updateArgb1() end, }) function updateArgb1() local a = xfcsize_color1.getProgress() local r = xfcsize_color2.getProgress() xfcsize_colorText.Text = "宽" .. a .. "dp" xfcsize_colorText1.Text = "高" .. r .. "dp" llayoutParams = xfcsize_colorCard.getLayoutParams() llayoutParams.width = a // 1.3 llayoutParams.height = r // 1.3 xfcsize_colorCard.setLayoutParams(llayoutParams) end local dlog = { title = "悬浮窗大小调节", view = xfcsize_colorChoice, potext = "选择", pofunc = function() local a = xfcsize_color1.getProgress() local r = xfcsize_color2.getProgress() gg.command('sed -i "4c diy_width=' .. "'" .. a .. "dp'" .. '" /sdcard/.luajava/diy/.悬浮窗.lua') gg.command( 'sed -i "5c diy_height=' .. "'" .. r .. "dp'" .. '" /sdcard/.luajava/diy/.悬浮窗.lua' ) end, neutext = "取消", neufunc = function() end, } updateArgb1() layDialog(dlog) end function colorChoice(colorCard, colorText, color1, color2, color3, color4) diy_colorChoice = { LinearLayout, orientation = "vertical", layout_width = "fill", layout_height = "fill", gravity = "center", { View, id = colorCard, layout_margin = "10dp", elevation = "0dp", layout_width = "20%w", layout_height = "20%w", }, { TextView, layout_margin = "10dp", textSize = "10sp", id = colorText, textColor = 0xFFFFFFFF }, { SeekBar, id = color1, layout_margin = "15dp", layout_width = "match", layout_height = "wrap" }, { SeekBar, id = color2, layout_margin = "15dp", layout_width = "match", layout_height = "wrap" }, { SeekBar, id = color3, layout_margin = "15dp", layout_width = "match", layout_height = "wrap" }, { SeekBar, id = color4, layout_margin = "15dp", layout_width = "match", layout_height = "wrap" }, } end function diy_seekupdate(colorCard, colorText, color1, color2, color3, color4, diy1, iii) color1.setMax(255) color2.setMax(255) color3.setMax(255) color4.setMax(255) color1.setMin(1) color2.setMin(1) color3.setMin(1) color4.setMin(1) color1.setProgress("0x" .. string.sub(tostring(diy1), 3 - iii, 4 - iii)) color2.setProgress("0x" .. string.sub(tostring(diy1), 5 - iii, 6 - iii)) color3.setProgress("0x" .. string.sub(tostring(diy1), 7 - iii, 8 - iii)) color4.setProgress("0x" .. string.sub(tostring(diy1), 9 - iii, 10 - iii)) color1.setOnSeekBarChangeListener({ onProgressChanged = function(view, i) updateArgb() end, }) color2.setOnSeekBarChangeListener({ onProgressChanged = function(view, i) updateArgb() end, }) color3.setOnSeekBarChangeListener({ onProgressChanged = function(view, i) updateArgb() end, }) color4.setOnSeekBarChangeListener({ onProgressChanged = function(view, i) updateArgb() end, }) --更新颜色 function updateArgb() local a = color1.getProgress() local r = color2.getProgress() local g = color3.getProgress() local b = color4.getProgress() local argb_hex = (a << 24 | r << 16 | g << 8 | b) colorText.Text = string.format("%#x", argb_hex) colorCard.setBackgroundColor(argb_hex) end end diy_xfczt.onClick = function() colorChoice("zt1_colorCard", "zt1_colorText", "zt1_color1", "zt1_color2", "zt1_color3", "zt1_color4") local zt1_colorChoice = loadlayout(diy_colorChoice) diy_seekupdate(zt1_colorCard, zt1_colorText, zt1_color1, zt1_color2, zt1_color3, zt1_color4, diy_zt, 0) local dlog = { title = "悬浮窗主题色调色板", view = zt1_colorChoice, potext = "选择", pofunc = function() local a = zt1_color1.getProgress() local r = zt1_color2.getProgress() local g = zt1_color3.getProgress() local b = zt1_color4.getProgress() local argb_hex = (a << 24 | r << 16 | g << 8 | b) local argb_str = string.format("%#x", argb_hex) gg.command( 'sed -i "1c diy_zt=' .. "'0x" .. argb_str .. "'" .. '" /sdcard/.luajava/diy/.悬浮窗.lua' ) gg.toast("修改成功,重启脚本生效") end, neutext = "取消", neufunc = function() end, } updateArgb() layDialog(dlog) end diy_bottombackground2.onClick = function() colorChoice("bb_colorCard", "bb_colorText", "bb_color1", "bb_color2", "bb_color3", "bb_color4") local bb_colorChoice = loadlayout(diy_colorChoice) diy_seekupdate(bb_colorCard, bb_colorText, bb_color1, bb_color2, bb_color3, bb_color4, diy_bb, 0) local dlog = { title = "功能按钮背景色", view = bb_colorChoice, potext = "选择", pofunc = function() local a = bb_color1.getProgress() local r = bb_color2.getProgress() local g = bb_color3.getProgress() local b = bb_color4.getProgress() local argb_hex = (a << 24 | r << 16 | g << 8 | b) local argb_str = string.format("%#x", argb_hex) gg.command( 'sed -i "2c diy_bb=' .. "'0x" .. argb_str .. "'" .. '" /sdcard/.luajava/diy/.悬浮窗.lua' ) gg.toast("修改成功,重启脚本生效") end, neutext = "取消", neufunc = function() end, } updateArgb() layDialog(dlog) end diy_fontcolorr.onClick = function() colorChoice( "fontcolor_colorCard", "fontcolor_colorText", "fontcolor_color1", "fontcolor_color2", "fontcolor_color3", "fontcolor_color4" ) local fontcolor_colorChoice = loadlayout(diy_colorChoice) diy_seekupdate( fontcolor_colorCard, fontcolor_colorText, fontcolor_color1, fontcolor_color2, fontcolor_color3, fontcolor_color4, diy_fontcolor, 1 ) local dlog = { title = "字体颜色", view = fontcolor_colorChoice, potext = "选择", pofunc = function() local a = fontcolor_color1.getProgress() local r = fontcolor_color2.getProgress() local g = fontcolor_color3.getProgress() local b = fontcolor_color4.getProgress() local argb_hex = (a << 24 | r << 16 | g << 8 | b) local argb_str = string.format("%#x", argb_hex) gg.command( 'sed -i "3c diy_fontcolor=' .. "'#" .. argb_str .. "'" .. '" /sdcard/.luajava/diy/.悬浮窗.lua' ) gg.toast("修改成功,重启脚本生效") end, neutext = "取消", neufunc = function() end, } updateArgb() layDialog(dlog) end --设置page页面滑动事件 page_menu.setOnPageChangeListener(PageView.OnPageChangeListener({ onPageSelected = function(vv) if vv == 0 then xfc_function.setBackgroundDrawable(getShepeBackground(diy_zt, 35)) xfc_music.setBackgroundDrawable(getShepeBackground(0x00FFFFFF, 35)) xfc_notice.setBackgroundDrawable(getShepeBackground(0x00FFFFFF, 35)) xfc_setting.setBackgroundDrawable(getShepeBackground(0x00FFFFFF, 35)) xfc_nl.setBackgroundDrawable(getShepeBackground(0x00FFFFFF, 35)) end if vv == 1 then xfc_function.setBackgroundDrawable(getShepeBackground(0x00FFFFFF, 35)) xfc_music.setBackgroundDrawable(getShepeBackground(diy_zt, 35)) xfc_notice.setBackgroundDrawable(getShepeBackground(0x00FFFFFF, 35)) xfc_setting.setBackgroundDrawable(getShepeBackground(0x00FFFFFF, 35)) xfc_nl.setBackgroundDrawable(getShepeBackground(0x00FFFFFF, 35)) end if vv == 2 then xfc_function.setBackgroundDrawable(getShepeBackground(0x00FFFFFF, 35)) xfc_music.setBackgroundDrawable(getShepeBackground(0x00FFFFFF, 35)) xfc_notice.setBackgroundDrawable(getShepeBackground(diy_zt, 35)) xfc_setting.setBackgroundDrawable(getShepeBackground(0x00FFFFFF, 35)) xfc_nl.setBackgroundDrawable(getShepeBackground(0x00FFFFFF, 35)) end if vv == 3 then xfc_function.setBackgroundDrawable(getShepeBackground(0x00FFFFFF, 35)) xfc_music.setBackgroundDrawable(getShepeBackground(0x00FFFFFF, 35)) xfc_notice.setBackgroundDrawable(getShepeBackground(0x00FFFFFF, 35)) xfc_setting.setBackgroundDrawable(getShepeBackground(diy_zt, 35)) xfc_nl.setBackgroundDrawable(getShepeBackground(0x00FFFFFF, 35)) end if vv == 4 then xfc_function.setBackgroundDrawable(getShepeBackground(0x00FFFFFF, 35)) xfc_music.setBackgroundDrawable(getShepeBackground(0x00FFFFFF, 35)) xfc_notice.setBackgroundDrawable(getShepeBackground(0x00FFFFFF, 35)) xfc_setting.setBackgroundDrawable(getShepeBackground(0x00FFFFFF, 35)) xfc_nl.setBackgroundDrawable(getShepeBackground(diy_zt, 35)) end end, })) local shimmernums = { title_move, music_tiettle, music_lyrictie, title_diy, title_music, title_notice, title_menu, title_cunchu, music_listtext, } for i = 1, #shimmernums do shimmer.start(shimmernums[i]) end function suspended_ball.onLongClick(v) --悬浮球长按事件 createPopupMenu(v) ball_click = 1 end function createPopupMenu(v) local popupMenu = PopupMenu(activity, v) -- 创建SubMenu菜单 local m = { { MenuItem, title = "隐藏GG", id = "randomstring", func = function(v) -- Lock.unMain() gg.hide(true) end, }, { MenuItem, title = "显示GG", id = "file_save2", func = function(v) gg.hide(false) end, }, { MenuItem, title = "新线程运行其它脚本", id = "codeScript", func = function(v) local path = gg.prompt({ "输入脚本路径", }, { "/sdcard/", }, { "file", })[1] gg.codeScript(path) end, }, { MenuItem, title = "调用微信扫一扫", id = "vx_sys", func = function(v) intent = Intent() intent.setComponent(ComponentName("com.tencent.mm", "com.tencent.mm.ui.LauncherUI")) intent.putExtra("LauncherUI.From.Scaner.Shortcut", true) intent.setFlags(335544320) intent.setAction("android.intent.action.VIEW") activity.startActivity(intent) end, }, { MenuItem, title = "开发中的功能", id = "doing", func = function(v) gg.alert( "想做的\n没有\n懒得做的\n指定玩家聚集单位建筑\n新思路透视\n想要什么功能可以反馈作者" ) end, }, { SubMenu, title = "QQ操作...", { MenuItem, title = "联系作者", id = "QQ_author", func = function(v) qq.join("2478723539") end, }, { MenuItem, title = "加入QQ群", id = "QQ_group", func = function(v) qq.joinGroup("778101805") end, }, }, { SubMenu, title = "函数测试...", { MenuItem, title = "网页浏览器", id = "function_web", func = function(v) web().loadUrl("http://www.baidu.com") end, }, { MenuItem, title = "VPN检测", id = "function_vpn", func = function(v) gg.alert("返回值: " .. tostring(gg.isVPN())) end, }, { MenuItem, title = "抓包检测", id = "function_httpdunp", func = function(v) gg.alert("返回值: " .. tostring(gg.isHTTPdump())) end, }, { MenuItem, title = "机身横竖屏状态", id = "function_phone1", func = function(v) gg.alert("返回值: " .. tostring(gg.getWindowOrientation())) end, }, }, } local mm = popupMenu.getMenu() local optmenu = {} loadmenu(mm, m, optmenu) popupMenu.show() end end -- Looper.prepare() init() sparkle_animation(suspended_ball, 800) hc_animation(suspended_ball, 900) window.addView(xfq, mainLayoutParams) --添加窗口事件 Looper.loop() end Lock.Ui(LoadUi, nil, function(err) print(err) luajava.exit() end)