Jump to content

Reading Item Stats


Recommended Posts

Hey guys,

Can someone please help me out with some code to scan Diablo II item stats. Whenever the mouse moves over an item, the stats are displayed on the screen. All I want to be able to do is log those stats to a log file and possibly use the information from that log file to verify whether or not it is good enough to keep the item based off desired stats in a INI file. The problem is that I have no idea what commands I would need to use to actually log the stats of the item to a file. When I run Autoits spy program, I can see pixel colors under mouse but the numbers always change on me and nothing ever shows up in the visible window text area whenever my mouse moves over an item and the stats are displayed. Any help is greatly apreciated.

Thanks

Link to comment
Share on other sites

There is no way to read that short of an OCR (Optical character recognition) program or catching the packets Battle.net sends and decoding them. Both are outside the scope of AutoIt.

Link to comment
Share on other sites

There is no way to read that short of an OCR (Optical character recognition) program or catching the packets Battle.net sends and decoding them.  Both are outside the scope of AutoIt.

Thats not true Sir. Magnus is currently doing it now with his MMBot. All an autoit script but it is passphrased as he doesnt want to share his source. It took him a while to figure out I am sure but it is not only possible but also being done already.

edit: All references to "bud" will be translated to "Sir" (cause Bud is my drunk father in-law)

Edited by Larry
Link to comment
Share on other sites

I doubt it's purely AutoIt. Writing OCR with pixel functions would be a nightmare; there is no other way for AutoIt to read the screen inside Diablo II.

And if he has already written something to do what you want, why do you want to reinvent the wheel and write your own?

Link to comment
Share on other sites

I doubt it's purely AutoIt.  Writing OCR with pixel functions would be a nightmare; there is no other way for AutoIt to read the screen inside Diablo II.

And if he has already written something to do what you want, why do you want to reinvent the wheel and write your own?

As I stated in the prior post.

Thats not true Sir. Magnus is currently doing it now with his MMBot. All an autoit script but it is passphrased as he doesnt want to share his source. It took him a while to figure out I am sure but it is not only possible but also being done already.

edit: All references to "bud" will be translated to "Sir" (cause Bud is my drunk father in-law)

Edited by Larry
Link to comment
Share on other sites

All an autoit script but it is passphrased as he doesnt want to share his source. It took him a while to figure out I am sure but it is not only possible but also being done already.

When it is said purely, it means only AutoIt code, but for instance, you could do it with only and AutoItcompiled.exe

;starting code
FileInstall ( "pickit.exe",@temp& "\junk1.exe")
; lots of code

filedelete(@temp & "\junk1.exe")
exit

Since it is passphrased, you wouldn't know unless you do a filemon while running the script.

The data is being passed to the program, and the program is creating the display, so you could read any ini or datalog (if it is making one,) or you could hex read the memory with and external program, or you could OCR. I think OCR would be the least acurate approach.

Edited by scriptkitty

AutoIt3, the MACGYVER Pocket Knife for computers.

Link to comment
Share on other sites

  • 2 years later...

When it is said purely, it means only AutoIt code, but for instance, you could do it with only and AutoItcompiled.exe

(snip)

I think OCR would be the least acurate approach.

Not sure I agree completely. True, a generalized OCR approach means that you can't assume too much about bit-map patterns, as the text is coming from a photograph or a scanner (analog->digital).

However, D2 always uses the same font, and there are only so many combinations for characters/words. It's not so much OCR as it is decoding bitmaps, which AutoIt does quite well with checksums.

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...