Jump to content
  • 0

refine and edit with offsets


BotBot72826
 Share

Question

in the mod menu i use these codes to edit the values. I need to implement them for game guardian

 

I want to do this because the group search is taking too long.

if you help i will be grateful

 

gg.searchNumber("60", Flags.DWORD);
                        gg.refineNumber("1",Flags.DWORD,-0x4);                      
                        gg.refineNumber("1",Flags.DWORD,0x4);
                        gg.refineNumber("1",Flags.DWORD,0x10);
                        gg.refineNumber("90",Flags.DWORD,0x14);

gg.refineNumber("1",Flags.DWORD,0x18);

gg.refineNumber("1",Flags.DWORD,0x28);

gg.editAll("0", Flags.DWORD,-0x4);

gg.editAll("0", Flags.DWORD,0x4);

gg.editAll("0", Flags.DWORD,0x10);

gg.editAll("0", Flags.DWORD,0x18);g

g.editAll("0", Flags.DWORD,0x28);

Edited by BotBot72826
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

while group search is slow..it can produce much desirable amount of results to work with.

depend on a game..if your group search contain 5 values..the amount of results you got will be exactly that many.

on other hand..searching a single value is faster but will generate lot of results.

depend on the value type..it can reach millions results...if not more. 

btw..searching a value..results will show that value only so refining to another value will yield no results.

i got the tiniest idea here of what you want but..

maybe you need to be more clear though for what you want to achieve.

it will more easier for people to understand and not to have to guessing all around.

start with SEARCH..and then what and then what..and so on.

Edited by MonkeySAN
pardon my English.
Link to comment
Share on other sites

  • 0
26 minutes ago, MonkeySAN said:

while group search is slow..it can produce much desirable amount of results to work with.

depend on a game..if your group search contain 5 values..the amount of results you got will be exactly that many.

on other hand..searching a single value is faster but will generate lot of results.

depend on the value type..it can reach millions results...if not more. 

btw..searching a value..results will show that value only so refining to another value will yield no results.

i got the tiniest idea here of what you want but..

maybe you need to be more clear though for what you want to achieve.

it will more easier for people to understand and not to have to guessing all around.

start with SEARCH..and then what and then what..and so on.

I need to somehow check if the value is suitable if it has an offset this code is similar to what I need but it takes about 30 minutes

gg.searchNumber("600", 4)

local results = gg.getResults(gg.getResultsCount())

gg.clearResults()

 

local offsets = {

  [0x4] = 1,

  [-0x4] = 1

}

 

for i, result in ipairs(results) do

  for offset, value in pairs(offsets) do

    local address = result.address + offset

    if gg.getValues({{address = address, flags = gg.TYPE_DWORD}})[1].value == value then

      gg.setValues({{address = result.address, value = 0, flags = gg.TYPE_DWORD}})

      break

    end

  end

end

 

and this code cannot be edited by offsets, I need to somehow speed it up or get some kind of alternative

Link to comment
Share on other sites

  • 0

this codes was from someone else.

i got it a very very long time ago..so i dont remember who was that person is.

gg.clearResults()

gg.searchNumber("15", gg.TYPE_DWORD)

local results = gg.getResults(gg.getResultsCount())

local checkValues = {}

for i, v in ipairs(results) do
   checkValues[#checkValues + 1] = {address = v.address + 0x4, flags = gg.TYPE_DWORD} -- Add check for offset +0x4
   checkValues[#checkValues + 1] = {address = v.address - 0x4, flags = gg.TYPE_DWORD} -- Add check for offset -0x4
end
checkValues = gg.getValues(checkValues)

local filteredResults = {}

for i, v in ipairs(results) do
   local index1 = i * 2 - 1
   local index2 = i * 2

  -- set value to check for offsets 0x4 and -0x4
   if checkValues[index1].value == 16 and checkValues[index2].value == 16 then
      filteredResults[#filteredResults + 1] = v
   end
end

gg.loadResults(filteredResults)

so basically the codes above will search target value, get the offsets value and compare with set value then load only the target value results that matched it.

from there you can do the editing.

i cannot tell you more about it as im not the expert in lua script.

perhaps it will work in your case..try it.

Edited by MonkeySAN
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • 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.