jvanegmond Posted July 6, 2007 Share Posted July 6, 2007 Actually i'm creating a bot that can read the direction and coordinates from the chat frame.. If others respond to a GM, they need to know that a GM whispered them, thus their script can recognize the chat frame and the text in it? How?OCR. github.com/jvanegmond Link to comment Share on other sites More sharing options...
tom13 Posted July 6, 2007 Author Share Posted July 6, 2007 OCR.Argh, I tried to figure that OCR thing out for hours now with the diablo 2 example script... still don't understand how it works :SMaybe it's possible to capture a screenshot of the last line of the chat box, then check if little images like A, B, C, D etc. match a part of the screenshot? If picture A matches with a part of the screenshot, then the first letter is A... then check the second letter? Link to comment Share on other sites More sharing options...
jvanegmond Posted July 6, 2007 Share Posted July 6, 2007 Argh, I tried to figure that OCR thing out for hours now with the diablo 2 example script... still don't understand how it works :SMaybe it's possible to capture a screenshot of the last line of the chat box, then check if little images like A, B, C, D etc. match a part of the screenshot? If picture A matches with a part of the screenshot, then the first letter is A... then check the second letter? That's about right, Tom. Although you don't have to make a screen shot first.You should figure out where the letters are exactly, x and y screen coordinates. Then you have to find out how far the letters are apart, and make sure that every letter has it's own space. So 2 letters can't be on the same vertical line of pixels...You then should continue by making a function that can create a PixelChecksum of one character, and then create checksum's for each character. Once you have that, you can make a new checksum of a unknown character and compare that to your database of checksums. github.com/jvanegmond Link to comment Share on other sites More sharing options...
tom13 Posted July 6, 2007 Author Share Posted July 6, 2007 (edited) That's about right, Tom. Although you don't have to make a screen shot first. You should figure out where the letters are exactly, x and y screen coordinates. Then you have to find out how far the letters are apart, and make sure that every letter has it's own space. So 2 letters can't be on the same vertical line of pixels... You then should continue by making a function that can create a PixelChecksum of one character, and then create checksum's for each character. Once you have that, you can make a new checksum of a unknown character and compare that to your database of checksums. Hmm, but how is that possible since each letter has a different space between an other letter or digit? see my picture: For example between the [ and . Edited July 6, 2007 by tom13 Link to comment Share on other sites More sharing options...
jvanegmond Posted July 6, 2007 Share Posted July 6, 2007 (edited) Hmm, but how is that possible since each letter has a different space between an other letter or digit? see my picture: For example between the [ and .You could use PixelSearch on one column of pixels to find where a character starts and where a character ends. Then do a pixelchecksum on that one single character. Could you upload a full screen size picture, at maximum quality. So each pixel is maintained. Edited July 6, 2007 by Manadar github.com/jvanegmond Link to comment Share on other sites More sharing options...
vazheel Posted July 6, 2007 Share Posted July 6, 2007 (edited) You could use PixelSearch on one column of pixels to find where a character starts and where a character ends. Then do a pixelchecksum on that one single character.Could you upload a full screen size picture, at maximum quality. So each pixel is maintained.The only problem is that sometimes GM's will send you a whisper that may take up more than one line. You would have to have a couple of places to check because sometimes they just say, "Greetings, this is GM such and such, do you have a spare moment?" Other times they will RP with you and say, "From the depths of hell, a fiery burst of lava streaks into your sight, a fiery plumed object plummets towards you leaving an acrid smoke trail, a large crash appears before you spitting earth and debris everywhere, a gnome rises from the ruins, clears his throat and says, "Greetings, this is GM such and such..." Edited July 6, 2007 by vazheel Link to comment Share on other sites More sharing options...
tom13 Posted July 6, 2007 Author Share Posted July 6, 2007 (edited) Could you upload a full screen size picture, at maximum quality. So each pixel is maintained.Roger, sir.Had to censor names and characters though. Edited July 6, 2007 by tom13 Link to comment Share on other sites More sharing options...
jvanegmond Posted July 6, 2007 Share Posted July 6, 2007 Ok, looks doable. I am going to lead the way, and try to whip out a working example. It is up to you to finalize my example, by adding more features and functions. Also provide a good database, that is able to capture all the characters in stead of the ones you provided. I may need some more screenshots, including green blue and other colors of text. Full screen, please. github.com/jvanegmond Link to comment Share on other sites More sharing options...
Subterfuge Posted July 14, 2007 Share Posted July 14, 2007 The results of your work and efforts will be interesting indeed. I just wonder if trying to decipher the text in this manner will be too slow for game play. Reading data packets seems like a good idea and also writing you own mod to ouput the chat text and combat text to a file or db my be an option. Link to comment Share on other sites More sharing options...
enaiman Posted July 14, 2007 Share Posted July 14, 2007 ... and all this for getting some Medals? or Honor points? I see your try as a form of disrespect toward other players. Anyway ... the work you have to to to get this working will be your punishment - fair enough! SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :) Link to comment Share on other sites More sharing options...
Phat Phil Posted July 14, 2007 Share Posted July 14, 2007 The only problem is that sometimes GM's will send you a whisper that may take up more than one line. You would have to have a couple of places to check because sometimes they just say, "Greetings, this is GM such and such, do you have a spare moment?" Other times they will RP with you and say, "From the depths of hell, a fiery burst of lava streaks into your sight, a fiery plumed object plummets towards you leaving an acrid smoke trail, a large crash appears before you spitting earth and debris everywhere, a gnome rises from the ruins, clears his throat and says, "Greetings, this is GM such and such..."lol Nice little bit of imagination there. favorite part: "a gnome rises from the ruins"But yes, I too looked for some guides on what OCR is and how it works and how I can manipulate it to my needs. But failed. Doesn't bother me though there are more things that are easier to learn that I must better understand first. Link to comment Share on other sites More sharing options...
Snarg Posted July 14, 2007 Share Posted July 14, 2007 Download the Diablo II font from here. Enjoy! A little reading goes a long way. Post count means nothing. Link to comment Share on other sites More sharing options...
jvanegmond Posted July 14, 2007 Share Posted July 14, 2007 The results of your work and efforts will be interesting indeed. I just wonder if trying to decipher the text in this manner will be too slow for game play. Reading data packets seems like a good idea and also writing you own mod to ouput the chat text and combat text to a file or db my be an option.It is probably better to output the chat text to a file anyway. The reading will be fast enough for game play, I can ensure that. Your method is just a whole lot easier! github.com/jvanegmond Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now