Go Back   EQEmulator Home > EQEmulator Forums > General > General::General Discussion

General::General Discussion General discussion about EverQuest(tm), EQEMu, and related topics.
Do not post support topics here.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #37  
Old 07-23-2009, 10:32 AM
nosfentora
Discordant
 
Join Date: Oct 2004
Location: In a house
Posts: 387
Default

I had written this batch code to do something like what Shendare did, though it doesn't restore the original after exit, but it does make a backup of it in the same folder as the batch file. The loadscreens can be in any folder, as can be the batch file. Just edit the section 'EDIT THESE', save and run.

I use it in conjunction with my client launcher that i wrote, which launches the eq client, and auto-sets the processor affinity to 0, to alleviate any multi-core issues that multi-core procs have.


Code:
@echo off
cls

REM ***** EDIT THESE (DON'T USE QUOTES AROUND LONG FOLDER NAMES!)
set EQ_DIR=D:\INSTALLS\EverQuest\Sof\
set LOADSCREEN_SOURCE_DIR=C:\Servers\EQ\Apps\Loadscreen Changer\Loadscreens\
set LAUNCHER_DIR=C:\Servers\EQ\Apps\ClientLauncher\
set USE_LAUNCHER=y
REM ***** DON'T NEED TO EDIT ANYTHING ELSE

set EQ_RESOURCE_DIR=%EQ_DIR%Resources\


set ok=n
call :calc_loadscreens
if exist "%EQ_RESOURCE_DIR%" if exist "%LOADSCREEN_SOURCE_DIR%" if exist "%LOADSCREEN_SOURCE_DIR%loadscreen*.*" if %loadscreen_count% geq 1 set ok=y

if %ok%==n goto :missing_resources

call :backup_original
call :copy_new_screen

if /i %USE_LAUNCHER%==y if not exist "%LAUNCHER_DIR%EQLauncher.exe" set USE_LAUNCHER=n
if /i %USE_LAUNCHER%==Y start /d"%LAUNCHER_DIR%" EQLauncher.exe

goto :eof

:missing_resources
echo Missing something somewhere!
echo Check that your paths are correct and that the loadscreens are present.
echo.
echo EQ Resource Dir = %EQ_RESOURCE_DIR%
echo Loadscreen Dir = %LOADSCREEN_SOURCE_DIR%
echo.
echo Loadscreens found = %loadscreen_count% & pause
goto :eof

:calc_loadscreens
set loadscreen_count=0
if not exist "%LOADSCREEN_SOURCE_DIR%" goto :eof
for %%a in (dir "%LOADSCREEN_SOURCE_DIR%load*.*") do set /a loadscreen_count=loadscreen_count+1
goto :eof

:gen_random_image
:gen_random
Set /a Number=(%Random% %%%loadscreen_count%)+1
set image=loadscreen%Number%.jpg
if not exist "%LOADSCREEN_SOURCE_DIR%%image%" goto :gen_random
goto :eof

:backup_original
if not exist "%LOADSCREEN_SOURCE_DIR%loadscreen_original.jpg" if exist ".\loadscreen.jpg" copy "%EQ_RESOURCE_DIR%loadscreen.jpg" ".\loadscreen_original.jpg"
goto :eof

:copy_new_screen
call :gen_random_image
if exist "%EQ_RESOURCE_DIR%loadscreen.jpg" del "%EQ_RESOURCE_DIR%loadscreen.jpg" /q
copy "%LOADSCREEN_SOURCE_DIR%%image%" "%EQ_RESOURCE_DIR%loadscreen.jpg%"
goto :eof
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 07:21 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3