|
You last visited: Today at 11:41
Advertisement
some help with autoit please
Discussion on some help with autoit please within the 9Dragons forum part of the MMORPGs category.
02/17/2010, 14:24
|
#1
|
elite*gold: 0
Join Date: Dec 2008
Posts: 367
Received Thanks: 124
|
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
|
|
|
02/17/2010, 15:45
|
#2
|
elite*gold: 20
Join Date: Sep 2007
Posts: 1,406
Received Thanks: 2,091
|
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
|
|
|
02/18/2010, 00:43
|
#3
|
elite*gold: 0
Join Date: Dec 2008
Posts: 367
Received Thanks: 124
|
_______________=)
Quote:
Originally Posted by saweet
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?
|
|
|
02/19/2010, 14:13
|
#4
|
elite*gold: 0
Join Date: Dec 2008
Posts: 367
Received Thanks: 124
|
___________________=)
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
|
|
|
All times are GMT +1. The time now is 11:41.
|
|