Sarc Posted January 2, 2006 Share Posted January 2, 2006 Hi there In diablo2, some of you may be aware (and some not) that when you mouseover stairs to a lower level, or a door, or such and such, a label appears with the name of the new location now without wanting to go into OCR and so on, i was wondering if there was something i could use to detect that there is a different colour somewhere near the mouse location, and that due to this, we will click winwaitactive("Diablo II") sleep(1000) $PossX = "50,100,150,200,250,300,350,400,450,500,550,600,650,700,750" $PossY = "50,100,150,200,250,300,350,400,450,500,550" $ArrayX = StringSplit($PossX, ",") $ArrayY = StringSplit($PossY, ",") For $i = 1 To $ArrayX[0] for $j = 1 to $ArrayY[0] $xcoord = $ArrayX[$i] $ycoord = $ArrayY[$j] mousemove($xcoord, $ycoord,0) Next Next this is the code i'm using. i've set it to scan the screen in 50,50 blocks.. crude but it will work.. eventually then between mousemove and next, i want to put the check part any1 knows how i could do this? would be MOST appreciated Cheers Link to comment Share on other sites More sharing options...
Oxin8 Posted January 2, 2006 Share Posted January 2, 2006 Maybe something like this for in there. Could adjust the For loop step size for speed and whatever. Just use this as an idea/example. For $a = ($xcoord - 25) to ($xcoord + 25) For $b = ($ycoord - 25) to ($ycoord + 25) If PixelGetColor($xcoord,$ycoord) = $COLOR_OF_LABEL_TEXT Then MouseClick ( "left" , $xcoord, $ycoord) EndIf Next Next ~My Scripts~ *********_XInput UDF for Xbox 360 ControllerSprayPaint_MouseMovePlus Link to comment Share on other sites More sharing options...
Shinies Posted January 3, 2006 Share Posted January 3, 2006 The only way this is even close to accurate enough is if you patch it and change the graphics of stairs etc to a box of certain color. Its been tried b4. Link to comment Share on other sites More sharing options...
Sarc Posted January 3, 2006 Author Share Posted January 3, 2006 Thanx Oxin8 for the reply. i've not had chance to try it eyet but it looks good what you've posted Smirk_zero: i know of a 'bot' that uses such a method. it would be very useful and accurate yes, however i do not know of such ways to create such patches. if you know or have links to somewhere with info on how to create them, it would b most grateful. by the way, when yo say its been tried before, do you mean tried and failed? Link to comment Share on other sites More sharing options...
Oxin8 Posted January 3, 2006 Share Posted January 3, 2006 look at the top bothttp://www.d2freedom.com/bots.htmlit uses autoit and a mod for colors. if it doesn't do what you want, you could always just use the mod. ~My Scripts~ *********_XInput UDF for Xbox 360 ControllerSprayPaint_MouseMovePlus Link to comment Share on other sites More sharing options...
Sarc Posted January 3, 2006 Author Share Posted January 3, 2006 look at the top bothttp://www.d2freedom.com/bots.htmlit uses autoit and a mod for colors. if it doesn't do what you want, you could always just use the mod.yeah i have the mod files from MMbot, however something within the bot is coded to actually use the files. without using the actual bot i cant get the modded part to work, and ofc the bot is password protected so it would be hard to get access to the code used to implement the mod Link to comment Share on other sites More sharing options...
Oxin8 Posted January 3, 2006 Share Posted January 3, 2006 if i remember right you add a certain parameter when you open diablo in the shortcut. just google around for mods to see how they do it. ~My Scripts~ *********_XInput UDF for Xbox 360 ControllerSprayPaint_MouseMovePlus Link to comment Share on other sites More sharing options...
Sarc Posted January 3, 2006 Author Share Posted January 3, 2006 if i remember right you add a certain parameter when you open diablo in the shortcut. just google around for mods to see how they do it.thanx, i'll try and have a look nowi thought it might be -direct -txt but it doesnt seem to be :/ Link to comment Share on other sites More sharing options...
seandisanti Posted January 3, 2006 Share Posted January 3, 2006 thanx, i'll try and have a look nowi thought it might be -direct -txt but it doesnt seem to be :/couldn't you just do a quick pixel checksum of the area around the mouse before and after the mouse move? i mean if the tooltip is always in the same place in relationship to the cursor, just do a pixelchecksum() before the move, and then another when the mouse is in position, if the checksum has changed (make sure that the cursor is not in the area being evaluated) then you know something is different, like a tooltip has appeared... Link to comment Share on other sites More sharing options...
Shinies Posted January 4, 2006 Share Posted January 4, 2006 If u want to mess around with the graphics of the game along with the names of things ur gona need a Table Editor and Excel. Where i learned to mod (just the very basics, but it gives u the genreal idea) is www.planetdiablo.com look on the left bar for modding tutorial. It explains how you open the mod also (it is -direct -txt). If you need any more help PM me and ill try. 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