View previous topic :: View next topic |
Author |
Message |
thebmxbandit11 Newbie cheater Reputation: 0
Joined: 03 Jul 2014 Posts: 15
|
Posted: Thu Jul 03, 2014 8:23 pm Post subject: Trainer that stores a value and can copy it to addresses |
|
|
So I'd like to make a simple trainer that has 2 hotkeys '1' would take the value of an address and store it somewhere. Then '2' would take the value you stored when you pressed '1' and set an address to that value.
Basically something like this
Press '1'
(the players current X position value is stored "321" for example)
you move around and your x changes
Press '2'
(the players current X position value changes to what was stored "321")
What I don't know how to do is
1. store the value that is currently at some address
2. set the value of an address to something that was stored (a variable)
|
|
Back to top |
|
|
DaSpamer Grandmaster Cheater Supreme Reputation: 52
Joined: 13 Sep 2011 Posts: 1578
|
Posted: Thu Jul 03, 2014 10:24 pm Post subject: |
|
|
Code: | local original_value = 0;
local storeValue = function ()
original_value = readInteger('address');
end
local restoreValue = function ()
writeInteger('address', original_value);
end
createHotkey(original_value, VK_CTRL, VK_1) -- Stores value
createHotkey(restoreValue, VK_CTRL, VK_2) -- Restores value |
_________________
|
|
Back to top |
|
|
thebmxbandit11 Newbie cheater Reputation: 0
Joined: 03 Jul 2014 Posts: 15
|
Posted: Thu Jul 03, 2014 10:55 pm Post subject: |
|
|
DaSpamer wrote: | Code: | local original_value = 0;
local storeValue = function ()
original_value = readInteger('address');
end
local restoreValue = function ()
writeInteger('address', original_value);
end
createHotkey(original_value, VK_CTRL, VK_1) -- Stores value
createHotkey(restoreValue, VK_CTRL, VK_2) -- Restores value |
|
Cool thank you now where do i put this code? Sorry I am very new to cheat engine
I have been trying to figure this out for the past 5 hours if u could add me on skype and explain what to do real quick that would be awesome my skype username is thebmxbandit11
|
|
Back to top |
|
|
STN I post too much Reputation: 42
Joined: 09 Nov 2005 Posts: 2672
|
Posted: Fri Jul 04, 2014 5:17 am Post subject: Re: Trainer that stores a value and can copy it to addresses |
|
|
thebmxbandit11 wrote: | So I'd like to make a simple trainer that has 2 hotkeys '1' would take the value of an address and store it somewhere. Then '2' would take the value you stored when you pressed '1' and set an address to that value.
Basically something like this
Press '1'
(the players current X position value is stored "321" for example)
you move around and your x changes
Press '2'
(the players current X position value changes to what was stored "321")
What I don't know how to do is
1. store the value that is currently at some address
2. set the value of an address to something that was stored (a variable) |
You don't need LUA for this, there are a few ways you can go about this. Here's a quick one
in AA, register a new symbol e.g xcord
newmem:
...your code
mov xcord, (your xcordvalue 321 for example)
newmem+100:
xcord:
dd 0
then simply add an entry in your cheat table, in the address put xcord. Now when you activate your first cheat script, it will update the value in xcord and you can then modify it to whatever you want by assigning a hotkey to it.
_________________
|
|
Back to top |
|
|
thebmxbandit11 Newbie cheater Reputation: 0
Joined: 03 Jul 2014 Posts: 15
|
Posted: Fri Jul 04, 2014 8:16 pm Post subject: Re: Trainer that stores a value and can copy it to addresses |
|
|
STN wrote: | thebmxbandit11 wrote: | So I'd like to make a simple trainer that has 2 hotkeys '1' would take the value of an address and store it somewhere. Then '2' would take the value you stored when you pressed '1' and set an address to that value.
Basically something like this
Press '1'
(the players current X position value is stored "321" for example)
you move around and your x changes
Press '2'
(the players current X position value changes to what was stored "321")
What I don't know how to do is
1. store the value that is currently at some address
2. set the value of an address to something that was stored (a variable) |
You don't need LUA for this, there are a few ways you can go about this. Here's a quick one
in AA, register a new symbol e.g xcord
newmem:
...your code
mov xcord, (your xcordvalue 321 for example)
newmem+100:
xcord:
dd 0
then simply add an entry in your cheat table, in the address put xcord. Now when you activate your first cheat script, it will update the value in xcord and you can then modify it to whatever you want by assigning a hotkey to it. |
that sounds great but i have no idea how to write assembly, use the auto assembler or make all of this into a trainer.
What i really need is just a detailed way to create a trainer that lets you press 1 to save your current x and y position then press 2 to set your x and y to what was saved.
I really do appreciate the comments I just really want to make this trainer and can't find a single good very detailed tutorial on how to make a trainer that runs scripts given certain hotkeys or runs assembly or whatever you were explaining.
Sorry I just really don't know how to figure this out...
okay i figured it out using this lua script given to me by a friend
local savedX = 0;
local savedY = 0;
function savePosition()
savedX = readFloat("[[SuperMeatBoy.exe+002D54BC]+28]+84");
savedY = readFloat("[[SuperMeatBoy.exe+002D54BC]+28]+88");
end
function loadPosition()
writeFloat("[[SuperMeatBoy.exe+002D54BC]+28]+84", savedX);
writeFloat("[[SuperMeatBoy.exe+002D54BC]+28]+88", savedY);
end
createHotkey("savePosition", VK_1);
createHotkey("loadPosition", VK_2);
strings_add(getAutoAttachList(), "SuperMeatBoy.exe");
|
|
Back to top |
|
|
|