hello I showed exico some of these revisions, we were originally going to incorporate all of it into an update, but I stopped working on it for public use when he didn't have time to update the bot.
So I was given the go ahead to release the source code, and here it is.
Uh.. sorry it's not going to be user-friendly to make this thing work, but this code is fully intended only for people who want to modify/learn/work/ or create their own maps, features or whatever. Feel free to use it anyway fit.
List of Differences from the original:
-Elimination of level timers, no need for wait delays or whatever, will automatically speed through any cutscenes, boat intro before or after a level change provided host_timescale functions are binded. WHich are currently set to HOME and END. This can be easily changed in the global declarations file.
-Counter function eliminated, the number for counters will only count for the initial attack, and will hit the replay button immediately afterwards when the battle screen shows, no need to specify time.
-Forfeit and replay features added, will be able to forfeit and replay mission if it fails at a specified limit. WIll replay when lagged out of server. Replay feature works, w/o needing to bind cc_ship_list UI.
-Automatically un-equip any items, armor and weapons you wear before starting mission.
-Will Automatically equip Armor and weapons when bot spawns on colhen/rocheste docks, or near rocheste dormitory due to server lag kick out to docks, or mission fofeit and replay. I did this So that people won't realize that it's a bot that's running and decide to videotape you and report you.
*the original bot I was caught naked spearing near the docks for 23 minutes, it was embarrasing because someone by the name of lorano said: "water, your bot fked up. lol"
The good news is i've made it so that this will never happen ever again. The bot will do nothing in worst case scenario.
-There is a relogin feature and replay afterwards in case of Server disconnect, but will only work at my resolution as I haven't added transform function to detect intro screen for different resolutions. Also it only works for rocheste.
-modular code, all the functions are encapsulated and can be called upon easily when you want to make your own map script. Everything you need to konw is provided in sample maps, which you extrapolate to modify existing maps or create new ones easily and efficiently without having to write alot of code.
-intermission timer function, kind of optional sort of useless, you can specify number of runs till you wait on the boat before starting mission. Boat return timer variable is used to specify wait time.
-compatible with existing codebase, these are only added functions, original maps will use orignal functions.
Notes:
-Some variables from original config file are used, such as start button, mousemove, randomtimewait (which will still work as it is supposed to). So it's still a good idea to get those values accurate in the Config tool. Other than that all timers are eliminated.
-Revisions are based heavily on pixel detection, if it's not working for somereason change to a different video screen mode, windowed/full if that doesn't work you are SOL anyway.
How to install and use:
1.) Run Updater on Exico's bot to download the latest version of the original bot.
2.) Save everything here, put corefile.au3 in the original directory, all map files into /bot directory and everything else into /functions directory. ONly core.au3 and screendetect.au3 and map files replace existing files.
saves as globalvariabledeclare.au3
Code:
;;;; Global Variable Declaration. This group of variables is ideal to use in U.I for user modification.
Global $Speedup = "{HOME}" ; bind Home (or whatever you modify) with host-timescale function to speed thru cutscenes
Global $Slowdown = "{END}" ; host-time scale function to return to 1x game time
Global $intermissioncount = 10 ; number of dungeon runs before bot takes a specified time break on boat. default value set to 10 this is done to breakup
; consecutive runs and evade bot detection. Uses boatreplaytime
GLobal $Missiontimelimit = (60 * 1000) * 10 ;default values set at 10 minutes for maximum time in dungeon before replay. set to 1minute to test
Global $timedocklimit = 5 ;amount of seconds spent on dock before map replay.
Global $shiplistbind = 0 ;button to activate shiplist ui, not really needed but there if you want to implement it.
Global $transmouseinterval = 5 ;number of spear interations until use of transform function and mouse move in retaliation function
;Suggest change values for invetory chest between 1- 3, row between 1-8
GLobal $inventorychest = 3 ;bot will open this inventory chest when re-equipping items
Global $inventorychestrow = 8 ;bot will re-equip 6 items in row of whatever specified inventory chest.
GLobal $Modeselectionx = 0 ;mode-selection for replay.
Global $Modeselectiony = 0
Global $characterid = 1 ;which character for relogin, select 1 thru 4 or whatever. Default set to 1st character
Global $replayboat = 0 ;how manytimes character used map selection screen to re-enterboat.
;good idea not to not modify, for exclusive use in dependent functions.
Global $Nekkid
Global $forfeitfailure
GLobal $Missiontimer = 0
GLobal $Dungeontimer = 0
Global $Transformtimer = 6
Global $Mousemovetimer = 0
; Variables that you need to declare and map to in individual custom bot script.
; Otherwise replay feature won't work, setting map location value to zero
; flags no location otherwise.
;379, 454 that is for fomorian base
GLobal $Maplocationx = 0
Global $Maplocationy = 0
Global $Mwdownmapselect = 0 ;values for map replay feature.
GLobal $Mapselectcoordx = 0
Global $Mapselectcoordy = 0
Global $uiMwdownmapselect = 0 ;values you use if you are using shiplist bind. will automatically detect and use
Global $uiMapselectcoordx = 0 ;different set of values. If otherwise.
Global $uiMapselectcoordy = 0
;Declaring values
;Values for Mode selection switch.
Global $Heromode[3]
$Heromode[1] = 327
$Heromode[2] = 369
Global $Hardmode[3]
$Hardmode[1] = 238
$Hardmode[2] = 368
;values for Map locations
Global $Fomorianbase[3]
$Fomorianbase[1] = 379
$Fomorianbase[2] = 454
Global $Sewers[3] ;825, 494
$Sewers[1] = 825
$Sewers[2] = 494
Global $Ortelcastle[3] ;427, 669
$Ortelcastle[1] = 427
$Ortelcastle[2] = 669
Global $Catacombs[3] ;747, 577
$Catacombs[1] = 747
$Catacombs[2] = 577
;colhen
;848, 415
Global $Perilousruins[3]
$Perilousruins[1] = 848
$Perilousruins[2] = 415
Global $Hoarfrosthollow[3]
$Hoarfrosthollow[1] = 851
$Hoarfrosthollow[2] = 311
GLobal $Ainle[3]
$Ainle[1] = 641
$Ainle[2] = 558
Global $Prairieentrance[3]
$Prairieentrance[1] = 590
$Prairieentrance[2] = 461
Global $Ruinsofsanctity[3]
$Ruinsofsanctity[1] = 719
$Ruinsofsanctity[2] = 406
Global $Hoarfrostdepths[3]
$Hoarfrostdepths[1] = 694
$Hoarfrostdepths[2] = 297
Global $Hilderforestruins[3]
$Hilderforestruins[1] = 536
$Hilderforestruins[2] = 605
save as addedscriptfunctions.au3
Code:
;;This section here are two mainfunctions used in script file. Everything starts with and ends with start and replay function, and rest of functions are dependent on them.
func startrochestemap()
;Global variable assignment, and initialization of timers
$nekkid = 1
$Dungeontimer = Timerdiff($Missiontimer) + $Dungeontimer
$Missiontimer = TimerInit()
;flags
$spawnedelsewhere = 0
;local variable declaration.
local $dockcheckcounter = 0
$timeondocks = 0
;looknormal()
while PixelCheckStart() = 0
if disconnect() Then
if not $shiplistbind Then
sleep(3000)
relogin()
academy2map()
;Stall if you don't reach map for now until relogin feature implemented
while not rochestemapscreendetect()
sleep(1000)
WEnd
mapselection() ;choose map will run thru the rest of the function and should restart the boat.
$spawnedelsewhere = 1
sleep(2000)
Else
sleep(3000)
relogin()
academy2map()
send($shiplistbind)
uimapselect()
sleep(2000)
EndIf
EndIf
if rochesteacademyspawn() and $dockcheckcounter > 60 and $spawnedelsewhere = 0 then
looknormal()
academy2map()
while not rochestemapscreendetect()
sleep(1000)
WEnd
mapselection() ;choose map will run thru the rest of the function and should restart the boat.
$spawnedelsewhere = 1
sleep(2000)
EndIf
if rochesteDockCheck() and $dockcheckcounter > 60 and $spawnedelsewhere = 0 then
;MsgBox(0, "Done!", "ondocks")
if $nekkid = 1 then
Send("{ALT DOWN}")
MouseClick ( "left" , (@DesktopWidth/2), (64+(@DesktopHeight/2)) , 2 , 10 )
Send("{ALT UP}")
looknormal()
EndIf
If $timeondocks = $timedocklimit then
walktomaprocheste()
mapselection()
EndIf
$timeondocks = $timeondocks + 1
EndIf
sleep(1000)
$dockcheckcounter = $dockcheckcounter + 1
WEnd
;boat start screen detected, unequip items if any are found.
if $nekkid = 0 or $runcounter <= 1 then looksuspicious()
Send("{ALT DOWN}")
MouseClick ( "left" , $StartXpos, $StartYpos , 2 , 20 )
Send("{ALT UP}")
EndFunc
func startcolhenmap()
;Global variable assignment, and initialization of timers
$nekkid = 1
$Dungeontimer = Timerdiff($Missiontimer) + $Dungeontimer
$Missiontimer = TimerInit()
;local variable declaration.
local $dockcheckcounter = 0
local $timeondocks = 0
;looknormal()
while PixelCheckStart() = 0
if disconnect() Then
sleep(3000)
relogin()
;Stall if you don't reach map for now until relogin feature implemented
while not colhenmapscreendetect()
sleep(1000)
WEnd
mapselection() ;choose map will run thru the rest of the function and should restart the boat.
sleep(2000)
EndIf
if colhenDockCheck() and $dockcheckcounter > 10 then
;MsgBox(0, "Done!", "ondocks")
if $nekkid = 1 then
Send("{ALT DOWN}")
MouseClick ( "left" , (@DesktopWidth/2), (64+(@DesktopHeight/2)) , 2 , 10 )
Send("{ALT UP}")
looknormal()
EndIf
If $timeondocks = $timedocklimit then
walktomapcolhen()
mapselection()
EndIf
$timeondocks = $timeondocks + 1
EndIf
sleep(1000)
$dockcheckcounter = $dockcheckcounter + 1
WEnd
;boat start screen detected, unequip items if any are found.
if $nekkid = 0 or $runcounter <= 1 then looksuspicious()
Send("{ALT DOWN}")
MouseClick ( "left" , $StartXpos, $StartYpos , 2 , 20 )
Send("{ALT UP}")
EndFunc
func battlereplay()
local $checkminimap
local $checkcenter
local $timer
local $forfeittimelimit = 0
local $forfeittimer = TimerInit()
;local $forfeitflag = 0
$forfeitfailure = 0
while PixelCheckEndBattlev2() = 0
;check for Disconenct
if disconnect() Then
relogin()
return
EndIf
$checkcenter = PixelChecksum(translatex(650), translatey(750), translatex(750), translatey(850))
sLeep(50)
if $checkcenter = PixelChecksum(translatex(650), translatey(750), translatex(750), translatey(850)) Then
sleep(50)
Else
retaliation()
EndIf
if timerdiff($missiontimer) > $missiontimelimit and $forfeitfailure = 0 then ;if mission time limit succeded forfeit.
if forfeit() then
return
Else
;add 60 seconds to next retry
$forfeittimelimit = (60 * 1000) + timerdiff($forfeittimer)
EndIf
EndIf
;attempt to forfeit again in 1 minute, if failed.
if $forfeitfailure > 1 and TimerDiff($forfeittimer) > $forfeittimelimit then
if forfeit() then
Return
Else
$forfeittimelimit = (60 * 1000) + timerdiff($forfeittimer)
EndIf
EndIf
WEnd
Send("{ALT DOWN}")
MouseClick ( "left" , 272 , 707 , 2 , 10) ;use direct replay button.
Send("{ALT UP}")
;this doesn't work anymore, nexon coded something in that sends replay button to different position sometimes.
;Send("{ALT DOWN}")
;MouseClick ( "left" , $CloseXpos, $CloseYpos , 2 , 10 )
;Send("{ALT UP}")
;sleep(2000)
;Send("{ALT DOWN}")
;MouseClick ( "left" , $ReplayXpos, $ReplayYpos , 2 , 10 )
;Send("{ALT UP}")
return
EndFunc
func cutsceneleveltimer() ;will terminate function when player is at start or end of cutscene.
;fastforward intro and cutscene, if bind is set, will still work if cirvumvented by using cc_message_start. Or using it regularly.
send($Speedup)
while(not leveldetect())
sleep(50)
wend
send($Slowdown)
send($Speedup)
sleep(2000)
while(not playerstartUI()) ;check to see player has gotten into mission.
sleep(50)
if introscreendetect() then ExitLoop
WEnd
send($Slowdown)
sleep(500)
send($Slowdown)
EndFunc
func leveltimer() ;computationally efficent(?) vanilla version of the timer.
sleep(2000)
while(not playerstartUI()) ;check to see player has gotten into mission.
sleep(1000)
WEnd
EndFunc
func intermissioncounter()
if $DungeonCount = ($Noruns - $intermissioncount)then
sleep($boatreturntime)
$intermissioncount = $intermissioncount + 20
EndIf
EndFunc
;;Dependent functions. Some of which can be used independently if one chose to modify or add own functions.
;looknormal() = equipclothes.
;looksuspicious() = take off clothes
;forfeit() = forfeit mission
;retalation = dependent function do not modify until you understand how it works with battereplay function.
func looknormal()
$nekkid = 0
local $stepx = 0
local $x, $y
;equip bottom row 3rd inventory screen with items.
sleep(1000)
send("b")
sleep(1000)
;MouseClick ( "left" , xcoordinventoryUI(1113) , 231 , 2 , 20 ) ;open inventory
$chest = 231 - ( (43*3) - ( 43 *$inventorychest ))
$y = $chest
if buggedinventory() Then $y = $y - 67
MouseClick ( "left" , xcoordMiniUI(1113) , $y , 2 , 20 ) ;open inventory
sleep(1000)
;equip inventory items
$row = 486 - ( (45 * 8) - (45 * $inventorychestrow))
$y = $row
if buggedinventory() Then $y = $y - 67
for $i = 1 to 6
MouseClick ( "right" , xcoordMiniUI(1157 + $stepx) , $y, 1 , 10)
;MouseClick ( "right" , 742 + $stepx, 486, 1 , 10)
sleep(1000)
$stepx = $stepx + 45
Next
sleep( 1000)
send("b")
EndFunc
func looksuspicious()
local $bugged
local $y
local $stepx = 0
local $stepy = 0
local $c1result, $c2result
Dim $colorarray1[6], $colorarray2[6]
sleep(1000)
send("b")
sleep(1000)
$bugged = buggedinventory()
sleep(1000)
for $i = 1 to 3
if $bugged Then
$y = 214 - 65
Else
$y = 214
EndIf
pixelSearch( xcoordMiniUI(925 + $stepx), $y, xcoordMiniUI(927 + $stepx), $y + 2, 0x26251E, 2)
if not @error then
$c1result = 0
Else
$c1result = 1 ;flag item equipped.
endif
pixelSearch( xcoordMiniUI(938 + $stepx), $y, xcoordMiniUI(940 + $stepx), $y +2, 0x26251E, 2 )
if not @error then
$c2result = 0
Else
$c2result = 1 ;flag item equipped.
Endif
if $bugged then
$y = 236 - 65
Else
$y = 236
EndIf
if $c1result = 1 and $c2result = 1 Then
MouseClick ( "right" , xcoordMiniUI(928 + $stepx), $y , 1 , 20 )
sleep(1000)
EndIf
$stepx = $stepx + 50
Next
;first three
for $i = 1 to 4
if $bugged then
$y = 169 + $stepy - 65
Else
$y = 169 + $stepy
EndIf
pixelSearch( xcoordMiniUI(960), $y, xcoordMiniUI(962), $y+2, 0x26251E, 5)
if not @error then
$c1result = 0
Else
$c1result = 1 ;flag item equipped.
endif
if $bugged then
$y = 199 + $stepy -65
Else
$y = 199 + $stepy
EndIf
pixelSearch( xcoordMiniUI(960), $y, xcoordMiniUI(962), $y+2, 0x26251E, 5)
if not @error then
$c2result = 0
Else
$c2result = 1 ;flag item equipped.
Endif
if $bugged then
$y = 183 + $stepy -65
Else
$y = 183 + $stepy
EndIf
if $c1result = 1 and $c2result = 1 Then
MouseClick ( "right" , xcoordMiniUI(976), $y, 1 , 20 )
sleep(1000)
EndIf
$stepy = $stepy + 50
Next
$colorarray1[1] = 0x1E292E
$colorarray1[2] = 0x26251E
$colorarray1[3] = 0x26251E
$colorarray1[4] = 0x1E292E
$colorarray1[5] = 0x1E292E
$colorarray2[1] = 0x1E292E
$colorarray2[2] = 0x26251E
$colorarray2[3] = 0x26251E
$colorarray2[4] = 0x1E292E
$colorarray2[5] = 0x1E292E
$stepy = 0
for $i = 1 to 5
if $bugged Then
$y = 173 + $stepy - 65
Else
$y = 173 + $stepy
EndIf
pixelSearch( xcoordMiniUI(1010), $y, xcoordMiniUI(1012), $y , $colorarray1[$i], 5)
if not @error then
$c1result = 0
Else
$c1result = 1 ;flag item equipped.
endif
if $bugged Then
$y = 188 + $stepy - 65
Else
$y = 188 + $stepy
EndIf
pixelSearch( xcoordMiniUI(1010), $y, xcoordMiniUI(1012), $y , $colorarray2[$i], 5)
if not @error then
$c2result = 0
Else
$c2result = 1 ;flag item equipped.
Endif
if $bugged Then
$y = 184 + $stepy - 65
Else
$y = 184 + $stepy
EndIf
if $c1result = 1 and $c2result = 1 Then
MouseClick ( "right" , xcoordMiniUI(1026), $y , 1 , 20 )
sleep(1000)
EndIf
$stepy = $stepy + 50
Next
$stepy = 0
for $i = 1 to 2
if $bugged Then
$y = 318 + $stepy - 65
Else
$y = 318 + $stepy
EndIf
pixelSearch( xcoordMiniUI(910), $y, xcoordMiniUI(912), $y + 2, 0x1E292E, 5)
if not @error then
$c1result = 0
Else
$c1result = 1 ;flag item equipped.
endif
if $bugged Then
$y = 339 + $stepy - 65
Else
$y = 339 + $stepy
EndIf
pixelSearch( xcoordMiniUI(910), $y, xcoordMiniUI(912), $y + 2, 0x1E292E, 5)
if not @error then
$c2result = 0
Else
$c2result = 1 ;flag item equipped.
Endif
if $bugged Then
$y = 333 + $stepy - 65
Else
$y = 333 + $stepy
EndIf
if $c1result = 1 and $c2result = 1 Then
MouseClick ( "right" , xcoordMiniUI(927), $y , 1 , 20 )
sleep(1000)
EndIf
$stepy = $stepy + 50
Next
send("b")
$nekkid = 1
EndFunc
func forfeit()
sleep(3000)
local $screentimer = TimerInit()
Send("{ALT DOWN}")
MouseClick ( "left", 86, 165, 1, 10)
Send("{ALT UP}")
sleep(1000)
;wait for forfeit screen
;if time out in 15 seconds then exit function.
while not forfeitscreendetect()
sleep(1000)
if Timerdiff($screentimer) > 15000 then
$forfeitfailure = 1
return 0 ;mark function failure
EndIf
WEnd
sleep(3000)
Send("{ALT DOWN}")
MouseClick( "left", (@DesktopWidth/2) - 26 , (@DesktopHeight/2) + 66, 1, 10)
Send("{ALT UP}")
return 1 ;success will move onto next state
EndFunc
;1440
;720 - 620
; - 100
;
func relogin()
local $stepy = ($characterid - 1) * 70
;1118, 558
;press the disconnect button hopefully in the right place.
sleep(1000)
Send("{ALT DOWN}")
MouseClick ( "left" , (@DesktopWidth/2), (64+(@DesktopHeight/2)) , 2 , 10 )
Send("{ALT UP}")
;startgame.
sleep(1000)
MouseClick ( "left", 1118, 558, 1, 10)
sleep(1000)
;detect character screen?
;1250, 60 charcter 1
;wait for char login screen
while charloginscreen()
sleep(50)
WEnd
sleep(2000)
;click character
MouseCLick( "left", xcoordminiUI(1250), 60 + $stepy, 1, 10)
sleep(2000)
;start button
MouseClick( "left", @Desktopwidth/2, @Desktopheight - 52, 1, 10)
sleep(2000)
while not academydormitory() or colheninn()
sleep(1000)
WEnd
sleep(1000)
;no need for translation.
MouseCLick( "left", 93, 39, 1, 10)
while not playerstartUI()
sleep(1000)
WEnd
sleep(1000)
looknormal()
EndFunc
func retaliation()
if $Transformtimer > 5 then
send($DK2)
sleep(3000)
$Transformtimer = 0
EndIf
send("f")
sleep(2000)
if $Mousemovetimer > 5 then
MouseMove ( $MoveXpos, $MoveYpos , 10 )
sleep(1700)
$Mousemovetimer = 0
EndIf
$Transformtimer = $Transformtimer + 1
$Mousemovetimer = $Mousemovetimer + 1
EndFunc
save as mapfunctions.au3
Code:
func mapselection()
local $c1, $c2, $bugged
if $maplocationx = 0 and $maplocationy = 0 Then
return 0
Else
sleep(2000)
MouseClick ( "left" , $maplocationx , $maplocationy , 1 , 10 )
Endif
sleep(1000)
while mapselectionwait() ;screen detection function
sleep(100)
WEnd
sleep(2000)
MouseClick ( "left" ,320 , 654 , 1 , 10 )
sleep(1000)
$bugged = buggedchoosebattle()
if $bugged Then
;658, 242
MouseMove ( 631, 266 - 65, 10)
Else
MouseMove ( 631, 266, 10)
EndIf
sleep(1000)
;reset battlelist to top
Mousewheel("up", 10)
sleep(1000)
;mousewheeldown to click on mission.
Mousewheel("down", $mwdownmapselect)
sleep(1000)
if $bugged Then
MouseClick ( "left", $mapselectcoordx, $mapselectcoordy - 65, 1, 10)
Else
MouseClick ( "left", $mapselectcoordx, $mapselectcoordy, 1, 10)
EndIf
sleep(1000)
;mode selection
if $bugged Then
MouseClick ( "left", $modeselectionx, $modeselectiony - 65, 1, 10)
Else
MouseClick ( "left", $modeselectionx, $modeselectiony, 1, 10)
EndIf
sleep(1000)
;makeprivate
if $bugged Then
pixelSearch(58, 428 - 65, 60,430 - 65, 0x020404, 2)
if not @error then
$c1 = 1
Else
$c1 = 0
EndIf
Else
pixelSearch(58, 428, 60,430, 0x020404, 2)
if not @error then
$c1 = 1
Else
$c1 = 0
EndIf
EndIf
if $bugged then
pixelsearch(58, 425 - 65, 60, 427 - 65, 0x010404, 2)
if not @error then
$c2 = 1
Else
$c2 = 0
EndIf
Else
pixelsearch(58, 425, 60, 427, 0x010404, 2)
if not @error then
$c2 = 1
Else
$c2 = 0
EndIf
EndIf
if $c1 = 1 and $c2 = 1 then
if $bugged Then
mouseclick( "left", 59, 424 - 65, 1, 10)
sleep(1000)
Else
mouseclick( "left", 59, 424, 1, 10)
sleep(1000)
EndIf
EndIf
;finally start mission
if $bugged Then
$replayboat = $replayboat + 1
mouseclick( "left", 231, 515 - 65, 1, 10)
Else
$replayboat = $replayboat + 1
mouseclick( "left", 231, 515, 1, 10)
EndIf
;X-231 / Y-515 / Color-0x7A6651 / Clicks 0
EndFunc
func walktomaprocheste()
send("{w down}")
send("{d down}")
sleep(1500)
send("{w up}")
send("{d up}")
sleep(1000)
send("{d down}")
sleep(200)
send("{d up}")
sleep(500)
send("{w down}")
sleep(600)
send("{w up}")
EndFunc
func walktomapcolhen()
send("{W down}")
sleep(500)
send("{w up}")
while not colhenmapscreendetect()
send("{d down}")
Sleep(100)
WEnd
send("{d up}")
EndFunc
func academy2map()
sleep(1000)
send("{W DOWN}")
sleep(3500)
send ("{W UP}")
sleep(1000)
send("{D DOWN}")
sleep(500)
send ("{W DOWN}")
sleep(2000)
;Send("{D UP}")
send("{W UP}")
sleep(1000)
send("{W DOWN}")
sleep(2000)
;send("{W DOWN}")
send("{W UP}")
sleep(3200)
send("{W DOWN}")
sleep(5000)
send("{D UP}")
send("{W UP}")
sleep(1000)
send("{W DOWN}")
send("{A DOWN}")
sleep(750)
send("{A UP}")
sleep(500)
;send("{W UP}")
;sleep(1000)
send("{D DOWN}")
sleep(2000)
send("{W UP}")
;send("{D UP}")
sleep(1000)
send("{W DOWN}")
sleep(1000)
send("{D UP}")
send("{W UP}")
sleep(1000)
send("{D DOWN}")
sleep(750)
send("{D UP}")
sleep(500)
send("{W DOWN}")
sleep(300)
send("{W UP}")
send("{A DOWN}")
sleep(1500)
send("{A UP}")
send("{S DOWN}")
sleep(1000)
send("{S UP}")
send("{A DOWN}")
sleep(3200)
send("{A UP}")
sleep(1000)
send("{A DOWN}")
send("{S DOWN}")
sleep(2000)
send("{A UP}")
send("{S UP}")
sleep(1000)
send("{S DOWN}")
sleep(300)
send("{S UP}")
EndFunc
func uimapselect()
local $c1, $c2
sleep(2000)
MouseClick ( "left" ,320 , 654 , 1 , 10 )
sleep(1000)
MouseMove ( 631, 266, 10)
sleep(1000)
Mousewheel("down", $uimwdownmapselect)
sleep(1000)
MouseClick ( "left", $uimapselectcoordx, $uimapselectcoordy, 1, 10)
sleep(1000)
MouseClick ( "left", $modeselectionx, $modeselectiony, 1, 10)
sleep(1000)
pixelSearch(58, 428, 60,430, 0x020404, 2)
if not @error then
$c1 = 1
Else
$c1 = 0
EndIf
pixelsearch(58, 425, 60, 427, 0x010404, 2)
if not @error then
$c2 = 1
Else
$c2 = 0
EndIf
if $c1 = 1 and $c2 = 1 then
mouseclick( "left", 59, 424, 1, 10)
sleep(1000)
EndIf
mouseclick( "left", 231, 515, 1, 10)
$replayboat = $replayboat + 1
EndFunc
save as screendetect.au3
Code:
func PixelCheckEndBattle()
$color1 = 5656
$color2 = 5656
$pixel1 = PixelSearch ( 220, 690, 270, 726, 0x000000 )
;If @error = 1 Then
; MsgBox(0, "uh oh", " pixel search failed to find black" )
;EndIf
if $pixel1 = 0 then
$color1 = 222222
Else
$color1 = PixelGetColor($pixel1[0], $pixel1[1])
EndIf
$pixel2 = PixelSearch ( 271, 690, 320, 726, 0x000000 )
if $pixel2 = 0 then
$color2 = 222222
Else
$color2 = PixelGetColor($pixel2[0], $pixel2[1])
EndIf
if $color1 = 0 and $color2 = 0 Then
;MsgBox(0, "Done!", "return value 1, success")
return("1")
Else
;MsgBox(0, "Done!", "return value 0")
return("0")
EndIf
EndFunc
func PixelCheckEndBattlev2()
local $c1result, $c2result, $c3result, $c4result, $c5result
;480, 55 ffffff
;232 708
;78644f
PixelSearch( 480, 61, 484, 65, 0xFFFFFF, 5)
if not @error then
$c1result = 1
Else
$c1result = 0
EndIf
PixelSearch( 245, 720, 247, 722, 0x000000, 2)
if not @error then
$c2result = 1
Else
$c2result = 0
EndIf
PixelSearch( 797, 293, 799, 295, 0x917860, 2)
if not @error then
$c3result = 1
Else
$c3result = 0
EndIf
;MsgBox(0, "color is c1 ", $c1result)
;MsgBox(0, "color is c2 ", $c2result)
;fMsgBox(0, "color is c3 ", $c3result)
;MsgBox(0, "color is c4 ", $c4result)
if $c1result = 1 and $c2result = 1 and $c3result = 1 Then
;MsgBox(0, "Done!", "return value 1, success")
return("1")
Else
;MsgBox(0, "Done!", "return value 0, fail")
return("0")
EndIf
EndFunc
func PixelCheckStart()
local $c1, $c2, $c3, $c1result, $c2result, $c3result
PixelSearch( 94, ycoordStartUI(787), 96, ycoordStartUI(789), 0x000000, 10)
if not @error then
$c1result = 1
Else
$c1result = 0
EndIf
PixeLSearch( 110, ycoordStartUI(791), 112, ycoordStartUI(794), 0x000000, 15)
if not @error then
$c2result = 1
Else
$c2result = 0
EndIf
PixeLSearch( xcoordMiniUI(1370), 23, xcoordMiniUI(1372), 25, 0x868C8C, 10)
if not @error then
$c3result = 1
Else
$c3result = 0
EndIf
;MsgBox(0, "color is c1 ", $c1result)
;MsgBox(0, "color is c2 ", $c2result)
;MsgBox(0, "color is c3 ", $c3result)
if $c1result = 1 and $c2result = 1 and $c3result = 1 Then
;MsgBox(0, "Done!", "return value 1, success")
return("1")
Else
;MsgBox(0, "Done!", "return value 0, fail")
return("0")
EndIf
EndFunc
func RochesteDockCheck()
local $c1result, $c2result, $c3result
pixelsearch( xcoordminiUI(1307), 121, xcoordminiUI(1311), 125, 0xc66c45 ,2)
if not @error then
$c1result = 1
Else
$c1result = 0
EndIf
pixelsearch( xcoordminiUI(1325), 179, xcoordminiUI(1330), 184, 0x6cd6e6 ,2)
if not @error then
$c2result = 1
Else
$c2result = 0
EndIf
pixelsearch( xcoordminiUI(1325), 206, xcoordminiUI(1335), 220, 0xFFEF63 ,3)
if not @error Then
$c3result = 1
Else
$c3result = 0
EndIf
if $c1result = 1 and $c2result = 1 and $c3result = 0 then
return ("1")
Else
return ("0")
EndIf
;X-1325 / Y-208 / Color-0xFFEF63 / Clicks 0
EndFunc
func mapselectionwait()
local $c1, $c2, $c3
PixelSearch ( 107, 75, 109, 77, 0x738A21, 2)
if not @error then
$c1 = 1
Else
$c1 = 0
EndIf
PixelSearch ( 214, 71, 216, 73, 0xCE8A21, 2)
if not @error then
$c2 = 1
Else
$c2 = 0
EndIf
PixelSearch ( 316, 73, 318, 75, 0xC1623D, 2)
if not @error then
$c3 = 1
Else
$c3 = 0
EndIf
if $c1 =1 and $c2 = 1 and $c3 = 1 Then
return 1
else
return 0
EndIf
;X-107 / Y-75 / Color-0x738A21 / Clicks 0
;X-214 / Y-71 / Color-0xCE8A21 / Clicks 0
;X-316 / Y-73 / Color-0xC1623D / Clicks 0
EndFunc
func forfeitscreendetect()
local $c1, $c2
PixelSearch( @DesktopWidth/2 - 139, @Desktopheight/2, (@DesktopWidth/2 + 2) - 140, (@Desktopheight/2 + 2), 0xFFFFFF, 2)
if not @error then
$c1 = 1
Else
$c1 = 0
EndIf
PixelSearch( @DesktopWidth/2 - 139, @Desktopheight/2 - 6, (@DesktopWidth/2 + 2)- 140, (@Desktopheight/2 + 2) - 6, 0xFFFFFF, 2)
if not @error then
$c2 = 1
Else
$c2 = 0
EndIf
;MsgBox(0, "color is c1 ", $c1)
;MsgBox(0, "color is c2 ", $c2)
if $c1 = 1 and $c2 = 1 Then
return 1
Else
return 0
EndIf
EndFunc
func leveldetect() ; detect array of 5 Pixels. loops until detection.
local $clusterdetect = 0
;dim $xarray[5][5] ; $yarray[6]
dim $cluster[6]
$cluster[1] = 0
$cluster[2] = 0
$cluster[3] = 0
$cluster[4] = 0
$cluster[5] = 0
local $x = @Desktopwidth/2
local $y = @Desktopheight/2
local $x2 = (@Desktopwidth/2) + 2
local $y2 = (@Desktopheight/2) + 2
for $i = 1 to 5
pixelsearch( $x + (2 * $i), $y + (2 * $i), $x2 + (2 * $i), $y2 + (2 * $i), 0x000000, 2)
if not @error Then
$cluster[$i] = 1
Else
$cluster[$i] = 0
EndIf
Next
$i = 1
for $i = 1 to 5
if $cluster[$i] = 0 Then
$clusterdetect = 0
ExitLoop
Else
$clusterdetect = 1
EndIf
Next
return $clusterdetect
EndFunc
func playerstartUI() ;detects ui
local $c1,$c2
PixelSearch( 296, 29, 300, 33, 0x187049 , 2)
if not @error then
$c1 = 1
Else
$c1 = 0
EndIf
PixelSearch( 363, 31, 367, 35, 0x10673E , 2)
if not @error Then
$c2 = 1
Else
$c2 = 0
EndIf
if $c1 = 1 and $c2 = 1 Then
return 1
Else
return 0
EndIf
;return 1
EndFunc
func colhendockcheck()
;func intermissioncounter()
;X-1320 / Y-184 / Color-0xAD7139 / Clicks 0
;X-1300 / Y-127 / Color-0x192631 / Clicks 0
local $c1, $c2
pixelsearch( xcoordMiniUi(1300), 164, xcoordMiniUI(1340), 204, 0xAD7139, 2)
if not @error then
$c1 = 1
Else
$c1 = 0
EndIf
Pixelsearch( xcoordMiniUI(1280), 107, xcoordMiniUI(1320), 147, 0x192631, 5)
if not @error Then
$c2 = 1
Else
$c2 = 0
EndIf
;MsgBox(0, "color is c1 ", $c1)
;MsgBox(0, "color is c2 ", $c2)
if $c1 = 1 and $c2 = 1 Then
return 1
Else
return 0
EndIf
EndFunc
func colhenmapscreendetect()
;X-675 / Y-200 / Color-0xB5A284 / Clicks 0
;X-565 / Y-208 / Color-0xFFDD64 / Clicks 0
local $c1, $c2
pixelsearch( maptranslatex(675), maptranslatey(200), maptranslatex(676), maptranslatey(202), 0xB5A284, 2)
if not @error then
$c1 = 1
Else
$c1 = 0
EndIf
Pixelsearch( maptranslatex(545), maptranslatey(190), maptranslatex(600), maptranslatey(240), 0xFFDD64, 10)
if not @error Then
$c2 = 1
Else
$c2 = 0
EndIf
;MsgBox(0, "color is c1 ", $c1)
;MsgBox(0, "color is c2 ", $c2)
if $c1 = 1 and $c2 = 1 Then
return 1
Else
return 0
EndIf
EndFunc
func rochestemapscreendetect()
; 349 205 ffd64
; 576, 211 ffd64
local $c1, $c2
pixelsearch( maptranslatex(349), maptranslatey(205), maptranslatex(351), maptranslatey(207), 0xFFDD64, 2)
if not @error then
$c1 = 1
Else
$c1 = 0
EndIf
Pixelsearch( maptranslatex(576), maptranslatey(211), maptranslatex(578), maptranslatey(213), 0xFFDD64, 2)
if not @error Then
$c2 = 1
Else
$c2 = 0
EndIf
;MsgBox(0, "color is c1 ", $c1)
;MsgBox(0, "color is c2 ", $c2)
if $c1 = 1 and $c2 = 1 Then
return 1
Else
return 0
EndIf
EndFunc
func rochesteacademyspawn()
;X-1331 / Y-202 / Color-0xFFEF63 / Clicks 0
local $c1, $c2
pixelsearch( xcoordminiUI(1331), 202, xcoordminiUI(1340), 210, 0xFFEF63 ,3)
if not @error Then
$c1 = 1
Else
$c1 = 0
EndIf
pixelsearch( xcoordminiUI(1325), 208, xcoordminiUI(1330), 220, 0xFFEF63 ,3)
if not @error Then
$c2 = 1
Else
$c2 = 0
EndIf
if $c1 = 1 and $c2 = 1 Then
return 1
Else
return 0
EndIf
EndFunc
;58, 738.
func introscreendetect()
local $c1, $c2
pixelsearch( 58, ycoordstartUI(720), 65, ycoordstartUI(745), 0xFFFFFF, 20)
if not @error then
$c1 = 1
Else
$c1 = 0
EndIf
Pixelsearch( 160, ycoordstartUI(720), 162, ycoordstartUI(734), 0xFFFFFF, 20)
if not @error Then
$c2 = 1
Else
$c2 = 0
EndIf
;MsgBox(0, "color is c1 ", $c1)
;MsgBox(0, "color is c2 ", $c2)
if $c1 = 1 and $c2 = 1 Then
return 1
Else
return 0
EndIf
EndFunc
func buggedinventory()
;X-947 / Y-32 / Color-0xF8F8F8 / Clicks 0
;X-1113 / Y-37 / Color-0x391408 / Clicks 0X-1141 / Y-32 / Color-0xffffff / Clicks 0
;X-1105 / Y-28 / Color-0xF7DF42 / Clicks 0
local $c1, $c2
pixelsearch( xcoordminiUI(947), 32, xcoordminiUI(950), 34, 0xFFFFFF, 5)
if not @error then
$c1 = 1
Else
$c1 = 0
EndIf
Pixelsearch( xcoordminiUI(1105), 28, xcoordminiUI(1107), 30, 0xF7DF42, 2)
if not @error Then
$c2 = 1
Else
$c2 = 0
EndIf
;MsgBox(0, "color is c1 ", $c1)
;MsgBox(0, "color is c2 ", $c2)
if $c1 = 1 and $c2 = 1 Then
return 1
Else
return 0
EndIf
EndFunc
func buggedchoosebattle()
;X-82 94 fffffff
;513, 29
local $c1, $c2
pixelsearch( 510, 27, 515, 31, 0xFFFFFF, 2)
if not @error then
$c1 = 1
Else
$c1 = 0
EndIf
Pixelsearch( 80, 92, 84, 96, 0xFFFFFF, 2)
if not @error Then
$c2 = 1
Else
$c2 = 0
EndIf
if $c1 = 1 and $c2 = 1 Then
return 1
Else
return 0
EndIf
EndFunc
func disconnect()
;X-1055 / Y-412 / Color-0xF6C263 / Clicks 0
;X-936 / Y-187 / Color-0xFFDB6B / Clicks 0
local $c1, $c2
pixelsearch( 1055, 412, 1057, 414, 0xF6C263, 2)
if not @error then
$c1 = 1
Else
$c1 = 0
EndIf
Pixelsearch( 936, 187, 938, 189, 0xFFDB6B, 2)
if not @error Then
$c2 = 1
Else
$c2 = 0
EndIf
if $c1 = 1 and $c2 = 1 Then
return 1
Else
return 0
EndIf
EndFunc
func charloginscreen()
;X-104 / Y-857 / Color-0x314149 / Clicks 0
; 65 , 862, preform PixelChecksum
pixelchecksum(65, ycoordstartUI(862), 68, ycoordstartUI(865) )
sleep(50)
if pixelchecksum(65, ycoordstartUI(862), 68, ycoordstartUI(865) ) then
;if screen moving then return failure.
return 0
Else
;success
return 1
Endif
EndFunc
func academydormitory()
;X-258 / Y-449 / Color-0x305520 / Clicks 0
; X-308 / Y-447 / Color-0x415E2B / Clicks 0
local $c1, $c2
pixelsearch( 258, 449, 260, 451, 0x305520, 2)
if not @error then
$c1 = 1
Else
$c1 = 0
EndIf
Pixelsearch( 308, 447, 310, 449, 0x415E2B, 2)
if not @error Then
$c2 = 1
Else
$c2 = 0
EndIf
if $c1 = 1 and $c2 = 1 Then
return 1
Else
return 0
EndIf
EndFunc
func colheninn()
return 0
EndFunc
func numberimageprocess($arrayofpixels)
EndFunc
;~ func PixelCheckStartErrors()
;~ $pixel1 = PixelSearch ( 220, 690, 270, 726, 0 )
;~ 615 452 661 o;~ $color1 = PixelGetColor($pixel1[0], $pixel1[1])
;~ $pixel2 = PixelSearch ( 271, 690, 320, 726, 0)
;~ $color2 = PixelGetColor($pixel2[0], $pixel2[1])
;~ if $color1 and $color2 = 0 Then
;~ return("1")
;~ Else
;~ return("0")
;~ EndIf
;~ EndFunc
transformfunctions.au3
Code:
;generally not a good idea to modify, helps me convert values from my resolution to scale to whatever else.
;use this file to add your own transform functions depending on your native resolution if you are adding a different
;set of coordinates and want to scale it up and down at different resolutions.
func translatex($x)
return round($x * (@DesktopWidth/1440), 0)
EndFunc
func translatey($y)
return round($y * (@DesktopHeight/900), 0)
EndFunc
func xcoordMiniUI($x)
return ($x - (1440 - @DesktopWidth))
EndFunc
func ycoordStartUI($y)
return ($y - (900 - @DesktopHeight))
EndFunc
;this function can be used universally.
func maptranslatex($x)
$x = ((@DesktopWidth - 1440)/2) + $x
return $x
EndFunc
func maptranslatey($y)
$y = ((@Desktopheight - 900)/2) + $y
return $y
EndFunc
save as core.au3
Code:
;~ Module: Core V. 1.009
;~ Author: Exico
;~ Date of release: 17-08-2001 ddmmaaaa
#cs-------------------------------------
This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
To view a copy of this license, visit
http://creativecommons.org/licenses/by-nc-sa/3.0/
or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
#ce-------------------------------------
#Include "autoitlib\File.au3"
#Include "autoitlib\FileConstants.au3"
#include "functions\ReadVariables.au3"
#include "functions\BindsWorkaround.au3"
#include "functions\RandomTimeWait.au3"
#include "functions\Killmode.au3"
#include "functions\ScreenCheck.au3"
#include "functions\Shutdown.au3"
#include "autoitlib\Process.au3"
#include "autoitlib\ProcessConstants.au3"
#include "list.au3"
#include "RUN.au3"
;added header files
#include "functions\GlobalVariableDeclare.au3"
#include "functions\transformfunctions.au3"
#include "functions\AddedScriptFunctions.au3"
#include "functions\Mapfunctions.au3"
$Inifile = @ScriptDir & "\Config.ini"
$TempFile = @ScriptDir & "\temp\Temp.txt"
dim $Hotpause, $Bot, $NoRuns, $Counters, $Killmode, $UseFixed, $UseRandom, $UseBinds, $CurrentDir, $shuttipe
dim $msg, $NoRuns, $Counter, $Bot, $Button_START, $Counter, $ReplayXpos, $ReplayYpos, $StartXpos, $StartYPos, $MoveXPos, $MoveYPos, $WaitTime, $answer
dim $DungeonCount, $Runcounter, $CurrentDir, $inifile, $hotstart, $hotpause, $skipmap, $DK2, $spears, $prospears, $god, $ohk, $lastTime, $boatreturnTime, $botgui
dim $battleendTime, $boatstartTime, $runwait, $useusersets, $CurVersion, $randomtime, $botnumber, $botlist, $botscount, $usebinds, $usespam, $usefixed, $userandom
dim $tempfile, $consolename, $minimum, $maximum, $pala, $pala2, $DK1, $transformationtime, $wichtrans, $useLVL2, $closeXpos, $closeYpos
ReadFile()
SetButtons()
SetVariables()
;~ Hotkey sets
HotKeySet($hotpause, "ExitBot")
SetBotVariables()
RunBot()
;~ Set variables to use with the bot selected
Func SetVariables()
$useusersets = IniRead($IniFile, "resolution", "useusersettings", "false" )
if $useusersets = "false" then
$ReplayXpos = "88"
$ReplayYpos = "430"
$CloseXpos = "405"
$CloseYpos = "705"
$StartXpos = "115"
$StartYPos = Int(@DesktopHeight - 120)
Select
case $Bot = "TakingInitiative"
$MoveXPos = Int(@DesktopWidth * 580 / 1280)
$MoveYPos = Int(@DesktopHeight / 2)
case $Bot = "PrepareForCounterAttack"
$MoveXPos = Int(@DesktopWidth * 580 / 1280)
$MoveYPos = Int(@DesktopHeight / 2)
case $Bot = "KoboldChief"
$MoveXPos = Int(@DesktopWidth * 580 / 1280)
$MoveYPos = Int(@DesktopHeight / 2)
case else
$MoveXPos = Int(@DesktopWidth * 680 / 1280)
$MoveYPos = Int(@DesktopHeight / 2)
EndSelect
Else
$ReplayXpos = IniRead($IniFile, "resolution", "ReplayXpos", "88" )
$ReplayYpos = IniRead($IniFile, "resolution", "ReplayYpos", "430" )
$CloseXpos = IniRead($IniFile, "resolution", "CloseXpos", "405" )
$CloseYpos = IniRead($IniFile, "resolution", "CloseYpos", "705" )
$StartXpos = IniRead($IniFile, "resolution", "StartXpos", "115" )
$StartYPos = IniRead($IniFile, "resolution", "StartYpos", Int(@DesktopHeight - 120) )
if $Bot = "TakingInitiative" Then
$MoveXPos = IniRead($IniFile, "resolution", "IngkaraMoveXPos", Int(@DesktopWidth * 580 / 1280) )
elseif $Bot = "PrepareForCounterAttack" Then
$MoveXPos = IniRead($IniFile, "resolution", "IngkaraMoveXPos", Int(@DesktopWidth * 580 / 1280) )
Else
$MoveXPos = IniRead($IniFile, "resolution", "MovetXpos", Int(@DesktopWidth * 680 / 1280) )
EndIf
$MoveYPos = IniRead($IniFile, "resolution", "MoveYpos", Int(@DesktopHeight / 2) )
EndIf
EndFunc
;~ Associated to Pause Button, exit the bot
Func ExitBot()
MsgBox(0, "Bot stopped", "Bot stopped, press OK to exit")
clear()
exit
EndFunc
;~ read binds defined by user
Func SetButtons()
;~ check if the file exist and set buttons
$skipmap = IniRead ( $IniFile, "Changemap", "Skipmap", "y" )
$god = IniRead ( $IniFile, "hax", "god", "1" )
$ohk = IniRead ( $IniFile, "hax", "ohk", "2" )
$spears = IniRead ( $IniFile, "secondary", "spears", "7" )
$prospears = IniRead ( $IniFile, "secondary", "prospears", "6" )
$sticky = IniRead ( $IniFile, "secondary", "sticky", "" )
$bombs = IniRead ( $IniFile, "secondary", "bombs", "" )
$mining = IniRead ( $IniFile, "secondary", "mining", "8" )
$DK1 = IniRead ( $IniFile, "trasformation", "dark", "o" )
$DK2 = IniRead ( $IniFile, "trasformation", "dark2", "o" )
$Pala = IniRead ( $IniFile, "trasformation", "pala", "o" )
$Pala2 = IniRead ( $IniFile, "trasformation", "pala2", "o" )
$hotstart = IniRead ( $IniFile, "Hotkeys", "startbot", "{INS}" )
$hotpause = IniRead ( $IniFile, "Hotkeys", "closeall", "{Pause}" )
$boatstartTime = IniRead ( $IniFile, "waittime", "boatstart", "31000" )
$WaitTime = IniRead ( $IniFile, "waittime", "intermediate", "8000" )
$lastTime = IniRead ( $IniFile, "waittime", "last", "10000" )
$boatreturnTime = IniRead ( $IniFile, "waittime", "boatreturn", "16000" )
$battleendTime = IniRead ( $IniFile, "waittime", "battleend", "80000" )
$runwait = IniRead ( $IniFile, "waittime", "runwait", "0" )
$userandom = IniRead ( $IniFile, "randomtime", "userandomtime", "false" )
$minimum = IniRead ( $IniFile, "randomtime", "minimum", "0" )
$maximum = IniRead ( $IniFile, "randomtime", "maximum", "0" )
$transformationtime = iniread($inifile,"addonscripts","transformationTime","2460000")
$wichtrans = iniread($inifile,"addonscripts","wichtrans","pala")
$useLVL2 = iniread($inifile,"addonscripts","uselvl2","false")
EndFunc
Func ReadFile()
$Bot = BotVar($TempFile)
$NoRuns = RunVar($TempFile)
$Counter = CounterVar($TempFile)
$Killmode = KillVar($TempFile)
$UseBinds = BindVar($TempFile)
$CurrentDir = CurrentDirVar($TempFile)
$shuttipe = ShutdownVar($TempFile)
EndFunc
Func SetBotVariables()
$RandomTime = RandomTimeSet()
EndFunc
Func Clear()
EndFunc
Sample maps.
colheninflames.au3
Code:
;~ Title: Colhen In Flames bot
;~ Author: Exico
;~ Version: 1.002
;~ Date of release: 17/08/2011
;~ Description: Colhen In Flames bot by exico
;~ Colhen In Flames bot files
fileInstall("sources\ColhenInFlames.jpg", @tempDir & "\files\ColhenInFlames.jpg")
;~ Colhen In Flames bot counter
Func ColhenInFlamesBot()
$DungeonCount = $Noruns
$Runcounter = 0
do
$Runcounter = $Runcounter + 1
tooltip("Run " & $Runcounter & " of " & $Noruns & ". Press " & $hotpause & " to stop." & " Res: " & @DesktopWidth & "x" &@DesktopHeight , 230, 70, "Bot info", 1, 1)
ColhenInFlamesBot2()
$DungeonCount = $DungeonCount - 1
until $DungeonCount = 0
StartShut($shuttipe)
MsgBox(0, "Done!", "Operation complete, press OK to exit")
EndFunc
;~ Colhen In Flames bot actions
Func ColhenInFlamesBot2()
$maplocationx = $Fomorianbase[1]
$maplocationy = $Fomorianbase[2]
$Modeselectionx = $Heromode[1] ;select hero mode, hard or normal?
$Modeselectiony = $Heromode[2]
$Mwdownmapselect = 1 ;mouse down scroll, and location on screen for battle selection
$Mapselectcoordx = 597 ;no need to transform or scale at different resolutions. However each mission requires different values.
$Mapselectcoordy = 481
intermissioncounter()
startrochestemap()
;initial level timer function.
cutsceneleveltimer() ;speedupfunction
;leveltimer() ;vanilla function
;Send("{HOME}")
;sleep($boatstartTime)
;Send("{END}")
;sleep(25000)
;Wait if Set
Send($god)
;sleep($runwait)
sleep($randomtime)
;Go to last map
; List of commands for kill bosses
Send($ohk & $spears & $DK2);In sequence: No death,1hitkill,999spears,immortality
Send("{w down}") ;Holds the w key down
Sleep(2000)
Send("{w up}")
;Spam Spears
$Counter2 = $Counter
do
$Counter2 = $Counter2 - 1
If $killmode = "spears" then
SpearSpam()
Elseif $killmode = "trans" then
TransSpam()
endif
;MouseMove ( $MoveXpos, $MoveYpos , 10 )
until $Counter2 = 0
;Wait for End Battle screen
;Sleep($battleendTime)
battlereplay()
EndFunc
thecontract.au3
Code:
;~ Title: The Contract bot
;~ Author: Exico
;~ Version: 1.001
;~ Date of release: 17/08/2011
;~ Description: The Contract bot by exico
;~ The Contract bot files
fileInstall("sources\TheContract.jpg", @tempDir & "\files\TheContract.jpg")
;~ The Contract bot counter
Func TheContractBot()
$DungeonCount = $Noruns
$Runcounter = 0
do
$Runcounter = $Runcounter + 1
tooltip("Run " & $Runcounter & " of " & $Noruns & ". Press " & $hotpause & " to stop.", 230, 70, "Bot info", 1, 1)
TheContractBot2()
$DungeonCount = $DungeonCount - 1
until $DungeonCount = 0
StartShut($shuttipe)
MsgBox(0, "Done!", "Operation complete, press OK to exit")
EndFunc
;~ The Contract bot actions
Func TheContractBot2()
;379, 454 that is for fomorian base
;5 mouse weeldown X-519 / Y-405 / Color-0x06080A / Clicks 0 contract
;global variable declaration for this map, in order to get replay function to work.
$maplocationx = $Fomorianbase[1]
$maplocationy = $Fomorianbase[2]
$Modeselectionx = $Heromode[1] ;select hero mode, hard or normal?
$Modeselectiony = $Heromode[2] ;Default set to hard.
$Mwdownmapselect = 5 ;mouse down scroll, and location on screen for battle selection
$Mapselectcoordx = 582
$Mapselectcoordy = 477
;Start the boatintermissioncounter()
intermissioncounter()
startrochestemap();Wait if Set
cutsceneleveltimer()
;sleep($runwait)
sleep($randomtime)
;Go to last map
Send($skipmap)
;Sleep($WaitTime)
leveltimer()
Send($skipmap)
;Sleep($WaitTime)
leveltimer()
Send($skipmap)
;Sleep($lastTime)
leveltimer()
; List of commands for kill bosses
Send($god & $ohk & $prospears & $DK2);In sequence: No death,1hitkill,999spears,immortality
Send("{d down}") ;Holds the d key down
Sleep(500)
Send("{d up}")
Send("{w down}") ;Holds the w key down
sleep(2000)
Send("{d down}") ;Holds the d key down
Sleep(700)
Send("{d up}")
Send("{a down}") ;Holds the d key down
Sleep(700)
Send("{a up}")
Sleep(3000)
Send("{w up}")
;Spam Spears
$Counter2 = $Counter + 1
do
$Counter2 = $Counter2 - 1
If $killmode = "spears" then
SpearSpam()
Elseif $killmode = "trans" then
TransSpam()
endif
Send("{s down}") ;Holds the s key down
Sleep(2000)
Send("{s up}")
MouseMove ( $MoveXpos, $MoveYpos , 10 )
until $Counter2 = 0
;Wait for End Battle screen
battlereplay()
EndFunc
theweepingqueen.au3
Code:
;~ The Weeping Queen bot
;~ Author: Exico
;~ Version: 1.005
;~ Date of release: 17/08/2011
;~ Description: The Weeping Queen bot by exico
;~ The Weeping Queen bot files
fileInstall("sources\TheWeepingQueen.jpg", @tempDir & "\files\TheWeepingQueen.jpg")
;~ The Weeping Queen bot counter
Func TheWeepingQueenBot()
$DungeonCount = $Noruns
$Runcounter = 0
do
$Runcounter = $Runcounter + 1
tooltip("Run " & $Runcounter & " of " & $Noruns & ". Press " & $hotpause & " to stop.", 230, 70, "Bot info", 1, 1)
TheWeepingQueenBot2()
$DungeonCount = $DungeonCount - 1
until $DungeonCount = 0
StartShut($shuttipe)
MsgBox(0, "Done!", "Operation complete, press OK to exit")
EndFunc
;~ Trampled Plains bot actions
Func TheWeepingQueenBot2()
;Start the boat
$maplocationx = $Ainle[1]
$maplocationy = $Ainle[2]
$Modeselectionx = $Heromode[1] ;select hero mode, hard or normal?
$Modeselectiony = $Heromode[2] ;if done in UI no need to make mode declaration in individual script.
$Mwdownmapselect = 5 ;mouse down scroll, and location on screen for battle selection
$Mapselectcoordx = 602 ;no need to transform or scale at different resolutions. However each mission requires different values.
$Mapselectcoordy = 470
intermissioncounter()
startcolhenmap()
cutsceneleveltimer()
Send($god)
;Wait if Set
;sleep($runwait)
sleep($randomtime)
;Go to last map
; List of commands for kill bosses
Send($ohk & $spears & $DK2);In sequence: No death,1hitkill,999spears,immortality
;Send("{w down}") ;Holds the w key down
;Sleep(6000)
;Send("{w up}")
;Spam Spears
$Counter2 = $Counter
do
$Counter2 = $Counter2 - 1
If $killmode = "spears" then
SpearSpam()
Elseif $killmode = "trans" then
TransSpam()
endif
;MouseMove ( $MoveXpos, $MoveYpos , 10 )
until $Counter2 = 0
;Wait for End Battle screen
;Push Replay button
battlereplay()
EndFunc