[ Disclaimer, Create new user --- Wiki markup help, Install P99 ]
Players:Technical/Affinity
From Project 1999 Wiki
Description
This script will use the Affinity part of cmd.exe and start, and pick a random CPU to run EverQuest on. This will in theory extend the lifetime of your cpu by spreading the load over different cores each time Everquest is run. That is; Everquest will run on one core, but each time it runs it will pick a core at random.
Script
Create a batch file inside your Everquest Folder (for this example it assumes C:\EQLite). Call the batch file A_Run_Everquest.bat Copy paste the following code into the batch file
@@ECHO OFF REM This only works up to Minimum of 1 and Maximum of 8 Cores REM It picks a random CPU core between 1 and the Maximum and runs Everquest on that CPU core setlocal SET _AppFolder=C:\EQLite SET _AppName=EVERQUEST SET _AppEXE=eqgame.exe SET _AppParams=patchme SET /a _MaxCPU=8 SET /a _rand=%RANDOM%*%_MaxCPU%/32768+1 SET _affinity=0x01 IF %_rand% EQU 2 SET _affinity=0x02 IF %_rand% EQU 3 SET _affinity=0x04 IF %_rand% EQU 4 SET _affinity=0x08 IF %_rand% EQU 5 SET _affinity=0x10 IF %_rand% EQU 6 SET _affinity=0x20 IF %_rand% EQU 7 SET _affinity=0x40 IF %_rand% EQU 8 SET _affinity=0x80 cmd.exe /c start "%_AppName%" /affinity %_affinity% "%_AppFolder%\%_AppEXE%" %_AppParams% endlocal
Edits Required
- Edit _AppFolder=C:\EQLite\ change this to the folder path that you installed everquest into
- Edit _MaxCPU=8 change this to the number of CPU cores you have (you can find this in Task Manager)
- Change your short cut from C:\EQLite\eqgame.exe patchme to C:\EQLite\A_Run_Everquest.bat