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 Catalog page (functional)<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
|
||||
- [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)
|
||||
|
|
|
|||
|
|
@ -40,11 +40,18 @@ MIICXQIBAAKBgQDhO7uhMz3jBLoSB/SHWhnE5tVxn7P6BlirPVrZEWVUxjyC5ybhZpyjL/r6KBlvhgyn
|
|||
$soapIp = $AvailableGameservers[array_rand($AvailableGameservers,1)];
|
||||
|
||||
$soapcfg = [
|
||||
"ip" => $soapIp,
|
||||
"ip" => $AvailableGameservers[1],
|
||||
"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 = [
|
||||
"url" => "https://".$_SERVER["HTTP_HOST"]
|
||||
];
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ if ($anothermomentoftruth == 1 && $anotheranothermomentoftruth == 1) {
|
|||
"SuperSafeChat" => false,
|
||||
"CharacterAppearance" => "",
|
||||
"ClientTicket" => $authticket,
|
||||
"GameId" => $placeid,
|
||||
"GameId" => $jobid,
|
||||
"PlaceId" => $placeid,
|
||||
"MeasurementUrl" => "",
|
||||
"WaitingForCharacterGuid" => "26eb3e21-aa80-475b-a777-b43c3ea5f7d2",
|
||||
|
|
|
|||
|
|
@ -43,23 +43,31 @@ if ($momentoftruth == 1) {
|
|||
$checkifjobalreadyexists->execute();
|
||||
$okcheck = $checkifjobalreadyexists->fetchColumn();
|
||||
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(':isonline', $helppdo);
|
||||
$getjobforalready->execute();
|
||||
$china2 = $getjobforalready->fetch(PDO::FETCH_BOTH);
|
||||
$jobid = $china2['jobid'];
|
||||
$response = [
|
||||
"jobId" => $jobid,
|
||||
"status" => $status,
|
||||
"joinScriptUrl" => "http://". $soapcfg['url'] ."/game/join?token=". $token ."&jobid=". $jobid,
|
||||
"authenticationUrl" => "http://". $soapcfg['url'] ."/Login/Negotiate.ashx",
|
||||
"joinScriptUrl" => $soapcfg["usehttps"] . $soapcfg['url'] ."/game/join?token=". $token ."&jobid=". $jobid,
|
||||
"authenticationUrl" => $soapcfg["usehttps"] . $soapcfg['url'] ."/Login/Negotiate.ashx",
|
||||
"authenticationTicket" => $token,
|
||||
"message" => $allstatus[$status]
|
||||
];
|
||||
echo json_encode($response);
|
||||
} else if ($okcheck == 0) {
|
||||
$hahatroll = $con->prepare('UPDATE tokens SET passedplacelauncher = 0 WHERE token=:token');
|
||||
$hahatroll->bindParam(':token', $token);
|
||||
$passedplacelauncher = '1';
|
||||
$hahatroll = $con->prepare('UPDATE tokens SET passedplacelauncher = :passedplacelauncher WHERE token=:token');
|
||||
$hahatroll->bindParam(':passedplacelauncher', $passedplacelauncher);
|
||||
$hahatroll->bindParam(':token', $token);
|
||||
$hahatroll->execute();
|
||||
function generateRandomJobId() {
|
||||
$chars = '0123456789abcdefghijklmnopqrstuvwxyz';
|
||||
|
|
@ -78,12 +86,13 @@ if ($momentoftruth == 1) {
|
|||
$jobid = generateRandomJobId();
|
||||
$port = rand(5000,5999);
|
||||
$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->execute();
|
||||
$okbrahh = $checkport->fetchColumn();
|
||||
if ($okbrahh == 1) {
|
||||
$port = rand(5000,5999); // great heavens if this ever happens report to me
|
||||
die("How did we get here?");
|
||||
} else if ($okbrahh == 0) {
|
||||
$RCCServiceSoap = new Roblox\Grid\Rcc\RCCServiceSoap("127.0.0.1", 64989);
|
||||
$script = '
|
||||
|
|
@ -205,8 +214,8 @@ game:GetService("RunService"):Run()
|
|||
$response = [
|
||||
"jobId" => $jobid,
|
||||
"status" => $status,
|
||||
"joinScriptUrl" => "http://". $soapcfg['url'] ."/game/join?token=". $token ."&jobid=". $jobid,
|
||||
"authenticationUrl" => "http://". $soapcfg['url'] ."/Login/Negotiate.ashx",
|
||||
"joinScriptUrl" => $soapcfg["usehttps"] . $soapcfg['url'] ."/game/join?token=". $token ."&jobid=". $jobid,
|
||||
"authenticationUrl" => $soapcfg["usehttps"] . $soapcfg['url'] ."/Login/Negotiate.ashx",
|
||||
"authenticationTicket" => $token,
|
||||
"message" => $allstatus[$status]
|
||||
];
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ function play() {
|
|||
data:{"placeid":action},
|
||||
success: function(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