Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- LUA = 'WILS2M'
- GLabel = 'DB LEGENDS'
- GProcess = 'com.bandainamcoent.dblegends_ww'
- GVersion = '(vAU.03)'
- xbit = 64
- LibResult = 1
- xlib = 'libil2cpp.so'
- xlibsize = 0
- xREV = 1 I={}
- xCNE = 0
- xSSE = 0
- XbitX = 2
- printx = '---------------------------------------------------------------'
- expire='free'
- game = gg.getTargetInfo()
- P=game.processName
- FP=game.name
- L=gg.getTargetInfo().label
- M=gg.getTargetInfo()["label"]
- V=game.versionName
- TP=gg.getTargetPackage()
- xTAGx="Have fun"
- xLINKx="https://t.me/HxE_Chat"
- xLINK1x="https://www.tiktok.com/@hxesq"
- printx="---------------------------------------------------------------"
- print(printx)
- print(xTAGx)
- print("Telegram = "..xLINKx)
- print("TikTok = "..xLINK1x)
- print(printx)
- print("Script = "..GLabel.." "..GVersion)
- --███████████████████████
- --███████████████████████
- --███████████████████████
- -- APEX[GG]v2
- ::RESTARTSCRIPT::
- apex=1
- gg.setVisible(false)
- v=gg.getTargetInfo()
- if v==nil then
- print("×× ERROR ××\n×× INVALID PROCESS SELECTED / OR NO ROOT ACCESS")
- gg.setVisible(true) os.exit()
- return
- end
- ------------------------------------------------------------------------------
- AUalert="\nThis Script will Auto-Update\nInitial Calibration may take a while\n1) START SCRIPT AFTER ANY COMPLETE FIGHT.\n2) Otherwise, Calibration will Fail and Hacks Not Work,then\n Tap [ START ] on Script.\n\nX) if Not Ready, Press [ NO ]\n"
- -- [START] / [NO]
- ------------------------------------------------------------------------------
- HxEmenu = (' ⚡HxE Menu by wils2m⚡\
- ❦ ════ •⊰❂ - ❂⊱• ════ ❦\
- ⛥🇮🇳🇫🇴⛥\
- 🎮🅖🅐🅜🅔🎮 : '..GLabel..'\
- 🎰🅥🅔🅡🅢🎰 : '..GVersion..'\
- 🎰🅐🅡🅜🎰 : '..xbit..'\
- \
- ⏳Exᴘɪʀᴇᴅ Date⏳ : '..expire..'\
- 🎁 Encryption 🎁 : '..expire..'\
- ❦ ════ •⊰❂ - ❂⊱• ════ ❦')
- gg.alert(HxEmenu)
- print("In Collaboration With:")
- print(" ~ APEX[GG]v2 ~")
- xLINKx="https://t.me/apexgg2Home"
- print("Telegram = "..xLINKx)
- gg.alert(" Patch Note\
- ❦ ════ •⊰❂ - ❂⊱• ════ ❦\
- - HxE script menu\
- - Huge thanks to (Apex[GG])\
- - Script Auto-Updating\
- - NEW:\
- - Updated search method\
- - Deleted PvP bot Hack\
- .............................................\
- - Unlimited stamina (Apex[GG])\
- - New disable method (Apex[GG])\
- - All Completed Challenge\
- - Timer stopped\
- - Unlimited Vanish\
- - Unlimited Rising Rush\
- - Reuse Arts cards\
- - Rising Rush Cards\
- - No Skill Cooldown\
- - No Ki Cost\
- ❦ ════ •⊰❂ - ❂⊱• ════ ❦\
- ")
- ------------------------------------------------------------------------------
- I=nil I={}
- A={} for i =1,100 do A[i]={} end
- ------------------------------------------------------------------------------
- OFF="× " ON="√ "
- CC=OFF OH=OFF DE=OFF UV=OFF RR=OFF NC=OFF TS=OFF UC=OFF RC=OFF ST=OFF BT=OFF DS=OFF
- HT=OFF
- function menu()
- apex=0
- gg.setRanges(gg.REGION_ANONYMOUS)
- gg.toast("APEX[GG]v2\nwils2m")
- mc=gg.multiChoice({
- CC.."All Challenge complete",
- OH.."One Hit K.O",
- DE.."Disable ennemy",
- TS.."Timer stopped",
- UV.."Unlimited Vanish",
- RR.."Unlimited Rising Rush",
- NC.."No Skill Cooldown",
- UC.."ReUse Arts Cards",
- RC.."RisingRushBall/Card",
- ST.."Unlimited Stamina",
- "[ EXIT ]"},
- {},xTAGx.."\n"..xLINKx.."\n"..GLabel.." "..GVersion.." "..xBITx)
- if mc==nil then cancel() return end
- if mc[1] then chal() end
- if mc[2] then oneh() end
- if mc[3] then disable() end
- if mc[4] then stoptimer() end
- if mc[5] then vanish() end
- if mc[6] then rising() end
- if mc[7] then nocd() end
- if mc[8] then usearts() end
- if mc[9] then rushcard() end
- if mc[10] then stam() end
- if OH==ON and RR==ON then choose() end
- if UC==ON and RC==ON then choose2() end
- xhaX={
- CC.."All Challenge complete",
- OH.."One Hit K.O",
- DE.."Disable ennemy",
- TS.."Timer stopped",
- UV.."Unlimited Vanish",
- RR.."Unlimited Rising Rush",
- NC.."No Skill Cooldown",
- UC.."ReUse Arts Cards",
- RC.."RisingRushBall/Card",
- ST.."Unlimited Stamina",
- }
- xhaX=table.concat(xhaX, "\n")
- xhaX=tostring(xhaX)
- if mc[11] then exit() return end
- gg.toast("[√] Complete")
- gg.alert("Hacks "..GLabel.." "..GVersion.." "..xBITx.."\n\n"..xhaX,"OK",nil,xTAGx)
- end
- --███████████████████████
- --public sealed class TeamStatus : IEventListener
- --public int GetArtsCost(ArtsType type)
- A[1].class="TeamStatus"
- A[1].method="GetArtsCost"
- function nocd()
- if A[1].error==1 then error() return end
- x=0 HACK(1,1,NC) BC=ONOFF(NC)
- end
- --███████████████████████
- --public sealed class TeamStatus : IEventListener
- --public RisingRushBallFlag get_risingRushBallFlag()
- A[2].class="TeamStatus"
- A[2].method="get_risingRushBallFlag"
- function rising()
- if A[2].error==1 then error() return end
- x="hE00F80D2" HACK(2,2,RR) RR=ONOFF(RR)
- end
- --███████████████████████
- --public sealed class TeamStatus : IEventListener
- --public float SpendVanish()
- --public sealed class TeamStatus : IEventListener
- --public float SpendVanish(float value)
- A[3].class="TeamStatus"
- A[3].method="SpendVanish"
- function vanish()
- if A[3].error==1 then error() return end
- x=0 HACK(3,3,UV) UV=ONOFF(UV)
- end
- --███████████████████████
- -- public class AIController : AIControllerBase // TypeDefIndex:
- -- public override void Initialize(TeamManager ownTeam, AiData aiData) { }
- A[4].class="AIController"
- A[4].method="Initialize"
- function disable()
- if A[4].error==1 then error() return end
- x=0 HACK(4,4,DE) DE=ONOFF(DE) HT=ON
- end
- --███████████████████████
- --public sealed class BattleManager : PeerSyncSingletonMonoBehaviour
- --public void SpendTimer(int delta)
- A[5].class="BattleManager"
- A[5].method="SpendTimer"
- function stoptimer()
- if A[5].error==1 then error() return end
- x=0 HACK(5,5,TS) TS=ONOFF(TS)
- end
- --███████████████████████
- --public sealed class TeamStatus : IEventListener
- --public bool ConsumeArtsCardHand(int handIndex)
- A[6].class="TeamStatus"
- A[6].method="ConsumeArtsCardHand"
- function usearts()
- if A[6].error==1 then error() return end
- x=0 HACK(6,6,UC) UC=ONOFF(UC)
- end
- --███████████████████████
- --public sealed class BattleSystemParam : SingletonMonoBehaviour<BattleSystemParam>
- --public int GetRisingRushBallDrawProbPer(int risingRushActivatedCount, int aliveCharaCountDisadvantage, int addendPer = 0)
- A[7].class="BattleSystemParam"
- A[7].method="GetRisingRushBallDrawProbPer"
- function rushcard()
- if A[7].error==1 then error() return end
- x="h800C80D2" HACK(7,7,RC) RC=ONOFF(RC)
- end
- --███████████████████████
- --public class BattleChallengeManager
- --private static bool ChallengeCheck(int id, int target, int param*)
- A[8].class="BattleChallengeManager"
- A[8].method="ChallengeCheck"
- function chal()
- if A[8].error==1 then error() return end
- x=1 HACK(8,8,CC) CC=ONOFF(CC)
- end
- --███████████████████████
- -- public class CharacterMasterProxy // TypeDefIndex:
- for i = 9,12 do A[i].class="CharacterMasterProxy" end
- --get_health_nonboost
- A[9].method="get_health_nonboost"
- --h800C80D2
- --get_form_health_gauge_num
- A[10].method="get_form_health_gauge_num"
- --get_health_boostonly
- A[11].method="get_health_boostonly"
- --get_health
- A[12].method="get_health"
- function oneh()
- ERR(9,12) if E==1 then error() return end
- x="h800C80D2" HACK(9,9,OH)
- x=0 HACK(10,12,OH)
- if HT==OFF then disable() end
- OH=ONOFF(OH)
- if OH==OFF then
- x=0 HACK(4,4,DE) DE=ONOFF(DE) HT=OFF
- end
- end
- --███████████████████████
- -- public class BattleStartFlow : SceneBase // TypeDefIndex:
- -- private IEnumerator CheckStaminaConfirmation() { }
- A[13].class="BattleStartFlow"
- A[13].method="CheckStaminaConfirmation"
- function stam()
- if A[13].error==1 then error() return end
- x=0 HACK(13,13,ST) ST=ONOFF(ST)
- end
- --███████████████████████
- -- public struct SNetworkBattleStatus // TypeDefIndex:
- -- public void Initialize(bool isNetwork, int ownNetworkBattleKey) { }
- -- function bot()
- -- if v.versionName~="5.0.1" then
- -- gg.alert("PvP Bots Only\nSorry This Hack Does Not Auto-Update and is Only Available for Game Version 5.0.1","OK",nil,xTAGx)
- -- return
- -- end
- -- o=0x17C2FA4 x=0
- -- if BT==OFF then arm() BT=ON else revert() BT=OFF end
- -- end
- --███████████████████████
- function choose()
- xchoose=gg.choice({
- " \n√ ONE HIT KO\n× RISING RUSH\n ",
- " \n× ONE HIT KO\n√ RISING RUSH\n "},
- 0,"These 2 Hacks Cannot be Active at Same Time, Please Select New Hacks Condition")
- if xchoose==nil then return end
- if xchoose==2 then oneh() return end
- if xchoose==1 then rising() return end
- end
- function choose2()
- choosex=gg.choice({
- " \n√ ReUse Arts Card\n× Rising Rush Card\n ",
- " \n× ReUse Arts Card\n√ Rising Rush Card\n "},
- 0,"These 2 Hacks Cannot be Active at Same Time, Please Select New Hacks Condition")
- if choosex==nil then rushcard() return end
- if choosex==1 then rushcard() return end
- if choosex==2 then usearts() return end
- end
- --███████████████████████
- --███████████████████████
- --███████████████████████
- if v.processName~=GProcess then
- print("This Script is For:\n "..GLabel.."\n "..GProcess.."\nYou Selected:\n "..v.label.."\n "..v.processName)
- gg.setVisible (true) os.exit()
- return
- end
- ------------------------------------------------------------------------------
- if v.x64 then bitx=64 xBITx="[x64]" else bitx=32 xBITx="[x32]" end
- print(xBITx)
- print(printx)
- ------------------------------------------------------------------------------
- --███████████████████████
- if LibResult==1 then
- xAPEXx={} xXx=0
- xLibRes=0
- libx=gg.getRangesList()
- if #(libx)==0 then
- print("×× LIB ERROR #01 ××\nNo Libs Found\nTry a Different Virtual Environment \nor Try a Better Game Installation Method\nor Download Game From 'apkcombo.com' ")
- gg.setVisible(true)
- os.exit()
- end
- libx=gg.getRangesList(xlib)
- if #(libx)==0 then
- print("×× No "..xlib.." Found")
- xLibRes=2
- goto APEX_SPLIT
- end
- xlibn=0
- for i, v in ipairs(libx) do
- if libx[i].state=="Xa" then
- xXx=xXx+1
- xAPEXx[xXx]=libx[i].start
- XLIBSIZE=libx[i]["end"]-libx[i].start
- xLibRes=1
- end
- end
- if xLibRes==0 then
- print("×× LIB ERROR #03 ××\nNo "..xlib.." Found in Xa\nTry a Different Virtual Environment \nor Try a Better Game Installation Method\nor Download Game From 'apkcombo.com' ")
- gg.setVisible(true)
- os.exit()
- end
- ::APEX_SPLIT::
- if xLibRes==2 then
- splitapk=0
- libx=gg.getRangesList()
- for i, v in ipairs(libx) do
- if libx[i].state=="Xa" and string.match(libx[i].name,"split_config") then
- splitapk=1
- end
- end
- if splitapk==1 then
- xsapk={} xsapkx=0
- for i, v in ipairs(libx) do
- if libx[i].state=="Xa" then
- xsapkx=xsapkx+1
- xsapk[xsapkx]=libx[i]["end"]-libx[i].start
- end
- end
- if xsapkx~=0 then
- APEXQ=math.max(table.unpack(xsapk))
- for i, v in ipairs(libx) do
- if libx[i].state=="Xa" and libx[i]["end"]-libx[i].start==APEXQ then
- xXx=xXx+1
- xAPEXx[xXx]=libx[i].start
- XLIBSIZE=libx[i]["end"]-libx[i].start
- print("√√ Split Apk Lib Found\n√√ "..libx[i].name)
- xLibRes=1
- end
- end
- end
- end
- if splitapk==0 and xLibRes~=1 then
- print("×× No split_config Lib Found")
- xc=1 xt={}
- libx=gg.getRangesList()
- for i, v in ipairs(libx) do
- if libx[i].state=="Xa" then
- xt[xc]=tonumber(libx[i]["end"]-libx[i].start)
- xc=xc+1
- end
- end
- if xc==1 then
- print("×× No libs in Xa Region\n-- Your Device is Broken --\nGoodbye")
- gg.setVisible(true) os.exit()
- return
- end
- APEXQ=math.max(table.unpack(xt))
- for i, v in ipairs(libx) do
- if libx[i].state=="Xa" and libx[i]["end"]-libx[i].start==APEXQ then
- xXx=xXx+1
- xAPEXx[xXx]=libx[i].start
- XLIBSIZE=libx[i]["end"]-libx[i].start
- print("√√ math.max Xa Lib Found\n√√ "..libx[i].name)
- xLibRes=1
- end
- end
- end
- if xLibRes~=1 then
- print("×× Correct Lib Not Found ××\n×× Direct/Split Config/Xa Max ××")
- gg.setVisible(true)
- os.exit()
- return
- end
- end
- if xlibsize~=0 then
- if XLIBSIZE<xlibsize then
- print("×× Incorrect Lib Size in Xa Region ××\nYour device / virtual / emulator is not compatible with this script")
- gg.setVisible(true)
- os.exit()
- return
- end
- end
- end
- --███████████████████████
- -- OO=ONOFF(OO)
- function ONOFF(OO)
- if OO==OFF then OO=ON else OO=OFF end
- return OO
- end
- ------------------------------------------------------------------------------
- function HACK(v1,v2,v3)
- for i = A[v1].start, A[v2].finish do o=I[i]
- if v3==OFF then arm() else revert() end
- end
- end
- ------------------------------------------------------------------------------
- function ERR(E1,E2)
- E=0
- for i = E1,E2 do if A[i].error==1 then E=1 end end
- end
- ------------------------------------------------------------------------------
- function arm()
- o=tonumber(o)
- for XxX=1,#(xAPEXx) do
- xdump=nil xdump={}
- if type(x)~="table" then
- xdump[1]={} xdump[2]={}
- xdump[1].address=xAPEXx[XxX] + o
- xdump[1].flags=4
- if x==0 then xdump[1].value=xfalse end
- if x==1 then xdump[1].value=xtrue end
- if x~=0 and x~=1 then xdump[1].value=x end
- xdump[2].address=xAPEXx[XxX]+(o+4)
- xdump[2].flags=4
- xdump[2].value=xEND
- else
- cc=0
- for c=1,#(x) do
- xdump[c]={}
- xdump[c].address=xAPEXx[XxX]+o+cc
- xdump[c].flags=4
- xdump[c].value=tostring(x[c])
- cc=cc+4
- end
- end
- gg.setValues(xdump)
- end
- end
- ------------------------------------------------------------------------------
- function revert()
- for XxX=1,#(xAPEXx) do
- REVERT=nil REVERT={} xRx=nil xRx=1
- for i, v in ipairs(ORIG) do
- if tonumber(xAPEXx[XxX]+o)==ORIG[i].address then
- if type(x)~="table" then
- REVERT[xRx]={}
- REVERT[xRx].address=xAPEXx[XxX]+o
- REVERT[xRx].flags=4
- REVERT[xRx].value=ORIG[i].value
- xRx=xRx+1
- REVERT[xRx]={}
- REVERT[xRx].address=xAPEXx[XxX]+o+4
- REVERT[xRx].flags=4
- REVERT[xRx].value=ORIG[i+1].value
- xRx=xRx+1
- else
- offcnt=0 tnuc=0
- for dfg=1,#(x) do
- REVERT[xRx]={}
- REVERT[xRx].address=xAPEXx[XxX]+o+offcnt
- REVERT[xRx].flags=4
- REVERT[xRx].value=ORIG[i+tnuc].value
- offcnt=offcnt+4 tnuc=tnuc+1 xRx=xRx+1
- end
- end
- gg.setValues(REVERT)
- break
- end
- -- xRx+1
- end
- end
- end
- --███████████████████████
- if v.x64 then
- xtrue="h200080D2" -- MOV X0, #0x1
- xfalse="h000080D2" -- MOV X0, #0x0
- xEND="hC0035FD6" -- RET
- else
- xtrue="h0100A0E3" -- MOVW R0, #1
- xfalse="h0000A0E3" -- MOVW R0, #0
- xEND="h1EFF2FE1" -- BX LR
- end
- ------------------------------------------------------------------------------
- -- APEX[GG]v2
- function clear()
- gg.getResults(gg.getResultsCount())
- gg.clearResults()
- end
- ------------------------------------------------------------------------------
- function search()
- gg.getResults(gg.getResultsCount())
- gg.clearResults()
- gg.searchNumber(x,t)
- end
- ------------------------------------------------------------------------------
- function refine()
- gg.refineNumber(x,t)
- end
- ------------------------------------------------------------------------------
- function check()
- E=nil E=gg.getResultsCount()
- end
- ------------------------------------------------------------------------------
- function offset()
- o=tonumber(o) addoff=nil
- addoff=gg.getResults(gg.getResultsCount())
- for i, v in ipairs(addoff) do
- addoff[i].address=addoff[i].address+o
- addoff[i].flags=t
- end
- gg.loadResults(addoff)
- end
- --███████████████████████
- -- APEX[GG]v2
- ------------------------------------------------------------------------------
- function cancel()
- gg.toast("CANCELLED")
- end
- ------------------------------------------------------------------------------
- function wait()
- gg.toast("Please Wait..")
- end
- ------------------------------------------------------------------------------
- function error()
- gg.toast("× ERROR ×")
- gg.sleep(1000)
- end
- ------------------------------------------------------------------------------
- function exit()
- gg.getListItems()
- gg.clearList()
- gg.getResults(gg.getResultsCount())
- gg.clearResults()
- gg.toast("[ EXIT ]")
- if xhaX~=nil then
- print(printx)
- print(xhaX)
- print(printx)
- end
- gg.setVisible(true)
- os.exit()
- return
- end
- --███████████████████████
- NEEDSEARCH=1
- SFILE=nil
- SFILE=io.open(gg.EXT_FILES_DIR.."/"..GProcess..".lua")
- if SFILE==nil then
- STARTALERT=xTAGx.."\n\n"..GLabel.."\n"..v.versionName.." "..GVersion.."\n"..LUA.."\n"..AUalert
- else
- SFILE=nil
- SFILE=io.open(gg.EXT_FILES_DIR.."/"..GProcess..".lua"):read("*all")
- pcall(load(SFILE))
- if tostring(v.versionName)~=tostring(SFversion) then
- gg.alert(xTAGx.."\n\n"..GLabel.."\n"..v.versionName.." "..GVersion.."\n"..LUA.."\n\nNEW GAME VERSION DETECTED\n","OK")
- os.remove(gg.EXT_FILES_DIR.."/"..GProcess..".lua")
- NEEDSEARCH=1
- goto RESTARTSCRIPT
- else
- STARTALERT=gg.alert(xTAGx.."\n\n"..GLabel.."\n"..v.versionName.." "..GVersion.."\n"..LUA.."\n\n√ SAVED OFFSETS FILE FOUND.","[ START ]","DELETE","-- EXIT --")
- if STARTALERT==3 then exit() return end
- if STARTALERT==1 then NEEDSEARCH=0 end
- if STARTALERT==2 then
- os.remove(gg.EXT_FILES_DIR.."/"..GProcess..".lua")
- NEEDSEARCH=1
- goto RESTARTSCRIPT
- return
- end
- end
- end
- if NEEDSEARCH==1 then
- ::XGETREADYX::
- plwt=gg.alert(xTAGx.."\n\n"..GLabel.."\n"..v.versionName.." "..GVersion.."\n"..LUA.."\n"..AUalert,"[ START ]","[ NO ]","[ -- EXIT -- ]")
- if plwt==3 then exit() return end
- if plwt==2 then
- gg.setVisible(false)
- while true do
- if gg.isVisible() then gg.setVisible(false) break end
- end
- goto XGETREADYX
- return
- end
- local xtx=0
- local gvr={"Ca","Cd","Cb","A","O"}
- local sr={gg.REGION_C_ALLOC, gg.REGION_C_DATA, gg.REGION_C_BSS, gg.REGION_ANONYMOUS, gg.REGION_OTHER}
- gg.clearResults() gg.toast("Please Wait..")
- gg.setRanges(gg.REGION_C_ALLOC | gg.REGION_C_DATA | gg.REGION_C_BSS | gg.REGION_ANONYMOUS | gg.REGION_OTHER)
- gg.searchNumber(":get_localToWorldMatrix_Injected",1)
- gg.refineNumber(":g",1)
- gg.searchPointer(0)
- if gg.getResultsCount()~=0 then
- rp=gg.getResults(1)
- rt={} rt[1]={}
- rt[1].address=rp[1].value
- rt[1].flags=1
- rt=gg.getValues(rt)
- rt=gg.getValuesRange(rt)
- rt=tostring(rt[1])
- rp=gg.getValuesRange(rp)
- rp=tostring(rp[1])
- if rp==rt then
- for i = 1,5 do
- if rp==tostring(gvr[i]) then
- r1=sr[i] r2=sr[i]
- xtx=2
- break
- end
- end
- else
- for i = 1,5 do
- if rp==tostring(gvr[i]) then r2=sr[i] xtx=1 break end
- end
- for i = 1,5 do
- if rt==tostring(gvr[i]) then r1=sr[i] xtx=xtx+1 break end
- end
- end
- if xtx~=2 then gg.setRanges(gg.REGION_OTHER | gg.REGION_C_ALLOC | gg.REGION_ANONYMOUS) end
- end
- sr=nil gvr=nil rp=nil rt=nil plwt=nil
- --███████████████████████
- SFT={}
- SFT[1]="SFversion = '"..v.versionName.."'"
- SFT[2]="A={}"
- SFT[3]="I={}"
- SFTA={}
- SFTI={}
- if v.x64 then off1=-16 typ=32 else off1=-8 typ=4 end
- ATOTAL=0
- for i = 1,100 do
- if A[i].method==nil then break end
- ATOTAL=ATOTAL+1
- end
- ASTART=1 AEND=0 ATABT=ATOTAL+1 ATAB=1
- S=0
- while ATAB<=ATOTAL do
- ::AUTOSTART::
- gg.setVisible(false)
- if ATAB>ATOTAL then break goto FINISHED end
- gg.toast("Please Wait.. [ "..ATABT-ATAB.." ]")
- A[ATAB].error=1
- ANAME=nil ANAME={}
- if A[ATAB].name~=nil then
- for i = 1,#(tostring(A[ATAB].name)) do
- ANAME[i]=string.byte(A[ATAB].name,i)
- end
- else
- A[ATAB].name=0
- end
- ACLASS=nil ACLASS={}
- if A[ATAB].class~=nil then
- for i = 1,#(tostring(A[ATAB].class))+1 do
- if i == #(tostring(A[ATAB].class))+1 then
- ACLASS[i]=0
- else
- ACLASS[i]=string.byte(A[ATAB].class,i)
- end
- end
- else
- A[ATAB].class=0
- end
- ASTART=AEND+1
- if xtx==2 then gg.setRanges(r1) end
- clear() t=1
- gg.searchNumber(":"..tostring(A[ATAB].method),1)
- if xtx==2 then gg.setRanges(r2) end
- xm=gg.getResults(2) gg.getResults(gg.getResultsCount())
- check()
- if E==0 then ATAB=ATAB+1
- if ATAB>ATOTAL then break return end
- goto AUTOSTART return
- end
- x=xm[1].value..";"..xm[2].value.."::2" refine()
- x=xm[1].value refine()
- o=-1 offset() x=0 refine() oo=#(tostring(A[ATAB].method))
- o=oo+1 offset() refine() o=-oo offset()
- check()
- if E==0 then ATAB=ATAB+1
- if ATAB>ATOTAL then break return end
- goto AUTOSTART return
- end
- gg.searchPointer(0) xcount=gg.getResultsCount()
- xpoint=gg.getResults(xcount,nil, nil, nil, nil, nil, nil, nil,gg.POINTER_READ_ONLY)
- if #(xpoint)==0 then ATAB=ATAB+1
- if ATAB>ATOTAL then break return end
- goto AUTOSTART return
- end
- clear()
- for xp=1,#(xpoint) do
- xpoint[xp].address=xpoint[xp].address+off1
- xpoint[xp].flags=typ
- end
- gg.loadResults(xpoint)
- xoff=gg.getResults(#(xpoint),nil, nil, nil, nil, nil, nil, nil, gg.POINTER_EXECUTABLE)
- if #(xoff)==0 then ATAB=ATAB+1
- if ATAB>ATOTAL then break return end
- goto AUTOSTART return
- end
- xfin=1
- while xfin<=#(xoff) do
- ::XFIN::
- if xfin>#(xoff) then ATAB=ATAB+1
- if ATAB>ATOTAL then break return end
- goto AUTOSTART return
- end
- if gg.getTargetInfo().x64 then
- xadd=tonumber(xoff[xfin].value)
- else
- xadd=string.format("%X",tonumber(xoff[xfin].value))
- xadd=string.sub(tostring(xadd), -8,-1)
- xadd=tonumber("0x"..xadd)
- end
- gval1=nil gval1={} gval1[1]={}
- if gg.getTargetInfo().x64 then gvo=24 gvo1=16 gvo2=24 else gvo=12 gvo1=8 gvo2=12 end
- gval1[1].address=xoff[xfin].address+gvo
- gval1[1].flags=typ
- gval1=gg.getValues(gval1)
- if gg.getTargetInfo().x64 then
- gval=tonumber(gval1[1].value)
- else
- gval=string.format("%X",tonumber(gval1[1].value))
- gval=string.sub(tostring(gval), -8,-1)
- gval=tonumber("0x"..gval)
- end
- gval2=nil gval2={} gval2[1]={} gval2[2]={}
- gval2[1].address=gval+gvo1
- gval2[1].flags=typ
- gval2[2].address=gval+gvo2
- gval2[2].flags=typ
- gval2=gg.getValues(gval2)
- if gg.getTargetInfo().x64 then
- gval21=tonumber(gval2[1].value)
- gval22=tonumber(gval2[2].value)
- else
- gval21=string.format("%X",tonumber(gval2[1].value))
- gval21=string.sub(tostring(gval21), -8,-1)
- gval21=tonumber("0x"..gval21)
- gval22=string.format("%X",tonumber(gval2[2].value))
- gval22=string.sub(tostring(gval22), -8,-1)
- gval22=tonumber("0x"..gval22)
- end
- xrefine=0
- if A[ATAB].class~=0 then
- for xyz=1,#(ACLASS) do
- gvalc={} gvalc[1]={}
- gvalc[1].address=gval21+(xyz-1)
- gvalc[1].flags=1
- gvalc=gg.getValues(gvalc)
- if gvalc[1].value~=ACLASS[xyz] then xrefine=1 break xfin=xfin+1 goto XFIN end
- end
- end
- if A[ATAB].name~=0 then
- for xyz=1,#(ANAME) do
- gvalc={} gvalc[1]={}
- gvalc[1].address=gval22+(xyz-1)
- gvalc[1].flags=1
- gvalc=gg.getValues(gvalc)
- if gvalc[1].value~=ANAME[xyz] then xrefine=1 break xfin=xfin+1 goto XFIN end
- end
- end
- if xrefine==0 then
- A[ATAB].start=ASTART AEND=AEND+1
- A[ATAB].finish=AEND
- A[ATAB].error=0
- clear() I[AEND]=xadd-xAPEXx[xXx]
- SFTA[ATAB]="A["..ATAB.."]={}\nA["..ATAB.."].name = "..A[ATAB].name.."\nA["..ATAB.."].class = "..A[ATAB].class.."\nA["..ATAB.."].method = "..A[ATAB].method.."\nA["..ATAB.."].start = "..ASTART.."\nA["..ATAB.."].finish = "..AEND.."\nA["..ATAB.."].error = 0"
- SFTI[AEND]="I["..AEND.."] = "..xadd-xAPEXx[xXx]
- end
- xfin=xfin+1
- end -- xfin
- ATAB=ATAB+1
- end -- ATAB
- ---------------------------------------------------
- ::FINISHED::
- xBAR=0
- for i = 1, ATOTAL do
- if A[i].error~=0 then xBAR=xBAR+1 end
- end
- if xBAR>=ATOTAL then
- gg.toast("×× FAILURE ××") gg.alert("× AUTO UPDATE FAILURE ×","EXIT",nil, xTAGx)
- exit()
- return
- end
- if xBAR>=1 then gg.toast("× ERROR ×") gg.alert("× Auto Update Errors\nSome/All Hacks May Not Work","OK",nil, xTAGx)
- end
- if xBAR==0 then
- sft=table.concat(SFT,"\n")
- sfta=table.concat(SFTA,"\n")
- sfti=table.concat(SFTI,"\n")
- wstring=tostring(sft.."\n"..sfta.."\n"..sfti)
- local sfsuccess=gg.alert("Auto-Update Success\nCurrent Offsets Will be Saved to File and Automatically Loaded Every Script Execution. Script will Verify Game Version and Automatically Update File as Needed.\n\nSaved File Path:\n"..gg.EXT_FILES_DIR.."/"..GProcess..".lua","√ SAVE","× SAVE","APEX[GG]V2")
- if sfsuccess==1 then
- io.open(gg.EXT_FILES_DIR.."/"..GProcess..".lua","w"):write(wstring):close()
- print("Offsets Written to File:\n"..gg.EXT_FILES_DIR.."/"..GProcess..".lua")
- end
- end
- end -- if NEEDSEARCH
- --███████████████████████
- --███████████████████████
- if xREV==1 then
- xRx=1 ORIG={} xREV={}
- for XxX=1,#(xAPEXx) do
- for i, v in ipairs(I) do
- thiscunt=0
- for dfg=1,7 do
- ORIG[xRx]={}
- ORIG[xRx].address=xAPEXx[XxX]+tonumber(I[i])+thiscunt
- ORIG[xRx].flags=4
- xRx=xRx+1
- thiscunt=thiscunt+4
- end
- end
- end
- ORIG=gg.getValues(ORIG)
- end
- --███████████████████████
- while true do
- if gg.isVisible() or apex==1 then
- gg.setVisible(false) apex=0
- menu()
- end
- end
Add Comment
Please, Sign In to add comment