Skip to content

Commit

Permalink
Added an option to wait for ankama shield and the 1 Click 2 Play button.
Browse files Browse the repository at this point in the history
  • Loading branch information
DetroitApps committed Nov 4, 2019
1 parent e70b804 commit 9ebc08d
Show file tree
Hide file tree
Showing 13 changed files with 42 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ It is developed with the sweet [AutoHotKey](https://www.autohotkey.com/) scripti

## Warning

This software is <u>not a cheat</u> and <u>never will be</u>. Its only purpose is to play the game with multiple accounts easier than what is currently offered by the game itself. If you are looking for something that plays the game for you, you are not in the right place.
This software is **not a cheat** and **never will be**. Its only purpose is to play the game with multiple accounts easier than what is currently offered by the game itself. If you are looking for something that plays the game for you, you are not in the right place.

## Limitations

Expand Down
2 changes: 2 additions & 0 deletions Scenarios/LoginAccounts.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ Main:
return
}
Loop, % API.GetNbWindows() {
If (Settings.WaitForAnkamaShield = True)
MsgBox, % Translate("UnlockShield", API.GetUsername(A_Index))
window := API.GetWindow(A_Index)
window.Activate()
window.WaitActive()
Expand Down
2 changes: 2 additions & 0 deletions Scenarios/Out/MergedScenarios.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ LoginAccounts:
return
}
Loop, % API.GetNbWindows() {
If (Settings.WaitForAnkamaShield = True)
MsgBox, % Translate("UnlockShield", API.GetUsername(A_Index))
window := API.GetWindow(A_Index)
window.Activate()
window.WaitActive()
Expand Down
5 changes: 4 additions & 1 deletion Tools/Release Maker/Release Maker.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ Loop, Read, MakeFile
;Compile ahk files
If (InStr(A_LoopReadLine, ".ahk"))
{
outputFile := rootDir . StrSplit(A_LoopReadLine, ".")[1] . ".exe"
if (InStr(A_LoopReadLine, "app.ahk"))
outputFile := rootDir . "Retro Multi Manager.exe"
else
outputFile := rootDir . StrSplit(A_LoopReadLine, ".")[1] . ".exe"
cmd := """c:\Program Files\AutoHotkey\Compiler\Ahk2Exe.exe"" /in """ . rootDir . A_LoopReadLine
. """ /out """ . outputFile
. """ /icon """ . rootDir . "Resources\icon.ico"""
Expand Down
2 changes: 1 addition & 1 deletion Tools/Release Maker/build.ini
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[Build]
Id=14
Id=15
2 changes: 2 additions & 0 deletions app.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ If (Settings.GuiStatus = True) {
GuiControl, Choose, SelectSpeed, % Settings.Speed
If (Settings.CheckForUpdates = True)
GuiControl, , CheckCheckUpdateOnStart, 1
If (Settings.WaitForAnkamaShield = True)
GuiControl, , CheckWaitForAnkamaShield, 1
Gui, Submit, NoHide
}

Expand Down
2 changes: 2 additions & 0 deletions resources/i18n/en-US.ini
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,5 @@ CloseDofusInstances=Close Dofus
Cycle=Cycle through windows
CycleBackwards=Cycle through windows (backwards)
OtherHotkeys=Other hotkeys
WaitForAnkamaShield=Wait for Ankama Shield
UnlockShield=Unlock Ankama Shield for {1} then press Enter.
2 changes: 2 additions & 0 deletions resources/i18n/fr-FR.ini
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,5 @@ CloseDofusInstances=Fermer Dofus
Cycle=Naviguer entre les fenêtres
CycleBackwards=Naviguer entre les fenêtres (à l'envers)
OtherHotkeys=Autres raccourcis
WaitForAnkamaShield=Attendre pour Ankama Shield
UnlockShield=Dévérouillez Ankama Shield pour {1} puis appuyez sur Entrée.
1 change: 1 addition & 0 deletions settings_default.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Speed=3
Language=
DefaultProfile=1
Gui=True
WaitForAnkamaShield=False
CheckForUpdates=False
FirstStart=True

Expand Down
6 changes: 5 additions & 1 deletion src/class/settings.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Class Settings {
DefaultProfile := 1
GuiStatus := False
CheckForUpdates := False
WaitForAnkamaShield := False
FirstStart := False
Debug := False
Dev := False
Expand All @@ -19,8 +20,8 @@ Class Settings {
FileRead, version, version.txt
this.Version := version
this.IniPath := IniPath

; Grab config from INI

If (IniPath = "settings_default.ini")
{
FileCopy, %IniPath%, settings.ini
Expand All @@ -39,6 +40,7 @@ Class Settings {
IniRead, DefaultProfile, %IniPath%, Program, DefaultProfile, %A_Space%
IniRead, GuiStatus, %IniPath%, Program, Gui
IniRead, CheckForUpdates, %IniPath%, Program, CheckForUpdates
IniRead, WaitForAnkamaShield, %IniPath%, Program, WaitForAnkamaShield
IniRead, FirstStart, %IniPath%, Program, FirstStart

If !Language
Expand All @@ -47,8 +49,10 @@ Class Settings {
this.Language := Language
this.GuiStatus := GuiStatus = "True" ? True : False
this.CheckForUpdates := CheckForUpdates = "True" ? True : False
this.WaitForAnkamaShield := WaitForAnkamaShield = "True" ? True : False
this.FirstStart := FirstStart = "True" ? True : False
this.DefaultProfile := DefaultProfile

; Mode
IniRead, Debug, %IniPath%, Mode, Debug
IniRead, Dev, %IniPath%, Mode, Dev
Expand Down
5 changes: 4 additions & 1 deletion src/gui/gui.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ Gui, Add, Button, x+10 w80 gGui_Browse, % Translate("Browse")
;Speed
Gui, Add, Text, xs+10 ys+60 %guiLabelOptions%, % Translate("Speed")
Gui, Add, DropDownList, x+10 AltSubmit vSelectSpeed gGui_ChangeSpeed, % Translate("SpeedFastest") "|" Translate("SpeedFaster") "|" Translate("SpeedNormal") "||" Translate("SpeedSlower") "|" Translate("SpeedSlowest")
Gui, Add, CheckBox, x+10 gGui_WaitForAnkamaShield vCheckWaitForAnkamaShield h20 0x200, % Translate("WaitForAnkamaShield")


;Updates
Gui, Add, Text, ys+90 xs+10 %guiLabelOptions%, % Translate("Program")
Expand Down Expand Up @@ -115,7 +117,8 @@ Gui, Font, Bold
Gui, Add, GroupBox, xm ym+10 y+20 Section w%groupboxWidth% h120, % Translate("Scenarios")
Gui, Font, Normal s10

Gui, Add, Button, ys+30 xs+10 gGui_OpenDofus, % "[" GetHotkeyForScenario("OpenDofusInstances") "] " Translate("StartDofus")
Gui, Add, Button, ys+30 xs+10 gGui_1Click2Play, % "1 Click 2 Play"
Gui, Add, Button, x+10 gGui_OpenDofus, % "[" GetHotkeyForScenario("OpenDofusInstances") "] " Translate("StartDofus")
Gui, Add, Button, x+10 gGui_LoginAccounts, % "[" GetHotkeyForScenario("LoginAccounts") "] " Translate("LoginAccounts")
Gui, Add, Button, x+10 gGui_ConnectPlayersOnServer, % "[" GetHotkeyForScenario("ConnectPlayersOnServer") "] " Translate("ConnectPlayersOnServer")
Gui, Add, Button, x+10 gGui_CloseDofus, % "[" GetHotkeyForScenario("CloseDofusInstances") "] " Translate("CloseDofusInstances")
Expand Down
15 changes: 15 additions & 0 deletions src/labels/gui-labels.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ GuiClose:
ExitApp
return

#SC029::
Gui_1Click2Play:
Gosub, OpenDofusInstances
SleepHandler(2500)
Gosub, LoginAccounts
SleepHandler(2500)
Gosub, ConnectPlayersOnServer
return

Gui_ClearAccountData:
GuiControl,,CheckEncryption, 0
GuiControl,,CheckDefaultProfile, 0
Expand Down Expand Up @@ -47,6 +56,12 @@ Gui_ToggleCheckUpdateOnStart:
IniWrite, % CheckCheckUpdateOnStart = 1 ? "True" : "False", %IniPath%, Program, CheckForUpdates ;move to class
return

Gui_WaitForAnkamaShield:
Gui, Submit, NoHide
IniWrite, % CheckWaitForAnkamaShield = 1 ? "True" : "False", %IniPath%, Program, WaitForAnkamaShield ;move to class
Settings.WaitForAnkamaShield := CheckWaitForAnkamaShield = 1 ? True : False
return

Gui_RunScenario:
Gui, Submit, NoHide
Gosub, %SelectScenario%
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.1-beta
1.0.2-beta

0 comments on commit 9ebc08d

Please sign in to comment.