new openrec change dropped guys

This commit is contained in:
recroom2016tutorial
2022-03-27 22:12:15 -04:00
parent 3fc8f954c1
commit 76c86ca4f6
16 changed files with 1107 additions and 147 deletions

10
.cs
View File

@@ -1,10 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace OpenRec
{
class Vault2018Rooms
{
}
}

View File

@@ -8,6 +8,7 @@ using api2018;
using api2017; using api2017;
using Newtonsoft.Json; using Newtonsoft.Json;
using vaultgamesesh; using vaultgamesesh;
using System.Collections.Generic;
namespace server namespace server
{ {
@@ -31,7 +32,7 @@ namespace server
{ {
//2 different servers for 2 different stages of the game, the apis change so much idk anymore //2 different servers for 2 different stages of the game, the apis change so much idk anymore
this.listener.Prefixes.Add("http://localhost:" + start.Program.version + "/"); this.listener.Prefixes.Add("http://localhost:" + start.Program.version + "/");
if (start.Program.version == "2017") if (start.Program.version == "2016")
{ {
for (; ; ) for (; ; )
{ {
@@ -69,23 +70,9 @@ namespace server
{ {
s = Config2.GetDebugConfig(); s = Config2.GetDebugConfig();
} }
if (Url == "platformlogin/v1/profiles") if (Url == "notification/v2")
{ {
s = getorcreate.GetOrCreateArray((ulong.Parse(text.Remove(0, 32)))); s = "[]";
CachedPlayerID = ulong.Parse(text.Remove(0, 32));
CachedPlatformID = ulong.Parse(text.Remove(0, 22));
File.WriteAllText("SaveData\\Profile\\userid.txt", Convert.ToString(CachedPlayerID));
if (new WebClient().DownloadString("https://raw.githubusercontent.com/recroom2016/OpenRec/master/Update/banned.txt").Contains(File.ReadAllText("SaveData\\Profile\\userid.txt")))
{
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("You are banned. Using this version of OpenRec will not work, please download OpenRec 0.4.2 or prior.");
Console.ForegroundColor = ConsoleColor.Green;
start.Program.bannedflag = true;
}
}
if (Url == "platformlogin/v6")
{
s = PlatformLogin.v4(CachedPlayerID);
} }
if (Url == "PlayerReporting/v1/moderationBlockDetails") if (Url == "PlayerReporting/v1/moderationBlockDetails")
{ {
@@ -100,9 +87,9 @@ namespace server
s = Amplitude.amplitude(); s = Amplitude.amplitude();
} }
if (Url.StartsWith("players/v1/")) if (Url.StartsWith("players/v1/"))
{ {
s = getorcreate.GetOrCreate(CachedPlayerID); s = getorcreate.GetOrCreate(CachedPlayerID);
} }
if (Url == "avatar/v2") if (Url == "avatar/v2")
{ {
s = File.ReadAllText("SaveData\\avatar.txt"); s = File.ReadAllText("SaveData\\avatar.txt");
@@ -154,16 +141,164 @@ namespace server
s = PlayerEventsResponse; s = PlayerEventsResponse;
} }
if (Url == "activities/charades/v1/words") if (Url == "activities/charades/v1/words")
{ {
s = Activities.Charades.words(); s = Activities.Charades.words();
} }
if (Url == "gamesessions/v2/joinrandom") if (Url == "gamesessions/v2/joinrandom")
{ {
s = gamesesh2018.GameSessions.JoinRandom(text); s = gamesesh.GameSessions.JoinRandom(text);
} }
if (Url == "gamesessions/v2/create") if (Url == "gamesessions/v2/create")
{ {
s = gamesesh2018.GameSessions.Create(text); s = gamesesh.GameSessions.Create(text);
}
if (rawUrl == "//api/sanitize/v1/isPure")
{
s = JsonConvert.SerializeObject(Sanitize.GetSanitize());
}
Console.WriteLine("API Response: " + s);
byte[] bytes = Encoding.UTF8.GetBytes(s);
response.ContentLength64 = (long)bytes.Length;
Stream outputStream = response.OutputStream;
outputStream.Write(bytes, 0, bytes.Length);
Thread.Sleep(200);
outputStream.Close();
this.listener.Stop();
}
}
if (start.Program.version == "2017")
{
for (; ; )
{
this.listener.Start();
Console.WriteLine("APIServer.cs is listening.");
HttpListenerContext context = this.listener.GetContext();
HttpListenerRequest request = context.Request;
HttpListenerResponse response = context.Response;
string rawUrl = request.RawUrl;
string Url = "";
if (rawUrl.StartsWith("/api/"))
{
Url = rawUrl.Remove(0, 5);
}
string text;
string s = "";
using (StreamReader streamReader = new StreamReader(request.InputStream, request.ContentEncoding))
{
text = streamReader.ReadToEnd();
}
if (!(Url == ""))
{
Console.WriteLine("API Requested: " + Url);
}
else
{
Console.WriteLine("API Requested (rawUrl): " + rawUrl);
}
Console.WriteLine("API Data: " + text);
if (Url.StartsWith("versioncheck"))
{
s = VersionCheckResponse;
}
if (Url == ("config/v2"))
{
s = Config2.GetDebugConfig();
}
if (Url == "platformlogin/v1/profiles")
{
s = getorcreate.GetOrCreateArray((ulong.Parse(text.Remove(0, 32))));
CachedPlayerID = ulong.Parse(text.Remove(0, 32));
CachedPlatformID = ulong.Parse(text.Remove(0, 22));
File.WriteAllText("SaveData\\Profile\\userid.txt", Convert.ToString(CachedPlayerID));
if (new WebClient().DownloadString("https://raw.githubusercontent.com/recroom2016/OpenRec/master/Update/banned.txt").Contains(File.ReadAllText("SaveData\\Profile\\userid.txt")))
{
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("You are banned. Using this version of OpenRec will not work, please download OpenRec 0.4.2 or prior.");
Console.ForegroundColor = ConsoleColor.Green;
start.Program.bannedflag = true;
}
}
if (Url == "platformlogin/v6")
{
s = PlatformLogin.v4(CachedPlayerID);
}
if (Url == "PlayerReporting/v1/moderationBlockDetails")
{
s = ModerationBlockDetails;
if (start.Program.bannedflag == true)
{
s = Banned;
}
}
if (Url == "config/v1/amplitude")
{
s = Amplitude.amplitude();
}
if (Url.StartsWith("players/v1/"))
{
s = getorcreate.GetOrCreate(CachedPlayerID);
}
if (Url == "avatar/v2")
{
s = File.ReadAllText("SaveData\\avatar.txt");
}
if (Url == "avatar/v2/set")
{
//for later 2018 builds compatibility
if (!(text.Contains("FaceFeatures")))
{
string postdatacache = text;
text = postdatacache.Remove(postdatacache.Length - 1, 1) + File.ReadAllText("SaveData\\App\\facefeaturesadd.txt");
}
File.WriteAllText("SaveData\\avatar.txt", text);
}
if (Url == "messages/v2/get")
{
s = BracketResponse;
}
if (Url == "relationships/v2/get")
{
s = BracketResponse;
}
if (Url == "settings/v2/")
{
s = File.ReadAllText("SaveData\\settings.txt");
}
if (Url == "settings/v2/set")
{
Settings.SetPlayerSettings(text);
}
if (Url == "avatar/v3/items")
{
s = File.ReadAllText("SaveData\\avataritems.txt");
}
if (Url == "equipment/v1/getUnlocked")
{
s = File.ReadAllText("SaveData\\equipment.txt");
}
if (Url == "avatar/v2/gifts")
{
s = BracketResponse;
}
if (Url == "events/v3/list")
{
s = Events.list();
}
if (Url == "playerevents/v1/all")
{
s = PlayerEventsResponse;
}
if (Url == "activities/charades/v1/words")
{
s = Activities.Charades.words();
}
if (Url == "gamesessions/v2/joinrandom")
{
s = gamesesh.GameSessions.JoinRandom(text);
}
if (Url == "gamesessions/v2/create")
{
s = gamesesh.GameSessions.Create(text);
} }
if (rawUrl == "//api/sanitize/v1/isPure") if (rawUrl == "//api/sanitize/v1/isPure")
{ {
@@ -188,6 +323,7 @@ namespace server
HttpListenerContext context = this.listener.GetContext(); HttpListenerContext context = this.listener.GetContext();
HttpListenerRequest request = context.Request; HttpListenerRequest request = context.Request;
HttpListenerResponse response = context.Response; HttpListenerResponse response = context.Response;
List<byte> list = new List<byte>();
string rawUrl = request.RawUrl; string rawUrl = request.RawUrl;
string Url = ""; string Url = "";
byte[] bytes = null; byte[] bytes = null;
@@ -214,13 +350,13 @@ namespace server
if (Url.StartsWith("versioncheck")) if (Url.StartsWith("versioncheck"))
{ {
if (Url.Contains("201809")) if (Url.Contains("201809"))
{ {
CachedVersionMonth = 09; CachedVersionMonth = 09;
} }
else else
{ {
CachedVersionMonth = 05; CachedVersionMonth = 05;
} }
s = VersionCheckResponse; s = VersionCheckResponse;
} }
if (Url == ("config/v2")) if (Url == ("config/v2"))
@@ -242,9 +378,9 @@ namespace server
} }
} }
if (Url == "platformlogin/v1/loginaccount") if (Url == "platformlogin/v1/loginaccount")
{ {
s = logincached.loginCache(CachedPlayerID, CachedPlatformID); s = logincached.loginCache(CachedPlayerID, CachedPlatformID);
} }
if (Url == "platformlogin/v1/createaccount") if (Url == "platformlogin/v1/createaccount")
{ {
s = logincached.loginCache(CachedPlayerID, CachedPlatformID); s = logincached.loginCache(CachedPlayerID, CachedPlatformID);
@@ -258,65 +394,65 @@ namespace server
s = BlankResponse; s = BlankResponse;
} }
if (Url == "players/v1/list") if (Url == "players/v1/list")
{ {
s = BracketResponse; s = BracketResponse;
} }
if (Url == "config/v1/amplitude") if (Url == "config/v1/amplitude")
{ {
s = Amplitude.amplitude(); s = Amplitude.amplitude();
} }
if (Url == "images/v2/named") if (Url == "images/v2/named")
{ {
s = ImagesV2Named; s = ImagesV2Named;
} }
if (Url == "PlayerReporting/v1/moderationBlockDetails") if (Url == "PlayerReporting/v1/moderationBlockDetails")
{ {
s = ModerationBlockDetails; s = ModerationBlockDetails;
if (start.Program.bannedflag == true) if (start.Program.bannedflag == true)
{ {
s = Banned; s = Banned;
} }
} }
if (Url == "//api/chat/v2/myChats?mode=0&count=50") if (Url == "//api/chat/v2/myChats?mode=0&count=50")
{ {
s = BracketResponse; s = BracketResponse;
} }
if (Url == "messages/v2/get") if (Url == "messages/v2/get")
{ {
s = BracketResponse; s = BracketResponse;
} }
if (Url == "relationships/v2/get") if (Url == "relationships/v2/get")
{ {
s = BracketResponse; s = BracketResponse;
} }
if (Url == "gameconfigs/v1/all") if (Url == "gameconfigs/v1/all")
{ {
s = File.ReadAllText("SaveData\\gameconfigs.txt"); s = File.ReadAllText("SaveData\\gameconfigs.txt");
} }
if (Url.StartsWith("storefronts/v3/giftdropstore")) if (Url.StartsWith("storefronts/v3/giftdropstore"))
{ {
if (CachedVersionMonth == 09) if (CachedVersionMonth == 09)
{ {
s = File.ReadAllText("SaveData\\storefronts2.txt"); s = File.ReadAllText("SaveData\\storefronts2.txt");
} }
else else
{ {
s = BracketResponse; s = BracketResponse;
} }
} }
if (Url.StartsWith("storefronts/v3/balance/")) if (Url.StartsWith("storefronts/v3/balance/"))
{ {
s = BracketResponse; s = BracketResponse;
} }
if (Url == "avatar/v2") if (Url == "avatar/v2")
{ {
s = File.ReadAllText("SaveData\\avatar.txt"); s = File.ReadAllText("SaveData\\avatar.txt");
} }
if (Url == "avatar/v2/set") if (Url == "avatar/v2/set")
{ {
//for later 2018 builds compatibility //for later 2018 builds compatibility
if (!(text.Contains("FaceFeatures"))) if (!(text.Contains("FaceFeatures")))
{ {
string postdatacache = text; string postdatacache = text;
text = postdatacache.Remove(postdatacache.Length - 1, 1) + File.ReadAllText("SaveData\\App\\facefeaturesadd.txt"); text = postdatacache.Remove(postdatacache.Length - 1, 1) + File.ReadAllText("SaveData\\App\\facefeaturesadd.txt");
} }
@@ -331,15 +467,15 @@ namespace server
Settings.SetPlayerSettings(text); Settings.SetPlayerSettings(text);
} }
if (rawUrl == "//api/chat/v2/myChats?mode=0&count=50") if (rawUrl == "//api/chat/v2/myChats?mode=0&count=50")
{ {
s = BracketResponse; s = BracketResponse;
} }
if (Url == "playersubscriptions/v1/my") if (Url == "playersubscriptions/v1/my")
{ {
s = BracketResponse; s = BracketResponse;
} }
if (Url == "avatar/v3/items") if (Url == "avatar/v3/items")
{ {
s = File.ReadAllText("SaveData\\avataritems.txt"); s = File.ReadAllText("SaveData\\avataritems.txt");
} }
if (Url == "equipment/v1/getUnlocked") if (Url == "equipment/v1/getUnlocked")
@@ -347,44 +483,48 @@ namespace server
s = File.ReadAllText("SaveData\\equipment.txt"); s = File.ReadAllText("SaveData\\equipment.txt");
} }
if (Url == "avatar/v1/saved") if (Url == "avatar/v1/saved")
{ {
s = BracketResponse; s = BracketResponse;
} }
if (Url == "consumables/v1/getUnlocked") if (Url == "consumables/v1/getUnlocked")
{ {
if (CachedVersionMonth == 09) if (CachedVersionMonth == 09)
{ {
s = BracketResponse; s = BracketResponse;
} }
else else
{ {
s = File.ReadAllText("SaveData\\consumables.txt"); s = File.ReadAllText("SaveData\\consumables.txt");
} }
} }
if (Url == "avatar/v2/gifts") if (Url == "avatar/v2/gifts")
{
s = BracketResponse;
}
if (Url == "storefronts/v2/2")
{
s = BlankResponse;
}
if (Url == "storefronts/v1/allGiftDrops/2")
{ {
s = BracketResponse; s = BracketResponse;
}
if (Url == "storefronts/v2/2")
{
s = BlankResponse;
} }
if (Url == "objectives/v1/myprogress") if (Url == "objectives/v1/myprogress")
{ {
s = JsonConvert.SerializeObject(new Objective2018()); s = JsonConvert.SerializeObject(new Objective2018());
} }
if (Url == "rooms/v1/myrooms") if (Url == "rooms/v1/myrooms")
{ {
s = File.ReadAllText("SaveData\\myrooms.txt"); s = File.ReadAllText("SaveData\\myrooms.txt");
} }
if (Url == "rooms/v2/myrooms") if (Url == "rooms/v2/myrooms")
{ {
s = BracketResponse; s = BracketResponse;
} }
if (Url == "rooms/v2/baserooms") if (Url == "rooms/v2/baserooms")
{ {
s = File.ReadAllText("SaveData\\baserooms.txt"); s = File.ReadAllText("SaveData\\baserooms.txt");
} }
if (Url == "rooms/v1/mybookmarkedrooms") if (Url == "rooms/v1/mybookmarkedrooms")
{ {
s = BracketResponse; s = BracketResponse;
@@ -406,12 +546,12 @@ namespace server
s = Activities.Charades.words(); s = Activities.Charades.words();
} }
if (Url == "gamesessions/v2/joinrandom") if (Url == "gamesessions/v2/joinrandom")
{ {
s = gamesesh2018.GameSessions.JoinRandom(text); s = gamesesh.GameSessions.JoinRandom(text);
} }
if (Url == "gamesessions/v2/create") if (Url == "gamesessions/v2/create")
{ {
s = gamesesh2018.GameSessions.Create(text); s = gamesesh.GameSessions.Create(text);
} }
if (Url == "gamesessions/v3/joinroom") if (Url == "gamesessions/v3/joinroom")
{ {
@@ -419,7 +559,7 @@ namespace server
} }
if (rawUrl == "//api/sanitize/v1/isPure") if (rawUrl == "//api/sanitize/v1/isPure")
{ {
s = JsonConvert.SerializeObject(Sanitize.GetSanitize()); s = "{\"IsPure\":true}";
} }
if (Url == "avatar/v3/saved") if (Url == "avatar/v3/saved")
{ {
@@ -430,57 +570,234 @@ namespace server
s = ChecklistV1Current; s = ChecklistV1Current;
} }
if (Url == "presence/v1/setplayertype") if (Url == "presence/v1/setplayertype")
{ {
s = BracketResponse; s = BracketResponse;
} }
if (Url == "challenge/v1/getCurrent") if (Url == "challenge/v1/getCurrent")
{ {
s = ChallengesV1GetCurrent; s = ChallengesV1GetCurrent;
} }
if (Url == "rooms/v1/featuredRoomGroup") if (Url == "rooms/v1/featuredRoomGroup")
{ {
s = BracketResponse; s = BracketResponse;
} }
if (Url == "rooms/v1/clone")
{
s = BracketResponse; //JsonConvert.SerializeObject(c000099.m00000a(text));
}
if (Url.StartsWith("rooms/v2/saveData"))
{
string text26 = "5GDNL91ZY43PXN2YJENTBL";
string path = c000004.m000007() + c000041.f000043.Room.Name;
File.WriteAllBytes(string.Concat(new string[]
{
c000004.m000007(),
c000041.f000043.Room.Name,
"\\room\\",
text26,
".room"
}), m00005d(list.ToArray(), "data.dat"));
c000041.f000043.Scenes[0].DataBlobName = text26 + ".room";
c000041.f000043.Scenes[0].DataModifiedAt = DateTime.Now;
File.WriteAllText(c000004.m000007() + c000041.f000043.Room.Name + "\\RoomDetails.json", JsonConvert.SerializeObject(c000041.f000043));
s = JsonConvert.SerializeObject(c00005d.m000035());
}
if (Url == "presence/v3/heartbeat") if (Url == "presence/v3/heartbeat")
{ {
s = JsonConvert.SerializeObject(Notification2018.Reponse.createResponse(4, c000020.m000027())); s = JsonConvert.SerializeObject(Notification2018.Reponse.createResponse(4, c000020.m000027()));
} }
if (Url == "rooms/v1/featuredRoomGroup") if (Url == "rooms/v1/featuredRoomGroup")
{ {
s = new WebClient().DownloadString("https://raw.githubusercontent.com/recroom2016/OpenRec/master/Update/dormslideshow.txt"); s = new WebClient().DownloadString("https://raw.githubusercontent.com/recroom2016/OpenRec/master/Update/dormslideshow.txt");
} }
if (Url.StartsWith("rooms/v1/hot"))
{
s = new WebClient().DownloadString("https://raw.githubusercontent.com/recroom2016/OpenRec/master/Update/hotrooms.txt");
}
if (Url.StartsWith("rooms/v4/details/29"))
{
s = File.ReadAllText("SaveData\\Rooms\\Downloaded\\RoomDetails.json");
}
Console.WriteLine("API Response: " + s); Console.WriteLine("API Response: " + s);
bytes = Encoding.UTF8.GetBytes(s); bytes = Encoding.UTF8.GetBytes(s);
response.ContentLength64 = (long)bytes.Length; response.ContentLength64 = (long)bytes.Length;
Stream outputStream = response.OutputStream; Stream outputStream = response.OutputStream;
outputStream.Write(bytes, 0, bytes.Length); outputStream.Write(bytes, 0, bytes.Length);
Thread.Sleep(200); Thread.Sleep(100);
outputStream.Close(); outputStream.Close();
this.listener.Stop(); this.listener.Stop();
} }
} }
} }
catch (Exception ex4) catch (Exception ex4)
{ {
Console.WriteLine(ex4); Console.WriteLine(ex4);
File.WriteAllText("crashdump.txt", Convert.ToString(ex4)); File.WriteAllText("crashdump.txt", Convert.ToString(ex4));
} }
} }
public static ulong CachedPlayerID = 1; public static ulong CachedPlayerID = 1;
public static ulong CachedPlatformID = 10000; public static ulong CachedPlatformID = 10000;
public static int CachedVersionMonth = 01; public static int CachedVersionMonth = 01;
public static string BlankResponse = ""; public static string BlankResponse = "";
public static string BracketResponse = "[]"; public static string BracketResponse = "[]";
public static string PlayerEventsResponse = "{\"Created\":[],\"Responses\":[]}"; public static string PlayerEventsResponse = "{\"Created\":[],\"Responses\":[]}";
public static string VersionCheckResponse = "{\"ValidVersion\":true}"; public static string VersionCheckResponse = "{\"ValidVersion\":true}";
public static string ModerationBlockDetails = "{\"ReportCategory\":0,\"Duration\":0,\"GameSessionId\":0,\"Message\":\"\"}"; public static string ModerationBlockDetails = "{\"ReportCategory\":0,\"Duration\":0,\"GameSessionId\":0,\"Message\":\"\"}";
public static string ImagesV2Named = "[{\"FriendlyImageName\":\"DormRoomBucket\",\"ImageName\":\"OpenRec\",\"StartTime\":\"2021-12-27T21:27:38.1880175-08:00\",\"EndTime\":\"2043-12-27T21:27:38.1880399-08:00\"}"; public static string ImagesV2Named = "[{\"FriendlyImageName\":\"DormRoomBucket\",\"ImageName\":\"OpenRec\",\"StartTime\":\"2021-12-27T21:27:38.1880175-08:00\",\"EndTime\":\"2043-12-27T21:27:38.1880399-08:00\"}";
public static string ChallengesV1GetCurrent = "{\"Success\":true,\"Message\":\"OpenRec\"}"; public static string ChallengesV1GetCurrent = "{\"Success\":true,\"Message\":\"OpenRec\"}";
public static string ChecklistV1Current = "[{\"Order\":0,\"Objective\":3000,\"Count\":3,\"CreditAmount\":100},{\"Order\":1,\"Objective\":3001,\"Count\":3,\"CreditAmount\":100},{\"Order\":2,\"Objective\":3002,\"Count\":3,\"CreditAmount\":100}]"; public static string ChecklistV1Current = "[{\"Order\":0,\"Objective\":3000,\"Count\":3,\"CreditAmount\":100},{\"Order\":1,\"Objective\":3001,\"Count\":3,\"CreditAmount\":100},{\"Order\":2,\"Objective\":3002,\"Count\":3,\"CreditAmount\":100}]";
public static string Banned = "{\"ReportCategory\":1,\"Duration\":10000000000000000,\"GameSessionId\":100,\"Message\":\"You have been banned. You are probably a little kid and are now whining at your VR headset. If you aren't a little kid, DM me to appeal.\"}"; public static string Banned = "{\"ReportCategory\":1,\"Duration\":10000000000000000,\"GameSessionId\":100,\"Message\":\"You have been banned. You are probably a little kid and are now whining at your VR headset. If you aren't a little kid, DM me to appeal.\"}";
private HttpListener listener = new HttpListener(); private HttpListener listener = new HttpListener();
private static byte[] m00005d(byte[] p0, string p1)
{
BinaryReader binaryReader = new BinaryReader(new MemoryStream(p0));
try
{
while (binaryReader.BaseStream.Position != binaryReader.BaseStream.Length)
{
bool flag = true;
bool flag2 = false;
APIServer.c0000a7 c0000a = new APIServer.c0000a7();
while (flag)
{
List<byte> list = new List<byte>();
bool flag3 = true;
while (flag3)
{
byte b = binaryReader.ReadByte();
if (binaryReader.BaseStream.Position != binaryReader.BaseStream.Length)
{
if (b == 13)
{
binaryReader.ReadByte();
flag3 = false;
}
else
{
list.Add(b);
}
}
else
{
flag3 = false;
}
}
string @string = Encoding.ASCII.GetString(list.ToArray());
Console.WriteLine(@string);
if (@string.StartsWith("Content-Length: "))
{
string s = @string.Remove(0, 16);
c0000a.m000017(int.Parse(s));
}
if (@string.Contains(p1))
{
Console.WriteLine("Has file");
flag2 = true;
}
if (binaryReader.BaseStream.Position != binaryReader.BaseStream.Length)
{
if (binaryReader.ReadByte() == 13)
{
flag = false;
binaryReader.ReadByte();
}
else
{
binaryReader.BaseStream.Position -= 1L;
}
}
else
{
flag = false;
}
}
if (flag2)
{
List<byte> list2 = new List<byte>();
for (; ; )
{
if (binaryReader.ReadByte() == 13)
{
if (binaryReader.ReadByte() == 10)
{
if (binaryReader.ReadByte() == 45)
{
break;
}
binaryReader.BaseStream.Position -= 3L;
}
else
{
binaryReader.BaseStream.Position -= 2L;
}
}
else
{
binaryReader.BaseStream.Position -= 1L;
}
byte item = binaryReader.ReadByte();
list2.Add(item);
}
return list2.ToArray();
}
if (binaryReader.BaseStream.Position != binaryReader.BaseStream.Length)
{
binaryReader.ReadBytes(c0000a.m000016());
}
}
}
finally
{
((IDisposable)binaryReader).Dispose();
}
return null;
}
public sealed class c0000a7
{
public string m000001()
{
return this.f00000a;
}
public void m000034(string p0)
{
this.f00000a = p0;
}
public string m000005()
{
return this.f000002;
}
public void m00003f(string p0)
{
this.f000002 = p0;
}
public int m000016()
{
return this.f000020;
}
public void m000017(int p0)
{
this.f000020 = p0;
}
public byte[] m000061()
{
return this.f000084;
}
public void m000062(byte[] p0)
{
this.f000084 = p0;
}
private string f00000a;
private string f000002;
private int f000020;
private byte[] f000084;
}
} }
} }

View File

@@ -27,7 +27,7 @@ namespace api
Console.WriteLine("Done!"); Console.WriteLine("Done!");
Console.Clear(); Console.Clear();
} }
public static gamesesh2018.GameSessions.SessionInstance localGameSession; public static gamesesh.GameSessions.SessionInstance localGameSession;
public static Objective[][] dailyObjectives = new Objective[][] public static Objective[][] dailyObjectives = new Objective[][]
{ {
new Objective[] new Objective[]

146
CustomRooms.cs Normal file
View File

@@ -0,0 +1,146 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
using Newtonsoft.Json;
using vaultgamesesh;
using System.IO;
using server;
namespace api
{
class CustomRooms
{
public static void RoomDecode(string roomname, string roomsceneid, string imagename, string datablob)
{
File.WriteAllText("SaveData\\Rooms\\Downloaded\\roomname.txt", roomname);
File.WriteAllText("SaveData\\Rooms\\Downloaded\\datablob.txt", datablob);
File.WriteAllText("SaveData\\Rooms\\Downloaded\\roomsceneid.txt", roomsceneid);
File.WriteAllText("SaveData\\Rooms\\Downloaded\\imagename.txt", imagename);
ulong rand = Convert.ToUInt64(new Random().Next(0, 99));
room = new Room
{
RoomId = rand,
Name = roomname,
Description = "OpenRec Downloaded Room",
ImageName = imagename,
CreatorPlayerId = APIServer.CachedPlayerID,
State = 0,
Accessibility = 1,
SupportsLevelVoting = false,
IsAGRoom = false,
CloningAllowed = false,
SupportsScreens = true,
SupportsWalkVR = true,
SupportsTeleportVR = true,
ReplicationId = null,
ReleaseStatus = 0
};
scene = new List<Scene>
{
new Scene()
{
RoomSceneId = 1,
RoomId = rand,
RoomSceneLocationId = "a75f7547-79eb-47c6-8986-6767abcb4f92",
Name = "Home",
IsSandbox = true,
DataBlobName = datablob,
MaxPlayers = 20,
CanMatchmakeInto = true,
DataModifiedAt = DateTime.Now,
ReplicationId = null,
UseLevelBasedMatchmaking = false,
UseAgeBasedMatchmaking = false,
UseRecRoyaleMatchmaking = false,
ReleaseStatus = 0,
SupportsJoinInProgress = true
}
};
root = new Root
{
Room = room,
Scenes = scene,
CoOwners = new List<ulong>(),
InvitedCoOwners = new List<ulong>(),
Hosts = new List<ulong>(),
InvitedHosts = new List<ulong>(),
CheerCount = 999,
FavoriteCount = 999,
VisitCount = 999,
Tags = new List<aTag>
{
new aTag()
{
Tag = "rro",
Type = 2
}
}
};
File.WriteAllText("SaveData\\Rooms\\Downloaded\\RoomDetails.json", JsonConvert.SerializeObject(root));
}
public static Room room { get; set; }
public static List<Scene> scene { get; set; }
public static Root root { get; set; }
//2018 rooms
public class Room
{
public ulong RoomId { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public ulong CreatorPlayerId { get; set; }
public string ImageName { get; set; }
public int State { get; set; }
public int Accessibility { get; set; }
public bool SupportsLevelVoting { get; set; }
public bool IsAGRoom { get; set; }
public bool CloningAllowed { get; set; }
public bool SupportsScreens { get; set; }
public bool SupportsWalkVR { get; set; }
public bool SupportsTeleportVR { get; set; }
public object ReplicationId { get; set; }
public int ReleaseStatus { get; set; }
}
public class Scene
{
public int RoomSceneId { get; set; }
public ulong RoomId { get; set; }
public string RoomSceneLocationId { get; set; }
public string Name { get; set; }
public bool IsSandbox { get; set; }
public string DataBlobName { get; set; }
public int MaxPlayers { get; set; }
public bool CanMatchmakeInto { get; set; }
public DateTime DataModifiedAt { get; set; }
public object ReplicationId { get; set; }
public bool UseLevelBasedMatchmaking { get; set; }
public bool UseAgeBasedMatchmaking { get; set; }
public bool UseRecRoyaleMatchmaking { get; set; }
public int ReleaseStatus { get; set; }
public bool SupportsJoinInProgress { get; set; }
}
public class Root
{
public Room Room { get; set; }
public List<Scene> Scenes { get; set; }
public List<ulong> CoOwners { get; set; }
public List<ulong> InvitedCoOwners { get; set; }
public List<ulong> Hosts { get; set; }
public List<ulong> InvitedHosts { get; set; }
public int CheerCount { get; set; }
public int FavoriteCount { get; set; }
public int VisitCount { get; set; }
public List<aTag> Tags { get; set; }
}
public class aTag
{
public string Tag { get; set; }
public int Type { get; set; }
}
}
}

View File

@@ -3,7 +3,8 @@ using Newtonsoft.Json;
using api; using api;
using server; using server;
using System.IO; using System.IO;
namespace gamesesh2018 namespace gamesesh
{ {
// Token: 0x02000020 RID: 32 // Token: 0x02000020 RID: 32
public class GameSessions public class GameSessions
@@ -12,7 +13,7 @@ namespace gamesesh2018
public static string JoinRandom(string jsonData) public static string JoinRandom(string jsonData)
{ {
long? creatorid = 1243409L; long? creatorid = 1243409L;
long gamesessionid = 20181L; long gamesessionid = long.Parse(start.Program.version + "1");
Console.WriteLine("OpenRec GameSession Room"); Console.WriteLine("OpenRec GameSession Room");
GameSessions.JoinRandomRequest joinRandomRequest = JsonConvert.DeserializeObject<GameSessions.JoinRandomRequest>(jsonData); GameSessions.JoinRandomRequest joinRandomRequest = JsonConvert.DeserializeObject<GameSessions.JoinRandomRequest>(jsonData);
if (File.ReadAllText("SaveData\\App\\privaterooms.txt") == "Enabled") if (File.ReadAllText("SaveData\\App\\privaterooms.txt") == "Enabled")

View File

@@ -43,6 +43,10 @@ namespace server
{ {
text = streamReader.ReadToEnd(); text = streamReader.ReadToEnd();
} }
if (rawUrl.StartsWith("//room/"))
{
i = new WebClient().DownloadData("https://cdn.rec.net/" + rawUrl.Remove(0, 2));
}
Console.WriteLine("Image Requested: " + rawUrl); Console.WriteLine("Image Requested: " + rawUrl);
Console.WriteLine("Image Data: " + text); Console.WriteLine("Image Data: " + text);
Console.WriteLine("Image Response: "); Console.WriteLine("Image Response: ");

View File

@@ -28,7 +28,7 @@ namespace server
private void StartListen() private void StartListen()
{ {
//nameserver is ONLY for 2018 //nameserver is ONLY for 2018
this.listener.Prefixes.Add("http://localhost:56/"); this.listener.Prefixes.Add("http://localhost:20181/");
for (; ; ) for (; ; )
{ {
this.listener.Start(); this.listener.Start();

102
NewGameSessions.cs Normal file
View File

@@ -0,0 +1,102 @@
using System;
using System.Collections.Generic;
using System.Text;
using Newtonsoft.Json;
using vaultgamesesh;
namespace gamesesh2
{
class NewGameSessions
{
public static string JoinRoom(string text)
{
c00006b.c00006c apidata = JsonConvert.DeserializeObject<c00006b.c00006c>(text);
return string.Empty;
}
public class GameSession
{
public int GameSessionId { get; set; }
public string PhotonRegionId { get; set; }
public string PhotonRoomId { get; set; }
public string Name { get; set; }
public int RoomId { get; set; }
public int RoomSceneId { get; set; }
public string RoomSceneLocationId { get; set; }
public bool IsSandbox { get; set; }
public string DataBlobName { get; set; }
public object PlayerEventId { get; set; }
public bool Private { get; set; }
public bool GameInProgress { get; set; }
public int MaxCapacity { get; set; }
public bool IsFull { get; set; }
}
public class Room
{
public int RoomId { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public int CreatorPlayerId { get; set; }
public string ImageName { get; set; }
public int State { get; set; }
public int Accessibility { get; set; }
public bool SupportsLevelVoting { get; set; }
public bool IsAGRoom { get; set; }
public bool CloningAllowed { get; set; }
public bool SupportsScreens { get; set; }
public bool SupportsWalkVR { get; set; }
public bool SupportsTeleportVR { get; set; }
public string ReplicationId { get; set; }
public int ReleaseStatus { get; set; }
}
public class Scene
{
public int RoomSceneId { get; set; }
public int RoomId { get; set; }
public string RoomSceneLocationId { get; set; }
public string Name { get; set; }
public bool IsSandbox { get; set; }
public string DataBlobName { get; set; }
public int MaxPlayers { get; set; }
public bool CanMatchmakeInto { get; set; }
public DateTime DataModifiedAt { get; set; }
public string ReplicationId { get; set; }
public bool UseLevelBasedMatchmaking { get; set; }
public bool UseAgeBasedMatchmaking { get; set; }
public bool UseRecRoyaleMatchmaking { get; set; }
public int ReleaseStatus { get; set; }
public bool SupportsJoinInProgress { get; set; }
}
public class aTag
{
public string Tag { get; set; }
public int Type { get; set; }
}
public class RoomDetails
{
public Room Room { get; set; }
public List<Scene> Scenes { get; set; }
public List<object> CoOwners { get; set; }
public List<object> InvitedCoOwners { get; set; }
public List<object> Hosts { get; set; }
public List<object> InvitedHosts { get; set; }
public int CheerCount { get; set; }
public int FavoriteCount { get; set; }
public int VisitCount { get; set; }
public List<aTag> Tags { get; set; }
}
public class Root
{
public int Result { get; set; }
public GameSession GameSession { get; set; }
public RoomDetails RoomDetails { get; set; }
}
}
}

View File

@@ -1,7 +1,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using Newtonsoft.Json; using Newtonsoft.Json;
using gamesesh2018; using gamesesh;
namespace ws namespace ws
{ {

View File

@@ -5,6 +5,8 @@ VisualStudioVersion = 16.0.31321.278
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenRec_", "OpenRec_.csproj", "{C3C433FC-52FB-4472-81F7-B271A2CDABFE}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenRec_", "OpenRec_.csproj", "{C3C433FC-52FB-4472-81F7-B271A2CDABFE}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C754033C-FE82-4FF2-9189-A7EE0E2E5974}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU

View File

@@ -39,7 +39,7 @@ namespace start
bannedflag = true; bannedflag = true;
} }
} }
Console.WriteLine("1) Changelog" + Environment.NewLine +"2) Change Settings" + Environment.NewLine + "3) Modify Profile" + Environment.NewLine + "4) Start Server"); Console.WriteLine("1) Changelog" + Environment.NewLine +"2) Change Settings" + Environment.NewLine + "3) Modify Profile" + Environment.NewLine + "4) Custom Room Downloader" + Environment.NewLine + "5) Start Server");
string readline = Console.ReadLine(); string readline = Console.ReadLine();
if (readline == "1") if (readline == "1")
{ {
@@ -191,7 +191,7 @@ namespace start
File.WriteAllText("SaveData\\Profile\\level.txt", newlevel); File.WriteAllText("SaveData\\Profile\\level.txt", newlevel);
Console.Clear(); Console.Clear();
Console.WriteLine("Success!"); Console.WriteLine("Success!");
goto Start; goto Profile;
} }
else if (readline3 == "4") else if (readline3 == "4")
{ {
@@ -199,13 +199,40 @@ namespace start
goto Start; goto Start;
} }
} }
if (readline == "4") if (readline == "4")
{
Console.Title = "OpenRec Custom Room Downloader";
Console.Clear();
Console.WriteLine("Please type in the name of the room you would like to download: (Case sensitive)");
string roomname = Console.ReadLine();
Console.WriteLine("Now, please go to the link below and help us gather info about your room for you.");
Console.WriteLine("https://rooms.rec.net/rooms?name=" + roomname + "&include=297");
Console.WriteLine("Please find the string called ImageName and paste it below:");
string imagename = Console.ReadLine();
Console.WriteLine("Please find the string called UnitySceneId and paste it below:");
string roomsceneid = Console.ReadLine();
Console.WriteLine("Please find the string called DataBlob and paste it below:");
string datablob = Console.ReadLine();
CustomRooms.RoomDecode(roomname, roomsceneid, imagename, datablob);
goto Start;
}
if (readline == "5")
{ {
Console.Title = "OpenRec Version Select"; Console.Title = "OpenRec Version Select";
Console.WriteLine("Please select the version of RecRoom the server should host: (2017, M2018, S2018)"); Console.WriteLine("Please select the version of RecRoom the server should host: (2016, 2017, 2018)");
Console.WriteLine("fuck you all");
string readline2 = Console.ReadLine(); string readline2 = Console.ReadLine();
if (readline2 == "2017") if (readline2 == "2016")
{
Console.Title = "OpenRec December 25th, 2016";
version = "2016";
Console.Clear();
Console.WriteLine("Version Selected: December 25th, 2016.");
new APIServer();
new WebSocket();
}
else if (readline2 == "2017")
{ {
Console.Title = "OpenRec October 19th 2017"; Console.Title = "OpenRec October 19th 2017";
version = "2017"; version = "2017";
@@ -214,27 +241,32 @@ namespace start
new APIServer(); new APIServer();
new WebSocket(); new WebSocket();
} }
else if ((readline2 == "M2018") || (readline2 == "m2018")) else if (readline2 == "2018")
{ {
Console.Title = "OpenRec May 30th 2018"; Console.WriteLine("May or September (Beta) 2018: (M, S)");
version = "2018"; string readline3 = Console.ReadLine();
Console.Clear(); if ((readline3 == "M") || (readline3 == "m"))
Console.WriteLine("Version Selected: May 30th, 2018."); {
new NameServer(); Console.Title = "OpenRec May 30th 2018";
new ImageServer(); version = "2018";
new APIServer(); Console.Clear();
new WebSocket(); Console.WriteLine("Version Selected: May 30th, 2018.");
} new NameServer();
else if ((readline2 == "S2018") || (readline2 == "s2018")) new ImageServer();
{ new APIServer();
Console.Title = "OpenRec September 27th 2018"; new WebSocket();
version = "2018"; }
Console.Clear(); if ((readline3 == "S") || (readline3 == "s"))
Console.WriteLine("Version Selected: September 27th, 2018."); {
new NameServer(); Console.Title = "OpenRec September 27th 2018";
new ImageServer(); version = "2018";
new APIServer(); Console.Clear();
new Late2018WebSock(); Console.WriteLine("Version Selected: September 27th, 2018.");
new NameServer();
new ImageServer();
new APIServer();
new Late2018WebSock();
}
} }
} }
} }

View File

@@ -106,7 +106,7 @@ namespace api
new Setting new Setting
{ {
Key = "VoiceChat", Key = "VoiceChat",
Value = 0f.ToString() Value = 1f.ToString()
}, },
new Setting new Setting
{ {

View File

@@ -16,6 +16,7 @@ namespace start
Directory.CreateDirectory("SaveData\\App\\"); Directory.CreateDirectory("SaveData\\App\\");
Directory.CreateDirectory("SaveData\\Profile\\"); Directory.CreateDirectory("SaveData\\Profile\\");
Directory.CreateDirectory("SaveData\\Rooms\\"); Directory.CreateDirectory("SaveData\\Rooms\\");
Directory.CreateDirectory("SaveData\\Rooms\\Downloaded\\");
if (!(File.Exists("SaveData\\avatar.txt"))) if (!(File.Exists("SaveData\\avatar.txt")))
{ {
File.WriteAllText("SaveData\\avatar.txt", new WebClient().DownloadString("https://raw.githubusercontent.com/recroom2016/OpenRec/master/Download/avatar.txt")); File.WriteAllText("SaveData\\avatar.txt", new WebClient().DownloadString("https://raw.githubusercontent.com/recroom2016/OpenRec/master/Download/avatar.txt"));

298
Vault2018CustomRooms.cs Normal file
View File

@@ -0,0 +1,298 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.CompilerServices;
using Newtonsoft.Json;
using vaultgamesesh;
namespace vaultgamesesh
{
internal sealed class c000099
{
// Token: 0x06000358 RID: 856 RVA: 0x0000B134 File Offset: 0x00009334
public static c000099.c00009c m00002f()
{
List<c00005d.c000062> list = new List<c00005d.c000062>();
foreach (KeyValuePair<string, c00005d.c000060> keyValuePair in c00005d.f000050)
{
c00005d.c000062 item = new c00005d.c000062
{
RoomName = keyValuePair.Value.Room.Name,
RoomId = (long)((int)keyValuePair.Value.Room.RoomId),
ImageName = keyValuePair.Value.Room.ImageName
};
list.Add(item);
}
return new c000099.c00009c
{
Name = "Check Out All The Rooms Today!",
FeaturedRooms = list
};
}
// Token: 0x06000359 RID: 857 RVA: 0x0000B204 File Offset: 0x00009404
public static List<c00005d.c000061> m000009()
{
List<c00005d.c000061> list = new List<c00005d.c000061>();
foreach (KeyValuePair<string, c00005d.c000060> keyValuePair in c00005d.m00003b())
{
list.Add(keyValuePair.Value.Room);
}
return list;
}
// Token: 0x0600035A RID: 858 RVA: 0x0000B268 File Offset: 0x00009468
public static List<c00005d.c000061> m000035()
{
List<c00005d.c000061> list = new List<c00005d.c000061>();
foreach (KeyValuePair<string, c00005d.c000060> keyValuePair in c00005d.f000024)
{
list.Add(keyValuePair.Value.Room);
}
return list;
}
// Token: 0x0600035B RID: 859 RVA: 0x0000B2CC File Offset: 0x000094CC
public static List<c00005d.c000061> m000055()
{
List<c00005d.c000061> list = new List<c00005d.c000061>();
foreach (KeyValuePair<string, c00005d.c000060> keyValuePair in c00005d.m00003a())
{
list.Add(keyValuePair.Value.Room);
}
return list;
}
// Token: 0x0600035C RID: 860 RVA: 0x0000B330 File Offset: 0x00009530
public static List<c00005d.c000061> m000056(string p0)
{
string[] array = p0.Split(new char[]
{
' '
});
List<c00005d.c000061> list = new List<c00005d.c000061>();
foreach (KeyValuePair<string, c00005d.c000060> keyValuePair in c00005d.m00003b())
{
c00005d.c000060 value = keyValuePair.Value;
bool flag = true;
foreach (string text in array)
{
if (flag)
{
if (text.StartsWith("#"))
{
bool flag2 = false;
foreach (c00005d.c000063 c in value.Tags)
{
if ("#" + c.Tag.ToLower() == text.ToLower())
{
flag2 = true;
}
}
if (!flag2)
{
flag = false;
}
}
else if (!value.Room.Name.ToLower().Contains(text.ToLower()))
{
flag = false;
}
}
}
if (flag)
{
list.Add(value.Room);
}
}
return list;
}
// Token: 0x0600035D RID: 861 RVA: 0x0000B488 File Offset: 0x00009688
public static c00005d.c000060 m000057(ulong p0)
{
foreach (KeyValuePair<string, c00005d.c000060> keyValuePair in c00005d.f000024)
{
if (keyValuePair.Value.Room.RoomId == p0)
{
return keyValuePair.Value;
}
}
return null;
}
// Token: 0x0600035E RID: 862 RVA: 0x0000B4F8 File Offset: 0x000096F8
public static c000099.c00009b m00000a(string p0)
{
c000099.c00009b c00009b = new c000099.c00009b();
c000099.c00009a c00009a = JsonConvert.DeserializeObject<c000099.c00009a>(p0);
c00005d.c000060 c = c000099.m000057(c00009a.RoomId);
if (c == null)
{
c00009b.Result = (c000099.enum09d)2;
c00009b.RoomDetails = new c00005d.c000060();
}
else
{
c00009b.Result = (c000099.enum09d)0;
c00009b.RoomDetails = c;
c00009b.RoomDetails.Room.Name = c00009a.Name;
ulong roomId = (ulong)((long)new Random().Next(100, 9999999));
c00009b.RoomDetails.Room.RoomId = roomId;
c00009b.RoomDetails.Room.IsAGRoom = false;
c00009b.RoomDetails.Scenes[0].IsSandbox = true;
c00009b.RoomDetails.Scenes[0].RoomId = roomId;
c00009b.RoomDetails.Scenes[0].DataBlobName = string.Empty;
c00009b.RoomDetails.Scenes[0].DataModifiedAt = DateTime.Now;
c00009b.RoomDetails.Room.CreatorPlayerId = server.APIServer.CachedPlayerID;
}
c00005d.m00003a().Add(c00009a.Name, c);
string text = c000004.m000007() + c00009b.RoomDetails.Room.Name;
if (!Directory.Exists(text))
{
Directory.CreateDirectory(text);
}
File.WriteAllText(text + "\\RoomDetails.json", JsonConvert.SerializeObject(c00009b.RoomDetails));
return c00009b;
}
// Token: 0x0200009A RID: 154
public sealed class c00009a
{
// Token: 0x17000105 RID: 261
// (get) Token: 0x06000360 RID: 864 RVA: 0x0000373A File Offset: 0x0000193A
// (set) Token: 0x06000361 RID: 865 RVA: 0x00003742 File Offset: 0x00001942
public string Name
{
[CompilerGenerated]
get
{
return this.f00000a;
}
[CompilerGenerated]
set
{
this.f00000a = value;
}
}
// Token: 0x17000106 RID: 262
// (get) Token: 0x06000362 RID: 866 RVA: 0x0000374B File Offset: 0x0000194B
// (set) Token: 0x06000363 RID: 867 RVA: 0x00003753 File Offset: 0x00001953
public ulong RoomId
{
[CompilerGenerated]
get
{
return this.f000023;
}
[CompilerGenerated]
set
{
this.f000023 = value;
}
}
// Token: 0x040001DD RID: 477
private string f00000a;
// Token: 0x040001DE RID: 478
private ulong f000023;
}
// Token: 0x0200009B RID: 155
public sealed class c00009b
{
// Token: 0x17000107 RID: 263
// (get) Token: 0x06000365 RID: 869 RVA: 0x0000375C File Offset: 0x0000195C
// (set) Token: 0x06000366 RID: 870 RVA: 0x00003764 File Offset: 0x00001964
public c000099.enum09d Result
{
[CompilerGenerated]
get
{
return this.f000042;
}
[CompilerGenerated]
set
{
this.f000042 = value;
}
}
// Token: 0x17000108 RID: 264
// (get) Token: 0x06000367 RID: 871 RVA: 0x0000376D File Offset: 0x0000196D
// (set) Token: 0x06000368 RID: 872 RVA: 0x00003775 File Offset: 0x00001975
public c00005d.c000060 RoomDetails
{
[CompilerGenerated]
get
{
return this.f00004f;
}
[CompilerGenerated]
set
{
this.f00004f = value;
}
}
// Token: 0x040001DF RID: 479
private c000099.enum09d f000042;
// Token: 0x040001E0 RID: 480
private c00005d.c000060 f00004f;
}
// Token: 0x0200009C RID: 156
public sealed class c00009c
{
// Token: 0x17000109 RID: 265
// (get) Token: 0x0600036A RID: 874 RVA: 0x0000377E File Offset: 0x0000197E
// (set) Token: 0x0600036B RID: 875 RVA: 0x00003786 File Offset: 0x00001986
public string Name
{
[CompilerGenerated]
get
{
return this.f00000a;
}
[CompilerGenerated]
set
{
this.f00000a = value;
}
}
// Token: 0x1700010A RID: 266
// (get) Token: 0x0600036C RID: 876 RVA: 0x0000378F File Offset: 0x0000198F
// (set) Token: 0x0600036D RID: 877 RVA: 0x00003797 File Offset: 0x00001997
public List<c00005d.c000062> FeaturedRooms
{
[CompilerGenerated]
get
{
return this.f000031;
}
[CompilerGenerated]
set
{
this.f000031 = value;
}
}
// Token: 0x040001E1 RID: 481
private string f00000a;
// Token: 0x040001E2 RID: 482
private List<c00005d.c000062> f000031;
}
// Token: 0x0200009D RID: 157
public enum enum09d
{
}
}
}

View File

@@ -3,6 +3,7 @@ using System.Linq;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Threading; using System.Threading;
using Newtonsoft.Json; using Newtonsoft.Json;
using System.IO;
namespace vaultgamesesh namespace vaultgamesesh
{ {
@@ -52,7 +53,7 @@ namespace vaultgamesesh
} }
else else
{ {
c000041.f000043 = c00005d.f000050["DormRoom"]; c000041.f000043 = c00005d.f000050[File.ReadAllText("SaveData\\Rooms\\Downloaded\\roomname.txt")];
} }
} }
int num = 0; int num = 0;
@@ -74,7 +75,7 @@ namespace vaultgamesesh
bool @private = c00006c.Private; bool @private = c00006c.Private;
if (@private) if (@private)
{ {
text += string.Format("Pri{0}", c000079.m000009()[0].Id); text += string.Format("Pri{0}", server.APIServer.CachedPlayerID);
} }
c000041.f000013 = new c000041.c000044 c000041.f000013 = new c000041.c000044
{ {

View File

@@ -13,14 +13,24 @@ namespace vaultgamesesh
// Token: 0x06000011 RID: 17 RVA: 0x0000264C File Offset: 0x0000084C // Token: 0x06000011 RID: 17 RVA: 0x0000264C File Offset: 0x0000084C
public static Dictionary<string, c00005d.c000060> m00003a() public static Dictionary<string, c00005d.c000060> m00003a()
{ {
Dictionary<string, c00005d.c000060> result = new Dictionary<string, c00005d.c000060>(); Dictionary<string, c00005d.c000060> dictionary = new Dictionary<string, c00005d.c000060>();
string[] directories = Directory.GetDirectories(c000004.m000007()); string[] directories = Directory.GetDirectories(c000004.m000007());
for (int i = 0; i < directories.Length; i++) for (int i = 0; i < directories.Length; i++)
{ {
c00005d.c000060 c = JsonConvert.DeserializeObject<c00005d.c000060>(File.ReadAllText(directories[i] + "\\RoomDetails.json"));
dictionary.Add(c.Room.Name, c);
} }
return result; return dictionary;
}
public static List<c00005d.c000061> m000035()
{
List<c00005d.c000061> list = new List<c00005d.c000061>();
foreach (KeyValuePair<string, c00005d.c000060> keyValuePair in c00005d.f000024)
{
list.Add(keyValuePair.Value.Room);
}
return list;
} }
// Token: 0x06000012 RID: 18 RVA: 0x00002688 File Offset: 0x00000888 // Token: 0x06000012 RID: 18 RVA: 0x00002688 File Offset: 0x00000888
public static Dictionary<string, c00005d.c000060> m00003b() public static Dictionary<string, c00005d.c000060> m00003b()
{ {
@@ -1411,16 +1421,16 @@ namespace vaultgamesesh
} }
}, },
{ {
"Bawling", "Bowling",
new c00005d.c000060 new c00005d.c000060
{ {
Room = new c00005d.c000061 Room = new c00005d.c000061
{ {
RoomId = 28UL, RoomId = 28UL,
Name = "Bawling", Name = "Bowling",
Description = "Go to the Two Footware Coridor Bawling Coridor to admire off branded Raw Data, Play Jumbotron on 4 arcade cabinets (each with 4 player split screen, and 16 player multiplayer), take a ball and hit the white cubes, and conimplate life in front of the lockers in this Beta RRO!", Description = "shut up coffeeman this bowling description was so annoying",
CreatorPlayerId = 782441001UL, CreatorPlayerId = 782441001UL,
ImageName = "bawling.png", ImageName = "bowling.png",
State = 0, State = 0,
Accessibility = 1, Accessibility = 1,
SupportsLevelVoting = false, SupportsLevelVoting = false,
@@ -1464,6 +1474,62 @@ namespace vaultgamesesh
} }
} }
} }
},
{
File.ReadAllText("SaveData\\Rooms\\Downloaded\\roomname.txt"),
new c00005d.c000060
{
Room = new c00005d.c000061
{
RoomId = 29UL,
Name = File.ReadAllText("SaveData\\Rooms\\Downloaded\\roomname.txt"),
Description = "OpenRec Downloaded Custom Room",
CreatorPlayerId = APIServer.CachedPlayerID,
ImageName = File.ReadAllText("SaveData\\Rooms\\Downloaded\\imagename.txt"),
State = 0,
Accessibility = 1,
SupportsLevelVoting = false,
IsAGRoom = true,
CloningAllowed = false,
SupportsScreens = true,
SupportsTeleportVR = true,
SupportsWalkVR = true
},
Scenes = new List<c00005d.c00005f>
{
new c00005d.c00005f
{
RoomSceneId = 1L,
RoomId = 29UL,
RoomSceneLocationId = File.ReadAllText("SaveData\\Rooms\\Downloaded\\roomsceneid.txt"),
Name = "Home",
IsSandbox = true,
DataBlobName = File.ReadAllText("SaveData\\Rooms\\Downloaded\\datablob.txt"),
MaxPlayers = 20,
CanMatchmakeInto = true,
DataModifiedAt = DateTime.Now
}
},
CoOwners = new List<int>(),
Hosts = new List<int>(),
CheerCount = 1,
FavoriteCount = 1,
VisitCount = 1,
Tags = new List<c00005d.c000063>
{
new c00005d.c000063
{
Tag = "rro",
Type = 2
},
new c00005d.c000063
{
Tag = "sport",
Type = 0
}
}
}
} }
}; };