nvm - sorted it
ty !!
nvm - sorted it
ty !!
Last edited by GIVEMEANAME; 06-10-2012 at 03:42 PM.
I have updated my script to include sensitivty by filename
The search for legendaries were problematic as the color matches the background in many cases:
Use at your own risk.. no guarantees
Global $pick[$totalItems]
$pick[0] = "uare.png|50"
$pick[1] = "tome.png|50"
$pick[2] = "legendaryA.png|170"
$pick[3] = "legendaryE.png|170"
$pick[4] = "legendaryI.png|170"
$pick[5] = "legendaryO.png|170"
$pick[6] = "legendaryU.png|170"
$pick[7] = "seta.png|50"
$pick[8] = "sete.png|50"
$pick[9] = "setu.png|50"
$pick[10] = "seto.png|50"
$pick[11] = "seti.png|50"
$pick[12] = "rarea.png|50"
$pick[13] = "raree.png|50"
$pick[14] = "rarei.png|50"
$pick[15] = "rareo.png|50"
$pick[16] = "rareu.png|50"
Func pickItems()
$currentArrayItem = 0
$gX = 0
$gY = 0
For $gI = 0 to ($totalItems - 1)
Send("{LALT}")
$array = StringSplit($pick[$gI],"|")
$file = $array[1]
$accuracy = $array[2]
$urlString = $directory & $file
;MsgBox(0,'', 'File:' & $urlString & ' accuracy' & $accuracy)
$Target = _ImageSearchArea($urlString,1,0,0,Round(1920*$x_ratio),Round(1080*$y_ratio),$gX, $gY,$accuracy)
if($Target) Then
While $i <= 10
If ($Target) And ($gX > 15) AND ($gY > 15) Then
;MsgBox(0,'', 'File:' & $urlString & ' Target' & $Target & ' gX:' & $gX & ' gY:' & $gY)
MouseClick("left", $gX, $gY)
Sleep(Random(900,1200))
$gX = 0
$gY = 0
Else
ExitLoop
EndIf
$i = $i + 1
$Target = _ImageSearchArea($urlString,1,0,0,Round(1920*$x_ratio),Round(1080*$y_ratio),$gX, $gY,$accuracy)
WEnd
EndIf
Next
EndFunc
I'm using a modified 1.3a that includes the 1.3b changes along with the imagesearch for gems and tomes. I also incorporated my own reload/relog method that checks for the resume button right before every click resume button call so if it can't find the resume button thinking it has been disconnected, the script will restart d3 if it successfully pings google.com and log in. The only problem I am having is issues with the script thinking the lamp is a legendary so it clicks it but then misses whatever gems are south of my character.
My take on the vowel/item scan. If you are having problems, try asuRob's script which is about 5 posts above me.
Once again, keep in mind that this is a base script, and is meant for people who know basic knowledge of AutoIt or other programming languages. I will NOT help you implement this into your own code. That is for you to figure out.
I've got the bruteforcing down pretty much. Looks like 70-90 tolerance works pretty well for the alphabet. The only problem (still) is when another item name lights up orange. When it does this imagesearch can't detect it.
To be honest, my magic find is at like 7%, meaning i barely ever get a rare drop. I didm however, buy a legendary for 10k and it detected it just fine (detected the letter o at the very end). It still probably needs more tweaking, but for now, heres a concept of the alphabet scan.
What it does is find things like gems and tomes first, and then once there are no matches left, it scans for the rare,legendary, and set vowels.
First off, I added all of the letters to the array.
Next, I added a variable that denotes the beginning of the alphabet. $pick[2] starts off the bruteforce scan, so I set the variable to 2. If you ever add anything not alphabet related, it will need to be adjusted.Code:Global $pick[$totalItems] $pick[0] = "uare.png" $pick[1] = "tome.png" $pick[2] = "legendaryA.png" $pick[3] = "legendaryE.png" $pick[4] = "legendaryO.png" $pick[5] = "legendaryU.png" $pick[6] = "setA.png" $pick[7] = "setE.png" $pick[8] = "setU.png" $pick[9] = "setI.png" $pick[10] = "rareA.png" $pick[11] = "rareE.png" $pick[12] = "rareO.png" $pick[13] = "rareU.png"
Now, the actual pickItems() function was broken into two parts.Code:$startBruteForceAt = 2
Keep in mind that if you are using notAres' 1.3b, his structure is much cleaner and has some different variables, so use your problem solving skills to implement.Code:Func pickItems() ;let's pick up the gems and tomes first $currentArrayItem = 0 for $i = 0 to ($startBruteForceAt - 1) $urlString = "C:\Users\RJ\Desktop\d3p\" & $pick[$i] $Search = _ImageSearchArea($urlString,1,0,0,@DesktopWidth,@DesktopHeight,$gX,$gY,100) while $search = 1 if $search = 1 then MouseMove($gX, $gY, 3) Sleep(100) MouseClick("left",$gX,$gY,1,1) sleep(1200) $Search = _ImageSearchArea($urlString,1,0,0,@DesktopWidth,@DesktopHeight,$gX,$gY,100) Else EndIf wend next ;time to start the vowel scan for $i = $startBruteforceAt to ($totalItems - 1) $urlString = "C:\Users\RJ\Desktop\d3p\" & $pick[$i] $Search = _ImageSearchArea($urlString,1,0,0,@DesktopWidth,@DesktopHeight,$gX,$gY,90) ;change the 90 to 70 or 80 if it keeps clicking random stuff if $search = 1 then MouseMove($gX, $gY, 3) Sleep(100) MouseClick("left",$gX,$gY,1,1) sleep(1200) EndIf next EndFunc
Last edited by rvbfreak; 06-10-2012 at 04:01 PM.
Hey, I will like to share some my findings after many hours of search:
- Since the tolerance required is different for each type of items I made an Small debug code to test the pickUp function: Testing ImageSearch - Pastebin.com
- The dll and the imageSearch library provided before on this thread did not work for on a Windows 7 x64 so I tested a more versions and I found that with this is working fine: ImageSearch.rar (the ddl file need to be copyed in \Windows\System32 )
- also if you have problems compiling/running an script that use the imageSearch functions try to use the x86 version of AutoIT not the x64.
and since this is my fist post here, I will like to say thanks to all for doing all this good stuf!
Last edited by ccdssv; 06-10-2012 at 04:40 PM. Reason: new URL
You don't need to move to mouse before clicking. That solves the highlighting problem and I mentioned it in 1.3b
I haven't even begun to look into the lettering yet, I have a busy day so I'll implement whatever looks best in a few hours.Code:While $i <= 10 If $Target Then MouseClick("left", $gX, $gY) Sleep(Random(1000,1200)) MouseMove(1,1) ;Reset cursor position, it doesn't need to hover $Target = _ImageSearchArea($urlString,1,0,0,Round(1920*$x_ratio),Round(1080*$y_ratio),$gX,$gY,100) Sleep(100) $i+= 1 Else ExitLoop EndIf WEnd![]()
hey could you upload a version 1.2b with working img search pickit? the whole files and setup, and a step by step guide? for windows 7 64bit 1920x1080p full screen windowed option ?
thanks
If someone could pm me with some instructions on how to get Rare/Legendary pick up working I'd really appreciate it, if you can get mine working I'll even pay some gold.
i have solve this. you need to change $totalItems = 2 to 14 instead. but i now getting another error. able to run but when trying to take gem having some errors.
you can find an version on my test script for looting: #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Out - Pastebin.com for me is 100% working with that settings;
I am still unable to pick up gems and tomes, can someone please review my script, thanks!
;notAres' Sarkoth DH Gold Script 1.3b - 6/10/2012 - Added CheckExit() and Random - Pastebin.com
btw, with this script my character will click on the lantern and try click pass it. Then it will teleport and quit game. I've tried to get it to pick up gems and tomes, however it is still unsuccessful. Please help, thanks!
-AzEKnightz
Last edited by AzEKnightz; 06-10-2012 at 04:58 PM.