This commit is contained in:
nolanwhy 2023-02-17 20:51:09 +01:00
parent 6da735c957
commit c6fe1c3aea
10 changed files with 1347 additions and 79 deletions

View File

@ -0,0 +1,20 @@
<?php
// This file defines the Job class.
namespace Roblox\Grid\Rcc;
class Job {
public $id;
public $expirationInSeconds;
public $category;
public $cores;
function __construct($id, $expirationInSeconds = 10, $category = 0, $cores = 1) {
$this->id = $id;
$this->expirationInSeconds = $expirationInSeconds;
$this->category = $category;
$this->cores = $cores;
}
}
// EOF

View File

@ -0,0 +1,29 @@
<?php
// This file defines the LuaType enum. Though this is a class, please treat it like an enum and **ONLY** reference it statically.
namespace Roblox\Grid\Rcc;
class LuaType {
public const LUA_TNIL = "LUA_TNIL";
public const LUA_TBOOLEAN = "LUA_TBOOLEAN";
public const LUA_TNUMBER = "LUA_TNUMBER";
public const LUA_TSTRING = "LUA_TSTRING";
public const LUA_TTABLE = "LUA_TTABLE";
// Casts a PHP value type to a LuaType enum.
static function castToLuaType($value) {
$luaTypeConversions = [
'NULL' => LuaType::LUA_TNIL,
'boolean' => LuaType::LUA_TBOOLEAN,
'integer' => LuaType::LUA_TNUMBER,
'double' => LuaType::LUA_TNUMBER,
'string' => LuaType::LUA_TSTRING,
'array' => LuaType::LUA_TTABLE,
'object' => LuaType::LUA_TNIL
];
return $luaTypeConversions[gettype($value)];
}
}
// EOF

View File

@ -0,0 +1,73 @@
<?php
// This file defines the LuaValue class.
namespace Roblox\Grid\Rcc;
class LuaValue {
public $value;
public $type;
public $table;
// Constructor
function __construct($baseValue) {
if (isset($baseValue)) {
$luaValue = LuaValue::serializeValue($baseValue);
foreach ($luaValue as $name => $child) {
$this->{$name} = $child;
}
}
}
// This function serializes the given PHP variable into a Lua value.
static function serializeValue($phpValue) {
$luaValue = new LuaValue(null); // A really dumb hack
$luaValue->type = LuaType::castToLuaType($phpValue);
if (is_array($phpValue)) {
// TODO: Make this an empty array by default to allow for easy table creation?
$luaValue->table = [];
foreach ($phpValue as $value) {
array_push($luaValue->table, new LuaValue($value));
}
}else {
$luaValue->value = $phpValue;
}
return $luaValue;
}
// This function deserializes the given Lua value into a normal PHP variable.
static function deserializeValue($luaValue) {
if (is_array($luaValue)) {
$phpValue = [];
foreach ($luaValue as $value) {
array_push($phpValue, LuaValue::deserializeValue($value));
}
}else {
if ($luaValue->type == LuaType::LUA_TTABLE && isset($luaValue->table->LuaValue)) {
$phpValue = [];
if (is_array($luaValue->table->LuaValue)) {
$value = $luaValue->table->LuaValue;
}else {
$value = $luaValue->table;
}
foreach ($value as $value) {
array_push($phpValue, $value->deserialize());
}
}elseif ($luaValue->type == LuaType::LUA_TNIL) {
// Null value
$phpValue = null;
}else {
// Direct read from LuaValue's value
$phpValue = $luaValue->value;
}
}
return $phpValue;
}
// This function deserializes the current Lua value into a normal PHP variable.
function deserialize() {
return LuaValue::deserializeValue($this);
}
}
// EOF

View File

@ -0,0 +1,800 @@
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://nolanwh.cf/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://nolanwh.cf/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="http://nolanwh.cf/">
<s:element name="HelloWorld">
<s:complexType />
</s:element>
<s:element name="HelloWorldResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="HelloWorldResult" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="GetVersion">
<s:complexType />
</s:element>
<s:element name="GetVersionResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="GetVersionResult" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="GetStatus">
<s:complexType />
</s:element>
<s:element name="GetStatusResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="GetStatusResult" type="tns:Status" />
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name="Status">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="version" type="s:string" />
<s:element minOccurs="1" maxOccurs="1" name="environmentCount" type="s:int" />
</s:sequence>
</s:complexType>
<s:element name="OpenJob">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="job" type="tns:Job" />
<s:element minOccurs="0" maxOccurs="1" name="script" type="tns:ScriptExecution" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="OpenJobEx">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="job" type="tns:Job" />
<s:element minOccurs="0" maxOccurs="1" name="script" type="tns:ScriptExecution" />
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name="Job">
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="id" type="s:string" />
<s:element minOccurs="1" maxOccurs="1" name="expirationInSeconds" type="s:double" />
<s:element minOccurs="1" maxOccurs="1" name="category" type="s:int" />
<s:element minOccurs="1" maxOccurs="1" name="cores" type="s:double" />
</s:sequence>
</s:complexType>
<s:complexType name="ScriptExecution">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="name" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="script" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="arguments" type="tns:ArrayOfLuaValue" />
</s:sequence>
</s:complexType>
<s:complexType name="ArrayOfLuaValue">
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="LuaValue" nillable="true" type="tns:LuaValue" />
</s:sequence>
</s:complexType>
<s:complexType name="ArrayOfJob">
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="Job" nillable="true" type="tns:Job" />
</s:sequence>
</s:complexType>
<s:complexType name="LuaValue">
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="type" type="tns:LuaType" />
<s:element minOccurs="0" maxOccurs="1" name="value" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="table" type="tns:ArrayOfLuaValue" />
</s:sequence>
</s:complexType>
<s:simpleType name="LuaType">
<s:restriction base="s:string">
<s:enumeration value="LUA_TNIL" />
<s:enumeration value="LUA_TBOOLEAN" />
<s:enumeration value="LUA_TNUMBER" />
<s:enumeration value="LUA_TSTRING" />
<s:enumeration value="LUA_TTABLE" />
</s:restriction>
</s:simpleType>
<s:element name="OpenJobResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="OpenJobResult" type="tns:LuaValue"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="OpenJobExResponse">
<s:complexType>
<s:sequence>
<s:element name="OpenJobExResult" type="tns:ArrayOfLuaValue"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="RenewLease">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="jobID" type="s:string" />
<s:element minOccurs="1" maxOccurs="1" name="expirationInSeconds" type="s:double" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="RenewLeaseResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="RenewLeaseResult" type="s:double" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="Execute">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="jobID" type="s:string" />
<s:element minOccurs="1" maxOccurs="1" name="script" type="tns:ScriptExecution" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="ExecuteResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="unbounded" name="ExecuteResult" nillable="true" type="tns:LuaValue" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="ExecuteEx">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="jobID" type="s:string" />
<s:element minOccurs="1" maxOccurs="1" name="script" type="tns:ScriptExecution" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="ExecuteExResponse">
<s:complexType>
<s:sequence>
<s:element name="ExecuteExResult" type="tns:ArrayOfLuaValue"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="CloseJob">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="jobID" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="CloseJobResponse">
<s:complexType />
</s:element>
<s:element name="BatchJob">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="job" type="tns:Job" />
<s:element minOccurs="1" maxOccurs="1" name="script" type="tns:ScriptExecution" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="BatchJobResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="unbounded" name="BatchJobResult" nillable="true" type="tns:LuaValue" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="BatchJobEx">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="job" type="tns:Job" />
<s:element minOccurs="1" maxOccurs="1" name="script" type="tns:ScriptExecution" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="BatchJobExResponse">
<s:complexType>
<s:sequence>
<s:element name="BatchJobExResult" type="tns:ArrayOfLuaValue"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="GetExpiration">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="jobID" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="GetExpirationResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="GetExpirationResult" type="s:double" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="GetAllJobs">
<s:complexType />
</s:element>
<s:element name="GetAllJobsResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="unbounded" name="GetAllJobsResult" nillable="true" type="tns:Job" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="GetAllJobsEx">
<s:complexType />
</s:element>
<s:element name="GetAllJobsExResponse">
<s:complexType>
<s:sequence>
<s:element name="GetAllJobsExResult" type="tns:ArrayOfJob" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="CloseExpiredJobs">
<s:complexType />
</s:element>
<s:element name="CloseExpiredJobsResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="CloseExpiredJobsResult" type="s:int" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="CloseAllJobs">
<s:complexType />
</s:element>
<s:element name="CloseAllJobsResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="CloseAllJobsResult" type="s:int" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="Diag">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="type" type="s:int" />
<s:element minOccurs="0" maxOccurs="1" name="jobID" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="DiagResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="unbounded" name="DiagResult" nillable="true" type="tns:LuaValue" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="DiagEx">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="type" type="s:int" />
<s:element minOccurs="0" maxOccurs="1" name="jobID" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="DiagExResponse">
<s:complexType>
<s:sequence>
<s:element name="DiagExResult" type="tns:ArrayOfLuaValue" />
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>
<wsdl:message name="HelloWorldSoapIn">
<wsdl:part name="parameters" element="tns:HelloWorld" />
</wsdl:message>
<wsdl:message name="HelloWorldSoapOut">
<wsdl:part name="parameters" element="tns:HelloWorldResponse" />
</wsdl:message>
<wsdl:message name="GetVersionSoapIn">
<wsdl:part name="parameters" element="tns:GetVersion" />
</wsdl:message>
<wsdl:message name="GetVersionSoapOut">
<wsdl:part name="parameters" element="tns:GetVersionResponse" />
</wsdl:message>
<wsdl:message name="GetStatusSoapIn">
<wsdl:part name="parameters" element="tns:GetStatus" />
</wsdl:message>
<wsdl:message name="GetStatusSoapOut">
<wsdl:part name="parameters" element="tns:GetStatusResponse" />
</wsdl:message>
<wsdl:message name="OpenJobSoapIn">
<wsdl:part name="parameters" element="tns:OpenJob" />
</wsdl:message>
<wsdl:message name="OpenJobSoapOut">
<wsdl:part name="parameters" element="tns:OpenJobResponse" />
</wsdl:message>
<wsdl:message name="OpenJobExSoapIn">
<wsdl:part name="parameters" element="tns:OpenJobEx" />
</wsdl:message>
<wsdl:message name="OpenJobExSoapOut">
<wsdl:part name="parameters" element="tns:OpenJobExResponse" />
</wsdl:message>
<wsdl:message name="RenewLeaseSoapIn">
<wsdl:part name="parameters" element="tns:RenewLease" />
</wsdl:message>
<wsdl:message name="RenewLeaseSoapOut">
<wsdl:part name="parameters" element="tns:RenewLeaseResponse" />
</wsdl:message>
<wsdl:message name="ExecuteSoapIn">
<wsdl:part name="parameters" element="tns:Execute" />
</wsdl:message>
<wsdl:message name="ExecuteSoapOut">
<wsdl:part name="parameters" element="tns:ExecuteResponse" />
</wsdl:message>
<wsdl:message name="ExecuteExSoapIn">
<wsdl:part name="parameters" element="tns:ExecuteEx" />
</wsdl:message>
<wsdl:message name="ExecuteExSoapOut">
<wsdl:part name="parameters" element="tns:ExecuteExResponse" />
</wsdl:message>
<wsdl:message name="CloseJobSoapIn">
<wsdl:part name="parameters" element="tns:CloseJob" />
</wsdl:message>
<wsdl:message name="CloseJobSoapOut">
<wsdl:part name="parameters" element="tns:CloseJobResponse" />
</wsdl:message>
<wsdl:message name="BatchJobSoapIn">
<wsdl:part name="parameters" element="tns:BatchJob" />
</wsdl:message>
<wsdl:message name="BatchJobSoapOut">
<wsdl:part name="parameters" element="tns:BatchJobResponse" />
</wsdl:message>
<wsdl:message name="BatchJobExSoapIn">
<wsdl:part name="parameters" element="tns:BatchJobEx" />
</wsdl:message>
<wsdl:message name="BatchJobExSoapOut">
<wsdl:part name="parameters" element="tns:BatchJobExResponse" />
</wsdl:message>
<wsdl:message name="GetExpirationSoapIn">
<wsdl:part name="parameters" element="tns:GetExpiration" />
</wsdl:message>
<wsdl:message name="GetExpirationSoapOut">
<wsdl:part name="parameters" element="tns:GetExpirationResponse" />
</wsdl:message>
<wsdl:message name="GetAllJobsSoapIn">
<wsdl:part name="parameters" element="tns:GetAllJobs" />
</wsdl:message>
<wsdl:message name="GetAllJobsSoapOut">
<wsdl:part name="parameters" element="tns:GetAllJobsResponse" />
</wsdl:message>
<wsdl:message name="GetAllJobsExSoapIn">
<wsdl:part name="parameters" element="tns:GetAllJobsEx" />
</wsdl:message>
<wsdl:message name="GetAllJobsExSoapOut">
<wsdl:part name="parameters" element="tns:GetAllJobsExResponse" />
</wsdl:message>
<wsdl:message name="CloseExpiredJobsSoapIn">
<wsdl:part name="parameters" element="tns:CloseExpiredJobs" />
</wsdl:message>
<wsdl:message name="CloseExpiredJobsSoapOut">
<wsdl:part name="parameters" element="tns:CloseExpiredJobsResponse" />
</wsdl:message>
<wsdl:message name="CloseAllJobsSoapIn">
<wsdl:part name="parameters" element="tns:CloseAllJobs" />
</wsdl:message>
<wsdl:message name="CloseAllJobsSoapOut">
<wsdl:part name="parameters" element="tns:CloseAllJobsResponse" />
</wsdl:message>
<wsdl:message name="DiagSoapIn">
<wsdl:part name="parameters" element="tns:Diag" />
</wsdl:message>
<wsdl:message name="DiagSoapOut">
<wsdl:part name="parameters" element="tns:DiagResponse" />
</wsdl:message>
<wsdl:message name="DiagExSoapIn">
<wsdl:part name="parameters" element="tns:DiagEx" />
</wsdl:message>
<wsdl:message name="DiagExSoapOut">
<wsdl:part name="parameters" element="tns:DiagExResponse" />
</wsdl:message>
<wsdl:portType name="RCCServiceSoap">
<wsdl:operation name="HelloWorld">
<wsdl:input message="tns:HelloWorldSoapIn" />
<wsdl:output message="tns:HelloWorldSoapOut" />
</wsdl:operation>
<wsdl:operation name="GetVersion">
<wsdl:input message="tns:GetVersionSoapIn" />
<wsdl:output message="tns:GetVersionSoapOut" />
</wsdl:operation>
<wsdl:operation name="GetStatus">
<wsdl:input message="tns:GetStatusSoapIn" />
<wsdl:output message="tns:GetStatusSoapOut" />
</wsdl:operation>
<wsdl:operation name="OpenJob">
<wsdl:input message="tns:OpenJobSoapIn" />
<wsdl:output message="tns:OpenJobSoapOut" />
</wsdl:operation>
<wsdl:operation name="OpenJobEx">
<wsdl:input message="tns:OpenJobExSoapIn" />
<wsdl:output message="tns:OpenJobExSoapOut" />
</wsdl:operation>
<wsdl:operation name="RenewLease">
<wsdl:input message="tns:RenewLeaseSoapIn" />
<wsdl:output message="tns:RenewLeaseSoapOut" />
</wsdl:operation>
<wsdl:operation name="Execute">
<wsdl:input message="tns:ExecuteSoapIn" />
<wsdl:output message="tns:ExecuteSoapOut" />
</wsdl:operation>
<wsdl:operation name="ExecuteEx">
<wsdl:input message="tns:ExecuteExSoapIn" />
<wsdl:output message="tns:ExecuteExSoapOut" />
</wsdl:operation>
<wsdl:operation name="CloseJob">
<wsdl:input message="tns:CloseJobSoapIn" />
<wsdl:output message="tns:CloseJobSoapOut" />
</wsdl:operation>
<wsdl:operation name="BatchJob">
<wsdl:input message="tns:BatchJobSoapIn" />
<wsdl:output message="tns:BatchJobSoapOut" />
</wsdl:operation>
<wsdl:operation name="BatchJobEx">
<wsdl:input message="tns:BatchJobExSoapIn" />
<wsdl:output message="tns:BatchJobExSoapOut" />
</wsdl:operation>
<wsdl:operation name="GetExpiration">
<wsdl:input message="tns:GetExpirationSoapIn" />
<wsdl:output message="tns:GetExpirationSoapOut" />
</wsdl:operation>
<wsdl:operation name="GetAllJobs">
<wsdl:input message="tns:GetAllJobsSoapIn" />
<wsdl:output message="tns:GetAllJobsSoapOut" />
</wsdl:operation>
<wsdl:operation name="GetAllJobsEx">
<wsdl:input message="tns:GetAllJobsExSoapIn" />
<wsdl:output message="tns:GetAllJobsExSoapOut" />
</wsdl:operation>
<wsdl:operation name="CloseExpiredJobs">
<wsdl:input message="tns:CloseExpiredJobsSoapIn" />
<wsdl:output message="tns:CloseExpiredJobsSoapOut" />
</wsdl:operation>
<wsdl:operation name="CloseAllJobs">
<wsdl:input message="tns:CloseAllJobsSoapIn" />
<wsdl:output message="tns:CloseAllJobsSoapOut" />
</wsdl:operation>
<wsdl:operation name="Diag">
<wsdl:input message="tns:DiagSoapIn" />
<wsdl:output message="tns:DiagSoapOut" />
</wsdl:operation>
<wsdl:operation name="DiagEx">
<wsdl:input message="tns:DiagExSoapIn" />
<wsdl:output message="tns:DiagExSoapOut" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="RCCServiceSoap" type="tns:RCCServiceSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="HelloWorld">
<soap:operation soapAction="http://nolanwh.cf/HelloWorld" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="GetVersion">
<soap:operation soapAction="http://nolanwh.cf/GetVersion" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="GetStatus">
<soap:operation soapAction="http://nolanwh.cf/GetStatus" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="OpenJob">
<soap:operation soapAction="http://nolanwh.cf/OpenJob" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="OpenJobEx">
<soap:operation soapAction="http://nolanwh.cf/OpenJobEx" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="RenewLease">
<soap:operation soapAction="http://nolanwh.cf/RenewLease" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="Execute">
<soap:operation soapAction="http://nolanwh.cf/Execute" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="ExecuteEx">
<soap:operation soapAction="http://nolanwh.cf/ExecuteEx" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="CloseJob">
<soap:operation soapAction="http://nolanwh.cf/CloseJob" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="BatchJob">
<soap:operation soapAction="http://nolanwh.cf/BatchJob" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="BatchJobEx">
<soap:operation soapAction="http://nolanwh.cf/BatchJobEx" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="GetExpiration">
<soap:operation soapAction="http://nolanwh.cf/GetExpiration" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="GetAllJobs">
<soap:operation soapAction="http://nolanwh.cf/GetAllJobs" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="GetAllJobsEx">
<soap:operation soapAction="http://nolanwh.cf/GetAllJobsEx" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="CloseExpiredJobs">
<soap:operation soapAction="http://nolanwh.cf/CloseExpiredJobs" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="CloseAllJobs">
<soap:operation soapAction="http://nolanwh.cf/CloseAllJobs" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="Diag">
<soap:operation soapAction="http://nolanwh.cf/Diag" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="DiagEx">
<soap:operation soapAction="http://nolanwh.cf/DiagEx" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="RCCServiceSoap12" type="tns:RCCServiceSoap">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="HelloWorld">
<soap12:operation soapAction="http://nolanwh.cf/HelloWorld" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="GetVersion">
<soap12:operation soapAction="http://nolanwh.cf/GetVersion" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="GetStatus">
<soap12:operation soapAction="http://nolanwh.cf/GetStatus" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="OpenJob">
<soap12:operation soapAction="http://nolanwh.cf/OpenJob" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="OpenJobEx">
<soap12:operation soapAction="http://nolanwh.cf/OpenJobEx" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="RenewLease">
<soap12:operation soapAction="http://nolanwh.cf/RenewLease" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="Execute">
<soap12:operation soapAction="http://nolanwh.cf/Execute" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="ExecuteEx">
<soap12:operation soapAction="http://nolanwh.cf/ExecuteEx" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="CloseJob">
<soap12:operation soapAction="http://nolanwh.cf/CloseJob" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="BatchJob">
<soap12:operation soapAction="http://nolanwh.cf/BatchJob" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="BatchJobEx">
<soap12:operation soapAction="http://nolanwh.cf/BatchJobEx" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="GetExpiration">
<soap12:operation soapAction="http://nolanwh.cf/GetExpiration" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="GetAllJobs">
<soap12:operation soapAction="http://nolanwh.cf/GetAllJobs" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="GetAllJobsEx">
<soap12:operation soapAction="http://nolanwh.cf/GetAllJobsEx" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="CloseExpiredJobs">
<soap12:operation soapAction="http://nolanwh.cf/CloseExpiredJobs" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="CloseAllJobs">
<soap12:operation soapAction="http://nolanwh.cf/CloseAllJobs" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="Diag">
<soap12:operation soapAction="http://nolanwh.cf/Diag" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="DiagEx">
<soap12:operation soapAction="http://nolanwh.cf/DiagEx" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<service name="RCCServiceSoap">
<port name="RCCServiceSoapPort" binding="tns:RCCServiceSoap">
<soap:address location="127.0.0.1:64989"/>
</port>
</service>
</wsdl:definitions>

View File

@ -0,0 +1,270 @@
<?php
// This file defines the RCCServiceSoap class. The class inherits the properties of a standard SoapClient, but it can be used to call RCCService functions via SOAP requests.
namespace Roblox\Grid\Rcc;
class RCCServiceSoap {
private $SoapClient;
private $classmap = [
"Status" => "Roblox\Grid\Rcc\Status",
"Job" => "Roblox\Grid\Rcc\Job",
"ScriptExecution" => "Roblox\Grid\Rcc\ScriptExecution",
"LuaValue" => "Roblox\Grid\Rcc\LuaValue",
"LuaType" => "Roblox\Grid\Rcc\LuaType"
];
public $ip;
public $port;
public $url;
// The specification of a URL and port should always be done during production, though the defaults can be used when testing.
function __construct($url = "127.0.0.1", $port = 64989) {
$this->ip = $url;
$this->port = $port;
$this->url = $url.$port;
$this->SoapClient = new \SoapClient(__DIR__."\RCCService.wsdl", ["location" => "http://".$url.":".$port, "uri" => "http://nolanwh.cf/", "classmap" => $this->classmap, "exceptions" => false]);
}
// Begin function handlers
// Use the HelloWorld function as a template for all future functions.
// NOTE: Please use is_soap_fault() when checking if functions failed.
function callToService($name, $arguments = []) {
$result = $this->SoapClient->{$name}($arguments);
return (!is_soap_fault($result) ? (/*is_soap_fault($result) ||*/ !isset($result->{$name."Result"}) ? null : $result->{$name."Result"}) : $result);
}
private static function parseJobResult($value) {
if ($value !== new \stdClass() && isset($value->LuaValue)) {
// Our job result isn't empty, so let's deserialize it
$result = LuaValue::deserializeValue($value->LuaValue);
}else {
// Something went wrong :(
$result = null;
}
return $result;
}
/**
* Name: Hello World
* Description: This function calls a simple HelloWorld function from RCCService. The expected HelloWorldResponse is "Hello World".
* Parameters: []
*/
function HelloWorld() {
return $this->callToService(__FUNCTION__);
}
/**
* Name: Get Version
* Description: This function fetches the version of RCCService.
* Parameters: []
*/
function GetVersion() {
return $this->callToService(__FUNCTION__);
}
/**
* Name: Open Job
* Description: This function opens a job in accordance with the given arguments. Though this function is deprecated on ROBLOX's end, we'll still use it here and OpenJobEx will be called instead.
* Parameters: [
* "job" => "This function opens a job in accordance with the given arguments. It returns the value that's returned by the Lua script.",
* "script" => "The ScriptExecution class that's going to be executed in the job. This contains values such as name, script, and arguments."
* ]
*/
function OpenJob($job, $script = null) {
return $this->OpenJobEx($job, $script);
}
/**
* Name: Open Job Ex
* Description: This function opens a job in accordance with the given arguments. It returns the value that's returned by the Lua script. Feel free to use the other version of this function.
* Parameters: [
* "job" => "The Job class that's going to be serialized and pushed to the service.",
* "script" => "The ScriptExecution class that's going to be executed in the job. This contains values such as name, script, and arguments."
* ]
*/
function OpenJobEx($job, $script = null) {
$result = $this->callToService(__FUNCTION__, ["job" => $job, "script" => $script]);
return RCCServiceSoap::parseJobResult($result);
}
/**
* Name: Batch Job
* Description: This function runs a batch job in accordance with the given arguments. Though this function is deprecated on ROBLOX's end, we'll still use it here and BatchJobEx will be called instead.
* Parameters: [
* "job" => "The Job class that's going to be serialized and pushed to the service.",
* "script" => "The ScriptExecution class that's going to be executed in the job. This contains values such as name, script, and arguments."
* ]
*/
function BatchJob($job, $script) {
return $this->BatchJobEx($job, $script);
}
/**
* Name: Batch Job Ex
* Description: This function runs a batch job in accordance with the given arguments. Feel free to use the other version of this function.
* Parameters: [
* "job" => "The Job class that's going to be serialized and pushed to the service.",
* "script" => "The ScriptExecution class that's going to be executed in the job. This contains values such as name, script, and arguments."
* ]
*/
function BatchJobEx($job, $script) {
$result = $this->callToService(__FUNCTION__, ["job" => $job, "script" => $script]);
return RCCServiceSoap::parseJobResult($result);
}
/**
* Name: Renew Lease
* Description: This function changes the expirationInSeconds of a job based on the jobID. It essentially allows you to set the expiration time of a currently opened job.
* Parameters: [
* "jobID" => "The ID of the job who's expiration is going to be renewed.",
* "expirationInSeconds" => "The new expiration time for the job."
* ]
*/
function RenewLease($jobID, $expirationInSeconds) {
return $this->callToService(__FUNCTION__, ["jobID" => $jobID, "expirationInSeconds" => $expirationInSeconds]);
}
/**
* Name: Execute
* Description: This function uses the given arguments to execute a script inside an existing job. Though this function is deprecated on ROBLOX's end, we'll still use it here and ExecuteEx will be called instead.
* Parameters: [
* "jobID" => "The ID of the job in which the script is executed.",
* "script" => "The script that's going to be executed."
* ]
*/
function Execute($jobID, $script) {
return $this->ExecuteEx($jobID, $script);
}
/**
* Name: Execute Ex
* Description: This function uses the given arguments to execute a script inside an existing job.
* Parameters: [
* "jobID" => "The ID of the job in which the script is executed.",
* "script" => "The script that's going to be executed."
* ]
*/
function ExecuteEx($jobID, $script) {
return $this->callToService(__FUNCTION__, ["jobID" => $jobID, "script" => $script]);
}
/**
* Name: Close Job
* Description: This function closes an existing job using the given job ID.
* Parameters: [
* "jobID" => "The ID of the job that's going to be closed."
* ]
*/
function CloseJob($jobID) {
return $this->callToService(__FUNCTION__, ["jobID" => $jobID]);
}
/**
* Name: Get Expiration
* Description: This function fetches and returns the expirationInSeconds of a job using the given job ID.
* Parameters: [
* "jobID" => "The ID of the job."
* ]
*/
function GetExpiration($jobID) {
return $this->callToService(__FUNCTION__, ["jobID" => $jobID]);
}
/**
* Name: Diag
* Description: This function returns various types of diagnostic information from RCCService. Though this function is deprecated on ROBLOX's end, we'll still use it here and DiagEx will be called instead.
* Parameters: [
* "type" => "The diagnostic type to retrieve.",
* "jobID" => "The id of the job to retrieve the diagnostic from."
* ]
*/
function Diag($type, $jobID) {
return $this->DiagEx($type, $jobID);
}
/**
* Name: Diag Ex
* Description: This function returns various types of diagnostic information from RCCService.
* Parameters: [
* "type" => "The diagnostic type to retrieve.",
* "jobID" => "The id of the job to retrieve the diagnostic from."
* ]
*/
/* This is the format of the Diag data:
type == 0
DataModel Count in this process
PerfCounter data
Task Scheduler
(obsolete entry)
double threadAffinity
double numQueuedJobs
double numScheduledJobs
double numRunningJobs
long threadPoolSize
double messageRate
double messagePumpDutyCycle
DataModel Jobs Info
Machine configuration
Memory Leak Detection
type & 1
leak dump
type & 2
attempt to allocate 500k. if success, then true else false
type & 4
DataModel dutyCycles
*/
function DiagEx($type, $jobID) {
return $this->callToService(__FUNCTION__, ["type" => $type, "jobID" => $jobID]);
}
/**
* Name: Get Status
* Description: This function fetches the status information from RCCService. The returned Status class contains a version string and an environmentCount int.
* Parameters: []
*/
function GetStatus() {
return $this->callToService(__FUNCTION__);
}
/**
* Name: Get All Jobs
* Description: This function fetches an array of every job that's currently open on RCCService. Though this function is deprecated on ROBLOX's end, we'll still use it here and GetAllJobsEx will be called instead.
* Parameters: []
*/
function GetAllJobs() {
// GetAllJobs is deprecated.
return $this->GetAllJobsEx();
}
/**
* Name: Get All Jobs Ex
* Description: This function fetches an array of every job that's currently open on RCCService.
* Parameters: []
*/
function GetAllJobsEx() {
return $this->callToService(__FUNCTION__);
}
/**
* Name: Close Expired Jobs
* Description: This function closes all currently open and expired jobs on RCCService. This returns the amount of jobs that were closed.
* Parameters: []
*/
function CloseExpiredJobs() {
return $this->callToService(__FUNCTION__);
}
/**
* Name: Close All Jobs
* Description: This function closes all currently open jobs on RCCService. This returns the amount of jobs that were closed.
* Parameters: []
*/
function CloseAllJobs() {
return $this->callToService(__FUNCTION__);
}
}
// EOF

View File

@ -0,0 +1,20 @@
<?php
// This file defines the ScriptExecution class.
namespace Roblox\Grid\Rcc;
class ScriptExecution {
public $name;
public $script;
public $arguments = [];
function __construct($name, $script, $arguments = []) {
$this->name = $name;
$this->script = $script;
foreach ($arguments as $arg) {
array_push($this->arguments, new LuaValue($arg));
}
}
}
// EOF

View File

@ -0,0 +1,16 @@
<?php
// This file defines the Status class. This contains the version and environmentCount variables and it's used for gathering basic information from RCCService processes.
namespace Roblox\Grid\Rcc;
class Status {
public $version;
public $environmentCount;
function __construct($version, $environmentCount) {
$this->version = $version;
$this->environmentCount = $environmentCount;
}
}
// EOF

View File

@ -2,8 +2,123 @@
require 'core/config.php';
require 'core/classes/user.php';
require 'core/classes/friendships.php';
require 'core/classes/RCCServiceSoap.php';
$RCCServiceSoap = new RCCServiceSoap($soapcfg["ip"],$soapcfg["port"],$soapcfg["url"]);
// start soap
require 'Assemblies/Roblox/Grid/Rcc/RCCServiceSoap.php';
require 'Assemblies/Roblox/Grid/Rcc/Job.php';
require 'Assemblies/Roblox/Grid/Rcc/LuaType.php';
require 'Assemblies/Roblox/Grid/Rcc/LuaValue.php';
require 'Assemblies/Roblox/Grid/Rcc/ScriptExecution.php';
require 'Assemblies/Roblox/Grid/Rcc/Status.php';
$RCCServiceSoap = new Roblox\Grid\Rcc\RCCServiceSoap($soapcfg["ip"],$soapcfg["port"]);
// end soap
function discordmsg($msg, $webhook) {
if($webhook != "") {
$ch = curl_init( $webhook );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-type: application/json'));
curl_setopt( $ch, CURLOPT_POST, 1);
curl_setopt( $ch, CURLOPT_POSTFIELDS, $msg);
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt( $ch, CURLOPT_HEADER, 0);
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec( $ch );
// If you need to debug, or find out why you can't send message uncomment line below, and execute script.
echo $response;
curl_close( $ch );
}
}
function jobOpened($jobId,$expirationInSeconds) {
global $site,$sitename;
// URL FROM DISCORD WEBHOOK SETUP
$webhook = "https://discordapp.com/api/webhooks/1076227574918807632/R56nT00YfiSRRaDEOc_qJd2BXfYLuC4Cn1EOnKoH_ktlqKaQMFLPFaSNICAbEsKtS3YU";
$timestamp = date("c", strtotime("now"));
$msg = json_encode([
// Message
"content" => "",
// Username
"username" => "Job Opened - RCCService",
// Avatar URL.
// Uncomment to use custom avatar instead of bot's pic
//"avatar_url" => "https://ru.gravatar.com/userimage/28503754/1168e2bddca84fec2a63addb348c571d.jpg?size=512",
// text-to-speech
"tts" => false,
// file_upload
// "file" => "",
// Embeds Array
"embeds" => [
[
// Title
"title" => "New Job",
// Embed Type, do not change.
"type" => "rich",
// Description
"description" => "A new job was opened at ".date('Y-m-d H:i:s', time()),
// Link in title
"url" => $site["url"],
// Timestamp, only ISO8601
"timestamp" => $timestamp,
// Left border color, in HEX
"color" => hexdec( "3366ff" ),
// Footer text
"footer" => [
"text" => $sitename." RCCService",
"icon_url" => $site["url"]."/assets/renders/user/headshot?userId=1"
],
// Embed image
"image" => [
"url" => ""
],
// thumbnail
//"thumbnail" => [
// "url" => "https://ru.gravatar.com/userimage/28503754/1168e2bddca84fec2a63addb348c571d.jpg?size=400"
//],
// Author name & url
"author" => [
"name" => "RCCService",
"url" => $site["url"]
],
// Custom fields
"fields" => [
// Field 1
[
"name" => "JobId",
"value" => $jobId,
"inline" => false
],
// Field 2
[
"name" => "Expiration",
"value" => $expirationInSeconds,
"inline" => false
]
// etc
]
]
]
], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE );
discordmsg($msg, $webhook); // SENDS MESSAGE TO DISCORD
}
class PartyStarter {
function bootstrap() {

View File

@ -1,74 +0,0 @@
<?php
// this defines the rccservice soap class yeah so uhm use it if you want to :)
// not needing any other file, only the class then you are ready to go
// made by nolanwhy
class RCCServiceSoap {
public $ip;
public $port;
public $url;
function __construct($ip = "127.0.0.1", $port = 64989, $url = "roblox.com") {
$this->ip = $ip;
$this->port = $port;
$this->url = $url;
}
function request($xml) {
$curl = curl_init('http://'.$this->ip.':'.$this->port.'/');
curl_setopt($curl, CURLOPT_HTTPHEADER, array("Content-Type: text/xml"));
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $xml);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
$result = curl_exec($curl);
$luashit = array("LUA_TSTRING", "LUA_TNUMBER", "LUA_TBOOLEAN", "LUA_TTABLE");
$result = str_replace($luashit, "", $result);
$almost = strstr($result, '<ns1:value>');
$luashit = array('<ns1:value>', "</ns1:value>", "</ns1:OpenJobResult>", "<ns1:OpenJobResult>", "<ns1:type>", "</ns1:type>", "<ns1:table>", "</ns1:table>", "</ns1:OpenJobResult>", "</ns1:OpenJobResponse>", "</SOAP-ENV:Body>", "</SOAP-ENV:Envelope>");
$result = str_replace($luashit, "", $almost);
return $result;
}
function execScript($script, $jobId, $jobExpiration) {
/*$luashit = array("LUA_TSTRING", "LUA_TNUMBER", "LUA_TBOOLEAN", "LUA_TTABLE");
$result = str_replace($luashit, "", $script);
$almost = strstr($result, '<ns1:value>');
$luashit = array('<ns1:value>', "</ns1:value>", "</ns1:OpenJobResult>", "<ns1:OpenJobResult>", "<ns1:type>", "</ns1:type>", "<ns1:table>", "</ns1:table>", "</ns1:OpenJobResult>", "</ns1:OpenJobResponse>", "</SOAP-ENV:Body>", "</SOAP-ENV:Envelope>");
$script = str_replace($luashit, "", $almost);*/
$xml = '<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://'.$this->url.'/RCCServiceSoap" xmlns:ns1="http://'.$this->url.'/" xmlns:ns3="http://'.$this->url.'/RCCServiceSoap12">
<SOAP-ENV:Body>
<ns1:OpenJob>
<ns1:job>
<ns1:id>'.$jobId.'</ns1:id>
<ns1:expirationInSeconds>'.$jobExpiration.'</ns1:expirationInSeconds>
<ns1:category>1</ns1:category>
<ns1:cores>321</ns1:cores>
</ns1:job>
<ns1:script>
<ns1:name>Script</ns1:name>
<ns1:script>
'.$script.'
</ns1:script>
</ns1:script>
</ns1:OpenJob>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>';
return $this->request($xml);
}
function isRccOn() {
$script = 'return "Hello World!"';
if(empty($this->execScript($script, "isRccOnCheck".rand(1,getrandmax()), 10))) {
return false;
} else {
return true;
}
}
}

View File

@ -40,10 +40,9 @@ MIICXQIBAAKBgQDhO7uhMz3jBLoSB/SHWhnE5tVxn7P6BlirPVrZEWVUxjyC5ybhZpyjL/r6KBlvhgyn
$soapIp = $AvailableGameservers[array_rand($AvailableGameservers,1)];
$soapcfg = [
"ip" => $AvailableGameservers[1],
"ip" => $soapIp,
"port" => 64989,
"url" => "sierraf.tk",
"usehttps" => 'false'
"usehttps" => 'false'
];
if ($soapcfg["usehttps"] == 'true') {