Question about LUA script addresses and pointers

Sbenny.com is trusted by 1,326,064 happy users since 2014.
Register

leagra

Apprentice Lv2️⃣
Member for 3 years
Hey! As some of you may or may not have seen, I've recently started writing (pretty bad) LUA scripts and am trying to improve them. I've found out, that certain values have certain addresses on the ram that can be searched instead of the value itself. Sadly there aren't many tutorials about this, so I can't really learn this proerly. What I don't get is: Do addresses for certain variables always stay the same? If I for example have 50 HP, find the value and its address and save the adress. Now I complete the level, restart the game and get back up to 100 HP. Would the address still be the same? I'm only talking about static addresses here, as I know that dynamic ones are much harder to find.

Now to the second question: Why would one use pointers, if they already know the address of a value? If the address is dynamic, the address will change anyway, essentially making the pointer useless, or not?

Sorry for my probably rather dumb question, I just couldn't figure it out on my own (or wasn't 100% sure) and don't want to release a faulty script.

Edit: What I've learnt so far (by trial & error) is, that addresses always stay the same, no matter what happens to their value. Is that correct?
 
Last edited:

Daniel

Hunter of Sbennytopia
From the Hell
Verified 18+ user
Active User
The Cleaner 🧹
Member for 3 years

NoFear

Veteran Lv7️⃣
Special Guest
VIP Member
Member for 6 years
The use of pointers isn't for it's current location but it's structure.
What you can do is pointer search your value/near value. Then pointer search each. Pointer search each of those..... It's very time consuming to find a reliable 'path'. But, in the end, you can find a simple static search to find the pointer at the end of your navigation... Then after you do your search, re navigate through the same structure of pointers back to your value. No matter how encrypted the value may be or how hard it is to find, pointer will get you there.
 

FoxInFlames

☢ඞSUSඞ☢
Member for 3 years
Hey there, mind if i move it to the android modding university section? It seems to fit better there.
 
Top