@ECHO OFF PUSHD %~dp0 REM Silently start an OpenFusion server for the client to connect to. REM First argument specifies which server folder, and therefore game version to use. REM The second argument is the actual path to the web page. start /B /D GameServers\OpenFusion\%1\ GameServers\OpenFusion\%1\winfusion.exe REM Launch client via FlashpointSecurePlayer FlashpointSecurePlayer unitywebplayer2fusion "%~2" REM Basilisk was closed, wait a few seconds before ending the server so that the database can be saved. REM The timeout command doesn't work in this instance - no input redirection, so we abuse the ping command. ping 127.0.0.1 -n 3 > nul REM Finally, kill off the server process. taskkill /F /IM winfusion.exe IF %ERRORLEVEL% EQU -2 ( ECHO MsgBox "You cannot run multiple instances of Flashpoint Secure Player. Please close other Flashpoint games and animations that are open." > %TMP%\TMP.VBS WSCRIPT /nologo %TMP%\TMP.VBS DEL %TMP%\TMP.VBS ) POPD