How to fix issues with ImageSearch? menu

These ads disappear when you log in.

Results 1 to 3 of 3
  1. #1
    aanatema's Avatar Private
    Reputation
    1
    Join Date
    Nov 2008
    Posts
    4
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)

    How to fix issues with ImageSearch?

    Hi,

    I am trying lately to come up with a bot that does several things - collect gold, pickup magic/rare/legendary/gem items, repair, sell magic items.

    The thing is that on my machine most bots doesn't work. Some are not detecting the cellar, some are not even looking at the right box for the cellar, etc.

    So after several hours of reviewing scripts, testing, and some partial coding from my side, I came up with this:

    [AutoIt] Sarkoth Farmer - Pastebin.com

    I think it is neat.

    At the moment that bot gets to the cellar almost every time ... only some time stops just a click away from the checkpoint ... but that doesn't bother me.

    What bothers me is that items and gems are not being picked up.

    You can see that I have a function, which is getting called properly, for collecting magic items:
    Code:
    Func LootMagics()
       For $gI = 0 to 4
    	  $array = StringSplit($ImageFiles[3][$gI],"|")
    	  $file = $array[1]
    	  $accuracy = $array[2]
       
    	  $target = _ImageSearchArea($ImgDir & $file, 1, $LootingArea[0], $LootingArea[1], $LootingArea[2], $LootingArea[3], $ISx, $ISy, $accuracy)
    	  If $target > 0 Then
    		 If $Sounds = True Then
    			SoundPlay($SoundsDir & $SoundFiles[3], 0)
    		 EndIf
    		 $Magics+=1
    		 MouseClick("LEFT", $ISx, $ISy, 1, 1)
    		 Sleep(300 + $LootDelay)
    		 MouseMove(120, 120, 2)
    		 Sleep(100)
    		 If $Sell = True Then
    			CheckBagFull()
    			If $FullBag = True Then
    			   $FullBag = False
    			   Sleep(300)
    			   LootMagics()
    			EndIf
    		 EndIf
    	  EndIf
       Next
      
       $MagicLootAttempts+=1
       
       If($MagicLootAttempts >= $MagicLootAmount) Then 
    	  Return
       Else
    	  LootMagics()
       EndIf
    EndFunc
    I cannot be 100% sure but I believe the problem comes from the image files I am using. Thus I focused on two main things to do so I can improve the bot:

    1. Test to make sure that ImageSearch works
    2. Create own image files

    The problem is that I don't know how to do my own image files and I can't find even a single article on Google for more than 3 hours now. And I can't really complete step 1 without hand-made images

    So if someone could help with some guidelines, even a link to external resource works, it would be greatly appreciated!

    P.S.
    I have no problems when it comes to swimming in deep waters of programming.

    Edit:
    My box is Win 7 64bit, I have the ImageSearch DLLs for 32 and 64 placed in both %SystemRoot% and %SystemRoot%/system32 (%SystemRoot is the Windows directory). I tried running the script as x64 and as x86 - both times no luck with pickups.

    Edit 2:
    Just now a rare got dropped with two magic items and two gems - the bot did not pick any of them.
    Last edited by aanatema; 06-18-2012 at 06:37 PM.

    These ads disappear when you log in.

  2. #2
    stealthingyew's Avatar Knight-Lieutenant
    Reputation
    12
    Join Date
    Jun 2012
    Posts
    257
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    right click your script and tell it to run as x64 when i just click mine it defaults to x86 and imagesearch doesn't work but if i right click run or compile as x64 it works fine.

    edit: sorry missed you said you tried that already. Have you tried putting the imagesearch include into the autoit include folder?'

    edit 2: If you are just looting magic/rares I think you should use pixelsearch for the yellow(rare) or blue(magic) items. You would only need imagesearch for gems or tomes and then to id the rares if you choose to do so.
    Last edited by stealthingyew; 06-18-2012 at 07:00 PM.

  3. #3
    aanatema's Avatar Private
    Reputation
    1
    Join Date
    Nov 2008
    Posts
    4
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    - You noticed correctly, tried with both 64bit and 32bit

    - I have the ImageSearch.au3 into both

    Program Files\AutoIt\Include
    and
    Program Files (x86)\AutoIt\Include

    - The color code for the blue pixel (the one for the cellar entrance) is for me is different than any script that I reviewed so far. Furthermore, that particular pixel is dynamic on my PC (wtf?, I know!). It took me nearly a whole day till I come up with a valid detection method ... so I am a bit discouraged of using PixelSearch for loot at this stage.

    Edit: OK, it is confirmed - ImageSearch IS WORKING

    I confirmed its functionality with this script:

    Code:
    #include <imagesearch.au3>
    
    HotKeySet("{ENTER}","_func1")
    
    $x = "1920"
    $y = "1080"
    
    While 1
    	Sleep(10)
    WEnd
    
    Func _func1()
    Do
    $search = _imagesearch(@scriptdir & "\is.bmp",1,$x,$y,100)
    Until $search = 1
    
    MouseClick("left",$x,$y)
    EndFunc
    And a BMP image of my desktop's trash bin, which I created through {PrintScreen} -> Paint.

    Now let's see if I can do the same for D3
    Last edited by aanatema; 06-19-2012 at 12:31 AM.

Similar Threads

  1. Replies: 1
    Last Post: 08-09-2010, 08:20 PM
  2. How To Fix Hunter Spells With A Repack?
    By september in forum WoW EMU Questions & Requests
    Replies: 4
    Last Post: 03-02-2009, 03:11 PM
  3. [Question] How to fix Jaw with helmet on?
    By xicon-kyle- in forum WoW ME Questions and Requests
    Replies: 31
    Last Post: 04-25-2008, 12:18 AM
  4. How to Bug someone out, only way to fix is with GM
    By bagsnatcher in forum World of Warcraft Exploits
    Replies: 29
    Last Post: 12-06-2007, 05:21 PM
All times are GMT -5. The time now is 10:21 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2018 vBulletin Solutions, Inc. All rights reserved. Digital Point modules: Sphinx-based search