Question with calculating an address in a private base in SC

Need Help With an Existing Feature in Memory Hacking Software? Ask Here

Moderators: g3nuin3, SpeedWing, WhiteHat, mezzo

Question with calculating an address in a private base in SC

Postby PercyPierce » Thu Feb 02, 2017 3:16 pm

Hi guys! Sorry if this question has been asked before but I just figured out how to get the script editor to work, and I came up with this code.

Code: Select all
VOID Lock ( MHS_ADDRESS aAddress, INT iItemSize )
{
extern INT p2buttons = { "", aAddress };  // This is the address of the joystick that's plugged into the computer that the emulator picks up. A PRIVATE address that moves when I reboot the emulator.
extern BYTE P2facing = { "", ssf.exe + 6473071 }; // This is a variable that tells me if the player is facing right or left (0 or 1).


// I put no code here yet

}

I get a compile error when I press ok. My question is how do I get the script to calculate addresses across modules? It doesn't seem as simple as it is when using the expression evaluator.
PercyPierce
I Have A Few Questions
 
Posts: 2
Joined: Sun Jan 29, 2017 11:26 am

Re: Question with calculating an address in a private base in SC

Postby L. Spiro » Thu Feb 02, 2017 4:15 pm

Code: Select all
extern BYTE P2facing = { "", ssf.exe + 6473071 };

should be:
Code: Select all
extern BYTE P2facing = { "ssf.exe", + 6473071 };



L. Spiro
Our songs remind you of songs you’ve never heard.
User avatar
L. Spiro
L. Spiro
 
Posts: 3122
Joined: Mon Jul 17, 2006 10:14 pm
Location: Tokyo, Japan

Re: Question with calculating an address in a private base in SC

Postby PercyPierce » Fri Jul 28, 2017 2:28 am

Hey there guys I have another question. I am making an AI for a fighting game. Because I am just disappointed by the AI that the game itself has. Now there are about 32 characters in the game, and I would like to make a separate file for each one. Then I would like memhack to stream the code for each character off of the disk.



Code: Select all
VOID Lock ( MHS_ADDRESS aAddress, INT iItemSize )
{

extern BYTE yourcharacter = {"ssf.exe", 0x6472EA8};


   
   


switch (yourcharacter)

{
   case 0: {   /*open notepad txt file containing code for this character and load it into here.   */   break;}      
   case 1: {   /*open notepad txt file containing code for this character and load it into here.      */   break;}      
        case 2: {   /*open notepad txt file containing code for this character and load it into here.      */   break;}      
        case 3: {   /*open notepad txt file containing code for this character and load it into here.      */   break;}      
                           
}
}
}







is memhack capable of doing this?
PercyPierce
I Have A Few Questions
 
Posts: 2
Joined: Sun Jan 29, 2017 11:26 am

Re: Question with calculating an address in a private base in SC

Postby L. Spiro » Fri Aug 04, 2017 2:42 pm

I see no problem with it. It’s up to you to find the files and parse them, etc., but otherwise this should be a very simple task.
Just use the FILE functions to access the files and breakpoints to trigger scripts.


L. Spiro
Our songs remind you of songs you’ve never heard.
User avatar
L. Spiro
L. Spiro
 
Posts: 3122
Joined: Mon Jul 17, 2006 10:14 pm
Location: Tokyo, Japan


Return to Help

Who is online

Users browsing this forum: No registered users and 1 guest

cron