Jump to content
  • 0

Search and edit a big hex number.


Daisy123
 Share

Question

Hello. I am learning to write lua script for GG. I have a question. If you know please help me.
I want to search a big hex number for example: 02390D000000026FC90801066FAB0701A66B2A22000000402A  and then edit it to 00000000000000000000000000000000000000220000C8422A in memory.
To search I use this :

gg.clearResults()
gg.clearList()

gg.searchNumber('h02390D000000026FC90801066FAB0701A66B2A22000000402A', gg.TYPE_BYTE)

But I dont know how to edit results to 00000000000000000000000000000000000000220000C8422A.
Please help me. Thank you.

 

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0
  • Administrators

It is not a number. It is text in hex view. So you need search text, not a number.

See examples for searchNumber in API help.

[added 1 minute later]
-- search for HEX '5C E3 0B 4B 90 9B 11 7B'
gg.searchNumber('h 5C E3 0B 4B 90 9B 11 7B')

For edit use editAll

-- edit HEX
gg.searchNumber('h 5C E3 0B')
gg.getResults(30)
gg.editAll('h 4B 90 9B', gg.TYPE_BYTE)

 

Link to comment
Share on other sites

  • 0
10 minutes ago, Enyby said:

It is not a number. It is text in hex view. So you need search text, not a number.

See examples for searchNumber in API help.

[added 1 minute later]

-- search for HEX '5C E3 0B 4B 90 9B 11 7B'
gg.searchNumber('h 5C E3 0B 4B 90 9B 11 7B')

For edit use editAll


-- edit HEX
gg.searchNumber('h 5C E3 0B')
gg.getResults(30)
gg.editAll('h 4B 90 9B', gg.TYPE_BYTE)

 

Oh. I didn't read the editAll in API help carefully. Sorry for that and thank for your help.

Btw, What happend if I ignore space character when put hex value like 'h5CE30B' instead of 'h 5C E3 0B'

Edited by Daisy123
Link to comment
Share on other sites

  • 0
  • Administrators

Spaces between bytes not necessary. Both is same as above.

-- edit HEX
gg.searchNumber('h 5CE30B')
gg.getResults(30)
gg.editAll('h 4B909B', gg.TYPE_BYTE)

-- edit HEX
gg.searchNumber('h5CE30B')
gg.getResults(30)
gg.editAll('h4B909B', gg.TYPE_BYTE)

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 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.