ecstatic Posted April 5, 2009 Share Posted April 5, 2009 #cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.13.13 (beta) Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here $Rares = 0x4ADB7B $Uniques = 0x9C826B $Sets = 0x10c721 While 1 $coord = PixelSearch( 0, 0, 800, 600, 0x4ADB7B, 10 ) If Not @error Then MouseClick("left", $coord[0], $coord[1]) #Region --- CodeWizard generated code Start --- ;MsgBox features: Title=Yes, Text=Yes, Buttons=OK, Icon=Warning MsgBox(48,"Hey","It worked holy crape!") #EndRegion --- CodeWizard generated code End --- Else $coord = PixelSearch( 0, 0, 800, 600, 0x4ADB7B 10 ) EndIf WEndHeres a img of what im trying to pick upThe resolution of my full screen game is 800x600 which is why i made it 0, 0, 800, 600Its not reading the pixel correctly or not at all. Is there a flaw in my script? Link to comment Share on other sites More sharing options...
Authenticity Posted April 5, 2009 Share Posted April 5, 2009 (edited) First, there might be a problem with your merc hp so the bot may think your merc is a set item . Anyway, I see you dropped a set item but looking for a rare (yellow) right? Edited April 5, 2009 by Authenticity Link to comment Share on other sites More sharing options...
ecstatic Posted April 5, 2009 Author Share Posted April 5, 2009 First, there might be a problem with your merc hp so the bot may think your merc is a set item . Anyway, I see you dropped a set item but looking for a rare (yellow) right?hahahah yes. Lemme fix that and retry Link to comment Share on other sites More sharing options...
ecstatic Posted April 5, 2009 Author Share Posted April 5, 2009 (edited) OK this is really wierd.WHen i post my S/S Of diablo in paint.My autoitscript automatically clicks my rare that was in the screen shot.But if i run my autoitscript in diablo and drop the rare it does not click it, but if i put it in paint it does.Heres my new code.$Rares = 0xFFFBC6 While 1 $coord = PixelSearch( 0, 0, 800, 600,0xFFFBC6) If Not @error Then MouseClick("left", $coord[0], $coord[1]) #Region --- CodeWizard generated code Start --- ;MsgBox features: Title=Yes, Text=Yes, Buttons=OK, Icon=Warning MsgBox(48,"Hey","It worked holy fuck!") #EndRegion --- CodeWizard generated code End --- Else $coord = PixelSearch( 0, 0, 800, 600, 0xFFFBC6) EndIf WEndAnd heres the screenshotIf u run the script right now, it will click the yellow text.If i run it ingame it will not. I have seen other autoit pickits in diablo, but i have no idea how they functionedit: and for offsets, i have found a offest in the Sets color that is not in merc hp Edited April 5, 2009 by ecstatic Link to comment Share on other sites More sharing options...
newb_powa' Posted April 5, 2009 Share Posted April 5, 2009 Did you try it in window mode ?? (add -w to shortcut) because, if i remember right, Diablo Window is 800 / 600 but it's not positioned from 0,0. Does it even make sens ?? Or you can try with relative coord based on window position. Link to comment Share on other sites More sharing options...
ecstatic Posted April 5, 2009 Author Share Posted April 5, 2009 well how do i format the pixelsearch. It is Pixelsearch(0,0,800,600, color) right? Link to comment Share on other sites More sharing options...
Authenticity Posted April 5, 2009 Share Posted April 5, 2009 (edited) Opt('PixelCoordMode', 0) and getting a window handle to Diablo if applicable.You're doing it in the hard way. You can debug the D2Common.dll file and place BP on all the #xxx functions call and press alt. You'll get many hits but after removing the false ones you'll eventually get to the correct procedure. In this procedure there are all the items there are on the ground each item has it's own special value for rare, set, etc.. but it involves a lot of reversing and good understanding in structures, especially if it's in assembly ;]. If you want to go this 50/50 way you're welcome, but if you prefer an exact way you may want to read a little bit about D2Modding at the PhrozenHeart. By the way, because it's one of the most garbage games on the net nowadays (even blizzard drop guarding it lol) it has a great open source community.Edit: P.S - I wish I had my old D2xxx.dll files I'd show you how simple it's to preform a trade-force accept. Edited April 5, 2009 by Authenticity 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