Jump to content

_memoryopen problem


 Share

Recommended Posts

Your looking at multilevel pointers

This guy explained it well

about multilevel pointers:

lets say you have a game object

the game object has a player object

and the player object holds the health

so to find the health address you need to know the address of the player object

and to find the player object you need to know the address of the game object

This is a level 2 pointer he's talking about.

This is the topic I took it from, it might help you: http://forum.cheatengine.org/viewtopic.php?t=9999

They talk about multilevel pointers.

Also check this one too: http://forum.cheatengine.org/viewtopic.php?t=94086

Good luck, hope this helps. ;)

"The quieter you are, the more you are able to hear..."

My AppsUSB Finder

Link to comment
Share on other sites

  • Replies 97
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Just something I noticed when using this function. Use one array for each offset. (offsets should be in decimal form NOT HEX) Here's a hex to decimal converter: http://www.easycalculation.com/hex-converter.php

$procHwnd = ProcessExists("FlorensiaEN.bin")
$address = 0x6FBCC1E0 ;This is still hex

Dim $offset1[2]
$offset1[0] = 0 ;not used by memory function
$offset1[1] = 468 ;1D4 in decimal
Dim $offset2[2]
$offset2[0] = 0 ;not used by memory function
$offset2[1] = 469 ;1D5 in decimal

$read1 = _MemoryPointerRead ($address, $procHwnd, $offset1)
$read 2 = _MemoryPointerRead ($address, $procHwnd, $offset2)

MsgBox( 0, "", "Value of offset1 is: " & $read1)
MsgBox( 0, "", "Value of offset2 is: " & $read2)oÝ÷ ج¶Ú ÷²¢æ§×ç$jwmzYn²'ò¢è¶+p¢¹"òzËazk¦-ðjÈ(¡Óìk­«-Áç¤þ«¨µëaÇhzÉè·
+º-k nqzÊÞ¶êçÑ«­¢+Ø¥¹±Õ±Ðí9½µ5µ½Éä¹ÔÌÐì)MÑAÉ¥Ù¥± ÅÕ½ÐíMÕAÉ¥Ù¥±ÅÕ½Ðì°Ä¤()±½°ÀÌØíµ¥¹Ý¥¹½ÜôÅÕ½Ðí±½É¹Í¥ÅÕ½Ðì)%]¥¹á¥ÍÑÌ ÀÌØíµ¥¹Ý¥¹½Ü¤Q¡¸(ÀÌØíA±åÉ!AÈôÁàÀÁàäÔà(ÀÌØíA±åÉ!A½ôÅÕ½ÐìÅÐÅÕ½Ðì(ÀÌØíÑÍÐôÅÕ½ÐìÁàÅÕ½ÐìµÀìÀÌØíA±åÉ!AȬÀÌØíA±åÉ!A½(ÀÌØíµÁ¥ôAɽÍÍá¥ÍÑÌ ÅÕ½Ðí±½É¹Í¥8¹¥¸ÅÕ½Ðì¤((ÀÌØíµ¡¹±ô}5µ½Éå=Á¸ ÀÌØíµÁ¥¤(ÀÌØí¡±Ñ ô}5µ½ÉåA½¥¹ÑÉI ÀÌØíA±åÉ!AÈ°ÀÌØíµ¡¹±°ÀÌØíA±åÉ!A½¤((5Í  ½à Ä°ÀÌØíµÁ¥°ÅÕ½ÐíÉÍÌèÅÕ½ÐìµÀìÀÌØíÑÍеÀìÅÕ½Ðìµð´!±Ñ èÅÕ½ÐìµÀìÀÌØí¡±Ñ ¤(
±¥ÁAÕÐ ÀÌØí¡±Ñ ¤)±Í(5Í  ½à Ä°ÅÕ½ÐíÉɽÈÅÕ½Ðì°ÅÕ½ÐíII=HèÅÕ½ÐìµÀìÀÌØíµ¥¹Ý¥¹½ÜµÀìÅÕ½Ðì9½Ð½Õ¹ÌÌìÅÕ½Ðì¤)¹%

this also returns 0 ;)

Link to comment
Share on other sites

#include <NomadMemory.au3>
SetPrivilege("SeDebugPrivilege", 1)

Global $mainwindow = "Florensia"
If WinExists($mainwindow) Then
    $PlayerHPadr = 0x00FA8958
    $PlayerHPoff = "1D4"
    $test = "0x" & $PlayerHPadr + $PlayerHPoff
    $gamepid = ProcessExists("FlorensiaEN.bin")

    $gamehandle = _MemoryOpen($gamepid)
    $health = _MemoryPointerRead($PlayerHPadr, $gamehandle, $PlayerHPoff)

    MsgBox(1, $gamepid, "Address: " & $test & " -|- Health: " & $health)
    ClipPut($health)
Else
    MsgBox(1, "Error", "ERROR: " & $mainwindow & " Not Found!")
EndIfoÝ÷ ÚØb±©l¢·­º¹ìÓú®¢×¢Û^²×nëm¯+aÆ®¶­sb6æ6ÇVFRfÇC´æöÖDÖVÖ÷'æS2fwC°¥6WE&fÆVvRgV÷Cµ6TFV'Vu&fÆVvRgV÷C²Â ¤vÆö&Âb33c¶ÖçvæF÷rÒgV÷C´fÆ÷&Vç6gV÷C°¤bväW7G2b33c¶ÖçvæF÷rFVà¢b33cµÆW$G"ÒdS¢b33cµÆW$öfe³ÒÒ¢b33cµÆW$öfe³ÒÒFV2gV÷C³CBgV÷C²¢b33c·FW7BÒgV÷C³gV÷C²fײWFV2b33cµÆW$G"²b33cµÆW$öfe³Òâb33c¶vÖWBÒ&ö6W74W7G2gV÷C´fÆ÷&Vç6Tâæ&âgV÷C² ¢b33c¶vÖVæFÆRÒôÖVÖ÷'÷Vâb33c¶vÖWB¢b33c¶VÇFÒôÖVÖ÷'öçFW%&VBb33cµÆW$G"Âb33c¶vÖVæFÆRÂb33cµÆW$öfb ¢×6t&÷Âb33c¶vÖWBÂgV÷C´FG&W73¢gV÷C²fײb33c·FW7BfײgV÷C²×ÂÒVÇF¢gV÷C²fײb33c¶VÇF¢6ÆWBb33c¶VÇF¤VÇ6P¢×6t&÷ÂgV÷C´W'&÷"gV÷C²ÂgV÷C´U%$õ#¢gV÷C²fײb33c¶ÖçvæF÷rfײgV÷C²æ÷Bf÷VæBb333²gV÷C²¤VæD

Edit: Hopefully the address will display properly now. Still untested.

Edited by dbzfanatic
Link to comment
Share on other sites

Not tested but try this ;)

#include <NomadMemory.au3>
SetPrivilege("SeDebugPrivilege", 1)

Global $mainwindow = "Florensia"
If WinExists($mainwindow) Then
    $PlayerHPadr = 0x00FA8958
    $PlayerHpoff[0] = 0
    $PlayerHPoff[1] = Dec("1D4")
    $test = "0x" & Hex(Dec($PlayerHPadr) + $PlayerHPoff[1],8)
    $gamepid = ProcessExists("FlorensiaEN.bin")

    $gamehandle = _MemoryOpen($gamepid)
    $health = _MemoryPointerRead($PlayerHPadr, $gamehandle, $PlayerHPoff)

    MsgBox(1, $gamepid, "Address: " & $test & " -|- Health: " & $health)
    ClipPut($health)
Else
    MsgBox(1, "Error", "ERROR: " & $mainwindow & " Not Found!")
EndIfoÝ÷ ØGb´z)yû¥+ay§]­ë,Â)ev+)¬©®^®§£­Yn׬µçªê-z+dyêl±¬¢
®¢Ð´÷e,4÷dZËOv
ë$¶t÷còMë-jíü
Edited by Golbez
Link to comment
Share on other sites

You can't dim it? Did you try adding

Global $PlayerHPoff[2]
? That gives you an extra space if you need to add another offset.

Edit: Nevermind I see you got it working (sorta) but does the _MemoryPointerRead() function return an array or a string? Good way to check is to try $health[0] instead of $health in the messagebox.

Edited by dbzfanatic
Link to comment
Share on other sites

You can't dim it? Did you try adding

Global $PlayerHPoff[2]
? That gives you an extra space if you need to add another offset.

Edit: Nevermind I see you got it working (sorta) but does the _MemoryPointerRead() function return an array or a string? Good way to check is to try $health[0] instead of $health in the messagebox.

DING!!!!!!!!!!!!

works now... the health needed the [0] at the end..

yeah so we got it working and it reads the health....

it only works for a little bit then the game crashes xD

Link to comment
Share on other sites

DING!!!!!!!!!!!!

works now... the health needed the [0] at the end..

yeah so we got it working and it reads the health....

it only works for a little bit then the game crashes xD

XD That's enough to make you want to scream though isn't it? lol at least it's working now right? Try closing everything you don't need but the game and the script, you might be running out of RAM. Then again try making your script only read every little bit, like every second or so. Also, does it use a gameguard? If so it may be detecting the reads and killing the game.
Link to comment
Share on other sites

XD That's enough to make you want to scream though isn't it? lol at least it's working now right? Try closing everything you don't need but the game and the script, you might be running out of RAM. Then again try making your script only read every little bit, like every second or so. Also, does it use a gameguard? If so it may be detecting the reads and killing the game.

the game uses gameguard but i have it bypasses.. ima try to see if it works if i test it every 30-40 sec.. cause i plan on using it to see what my health is at in a bot ;)

Link to comment
Share on other sites

How did you bypass the gameguard? From what I know gameguard updates everytime you run the game (or at least checks for updates) and then runs your game. I'm fairly certain that the gameguard can detect the reads of the autoit script but without knowing how you bypassed it there's no real way to tell.

Link to comment
Share on other sites

hex editor..

go to adress 0x66123A

there you will find "75 1B"

replace it with "75 41"

save the .bin file.. and its done.. hs doesnt open anymore

idk if the new .bin file has thos values at that address.. if you are playing the game i can give you a patch to fix it ;)

Edited by Golbez
Link to comment
Share on other sites

hex editor..

go to adress 0x66123A

there you will find "75 1B"

replace it with "75 41"

save the .bin file.. and its done.. hs doesnt open anymore

Hmm, well that shoots down my theory that the guard is picking up on your reads ;). Did you try reading with a longer delay? If so did it work?

Link to comment
Share on other sites

ive been doing stuff for school all day ;)

i had a 3 hour car drive upstate to my school... then did all the school crap i needed to do(about 5 hours) then drove back to my house(3 hour back down) sooooo xD

ill test that right now :D

btw i started my day at 4:30am

edit: it didnt work.. it seems like it crashes after the first read...

edit2: hmmm maybe we should close the memory file after we read it then reopen it..

Edited by Golbez
Link to comment
Share on other sites

Link to comment
Share on other sites

I have the solution *dramatic background music* it is...

dun dun dun....

You need to PM Nomad. XD Sorry Golbez but I'm honestly out of ideas at this point unless the fact that you modified the .bin file somehow caused a glitch.

Link to comment
Share on other sites

I have the solution *dramatic background music* it is...

dun dun dun....

You need to PM Nomad. XD Sorry Golbez but I'm honestly out of ideas at this point unless the fact that you modified the .bin file somehow caused a glitch.

MUHAHAHAHAHA!!! gots it.. had to close the memory xD!!

#include <NomadMemory.au3>
SetPrivilege("SeDebugPrivilege", 1)

Global $mainwindow = "Florensia"
    $PlayerHPadr = 0x00FA8958
Dim $PlayerHpoff[2]
    $PlayerHpoff[0] = 0
    $PlayerHPoff[1] = Dec("1D4")
Global $test = Hex(Dec($PlayerHPadr) + $PlayerHPoff[1], 8)
Global $gamepid = ProcessExists("FlorensiaEN.bin")
Global $delay = 30000

#cs
    - Health -
    Value: 0C299DB0
    Address: 00FA8958
    Offset: 1D4
    
    - Mana -
    Value: 0C6D5608
    Address: 0C5A8C68
    Offest: 10
#ce
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

$Form1 = GUICreate("Form1", 182, 51, 1072, 23)
$Label1 = GUICtrlCreateLabel("Label1", 8, 16, 36, 17)
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
    $gamehandle = _MemoryOpen($gamepid)
    $health = _MemoryPointerRead($PlayerHPadr, $gamehandle, $PlayerHPoff)
    _MemoryClose($gamepid)
    GUICtrlSetData($Label1, $health[1])
    Sleep($delay)
WEnd

#cs
    -- Memory Adresses
    PlayerHPadr = 0x00F86E18;
    PlayerHPoff = 0x1D4;
    TargetLockadr = 0x18DBD325;
    -- Setup --
    -- Sit When HP Reaches.. --
    PlayerHPStop = 300;
    -- Stand Up When HP Reaches.. --
    PlayerHPSit = 630;
    -- Enables Looting, increases the time between killing --
    EnableLooting = 1;
    -- Reviving Enabled? --
    Revive = 1;
    -- Mouse Coords of the Revive Button
    ReviveX = 547;
    ReviveY = 411;
    -- End of Setup--
    
    function GetTarget()
    TargetLock = memoryReadByte(proc, TargetLockadr);
    if( TargetLock == 1 and PlayerHP > PlayerHPStop and Sitting == 0) then
    keyboardPress( key.VK_1 );
    rest(20);
    keyboardPress( key.VK_7 );
    end
    if( TargetLock == 0 and PlayerHP > PlayerHPStop and Sitting == 0 ) then
    Loot();
    keyboardPress( key.VK_0 );
    rest(20);
    end
    rest(20);
    end
    
    function Heal()
    PlayerHP = memoryReadIntPtr(proc, PlayerHPadr, PlayerHPoff);
    if( PlayerHP <= PlayerHPStop and TargetLock == 0 and Sitting == 0 ) then
    rest(5000);
    keyboardPress( key.VK_8 );
    rest(4000);
    Sitting = 1;
    end
    if( PlayerHP >= PlayerHPSit and TargetLock == 0 and Sitting == 1 ) then
    keyboardPress( key.VK_8 );
    rest(4000);
    Sitting = 0;
    end
    end
    
    function DefeatAttacker()
    if( Sitting == 1 and TargetLock == 1 ) then
    keyboardPress( key.VK_S );
    rest(500);
    Sitting = 0;
    keyboardPress( key.VK_7 );
    end
    end
    
    function Loot()
    if( EnableLooting == 1 ) then
    keyboardPress( key.VK_X );
    rest(4000);
    end
    end
    
    function Reviving()
    if( Revive == 1 and PlayerHP == 0 ) then
    yrest(5000);
    mouseSet(ReviveX, ReviveY);
    yrest(500);
    mouseLClick();
    end
    end
    
    function main()
    attach( findWindow("Florensia") );
    proc = openProcess( findProcess("Florensia") );
    Sitting = 0;
    while(true) do
    Heal();
    DefeatAttacker();
    GetTarget();
    Reviving();
    rest(10);
    end
    end
    startMacro(main, true);
#ce
Link to comment
Share on other sites

MUHAHAHAHAHA!!! gots it.. had to close the memory xD!!

*slaps forehead* Seriously? Next time I'll take a closer look at your code lol. Sorry for missing that one.

Link to comment
Share on other sites

Alright, good news. Glad I could help and I'm pretty sure everyone who helped on this thread is glad to help too. ;) I know I learned a lot, now, back to cheating games for all!

Link to comment
Share on other sites

Alright, good news. Glad I could help and I'm pretty sure everyone who helped on this thread is glad to help too. ;) I know I learned a lot, now, back to cheating games for all!

ok maybe i lied xD

1 sec doing more tests xD

i cant have the delay at 1 second im trying 10 now

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...