Jump to content

CmP

Contributor
  • Posts

    676
  • Joined

  • Last visited

  • Days Won

    49

Community Answers

  1. CmP's post in help me with getResults and value in offset was marked as the answer   
    There is a bit more efficient approach for this case: since all needed information to check target values is present in results of the initial search, just adapt the check to work based on them. It can be implemented in various ways, below is one for example: 
    gg.clearResults() gg.searchNumber("119;1;16777216::50", gg.TYPE_DWORD) local results = gg.getResults(gg.getResultsCount()) local expectedValueAddresses = {} for i, v in ipairs(results) do if v.value == 16777216 then expectedValueAddresses[v.address] = true end end gg.refineNumber("119", gg.TYPE_DWORD) local targetValues = {} for i, v in ipairs(results) do if expectedValueAddresses[v.address + 0xC] then targetValues[#targetValues + 1] = { address = v.address, flags = v.flags, value = 25, freeze = true, name = "SKILL" } end end gg.addListItems(targetValues)
  2. CmP's post in need help with comparing address was marked as the answer   
    Use bitwise operators. To check that address ends with hexadecimal digit C : 
    v.address & 0xF == 0xC Similarly for D8: 
    v.address & 0xFF == 0xD8
  3. CmP's post in looping with increment was marked as the answer   
    local function createPhaseDisplayer(phaseValues, progressSymbol, backgroundSymbol) local phasesCount = #phaseValues local currentPhase = 0 return function () currentPhase = currentPhase + 1 if currentPhase > phasesCount then os.exit() end local indicatorFirstPart = string.rep(progressSymbol, currentPhase) local indicatorSecondPart = string.rep(backgroundSymbol, phasesCount - currentPhase) local indicator = indicatorFirstPart .. indicatorSecondPart local phaseValue = phaseValues[currentPhase] local displayMessage = string.format("phase %d\nSymbol : %s\n%d", currentPhase, indicator, phaseValue) gg.toast(displayMessage, true) end end local phaseValues = {10, 20, 30, 40, 50} local symbol1 = "=" local symbol2 = "-" local displayPhase = createPhaseDisplayer(phaseValues, symbol1, symbol2) -- Testing all phases with one extra for i = 1, #phaseValues + 1 do displayPhase() end
  4. CmP's post in gg.setValues() is very slow? (on the magnitude of 50ms/per call) was marked as the answer   
    Try hiding GG interface (gg.setVisible(false)) before setting values.
  5. CmP's post in libil2cpp.so in region Xs was marked as the answer   
    This merely means that GG hasn't correctly identified that libraries belong to the application, process of which is selected. It doesn't affect anything other than how GG classifies the regions. The regions can still be found manually and from script just fine without relying on region being classified as "Xa", "Cd", etc.
  6. CmP's post in ARM LDR was marked as the answer   
    There are 12 bits in the instruction that are used for encoding offset from PC in bytes, so the limit is from -4095 to 4095.
    Reference: https://developer.arm.com/documentation/ddi0406/cb/Application-Level-Architecture/Instruction-Details/Alphabetical-list-of-instructions/LDR--literal-?lang=en
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.