Jump to content

CmP

Ascended
  • Content Count

    362
  • Donations

    $0.00 
  • Joined

  • Last visited

  • Days Won

    21

CmP last won the day on December 13 2020

CmP had the most liked content!

Community Reputation

381 Boss

About CmP

  • Rank
    Experienced Member

Additional Information

  • Android
    7.x (Nougat)
  • Device
    Xiaomi Redmi Note 4X

Recent Profile Visitors

9,535 profile views
  1. Strangely enough, it seems that the instructions are still read from process memory after they have been executed once, but after some more executions of the instructions, they are indeed "cached" and are no longer read from memory. I figured that out from several observations, but I don't know how this mechanism of instructions "caching" really works in libhoudini or other translation solutions.
  2. Firstly, since we are dealing with bitwise operations, it is reasonable to convert all values to hex: Anti-cheat 1 = 0x50D00B6E Anti-cheat 2 = 0x120B5C6E Real value = 0x428C0000 Now let's define new values that are derived from these "anti-cheat" values: Key1 = Anti-cheat 1 = 0x50D00B6E Key2 = Anti-cheat 2 with 2nd and 3rd bytes swapped = 0x125C0B6E Real value can then be calculated from previously defined values like this: Real value = Key1 XOR Key2 Real value = 0x50D00B6E XOR 0x125C0B6E = 0x428C0000 Following the same steps for this example: Anti-cheat 1 = 0x50015F1D Anti-cheat 2 = 0x135F511D Real value = 0x43500000 Key1 = 0x50015F1D Key2 = 0x13515F1D Real value = 0x50015F1D XOR 0x13515F1D = 0x43500000
  3. Variable "lastIndex" indicates index of the last element of the table that will be edited, meaning that up to first 5 values will be edited. It can be less than 5 when saved list has less values, but it won't be more than 5. The approach is same, just little modification to the code is needed. For example, code of the second example from my previous post can be modified this way: local items = gg.getListItems() local count = #items local firstIndex = 3 local lastIndex = 7 if lastIndex > count then lastIndex = count end local newItems = {} for i = firstIndex, lastIndex do local item = items[i] newItems[#newItems + 1] = {address = item.address, flags = item.flags, value = "12345"} end gg.setValues(newItems)
  4. There are multiple ways to achieve the same result. Either you can use table returned by "gg.getListItems" function and modify required fields before calling "gg.setValues" function with this table as argument or you can create a new table based on values from returned table, but with required fields having different values on your choice and then call "gg.setValues" function passing the newly created table to it as argument. Example of implementing the first way: local items = gg.getListItems() local count = #items local lastIndex = 5 if lastIndex > count then lastIndex = count end for i = 1, lastIndex do items[i].value = "12345" end for i = lastIndex + 1, count do items[i] = nil end gg.setValues(items) Example of implementing the second way: local items = gg.getListItems() local count = #items local lastIndex = 5 if lastIndex > count then lastIndex = count end local newItems = {} for i = 1, lastIndex do local item = items[i] newItems[i] = {address = item.address, flags = item.flags, value = "12345"} end gg.setValues(newItems)
  5. But there is no need to load saved values as search results in the first place. The same can be accomplished without such redundancy using "gg.setValues" function: local items = gg.getListItems() for i, v in ipairs(items) do if v.flags == gg.TYPE_FLOAT then v.value = "0.10000000149" end end gg.setValues(items)
  6. has which data type? If this is known of course. Can you get encrypted value (interpreted as dword) that corresponds to real value in game being 0?
  7. Even if encrypted value is interpreted as float by the game, one still needs to know exact values to be able to analyze how values in the pairs you provided are related. That's why you were asked to provide the values interpreted as dword.
  8. getValues function can be used to get value(s) at specified address(es). However, in this case an optimization can be applied to get required values as a part of the search. The code may then look, for example, like this: gg.searchNumber("0;1350;-1~~1::9", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0x7A00000000, 0x8A00000000, 0) gg.refineNumber("0;1350::5", gg.TYPE_DWORD, false, gg.SIGN_NOT_EQUAL) local numres = gg.getResultsCount() if numres > 0 then local res = gg.getResults(99) for i, v in ipairs(res) do v.value = 9999999 end gg.setValues(res) end In the initial search string the part "-1~~1" means any value except 0. It represents the target values that needs to be modified according to your condition. Refine search on the second line is used to remove first two values of each group of values that were found at the previous step from the results list, so that only target values remain there. The remaining code simply modifies found results (results list at this point consists only of the target values if any were found) to the desired value.
  9. When converting number to hex string, in most cases one would want to get a result with particular number of hexadecimal digits depending on the data type of the input. The following solution can be used to convert a number to hex string with specified count of digits: function convertToHexString(number, digits) if digits < 1 or digits > 16 then error("Number of hexadecimal digits in the resulting string has to be in range [1; 16]") end local mask = (1 << (digits * 4)) - 1 local format = "%0" .. digits .. "X" return string.format(format, number & mask) end Some examples of using the function along with returned strings: convertToHexString(94, 2) -- "5E" convertToHexString(-41, 2) -- "D7" convertToHexString(3345, 4) -- "0D11" convertToHexString(256787, 8) -- "0003EB13" convertToHexString(-62268, 8) -- "FFFF0CC4"
  10. CmP

    Lua Script Help

    The description of the function from GG API documentation: So it just removes them as nothing about reverting is specified.
  11. CmP

    Help GG.prompt

    Then you need to better describe what you want. Try this: local savedInput = '' function myPrompt() local result = gg.prompt({'Input something'}, {savedInput}, {'text'}) if result ~= nil then savedInput = result[1] end end myPrompt() myPrompt()
  12. CmP

    Help GG.prompt

    Try to search the forum for existing solutions first. This one matches your description: Examples of Lua scripts (#6kko1w03)
  13. function bucle() gg.searchNumber("5; 523; 2", gg.TYPE_DWORD) gg.refineNumber("523", gg.TYPE_DWORD) gg.getResults(gg.getResultsCount()) while true do gg.editAll("85", gg.TYPE_DWORD) gg.sleep(5000) end end
  14. If you need to just keep editing values each 5 seconds indefinitely, the following code may suffice: while true do gg.editAll("85", gg.TYPE_DWORD) gg.sleep(5000) end
  15. Why do you need to remove arch verification, though? It is there not for nothing, but because chains that are found by chainer script will only work on the same architecture on which they were discovered.
×
×
  • Create New...