CO autoit gold looter, help

03/30/2011 08:36 f3nd3#1
Hey guys I have this code that I gathered from different forums and Im wondering if someone can help me get it to work. I am trying to get the script to recognize pink gold, and pick it up. Thanks for your help dudes, here is the code I have so far, it runs around but doesnt pick up any gold....

Opt("GUIOnEventMode", 1)
Opt("MouseCoordMode", 0)
Opt("PixelCoordMode", 0)
#include <GUIConstants.au3>

HotKeySet("{HOME}", "Swap")
HotKeySet("{INSERT}", "Pause")
HotKeySet("{END}", "Terminate")

Dim $SearchMob=0
GUICreate("GOLD",150,25,100,10)
GUISetOnEvent($GUI_EVENT_CLOSE, "Terminate")
$Mess=GUICtrlCreateLabel("<HOME> to switch on",10,5,130,15)
GUISetState()

While 1
If $SearchMob Then MobSearch()
Sleep(2500)
WEnd

Func Swap()
$SearchMob=NOT $SearchMob
If $SearchMob Then
GUICtrlSetData($Mess,"<HOME> to switch off")
Else
GUICtrlSetData($Mess,"<HOME> to switch on")
EndIf
EndFunc ;==> Swap()

Func JumpAround()
$xrand=Random(0,500,1)
$yrand=Random(0,500,1)
MouseMove($xrand,$yrand,0)
Send("{CTRLDOWN}")
MouseClick("Left")
Send("{CTRLUP}")
Sleep(2500)
EndFunc ;==> JumpAround()

Func MobSearch()
$Coords=PixelSearch(200,100,825,600,255121255,5) <---[ THIS IS MY RGB FOR PINK ON MY SCREEN.]
If NOT @error Then
MouseClick("left",$Coords[0]$Coords[1]+30,1,0,)
Else
JumpAround()
EndIf
EndFunc ;==> MobSearch()

Func Terminate()
Exit
EndFunc ;==> Terminate()
04/10/2011 17:55 _Hax_Rox_#2
1 Question, did you add this part in urself:

Code:
<---[ THIS IS MY RGB FOR PINK ON MY SCREEN.]
if yes, then the only other problem i can think of is that it is searching for the wrong shade of pink... please give more information on what the problem is... thanks

//EDIT: I think i may have found ur problem, you need to enter the colour in Hex form, not RGB. If you make/find a simple pixel search program you can find this colour quite easily :)