Code Monkey home page Code Monkey logo

Comments (4)

pixeltris avatar pixeltris commented on May 24, 2024

I could add something similar before this line of code to check for the YgoMaster.exe process and launch it if it doesn't exist. I'll look at doing that for the next update.

success = GameLauncher.Launch(GameLauncherMode.Detours);

from ygomaster.

RndUser0 avatar RndUser0 commented on May 24, 2024

OK, thanks :)

from ygomaster.

9xKiritox6 avatar 9xKiritox6 commented on May 24, 2024

It would be more convenient if YgoMasterClient.exe would start YgoMaster.exe automatically if it's not already running.

I wrote this batch script for that:

@echo off

C:
cd\Program Files (x86)\Steam\SteamApps\common\Yu-Gi-Oh!  Master Duel\Build

tasklist /fi "imagename eq YgoMaster.exe" |find ":" > nul
if not errorlevel 1 start "YGO Master" /B YgoMaster.exe

tasklist /fi "imagename eq YgoMasterClient.exe" |find ":" > nul
if not errorlevel 1 start "YGO Master Client" /B YgoMasterClient.exe

Same scenario, my friends and I struggling of opening 2 executables to run the Offline YGO, I wrote also mine 2 weeks ago that can launch both executables, and when closed the other one will close also. because my friends are just asking me since they lack of knowledge in this kind of topic, we will gladly appreciate for implementing it on your next update

@echo off
mode con: cols=97 lines=21


echo Offline Yu-Gi-Oh! Master Duel Game Launcher
timeout 3 >nul
cls
echo Checks if the Offline Server Console is already running.
tasklist /nh /fi "imagename eq YgoMaster.exe" | find /i "YgoMaster.exe" >nul
if not errorlevel 1 cls && echo It seems that the Offline Yu-Gi-Oh! Master Duel is improperly closed in it's last session. && timeout 2 >nul && cls && echo The Offline Server Console is running! && timeout 2 >nul && goto RestartIt
timeout 1 >nul
cls
echo Checks if the Offline Server Console is already running..
tasklist /nh /fi "imagename eq YgoMaster.exe" | find /i "YgoMaster.exe" >nul
if not errorlevel 1 cls && echo It seems that the Offline Yu-Gi-Oh! Master Duel is improperly closed in it's last session. && timeout 2 >nul && cls && echo The Offline Server Console is running! && timeout 2 >nul && goto RestartIt
timeout 1 >nul
cls
goto ItsNotRunning


:ItsNotRunning
cls
echo Nope!
timeout 2 >nul
cls
goto LaunchIt


:LaunchIt
cls
echo The Offline Yu-Gi-Oh! Master Duel is gonna start.
timeout 1 >nul
cls
echo The Offline Yu-Gi-Oh! Master Duel is gonna start..
timeout 1 >nul
cls
echo Launching the Offline Server Console.
start /min YgoMaster.exe
timeout 1 >nul
cls
echo Launching Offline Yu-Gi-Oh! Master Duel.
start YgoMasterClient.exe
timeout 1 >nul
cls
goto Waiting


:Waiting
cls
echo Gonna wait for Offline Yu-Gi-Oh! Master Duel to be launched properly before monitoring it.
timeout 1 >nul
tasklist /nh /fi "imagename eq masterduel.exe" | find /i "masterduel.exe" >nul
if not errorlevel 1 goto WatchIt
cls
echo Gonna wait for Offline Yu-Gi-Oh! Master Duel to be launched properly before monitoring it..
timeout 1 >nul
tasklist /nh /fi "imagename eq masterduel.exe" | find /i "masterduel.exe" >nul
if not errorlevel 1 goto WatchIt
cls
echo Gonna wait for Offline Yu-Gi-Oh! Master Duel to be launched properly before monitoring it...
timeout 1 >nul
tasklist /nh /fi "imagename eq masterduel.exe" | find /i "masterduel.exe" >nul
if not errorlevel 1 goto WatchIt
cls
goto Waiting


:WatchIt
cls
echo Monitoring Offline Yu-Gi-Oh! Master Duel if it's being closed by the user.
tasklist /nh /fi "imagename eq masterduel.exe" | find /i "masterduel.exe" >nul
if errorlevel 1 cls && echo It seems that Offline Yu-Gi-Oh! Master Duel is being closed by the user && timeout 2 >nul && goto KillIt
timeout 1 >nul
cls
echo Monitoring Offline Yu-Gi-Oh! Master Duel if it's being closed by the user..
tasklist /nh /fi "imagename eq masterduel.exe" | find /i "masterduel.exe" >nul
if errorlevel 1 cls && echo It seems that Offline Yu-Gi-Oh! Master Duel is being closed by the user && timeout 2 >nul && goto KillIt
timeout 1 >nul
cls
echo Monitoring Offline Yu-Gi-Oh! Master Duel if it's being closed by the user...
tasklist /nh /fi "imagename eq masterduel.exe" | find /i "masterduel.exe" >nul
if errorlevel 1 cls && echo It seems that Offline Yu-Gi-Oh! Master Duel is being closed by the user && timeout 2 >nul && goto KillIt
timeout 1 >nul
cls
if not errorlevel 1 goto WatchIt


:KillIt
cls
echo Terminating the Offline Server Console.
timeout 1 >nul
cls
echo Terminating the Offline Server Console..
timeout 1 >nul
taskkill /im YgoMaster.exe /f >nul

tasklist /nh /fi "imagename eq YgoMaster.exe" | find /i "YgoMaster.exe" >nul
cls
if errorlevel 1 echo The Offline Server Console is properly terminated! && timeout 2 >nul && goto Termination
if not errorlevel 1 echo The Offline Server Console is still running! && timeout 2 >nul && goto KillIt


:RestartIt
cls
echo Restarting the Offline Server Console.
timeout 1 >nul
cls
echo Restarting the Offline Server Console..
timeout 1 >nul
cls
taskkill /im YgoMaster.exe /f >nul

tasklist /nh /fi "imagename eq YgoMaster.exe" | find /i "YgoMaster.exe" >nul
cls
if errorlevel 1 echo The Offline Server Console is properly restarted! && timeout 2 >nul && cls && echo Restarting the Launcher. && timeout 1 >nul && cls && echo Restarting the Launcher.. && timeout 1 >nul && cls && goto LaunchIt
if not errorlevel 1 echo The Offline Server Console is still running! && timeout 2 >nul && goto RestartIt


:Termination
cls
echo The Game Launcher is going to end.
timeout 1 >nul
cls
echo The Game Launcher is going to end..
timeout 1 >nul
cls
exit

from ygomaster.

pixeltris avatar pixeltris commented on May 24, 2024

Added in v1.5 (commit fe9aa11). It will auto run YgoMaster.exe when you run YgoMasterClient.exe. Currently this isn't done as a sub process so YgoMaster wont auto close when YgoMasterClient closes. I might eventually change this logic, but for now it stays as is.

from ygomaster.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.