GUI Functions

04/27/2009 23:24 Pixelzz#1
In an effort to make the bots here less annoying to use, I've created this small proof-of-concept library. It uses the memory to read locations of GUI windows in guild wars, so no more having to specify coordinates. I've only added support for hard mode on/off and travel to/from guild hall, but you guys probably get the idea.

Feel free to expand on this concept and add more functions. It would be nice if we could have a complete library for everything useful you can do with the GUI.

A limit with this is that if you make the guild wars window too small, it starts scaling down the GUI and everything stops working. If anyone has any insight in where GW stores scaling information in memory, feel free to reply.

I'm sorry about posting in English, but my German is limited to the powers of google translator.
04/28/2009 18:13 fkid#2
You still need some sort of ini files to handle positions that change according to the selected text lang in GW.
For example SELL tab of traders has a different offset in german and english, travel to/from Gh has a little offset (but there's still a bit of common area so a hard coded value will still work).

Language dependant files would be the best IMO.

I can see this being very useful if it can at some point handle different languages and different resolutions (within reasonable limits).

PD> LOL, my german is also limited by the powers of google translator :)
04/29/2009 20:16 Pixelzz#3
I think the main issue is really figuring out how the scaling works. As long as the window is bigger than 1024x768 or something like that, the GUI doesn't scale down and everything works.

I'd also like to figure out a reliable way to detect popup windows you get when talking to NPCs. I've used pixelchecksum on the little X in the top right corner to detect these in the past, but if you use pixelchecksum you can't have anything on top of the guild wars window that's blocking the part you want to scan. Since this particular window is always centered on the screen, you can just calculate where the X shows up from the center. Still, I'd like a solution that doesn't involve pixel scanning.

I hadn't realized that different languages had slightly different offsets, but like you said, that could be solved with just an ini setting. I'm sure detecting which language that's used can be done with memory reading.