Merge branch 'main' of https://github.com/grublox/grublox-site
This commit is contained in:
commit
a3895281d4
|
|
@ -12,7 +12,7 @@ A Bootstrap based ROBLOX revival website.
|
||||||
- [x] Make Create assets/game page<br>
|
- [x] Make Create assets/game page<br>
|
||||||
- [x] Make Catalog page (functional)<br>
|
- [x] Make Catalog page (functional)<br>
|
||||||
- [x] Make Credits page<br>
|
- [x] Make Credits page<br>
|
||||||
- [ ] Make Placelauncher.ashx require a token for joining then proceed to start a game on a gameserver with soap
|
- [x] Make Placelauncher.ashx require a token for joining then proceed to start a game on a gameserver with soap
|
||||||
- [ ] Make renders with a soap request to rcc
|
- [ ] Make renders with a soap request to rcc
|
||||||
- [x] Make Admin panel and make it only accessible to admin users (show stuff like how many games are running cpu usage on the webserver how many users are online that kind of stuff)
|
- [x] Make Admin panel and make it only accessible to admin users (show stuff like how many games are running cpu usage on the webserver how many users are online that kind of stuff)
|
||||||
- [ ] \(Optional) Add Recaptcha (https://developers.google.com/recaptcha/old/docs/php, ask mario to make a public key if u want to do this feature) (I dont see the point -qzip)
|
- [ ] \(Optional) Add Recaptcha (https://developers.google.com/recaptcha/old/docs/php, ask mario to make a public key if u want to do this feature) (I dont see the point -qzip)
|
||||||
|
|
|
||||||
|
|
@ -40,11 +40,18 @@ MIICXQIBAAKBgQDhO7uhMz3jBLoSB/SHWhnE5tVxn7P6BlirPVrZEWVUxjyC5ybhZpyjL/r6KBlvhgyn
|
||||||
$soapIp = $AvailableGameservers[array_rand($AvailableGameservers,1)];
|
$soapIp = $AvailableGameservers[array_rand($AvailableGameservers,1)];
|
||||||
|
|
||||||
$soapcfg = [
|
$soapcfg = [
|
||||||
"ip" => $soapIp,
|
"ip" => $AvailableGameservers[1],
|
||||||
"port" => 64989,
|
"port" => 64989,
|
||||||
"url" => "sierraf.tk"
|
"url" => "sierraf.tk",
|
||||||
|
"usehttps" => 'false'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
if ($soapcfg["usehttps"] == 'true') {
|
||||||
|
$soapcfg["usehttps"] = 'https://';
|
||||||
|
} else if ($soapcfg["usehttps"] == 'false') {
|
||||||
|
$soapcfg["usehttps"] = 'http://';
|
||||||
|
}
|
||||||
|
|
||||||
$site = [
|
$site = [
|
||||||
"url" => "https://".$_SERVER["HTTP_HOST"]
|
"url" => "https://".$_SERVER["HTTP_HOST"]
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ if ($anothermomentoftruth == 1 && $anotheranothermomentoftruth == 1) {
|
||||||
"SuperSafeChat" => false,
|
"SuperSafeChat" => false,
|
||||||
"CharacterAppearance" => "",
|
"CharacterAppearance" => "",
|
||||||
"ClientTicket" => $authticket,
|
"ClientTicket" => $authticket,
|
||||||
"GameId" => $placeid,
|
"GameId" => $jobid,
|
||||||
"PlaceId" => $placeid,
|
"PlaceId" => $placeid,
|
||||||
"MeasurementUrl" => "",
|
"MeasurementUrl" => "",
|
||||||
"WaitingForCharacterGuid" => "26eb3e21-aa80-475b-a777-b43c3ea5f7d2",
|
"WaitingForCharacterGuid" => "26eb3e21-aa80-475b-a777-b43c3ea5f7d2",
|
||||||
|
|
|
||||||
|
|
@ -43,23 +43,31 @@ if ($momentoftruth == 1) {
|
||||||
$checkifjobalreadyexists->execute();
|
$checkifjobalreadyexists->execute();
|
||||||
$okcheck = $checkifjobalreadyexists->fetchColumn();
|
$okcheck = $checkifjobalreadyexists->fetchColumn();
|
||||||
if ($okcheck == 1) {
|
if ($okcheck == 1) {
|
||||||
$getjobforalready = $con->prepare('SELECT jobid FROM jobs WHERE placeid=:placeid');
|
$passedplacelauncher = '1';
|
||||||
|
$hahatroll = $con->prepare('UPDATE tokens SET passedplacelauncher = :passedplacelauncher WHERE token=:token');
|
||||||
|
$hahatroll->bindParam(':passedplacelauncher', $passedplacelauncher);
|
||||||
|
$hahatroll->bindParam(':token', $token);
|
||||||
|
$hahatroll->execute();
|
||||||
|
$getjobforalready = $con->prepare('SELECT jobid FROM jobs WHERE placeid=:placeid AND isonline=:isonline');
|
||||||
$getjobforalready->bindParam(':placeid', $placeid);
|
$getjobforalready->bindParam(':placeid', $placeid);
|
||||||
|
$getjobforalready->bindParam(':isonline', $helppdo);
|
||||||
$getjobforalready->execute();
|
$getjobforalready->execute();
|
||||||
$china2 = $getjobforalready->fetch(PDO::FETCH_BOTH);
|
$china2 = $getjobforalready->fetch(PDO::FETCH_BOTH);
|
||||||
$jobid = $china2['jobid'];
|
$jobid = $china2['jobid'];
|
||||||
$response = [
|
$response = [
|
||||||
"jobId" => $jobid,
|
"jobId" => $jobid,
|
||||||
"status" => $status,
|
"status" => $status,
|
||||||
"joinScriptUrl" => "http://". $soapcfg['url'] ."/game/join?token=". $token ."&jobid=". $jobid,
|
"joinScriptUrl" => $soapcfg["usehttps"] . $soapcfg['url'] ."/game/join?token=". $token ."&jobid=". $jobid,
|
||||||
"authenticationUrl" => "http://". $soapcfg['url'] ."/Login/Negotiate.ashx",
|
"authenticationUrl" => $soapcfg["usehttps"] . $soapcfg['url'] ."/Login/Negotiate.ashx",
|
||||||
"authenticationTicket" => $token,
|
"authenticationTicket" => $token,
|
||||||
"message" => $allstatus[$status]
|
"message" => $allstatus[$status]
|
||||||
];
|
];
|
||||||
echo json_encode($response);
|
echo json_encode($response);
|
||||||
} else if ($okcheck == 0) {
|
} else if ($okcheck == 0) {
|
||||||
$hahatroll = $con->prepare('UPDATE tokens SET passedplacelauncher = 0 WHERE token=:token');
|
$passedplacelauncher = '1';
|
||||||
$hahatroll->bindParam(':token', $token);
|
$hahatroll = $con->prepare('UPDATE tokens SET passedplacelauncher = :passedplacelauncher WHERE token=:token');
|
||||||
|
$hahatroll->bindParam(':passedplacelauncher', $passedplacelauncher);
|
||||||
|
$hahatroll->bindParam(':token', $token);
|
||||||
$hahatroll->execute();
|
$hahatroll->execute();
|
||||||
function generateRandomJobId() {
|
function generateRandomJobId() {
|
||||||
$chars = '0123456789abcdefghijklmnopqrstuvwxyz';
|
$chars = '0123456789abcdefghijklmnopqrstuvwxyz';
|
||||||
|
|
@ -78,12 +86,13 @@ if ($momentoftruth == 1) {
|
||||||
$jobid = generateRandomJobId();
|
$jobid = generateRandomJobId();
|
||||||
$port = rand(5000,5999);
|
$port = rand(5000,5999);
|
||||||
$checkport = $con->prepare('SELECT COUNT(*) FROM tokens WHERE token=:token AND passedplacelauncher=:passed');
|
$checkport = $con->prepare('SELECT COUNT(*) FROM tokens WHERE token=:token AND passedplacelauncher=:passed');
|
||||||
$chechport->bindParam(':token', $token);
|
$checkport->bindParam(':token', $token);
|
||||||
$checkport->bindParam(':passed', $okbruh);
|
$checkport->bindParam(':passed', $okbruh);
|
||||||
$checkport->execute();
|
$checkport->execute();
|
||||||
$okbrahh = $checkport->fetchColumn();
|
$okbrahh = $checkport->fetchColumn();
|
||||||
if ($okbrahh == 1) {
|
if ($okbrahh == 1) {
|
||||||
$port = rand(5000,5999); // great heavens if this ever happens report to me
|
$port = rand(5000,5999); // great heavens if this ever happens report to me
|
||||||
|
die("How did we get here?");
|
||||||
} else if ($okbrahh == 0) {
|
} else if ($okbrahh == 0) {
|
||||||
$RCCServiceSoap = new Roblox\Grid\Rcc\RCCServiceSoap("127.0.0.1", 64989);
|
$RCCServiceSoap = new Roblox\Grid\Rcc\RCCServiceSoap("127.0.0.1", 64989);
|
||||||
$script = '
|
$script = '
|
||||||
|
|
@ -205,8 +214,8 @@ game:GetService("RunService"):Run()
|
||||||
$response = [
|
$response = [
|
||||||
"jobId" => $jobid,
|
"jobId" => $jobid,
|
||||||
"status" => $status,
|
"status" => $status,
|
||||||
"joinScriptUrl" => "http://". $soapcfg['url'] ."/game/join?token=". $token ."&jobid=". $jobid,
|
"joinScriptUrl" => $soapcfg["usehttps"] . $soapcfg['url'] ."/game/join?token=". $token ."&jobid=". $jobid,
|
||||||
"authenticationUrl" => "http://". $soapcfg['url'] ."/Login/Negotiate.ashx",
|
"authenticationUrl" => $soapcfg["usehttps"] . $soapcfg['url'] ."/Login/Negotiate.ashx",
|
||||||
"authenticationTicket" => $token,
|
"authenticationTicket" => $token,
|
||||||
"message" => $allstatus[$status]
|
"message" => $allstatus[$status]
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -122,7 +122,7 @@ function play() {
|
||||||
data:{"placeid":action},
|
data:{"placeid":action},
|
||||||
success: function(response){
|
success: function(response){
|
||||||
var token = response;
|
var token = response;
|
||||||
window.location = "grublox-player://1+launchmode:play+gameinfo:" + token + "+placelauncherurl:http://sierraf.tk/game/PlaceLauncher.ashx";
|
window.location = "grublox-player://1+launchmode:play+gameinfo:" + token + "+placelauncherurl:http://sierraf.tk/game/PlaceLauncher.ashx?token=" + token;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue