Tailor Made Tools/Programs for You - AHK

01/07/2009 12:27 Darkyy#106
Quote:
Originally Posted by Evan Lim View Post
Alexisppp12345@
for image search, use BMP 24-bit format
Code:
msgbox, Ctrl+Q to pause

loop
{
ImageSearch, FoundX, FoundY, 300 ,100, 1000, 300, *5 C:\image1.bmp
if ErrorLevel = 0
click 659,222

sleep 50

ImageSearch, FoundX, FoundY, 300 ,100, 1000, 300, *5 C:\image2.bmp
if ErrorLevel = 0
click 410,243

sleep 50

ImageSearch, FoundX, FoundY, 300 ,100, 1000, 300, *5 C:\image3.bmp
if ErrorLevel = 0
click 667,244

sleep 50

ImageSearch, FoundX, FoundY, 300 ,100, 1000, 300, *5 C:\image4.bmp
if ErrorLevel = 0
click 667,244

sleep 50
}

^q::pause
Darkyy@
[Only registered and activated users can see links. Click Here To Register...]
tnx
01/07/2009 13:25 Alexisppp12345#107
Evan,
First I want thank you for wasting your time with my requests.
I have one question: The program works pretty good on my screen,but if I open CO it does not detect the image/answers. Why is that? The image I give at the AHK program is the same with the one that scans at the screen! I PrintedScreen and gave the image. Why can't it detect it/does not click?

Quote:
Originally Posted by Evan Lim View Post
i have no idea how to do the choosing option part
i can guarantee u pixel search to ocr scan words is definitely not going to work, furthermore, CO has a semi-transparent dialog environment, which makes pixel search even more unstable
It is the same reason that can't detect pixel search?
saying semi-transparent you mean that every time it changes? :S
01/07/2009 14:20 Evan Lim#108
Alexisppp12345@
exactly, you answered yourself already
image searching doesnt work well with semi-transparent screen, especially the background always change
01/07/2009 17:17 Alexisppp12345#109
I can have the same background if I always be at the same coordinates.
Can you make a program that will answer it self the question by reading memory address?

Maybe the following help you.
Quote:
Originally Posted by IAmHawtness View Post
You could use AutoIt to make your macro. You can use this code for inspiration:
Code:
[B]#include <NomadMemory.au3>[/B]

While $paused3 = 0
	$pos2 = MouseGetPos()
	$sleep = 350
	$Mem_Answer1 = 0x01E0EFCC ;the memory address for the first answer
	$Mem_Answer2 = 0x01E0F104
	$Mem_Answer3 = 0x01E0F23C
	$Mem_Answer4 = 0x01E0F374
	$Process1 = WinGetProcess("[Conquer2.0]")

	MouseClick ("left", $pos2[0], $pos2[1], 1, 1)
	sleep ($sleep)
	
		$Mem_Open = _MemoryOpen($Process1) 
	$Mem_Read1 = _MemoryRead($Mem_Answer1, $Mem_Open, "char[16]") 
	If $Mem_Read1 = "Of course." Then
	TogglePause()
Else

sleep($sleep)
	MouseClick ("left", 443, 222, 1, 5)
	Sleep($sleep)
	
			$Mem_Read1 = _MemoryRead($Mem_Answer1, $Mem_Open, "char[16]")
			sleep(5)
			$Mem_Read2 = _MemoryRead($Mem_Answer2, $Mem_Open, "char[16]")
			sleep(5)
			$Mem_Read3 = _MemoryRead($Mem_Answer3, $Mem_Open, "char[16]")
			sleep(5)
			$Mem_Read4 = _MemoryRead($Mem_Answer4, $Mem_Open, "char[16]")
			sleep(5)
			
		If $Mem_Read1 = "Level 40" Or $Mem_Read1 = "20" Or $Mem_Read1 = "Boxer" Then
				
			MouseClick ("left", 407, 226, 1, 10)
			
		ElseIf $Mem_Read2 = "Level 40" Or $Mem_Read2 = "20" Or $Mem_Read2 = "Boxer" Then
			
			MouseClick ("left", 667, 223, 1, 10)
			
		ElseIf $Mem_Read3 = "Level 40" Or $Mem_Read3 = "20" Then
			
			MouseClick ("left", 410, 246, 1, 10)
			
		ElseIf $Mem_Read4 = "Level 40" Or $Mem_Read4 = "20" Or $Mem_Read4 = "Boxer" Then
			
			MouseClick ("left", 674, 243, 1, 10)
			
		EndIf
		EndIf
		
sleep($sleep)
MouseClick ("left", 422, 222, 1, 10)
MouseMove ($pos2[0], $pos2[1], 10)
_MemoryClose($Mem_Open)

WEnd
The memory addresses wont work on your client, of course, you'll have to find them yourself, and the MouseClick coordinates probably wont work on your pc either.

What this code does is:
It clicks where your mouse is (you have to place it on the NPC guy in Phoenix Castle yourself), then it clicks on the "Let's go" answer (or whatever it is, I kinda forgot) and then it check the values of the choices you get and clicks the correct one.
01/07/2009 21:24 Evan Lim#110
Alexisppp12345@
u are missing a lot of things
people can be there, guards can be at the background
if plants, can blink or move
but since u insist, lets try something small first

Code:
loop
{
sleep 1000
ImageSearch, FoundX, FoundY, 0 ,0, 1000, 500, *5 C:\image1.bmp
if errorlevel = 0
{
tooltip, image found,1,1
}
else
{
tooltip, image not found,1,1
}
}
when u take the bmp, try to make it as small as possible
like this:
[Only registered and activated users can see links. Click Here To Register...]

if it works, u dont even need 4 IF-function, just do:

Code:
loop
{
sleep 1000
ImageSearch, FoundX, FoundY, 0 ,0, 1000, 500, *5 C:\image1.bmp
if errorlevel = 0
{
click %FoundX%, %FoundY%
break
}
}
msgbox, image found`nscript contines
and about memory address, if autoIT works, then use it
why bother using others
PS* i dont know autoIT
01/08/2009 02:24 VirginHunterS#111
Hi , is it possible to make a toxic fog lvler with AHK ?? Can u make one that works in the background and in resolution 1024 * 768 window mode ?
01/08/2009 04:20 Evan Lim#112
VirginHunterS@
describe how to level toxic fog (location, method)
background mode no problem, just that u send to click jail in few mins if u dont mind
01/08/2009 05:12 ha.ho.a#113
o well evan i want a dual weapon hackfor patch 5065...i know how to make my war use 2 weps with cheatengine...but i wanna know how to make a little program instead of open cheatengine all the time...

like what programs do i need to make interfacce and that stuff...
01/08/2009 05:15 Evan Lim#114
ha.ho.a@
if it can be done by cheatengine, then obviously u can just make a CE trainner
01/08/2009 06:18 ha.ho.a#115
omg...i cant do it...i thought it would be the same as patch 5017...
01/08/2009 16:04 Alexisppp12345#116
Evan,
I tried that you said,but it does no work :(
Thanks anyway and sorry for wasting your time.
01/08/2009 20:00 ha.ho.a#117
alexis i think it can be done in patch 5065...so i specify but i dunno how to now...
01/08/2009 21:53 Zune#118
Can you make an AutoMiner for DC mine that will give me a function that lets me pick what ores i want dropped for the auto ore dropper. I prefer if it could run mini, but if not its ok.

I want it to be simple :). Doesn't have to have auto dc or reconnect. Just drops ores i don't want.
01/10/2009 02:39 VirginHunterS#119
Quote:
Originally Posted by Evan Lim View Post
VirginHunterS@
describe how to level toxic fog (location, method)
background mode no problem, just that u send to click jail in few mins if u dont mind
oh .. but how come autostig can run in background ? But not toxic fog lvler?
01/10/2009 04:57 Evan Lim#120
Zune@
the only way i can think of is image search, so cant be minimized
if its ok for u, please provide a 24-bit BMP screenshot of ores that u dont want (no need crop screenshots, i can do it for u)

VirginHunterS@
if it involve left control click, then it will send u to click jail
thats why i am asking u the location and method u going to use