making my own bot but i need some help

04/04/2008 00:58 n3mo#1
i started the code. i just tryed it on the "wing" (biginner mob)

but im still have problems on the thing getting a fix on it , this is my code so far

WinActivate("RF Online")
Sleep(2000)
While 1
$coord = PixelSearch( 150, 150, 1200, 860, 0xE09CB1, 90, 1);purple Monster
If Not @error Then
MouseMove($coord[0],$coord[0],0)
MouseClick("left",$coord[1],$coord[1])
Sleep (100)
EndIf
Send("{F1}")
Sleep(110)
Send("{F2}")
Sleep(110)
Send("{F3}")
Sleep(110)
Send("{F1}")
Sleep(100)
Send("{F2}")
Sleep(110)
Send("{Space}")
Send("{F3}")
Sleep(110)
Send("{Space}")
Sleep(120)
Send("{Space}")
Sleep(400)
WEnd
04/04/2008 02:09 spin_roan#2
hmm its an autoit3 script so whats seems to be the problem? :)
04/04/2008 02:33 n3mo#3
you got msn it would be a lot easer ?

and well it ramdomly click in diffrent directions lol. not sure how to get it more prised to kill a mob
04/04/2008 20:14 spin_roan#4
Try Using Call Function :
=======

Func Attack()
Sleep(100)
Send("{F5}") ;using macro shortcut skills
Sleep(1000)
Call("Find")
EndFunc

Func Rotate()
MouseMove(400, 500, 3)
MouseDown("right")
MouseMove(700, 500)
MouseUp("right")
Sleep(100)
call("Find")
EndFunc

Func Find()

Send("{X 7}"); looting
$coord = PixelSearch (50, 100, 1000, 700, 5259304, 2) ;im using 1024x768 resolution and beating up flymm :)
If Not @error Then
MouseClick ("left", $coord[0], $coord[1], 3, 0) ; Select monster that match the color
Send("{SPACE}") ; normal attack
Call("Attack")
Else
Send("{X 7}")
call("Rotate")
EndIf
EndFunc

;start of script execution
call("find")

=======

Copied from some of my Source Codes :D Not yet a very clean script and need lots of modification but the idea of targeting monster using PixelSearch and MouseClick are applied. I hope this helps you alot. :cool: