Jump to content

CmP

Contributor
  • Posts

    663
  • Joined

  • Last visited

  • Days Won

    49

CmP last won the day on August 17

CmP had the most liked content!

Recent Profile Visitors

27,409 profile views

CmP's Achievements

Experienced

Experienced (11/14)

  • Problem Solver Rare
  • Posting Machine Rare
  • One Year In
  • One Month Later
  • Week One Done

Recent Badges

667

Reputation

17

Community Answers

  1. This indicates that value consists of one or more float values that correspond to units. You might be able to find float value corresponding to currently biggest unit used in particular instance of BigNumber, for that you can try range search (for example, if displayed value is 217.58C, then search "217.57~217.59" or maybe even "216.5~217.6", which should include the target value, but may also find many unrelated ones).
  2. You can insert code for logging amount of items in saved list before and after fragments of code to see where it works not as expected: local items = gg.getListItems() print("Amount of items in saved list is " .. #items)
  3. To remove items from saved list GG API has removeListItems function. Below is an example of how to use it to remove all items with value 0 from the list. local savedItems = gg.getListItems() local itemsForRemove = {} for i, v in ipairs(savedItems) do if v.value == 0 then itemsForRemove[#itemsForRemove + 1] = v end end gg.removeListItems(itemsForRemove)
  4. CmP

    JsonCodeDumper

    Right, but if it is not done, it will happen automatically once the script completes. It's not related to the error that you got, it was because file can't be created in specified path, so "io.open" returns nil and then it is indexed with "write" key, which is the error from your screenshot. For example, you can try the following code and check contents of the file after running it: local path = "/sdcard/test.txt" -- Change to any other path to file that can be written io.open(path, "w+"):write("123")
  5. CmP

    JsonCodeDumper

    And what's wrong with the syntax? Tried specifying path where it can create file before concluding that it's syntax issue?
  6. CmP

    Help me with loop in script

  7. CmP

    JsonCodeDumper

    Maybe just because "Notes" directory doesn't exist in "/sdcard" on devices where you tested?
  8. CmP

    Help me with loop in script

    The question is what you define as working. You asked for the code that modifies value(s) from saved list that are named "R" to "-2.0" 20 times in loop. The code above should do exactly that. Maybe that's not exactly what you need?
  9. CmP

    Help me with loop in script

    local savedValues = gg.getListItems() -- Enough to get items once if list won't change during execution of loop local targetValues = {} for i, v in ipairs(savedValues) do if v.name == "R" then targetValues[#targetValues + 1] = { address = v.address, flags = v.flags, value = "-2.0" } end end for i = 1, 20 do gg.setValues(targetValues) -- doesn't really make sense without delay end And, please, don't mention anyone in questions that are not directed to someone specifically.
  10. Try hiding GG interface (gg.setVisible(false)) before setting values.
  11. CmP

    Lua

    local function hack1() gg.toast("Hack 1") end local function hack2() gg.toast("Hack 2") end local function menu() gg.toast("Menu") end gg.setVisible(false) while not gg.isVisible() do gg.sleep(100) end hack1() gg.setVisible(false) while not gg.isVisible() do gg.sleep(100) end hack2() gg.setVisible(false) while true do if gg.isVisible() then menu() end gg.sleep(100) end
  12. View File Embed libraries finder This script consists of a module (Lua code organized in certain way) for finding addresses of native libraries that are loaded directly from apk (which is the case when android:extractNativeLibs manifest attribute is set to "false") and several examples of how to use the module. Finding name of libraries in the script is implemented by checking soname of memory regions that are loaded from apk (including splits), contents of which resemble library in ELF format. Libraries that don't have soname specified won't be found by the script. Though, typically, main libraries of interest in games have soname specified, so the script should be applicable in most cases when libraries are loaded directly from apk. If a library has soname specified, but the script doesn't find it, generate debug log (example 3 from the file) from attempt to find the library and include it in the comment with report of the issue. Submitter CmP Submitted 07/26/2024 Category Templates  
  13. Version 1.0

    300 downloads

    This script consists of a module (Lua code organized in certain way) for finding addresses of native libraries that are loaded directly from apk (which is the case when android:extractNativeLibs manifest attribute is set to "false") and several examples of how to use the module. The script works only for 64-bit processes. Finding name of libraries in the script is implemented by checking soname of memory regions that are loaded from apk (including splits), contents of which resemble library in ELF format. Libraries that don't have soname specified won't be found by the script. Though, typically, main libraries of interest in games have soname specified, so the script should be applicable in most cases when libraries are loaded directly from apk. If a library has soname specified, but the script doesn't find it, generate debug log (example 3 from the file) from attempt to find the library and include it in the comment with report of the issue.
  14. With group search only it can be done if offset between first and second searched value is known beforehand. For your example and assuming all values that need to be included/excluded are dwords, offset between first and second value is 28 (0x1C), so there are exactly 6 dword values between them and each of them needs to be not equal to 9, which can be specified as "8~~10". So the string for group search for this case is "10;8~~10;8~~10;8~~10;8~~10;8~~10;8~~10;40::29". Then you can refine with "10;40::29" to get target results (but if any of values in between is 10 or 40, they will be included as well).
  15. CmP

    Slowing Group search

    Then it's reasonable to just search either first or second value and filter only desired results that have other value at needed offset. Something like the following: local firstValue = 210.0 local secondValue = 30.0 local offset = 12 gg.clearResults() gg.searchNumber(firstValue, gg.TYPE_DOUBLE) local firstValues = gg.getResults(gg.getResultsCount()) local secondValues = {} for i, v in ipairs(firstValues) do secondValues[i] = {address = v.address + offset, flags = gg.TYPE_DOUBLE} end secondValues = gg.getValues(secondValues) local targetResults = {} local index = 1 for i = 1, #firstValues do if secondValues[i].value == secondValue then targetResults[index] = firstValues[i] targetResults[index + 1] = secondValues[i] index = index + 2 end end gg.loadResults(targetResults)
×
×
  • 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.