Jump to content
Sedstr

Know Your Server Session History

Recommended Posts

Simple batch file/script I wrote to present session history in order.

Copy to a text file, save as DayZHistory.bat or whatever.bat and run it.

While playing, it will present your server session connection history in order.

@echo off

setlocal

set FileName=%HOMEDRIVE%\%HOMEPATH%\Documents\DayZ\%USERNAME%.DayZProfile

set FileTime="-"

:loop

for %%X in (%FileName%) do (

    if %FileTime% NEQ "%%~tX" (

        type %FileName% | find "lastMPServer"

    )

    set FileTime="%%~tX"

)

rem wait 5 seconds before checking again

TIMEOUT /T 5 >nul 2>nul

goto :loop

You can change the TIMEOUT value to anything you like, 120 seconds may be more appropriate.

Hope this helps...

Edited by Sedstr
  • Like 8

Share this post


Link to post
Share on other sites

Interesting that you use a ping to wait 5 seconds. I suppose that works...

If it were in ksh, which I originally wrote it in, its a simple 'sleep 5' but in dos, I dont know of any other way to sleep the loop.

there is probably a better way in Power Shell, I just thought it would be easier to do in a vanilla DOS, in case people didn't have powershell installed.

Having said that, you could change the number of seconds between tests to whatever you think appropriate, pick a number below the wait time between connecting to a new server, 120 seconds could work fine I guess.

Edited by Sedstr

Share this post


Link to post
Share on other sites

Why thank you good sir! 

 

tumblr_m4nikbnLH61r08oe3o1_500.gif

  • Like 1

Share this post


Link to post
Share on other sites

If it were in ksh, which I originally wrote it in, its a simple 'sleep 5' but in dos, I dont know of any other way to sleep the loop.

there is probably a better way in Power Shell, I just thought it would be easier to do in a vanilla DOS, in case people didn't have powershell installed.

Having said that, you could change the number of seconds between tests to whatever you think appropriate, pick a number below the wait time between connecting to a new server, 120 seconds could work fine I guess.

 

 

timeout ?

  • Like 1

Share this post


Link to post
Share on other sites

timeout ?

Fixed, thanks kichilron.

Share this post


Link to post
Share on other sites

Fixed, thanks kichilron.

 

 

Might not work on Windows XP, but who uses that these days anyway? ;)

 

Also might want to include some "code"-brackets around the code bit in BB-Code.

Edited by kichilron

Share this post


Link to post
Share on other sites

Might not work on Windows XP, but who uses that these days anyway? ;)

 

Also might want to include some "code"-brackets around the code bit in BB-Code.

I tried using code brackets, it indents it nice, but adds horible syntax highlighting.

It also removed any whitespace/cr and added code:auto=0 to it after editing it again. I tried code:dos, didn't fix the broken highlighting though.

  • Like 1

Share this post


Link to post
Share on other sites

Nice.my faves and server history constantly just do not work.  :thumbsup:  :beans:

Share this post


Link to post
Share on other sites

glad its helped a few people

Share this post


Link to post
Share on other sites

Very nice. Now if only the devs would just incorporate that feature into the useless "History" list so it wasn't a rambling mess we'd be set. ;)

Share this post


Link to post
Share on other sites

Very nice. Now if only the devs would just incorporate that feature into the useless "History" list so it wasn't a rambling mess we'd be set. ;)

when they finish playing with ragdoll physics...

Edited by Sedstr

Share this post


Link to post
Share on other sites

in case you missed it....

Share this post


Link to post
Share on other sites

Nice OP! ^-^  :beans:

Share this post


Link to post
Share on other sites

Nice OP! ^-^  :beans:

TY

Share this post


Link to post
Share on other sites
@echo offsetlocalset FileName=%HOMEDRIVE%\%HOMEPATH%\Documents\DayZ\%USERNAME%.DayZProfileset FileTime="-"set LogFile=E:\Scripts\DayZSessionHistory.txt:loopfor %%X in (%FileName%) do (    if %FileTime% NEQ "%%~tX" (		echo "%%~tX" >> %LogFile%        type %FileName% | find "lastMPServer" >> %LogFile%     )    set FileTime="%%~tX")rem wait 2 minutes (120) seconds before checking againTIMEOUT /T 120 >nul 2>nulgoto :loop

You know, this has been really really helpful. I took it a step further and store that information to a log file I can go back and check. The output in the log file looks like this:

"05/22/2014 09:34 PM" lastMPServer="108.174.57.17:2802";lastMPServerName="|g4| Look at the Flowers... | Chicago | 24/7 Day | 2hr Restarts";

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×