and instead of searching monster health bar, it will scatter the direcation u are going
Code:
#Persistent
IniRead, Charactername, %A_ProgramFiles%\path.ini, section1, Charactername
if CharacterName=Error
{
Charactername=0x50AE54
IniWrite, %Charactername%, %A_ProgramFiles%\path.ini, section1, Charactername
}
send {Ctrl up}
#Persistent
Menu, Tray, Icon, Shell32.dll, 44
Gui, +toolwindow
Gui, Add, Text,x10 y12 w80 h20, Log off after:
Gui, Add, Edit, x80 y10 w28 h20 vtimer,60
Gui, Add, Text,x110 y12 w80 h20, mins
Gui, Add, Text,x10 y32 w200 h20, Domain: -+
Gui, Add, Text,x10 y52 w200 h20, Range: -+
Gui, Add, Edit, x80 y30 w50 h20 vx1x,500
Gui, Add, Edit, x80 y50 w50 h20 vy1y,500
Gui, Add, Text,x10 y75 w200 h20, CharNameAddress:
Gui, Add, Edit, x10 y90 w70 h20 vCharactername,%Charactername%
Gui, Add, Button, x10 y122 w80 h20 vButton gStart, >Ok<
Gui, Show, x1 y1 h150 w150, CO Archer
return
GuiClose:
ExitApp
Gui, Show
return
Start:
Gui, Submit, Hide
choosepath=1
pathselect=1
timer *= 60000
StartTime := A_TickCount + timer
difcount=0
WinGet,id, ID,[Co
WinActivate, [Con
Process, Exist,Conquer.exe
pid = %ErrorLevel%
ProcessHandle := DllCall("OpenProcess", "int", 2035711, "char", 0, "UInt", PID, "UInt")
InputBox, name, Enter Character Name for memory address checking, , , 380,100
counter=0
StringSplit, nameArray, name
Loop, 4
{
counter++
this_name := nameArray%counter%
Transform, this_name2, asc, %this_name%
SetFormat, integer, hex
this_name2 += 0
StringReplace, this_name2, this_name2, 0x, , All
namehex=%this_name2%%namehex%
SetFormat, integer, d
}
namehex=0x%namehex%
SetFormat, integer, hex
addressS=%Charactername%
VarSetCapacity(outputA, 4)
DllCall("ReadProcessMemory", "UInt", ProcessHandle, "UInt", addressS, "Uint*", OutputA, "Uint", 4, "Uint *", 0)
if OutputA != %namehex%
{
msgbox, Wrong memory address`nPlease contact me in ELSE thread. `n%OutputA% -%namehex%
exitapp
}
SetFormat, integer, hex
adxxx:=Charactername + 68
adyyy:=adxxx + 4
WinActivate, ahk_id %id%
settimer, Timercheck, 5000
settimer, readXY, 800
settimer, hphp, 700
VarSetCapacity(orgX, 4)
VarSetCapacity(orgY, 4)
DllCall("ReadProcessMemory", "UInt", ProcessHandle, "UInt", adxxx, "Uint*", orgX, "Uint", 4, "Uint *", 0)
DllCall("ReadProcessMemory", "UInt", ProcessHandle, "UInt", adyyy, "Uint*", orgY, "Uint", 4, "Uint *", 0)
SetFormat, integer, d
lowerboundX := orgX - x1x
lowerboundY := orgY - y1y
UpperboundX := orgX + x1x
UpperboundY := orgY + y1y
lowerboundXa := lowerboundX
lowerboundYa := lowerboundY
UpperboundXa := UpperboundX
UpperboundYa := UpperboundY
IniWrite, %Charactername%, %A_ProgramFiles%\path.ini, section1, Charactername
difx := ceil(x1x / 10)
dify := ceil(y1y / 10)
sleep 1000
loop
{
loop 10
{
PixelSearch, outx, outy, 100, 100, 900, 600, 0xFF79FF,10,Fast
if ErrorLevel
{
gosub, function
}
else
{
tooltip, PickUp,1,1
click, %outx%,%outy%
}
sleep 600
}
gosub, function
}
return
return
;--------------------------------------function-------------------
function:
send {Ctrl down}
if pathselect = 1
{
if yyy < %lowerboundY%
{
choosepath = 2
pathselect = 2
}
}
else if pathselect = 2
{
if xxx > %UpperboundX%
{
choosepath = 3
pathselect = 3
}
}
else if pathselect = 3
{
if yyy > %UpperboundY%
{
choosepath = 4
pathselect = 4
}
}
else if pathselect = 4
{
if xxx < %lowerboundX%
{
choosepath = 1
pathselect = 1
lowerboundX += difx
lowerboundY += dify
UpperboundX -= difx
UpperboundY -= dify
difcount++
if difcount > 8
{
difcount=0
lowerboundX := lowerboundXa
lowerboundY := lowerboundYa
UpperboundX := UpperboundXa
UpperboundY := UpperboundYa
}
}
}
tooltip, Jump,1,1
if choosepath = 1
{
Click, 513 ,304
Click 513, 134
}
else if choosepath = 2
{
click, 593 ,384
Click 863, 384
}
else if choosepath = 3
{
click, 513,464
Click 513, 634
}
else if choosepath = 4
{
click, 433 ,384
Click 163, 384
}
send {Ctrl up}
click, right
return
return
;--------------------------------------HPcheck---------------------
hphp:
IfWinActive, ahk_id %id%
{
PixelSearch, , , 10, 720, 60, 720, 0x0B098F, 10, Fast
if ErrorLevel
{
ControlClick, x150 y740,ahk_id %id%,,RIGHT
sleep 1000
PixelSearch, , , 10, 720, 60, 720, 0x0B098F, 10, Fast
if ErrorLevel
{
ControlClick, x150 y740,ahk_id %id%,,RIGHT
send {F12}
sleep 300
winkill, ahk_id %id%
msgbox, PrintScreen saved in CO screenshot folder
ExitApp
}
}
}
else
{
Tooltip, CO not in focus`nBot Pause`nCO not in focus`nBot Pause`nCO not in focus`nBot Pause`nCO not in focus`nBot Pause`nCO not in focus`nBot Pause`nCO not in focus`nBot Pause`nCO not in focus`nBot Pause`nCO not in focus`nBot Pause`nCO not in focus`nBot Pause`nCO not in focus`nBot Pause`nCO not in focus`nBot Pause`nCO not in focus`nBot Pause`nCO not in focus`nBot Pause`nCO not in focus`nBot Pause`nCO not in focus`nBot Pause`nCO not in focus`nBot Pause`nCO not in focus`nBot Pause`nCO not in focus`nBot Pause`nCO not in focus`nBot Pause`nCO not in focus`nBot Pause`nCO not in focus`nBot Pause,1,1
pause
}
return
;--------------------------------------TimerCheck------------------
Timercheck:
ControlClick, x110 y740,ahk_id %id%,,RIGHT
End := A_TickCount
if End>=%StartTime%
{
winkill, ahk_id %id%
sleep 500
send {Ctrl up}
msgbox, DC timer activate!
reload
return
}
return
return
;--------------------------------------Memory check---------------
readXY:
VarSetCapacity(xxx, 4)
VarSetCapacity(yyy, 4)
DllCall("ReadProcessMemory", "UInt", ProcessHandle, "UInt", adxxx, "Uint*", xxx, "Uint", 4, "Uint *", 0)
DllCall("ReadProcessMemory", "UInt", ProcessHandle, "UInt", adyyy, "Uint*", yyy, "Uint", 4, "Uint *", 0)
return
return
;--------------------------------------HotKey---------------------
^r::
{
send {Ctrl up}
reload
}
^q::pause