Jump to content
Sign in to follow this  
Daisy123

Search and edit a big hex number.

Recommended Posts

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.

 

Share this post


Link to post
Share on other sites

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)

 

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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)

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Similar Content

    • By MarioRossi93i
      Real Racing 3 Autodrive Freeze Ghost
       
      Current version: alpha 1.0
       
      Requirements:
      - Game Guardian v.96.0+
      - 64 Bit device
       
      Description:
      Activate Autodrive, freeze and ghost all in one.
      64 bit only
       
      Instructions:
      - Run it after the traffic light has turned green
       
      Video:
       
    • By MarioRossi93i
      View File Real Racing 3 Autodrive Freeze Ghost AIO (x64 only)
      Real Racing 3 Autodrive Freeze Ghost
       
      Current version: alpha 1.0
       
      Requirements:
      - Game Guardian v.96.0+
      - 64 Bit device
       
      Description:
      Activate Autodrive, freeze and ghost all in one.
      64 bit only
       
      Instructions:
      - Run it after the traffic light has turned green
       
      Video:
       
      Submitter MarioRossi93i Submitted 05/13/2020 Category LUA scripts  
    • By DsaFes
      https://pastebin.com/twsqsyh4
    • By star360
      Create on/off button in lua script
       No need to searching values for every time
       Simple script but better ideas
      Read this simple script carefully
      You will be understand 
       
       Specially thanks to @MuhammadRizwan87
      Credit @TDOhex
       
      function search() gg.clearResults() gg.setRanges(gg.REGION_C_DATA) gg.searchNumber("1;2;3", gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1) gg.refineNumber("1", gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1) local t = gg.getResults(3) for i, v in ipairs(t) do t[i].name = 'testoff' end gg.addListItems(t) gg.clearResults(t) end search()  
      on = "[OFF]" off = "[ON]" test = off  
      function main() menu = gg.choice({ test.." Test", "Exit"}, nil, "Example by @TDOhex")  
      if menu == 1 then if test == off then test = on local t = gg.getListItems(testoff) for i, v in ipairs(t) do if v.name == "testoff" then t[i].value = 0 t[i].name = 'teston' end gg.setValues(t) gg.addListItems(t) end else test = off local t = gg.getListItems(teston) for i, v in ipairs(t) do if v.name == "teston" then t[i].value = 1 t[i].name = 'testoff' end gg.setValues(t) gg.addListItems(t) end end  
      elseif menu == 2 then print("Thanks to visiting @TDOhex") gg.copyText('https://t.me/TDOhex') intro = "Join to @TDOhex" for i = 1, #intro do gg.toast(intro:sub(1, i) .. "_✍") gg.sleep(140) end local t = gg.getListItems() gg.removeListItems(t) os.exit() end end  
      while true do if gg.isVisible() then gg.setVisible(false) main() end end  
      I just shared it... 
      On-Off_Example.lua
    • By DsaFes
      https://pastebin.com/twsqsyh4
×
×
  • Create New...