EZ Server

General Category => General Discussion => Topic started by: slaughterhaus on July 08, 2015, 01:00:28 am



Title: >.BAT launch assist< By popular demand.
Post by: slaughterhaus on July 08, 2015, 01:00:28 am
Ahoy hoy folks.

There was some chatter in OOC looking for a method to log in all your dudes using a .BAT. This is the set up I use. It's posted here somewhere, or at least some of it is. I pulled some information from other sources too. I don't recall how much though. I take no credit for any of this, I got help along the way from some nice folks. I'm just a savy copy paste dude.

Start with note pad. You will create a .bat file, to do this:
  • Copy the text below from @echo off   all the way down to the last /t5.
  • Paste in a new note pad doc and save as EQdudes.bat
  • Make sure you change the file locations to your eq folders.As you can see I run three hard drives with 3 separate folders

The first bit tells you to update the MQ2autologin.INI with the correct server number. The way I get this number is logging in my main dude and once he's loaded in I look into the eqlsplayerdata.ini file and locate the server number. It displays the server number in the same spot, I copy that then I paste that into the MQ2autologin.ini as I mentioned before. Down below I'll show you the format I use for my MQ2autologin.INI file.
<stay tuned>

P.s. You can add more lines to the text below or remove it to reflect the actual characters you have. (seemed obvious but figured I might save you a headache in case it wasn't so for you.)
--------------------------------------------------------------------------------------

@echo off
setlocal enableextensions enabledelayedexpansion
set LastServerID=
for /f %%a in (C:\ROF2\eqlsPlayerData.ini) do (
    set line=%%a
    if "x!line:~0,13!"=="xLastServerID=" (
        set LastServerID=!line:~13,15!
    )
)
echo last server id: !LastServerID!
endlocal
echo change your "MQ2AutoLogin.ini" server #
timeout /t -1

cd ""C:\ROF2"

start "Character1" /b "C:\ROF2\eqgame.exe" patchme /Login:xxxx
timeout /t 5
start "Character2" /b "C:\ROF2\eqgame.exe" patchme /Login:xxxxx
timeout /t 5
cd ""G:\ROF2"
start "Character3" /b "G:\ROF2\eqgame.exe" patchme /Login:xxxxx
timeout /t 5
start "Character4" /b "G:\ROF2\eqgame.exe" patchme /Login:xxxxx
timeout /t 5
start "Character5" /b "G:\ROF2\eqgame.exe" patchme /Login:xxxxxx
timeout /t 5
cd ""D:\ROF2"
start "Character6" /b "D:\ROF2\eqgame.exe" patchme /Login:xxxxx
timeout /t 5
start "Character7" /b "D:\ROF2\eqgame.exe" patchme /Login:xxxxxx
timeout /t 5
start "Character 8" /b "D:\ROF2\eqgame.exe" patchme /Login:xxxxxx
timeout /t 5



-----------Locate your MQ2 folder and find the MQ2autologin.INI file save it to look like this-----------
!! Notice the red EZ server number. This is where you change the server number. It usually changes daily. If you forget and run the .bat it will log you into some random server and you will see a default character rather than your EZ studs.!!

[Settings]
KickActiveCharacter=1
InstantCamp=0
UseStationNamesInsteadofSessions=1
UseIniServerlist=1

[ServerList]
EZ Server=78

[Characterstationname]
Password=xxxxx
Server=EZ Server
Character=Character1

[Characterstationname]
Password=xxxxx
Server=EZ Server
Character=Character2

[Characterstationname]
Password=xxxxx
Server=EZ Server
Character=Character3

[Characterstationname]
Password=xxxxx
Server=EZ Server
Character=Character4

[Characterstationname]
Password=xxxxx
Server=EZ Server
Character=Character5

[Characterstationname]
Password=xxxxx
Server=EZ Server
Character=Character6

[Characterstationname]
Password=xxxxx
Server=EZ Server
Character=Character7

--------------

Those are the two files you will create. The log in process goes as follows each time you load in your dudes.

  • Launch EQBC
  • Load in main character
  • Locate server number in eqlsplayerdata.ini
  • Paste server number in your MQ2autologin.INI - save and close it.
  • Start MQ2
  • Double click your eqdudes.bat - it will show you the server number. Make sure it's right.
  • Click any button.

Two min later all your dudes are standing where you left them waiting for you to find Deadend in game and give him a high five, or a courtesy reach around. Either way everyone wins right? right? oh....

I hope this helps. If you get into this and find yourself not sure what to do next feel free to PM me. I'm happy to help.

Deadend


Title: Re: >.BAT launch assist< By popular demand.
Post by: Phah on July 08, 2015, 10:29:18 pm
A while ago I got bored and automated the 'finding and updating server number' bit with another bat file. This would essentially replace all the bit before you start actually opening the clients. You still need to log in your main character first, but it saves you opening up two files and copy-pasting between them. I know, a savings of 15 seconds; like I said I was bored :P

-------------------------------------------------------------
@echo off
SETLOCAL enabledelayedexpansion

set "_serverId=LastServerID"
set "_serverName=EZ (Linux) x4 Exp"
set BackupFile=<path to MQ>\MQ2AutoLogin.txt
set OutFile=<path to MQ>\MQ2AutoLogin.ini
set firstFile=<path to ROF2>\eqlsPlayerData.ini

echo Getting server number...

FOR /F "usebackq tokens=1,2 delims== " %%a IN ("%FirstFile%") DO (
if "%%a" equ "%_serverId%" (set serverID=%%b)
)

echo Server number is: %serverID%
echo Backing up MQ2AutoLogin.ini file...
COPY "%OutFile%" "%BackupFile%"
echo Backup complete
echo Rewriting .ini file...
>"%OutFile%" (
FOR /F "usebackq tokens=1,2 delims==" %%i IN ("%BackupFile%") DO (
   IF "%%j"=="" (ECHO %%i) ELSE (
      IF "%%i" EQU "%_serverName%" (echo %%i=%serverID%) else (echo %

%i=%%j)
   )
)
)
echo Finished writing .ini file
ENDLOCAL


Title: Re: >.BAT launch assist< By popular demand.
Post by: Natedog on July 09, 2015, 06:30:39 am
Nice work lol this is neat :)

Converted it to Perl for my own personal use so thank you for this  (yay perl)


It now auto loads my whole group for me! yay


Title: Re: >.BAT launch assist< By popular demand.
Post by: dopeystuffz on July 09, 2015, 03:08:15 pm
So just to verify Phah, if I wanted to use your method of getting server # to auto update would I put in your script and then add all the:

echo change your "MQ2AutoLogin.ini" server #
timeout /t -1

cd ""C:\ROF2"

start "Character1" /b "C:\ROF2\eqgame.exe" patchme /Login:xxxx
timeout /t 5
start "Character2" /b "C:\ROF2\eqgame.exe" patchme /Login:xxxxx
timeout /t 5
cd ""G:\ROF2"
start "Character3" /b "G:\ROF2\eqgame.exe" patchme /Login:xxxxx
timeout /t 5
start "Character4" /b "G:\ROF2\eqgame.exe" patchme /Login:xxxxx
timeout /t 5
start "Character5" /b "G:\ROF2\eqgame.exe" patchme /Login:xxxxxx
timeout /t 5
cd ""D:\ROF2"
start "Character6" /b "D:\ROF2\eqgame.exe" patchme /Login:xxxxx
timeout /t 5
start "Character7" /b "D:\ROF2\eqgame.exe" patchme /Login:xxxxxx
timeout /t 5
start "Character 8" /b "D:\ROF2\eqgame.exe" patchme /Login:xxxxxx
timeout /t 5

etc?  Just trying to make sure I have it figured out where it goes heh >>

Thanks so much guys for this gonna give it another go :)  Never had any luck last time I tried hopefully I will this time :P computer illiterate ftw!


Title: Re: >.BAT launch assist< By popular demand.
Post by: Mixlor on July 09, 2015, 03:21:58 pm
I would think you would use this script than the other one...but I will let the expert advise. This does look awesome!

Mix


Title: Re: >.BAT launch assist< By popular demand.
Post by: dopeystuffz on July 09, 2015, 05:23:32 pm
Ooook think I just broke eq on my puter, was messin round with it now whenever I try to load Rof eq it just does the swirly thinking thing for like 2 seconds then nothing >> wont load at all but no error messages either. Had the Bat file fail a couple times must have not had it right but not sure what else I did. Anyone have any clue how to fix this? Will only let me load UF client now >.>

NM apparently going back and forth from 1 write up to the other was a bad idea.  Tried to have mq2autologin plugin be autoloaded by adjusting ini file for mq2 like older post said and apparently that makes it so eq wont load for me... no clue why XD


Title: Re: >.BAT launch assist< By popular demand.
Post by: balidet on July 09, 2015, 08:34:56 pm
it only takes like...30 seconds for me to load in my 6 toons one at a time...no script needed...lazzy biatchs


Title: Re: >.BAT launch assist< By popular demand.
Post by: Waraesh on July 09, 2015, 08:44:40 pm
30seconds is a LONG TIME, you can ask my wife...


Title: Re: >.BAT launch assist< By popular demand.
Post by: Phah on July 09, 2015, 08:56:14 pm
So just to verify Phah, if I wanted to use your method of getting server # to auto update would I put in your script and then add all the:


it would look something like this, your results may vary since i'm too lazy to test it out ;)

Code:
@echo off
SETLOCAL enableextensions enabledelayedexpansion

set "_serverId=LastServerID"
set "_serverName=EZ (Linux) x4 Exp"
set BackupFile=<path to MQ>\MQ2AutoLogin.txt
set OutFile=<path to MQ>\MQ2AutoLogin.ini
set firstFile=<path to ROF2>\eqlsPlayerData.ini

echo Getting server number...

FOR /F "usebackq tokens=1,2 delims== " %%a IN ("%FirstFile%") DO (
if "%%a" equ "%_serverId%" (set serverID=%%b)
)

echo Server number is: %serverID%
echo Backing up MQ2AutoLogin.ini file...
COPY "%OutFile%" "%BackupFile%"
echo Backup complete
echo Rewriting .ini file...
>"%OutFile%" (
FOR /F "usebackq tokens=1,2 delims==" %%i IN ("%BackupFile%") DO (
   IF "%%j"=="" (ECHO %%i) ELSE (
      IF "%%i" EQU "%_serverName%" (echo %%i=%serverID%) else (echo %

%i=%%j)
   )
)
)
echo Finished writing .ini file

cd ""C:\ROF2"

start "Character1" /b "C:\ROF2\eqgame.exe" patchme /Login:xxxx
timeout /t 5
start "Character2" /b "C:\ROF2\eqgame.exe" patchme /Login:xxxxx
timeout /t 5
cd ""G:\ROF2"
start "Character3" /b "G:\ROF2\eqgame.exe" patchme /Login:xxxxx
timeout /t 5
start "Character4" /b "G:\ROF2\eqgame.exe" patchme /Login:xxxxx
timeout /t 5
start "Character5" /b "G:\ROF2\eqgame.exe" patchme /Login:xxxxxx
timeout /t 5
cd ""D:\ROF2"
start "Character6" /b "D:\ROF2\eqgame.exe" patchme /Login:xxxxx
timeout /t 5
start "Character7" /b "D:\ROF2\eqgame.exe" patchme /Login:xxxxxx
timeout /t 5
start "Character 8" /b "D:\ROF2\eqgame.exe" patchme /Login:xxxxxx
timeout /t 5

ENDLOCAL

I use a slightly different setup, so I'm not 100% sure that works; but I'm like 99% sure ;)

If you only have 1 hard drive, remove the lines that go like cd ""G:\ROF2", you won't need those. You'll need to be sure to replace a few lines that contain paths with the actual paths that exist on your system. E.g. <path to MQ> should be replaced with the actual path to the folder where MQ2 lives, and C:\ROF2\eqgame.exe should be replaced with the proper path to your installation of EQ.


Title: Re: >.BAT launch assist< By popular demand.
Post by: dopeystuffz on July 10, 2015, 01:00:11 pm
Well I can get at least all the characters to load up to screen to enter Password with correct usernames, but if I turn on mq2autologin plugin for some reason it will not let me load EQ at all. And I mean NOT at all.  I try and load up any instance of eq with that plugin enabled and all I get is a brief swirly on my mouse pointer to indicate its thinking and then nothing > just sits on desktop screen.  I don't even get an error message very bizarre.  Either way tho this does help to cut down on some time :) gets kinda old loading up every single character individually when you have 18 of em > heh. 

If anyone has any clue what up with my mq2autlogin plugin would b much appreciated if not think I'm just gonna cut my losses and enjoy what I managed to get to work :) Thanks guys for the info!


Title: Re: >.BAT launch assist< By popular demand.
Post by: Phah on July 10, 2015, 06:13:19 pm
assuming you've set up your mq2 autologin feature as described in this post (http://ezserver.online/forums/index.php?topic=3851.0) (except using ROF2 instead of UF obviously) then, I have no idea why it would crash mq  >:(

You can always try the old "redownload all the mq2 stuff" trick, it might work. might not.


Title: Re: >.BAT launch assist< By popular demand.
Post by: dopeystuffz on July 10, 2015, 10:33:50 pm
Thanks Phah! reinstalling mq2 did the trick for mq2autologin. Now I can get it to load in all my characters automatically tyvm :)  Shoulda thought of it myself *smacks forehead*  :-X


Title: Re: >.BAT launch assist< By popular demand.
Post by: Phah on July 11, 2015, 12:18:37 am
Never underestimate the "turn it off and back on again" trick. Another personal favorite is the "my code didn't work, then I added a comment and now it works". Shit shouldn't work but sometimes it does, for no obvious reason :P