AUTOIT Bot Help

08/08/2010 01:19 wakamura#1
Well, I was working on a small bot and I got it to work until I reopened Conquer online and it stopped finding the monsters.

I check on CE and all the addresses I found lead to the Monsteres address I added to the script.

I am a noob at making bots but I'm working on this to help me get better.
Well any help would mean a lot to me.
I dont play Conquer Online. I chose it so I may work on a bot for it.

here is the script:

#include <NomadMemory.au3>

;HotKeys
HotKeySet("{F4}", "Terminate")

; Variables
$lvl = 0x004EC1E8
$hp = PixelSearch(0, 0, 1024, 768, 12059395)
$handle = WinGetProcess("[Conquer Online]")
$memory = _MemoryOpen($handle, Default)
$hpclick = PixelSearch(0, 0, 1024, 768, 12059395)
$rage = PixelSearch(980,606,1000,650,1981422)

;Mobs
$turtledove = _MemoryRead(0x74727554,$memory) ;Turtledove
$pheasant = _MemoryRead(0x61656850,$memory) ;Pheasant

;Items
$sycee = _MemoryRead(0x65637953,$memory) ; Sycee

;Coords
$xcoord = _MemoryRead(0x0087F1C0,$memory) ; Coord X
$ycoord = _MemoryRead(0x0087F1C4,$memory) ; Coord Y

;Script Body
While 1
Autofight()
Sleep(100)
Money()
WEnd

;Functions

Func Autofight()
If $turtledove = True Then
Send("{CTRLDOWN}")
MouseClick("Left",$turtledove[0],$turtledove[1],1,0)
Sleep(500)
Send("{CTRLUP}")
MouseClick("Left",$turtledove[0],$turtledove[1],1,0)
Else
MobSearch()
EndIf
EndFunc

Func Money()
If $sycee = True Then
MouseClick("Left",$sycee[0],$sycee[1],1,0)
Sleep(500)
EndIf
EndFunc

Func MobSearch()
$rclickx = Random(1,950,1)
$rclicky = Random(1,600,1)
Send("{CTRLDOWN}")
MouseClick("Left",$rclickx,$rclicky,1,2)
Send("{CTRLUP}")
Sleep(500)

EndFunc ;==>Autofight

Func Terminate()
Exit 0
EndFunc ;==>Terminate
08/08/2010 04:34 wakamura#2
Func Autofight()
$hp = PixelSearch(0, 0, 1024, 768, 12059395)
If @error = 0 Then
Send("{CTRLDOWN}")
MouseClick("Left",$hp[0]+10,$hp[1]+20,1,2)
Sleep(1000)
Send("{CTRLUP}")
MouseClick("Left",$hp[0]+10,$hp[1]+20,1,2)
Else
MobSearch()
EndIf
EndFunc

When I use this function it works but its a bit buggy.
But I was hoping I could use the memory reading to make things more accurate.
Or maybe if I were to be directed to a more accurate way of pixelsearch of the mobs HP bar it would help.

Any help anyone?
08/11/2010 23:15 DexterCry#3
its not working every time because the memory address of mobs always change ... u must search again for the memory :(