read memory

Discuss, ask for help, share ideas, give suggestions, read tutorials, and tell us about bugs you have found with MicroMacro in here.

Do not post RoM-Bot stuff here. There is a subforum for that.
Forum rules
This is a sub-forum for things specific to MicroMacro.

This is not the place to ask questions about the RoM bot, which uses MicroMacro. There is a difference.
Post Reply
Message
Author
User avatar
choda125
Posts: 2
Joined: Sun Apr 19, 2009 4:13 pm

read memory

#1 Post by choda125 » Sun Apr 19, 2009 4:25 pm

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

User avatar
Administrator
Site Admin
Posts: 4850
Joined: Sat Jan 05, 2008 4:21 pm

Re: read memory

#2 Post by Administrator » Mon Apr 20, 2009 5:18 am

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.

User avatar
choda125
Posts: 2
Joined: Sun Apr 19, 2009 4:13 pm

Re: read memory

#3 Post by choda125 » Sat May 02, 2009 1:22 am

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 ?
Attachments
artmoney_ptr_2.PNG

User avatar
Administrator
Site Admin
Posts: 4850
Joined: Sat Jan 05, 2008 4:21 pm

Re: read memory

#4 Post by Administrator » Sat May 02, 2009 3:56 am

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest