Mouse memory addresses
Mouse memory addresses
I noticed that, even when the Rom client window isn't active, moving the mouse over it still causes tooltips to appear. So it still has mouse coordinates when not active. I'm thinking it must be theoretically possible to find the ingame memory addresses for the mouse coordinates. So I've been messing around with the memory address software trying to find them.
I think I'm getting close but it's hard to test changing the values when the real mouse movement causes the value to change.
As I have no experience with memory addresses, I was wondering if you could write a simple program that just changes the 2 addresses and clicks the mouse button or tries to read the tooltip or whatever the bot does when scanning.
If you supply the code I can try the addresses I'm finding and see if they work. Hopefully it's not too big a job for someone with lots of memory address experience.
I think I'm getting close but it's hard to test changing the values when the real mouse movement causes the value to change.
As I have no experience with memory addresses, I was wondering if you could write a simple program that just changes the 2 addresses and clicks the mouse button or tries to read the tooltip or whatever the bot does when scanning.
If you supply the code I can try the addresses I'm finding and see if they work. Hopefully it's not too big a job for someone with lots of memory address experience.
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
- Administrator
- Site Admin
- Posts: 5312
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Mouse memory addresses
The problem isn't finding the mouse location addresses (I've found those before), but rather inducing a fake mouse click. mouseLClick() doesn't work for RoM. I had a little luck doing that with memory manipulation again, but it was very unpredictable. Sometimes it would work, sometimes it wouldn't.
Re: Mouse memory addresses
I suspected it might have been harder than I thought. No harm asking.Administrator wrote:The problem isn't finding the mouse location addresses (I've found those before), but rather inducing a fake mouse click. mouseLClick() doesn't work for RoM. I had a little luck doing that with memory manipulation again, but it was very unpredictable. Sometimes it would work, sometimes it wouldn't.
I guess it's frustrating because mmodrifter can do it. It can harvest even with the client minimized.
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
- 3cmSailorfuku
- Posts: 354
- Joined: Mon Jan 21, 2008 6:25 pm
Re: Mouse memory addresses
If you have a copy of MMODrifter running you -could- try finding out which memory location it's reading or writing.rock5 wrote:I suspected it might have been harder than I thought. No harm asking.Administrator wrote:The problem isn't finding the mouse location addresses (I've found those before), but rather inducing a fake mouse click. mouseLClick() doesn't work for RoM. I had a little luck doing that with memory manipulation again, but it was very unpredictable. Sometimes it would work, sometimes it wouldn't.
I guess it's frustrating because mmodrifter can do it. It can harvest even with the client minimized.
But I honestly can't remember the name of the program anymore, it was probably Spiro who created it way before MHS. I'm sure Elverion knows it too, but I doubt it works on Windows 7 as it gave me trouble already on Windows Vista.
It could list up which program manipulates or reads which data on your targeted process, and include the adress itself and the value.
But it would be questionable if Elverion would allow you to incoporate such thing into an official release if you are just milking MMODrifter, It's mainly for the fun and collaboration with others - right?
Re: Mouse memory addresses
It might fly with him/her if you look at it from the perspective that MMODrifter is collaborating with us and that the more mats we get the more fun lol You never know.3cmSailorfuku wrote:But it would be questionable if Elverion would allow you to incoporate such thing into an official release if you are just milking MMODrifter, It's mainly for the fun and collaboration with others - right?
- Administrator
- Site Admin
- Posts: 5312
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Mouse memory addresses
What do you mean "MMODrifter is collaborating with us"?KillerTHC wrote:It might fly with him/her if you look at it from the perspective that MMODrifter is collaborating with us and that the more mats we get the more fun lol You never know.
Really, the problem here is that to induce a faked mouse click, the client would need to be modified (even if only while in memory). That's something I try to stray away from. If we can find a way to do so without modifying the client, I'm all for it.
-
- Posts: 316
- Joined: Wed Jun 16, 2010 8:16 am
Re: Mouse memory addresses
showWindow(getWin(), sw.show); doesn't this in front of each harvest somehow solves part of the problem?
- 3cmSailorfuku
- Posts: 354
- Joined: Mon Jan 21, 2008 6:25 pm
Re: Mouse memory addresses
That doesn't solve the issue.swietlowka wrote:showWindow(getWin(), sw.show); doesn't this in front of each harvest somehow solves part of the problem?
-
- Posts: 316
- Joined: Wed Jun 16, 2010 8:16 am
Re: Mouse memory addresses
thats a little weird since this function is suppose to make the window of rom active, personally haven't checked it it was just a thought
Re: Mouse memory addresses
I've never used it either but I've heard it only works if the micromacro window is the active window itself, which defeats the purpose.swietlowka wrote:thats a little weird since this function is suppose to make the window of rom active, personally haven't checked it it was just a thought
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
- Administrator
- Site Admin
- Posts: 5312
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Mouse memory addresses
Yes, showWindow() only works in some cases. Blame Windows for this. Apparently, it's a "feature." It only works when the window or process was opened by the process calling showWindow (ie. MicroMacro in this case) or the window calling showWindow currently has focus (ie. the MicroMacro console is on top).
Re: Mouse memory addresses
While playing with memory addresses I tried changing a memory address to target an npc then issuing a UseSkill(1,1) to start a dialog. It worked. Did you ever try something like this instead of using tab for targeting or is this too much like changing the client for you?
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
- Administrator
- Site Admin
- Posts: 5312
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Mouse memory addresses
Switching memory addresses does work, yes. And that's fine by me. The problem is gathering the addresses to all of the pawns. This, to the best of my knowledge, requires you to create a codecave to trap the addresses of all pawns as they are run through the game engine, which is modifying the client.
Re: Mouse memory addresses
What if we use _G["MinimapFrame_Icon"..id]? i had little to no luck making it work tho but i think is doable, ate least for finding positions of harvestable nodes, that is the way yGather finds those, however i made a function to test it and i can´t get the value from the game, i mea: The macro executes the code but the second macro doesn't get the value, its weird because if i go to game window and click on the macro the values are written just fine...
This is what i'm executing:
local _vis,_txt = RoMScript("_G[\"MinimapFrame_Icon".. id .. "\"]:IsVisible(),".."GetMinimapIconText("..id.."),");
Any ideas?
This is what i'm executing:
local _vis,_txt = RoMScript("_G[\"MinimapFrame_Icon".. id .. "\"]:IsVisible(),".."GetMinimapIconText("..id.."),");
Any ideas?
Re: Mouse memory addresses
Well i found something interesting for targeting harvestable nodes...
We don't really need to "fake" a mouseclick, we just need to fake mouse movement and then, if we found a harvestable node we set it to player target, like this:
memoryWriteInt(getProc(), player.Address + addresses.pawnTargetPtr_offset, mousePawn.Address);
And then we can send this:
RoMScript("UseSkill(1,1);");
And it works!!! Works fine so far, the only problem is that i can't fin mouse coordinates yet... So if anyone has a clue about mouse coordinates in game memory, please letme know...
We don't really need to "fake" a mouseclick, we just need to fake mouse movement and then, if we found a harvestable node we set it to player target, like this:
memoryWriteInt(getProc(), player.Address + addresses.pawnTargetPtr_offset, mousePawn.Address);
And then we can send this:
RoMScript("UseSkill(1,1);");
And it works!!! Works fine so far, the only problem is that i can't fin mouse coordinates yet... So if anyone has a clue about mouse coordinates in game memory, please letme know...
- Administrator
- Site Admin
- Posts: 5312
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Mouse memory addresses
Targeting and attacking does work much better than clicking. Good find there. However, there's a few issues with finding the node. I've been screwing around with it for a few hours, and can't find any reliable way of making it work. The scanning just won't work well by manipulating the mouse coordinates in memory. It works great if the game has focus, but once it's in the background, it stops functioning most of the time. If another window is covering the RoM window, it breaks and fails to find the node about 90% of the time. If the RoM window is minimized, it is completely unable to ever find the node.
If you've got any ideas on how to get around this, I'd like to hear them.
If you've got any ideas on how to get around this, I'd like to hear them.
Re: Mouse memory addresses
Forget node scanning, how about implementing the "target and attacking" for things like mailboxes and bulletin boards? They don't need to be scanned 'cos you can get the id when you create the waypoint file? Then maybe finally the only thing left that will need mouse clicks is harvesting.Administrator wrote:Targeting and attacking does work much better than clicking. Good find there. However, there's a few issues with finding the node. I've been screwing around with it for a few hours, and can't find any reliable way of making it work. The scanning just won't work well by manipulating the mouse coordinates in memory. It works great if the game has focus, but once it's in the background, it stops functioning most of the time. If another window is covering the RoM window, it breaks and fails to find the node about 90% of the time. If the RoM window is minimized, it is completely unable to ever find the node.
If you've got any ideas on how to get around this, I'd like to hear them.
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
- Administrator
- Site Admin
- Posts: 5312
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Mouse memory addresses
You can get the ID, yes, but not the pointer to it's instance in memory (which will change every time you see it). That won't work, unfortunately.
Re: Mouse memory addresses
Wouldn't there need to be some sort of table in memory that contains all the object in range? If you could figure out where that is you could search it for the object your looking for.Administrator wrote:You can get the ID, yes, but not the pointer to it's instance in memory (which will change every time you see it). That won't work, unfortunately.
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
Re: Mouse memory addresses
Yes, indeed there is a table of surrounding objects i'm guessing there is more than one (one for attackable and other for "friendly" NPCs minimum) but for the sake of simplicity we could just scan the minimap icons, both, NPCs (mailboxes, merchants, etc.) and harvestables apear on minimap and there is a function in RoM to access it via Lua, i managed to find a part of that table in memory but couldn't get the pointer to it, just some resources here and there...rock5 wrote:Wouldn't there need to be some sort of table in memory that contains all the object in range? If you could figure out where that is you could search it for the object your looking for.Administrator wrote:You can get the ID, yes, but not the pointer to it's instance in memory (which will change every time you see it). That won't work, unfortunately.
On the other hand, regarding mouse movement, i believe that the problem is RoM hooking the mouse so it "knows" when to react to mouse movement and clicks because its asking to the OS if he is on foreground...
I'll continue to search for the table of surrounding objects, from what i saw last night there is a table, some parts where easy to find i was searching for thext matching some node i had on sight, when found (like 6 results or so) i can walk away from my position and i saw the text changing to other node that appeared, but i was unable to find the pointer to that table i'll need to dig a bit deeper into it...
Who is online
Users browsing this forum: Google [Bot] and 54 guests