hi, problem with script need help !! [AutoIt]

08/26/2015 16:44 mahmoudshepl#1
hi, this is a script i got from coder i try to make it work on my game i changed values
Global $Paused
HotKeySet("{Home}", "TogPause")
HotKeySet("{END}", "TogExit")
WinWaitActive("CABAL2 - DX9")
WinMove("CABAL2 - DX9","",0,0)
$r=0

Do
auto_attack()
find_monster()
Until $r=1

While 1
Sleep(100)
WEnd
Func TogPause()
$Paused = Not $Paused
While $Paused
Sleep(100)
ToolTip('Script is "Paused"', 0, 0)
WEnd
ToolTip("")
EndFunc

Func TogExit()
Exit 0
EndFunc

Func auto_attack()
If PixelGetColor(999, 482) == 0xFFA800 Then ;Mob Attack HP full/Dying Mob
Do
Send("{1 down}")
Sleep(100)
Send("{1 up}")
Sleep(100)
Send("{1 down}")
Sleep(100)
Send("{1 up}")
Sleep(100)
Send("{3 down}")
Sleep(100)
Send("{3 up}")
Sleep(100)
Until PixelGetColor(999, 482) <> 0x700E03 ;Mob Attack HP Down
EndIf
EndFunc

Func find_monster()
If PixelGetColor(999, 482) <> 0x700E03 Then ;TAB No More Mob/Hp Down
Do
Send("{TAB down}")
Sleep(100)
Send("{TAB up}")
Sleep(100)
Until PixelGetColor(999, 482) == 0xFFA800 ;Change this for Specific Mob
EndIf ;TAB
EndFunc

it just spam tab and never attacks
08/26/2015 19:46 mlukac89#2
U need to change coordinates, this script cant find that color on that coordinates so it keep sending tab. U need to use Au3Info.exe in autoit folder to find coordinates that suit u and change this coordinates and color in scipt then it will work.
08/26/2015 23:16 mahmoudshepl#3
Quote:
Originally Posted by mlukac89 View Post
U need to change coordinates, this script cant find that color on that coordinates so it keep sending tab. U need to use Au3Info.exe in autoit folder to find coordinates that suit u and change this coordinates and color in scipt then it will work.

it worked i made on new coord with new resolutions, thanks for replay
08/27/2015 00:00 mlukac89#4
No problem :)
08/28/2015 20:27 mahmoudshepl#5
hi again bro
i failed allot of times to move in game or walk
i just need it to walk in game :(

here is code

Global $Paused
HotKeySet("{Home}", "TogPause")
HotKeySet("{END}", "TogExit")
WinWaitActive("CABAL2 - DX9")
WinMove("CABAL2 - DX9","",0,0)
$r=0

Do
auto_attack()
find_monster()
Until $r=1

While 1
Sleep(100)
WEnd
Func TogPause()
$Paused = Not $Paused
While $Paused
Sleep(100)
ToolTip('Script is "Paused"', 0, 0)
WEnd
ToolTip("")
EndFunc

Func TogExit()
Exit 0
EndFunc

Func auto_attack()
If PixelGetColor(504, 10) == 0xFFA800 Then ;Mob Attack HP full/Dying Mob
Do
Send("{1 down}")
Sleep(150)
Send("{1 up}")
Sleep(150)
Send("{1 down}")
Sleep(150)
Send("{1 up}")
Sleep(150)
Send("{1 down}")
Sleep(150)
Send("{1 up}")
Sleep(150)
Send("{1 up}")
Sleep(150)
Send ("{F}")
Sleep(150)
Until PixelGetColor(504, 10) <> 0xFFA800 ;Mob Attack HP Down
EndIf
EndFunc
Sleep (400)

Func find_monster()
If PixelGetColor(04, 10)<> 0xFFA800 Then ;TAB No More Mob/Hp Down

Do
Send("{TAB down}")
Sleep(100)
Send("{TAB up}")
Sleep(100)
Until PixelGetColor(504, 10) == 0xFFA800 ;Change this for Specific Mob
EndIf ;TAB
EndFunc
Sleep(300)
_Degree(_ATan2($targetY - $currentY, $targetX - $currentX)
Func _rotateLeft($ntimes)
AutoItSetOption("SendKeyDownDelay", $ntimes * 21)
Send("a")
EndFunc ;==>_rotateLeft
Sleep (300)

Func _rotateRight($ntimes)
AutoItSetOption("SendKeyDownDelay", $ntimes * 21)
Send("d")
EndFunc ;==>_rotateRight

Sleep(300)
09/20/2015 07:41 mahmoud_20000#6
mahmoudshepl
u will cant do that by autoit
u need to bypass xtrap first then used autohotkey
or
hook dirctx 9 then used autoit good luck bro