It rounds the integer to a full decimal etc. 14.6 becomes 15.
I got everything working right except looting now. For some reason it seems to only be looting one item even if there are more than one gem and/or other types to pickup. I feel like the problem is in the pickItems loop, but I am not sure what the gX and gY that both have to be > 15 for the loop to function are actually doing. I think it may be the only variables without comments explaining them.
Pretty sure the issue is occuring somewhere here and isn't looping for whatever reason:
Code:Func pickItems() $currentArrayItem = 0 For $gI = 0 to ($totalItems - 1) $array = StringSplit($pick[$gI],"|") $file = $array[1] $accuracy = $array[2] $urlString = $directory & $file $Target = _ImageSearchArea($urlString,1,0,0,Round(1920*$x_ratio),Round(1080*$y_ratio),$gX,$gY,$accuracy) While $i <= 12 ; max: 13 gems and pieces of gear to loot If $Target And ($gX > 15) And ($gY > 15) Then ;MsgBox(4096,"Debug",$urlString & " " & $gX & "-" & $gY) MouseClick("left", $gX, $gY, 1, 0) Sleep(Random(1200,1400)) MouseMove(14,14,0) ;Reset cursor position, it doesn't need to hover Sleep(5) $Target = _ImageSearchArea($urlString,1,0,0,Round(1920*$x_ratio),Round(1080*$y_ratio),$gX,$gY,$accuracy) $i+= 1 Else ExitLoop EndIf WEnd Next EndFunc
Mostly thinking its this or something i cant see in the dll. " If $Target And ($gX > 15) And ($gY > 15) Then ", what are these values checking?
edit : ok, I see now that those variables hold the screen position of the target click, but the loop should not be failing in that case and I have no other idea atm why this is only looting 1 item per run for me....
Last edited by ParanoidAndroid; 06-13-2012 at 12:05 PM. Reason: code tags
@ParanoidAndriod -
Next time use code tags... it makes it much easier to read.
Second, gX and gY are the coordinates that the image was found at. Its checking that it didn't find the image in the very upper left hand corner. I don't see the reasoning behind this though.
Also, im sorry... I dont see why it wouldn't work more than once.
-Darkling Lord
hey,
i cant get my scripts to get to loot stuff. using my own png's at the moment but with the ones from NotAres/anyone else it wont loot either, map to the pngs is correct
this is my script, changed times a bit in picking up and added flaw.png
http://pastebin.com/zsy5bffZ
could someone check what im doing wrong?
thanks
DD
I made a script for myself using this farming method, but then I found out this one has advanced pickup so I started using this. Since then I looked at this script and the movement in it can be faster. I used Vault instead of Smokescreen to manoeuvre past the bots, I found out this works rather fast and you won't get pushed out of course by the mobs.
Also, I used a pixelcheck to see if I was ingame or in menu, so you could start from where ever you want, plus it recovers itself from crashes.
It's rather basic so I wont post the code here, if any of the contributers want my code to look into it, just pm.
Kudos on this script!
Script is working fine except for looting rares, for some reason when a rare drops the mouse cursor goes all the way to the top left corner of the screen and teleports back to town without looting it.
it seems as if the looting mechanism in notAres most recent version isn't working for a lot of users. Perhaps some in game donates to him can give him the needed incentive to work on it some more![]()
-Darkling Lord
The input limit is still happening. It just takes awhile to get to it. ie. if you have 5-6 closed cellar doors in a row.
I'm in the middle of the work day. But what might work, is a function to check for input limit message if so, Sleep for 3-5mins.
And everything should be right again.
This should fix your pickup problems. It did for me, i am using ares 1.4a with some tweaks of myself which i postet on 97 or something.Code:Func pickItems() $currentArrayItem = 0 For $gI = 0 to ($totalItems - 1) $array = StringSplit($pick[$gI],"|") $file = $array[1] $accuracy = $array[2] $urlString = $directory & $file $Target = _ImageSearchArea($urlString,1,0,0,Round(1920*$x_ratio),Round(1080*$y_ratio),$gX,$gY,$accuracy) While $i <= 12 ; max: 13 gems and pieces of gear to loot If $Target And ($gX > 15) And ($gY > 15) Then ;MsgBox(4096,"Debug",$urlString & " " & $gX & "-" & $gY) MouseClick("left", $gX, $gY, 1, 10) Sleep(Random(1200,1400)) MouseMove(14,14,10) ;Reset cursor position, it doesn't need to hover Sleep(5) $Target = _ImageSearchArea($urlString,1,0,0,Round(1920*$x_ratio),Round(1080*$y_ratio),$gX,$gY,$accuracy) $i+= 1 Else ExitLoop EndIf WEnd Next EndFunc
Fumi, pastebin your code and link it here... someone is bound to take a look and offer advice if they know.
On a side note... I love scripting. I just set up my script so it works perfectly with any movement speed.
Now it has:
Its shaping up quite nicely.. We just need notAres to make up his mind if he is going to implement this stuff.State checking
Theoretically works for all resolutions (except for the PNGs)
Movement Speed independent
Custom Builds
Loot any quality
Stash any quality
Vendor any quality
RunLog:
Code:Run Number: 1 - Runs till management: 5 Main Menu Old Ruins Cellar Check - Found Dank Cellar Attacking Sarkoth Looting Returning to Town Leaving Game Runtime: 45.38 seconds. Total runtime: 0 hours, 1 minutes. Run Number: 2 - Runs till management: 4 Main Menu Old Ruins Cellar Check - Not Found Returning to Town Leaving Game Runtime: 15.73 seconds. Total runtime: 0 hours, 2 minutes. Run Number: 3 - Runs till management: 4 Main Menu Old Ruins Cellar Check - Not Found Returning to Town Leaving Game Runtime: 15.77 seconds. Total runtime: 0 hours, 2 minutes. Run Number: 4 - Runs till management: 4 Main Menu Old Ruins Cellar Check - Not Found Returning to Town Leaving Game Runtime: 15.87 seconds. Total runtime: 0 hours, 3 minutes. Run Number: 5 - Runs till management: 4 Main Menu Old Ruins Cellar Check - Found Dank Cellar Attacking Sarkoth Looting Random Sleep - 10 sec ||||||||||| Returning to Town Leaving Game Runtime: 56.36 seconds. Total runtime: 0 hours, 4 minutes. Run Number: 6 - Runs till management: 3 Main Menu Old Ruins Cellar Check - Not Found Returning to Town Leaving Game Runtime: 15.57 seconds. Total runtime: 0 hours, 4 minutes. Run Number: 7 - Runs till management: 3 Main Menu Old Ruins Cellar Check - Found Dank Cellar Attacking Sarkoth Looting Random Sleep - 8 sec ||||||||||| Returning to Town Leaving Game Runtime: 57.6 seconds. Total runtime: 0 hours, 5 minutes. Run Number: 8 - Runs till management: 2 Main Menu Old Ruins Cellar Check - Found Dank Cellar Attacking Sarkoth Looting Random Sleep - 5 sec ||||||||||| Returning to Town Leaving Game Runtime: 53.46 seconds. Total runtime: 0 hours, 7 minutes. Run Number: 9 - Runs till management: 1 Main Menu Old Ruins Cellar Check - Found Dank Cellar Attacking Sarkoth Looting Random Sleep - 8 sec ||||||||||| Returning to Town Putting Items in Stash Stashing Tomes Done with Stash Vendoring Items Selling Magic - 9 Done With Vendor Leaving Game Runtime: 80.25 seconds. Total runtime: 0 hours, 8 minutes.
Last edited by Shimizoki; 06-13-2012 at 01:11 PM.
-Darkling Lord
Sigh.. The bots runs very smoothly for me but I can never get it to loot. Just gold n then TP back.. N I'm quite new to this autoit business still a bit confused
This means that the pickLoot function is failing. IMO these are the things that are required to get it to work based on my win7 64bit rig
1. 64bit AutoIt. Download it unpack it. Make note of install location
2. download support files from the mediafire. Link found in the comments section
3. put the imagesearch.au3 into the include directory
4. put the pngs into wherever. Make note of install location
5. Modify script to point to the noted png location
6. copy the .dlls into \windows\system32
7. run the script with AutoIt3_64.exe or you can compile it into an .exe. Me, I just set the open with properties to the AutoIt3_64.exe. So that when I double click the .au3 script it launch the correct version.