From 4b1ea0e2540bf7f3545e6682a173b886aed9aed6 Mon Sep 17 00:00:00 2001 From: nolanwhy Date: Sun, 5 Feb 2023 00:17:09 +0100 Subject: [PATCH 1/2] Create PlaceLauncher.php --- game/PlaceLauncher.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 game/PlaceLauncher.php diff --git a/game/PlaceLauncher.php b/game/PlaceLauncher.php new file mode 100644 index 0000000..85d70fd --- /dev/null +++ b/game/PlaceLauncher.php @@ -0,0 +1,22 @@ + "Wait", + 2 => "Working", + 3 => "Disabled", + 4 => "Failed to start", + 5 => "Game ended", + 6 => "Full" +]; +$status = 2; +$ip = "127.0.0.1"; +$port = 53640; +$job = 69; +$response = [ + "jobId" => $job, + "status" => $status, + "joinScriptUrl" => $site["url"]."/game/join?ip=$ip&port=$port&gameid=1818&jobid=$job", + "authenticationUrl" => $site["url"]."/Login/Negotiate.ashx", + "authenticationTicket" => "1", + "message" => $allstatus[$status] +]; +echo json_encode($response); \ No newline at end of file From 5f78d37112eb301c84c1b7e1ae5890157f715a95 Mon Sep 17 00:00:00 2001 From: nolanwhy Date: Sun, 5 Feb 2023 00:21:13 +0100 Subject: [PATCH 2/2] dgh --- core/config.php | 4 ++++ game/PlaceLauncher.php | 1 + 2 files changed, 5 insertions(+) diff --git a/core/config.php b/core/config.php index 10b329e..6421497 100644 --- a/core/config.php +++ b/core/config.php @@ -11,6 +11,10 @@ if($devmode) { error_reporting(E_ALL); } +$site = [ + "url" => "http://".$_SERVER["HTTP_HOST"] +]; + $pagename = ucfirst(str_replace(".php", "", str_replace("/", "", $_SERVER['DOCUMENT_URI'] ?? $_SERVER['PHP_SELF']))); $maintainers = array("Mario1", "qzip", "nolanwhy"); diff --git a/game/PlaceLauncher.php b/game/PlaceLauncher.php index 85d70fd..0fc5d1f 100644 --- a/game/PlaceLauncher.php +++ b/game/PlaceLauncher.php @@ -1,4 +1,5 @@ "Wait", 2 => "Working",