Jump to content
  • 0

Searching an Value Using Offsets


GeorgeMonkey
 Share

Question

Im trying to figure out how to search in a certain offsets.

Here's the script im trying to make

The game had a usual value variety from -20184193 to 2058149 there random when i tried this

local pi = gg.getRangesList("libnative-lib.so:bss")[1].start

 

local u = {}

u[1] = {address = pi + 0xC798, flags = 4}

a = gg.getValues(u)

local Value1 = a[1].value

 

u[1] = {address = pi + 0xD290 , flags = 4}

b = gg.getValues(u)

local Value2 = b[1].value

 

gg.clearResults()

gg.searchNumber(Value1..";0~0;"..Value2.."::2809", 4)

local count = gg.getResultsCount()

local result = gg.getResults(count)

 

for i,v in ipairs(result) do

      v.value = 1

      v.flags = 4

      end

gg.setValues(result)

t = nil

end

end

 

Some of them doesn't get involved 

 

I need a way to actually just put the offsets and the end offsets to search from that adress

Basically like this

 

First offsets - 8D

Values from the middle will be all collected starting from the point of the first offset and will end in the end offsets which is Value[2]

End offsets - 10A

Edited by GeorgeMonkey
Link to comment
Share on other sites

15 answers to this question

Recommended Posts

  • 0
11 minutes ago, MonkeySAN said:

may i know what are you trying to search and edit

and the game current version?

is it armv7(32bit) or armv8(64bit)

64 bit but enclude 32 bit just incase if i needed it in the future

I tried that but it only search some of it 

Link to comment
Share on other sites

  • 0
3 minutes ago, MonkeySAN said:

ok.

its your choice if you dont want to share the thing you ate looking for.

Good luck.

Idk the code that i suppose to fix though. How can i fix it. Anyway would be thank full if you show some template for it !

 

Also the thing im trying to search is already in the Help o posted. 

4 minutes ago, MonkeySAN said:

ok.

its your choice if you dont want to share the thing you ate looking for.

Good luck.

local pi = gg.getRangesList("libnative-lib.so:bss")[1].start

 

 

 

local u = {}

 

u[1] = {address = pi + 0xAAF0, flags = 4}

 

a = gg.getValues(u)

 

local Value1 = a[1].value

 

 

 

u[1] = {address = pi + 0xAAF4 , flags = 4}

 

b = gg.getValues(u)

 

local Value2 = b[1].value

 

 

 

gg.clearResults()

 

gg.searchNumber(Value1..";-0~0;"..Value2.."::2809", 4)

 

local count = gg.getResultsCount()

 

local result = gg.getResults(count)

 

 

 

for i,v in ipairs(result) do

 

      v.value = 1

 

      v.flags = 4

 

      end

 

gg.setValues(result)

 

t = nil

 

end

 

end

 

Here you go this is the offset of the Items in the shop from first to bottom im trying to search all the value starting from the offset of the first and stopping at the offset two so i can edit it by

500

0

Edited by GeorgeMonkey
Link to comment
Share on other sites

  • 0
4 minutes ago, MonkeySAN said:

what is the Items?

doesnt it got a name?

XP , Cat Food etc.

speed up

tresure

Cat sniper

Max wallet

2xp

Etc.. 

The one in the item shop

The first offset is the first item which is Speed up the last offset is the last itwm which i forgot ghe name

 

Link to comment
Share on other sites

  • 0
26 minutes ago, GeorgeMonkey said:

speed up

tresure

Cat sniper

Max wallet

2xp

Etc.. 

The one in the item shop

The first offset is the first item which is Speed up the last offset is the last itwm which i forgot ghe name

 

I can provide an screenshot if needed!

Link to comment
Share on other sites

  • 0
local lib = "libnative-lib.so:bss"
local pi = gg.getRangesList(lib)[1].start
local firstAddr = pi + offset--your offset
local lastAddr = pi + offset--your offset

local value1 = gg.getValues({{address = firstAddr, flags = 4}})[1].value
local value2 = gg.getValues({{address = lastAddr, flags = 4}})[1].value

gg.searchNumber(value1..";0~~0;"..value2.."::45", 4)
local results = gg.getResults(gg.getResultsCount())

gg.editAll("500;0",4)
gg.clearResults()

for Battle Items :

Speed Up

Treasure Radar

Rich Cat

Cat CPU

Cat Jobs

Sniper the Cat

Edited by MonkeySAN
Link to comment
Share on other sites

  • 0
9 minutes ago, MonkeySAN said:
local lib = "libnative-lib.so:bss"
local pi = gg.getRangesList(lib)[1].start
local firstAddr = pi + offset--your offset
local lastAddr = pi + offset--your offset

local value1 = gg.getValues({{address = firstAddr, flags = 4}})[1].value
local value2 = gg.getValues({{address = lastAddr, flags = 4}})[1].value

gg.searchNumber(value1..";0~~0;"..value2.."::45", 4)
local results = gg.getResults(gg.getResultsCount())

gg.editAll("500;0",4)
gg.clearResults()

for Battle Items :

Speed Up

Treasure Radar

Rich Cat

Cat CPU

Cat Jobs

Sniper the Cat

Thank you sir! Appreciate it 

Link to comment
Share on other sites

  • 0
On 10/22/2023 at 6:53 PM, MonkeySAN said:
local lib = "libnative-lib.so:bss"
local pi = gg.getRangesList(lib)[1].start
local firstAddr = pi + offset--your offset
local lastAddr = pi + offset--your offset

local value1 = gg.getValues({{address = firstAddr, flags = 4}})[1].value
local value2 = gg.getValues({{address = lastAddr, flags = 4}})[1].value

gg.searchNumber(value1..";0~~0;"..value2.."::45", 4)
local results = gg.getResults(gg.getResultsCount())

gg.editAll("500;0",4)
gg.clearResults()

for Battle Items :

Speed Up

Treasure Radar

Rich Cat

Cat CPU

Cat Jobs

Sniper the Cat

Do you know how to edit the first adress is a higher value it should edit the rest like that?

 

Example

First adress - first offset value is

671,018 

The rest is

671,017 

Then a script which edit it like this

Script

Then

All of them will be the same as the first adress?

Link to comment
Share on other sites

  • 0
4 hours ago, GeorgeMonkey said:

Do you know how to edit the first adress is a higher value it should edit the rest like that?

 

Example

First adress - first offset value is

671,018 

The rest is

671,017 

Then a script which edit it like this

Script

Then

All of them will be the same as the first adress?

and what is that hack for?

Link to comment
Share on other sites

  • 0

try this to see if it work for you.

local lib = "libnative-lib.so:bss"
local pi = gg.getRangesList(lib)[1].start
local firstAddr = pi + offset--your offset

local value1 = gg.getValues({{address = firstAddr, flags = 4}})[1].value

gg.searchNumber(value1 - 1, 4)
local results = gg.getResults(gg.getResultsCount() - 1)

gg.editAll(value1,4)
gg.clearResults()

 

Edited by MonkeySAN
Link to comment
Share on other sites

  • 0
On 10/25/2023 at 7:11 PM, MonkeySAN said:

try this to see if it work for you.

local lib = "libnative-lib.so:bss"
local pi = gg.getRangesList(lib)[1].start
local firstAddr = pi + offset--your offset

local value1 = gg.getValues({{address = firstAddr, flags = 4}})[1].value

gg.searchNumber(value1 - 1, 4)
local results = gg.getResults(gg.getResultsCount() - 1)

gg.editAll(value1,4)
gg.clearResults()

 

Hello again:)) i encounter an error with this when the searches are 1000 it only search 7 - 255 not all the way of the adress2 would you mind fixing it i tried my best did not worked 

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.