For everyone who still enjoys the game but hates the mind numbing grinding that you have to do at higher levels, here is a gold farming bot. It is not perfect and I am not a programmer by trade. Far from it. However it can still make 20+ millions a day with a good gear (1000%+ gold find). It is written in Autohotkey and only works on Windows (no android I am afraid but there are options for that as well). It is the only scripting language that I am familiar with. It is very easy to install and to start a new script all you have to do is to right click a folder and select New->AutoHotkey Script.
The parameters of the bot have been specifically setup to be compatible with my screen resolution (1440/900) and my colour range of my computer. Feel free to customize to your own screen.
A useful tool to determine the coordinates of the screen is included in Autohotkey and is called WindowSpy. Alternatively you can use a small script like this :
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#SingleInstance force
F5::
MouseGetPos X, Y
ToolTip, %X% %Y%
return
;;this hotkey is to reset the tool-tip and clear it from screen
F8::
Reload
return
;;this hotkey is to completely exit the script
Escape::exitapp
This is the main script. It uses two libraries, found bellow and some pictures stored in a folder called ScriptImages (located in the same folder as the script). It can do arena type maps or severed mountain. It uses an F5 to start arenas and F6 to start Severed Mountain. The map you choose to start has to be the last one played and the caracter has to be in the default position just above the starting portal.
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#SingleInstance force
#Include Eterniumlibrary.ahk
#Include Mypreciouslibrary.ahk
#IfWinActive Eternium
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;Arenas;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Farmandsalvage()
{
Salvage()
StartArenaAfterSalvage()
Fight()
}
Farm()
{
StartArenaNoSalvage()
Fight()
}
F5::
Loop
{
Farmandsalvage()
Loop, 20
{
Farm()
}
}
return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;Severed Mountain;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
FarmandsalvageSM()
{
Salvage()
StartArenaAfterSalvage()
FightSM()
}
FarmSM()
{
StartArenaNoSalvageSM()
FightSM()
}
F6::
Loop
{
FarmandsalvageSM()
Loop, 35
{
FarmSM()
}
}
return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
F8::Reload
Escape::exitapp
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#Include Mypreciouslibrary.ahk
StartCurrentLevel()
{
Searchimageandsingleclick(1100, 500, 1394, 818, 40, 10, "Play.png")
Searchimageandsingleclickwithescape(530, 749, 925, 820, 40, 10, "Start.png", 2000)
}
Salvage()
{
sleep 1000
LoopClickandwait(1266, 429, 1, 1400)
LoopClickandwait(913, 304, 1, 100)
;Searchimageandsingleclickwithescape(231, 364, 538, 404, 60, 10, "SalvageEpics.png", 400)
Searchimageandsingleclickwithescape(235, 304, 541, 339, 60, 10, "SalvageRare.png", 400)
Searchimageandsingleclickwithescape(455, 635, 685, 690, 90, 300, "SalvageYes.png", 400)
Searchimageandsingleclick(1205, 42, 1267, 99, 40, 200, "SalvageX.png")
}
Stashitems()
{
LoopClickandwait(525, 200, 1, 400)
MatrixClick(760, 185, 75, 75, 8, 5, 2, 10)
Searchimageandsingleclickwithescape(1280, 67, 1334, 120, 60, 400, "StashX.png", 30)
}
StartArenaAfterSalvage()
{
LoopClickandwait(340, 156, 1, 1300) ;;Move towards stash
Stashitems()
LoopClickandwait(502, 111, 1, 20) ;;Enter gate
StartCurrentLevel()
}
StartArenaNoSalvage()
{
sleep 50
StartTime := A_TickCount
Loop,
{
If Imageonscreen(1100, 500, 1394, 818, 40,"Play.png") = 1
{
StartCurrentLevel()
break
}
Else If (A_TickCount - StartTime > 3000)
{
StartCurrentLevel()
break
}
Else
{
LoopClickandwait(722, 160, 1, 200)
}
}
}
StartArenaNoSalvageSM()
{
sleep 500
LoopClickandwait(722, 160, 2, 1000)
StartCurrentLevel()
}
Endlevel()
{
Click, 42, 816 ;Click hero icon
Searchimageandsingleclickwithescape(1120, 78, 1250, 120, 40, 1, "Finishlevel.png", 800)
Searchimageandsingleclickwithescape(456, 636, 690, 700, 60, 1000, "FinishLevelYes.png", 300)
}
Fight()
{
Sleep 1000
Click, 722, 779
StartTime := A_TickCount
LevelStartTime := A_TickCount
Loop
{
LevelElapsedTime := A_TickCount - LevelStartTime
if LevelElapsedTime > 120000 ;;reset if something went very wrong and script got jammed
{
Endlevel()
break
}
If Imageonscreen(285, 765, 840, 831, 80, "LevelEnd.png") = 0
{
ElapsedTime := A_TickCount - StartTime
if ElapsedTime > 3000
{
StartTime := A_TickCount
LoopRightClickandwait(814, 479, 1, 500) ;; atack in arenas
}
}
Else If Imageonscreen(285, 765, 840, 831, 80, "LevelEnd.png") = 1
{
Sleep 2200
Endlevel()
break
}
}
}
FightSM()
{
Sleep 1000
StartTime := A_TickCount
LevelStartTime := A_TickCount
Loop
{
LevelElapsedTime := A_TickCount - LevelStartTime
if LevelElapsedTime > 15000 ;;reset if something went very wrong and script got jammed
{
Send {1}
LoopClickandwait(1307, 405, 1, 500) ;; 1307
Sleep 2500
Click, 722, 779
Sleep 6000
Endlevel()
break
}
If Imageonscreen(285, 765, 840, 831, 100, "LevelEnd.png") = 0
{
ElapsedTime := A_TickCount - StartTime
if ElapsedTime > 700
{
StartTime := A_TickCount
LoopClickandwait(852, 259, 1, 100)
LoopClickandwait(1307, 405, 1, 500) ;; 1307
}
}
Else If Imageonscreen(280, 760, 840, 831, 80, "LevelEnd.png") = 1
{
Send {1}
LoopClickandwait(1307, 405, 1, 500) ;; 1307
Sleep 2500
Click, 722, 779
Sleep 6000
Endlevel()
break
}
}
}
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
GetMouseCoorsAndColour()
{
MouseGetPos X, Y
PixelGetColor Color, %X%, %Y%, RGB
ToolTip, Mouse position is %x%x%Y% Colour is %Color%
}
LoopClickandwait(xclickpos, yclickpos, loopcounter, waittimemilisecconds)
{
Loop, %loopcounter%
{
Click, %xclickpos%, %yclickpos%
Sleep, %waittimemilisecconds%
}
}
LoopRightClickandwait(xrclickpos, yrclickpos, rloopcounter, rwaittimemilisecconds)
{
Loop, %rloopcounter%
{
Click, right, down, %xrclickpos%, %yrclickpos%
Sleep, 50
Click, right, up, %xrclickpos%, %yrclickpos%
Sleep, %rwaittimemilisecconds%
}
}
MatrixClick(startx, starty, xgain, ygain, repeatx, repeaty, clickcount, clicksleep)
{
xnow := startx
ynow := starty
Loop, %repeatx%
{
Loop, %repeaty%
{
LoopClickandwait(xnow, ynow, clickcount, clicksleep)
tempy := ynow + ygain
ynow := tempy
}
ynow := starty
tempx := xnow + xgain
xnow := tempx
}
}
Searchimageandclick(startpointx, startpointy, endpointx, endpointy, confidence, sleeptimer, filename)
{
coordMode,pixel
ImageSearch, FoundX, FoundY, %startpointx%, %startpointy%, %endpointx%, %endpointy%, *%confidence% %A_ScriptDir%\ScriptImages\%filename%
if (ErrorLevel = 0)
{
Click, %FoundX%, %FoundY%
Sleep, %sleeptimer%
}
}
Searchimageandsingleclick(startpointx, startpointy, endpointx, endpointy, confidence, sleeptimer, filename)
{
Loop
{
coordMode,pixel
ImageSearch, FoundX, FoundY, %startpointx%, %startpointy%, %endpointx%, %endpointy%, *%confidence% %A_ScriptDir%\ScriptImages\%filename%
if (ErrorLevel = 0)
{
Click, %FoundX%, %FoundY%
Sleep, %sleeptimer%
break
}
}
}
Searchimageandsingleclickwithescape(startpointx, startpointy, endpointx, endpointy, confidence, sleeptimer, filename, escapetimer)
{
StartTime := A_TickCount
Loop
{
coordMode,pixel
ImageSearch, FoundX, FoundY, %startpointx%, %startpointy%, %endpointx%, %endpointy%, *%confidence% %A_ScriptDir%\ScriptImages\%filename%
if (ErrorLevel = 0)
{
Click, %FoundX%, %FoundY%
Sleep, %sleeptimer%
break
}
if (A_TickCount - StartTime > escapetimer)
{
Click, %startpointx%, %startpointy%
break
}
}
}
Imageonscreen(startpointx, startpointy, endpointx, endpointy, confidence, filename)
{
coordMode,pixel
ImageSearch, FoundX, FoundY, %startpointx%, %startpointy%, %endpointx%, %endpointy%, *%confidence% %A_ScriptDir%\ScriptImages\%filename%
if (ErrorLevel = 0)
return 1
else return 0
}
Here us how my image folder looks like