Jump to content
  • 0

Searching an Value Using Offsets


Question

Posted (edited)

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

15 answers to this question

Recommended Posts

  • 0
Posted
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 

  • 0
Posted (edited)
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
  • 0
Posted
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

 

  • 0
Posted
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!

  • 0
Posted
1 hour ago, MonkeySAN said:

what is the Items?

doesnt it got a name?

XP , Cat Food etc.

Here the first picture is the first offset = The Speed Up 

And the second picture is the last offset = Sniper the cat

Picsart_23-10-22_18-24-25-880.jpg

  • 0
Posted (edited)
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
  • 0
Posted
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 

  • 0
Posted
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?

  • 0
Posted
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?

  • 0
Posted
19 hours ago, MonkeySAN said:

and what is that hack for?

It's the Unlock all cats basically the 700 the thing since the first offset have 0 cost and erroring to the game so i need that one anyways if you can help really appreciate it 

  • 0
Posted (edited)

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
  • 0
Posted
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 

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

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.