Page 1 of 1

read memory

Posted: Sun Apr 19, 2009 4:25 pm
by choda125
try to make script ... just starting.
i get 0A523F82 with artMoney

but: error bad argument

Code: Select all

HP_vida = "0A523F82";
HP_vide = "0x0A523F82";

function mem()
  HP = memoryReadInt(proc, HP_vida);
end

-- This declares our "main" function which will contain our "main loop".
function main()
  win = findWindow("MU");
  proc = openProcess( findProcess("MU") );
  attach(win);
  printf("Press F8 to terminate script.\n");
  showWindow(win, sw.show);
 
  while(1) do
    -- if they press F8, break out of the while
    if( keyPressed(key.VK_F8) ) then
      break;
    end    
    if( keyPressed(key.VK_F6) ) then
      mem();
    end
  end
  printf("Goodbye!\n");
end

-- startMacro will now call main() within a protected environment for us.
startMacro(main);
I need read Mu Online HP and take action based on it (like drink HP Potion)
thanks

Re: read memory

Posted: Mon Apr 20, 2009 5:18 am
by Administrator
You should not enclose your addresses in quotes.
Change:

Code: Select all

HP_vida = "0A523F82";
HP_vide = "0x0A523F82";
To:

Code: Select all

HP_vida = 0x0A523F82;
Also, you don't need to check for F8 yourself to exit the script. First, set the start/stop keys( starKey = key.VK_F7 stopKey = key.VK_F8 under MicroMacro 0.99; setStartKey(key.VK_F7); and setStopKey(key.VK_F8); for 1.0) then just call yrest(1) inside your while loop, and it will automatically check for hotkeys.

Re: read memory

Posted: Sat May 02, 2009 1:22 am
by choda125
im using yrest(1) with hotkeys :) great!

but i cant read memory, now memory address change:
HP_vida = 0x0977A01A;

extract HP memory address with ArtMoney (CheatEngine is detect by PlaySafe)
if i change HP value in artmoney my game client change ... is right address

Code: Select all

HP_vide = 0x0977A01A;

starKey = key.VK_F5
stopKey = key.VK_F8

function mem()
  HP = memoryReadInt(proc, HP_vida);
  print(HP);
end

-- This declares our "main" function which will contain our "main loop".
function main()

  win = findWindow("MU");
  proc = openProcess( findProcess("MU") );
  attach(win);
  printf("Press F8 to Pause script.\n");
  showWindow(win, sw.show);
 
  while(1) do
  
    yrest(1)
    
    if( keyPressed(key.VK_L) ) then
      mem();
    end
    
  end
 
  printf("Goodbye!\n");
 
end
  
-- startMacro will now call main() within a protected environment for us.
startMacro(main);
the script only must print my current HP, but not working .... i try extract pointer and offset but i cant do it (follow Tutorial, Step 3 is diferent)
tutorial screenshot
artmoney_ptr_2.PNG
in my ArtMoney
artmoney.JPG
but my question is i need poniter and offset ? ther is other way to read HP ?

Re: read memory

Posted: Sat May 02, 2009 3:56 am
by Administrator
Yes, you will need to use a static pointer. The HP address is dynamically allocated when the game opens, meaning that it's location will change. That's why you need a pointer to access it's location 100% of the time.

Try using MHS instead of Cheat Engine. It works almost exactly the same, but probably isn't detected. You can also try using the stealth options inside Cheat Engine and see if that helps.