Jump to content
Mustang4409281

how to get a value that changes by another value that doesn't change with the offset

Recommended Posts

I'm trying to get a value that changes for another value that doesn't change using displacement, but I'm not getting it, could someone help me with that? sorry for possible english errors, i'm using the translator

function TorreHack()
gg.setRanges(32)
gg.clearResults()
gg.searchNumber("-7,63805866e-37", gg.TYPE_FLOAT) --this value don't change
p = {}
p = gg.getResults("1")
valor = {}
valor[1] = {}
valor[1].address = p[1].address + 0xBC --BC is offset
valor[1].flags = gg.TYPE_FLOAT
valor[1].value = 6
gg.setValues(valor)

Error:

lua:29

`valor[1].address = p[1].address + 0xBC --BC is offset`

attempt to index ? (a nil value) with key 'address' (field '1')

level = 1, const = 18, proto = 0, upval = 1, vars = 3, code = 45

GETTABLE v1 v1 "address"

Share this post


Link to post
Share on other sites
function TorreHack()
gg.setRanges(32)
gg.clearResults()
gg.searchNumber("-7,63805866e-37", gg.TYPE_FLOAT) --this value don't change
local p = gg.getResults(1)
  
local t = {}
t[1] = {}
t[1].address = p[1].address + 0xBC --BC is offset
t[1].flags = 16 -- is gg.TYPE_FLOAT
t[1].value = 6
gg.setValues(t)

 

Share this post


Link to post
Share on other sites

or..

function TorreHack()
gg.setRanges(32)
gg.clearResults()
gg.searchNumber("-7,63805866e-37", gg.TYPE_FLOAT) --this value don't change
local p = gg.getResults(1)
  
gg.setValues({
      {address = p[1].address + 0xBC,flags = 16,value = 6} })

gg.toast("Done")
gg.clearResults()
end

 

Share this post


Link to post
Share on other sites

I just solved this error, it was a trick of the float value, I don't know how to move with the right float so the value was wrong. thank you very much for the codes, this will help me a lot.

Share this post


Link to post
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

×
×
  • Create New...