Oh i see, my bad x:
Basically the $pixatk1 = PixelGetColor (707, 13) in the while loop acts as a "trigger" which switches the while loop on and off if i understand it correctly.
Yeah i already bumped on a problem with my new code. It was working for a few time then it just stopped looping the attack.. like you said it works but not like it should.
When it comes to looping and putting more options in 1 code im a total newb. I usually try out different codes if its not working then i look on the webz if i can find a solution and most of the times there is more than 1 way of solving things.
Thanks for clearing things up for me.. gonna try it out and let you know if it works
Edit: Its not looping the attack if it fails to kill the boss with the first try. I did set the last sleep time to 10000 because it takes ~10 seconds for my hp bar do disappear
Code:
$pixatk1 = PixelGetColor (707, 13)
while $pixatk1 = 0x08B3AD
Send("f") ;get out bomb
Sleep(1200)
Send("E") ;throw bomb
Sleep(10000)
$pixatk1 = PixelGetColor (707, 13) ;check for hp bar still here after bomb explode.. if it is the loop continues, if not it goes on to next part of code.
Wend
Gonna go ahead and post my whole script so that you have a better view of whats going on.. hopefully it'll help
Code:
Opt("WinWaitDelay",100)
Opt("WinDetectHiddenText",1)
Opt("MouseCoordMode",0)
Global $boatbot
HotKeySet("{HOME}", "start")
HotKeySet("{END}", "stop")
While 1
sleep ( 1 )
WEnd
; -------- Functions -------------------
Func start()
$boatbot = Not $boatbot
While $boatbot
_WinWaitActivate("Vindictus","")
WinSetState("Vindictus", "", @SW_MAXIMIZE )
sleep(500)
; Clicks START to launch mission
Do
$pixstart = PixelGetColor(52, 928)
if $pixstart = 0x941716 Then
ExitLoop
EndIf
sleep(1000)
Until $pixstart = 0x941716
MouseClick("left",103,942,1) ; Clicks START to launch mission
sleep(500)
; Makes game 3x faster // host_timescale 3
Send("{NUMPAD6}")
; Loading Screen // Boat -> 1st Level
Do
$pixlvlskip1 = PixelGetColor (25, 887)
if $pixlvlskip1 = 0xA8B8E9 Then
ExitLoop
EndIf
sleep(1000)
Until $pixlvlskip1 = 0xA8B8E9
; Change Level
Send("{NUMPADSUB}")
; Loading Screen // 1st Level -> Boss
Do
$pixaction1 = PixelGetColor (744, 15)
if $pixaction1 = 0xAF0503 Then
ExitLoop
EndIf
sleep(1000)
Until $pixaction1 = 0xAF0503
; Set Subweapon to 999 Sticky Bombs
Send("{0}")
; Makes game 3x faster // host_timescale 3
Send("{NUMPAD6}")
; Transform to Dark Knight / Paladin
send("{F6}") ; F6 = DK // F7 = Pala
sleep(500)
; Move forward for 5 seconds to trigger cutscene
Send("{w down}")
Sleep(5000)
Send("{w up}")
; Freeze Mobs // ai_reaction_delay_idle 99999 / ai_reaction_delay_alert 99999
send("{NUMPAD0}")
; Boss Cutscene
Sleep(4500) ; Default 4500 // 4500-5000
; Get out Sticky Bomb
Send("f")
Sleep(300)
; Throw Sticky Bomb
Send("E")
; Wait Time till next Action
Sleep(1000) ; default 1000 // 500-1500
; Set Subweapon to 999 Fine Bomb
Send("{7}")
Sleep(500)
; Attack every 10 seconds until Dead
$pixatk1 = PixelGetColor (707, 13)
while $pixatk1 = 0x08B3AD
Send("f") ;get out bomb
Sleep(1200)
Send("E") ;throw bomb
Sleep(10000)
$pixatk1 = PixelGetColor (707, 13) ;check for hp bar still here after bomb explode.. if it is the loop continues, if not it goes on to next part of code.
Wend
; Time until Mission Successful Menu shows up
Do
$pixreplay = PixelGetColor (175, 710)
if $pixreplay = 0x90775E Then
ExitLoop
EndIf
sleep(1000)
Until $pixreplay = 0x90775E
MouseClick("left",198,709,1)
WEnd
EndFunc
Func _WinWaitActivate($title,$text,$timeout=0)
WinWait($title,$text,$timeout)
If Not WinActive($title,$text) Then WinActivate($title,$text)
WinWaitActive($title,$text,$timeout)
EndFunc
Func stop()
Exit
EndFunc ;==>stop
edit 2: hmm i have no idea whats going on but now all of the sudden it works.. i guess i have too many different files and accidentally started the wrong one ._. meh guess i should go to bed its already late