Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Help Adding Offsets to Base Addresses!

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
aspectratio
How do I cheat?
Reputation: 0

Joined: 07 Mar 2015
Posts: 4

PostPosted: Sun Mar 08, 2015 11:36 am    Post subject: Help Adding Offsets to Base Addresses! Reply with quote

I'm creating a teleport section of a trainer, and I'm having trouble finding out how to use offsets. I've goggled for hours and I can't find anything.

I have
"s1_mp64_ship.exe"+042004C0
With one Pointer being 80

This is the code I'm trying to get to work
Quote:
writeInteger("s1_mp64_ship.exe+042004C0", getProperty(CETrainer.CEEdit1,"Text"))


I have a text box, I just need to know how to add the 80 offset to
s1_mp64_ship.exe+042004C0 to get it working right.

Thanks in advance!
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25262
Location: The netherlands

PostPosted: Sun Mar 08, 2015 1:09 pm    Post subject: Reply with quote

writeInteger(readPointer("s1_mp64_ship.exe+042004C0") +0x80, CETrainer.CEEdit1.Text)
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
aspectratio
How do I cheat?
Reputation: 0

Joined: 07 Mar 2015
Posts: 4

PostPosted: Sun Mar 08, 2015 6:21 pm    Post subject: Reply with quote

Dark Byte wrote:
writeInteger(readPointer("s1_mp64_ship.exe+042004C0") +0x80, CETrainer.CEEdit1.Text)


Thanks for the reply. When I use this, it sets my coordinates back to the starting location, but if I change them in CE, it works.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25262
Location: The netherlands

PostPosted: Sun Mar 08, 2015 6:28 pm    Post subject: Reply with quote

try tonumber(CETrainer.CEEdit1.Text)
and perhaps add a print statement to check that it actually is a number (perhaps you're reading a wrong edit)

and post the full pointer, perhaps there are more steps or different type

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping


Last edited by Dark Byte on Sun Mar 08, 2015 6:30 pm; edited 1 time in total
Back to top
View user's profile Send private message MSN Messenger
aspectratio
How do I cheat?
Reputation: 0

Joined: 07 Mar 2015
Posts: 4

PostPosted: Sun Mar 08, 2015 6:29 pm    Post subject: Reply with quote

aspectratio wrote:
Dark Byte wrote:
writeInteger(readPointer("s1_mp64_ship.exe+042004C0") +0x80, CETrainer.CEEdit1.Text)


Thanks for the reply. When I use this, it sets my coordinates back to the starting location, but if I change them in CE, it works.

Also it's worth noting the value for each of these looks like this
2.732532005E-43


"s1_mp64_ship.exe"+080E85C8 ->1442061F0
Is the base, and the only offset is 7c
(This is for y)
The vlaue is 2.788583944E-43, But it works if I write with CE


writeInteger(readPointer("s1_mp64_ship.exe+080E85C8") +0x7c, tonumber(CETrainer.CEEdit2.Text))





Also I've tried a few text input methods, and get the same response. It must be the way it's writing the value to the pointer itself.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites