Code:
;======================================================================|
; resolution 1920x1080 |
;----------------------------------------------------------------------|
;|===Credits to @omagad00 for first posting ControlSend/Click method. |
;|===Credits to @riceking for first posting pixel idea(different type).|
;======================================================================|
AutoItSetOption("MouseCoordMode", 0) ;for use with controlclick
HotKeySet("{HOME}", "Start") ;The hotkey to activate the bot
HotKeySet("{END}", "End") ;This hotkey will stop and exit the bot
;im in the habit of declaring all variables (im a vb programmer its standard for us!)
global $sButton ;start button - 111,937(0x665545)
global $rButton ;replay button - 198, 707(0x504438)
global $chat ;chatbox white part 1470, 834(0xF4F0EC)
global $fButton ;forfeit and return to town button- 18, 107(0x010204)
global $lScreen ;blue on the loading screen so we know when to hit changelevel button - 81,964(0x0D465B )
global $bLord ;part of player name, to know when bloodlord cutscene ended! - 998, 293(0x8D2B32)
global $maxButton ;max+ button for spending AP on skills
global $avatar ;if avatar matches, we got docked! - 1905,1051(LIT ie in town-0x875C38, DARK ie on boat-0x383738)
While 1 ;this loop is ALWAYS running until you press the exit hotkey.
sleep(1) ;this is just waiting for some input (hotkeys to start or stop)
WEnd
Func Start()
ControlSend("Vindictus", "", "", "{NUMPAD0}") ;mob ai / mob idle
While 1 ;The main bot loop once the start hotkey is pressed.
$sButton = 0 ;-----------------------resetting variables each loop----------------------------------
$fButton = 0x010204 ;fButton is the only one we need to reset to it's color. Because it will be using an
$rButton = 0 ;equal to color match rather then not equal like the other checks
$lScreen = 0 ;The other variables need reset to null so they can be updated within the while checks.
$bLord = 0
$chat = 0
$avatar = 0
while $avatar <> 0x383738 ;while the avatar button is not there yet, automatically false on first run every loop to make sure it gets checked when it shows up..
$avatar = PixelGetColor (1905, 1051) ;check the avatar buttons color.
if $avatar = 0x875C38 Then ;if its this color you got docked! if not you are still on boat so this loop will exit.
ControlClick("Vindictus", "", "", "left", 2, 85, 581) ;click leave party.
sleep(1000) ;wait one second to avoid error.
ControlClick("Vindictus", "", "", "left", 2, 933, 603) ;click ok.
sleep(1000) ;wait one second to avoid error.
ControlSend("Vindictus", "", "", "{w down}") ;move to mission board.
sleep(750)
ControlSend("Vindictus", "", "", "{w up}") ;move to mission board.
ControlSend("Vindictus", "", "", "{d down}") ;move to mission board.
sleep(2000)
ControlSend("Vindictus", "", "", "{d up}") ;move to mission board.
ControlClick("Vindictus", "", "", "left", 3, 882, 644) ;click anile.
while PixelGetColor (109, 72) <> 0x778F21 ;waiting to match green part at top of battle screen, when lagging this part can take awhile.
sleep(1) ;decided to do this while loop without a variable to show other methods!
Wend ;once it finds that green it will continue.
ControlClick("Vindictus", "", "", "left", 3, 332, 643) ;click launch.
sleep(1000) ;needs a second wait here to avoid error.
ControlClick("Vindictus", "", "", "left", 40, 816, 514) ;click down arrow on battle screen 40 times just to be sure its enough .
sleep(1000) ;would work this way even if started at scrolled to the top.
ControlClick("Vindictus", "", "", "left", 3, 612, 399) ;click shadowed mission.
sleep(1000) ;waiting a second to avoid any error.
ControlClick("Vindictus", "", "", "left", 10, 405, 318) ;down arrow on oath 10 times to be sure its scrolled enough.
sleep(1000) ;waiting a second to avoid any error.
ControlClick("Vindictus", "", "", "left", 3, 252, 311) ;click macha.
sleep(1000) ;waiting a second to avoid any error.
ControlClick("Vindictus", "", "", "left", 3, 328, 354) ;click hero.
sleep(1000) ;waiting a second to avoid any error.
ControlClick("Vindictus", "", "", "left", 3, 232, 501) ;finally click launch.
ExitLoop ;this is a good example when to use exitloop.
endif ;end of the avatar check statement.
WEnd
While $sButton <> 0x665545 ;while there is no start button run this loop.
$sButton = PixelGetColor (111, 937) ;Keep checking for start button.
WEnd ;if it found start it continues to the next code, if not it keeps looping till it does.
;at this point the start button has been found.
ControlSend("Vindictus", "", "", "v") ;skills :) we don't wanna be stuck at (1000/1000) wasting AP do we?
sleep(1000) ;a small wait to make sure skill screen came up.
$maxButton = PixelGetColor (374, 554) ;check for max+ button.
if $maxButton = 0x2A1812 Then ;if the max+ button is there then.
ControlClick("Vindictus", "", "", "left", 3, 374, 554) ;click max+ button.
Else ;else the max+ button is not there.
ControlClick("Vindictus", "", "", "left", 3, 329, 181) ;click Train Button for a skill. (firebolt for me atm this is where it's located)
sleep(500) ;wait for max+ button
ControlClick("Vindictus", "", "", "left", 3, 374, 554) ;Click max+ button.
endif
ControlClick("Vindictus", "", "", "left", 3, 111, 937) ;Click the Start Button.
ControlSend("Vindictus", "", "", "{Numpad6}") ;timescale3.
While $lScreen <> 0x0D465B ;this loop is waiting for the loading screen (blue bar).
$lScreen = PixelGetColor (81, 964) ;keep checking for loading screen
Wend ;once it finds the loading screen color it exits this loop and continues on.
ControlSend("Vindictus", "", "", "{NUMPADSUB}") ;Changelevel(you can do the changelevel during startup load screen)
While $chat <> 0xF4F0EC ;while no chat visible run this loop
$chat = PixelGetColor (1470, 834) ;keep checking for chatbox to know map is loaded.
Wend ;chatbox is first thing visible when the map first loads!
ControlSend("Vindictus", "", "", "{Numpad6}") ;timescale3.
ControlSend("Vindictus", "", "", "{F7}") ;Transform.
ControlSend("Vindictus", "", "", "{0}") ;Switch to StickyBomb.
ControlSend("Vindictus", "", "", "{w down}") ;Move to cutscene.
Sleep(2000)
ControlSend("Vindictus", "", "", "{w up}")
Sleep(1000) ;wait a second for cutscene to start
While $bLord <> 0xE9E9E9 ;this loop checks for part of the player name to see if the cutscene has ended.
$bLord = PixelGetColor (928, 401) ;keep checking if lord spawned.
Wend ;it loops until it matches the player name color then moves on.
ControlSend("Vindictus", "", "", "f") ;Pull StickyBomb out.
Sleep(300)
ControlSend("Vindictus", "", "", "e") ;Throw StickyBomb.
Sleep(5000) ;wait for sticky to explode before moving on to the killing part.
ControlSend("Vindictus", "", "", "{7}") ;Switch to HandBomb.
While $fButton = 0x010204 ;when forfeit button vanishes it means it's doing the screenshots after boss kill. So that's when this loop exits.
ControlSend("Vindictus", "", "", "f") ;Pull Handbomb out.
Sleep(300)
ControlSend("Vindictus", "", "", "e") ;Throw Handbomb.
Sleep(2000) ;wait for bomb explosion
$fButton = PixelGetColor (18, 107) ;check if in screenshots part yet.
Wend ;this keeps looping until it knows it's doing screenshots then continues on.
while $rButton <> 0x504438 ;This is the loop to check for the replay button.
$rButton = PixelGetColor (198, 707) ;keep checking for replay button.
Wend ;Will loop until the replay buttton shows up, then continues on.
ControlClick("Vindictus", "", "", "left", 3, 198, 707) ;Press Replay
WEnd ;end of the main loop.Will keep looping till exit button(end) is pressed.
EndFunc ;end of the main function.
Func End() ;This is the function to deactivate script and exit application.
Exit ;end key pressed, exit application.
EndFunc
Code:
ControlSend("Vindictus", "", "", "v") ;skills :) we don't wanna be stuck at (1000/1000) wasting AP do we?
sleep(1000) ;a small wait to make sure skill screen came up.
$maxButton = PixelGetColor (374, 554) ;check for max+ button.
if $maxButton = 0x2A1812 Then ;if the max+ button is there then.
ControlClick("Vindictus", "", "", "left", 3, 374, 554) ;click max+ button.
Else ;else the max+ button is not there.
While PixelGetColor (60, 170) <> 0x252E91 ;waiting to match color of blind arrow ICON(on left) at specific spot.
ControlClick("Vindictus", "", "", "left", 1, 387, 402) ;clicking the down arrow to scroll through skills.
WEnd
ControlClick("Vindictus", "", "", "left", 3, 326, 180) ;click Train Button for blind arrow.
sleep(500) ;wait for max+ button
ControlClick("Vindictus", "", "", "left", 3, 374, 554) ;Click max+ button.
endif