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 


Script to change value.

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
lamburger
Newbie cheater
Reputation: 0

Joined: 01 Dec 2015
Posts: 16
Location: U.S

PostPosted: Wed Dec 02, 2015 3:39 am    Post subject: Script to change value. Reply with quote

So, i need to write a script to change a value as soon as the address for the value is written to. I need the value of a certain address to change to 30 when written to. I have looked up a multitude of scripting topics to try and understand how i would go of writing my own script, but i can't seem to comprehend how i would write what I am aiming for. This may seem like an extremely noob question, but if i can get some help, it would be more appreciated than you know.
_________________
Someone who never wants to stop learning.


Did he fury swipes you?
Back to top
View user's profile Send private message
Rydian
Grandmaster Cheater Supreme
Reputation: 31

Joined: 17 Sep 2012
Posts: 1358

PostPosted: Wed Dec 02, 2015 10:25 am    Post subject: Reply with quote

1 - Find the address.

2 - Right-click it, choose find what writes to this address.

3 - Find the things that write to it and figure out what writes to it and when.

4 - Show us.

_________________
Back to top
View user's profile Send private message
lamburger
Newbie cheater
Reputation: 0

Joined: 01 Dec 2015
Posts: 16
Location: U.S

PostPosted: Wed Dec 02, 2015 1:12 pm    Post subject: Reply with quote

So I am unable to post picture attachments as my browser freezes up when i try to, so i am going to have to type out the address and what not.


The address is 154C9A6C

0062BFF9 - 88 43 18 - mov [ebx+18],al is what writes to the address, and is written to whenever the value of the address lowers.

Ex: Base value of address is 30, when it lowers, is written to because the value has decreased in-game.

I hope i have given what you asked for.

_________________
Someone who never wants to stop learning.


Did he fury swipes you?
Back to top
View user's profile Send private message
ulysse31
Master Cheater
Reputation: 2

Joined: 19 Mar 2015
Posts: 324
Location: Paris

PostPosted: Wed Dec 02, 2015 1:25 pm    Post subject: Reply with quote

In memory viewer go there 0062BFF9.

(Press ctrl+G and enter 0062BFF9).
then press CTRL+A, then press CTRL+i.

Then find the "original code:" and replace
mov [ebx+18],al
by
mov [ebx+18],30


not sure if u meant hexa or decimal 30. Also assuming your variable is 4 bytes long.

Could be worth it to make sure this instruction doesn't write other address:
at 0062BFF9 in memory viewer, right click opcode and chose 'find out what address this instruction access'.
If it's more than 1 address the code i posted might cause troubles
Back to top
View user's profile Send private message
lamburger
Newbie cheater
Reputation: 0

Joined: 01 Dec 2015
Posts: 16
Location: U.S

PostPosted: Wed Dec 02, 2015 1:49 pm    Post subject: Reply with quote

Thank you, that works, but one last thing. I need to know how i would make it so that the script is in the cheat engine interface, so i am able to just check it and it would trigger the script rather than having to continuously execute it manually. How would i go of doing that?
_________________
Someone who never wants to stop learning.


Did he fury swipes you?
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4718

PostPosted: Wed Dec 02, 2015 2:03 pm    Post subject: Reply with quote

  1. Open up AA window (Ctrl+Alt+A)
  2. Paste this in:
    Code:
    [ENABLE]
    assert(0062BFF9,88 43 18)
    0062BFF9:
       mov [ebx+18],30

    [DISABLE]
    0062BFF9:
       mov [ebx+18],al

  3. File -> Assign to Cheat Table
  4. Enable the script

If the script doesn't enable, then the address 0062BFF9 is dynamic (changes location when the game is restarted). Give us more bytes after that instruction if that's the case.

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
lamburger
Newbie cheater
Reputation: 0

Joined: 01 Dec 2015
Posts: 16
Location: U.S

PostPosted: Wed Dec 02, 2015 2:18 pm    Post subject: Reply with quote

The script was enabled, but when the value of the address decreased, the game crashed.
_________________
Someone who never wants to stop learning.


Did he fury swipes you?
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4718

PostPosted: Wed Dec 02, 2015 2:28 pm    Post subject: Reply with quote

Oh, nevermind, I forgot that takes up more bytes than the original mov.

If you follow the other instructions, go to Template -> "Cheat table framework code" right before hitting Ctrl+I, then assign it to your cheat table.

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
lamburger
Newbie cheater
Reputation: 0

Joined: 01 Dec 2015
Posts: 16
Location: U.S

PostPosted: Wed Dec 02, 2015 2:52 pm    Post subject: Reply with quote

Works perfectly folks, thanks for all the help!
_________________
Someone who never wants to stop learning.


Did he fury swipes you?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking 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