-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSTART_GAME.bat
More file actions
96 lines (87 loc) · 4.04 KB
/
START_GAME.bat
File metadata and controls
96 lines (87 loc) · 4.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
@echo off
chcp 65001 >nul 2>nul
title Medieval Trading Game - AI Voice Server
color 0A
cls
echo.
echo ================================================================
echo ^| ^|
echo ^| MEDIEVAL TRADING GAME - AI VOICE EDITION ^|
echo ^| ^|
echo ^| Unity AI Lab ^|
echo ^| www.unityailab.com - unityailabcontact@gmail.com ^|
echo ^| ^|
echo ================================================================
echo.
echo [*] Checking for server software...
echo.
:: Check if Python is installed
where python >nul 2>nul
if %ERRORLEVEL% EQU 0 (
echo [OK] Python found!
echo.
echo ================================================================
echo ^| GAME SERVER STARTING ^|
echo ^| ^|
echo ^| URL: http://localhost:8000 ^|
echo ^| ^|
echo ^| Press Ctrl+C to stop the server when done playing ^|
echo ================================================================
echo.
echo [*] Opening browser in 2 seconds...
echo.
:: Open browser after a short delay
start "" cmd /c "timeout /t 2 /nobreak >nul && start http://localhost:8000"
:: Start Python server (suppress verbose output)
python -m http.server 8000 2>nul
goto :end
)
:: Check if Python3 is installed (some systems)
where python3 >nul 2>nul
if %ERRORLEVEL% EQU 0 (
echo [OK] Python3 found!
echo.
echo ================================================================
echo ^| GAME SERVER STARTING ^|
echo ^| ^|
echo ^| URL: http://localhost:8000 ^|
echo ^| ^|
echo ^| Press Ctrl+C to stop the server when done playing ^|
echo ================================================================
echo.
start "" cmd /c "timeout /t 2 /nobreak >nul && start http://localhost:8000"
python3 -m http.server 8000 2>nul
goto :end
)
:: Check if Node.js is installed
where node >nul 2>nul
if %ERRORLEVEL% EQU 0 (
echo [OK] Node.js found!
echo.
echo ================================================================
echo ^| GAME SERVER STARTING ^|
echo ^| ^|
echo ^| URL: http://localhost:3000 ^|
echo ^| ^|
echo ^| Press Ctrl+C to stop the server when done playing ^|
echo ================================================================
echo.
start "" cmd /c "timeout /t 3 /nobreak >nul && start http://localhost:3000"
npx serve -l 3000 --no-clipboard 2>nul
goto :end
)
:: No server found - fall back to file://
echo [!] WARNING: No Python or Node.js found!
echo.
echo ================================================================
echo ^| AI VOICES DISABLED ^|
echo ^| ^|
echo ^| To enable AI voices, install Python: ^|
echo ^| https://www.python.org/downloads/ ^|
echo ^| ^|
echo ^| Opening game without AI voice support... ^|
echo ================================================================
echo.
start "" index.html
timeout /t 5
:end