Currently in early stage of testing. - I said previously that I would make it over the holiday, 1st day of the holiday the Beta version is finished.
Updates will probably be slow after this - I'm addicted to Black Desert Online, though AHK is nice to code when I'm burned out.
To run this script you need AutoHotkey: https://autohotkey.com/
You don't need to run this as admin, feel free to if you want - or if future versions require it for some reason.
Only tested on Windows 10.
In the first version, four accounts need to be registered. If you have a basic understanding of AHK syntax you can modify this number as it's fairly basic.
For security reasons I would suggest having custom passwords for these trove accounts as the emails and passwords are stored in a text file, up to you.
On first run you set the emails and passwords.
Second run the script logs in with the saved emails and passwords.
You can go into the file "database.txt" and edit the emails and passwords, just keep emails and passwords on separate lines in the format shown.
Left a few debugging lines in if you want to mess with it.
Version 1.1:
Code:
/*
Comment section:
- Made by BLURREDDOGE(https://www.mpgh.net/forum/member.php?u=2877154) at https://www.mpgh.net!
Copyright 2018, Luke Roper, All rights reserved.
- https://www.gov.uk/copyright
*/
if FileExist("database.txt")
{
Array := [] ; or Array := Array()
breakline = `n
Loop, Read, database.txt
{
Array.Push(A_LoopReadLine)
}
for index, element in Array
{
oof := Mod(index, 2)
if oof = 0
{
Passwords := Passwords . element . breakline
if index = 2
{
Global Password_One
Password_One := Password_One . element
}
if index = 4
{
Global Password_Two
Password_Two := Password_Two . element
}
if index = 6
{
Global Password_Three
Password_Three := Password_Three . element
}
if index = 8
{
Global Password_Four
Password_Four := Password_Four . element
}
}
else
{
Emails := Emails . element . breakline
if index = 1
{
Global Email_One
Email_One := element
}
if index = 3
{
Global Email_Two
Email_Two := element
}
if index = 5
{
Global Email_Three
Email_Three := element
}
if index = 7
{
Global Email_Four
Email_Four := element
}
} ; End of Email and Password fetch
}
SetTitleMatchMode, 2
SetControlDelay -1
wait_for_login := 3000
wait_for_trove_to_open := 5000
SetKeyDelay, 10, 5
;##############################################
; Open login 1 #
;##############################################
ControlClick, x1065 y20, Glyph ; Login...
Sleep, 250
ControlSend,, {down down}{down up}, Glyph
Sleep, 250
ControlClick, x1065 y20, Glyph ; Login...
Sleep, 250
ControlSend,, {down down}{down up}, Glyph
Sleep, 250
;##############################################
; Login account 1 #
;##############################################
ControlSend,, %Email_One%, Glyph Login
Sleep, 250
ControlClick, x147 y322, Glyph Login
Sleep, 250
ControlSend,, %Password_One%, Glyph Login
Sleep, 250
ControlSend,, {enter down}{enter up}, Glyph Login ; Returing to Glyph
Sleep, %wait_for_login% ; Wait for menu to go away
ControlClick, x430 y530, Glyph ;Click Play to login
Sleep, %wait_for_trove_to_open%
;##############################################
; Open login 2 #
;##############################################
ControlClick, x1065 y20, Glyph ; Login...
Sleep, 250
ControlSend,, {down down}{down up}, Glyph
Sleep, 250
ControlClick, x1065 y20, Glyph ; Login...
Sleep, 250
ControlSend,, {down down}{down up}, Glyph
Sleep, 250
;##############################################
; Login account 2 #
;##############################################
ControlSend,, %Email_Two%, Glyph Login
Sleep, 250
ControlClick, x147 y322, Glyph Login
Sleep, 200
ControlSend,, %Password_Two%, Glyph Login
Sleep, 250
ControlSend,, {enter down}{enter up}, Glyph Login
Sleep, %wait_for_login%
ControlClick, x430 y530, Glyph ;Click Play to login
Sleep, %wait_for_trove_to_open%
;##############################################
; Open login 3 #
;##############################################
ControlClick, x1065 y20, Glyph ; Login...
Sleep, 250
ControlSend,, {down down}{down up}, Glyph
Sleep, 250
ControlClick, x1065 y20, Glyph ; Login...
Sleep, 250
ControlSend,, {down down}{down up}, Glyph
Sleep, 250
;##############################################
; Login account 3 #
;##############################################
ControlSend,, %Email_Three%, Glyph Login
Sleep, 250
ControlClick, x147 y322, Glyph Login
Sleep, 200
ControlSend,, %Password_Three%, Glyph Login
Sleep, 250
ControlSend,, {enter down}{enter up}, Glyph Login
Sleep, %wait_for_login%
ControlClick, x430 y530, Glyph ;Click Play to login
Sleep, %wait_for_trove_to_open%
;##############################################
; Open login 4 #
;##############################################
ControlClick, x1065 y20, Glyph ; Login...
Sleep, 250
ControlSend,, {down down}{down up}, Glyph
Sleep, 250
ControlClick, x1065 y20, Glyph ; Login...
Sleep, 250
ControlSend,, {down down}{down up}, Glyph
Sleep, 250
;##############################################
; Login account 4 #
;##############################################
ControlSend,, %Email_Four%, Glyph Login
Sleep, 250
ControlClick, x147 y322, Glyph Login
Sleep, 200
ControlSend,, %Password_Four%, Glyph Login
Sleep, 250
ControlSend,, {enter down}{enter up}, Glyph Login
Sleep, %wait_for_login%
ControlClick, x430 y530, Glyph ;Click Play to login
Sleep, %wait_for_trove_to_open%
ExitApp ;Accounts have been logged in, no need to keep script active
} ;If no file is detected this is skipped
IfNotExist, database.txt
{
Gui, New,, GUI
Gui, Color, red
;Gui Group 1
Gui, Add, groupbox, x10 y5 w180 h105
Gui, Add, Text, x15 y15, Email 1:
Gui, Add, Edit, w170 vEmail_One
Gui, Add, Text, x15 y65, Password 1:
Gui, Add, Edit, w170 Password vPassword_One
;Gui Group 2
Gui,add, groupbox, x10 y105 w180 h115
Gui, Add, Text, x15 y125, Email 2:
Gui, Add, Edit, w170 vEmail_Two
Gui, Add, Text, x15 y175, Password 2:
Gui, Add, Edit, w170 Password vPassword_Two
;Gui Group 3
Gui,add, groupbox, x10 y215 w180 h105
Gui, Add, Text, x15 y225, Email 3:
Gui, Add, Edit, w170 vEmail_Three
Gui, Add, Text, x15 y275, Password 3:
Gui, Add, Edit, w170 Password vPassword_Three
;Gui Group 4
Gui,add, groupbox, x10 y315 w180 h135
Gui, Add, Text, x15 y325, Email 4:
Gui, Add, Edit, w170 vEmail_Four
Gui, Add, Text, x15 y375, Password 4:
Gui, Add, Edit, w170 Password vPassword_Four
Gui, Add, Button, Default gOK, Save Emails/Passwords to use
Gui, Show, w205 h460
return
OK:
Gui, Submit
Gui, Destroy
MsgBox,
(
First Email: %Email_One%
First Password: %Password_One%
Second Email: %Email_Two%
Second Password: %Password_Two%
Third Email: %Email_Three%
Third Password: %Password_Three%
Fourth Email: %Email_Four%
Fourth Password: %Password_Four%
)
;Writes emails+ps to file
;#####################################################################
; Writing variables to file
;#####################################################################
FileAppend, %Email_One%`n, database.txt
FileAppend, %Password_One%`n, database.txt
FileAppend, %Email_Two%`n, database.txt
FileAppend, %Password_Two%`n, database.txt
FileAppend, %Email_Three%`n, database.txt
FileAppend, %Password_Three%`n, database.txt
FileAppend, %Email_Four%`n, database.txt
FileAppend, %Password_Four%`n, database.txt
;Run, database.txt
;return
ExitApp
}
I don't know how I managed to open the Glyph Login window with (click,down,click,down), that was an error that made it easier.
Names of important variables:
- Email_<number 1-4> = Email to save or taken from file on line 1,3,5 or 7
- Password_<number 1-4> = Password to save or taken from file on line 2,4,6 or 8
- wait_for_login = Time in ms to delay, waiting for login menu to go away
- wait_for_trove_to_open = Time in ms to delay, waiting for trove client to open
- breakline = Variable that acts as, `n, used to make a newline.
The Glyph menu is called "Glyph" while the login popup you get is called "Glyph Login"
(Window)Coords:
- To click "Login..." = x1065 y20
- To click the password entry box = x147 y322
- To click play = x430 y530
I welcome posting of errors and suggestions in the comment section if they haven't been already.
I threw it together in a few hours, it has some fairly large problems so far.
Code:
Current Issues:
- When user interacts with keys, they will also be input
Experimenting with SendInput to stop this if it's enough of an issue.
Code:
Bugfixes:
- Script will now properly send all characters
---------------------------------------------------------------------------------------------------------------------------------------
OLD VERSIONS:
(For archiving and learning)
V1.0:
Code:
/*
Comment section:
- Made by BLURREDDOGE(https://www.mpgh.net/forum/member.php?u=2877154) at https://www.mpgh.net!
Copyright 2018, Luke Roper, All rights reserved.
- https://www.gov.uk/copyright
*/
if FileExist("database.txt")
{
Array := [] ; or Array := Array()
breakline = `n
Loop, Read, database.txt
{
Array.Push(A_LoopReadLine)
}
for index, element in Array
{
oof := Mod(index, 2)
if oof = 0
{
Passwords := Passwords . element . breakline
if index = 2
{
Global Password_One
Password_One := Password_One . element
}
if index = 4
{
Global Password_Two
Password_Two := Password_Two . element
}
if index = 6
{
Global Password_Three
Password_Three := Password_Three . element
}
if index = 8
{
Global Password_Four
Password_Four := Password_Four . element
}
}
else
{
Emails := Emails . element . breakline
if index = 1
{
Global Email_One
Email_One := element
}
if index = 3
{
Global Email_Two
Email_Two := element
}
if index = 5
{
Global Email_Three
Email_Three := element
}
if index = 7
{
Global Email_Four
Email_Four := element
}
} ; End of Email and Password fetch
}
SetTitleMatchMode, 2
SetControlDelay -1
wait_for_login := 3000
wait_for_trove_to_open := 5000
;##############################################
; Open login 1 #
;##############################################
ControlClick, x1065 y20, Glyph ; Login...
Sleep, 250
ControlSend,, {down down}{down up}, Glyph
Sleep, 250
ControlClick, x1065 y20, Glyph ; Login...
Sleep, 250
ControlSend,, {down down}{down up}, Glyph
Sleep, 250
;##############################################
; Login account 1 #
;##############################################
ControlSend,, %Email_One%, Glyph Login
Sleep, 250
ControlClick, x147 y322, Glyph Login
Sleep, 250
ControlSend,, %Password_One%, Glyph Login
Sleep, 250
ControlSend,, {enter down}{enter up}, Glyph Login ; Returing to Glyph
Sleep, %wait_for_login% ; Wait for menu to go away
ControlClick, x430 y530, Glyph ;Click Play to login
Sleep, %wait_for_trove_to_open%
;##############################################
; Open login 2 #
;##############################################
ControlClick, x1065 y20, Glyph ; Login...
Sleep, 250
ControlSend,, {down down}{down up}, Glyph
Sleep, 250
ControlClick, x1065 y20, Glyph ; Login...
Sleep, 250
ControlSend,, {down down}{down up}, Glyph
Sleep, 250
;##############################################
; Login account 2 #
;##############################################
ControlSend,, %Email_Two%, Glyph Login
Sleep, 250
ControlClick, x147 y322, Glyph Login
Sleep, 200
ControlSend,, %Password_Two%, Glyph Login
Sleep, 250
ControlSend,, {enter down}{enter up}, Glyph Login
Sleep, %wait_for_login%
ControlClick, x430 y530, Glyph ;Click Play to login
Sleep, %wait_for_trove_to_open%
;##############################################
; Open login 3 #
;##############################################
ControlClick, x1065 y20, Glyph ; Login...
Sleep, 250
ControlSend,, {down down}{down up}, Glyph
Sleep, 250
ControlClick, x1065 y20, Glyph ; Login...
Sleep, 250
ControlSend,, {down down}{down up}, Glyph
Sleep, 250
;##############################################
; Login account 3 #
;##############################################
ControlSend,, %Email_Three%, Glyph Login
Sleep, 250
ControlClick, x147 y322, Glyph Login
Sleep, 200
ControlSend,, %Password_Three%, Glyph Login
Sleep, 250
ControlSend,, {enter down}{enter up}, Glyph Login
Sleep, %wait_for_login%
ControlClick, x430 y530, Glyph ;Click Play to login
Sleep, %wait_for_trove_to_open%
;##############################################
; Open login 4 #
;##############################################
ControlClick, x1065 y20, Glyph ; Login...
Sleep, 250
ControlSend,, {down down}{down up}, Glyph
Sleep, 250
ControlClick, x1065 y20, Glyph ; Login...
Sleep, 250
ControlSend,, {down down}{down up}, Glyph
Sleep, 250
;##############################################
; Login account 4 #
;##############################################
ControlSend,, %Email_Four%, Glyph Login
Sleep, 250
ControlClick, x147 y322, Glyph Login
Sleep, 200
ControlSend,, %Password_Four%, Glyph Login
Sleep, 250
ControlSend,, {enter down}{enter up}, Glyph Login
Sleep, %wait_for_login%
ControlClick, x430 y530, Glyph ;Click Play to login
Sleep, %wait_for_trove_to_open%
ExitApp ;Accounts have been logged in, no need to keep script active
} ;If no file is detected this is skipped
IfNotExist, database.txt
{
Gui, New,, GUI
Gui, Color, red
;Gui Group 1
Gui, Add, groupbox, x10 y5 w180 h105
Gui, Add, Text, x15 y15, Email 1:
Gui, Add, Edit, w170 vEmail_One
Gui, Add, Text, x15 y65, Password 1:
Gui, Add, Edit, w170 Password vPassword_One
;Gui Group 2
Gui,add, groupbox, x10 y105 w180 h115
Gui, Add, Text, x15 y125, Email 2:
Gui, Add, Edit, w170 vEmail_Two
Gui, Add, Text, x15 y175, Password 2:
Gui, Add, Edit, w170 Password vPassword_Two
;Gui Group 3
Gui,add, groupbox, x10 y215 w180 h105
Gui, Add, Text, x15 y225, Email 3:
Gui, Add, Edit, w170 vEmail_Three
Gui, Add, Text, x15 y275, Password 3:
Gui, Add, Edit, w170 Password vPassword_Three
;Gui Group 4
Gui,add, groupbox, x10 y315 w180 h135
Gui, Add, Text, x15 y325, Email 4:
Gui, Add, Edit, w170 vEmail_Four
Gui, Add, Text, x15 y375, Password 4:
Gui, Add, Edit, w170 Password vPassword_Four
Gui, Add, Button, Default gOK, Save Emails/Passwords to use
Gui, Show, w205 h460
return
OK:
Gui, Submit
Gui, Destroy
MsgBox,
(
First Email: %Email_One%
First Password: %Password_One%
Second Email: %Email_Two%
Second Password: %Password_Two%
Third Email: %Email_Three%
Third Password: %Password_Three%
Fourth Email: %Email_Four%
Fourth Password: %Password_Four%
)
;Writes emails+ps to file
;#####################################################################
; Writing variables to file
;#####################################################################
FileAppend, %Email_One%`n, database.txt
FileAppend, %Password_One%`n, database.txt
FileAppend, %Email_Two%`n, database.txt
FileAppend, %Password_Two%`n, database.txt
FileAppend, %Email_Three%`n, database.txt
FileAppend, %Password_Three%`n, database.txt
FileAppend, %Email_Four%`n, database.txt
FileAppend, %Password_Four%`n, database.txt
;Run, database.txt
;return
ExitApp
}