Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > 9Dragons
You last visited: Today at 14:08

  • Please register to post and access all features, it's quick, easy and FREE!

 

some help with autoit please

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2008
Posts: 354
Received Thanks: 116
Lightbulb some help with autoit please

I need help i no understan how works pixel search
how i can get correct coordinates ?

; Find a pure red pixel or a red pixel within 10 shades variations of pure red
$coord = PixelSearch( 0, 0, 20, 300, 0xFF0000, 10 )
If Not @error Then
MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1])
EndIf

PixelSearch ( left, top, right, bottom, color [, shade-variation [, step [, hwnd]]] )

i make this script but i need some help i read about autoit and make this in 30 min lol
but im not programer or something xD

Break(0);OPCION DE APAGAR SCRIPT DESDE SYSTEM TRAY
GUICtrlCreateLabel("9D window must be Active", 100, 30,200)
WinWaitActive("[CLASS:X3DKernel]", "");SE ACTIVA EL SCRIPT SOLO SI ESTA ACTIVA UNA VENTANA DE ESA CLASE
while 1
WinWaitActive("[CLASS:X3DKernel]", "")
MouseClick("left",837,555,3,5)
WinWaitActive("[CLASS:X3DKernel]", "")
MouseClick("left",942,620,3,10)
WinWaitActive("[CLASS:X3DKernel]", "")
MouseClick("left",803,610,3,5)
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{6}")
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{7}")
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{7}")
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{7}")
WinWaitActive("[CLASS:X3DKernel]", "")
Sleep(1000)
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{7}")
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{7}")
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{7}")
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{7}")
WinWaitActive("[CLASS:X3DKernel]", "")
sleep(1000)
;--------------------------------------sin heal
WinWaitActive("[CLASS:X3DKernel]", "")
MouseClick("left",837,555,3,5)
WinWaitActive("[CLASS:X3DKernel]", "")
MouseClick("left",942,620,3,10)
WinWaitActive("[CLASS:X3DKernel]", "")
MouseClick("left",803,610,3,5)
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{6}")
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{7}")
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{7}")
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{7}")
WinWaitActive("[CLASS:X3DKernel]", "")
Sleep(1000)
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{7}")
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{7}")
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{7}")
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{7}")
WinWaitActive("[CLASS:X3DKernel]", "")
sleep(1000)
Send("{SPACE 10}");LEVANTAR DROP X4 VECES
;--------------------------------------sin heal
WinWaitActive("[CLASS:X3DKernel]", "")
MouseClick("left",837,555,3,5)
WinWaitActive("[CLASS:X3DKernel]", "")
MouseClick("left",942,620,3,10)
WinWaitActive("[CLASS:X3DKernel]", "")
MouseClick("left",803,610,3,5)
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{6}")
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{7}")
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{8}")
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{9}")
WinWaitActive("[CLASS:X3DKernel]", "")
Sleep(1000)
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{7}")
WinWaitActive("[CLASS:X3DKernel]", "")
SLEEP(700)
Send ("{7}")
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{8}")
SLEEP(700)
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{9}")
WinWaitActive("[CLASS:X3DKernel]", "")
sleep(1000)
WinWaitActive("[CLASS:X3DKernel]", "")
Send("{SPACE 10}");LEVANTAR DROP X4 VECES
;--------------------------------------sin heal
WinWaitActive("[CLASS:X3DKernel]", "")
MouseClick("left",837,555,3,5)
WinWaitActive("[CLASS:X3DKernel]", "")
MouseClick("left",942,620,3,10)
WinWaitActive("[CLASS:X3DKernel]", "")
MouseClick("left",803,610,3,5)
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{6}")
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{7}")
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{7}")
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{7}")
WinWaitActive("[CLASS:X3DKernel]", "")
Sleep(1000)
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{7}")
WinWaitActive("[CLASS:X3DKernel]", "")
sleep(1000)
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{u}")
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{0}")
WinWaitActive("[CLASS:X3DKernel]", "")
MouseClick("left",837,555,3,5)
WinWaitActive("[CLASS:X3DKernel]", "")
MouseClick("left",942,620,3,10)
WinWaitActive("[CLASS:X3DKernel]", "")
MouseClick("left",803,610,3,5)
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{6}")
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{7}")
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{7}")
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{7}")
WinWaitActive("[CLASS:X3DKernel]", "")
Sleep(1000)
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{7}")
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{7}")
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{7}")
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{7}")
WinWaitActive("[CLASS:X3DKernel]", "")
sleep(1000)
Send("{SPACE 10}");LEVANTAR DROP X4 VECES
;--------------------------------------sin heal
WinWaitActive("[CLASS:X3DKernel]", "")
MouseClick("left",837,555,3,5)
WinWaitActive("[CLASS:X3DKernel]", "")
MouseClick("left",942,620,3,10)
WinWaitActive("[CLASS:X3DKernel]", "")
MouseClick("left",803,610,3,5)
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{6}")
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{7}")
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{7}")
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{7}")
WinWaitActive("[CLASS:X3DKernel]", "")
Sleep(1000)
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{7}")
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{7}")
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{7}")
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{u}")
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{0}")
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{u}")
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{1}")
Sleep(500)
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{2}")
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{3}")
sleep(500)
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{4}")
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{5}")
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{u}")
WinWaitActive("[CLASS:X3DKernel]", "")
Send ("{0}")
WinWaitActive("[CLASS:X3DKernel]", "")
wend
sleep(100)
while 1
sleep(1000)
WEnd



sheik_gray is offline  
Old   #2
 
elite*gold: 20
Join Date: Sep 2007
Posts: 1,399
Received Thanks: 2,014
Here's a sample I use to use for 9DVN

Code:
#include <GUIConstants.au3>
#include <Misc.au3>

Global Const $WS_EX_TOPMOST = 8

Opt("MouseCoordMode", 0)
Opt("GUICoordMode",2)

; X3DKernel
HotKeySet( "{ESC}", "_EXIT")
HotKeySet( "{F11}", "_START")
HotKeySet( "^{F11}", "_PAUSE")
HotKeySet( "{F10}", "_SETUPVE")

Dim $pos, $color
Dim $pause = 0
Dim $meditating = 0
Dim $hack_running = 0
Dim $hwnd, $lblLeft, $lblRight
Dim $checksum
Dim $game_title = "Cuu Long Tranh Ba"
Dim $game_hwnd = WinGetHandle($game_title)

Dim $hack_title = "Game Utility for 9Dragons"
Dim $hack_hwnd = WinGetHandle($hack_title)

Dim $hDll, $vDC, $vRegion

Func _SETUPVE()
	WinActivate($game_title)
	$pos = MouseGetPos()
	$color = Hex(PixelGetColor($pos[0], $pos[1], $game_hwnd), 6)
	_WriteStatus("Setting up VE... x=" & $pos[0] & " y=" & $pos[1] & " color=" & $color)
EndFunc

Func _EXIT()
    Exit 0
EndFunc

Func _PAUSE()	
	$pause = 1 - $pause

	if $pause Then
        GUICtrlSetColor($lblRight, 0xFF0000)
		_WriteStatus("Paused.")
    Else
        GUICtrlSetColor($lblRight, 0xFFFFFF)
		_WriteStatus("Unpaused.")
    EndIf
EndFunc

Func _START()
	GUICtrlSetColor($lblRight, 0xFFFFFF)
	While 1
		if $pause = 0 Then
			PixelSearch($pos[0], $pos[1], $pos[0]+5, $pos[1]+5, 0x00009c, 10, 1, $game_hwnd)
			If Not @error Then
				If $hack_running = 0 Then
					_ToggleHack()
				EndIf
			Else
				_WriteStatus("Out of Vital Energy")
				If $meditating = 0 Then
					; we need to stop the hack and meditate
					If $hack_running = 1 Then
						_ToggleHack()
					EndIf
					_Meditate()
				EndIf
			EndIf
			
			Sleep(3000)
		EndIf
    WEnd
EndFunc

Func _Meditate()
	ControlSend($game_hwnd, "", "", "p") ; window doesnt need to be active
	$meditating = 1 - $meditating
	_WriteStatus("Meditating...")
EndFunc

Func _ToggleHack()
	ControlFocus($hack_title, "", "")
	$hack_running = 1 - $hack_running
	If $hack_running Then
		_WriteStatus("Enabling hack...")
	Else
		_WriteStatus("Disabling hack...")
	EndIf
EndFunc

Func _WriteStatus($msg)
	ConsoleWrite($msg & @CRLF)
EndFunc

Func _MAIN()
    $hwnd = GUICreate("9Dragons Skill Trainer", 250, 30, 750, 15, -1, $WS_EX_TOPMOST)
    $lblLeft = GUICtrlCreateLabel("test", 10, 10, 200)
    $lblRight = GUICtrlCreateLabel("wait", 0, -1, 50)
    GUISetState()
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
EndFunc

_MAIN()
I doubt it works anymore but here is how you use it. You'd press F10 to setup VE, where you put your mouse cursor over the VE bar in a spot where you wanted it to meditate once it reaches it. The script will get call MouseGetPos() to get the current mouse coordinates, then call PixelGetColor so it knows what color to look for (blue).

PixelSearch works off of a rectangle, in this case:

$pos[0] = X coordinate
$pos[1] = Y coordinate
$pos[0]+5 = Width
$pos[1]+5 = Height

In this case, 5 is just a magic number I pulled out of my ass.

Edit: It looks like I left $color in there but it is not used. If you want to use it, just replace 0x00009c with $color


saweet is offline  
Thanks
1 User
Old   #3
 
elite*gold: 0
Join Date: Dec 2008
Posts: 354
Received Thanks: 116
_______________=)

Quote:
Originally Posted by saweet View Post
Here's a sample I use to use for 9DVN

Code:
#include <GUIConstants.au3>
#include <Misc.au3>

Global Const $WS_EX_TOPMOST = 8

Opt("MouseCoordMode", 0)
Opt("GUICoordMode",2)

; X3DKernel
HotKeySet( "{ESC}", "_EXIT")
HotKeySet( "{F11}", "_START")
HotKeySet( "^{F11}", "_PAUSE")
HotKeySet( "{F10}", "_SETUPVE")

Dim $pos, $color
Dim $pause = 0
Dim $meditating = 0
Dim $hack_running = 0
Dim $hwnd, $lblLeft, $lblRight
Dim $checksum
Dim $game_title = "Cuu Long Tranh Ba"
Dim $game_hwnd = WinGetHandle($game_title)

Dim $hack_title = "Game Utility for 9Dragons"
Dim $hack_hwnd = WinGetHandle($hack_title)

Dim $hDll, $vDC, $vRegion

Func _SETUPVE()
	WinActivate($game_title)
	$pos = MouseGetPos()
	$color = Hex(PixelGetColor($pos[0], $pos[1], $game_hwnd), 6)
	_WriteStatus("Setting up VE... x=" & $pos[0] & " y=" & $pos[1] & " color=" & $color)
EndFunc

Func _EXIT()
    Exit 0
EndFunc

Func _PAUSE()	
	$pause = 1 - $pause

	if $pause Then
        GUICtrlSetColor($lblRight, 0xFF0000)
		_WriteStatus("Paused.")
    Else
        GUICtrlSetColor($lblRight, 0xFFFFFF)
		_WriteStatus("Unpaused.")
    EndIf
EndFunc

Func _START()
	GUICtrlSetColor($lblRight, 0xFFFFFF)
	While 1
		if $pause = 0 Then
			PixelSearch($pos[0], $pos[1], $pos[0]+5, $pos[1]+5, 0x00009c, 10, 1, $game_hwnd)
			If Not @error Then
				If $hack_running = 0 Then
					_ToggleHack()
				EndIf
			Else
				_WriteStatus("Out of Vital Energy")
				If $meditating = 0 Then
					; we need to stop the hack and meditate
					If $hack_running = 1 Then
						_ToggleHack()
					EndIf
					_Meditate()
				EndIf
			EndIf
			
			Sleep(3000)
		EndIf
    WEnd
EndFunc

Func _Meditate()
	ControlSend($game_hwnd, "", "", "p") ; window doesnt need to be active
	$meditating = 1 - $meditating
	_WriteStatus("Meditating...")
EndFunc

Func _ToggleHack()
	ControlFocus($hack_title, "", "")
	$hack_running = 1 - $hack_running
	If $hack_running Then
		_WriteStatus("Enabling hack...")
	Else
		_WriteStatus("Disabling hack...")
	EndIf
EndFunc

Func _WriteStatus($msg)
	ConsoleWrite($msg & @CRLF)
EndFunc

Func _MAIN()
    $hwnd = GUICreate("9Dragons Skill Trainer", 250, 30, 750, 15, -1, $WS_EX_TOPMOST)
    $lblLeft = GUICtrlCreateLabel("test", 10, 10, 200)
    $lblRight = GUICtrlCreateLabel("wait", 0, -1, 50)
    GUISetState()
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
EndFunc

_MAIN()
I doubt it works anymore but here is how you use it. You'd press F10 to setup VE, where you put your mouse cursor over the VE bar in a spot where you wanted it to meditate once it reaches it. The script will get call MouseGetPos() to get the current mouse coordinates, then call PixelGetColor so it knows what color to look for (blue).

PixelSearch works off of a rectangle, in this case:

$pos[0] = X coordinate
$pos[1] = Y coordinate
$pos[0]+5 = Width
$pos[1]+5 = Height

In this case, 5 is just a magic number I pulled out of my ass.

Edit: It looks like I left $color in there but it is not used. If you want to use it, just replace 0x00009c with $color
you know some code for put a packet sender with autoit ?(autochecksum)
thanks xD

my idea is make a auto-grinder for 9d for hyb healer or warrior
you have some idea for make hack detect mobs near of my char and kill?
sheik_gray is offline  
Old   #4
 
elite*gold: 0
Join Date: Dec 2008
Posts: 354
Received Thanks: 116
Lightbulb ___________________=)

my dude is :

how to put auto medit code in my script cause all code you use is confused for me lol
you use to many variablesxD

please explain how work the line for i know how to modify
(mousegetpos pixelsearh)

and if is possible make my script detect mob and kill

thanks

srry im too noob but try learn xD
sheik_gray is offline  
Reply



« Previous Thread | Next Thread »



All times are GMT +1. The time now is 14:08.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2017 elitepvpers All Rights Reserved.