Update test.php
This commit is contained in:
parent
df96461ca0
commit
7e0bf54cba
395
test.php
395
test.php
|
|
@ -1,4 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
|
// THIS IS A TEST DO NOT INCLUDE IN PRODUCTION
|
||||||
require_once 'core/config.php';
|
require_once 'core/config.php';
|
||||||
require_once 'core/classes.php';
|
require_once 'core/classes.php';
|
||||||
function generateRandomJobId() {
|
function generateRandomJobId() {
|
||||||
|
|
@ -24,213 +25,209 @@ function generateRandomString($length = 25) {
|
||||||
}
|
}
|
||||||
return $randomString;
|
return $randomString;
|
||||||
}
|
}
|
||||||
$accesstoken = 'test';
|
$accesstoken = generateRandomString(70);
|
||||||
$port = rand(5000,5999);
|
$port = rand(5000,5999);
|
||||||
$jobid = generateRandomJobId();
|
$jobid = generateRandomJobId();
|
||||||
$zero = 0;
|
$placeid = 1818;
|
||||||
$false = 'false';
|
$ip = $AvailableGameservers["1"];
|
||||||
$sixty = '60';
|
|
||||||
$address = '192.168.1.130';
|
|
||||||
$two = '2';
|
|
||||||
$one = '1';
|
|
||||||
$RCCServiceSoap = new Roblox\Grid\Rcc\RCCServiceSoap("127.0.0.1", 64989);
|
$RCCServiceSoap = new Roblox\Grid\Rcc\RCCServiceSoap("127.0.0.1", 64989);
|
||||||
$script = '
|
$script = 'print("Starting gameserver at placeid: '. $placeid .' on port: '. $port .' with JobID: '. $jobid .'")
|
||||||
-- Start Game Script Arguments
|
-- Start Game Script Arguments
|
||||||
local placeId = '. "1818" .'
|
local placeId = '. $placeid .'
|
||||||
local port = '. $port .'
|
local port = '. $port .'
|
||||||
local gameId = "'. $jobid .'"
|
local gameId = "'. $jobid .'"
|
||||||
local sleeptime = '. $zero .'
|
local sleeptime = 0
|
||||||
local access = "'. $accesstoken .'"
|
local access = "'. $accesstoken .'"
|
||||||
local deprecated = '. $false .'
|
local deprecated = false
|
||||||
local timeout = '. $sixty .'
|
local timeout = 60
|
||||||
local machineAddress = "'. $address .'"
|
local machineAddress = "'. $ip .'"
|
||||||
local gsmInterval = '. $two .'
|
local gsmInterval = 2
|
||||||
local baseUrl = "sierraf.tk"
|
local baseUrl = "sierraf.tk"
|
||||||
local maxPlayers = '. $sixty .'
|
local maxPlayers = 60
|
||||||
local maxGameInstances = '. $one .'
|
local maxGameInstances = 1
|
||||||
local injectScriptAssetID = '. $zero .'
|
local injectScriptAssetID = 0
|
||||||
local apiKey = "'. $accesstoken .'"
|
local apiKey = "'. $accesstoken .'"
|
||||||
local libraryRegistrationScriptAssetID = '. $zero .'
|
local libraryRegistrationScriptAssetID = 0
|
||||||
local deprecated_pingTimesReportInterval = '. $two .'
|
local deprecated_pingTimesReportInterval = 2
|
||||||
local gameCode = '. "0000" .'
|
local gameCode = 0
|
||||||
local universeId = "'. $jobid .'"
|
local universeId = "'. $jobid .'"
|
||||||
local preferredPlayerCapacity = '. $sixty .'
|
local preferredPlayerCapacity = 60
|
||||||
local matchmakingContextId = '. $zero .'
|
local matchmakingContextId = 0
|
||||||
local placeVisitAccessKey = "'. $accesstoken .'"
|
local placeVisitAccessKey = "'. $accesstoken .'"
|
||||||
local assetGameSubdomain = "assetgame"
|
local assetGameSubdomain = "assetgame"
|
||||||
local protocol = "'. "https://" .'"
|
local protocol = "https://"
|
||||||
|
|
||||||
-----------------------------------"CUSTOM" SHARED CODE----------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
pcall(function() settings().Network.UseInstancePacketCache = true end)
|
-----------------------------------"CUSTOM" SHARED CODE----------------------------------
|
||||||
pcall(function() settings().Network.UsePhysicsPacketCache = true end)
|
|
||||||
pcall(function() settings()["Task Scheduler"].PriorityMethod = Enum.PriorityMethod.AccumulatedError end)
|
|
||||||
|
pcall(function() settings().Network.UseInstancePacketCache = true end)
|
||||||
|
pcall(function() settings().Network.UsePhysicsPacketCache = true end)
|
||||||
settings().Network.PhysicsSend = Enum.PhysicsSendMethod.TopNErrors
|
pcall(function() settings()["Task Scheduler"].PriorityMethod = Enum.PriorityMethod.AccumulatedError end)
|
||||||
settings().Network.ExperimentalPhysicsEnabled = true
|
|
||||||
settings().Network.WaitingForCharacterLogRate = 100
|
|
||||||
pcall(function() settings().Diagnostics:LegacyScriptMode() end)
|
settings().Network.PhysicsSend = Enum.PhysicsSendMethod.TopNErrors
|
||||||
|
settings().Network.ExperimentalPhysicsEnabled = true
|
||||||
-----------------------------------START GAME SHARED SCRIPT------------------------------
|
settings().Network.WaitingForCharacterLogRate = 100
|
||||||
|
pcall(function() settings().Diagnostics:LegacyScriptMode() end)
|
||||||
local assetId = placeId -- might be able to remove this now
|
|
||||||
local url = nil
|
-----------------------------------START GAME SHARED SCRIPT------------------------------
|
||||||
local assetGameUrl = nil
|
|
||||||
if baseUrl~=nil and protocol ~= nil then
|
local assetId = placeId -- might be able to remove this now
|
||||||
url = protocol .. "www." .. baseUrl --baseUrl is actually the domain, no leading .
|
local url = nil
|
||||||
assetGameUrl = protocol .. assetGameSubdomain .. "." .. baseUrl
|
local assetGameUrl = nil
|
||||||
|
local accesstoken = placeVisitAccessKey
|
||||||
|
if baseUrl~=nil and protocol ~= nil then
|
||||||
|
url = protocol .. "www." .. baseUrl --baseUrl is actually the domain, no leading .
|
||||||
|
assetGameUrl = protocol .. assetGameSubdomain .. "." .. baseUrl
|
||||||
|
end
|
||||||
|
|
||||||
|
local scriptContext = game:GetService("ScriptContext")
|
||||||
|
pcall(function() scriptContext:AddStarterScript(libraryRegistrationScriptAssetID) end)
|
||||||
|
scriptContext.ScriptsDisabled = true
|
||||||
|
|
||||||
|
game:SetPlaceID(assetId, false)
|
||||||
|
pcall(function () if universeId ~= nil then game:SetUniverseId(universeId) end end)
|
||||||
|
game:GetService("ChangeHistoryService"):SetEnabled(false)
|
||||||
|
|
||||||
|
-- establish this peer as the Server
|
||||||
|
local ns = game:GetService("NetworkServer")
|
||||||
|
-- Detect cloud edit mode by checking for the dedicated cloud edit matchmaking context
|
||||||
|
local isCloudEdit = matchmakingContextId == 3
|
||||||
|
if isCloudEdit then
|
||||||
|
print("Configuring as cloud edit server!")
|
||||||
|
game:SetServerSaveUrl(url .. "/ide/publish/UploadFromCloudEdit")
|
||||||
|
ns:ConfigureAsCloudEditServer()
|
||||||
|
end
|
||||||
|
|
||||||
|
local badgeUrlFlagExists, badgeUrlFlagValue = pcall(function () return settings():GetFFlag("NewBadgeServiceUrlEnabled") end)
|
||||||
|
local newBadgeUrlEnabled = badgeUrlFlagExists and badgeUrlFlagValue
|
||||||
|
if url~=nil then
|
||||||
|
local apiProxyUrl = "https://api." .. baseUrl -- baseUrl is really the domain
|
||||||
|
|
||||||
|
pcall(function() game:GetService("Players"):SetAbuseReportUrl(url .. "/AbuseReport/InGameChatHandler.ashx") end)
|
||||||
|
pcall(function() game:GetService("ScriptInformationProvider"):SetAssetUrl(assetGameUrl .. "/Asset/") end)
|
||||||
|
pcall(function() game:GetService("ContentProvider"):SetBaseUrl(url .. "/") end)
|
||||||
|
-- pcall(function() game:GetService("Players"):SetChatFilterUrl(assetGameUrl .. "/Game/ChatFilter.ashx") end)
|
||||||
|
|
||||||
|
if gameCode then
|
||||||
|
game:SetVIPServerId(tostring(gameCode))
|
||||||
|
end
|
||||||
|
|
||||||
|
game:GetService("BadgeService"):SetPlaceId(placeId)
|
||||||
|
|
||||||
|
if newBadgeUrlEnabled then
|
||||||
|
game:GetService("BadgeService"):SetAwardBadgeUrl(apiProxyUrl .. "/assets/award-badge?userId=%d&badgeId=%d&placeId=%d")
|
||||||
|
end
|
||||||
|
|
||||||
|
if access ~= nil then
|
||||||
|
if not newBadgeUrlEnabled then
|
||||||
|
game:GetService("BadgeService"):SetAwardBadgeUrl(assetGameUrl .. "/Game/Badge/AwardBadge.ashx?UserID=%d&BadgeID=%d&PlaceID=%d")
|
||||||
end
|
end
|
||||||
|
|
||||||
local scriptContext = game:GetService("ScriptContext")
|
game:GetService("BadgeService"):SetHasBadgeUrl(assetGameUrl .. "/Game/Badge/HasBadge.ashx?UserID=%d&BadgeID=%d")
|
||||||
pcall(function() scriptContext:AddStarterScript(libraryRegistrationScriptAssetID) end)
|
game:GetService("BadgeService"):SetIsBadgeDisabledUrl(assetGameUrl .. "/Game/Badge/IsBadgeDisabled.ashx?BadgeID=%d&PlaceID=%d")
|
||||||
scriptContext.ScriptsDisabled = true
|
|
||||||
|
game:GetService("FriendService"):SetMakeFriendUrl(assetGameUrl .. "/Game/CreateFriend?firstUserId=%d&secondUserId=%d")
|
||||||
game:SetPlaceID(assetId, false)
|
game:GetService("FriendService"):SetBreakFriendUrl(assetGameUrl .. "/Game/BreakFriend?firstUserId=%d&secondUserId=%d")
|
||||||
pcall(function () if universeId ~= nil then game:SetUniverseId(universeId) end end)
|
game:GetService("FriendService"):SetGetFriendsUrl(assetGameUrl .. "/Game/AreFriends?userId=%d")
|
||||||
game:GetService("ChangeHistoryService"):SetEnabled(false)
|
end
|
||||||
|
game:GetService("BadgeService"):SetIsBadgeLegalUrl("")
|
||||||
-- establish this peer as the Server
|
game:GetService("InsertService"):SetBaseSetsUrl(assetGameUrl .. "/Game/Tools/InsertAsset.ashx?nsets=10&type=base")
|
||||||
local ns = game:GetService("NetworkServer")
|
game:GetService("InsertService"):SetUserSetsUrl(assetGameUrl .. "/Game/Tools/InsertAsset.ashx?nsets=20&type=user&userid=%d")
|
||||||
-- Detect cloud edit mode by checking for the dedicated cloud edit matchmaking context
|
game:GetService("InsertService"):SetCollectionUrl(assetGameUrl .. "/Game/Tools/InsertAsset.ashx?sid=%d")
|
||||||
local isCloudEdit = matchmakingContextId == 3
|
game:GetService("InsertService"):SetAssetUrl(assetGameUrl .. "/Asset/?id=%d")
|
||||||
if isCloudEdit then
|
game:GetService("InsertService"):SetAssetVersionUrl(assetGameUrl .. "/Asset/?assetversionid=%d")
|
||||||
print("Configuring as cloud edit server!")
|
|
||||||
game:SetServerSaveUrl(url .. "/ide/publish/UploadFromCloudEdit")
|
if gameCode then
|
||||||
ns:ConfigureAsCloudEditServer()
|
pcall(function() loadfile(assetGameUrl .. "/Game/LoadPlaceInfo.ashx?PlaceId=" .. placeId .. "&gameCode=" .. tostring(gameCode))() end)
|
||||||
end
|
else
|
||||||
|
pcall(function() loadfile(assetGameUrl .. "/Game/LoadPlaceInfo.ashx?PlaceId=" .. placeId)() end)
|
||||||
local badgeUrlFlagExists, badgeUrlFlagValue = pcall(function () return settings():GetFFlag("NewBadgeServiceUrlEnabled") end)
|
end
|
||||||
local newBadgeUrlEnabled = badgeUrlFlagExists and badgeUrlFlagValue
|
|
||||||
if url~=nil then
|
pcall(function()
|
||||||
local apiProxyUrl = "https://api." .. baseUrl -- baseUrl is really the domain
|
if access then
|
||||||
|
loadfile(assetGameUrl .. "/Game/PlaceSpecificScript.ashx?PlaceId=" .. placeId)()
|
||||||
pcall(function() game:GetService("Players"):SetAbuseReportUrl(url .. "/AbuseReport/InGameChatHandler.ashx") end)
|
|
||||||
pcall(function() game:GetService("ScriptInformationProvider"):SetAssetUrl(assetGameUrl .. "/Asset/") end)
|
|
||||||
pcall(function() game:GetService("ContentProvider"):SetBaseUrl(url .. "/") end)
|
|
||||||
pcall(function() game:GetService("Players"):SetChatFilterUrl(assetGameUrl .. "/Game/ChatFilter.ashx") end)
|
|
||||||
|
|
||||||
if gameCode then
|
|
||||||
game:SetVIPServerId(tostring(gameCode))
|
|
||||||
end
|
|
||||||
|
|
||||||
game:GetService("BadgeService"):SetPlaceId(placeId)
|
|
||||||
|
|
||||||
if newBadgeUrlEnabled then
|
|
||||||
game:GetService("BadgeService"):SetAwardBadgeUrl(apiProxyUrl .. "/assets/award-badge?userId=%d&badgeId=%d&placeId=%d")
|
|
||||||
end
|
|
||||||
|
|
||||||
if access ~= nil then
|
|
||||||
if not newBadgeUrlEnabled then
|
|
||||||
game:GetService("BadgeService"):SetAwardBadgeUrl(assetGameUrl .. "/Game/Badge/AwardBadge.ashx?UserID=%d&BadgeID=%d&PlaceID=%d")
|
|
||||||
end
|
end
|
||||||
|
end)
|
||||||
game:GetService("BadgeService"):SetHasBadgeUrl(assetGameUrl .. "/Game/Badge/HasBadge.ashx?UserID=%d&BadgeID=%d")
|
end
|
||||||
game:GetService("BadgeService"):SetIsBadgeDisabledUrl(assetGameUrl .. "/Game/Badge/IsBadgeDisabled.ashx?BadgeID=%d&PlaceID=%d")
|
|
||||||
|
pcall(function() game:GetService("NetworkServer"):SetIsPlayerAuthenticationRequired(true) end)
|
||||||
game:GetService("FriendService"):SetMakeFriendUrl(assetGameUrl .. "/Game/CreateFriend?firstUserId=%d&secondUserId=%d")
|
settings().Diagnostics.LuaRamLimit = 0
|
||||||
game:GetService("FriendService"):SetBreakFriendUrl(assetGameUrl .. "/Game/BreakFriend?firstUserId=%d&secondUserId=%d")
|
|
||||||
game:GetService("FriendService"):SetGetFriendsUrl(assetGameUrl .. "/Game/AreFriends?userId=%d")
|
game:GetService("Players").PlayerAdded:connect(function(player)
|
||||||
end
|
print("Player " .. player.userId .. " added")
|
||||||
game:GetService("BadgeService"):SetIsBadgeLegalUrl("")
|
|
||||||
game:GetService("InsertService"):SetBaseSetsUrl(assetGameUrl .. "/Game/Tools/InsertAsset.ashx?nsets=10&type=base")
|
if assetGameUrl and access and placeId and player and player.userId then
|
||||||
game:GetService("InsertService"):SetUserSetsUrl(assetGameUrl .. "/Game/Tools/InsertAsset.ashx?nsets=20&type=user&userid=%d")
|
local didTeleportIn = "False"
|
||||||
game:GetService("InsertService"):SetCollectionUrl(assetGameUrl .. "/Game/Tools/InsertAsset.ashx?sid=%d")
|
if player.TeleportedIn then didTeleportIn = "True" end
|
||||||
game:GetService("InsertService"):SetAssetUrl(assetGameUrl .. "/Asset/?id=%d")
|
|
||||||
game:GetService("InsertService"):SetAssetVersionUrl(assetGameUrl .. "/Asset/?assetversionid=%d")
|
-- game:HttpGet(assetGameUrl .. "/Game/ClientPresence.ashx?action=connect&PlaceID=" .. placeId .. "&UserID=" .. player.userId)
|
||||||
|
|
||||||
if gameCode then
|
|
||||||
pcall(function() loadfile(assetGameUrl .. "/Game/LoadPlaceInfo.ashx?PlaceId=" .. placeId .. "&gameCode=" .. tostring(gameCode))() end)
|
|
||||||
else
|
|
||||||
pcall(function() loadfile(assetGameUrl .. "/Game/LoadPlaceInfo.ashx?PlaceId=" .. placeId)() end)
|
|
||||||
end
|
|
||||||
|
|
||||||
pcall(function()
|
|
||||||
if access then
|
|
||||||
loadfile(assetGameUrl .. "/Game/PlaceSpecificScript.ashx?PlaceId=" .. placeId)()
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
|
|
||||||
pcall(function() game:GetService("NetworkServer"):SetIsPlayerAuthenticationRequired(true) end)
|
|
||||||
settings().Diagnostics.LuaRamLimit = 0
|
|
||||||
|
|
||||||
game:GetService("Players").PlayerAdded:connect(function(player)
|
|
||||||
print("Player " .. player.userId .. " added")
|
|
||||||
|
|
||||||
if assetGameUrl and access and placeId and player and player.userId then
|
|
||||||
local didTeleportIn = "False"
|
|
||||||
if player.TeleportedIn then didTeleportIn = "True" end
|
|
||||||
|
|
||||||
-- game:HttpGet(assetGameUrl .. "/Game/ClientPresence.ashx?action=connect&PlaceID=" .. placeId .. "&UserID=" .. player.userId)
|
|
||||||
if not isCloudEdit then
|
|
||||||
-- game:HttpPost(assetGameUrl .. "/Game/PlaceVisit.ashx?UserID=" .. player.userId .. "&AssociatedPlaceID=" .. placeId .. "&placeVisitAccessKey=" .. placeVisitAccessKey .. "&IsTeleport=" .. didTeleportIn, "")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
|
|
||||||
game:GetService("Players").PlayerRemoving:connect(function(player)
|
|
||||||
print("Player " .. player.userId .. " leaving")
|
|
||||||
|
|
||||||
local isTeleportingOut = "False"
|
|
||||||
if player.Teleported then isTeleportingOut = "True" end
|
|
||||||
|
|
||||||
if assetGameUrl and access and placeId and player and player.userId then
|
|
||||||
-- game:HttpGet(assetGameUrl .. "/Game/ClientPresence.ashx?action=disconnect&PlaceID=" .. placeId .. "&UserID=" .. player.userId .. "&IsTeleport=" .. isTeleportingOut)
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
|
|
||||||
local onlyCallGameLoadWhenInRccWithAccessKey = newBadgeUrlEnabled
|
|
||||||
if placeId ~= nil and assetGameUrl ~= nil and ((not onlyCallGameLoadWhenInRccWithAccessKey) or access ~= nil) then
|
|
||||||
-- yield so that file load happens in the heartbeat thread
|
|
||||||
wait()
|
|
||||||
|
|
||||||
-- load the game
|
|
||||||
game:Load(assetGameUrl .. "/asset/?id=" .. placeId)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Configure CloudEdit saving after place has been loaded
|
|
||||||
if isCloudEdit then
|
|
||||||
local doPeriodicSaves = true
|
|
||||||
local delayBetweenSavesSeconds = 5 * 60 -- 5 minutes
|
|
||||||
local function periodicSave()
|
|
||||||
if doPeriodicSaves then
|
|
||||||
game:ServerSave()
|
|
||||||
delay(delayBetweenSavesSeconds, periodicSave)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
-- Spawn thread to save in the future
|
|
||||||
delay(delayBetweenSavesSeconds, periodicSave)
|
|
||||||
-- Hook into OnClose to save on shutdown
|
|
||||||
game.OnClose = function()
|
|
||||||
doPeriodicSaves = false
|
|
||||||
game:ServerSave()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Now start the connection
|
|
||||||
ns:Start(port, sleeptime)
|
|
||||||
|
|
||||||
if timeout then
|
|
||||||
scriptContext:SetTimeout(timeout)
|
|
||||||
end
|
|
||||||
scriptContext.ScriptsDisabled = false
|
|
||||||
|
|
||||||
|
|
||||||
-- StartGame --
|
|
||||||
if not isCloudEdit then
|
if not isCloudEdit then
|
||||||
if injectScriptAssetID and (injectScriptAssetID < 0) then
|
game:HttpPost(assetGameUrl .. "/Game/PlaceVisit.ashx?UserID=" .. player.userId .. "&AssociatedPlaceID=" .. placeId .. "&placeVisitAccessKey=" .. placeVisitAccessKey .. "&IsTeleport=" .. didTeleportIn, "")
|
||||||
pcall(function() Game:LoadGame(injectScriptAssetID * -1) end)
|
|
||||||
else
|
|
||||||
pcall(function() Game:GetService("ScriptContext"):AddStarterScript(injectScriptAssetID) end)
|
|
||||||
end
|
|
||||||
|
|
||||||
Game:GetService("RunService"):Run()
|
|
||||||
end
|
end
|
||||||
|
end
|
||||||
';
|
end)
|
||||||
|
|
||||||
|
game:GetService("Players").PlayerRemoving:connect(function(player)
|
||||||
|
print("Player " .. player.userId .. " leaving")
|
||||||
|
|
||||||
|
local isTeleportingOut = "False"
|
||||||
|
if player.Teleported then isTeleportingOut = "True" end
|
||||||
|
|
||||||
|
if assetGameUrl and access and placeId and player and player.userId then
|
||||||
|
game:HttpGet(assetGameUrl .. "/Game/ClientPresence.ashx?action=disconnect&PlaceID=" .. placeId .. "&UserID=" .. player.userId .. "&IsTeleport=" .. isTeleportingOut .. "&placeVisitAccessKey=" .. accesstoken)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
local onlyCallGameLoadWhenInRccWithAccessKey = newBadgeUrlEnabled
|
||||||
|
if placeId ~= nil and assetGameUrl ~= nil and ((not onlyCallGameLoadWhenInRccWithAccessKey) or access ~= nil) then
|
||||||
|
-- yield so that file load happens in the heartbeat thread
|
||||||
|
wait()
|
||||||
|
|
||||||
|
-- load the game
|
||||||
|
game:Load(assetGameUrl .. "/asset/?id=" .. placeId .. "&accesstoken=" .. accesstoken)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Configure CloudEdit saving after place has been loaded
|
||||||
|
if isCloudEdit then
|
||||||
|
local doPeriodicSaves = true
|
||||||
|
local delayBetweenSavesSeconds = 5 * 60 -- 5 minutes
|
||||||
|
local function periodicSave()
|
||||||
|
if doPeriodicSaves then
|
||||||
|
game:ServerSave()
|
||||||
|
delay(delayBetweenSavesSeconds, periodicSave)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- Spawn thread to save in the future
|
||||||
|
delay(delayBetweenSavesSeconds, periodicSave)
|
||||||
|
-- Hook into OnClose to save on shutdown
|
||||||
|
game.OnClose = function()
|
||||||
|
doPeriodicSaves = false
|
||||||
|
game:ServerSave()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Now start the connection
|
||||||
|
ns:Start(port, sleeptime)
|
||||||
|
|
||||||
|
if timeout then
|
||||||
|
scriptContext:SetTimeout(timeout)
|
||||||
|
end
|
||||||
|
scriptContext.ScriptsDisabled = false
|
||||||
|
|
||||||
|
|
||||||
|
-- StartGame --
|
||||||
|
if not isCloudEdit then
|
||||||
|
if injectScriptAssetID and (injectScriptAssetID < 0) then
|
||||||
|
pcall(function() Game:LoadGame(injectScriptAssetID * -1) end)
|
||||||
|
else
|
||||||
|
pcall(function() Game:GetService("ScriptContext"):AddStarterScript(injectScriptAssetID) end)
|
||||||
|
end
|
||||||
|
|
||||||
|
Game:GetService("RunService"):Run()
|
||||||
|
end
|
||||||
|
|
||||||
|
';
|
||||||
$job = new Roblox\Grid\Rcc\Job($jobid, 99999999999); // pls only set to this amount WHEN ur hosting a gameserver when ur rendering do like 10 minutes
|
$job = new Roblox\Grid\Rcc\Job($jobid, 99999999999); // pls only set to this amount WHEN ur hosting a gameserver when ur rendering do like 10 minutes
|
||||||
$funny = new Roblox\Grid\Rcc\ScriptExecution("Script".rand(1,getrandmax()), $script);
|
$funny = new Roblox\Grid\Rcc\ScriptExecution("Script".rand(1,getrandmax()), $script);
|
||||||
$result = $RCCServiceSoap->OpenJob($job, $funny);
|
$result = $RCCServiceSoap->OpenJob($job, $funny);
|
||||||
echo '<pre>' . var_export($RCCServiceSoap, true) . '</pre>';
|
|
||||||
Loading…
Reference in New Issue