Adventure Bot
Info :
You can try here my first attempt at creating an adventure bot.
It's still bugged but i'm in search of ideas to improve it.
To make it work "proper" you have to put the "Dungeon_Star.png" file in the same folder as the script.
Run the script from anywhere inside any prime world you want to farm in.
Don't move your mouse during farm.
Explanations :
If you don't want to download the image file, you will have to extract it from a swf in a packed game file,
you can find it here : Trove\Live\extracted\ui\questtracker.swf after using the extract batch (devtool_unpack_client.bat).
This script will make you respawn.
Respawn will reset the X value of the cursor's position.
The script will change the Y value of the cursor's position to look at the bottom.
Then it sends keys to move to the rally blade and use it.
Once teleported, it checks if you are in a dungeon by searching for it's logo on the top right of the screen.
If the logo is found, the script checks every 0.5s if this logo is still here.
Two cases can occur now :
- The dungeon is cleared, there is no more dungeon logo => return to start of the script (respawn and re tp)
- 20s have passed and the dungeon is still uncleared => return to start of the script (respawn and re tp)
To-do :
Change the way the script detect if you are in dungeon (image detection is still bugged).
Find the dungeon pointer (that shows up the dungeon logo).
Improve delays between keys sending.
I'm opened to all of your ideas and suggestions
AHK Script :
Code:
IfNotExist Dungeon_Star.png
{
MsgBox Error: Put Dungeon_Star.png in the same folder as this script.
}else{
WinGetPos, null, null, Window_Width, Window_Height, Trove
TopLeftX:=(Window_Width/1.3)
BotRightY:=(Window_Height/2.5)
Loop {
WinActivate, Trove
Send {enter}/respawn{enter}
Sleep 1000
Send {e}
Sleep 500
MouseGetPos, Cur_Pos_X, Cur_Pos_Y
MouseMove,Cur_Pos_X , Window_Height
Send {w}
Send {z down}
Send {q down}
Sleep 200
Send {z up}
Sleep 150
Send {q up}
Sleep 2000
Send {e}
Sleep 1000
TimeOut = 0
Loop {
ImageSearch, Found_X,Found_Y, TopLeftX,0, Window_Width,BotRightY, *150 *Trans000000 Dungeon_Star.png
if ErrorLevel = 0
{
MouseMove,Found_X , Found_Y
if (TimeOut = 40)
{
break
}
TimeOut++
Sleep 500
}
else if ErrorLevel = 1
{
break
}
else if ErrorLevel = 2
{
break
}
}
}
}
Esc::ExitApp