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 


[Auto-assembler][Scripting][Help] Global var use ?

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

Joined: 09 Mar 2021
Posts: 2

PostPosted: Tue Mar 09, 2021 9:10 am    Post subject: [Auto-assembler][Scripting][Help] Global var use ? Reply with quote

Hello,

the main goal i'm trying to achieve is to have a convenient way of clicking and teleport a player to pre-defined coordinates.

What I did is :
- a script with auto-assembler to retrieve the address of the player coordinates, using AOB injection, and setting it to a var named PosZ
- a second script in the address list to set the 3 coordinates to a predefined point

script1, :

Code:
label(PosZ)
registersymbol(PosZ)


the var PosZ contains an address, let's say 20D00B5E1F8
that script works, and I can reliably find the said coordinates's address


script2,

Code:
mov [PosZ+000001D8], (float)2556.71875// Z
mov [PosZ+000001D4], (float)16909.41406// Y
mov [PosZ+000001D0], (float)-4738.165039// X


but it doesn't seems to do anything. (The offsets are intentional)

A few questions :
- Is script2 viable ? How could I do to actually modify those values ?
- Is there another way of achieving my goal ?

Many thanks in advance for your help and advices Smile
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 473

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

PostPosted: Tue Mar 09, 2021 9:20 am    Post subject: Reply with quote

try
Code:

[PosZ]+000001D0:
dd (float)-4738.165039  //x
dd (float)16909.41406 //y
dd (float)2556.71875  //z

_________________
Tools give you results. Knowledge gives you control.

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

Joined: 09 Mar 2021
Posts: 2

PostPosted: Tue Mar 09, 2021 9:29 am    Post subject: Reply with quote

Thank you, it worked.
(Also you're quite fast, thanks)

I will use this syntax for further scripts Smile

Edit : Here's one interesting tutorial which half covers the fact that you can do
Adress:
Opcodes
Opcodes
...
viewtopic.php?t=95363
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 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