Page 1 of 2

Darkfall Launcher Script

Posted: March 14th, 2009, 2:31 am
by jackabal
Hi,
I bet there will a lot of queuing this WE, so I wrote this little launcher to deal with it. As soon as a slot is ready, it will launch the game, it goes really fast.

Its based on AutoHotkey, install it :http://www.autohotkey.com/download/

Edit the script to adjust the variables to your needs :
=> LobbyPath=E:\Games\DarkfallOnline\Lobby.exe
Adjust :p

RelaunchOnDisconnect = 1
=> Relaunch the game automatically after a crash/patch

LaunchGameWhenSlotReady = 1
=> If a slot is open, it will click on play and lauch the game



Edit: 17/03
I've tried everything, some guildmates tried every version of the script I made, we couldn't find a way to get in faster...
I've also tried to completely relaunch the lobby super fast but it doesn't help too. This is SO annoying....

Best tip I can give is :
- Use a scheduled task in windows to launch my script a few hours before you come home from work. So when arrive at home, your slot is ready ^^
- Once ingame, launch manually another lobby.exe, you can actually queue while playing, so if Darkfall crash you can maybe have your 2nd slot ready instantly.
- Avoid teleports, I crashed yesterday while going out of a dungeon and today when binstone_recalling

Anyway, here's the last version of the script, it can relaunch the game automatically on crashes.

feel free to report bugs,It's hard to do lot of tests, especially on the automatic relaunch...

Posted: March 14th, 2009, 2:36 am
by jackabal
.

Posted: March 14th, 2009, 6:30 am
by defariak
you sure this don't terminally reset your place in the q

"because after patch there is usually no for the first 5 seconds."

Posted: March 14th, 2009, 7:15 am
by jackabal
I don't think so. The looby makes a IE-like refresh sound after a while (2min maybe) so I think it's autorefreshing anyway

You can desactivate the 2s refresh btw

Posted: March 14th, 2009, 9:35 am
by henrikgud
humf u need to remove the spamclick that im 99% sure of since it will end/get u back in que...

havent had a server crash yet so havent tried it 2 100%
will get back with info when I know more!

Posted: March 14th, 2009, 9:38 am
by celestrian
directly, or shortly, after a crash, the ques are usually very short.

if you are in a que, then click your character again, you exit the que. whether or not you resume your place in the que or end at the back of the que, I do not know. I really can't see how doing that can lessen the queing time.

Posted: March 14th, 2009, 10:52 am
by jackabal
in fact, there was 2 crashs this morning and with the script, I was ingame before dfotray alert me that the servers was online ^^

but as you said, after a crash, the queue is rather small so it's not that relevant

Posted: March 14th, 2009, 1:25 pm
by henrikgud
can I run it in the background?
and can i make the macro start automatically when server crash?

Posted: March 14th, 2009, 1:53 pm
by Spitt
You can not run scripts in the background.

Can you please post the source code, since it is based on AutoHotKey?

Posted: March 14th, 2009, 2:06 pm
by henrikgud
;
; Script Function: Darkfall Launcher
; Author: jackabal

; Template script (you can customize this template by editing "ShellNew\Template.ahk" in your Windows folder)
;

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#SingleInstance force
;CoordMode, Mouse, Screen
Process, Priority, , HIGH
SetMouseDelay, 0
;SetDefaultMouseSpeed, 0
SetWinDelay, 0
SetControlDelay, 0


;================================================
; Variables
; Adjust to your needs
;================================================
LobbyPath=C:\Program Files (x86)\Darkfall\Lobby.exe
spamclick=0
checkforredbar=1


;================================================
; Main
;================================================
Run, %LobbyPath%
Window_TXT = Darkfall End User License
Winwait , %Window_TXT%
WinActivate , %Window_TXT%
WinwaitActive , %Window_TXT%
ControlClick, Button1, %Window_TXT%
Window_TXT = Darkfall 1.0.
Winwait , %Window_TXT%
ControlClick, Static1, %Window_TXT%
Winwait , %Window_TXT%, Patching completed
ControlClick, Static5, %Window_TXT%
sleep 200
ControlClick, Static19, %Window_TXT%


SlotReady=0
While SlotReady=0
{
slottxt =You have a login slot, press play
Winwait , %Window_TXT%, %slottxt% ,2,
if ErrorLevel ; i.e. if window is not present
{
if spamclick=1
{
if checkforredbar=1
{
Winactivate , %Window_TXT%
Winwaitactive , %Window_TXT%
PixelGetColor, pixcolor, 301,165 ,RGB
if pixcolor != 0xFF1222
{
ControlClick, Static19, %Window_TXT%
sleep 100
ControlClick, Static19, %Window_TXT%
}
}
else
{
ControlClick, Static19, %Window_TXT%
sleep 100
ControlClick, Static19, %Window_TXT%
}
}
}
else
SlotReady =1
}
ControlClick, Static6, %Window_TXT% ;click on play !

Posted: March 14th, 2009, 3:51 pm
by jackabal
henrikgud wrote:can I run it in the background?
and can i make the macro start automatically when server crash?


I'll do it tomorrow, it won't be a problem
I'll just need all the error message for detection
So I have this one from tonight : "Error from server: Server maintenance."

Theres a error message like "lost connection to server" , I need the exact message.
If someone got the message, save it ^^

Posted: March 14th, 2009, 3:54 pm
by henrikgud
ah great! will take pritnscreen now when I get kicked out.

Posted: March 14th, 2009, 5:53 pm
by Spitt
/aye when it's fixed :)

Nice job on the script

Posted: March 14th, 2009, 6:39 pm
by henrikgud
lost connection to server

see pic[/img]

Posted: March 14th, 2009, 7:37 pm
by danzar
Can Members Yay or Nay this plz.