Jump to content

Recommended Posts

Posted (edited)

Hi there

i've written a small script to pick up items for diablo ii, but it doesnt seem to work

basically i need to hold down alt, so see the items, and then click them once i can see them. once i'm done, i release alt, and i'm on my way. simple as that but its not working. it holds alt, lets go after i've told it, but doesnt click in between. i'm puzzled. the code is below. ignore where it says msgbox.. etc i put that in so i knew if it was detecting etc, but alas it doesnt

func pickit()
    send("{alt down}")
    sleep(1000)
;get all uniques
    for $x = 1 to 10
        $coord = pixelsearch(200,100,200,375,9732196);to get Uniques
        if not @error Then
            msgbox('','','Unique'& $x)
            mouseclick('left',$coord[0]+20,$coord[1]+10,1,0)
            $itemsfound=1
        EndIf
    Next
;sets
    for $x = 1 to 10
        $coord = pixelsearch(200,100,200,375,836636);to get Sets
        if not @error Then
            msgbox('','','Set'& $x)
            mouseclick('left',$coord[0]+20,$coord[1]+10,1,0)
            $itemsfound=1
        EndIf
    Next
;rares
    for $x = 1 to 10
        $coord = pixelsearch(200,100,200,375,14202980);to get Rares
        if not @error Then
            msgbox('','','Rare'& $x)
            mouseclick('left',$coord[0]+20,$coord[1]+10,1,0)
            $itemsfound=1
        EndIf
    Next
;magical
    for $x = 1 to 10
        $coord = pixelsearch(200,100,200,375,5263532);to get Magics
        if not @error Then
            msgbox('','','Magical'& $x)
            mouseclick('left',$coord[0]+20,$coord[1]+10,1,0)
            $itemsfound=1
        EndIf
    Next
    send("{alt up}")
EndFunc

any info is greatly appreciated, cheers

Edited by Sarc
Posted

so it doesn't get any position?

you know your just searching 1 short line?

pixelsearch(200,100,200,375,5263532)

searches from left 200 to right 200 == 1 pixel

searches from top 100 to bottom 375 == 176 pixel

so you don't search a wide area

try this 1

pixelsearch(0,0,@desktopwidth,@desktopheight,5263532, , 5)
for your magicitems

so far have fun

Posted

so it doesn't get any position?

you know your just searching 1 short line?

searches from left 200 to right 200 == 1 pixel

searches from top 100 to bottom 375 == 176 pixel

so you don't search a wide area

try this 1

pixelsearch(0,0,@desktopwidth,@desktopheight,5263532, , 5)
for your magicitems

so far have fun

ok you know how much of a noob i feel now? :">

nice 1 m8 thx v much. all working now

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...