esco wrote:Found something in the new version I figured I should mention... the old version auto arranged memory addresses from lowest to highest.... this one just leaves them in the order they are inputed in. This can be VERY helpful, but I just wanted to mention that it might be a good idea to also put in an option that can auto arrange them from lowest to highest also. Just a suggestion.
You can arrange them in any order as you please.
Click the column header.
The Compiler wrote:ERROR: Pos: 524 Call to undefined function or incompatible argument lists (“mapnumholders”). File: D:\Emulators\ePSXe\memhack\test.lss
You wrote function “MAPNUMHOLDERS()”, not “mapnumholders()”.
Also, this code does not go here.
It goes in the third tab on the items labeled “Script Address”.
Everything in test.lss needs to be copied there.
Double-click the item that is to have this special lock, go to the third tab, and paste.
esco wrote:Next I write a small script to declare the variables, and try to set it so that when the values in roomhoriz=0 and roomvert =2 (both these values copy from the memory adresses of 629ef0 and 629ef4) it changes the value in whipdmg to 999 ( which I then want to copy to 70b5e0).
This is what your code is already doing.
esco wrote:how do I copy the value from whipdmg BACK to 70b5e0? Does it do it automatically?
Your code is already writing the value 999 to address 0x0070B5E0 in the target process.
esco wrote:Also is there a way I can DIRECTLY WRITE back into the memory address without the var?
Or to go one step further... is there a way to just write a script that does this WITHOUT variables?
ReadProcessMemory()
WriteProcessMemory()
Once you find out how much of a hassle that is, you will praise the heavens for being able to use my variables.
This was the whole point behind my script really.
I—and everyone else—am tired of the pain-in-the-ass of having to create buffers, store local copies, call functions, etc., when trying to manipulate data in the target process.
extern variables allow you to avoid all this hassle and manipulate them as if you were manipulating any other variables.
esco wrote:<pseudocode>
if 5b6e40=3
then 7b6e3f=11
end if
- Code: Select all
extern int iReadMe = { "", 0x005B6E40 };
extern int iWriteMe = { "", 0x007B6E3F };
if ( iReadMe == 3 ) { iWriteMe = 11; }
Now, if you wanted to do this without my variables, I will give you a small glimpse of the pain in the ass this will be.
- Code: Select all
int iLocalCopyReadMe;
int iLocalCopyWriteMe;
if ( !ReadProcessMemory( GetCurProcessHandle(), (LPVOID)0x005B6E40, &iLocalCopyReadMe, sizeof( int ), NULL ) ) { return; }
if ( iLocalCopyReadMe == 3 ) {
iLocalCopyWriteMe = 11;
WriteProcessMemory( GetCurProcessHandle(), (LPVOID)0x007B6E3F, &iLocalCopyWriteMe, sizeof( int ), NULL )
}
Manually reading and writing from and to the target process only gets harder and harder for each operation you want to perform.
And if you want to follow a pointer in the target process manually, well, I hope you have a lot of patience.
My extern variables are God’s gift to you to remove this hassle, allowing you to code faster and write smaller and more readable code.
Of course, I design my language for everybody, so you still have the choice to stay old-fashioned and work manually.
esco wrote:I'm assuming that in this demo release the ability to "lock" or "change" values in memory with c scripts is done, right? Or did I just misunderstand you?
It was never not part of the scripts, in any release.
Your code is already doing it.
You just called “mapnumholders” instead of “MAPNUMHOLDERS” so it wouldn’t compile, and you put it in the wrong place.
esco wrote:how do I use this to say set a value to drop to 10 if it is OVER 10 AND and a value at another memory address =9 for example? Just as an example.
- Code: Select all
extern iOther = { "", 0xOTHER };
extern iThis = { "", 0x007B6E3F };
if ( iThis > 10 && iOther == 9 ) { iThis = 10; }
Also I wanted to set it up so that the minute the process is opened (epsxe.exe) all the scripts begin executing. But so far even if I JUST leave in the memory allocating code you gave me above (with the on_openprocess), save it, load it into scripts, compile it, then load the process up... NUTHING happens at all.... why is that? It used to work fine with hotkeys.
I forgot to add the On_OpenProcess() event to the demo version.
Once you call the correct function and you copy the code to the actual item, then download the next demo which will have the hotkeys and process events, you will see things working fine and a shiver will crawl down your neck as you realize just how much you can really do from now on.
L. Spiro