Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1::
- {
- MsgBox % "P1's X-position = " . P1POSX() . "`nP2's X-position = " . P2POSX() . "`n" . SIDES()
- }
- P1POSX()
- {
- Program := "SSFIVAE"
- Address := 0x00400000
- Offset := 0x0080F0CC
- Value := ReadMemory( Address+Offset, Program)
- Address := Value
- Offset := 0x8
- Value := ReadMemory( Address+Offset, Program)
- Address := Value
- Offset := 0x60
- Value := ReadMemory( Address+Offset, Program)
- Value := HexToFloat(Value)
- return Value
- }
- P2POSX()
- {
- Program := "SSFIVAE"
- Address := 0x00400000
- Offset := 0x0080F0CC
- Value := ReadMemory( Address+Offset, Program)
- Address := Value
- Offset := 0xc
- Value := ReadMemory( Address+Offset, Program)
- Address := Value
- Offset := 0x60
- Value := ReadMemory( Address+Offset, Program)
- Value := HexToFloat(Value)
- return Value
- }
- SIDES()
- {
- if (P1POSX() > P2POSX())
- {
- return "P1 is to the right, and P2 is to the left"
- }
- else
- {
- return "P1 is to the left, and P2 is to the right"
- }
- }
- HexToFloat(x)
- {
- Return (1-2*(x>>31)) * (2**((x>>23 & 255)-150)) * (0x800000 | x & 0x7FFFFF)
- }
- ReadMemory(MADDRESS,PROGRAM)
- {
- winget, pid, PID, %PROGRAM%
- VarSetCapacity(MVALUE,4,0)
- ProcessHandle := DllCall("OpenProcess", "Int", 24, "Char", 0, "UInt", pid, "UInt")
- DllCall("ReadProcessMemory","UInt",ProcessHandle,"UInt",MADDRESS,"Str",MVALUE,"UInt",4,"UInt *",0)
- Loop 4
- result += *(&MVALUE + A_Index-1) << 8*(A_Index-1)
- return, result
- }
Advertisement
Add Comment
Please, Sign In to add comment