Jump to content
Sign in to follow this  
ecstatic

Diablo II - Pick-IT Not working

Recommended Posts

ecstatic

#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
WEnd

Heres a img of what im trying to pick up

Posted Image

The resolution of my full screen game is 800x600 which is why i made it 0, 0, 800, 600

Its not reading the pixel correctly or not at all. Is there a flaw in my script?

Share this post


Link to post
Share on other sites
Authenticity

First, there might be a problem with your merc hp so the bot may think your merc is a set item :D. Anyway, I see you dropped a set item but looking for a rare (yellow) right?

Edited by Authenticity

Share this post


Link to post
Share on other sites
ecstatic

First, there might be a problem with your merc hp so the bot may think your merc is a set item :D. Anyway, I see you dropped a set item but looking for a rare (yellow) right?

hahahah yes. Lemme fix that and retry

Share this post


Link to post
Share on other sites
ecstatic

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
WEnd

And heres the screenshot

Posted Image

If 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 function

edit: and for offsets, i have found a offest in the Sets color that is not in merc hp

Edited by ecstatic

Share this post


Link to post
Share on other sites
newb_powa'

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.

Share this post


Link to post
Share on other sites
ecstatic

well how do i format the pixelsearch.

It is Pixelsearch(0,0,800,600, color) right?

Share this post


Link to post
Share on other sites
Authenticity

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

Edited by Authenticity

Share this post


Link to post
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
Sign in to follow this  

×