mirror of
https://github.com/recroom2016/OpenRec.git
synced 2026-04-22 21:25:51 +00:00
Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8024724946 | ||
|
|
009a5d48e2 | ||
|
|
060e2f27ed | ||
|
|
8c61c52edf | ||
|
|
6c4cfefce9 | ||
|
|
62e3fe47a6 | ||
|
|
488f68d075 | ||
|
|
8511d22c75 | ||
|
|
a9394b6c46 | ||
|
|
93e74b51b4 | ||
|
|
c42d15d3aa | ||
|
|
5926b6c753 | ||
|
|
3f8ff4a98b | ||
|
|
033634f104 | ||
|
|
41c720c948 | ||
|
|
b7df2186b2 | ||
|
|
a8e081602a | ||
|
|
b85ab57667 | ||
|
|
358b654064 |
221
APIServer.cs
221
APIServer.cs
@@ -5,14 +5,13 @@ using System.Text;
|
|||||||
using System.Threading;
|
using System.Threading;
|
||||||
using api;
|
using api;
|
||||||
using api2018;
|
using api2018;
|
||||||
|
using api2017;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace server
|
namespace server
|
||||||
{
|
{
|
||||||
|
|
||||||
internal class APIServer
|
internal class APIServer
|
||||||
{
|
{
|
||||||
|
|
||||||
public APIServer()
|
public APIServer()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@@ -29,8 +28,9 @@ namespace server
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
//3 different servers for 3 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 == "2016")
|
if (start.Program.version == "2017")
|
||||||
{
|
{
|
||||||
for (; ; )
|
for (; ; )
|
||||||
{
|
{
|
||||||
@@ -68,60 +68,93 @@ namespace server
|
|||||||
{
|
{
|
||||||
s = Config2.GetDebugConfig();
|
s = Config2.GetDebugConfig();
|
||||||
}
|
}
|
||||||
Console.WriteLine("API Response: " + s);
|
if (Url == "platformlogin/v1/profiles")
|
||||||
byte[] bytes = Encoding.UTF8.GetBytes(s);
|
{
|
||||||
response.ContentLength64 = (long)bytes.Length;
|
s = getorcreate.GetOrCreateArray((ulong.Parse(text.Remove(0, 32))));
|
||||||
Stream outputStream = response.OutputStream;
|
CachedPlayerID = ulong.Parse(text.Remove(0, 32));
|
||||||
outputStream.Write(bytes, 0, bytes.Length);
|
CachedPlatformID = ulong.Parse(text.Remove(0, 22));
|
||||||
Thread.Sleep(400);
|
File.WriteAllText("SaveData\\Profile\\userid.txt", Convert.ToString(CachedPlayerID));
|
||||||
outputStream.Close();
|
|
||||||
this.listener.Stop();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else 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;
|
if (Url == "platformlogin/v6")
|
||||||
string s = "";
|
{
|
||||||
using (StreamReader streamReader = new StreamReader(request.InputStream, request.ContentEncoding))
|
s = PlatformLogin.v4(CachedPlayerID);
|
||||||
|
}
|
||||||
|
if (Url == "PlayerReporting/v1/moderationBlockDetails")
|
||||||
{
|
{
|
||||||
text = streamReader.ReadToEnd();
|
s = ModerationBlockDetails;
|
||||||
}
|
}
|
||||||
if (!(Url == ""))
|
if (Url == "config/v1/amplitude")
|
||||||
{
|
{
|
||||||
Console.WriteLine("API Requested: " + Url);
|
s = Amplitude.amplitude();
|
||||||
}
|
}
|
||||||
else
|
if (Url.StartsWith("players/v1/"))
|
||||||
|
{
|
||||||
|
s = getorcreate.GetOrCreate(CachedPlayerID);
|
||||||
|
}
|
||||||
|
if (Url == "avatar/v2")
|
||||||
{
|
{
|
||||||
Console.WriteLine("API Requested: " + rawUrl);
|
s = File.ReadAllText("SaveData\\avatar.txt");
|
||||||
}
|
}
|
||||||
Console.WriteLine("API Data: " + text);
|
if (Url == "avatar/v2/set")
|
||||||
if (Url.StartsWith("versioncheck"))
|
|
||||||
{
|
{
|
||||||
s = VersionCheckResponse;
|
//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 == ("config/v2"))
|
if (Url == "messages/v2/get")
|
||||||
{
|
{
|
||||||
s = Config2.GetDebugConfig();
|
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 == "gamesessions/v2/joinrandom")
|
||||||
|
{
|
||||||
|
s = gamesessions2018.GameSessions.JoinRandom(text);
|
||||||
|
}
|
||||||
|
if (Url == "gamesessions/v2/create")
|
||||||
|
{
|
||||||
|
s = gamesessions2018.GameSessions.Create(text);
|
||||||
}
|
}
|
||||||
Console.WriteLine("API Response: " + s);
|
Console.WriteLine("API Response: " + s);
|
||||||
byte[] bytes = Encoding.UTF8.GetBytes(s);
|
byte[] 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(400);
|
Thread.Sleep(200);
|
||||||
outputStream.Close();
|
outputStream.Close();
|
||||||
this.listener.Stop();
|
this.listener.Stop();
|
||||||
}
|
}
|
||||||
@@ -137,6 +170,7 @@ namespace server
|
|||||||
HttpListenerResponse response = context.Response;
|
HttpListenerResponse response = context.Response;
|
||||||
string rawUrl = request.RawUrl;
|
string rawUrl = request.RawUrl;
|
||||||
string Url = "";
|
string Url = "";
|
||||||
|
byte[] bytes = null;
|
||||||
if (rawUrl.StartsWith("/api/"))
|
if (rawUrl.StartsWith("/api/"))
|
||||||
{
|
{
|
||||||
Url = rawUrl.Remove(0, 5);
|
Url = rawUrl.Remove(0, 5);
|
||||||
@@ -158,6 +192,14 @@ namespace server
|
|||||||
Console.WriteLine("API Data: " + text);
|
Console.WriteLine("API Data: " + text);
|
||||||
if (Url.StartsWith("versioncheck"))
|
if (Url.StartsWith("versioncheck"))
|
||||||
{
|
{
|
||||||
|
if (Url.Contains("201809"))
|
||||||
|
{
|
||||||
|
CachedVersionMonth = 09;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CachedVersionMonth = 05;
|
||||||
|
}
|
||||||
s = VersionCheckResponse;
|
s = VersionCheckResponse;
|
||||||
}
|
}
|
||||||
if (Url == ("config/v2"))
|
if (Url == ("config/v2"))
|
||||||
@@ -169,6 +211,7 @@ namespace server
|
|||||||
s = getcachedlogins.GetDebugLogin(ulong.Parse(text.Remove(0, 32)), ulong.Parse(text.Remove(0, 22)));
|
s = getcachedlogins.GetDebugLogin(ulong.Parse(text.Remove(0, 32)), ulong.Parse(text.Remove(0, 22)));
|
||||||
CachedPlayerID = ulong.Parse(text.Remove(0, 32));
|
CachedPlayerID = ulong.Parse(text.Remove(0, 32));
|
||||||
CachedPlatformID = ulong.Parse(text.Remove(0, 22));
|
CachedPlatformID = ulong.Parse(text.Remove(0, 22));
|
||||||
|
File.WriteAllText("SaveData\\Profile\\userid.txt", Convert.ToString(CachedPlayerID));
|
||||||
}
|
}
|
||||||
if (Url == "platformlogin/v1/loginaccount")
|
if (Url == "platformlogin/v1/loginaccount")
|
||||||
{
|
{
|
||||||
@@ -186,6 +229,10 @@ namespace server
|
|||||||
{
|
{
|
||||||
s = BlankResponse;
|
s = BlankResponse;
|
||||||
}
|
}
|
||||||
|
if (Url == "players/v1/list")
|
||||||
|
{
|
||||||
|
s = BracketResponse;
|
||||||
|
}
|
||||||
if (Url == "config/v1/amplitude")
|
if (Url == "config/v1/amplitude")
|
||||||
{
|
{
|
||||||
s = Amplitude.amplitude();
|
s = Amplitude.amplitude();
|
||||||
@@ -197,6 +244,10 @@ namespace server
|
|||||||
if (Url == "PlayerReporting/v1/moderationBlockDetails")
|
if (Url == "PlayerReporting/v1/moderationBlockDetails")
|
||||||
{
|
{
|
||||||
s = ModerationBlockDetails;
|
s = ModerationBlockDetails;
|
||||||
|
}
|
||||||
|
if (Url == "//api/chat/v2/myChats?mode=0&count=50")
|
||||||
|
{
|
||||||
|
s = BracketResponse;
|
||||||
}
|
}
|
||||||
if (Url == "messages/v2/get")
|
if (Url == "messages/v2/get")
|
||||||
{
|
{
|
||||||
@@ -206,12 +257,33 @@ namespace server
|
|||||||
{
|
{
|
||||||
s = BracketResponse;
|
s = BracketResponse;
|
||||||
}
|
}
|
||||||
|
if (Url == "gameconfigs/v1/all")
|
||||||
|
{
|
||||||
|
s = File.ReadAllText("SaveData\\gameconfigs.txt");
|
||||||
|
}
|
||||||
|
if (Url.StartsWith("storefronts"))
|
||||||
|
{
|
||||||
|
if (CachedVersionMonth == 09)
|
||||||
|
{
|
||||||
|
s = File.ReadAllText("SaveData\\storefronts2.txt");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
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
|
||||||
|
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);
|
File.WriteAllText("SaveData\\avatar.txt", text);
|
||||||
}
|
}
|
||||||
if (Url == "settings/v2/")
|
if (Url == "settings/v2/")
|
||||||
@@ -224,7 +296,15 @@ namespace server
|
|||||||
}
|
}
|
||||||
if (Url == "avatar/v3/items")
|
if (Url == "avatar/v3/items")
|
||||||
{
|
{
|
||||||
s = File.ReadAllText("SaveData\\avataritems.txt");
|
if (CachedVersionMonth == 09)
|
||||||
|
{
|
||||||
|
s = BracketResponse;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
s = File.ReadAllText("SaveData\\avataritems.txt");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (Url == "equipment/v1/getUnlocked")
|
if (Url == "equipment/v1/getUnlocked")
|
||||||
{
|
{
|
||||||
@@ -236,19 +316,22 @@ namespace server
|
|||||||
}
|
}
|
||||||
if (Url == "consumables/v1/getUnlocked")
|
if (Url == "consumables/v1/getUnlocked")
|
||||||
{
|
{
|
||||||
s = File.ReadAllText("SaveData\\consumables.txt");
|
if (CachedVersionMonth == 09)
|
||||||
|
{
|
||||||
|
s = BracketResponse;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
s = File.ReadAllText("SaveData\\consumables.txt");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (Url == "avatar/v2/gifts")
|
if (Url == "avatar/v2/gifts")
|
||||||
{
|
{
|
||||||
s = BracketResponse;
|
s = BracketResponse;
|
||||||
}
|
}
|
||||||
if (Url == "storefronts/v1/allGiftDrops/2")
|
|
||||||
{
|
|
||||||
s = BracketResponse;
|
|
||||||
}
|
|
||||||
if (Url == "storefronts/v2/2")
|
if (Url == "storefronts/v2/2")
|
||||||
{
|
{
|
||||||
s = "";
|
s = BlankResponse;
|
||||||
}
|
}
|
||||||
if (Url == "objectives/v1/myprogress")
|
if (Url == "objectives/v1/myprogress")
|
||||||
{
|
{
|
||||||
@@ -257,6 +340,10 @@ namespace server
|
|||||||
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")
|
||||||
|
{
|
||||||
|
s = BracketResponse;
|
||||||
}
|
}
|
||||||
if (Url == "rooms/v1/mybookmarkedrooms")
|
if (Url == "rooms/v1/mybookmarkedrooms")
|
||||||
{
|
{
|
||||||
@@ -267,9 +354,9 @@ namespace server
|
|||||||
s = BracketResponse;
|
s = BracketResponse;
|
||||||
}
|
}
|
||||||
if (Url == "events/v3/list")
|
if (Url == "events/v3/list")
|
||||||
{
|
{
|
||||||
s = Events.list();
|
s = Events.list();
|
||||||
}
|
}
|
||||||
if (Url == "playerevents/v1/all")
|
if (Url == "playerevents/v1/all")
|
||||||
{
|
{
|
||||||
s = PlayerEventsResponse;
|
s = PlayerEventsResponse;
|
||||||
@@ -278,12 +365,41 @@ namespace server
|
|||||||
{
|
{
|
||||||
s = gamesessions2018.GameSessions.JoinRandom(text);
|
s = gamesessions2018.GameSessions.JoinRandom(text);
|
||||||
}
|
}
|
||||||
|
if (Url == "gamesessions/v2/create")
|
||||||
|
{
|
||||||
|
s = gamesessions2018.GameSessions.Create(text);
|
||||||
|
}
|
||||||
|
if (Url == "gamesessions/v3/joinroom")
|
||||||
|
{
|
||||||
|
bytes = Encoding.UTF8.GetBytes((JsonConvert.SerializeObject(gamesessions2018.GameSessions2.JoinRoom(text))));
|
||||||
|
}
|
||||||
|
if (rawUrl.Contains("//api/images/v4/uploadtransient?gameSessionId=2018"))
|
||||||
|
{
|
||||||
|
File.WriteAllBytes("SaveData\\Images\\image" + Convert.ToString(int.Parse(File.ReadAllText("SaveData\\Images\\count.txt") + 1)) + ".png", Encoding.UTF8.GetBytes(text.Remove(0, 50).Remove(text.Length - 48, 48)));
|
||||||
|
int imagecount = int.Parse(File.ReadAllText("SaveData\\Images\\count.txt"));
|
||||||
|
File.WriteAllText("SaveData\\Images\\count.txt", Convert.ToString(imagecount + 1));
|
||||||
|
}
|
||||||
|
if (Url == "avatar/v3/saved")
|
||||||
|
{
|
||||||
|
s = BracketResponse;
|
||||||
|
}
|
||||||
|
if (Url == "checklist/v1/current")
|
||||||
|
{
|
||||||
|
s = BracketResponse;
|
||||||
|
}
|
||||||
|
if (Url == "presence/v1/setplayertype")
|
||||||
|
{
|
||||||
|
s = BracketResponse;
|
||||||
|
}
|
||||||
Console.WriteLine("API Response: " + s);
|
Console.WriteLine("API Response: " + s);
|
||||||
byte[] bytes = Encoding.UTF8.GetBytes(s);
|
if (!(Url == "gamesessions/v3/joinroom"))
|
||||||
|
{
|
||||||
|
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(400);
|
Thread.Sleep(200);
|
||||||
outputStream.Close();
|
outputStream.Close();
|
||||||
this.listener.Stop();
|
this.listener.Stop();
|
||||||
}
|
}
|
||||||
@@ -297,6 +413,7 @@ namespace server
|
|||||||
}
|
}
|
||||||
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 string BlankResponse = "";
|
public static string BlankResponse = "";
|
||||||
public static string BracketResponse = "[]";
|
public static string BracketResponse = "[]";
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace api
|
|||||||
{
|
{
|
||||||
return JsonConvert.SerializeObject(new Amplitude
|
return JsonConvert.SerializeObject(new Amplitude
|
||||||
{
|
{
|
||||||
AmplitudeKey = "e1693a1003671058b6abc356c8ba8d59"
|
AmplitudeKey = "NoKeyProvided"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"OutfitSelections":"b33dbeee-5bdd-443d-aa6a-761248054e08,,,,1;6d48c545-22bb-46c1-a29d-0a38af387143,,,,2;6d48c545-22bb-46c1-a29d-0a38af387143,,,,3;ecc1dbe6-ca06-4564-b2a6-30956194d1e9,51ef8d39-2b94-4f9e-9620-07b6b0a913a5,0b2395e1-ebcc-47e9-aaf1-faf9e9cec4cd,,2;ecc1dbe6-ca06-4564-b2a6-30956194d1e9,51ef8d39-2b94-4f9e-9620-07b6b0a913a5,0b2395e1-ebcc-47e9-aaf1-faf9e9cec4cd,,3;0753d7a4-8247-4fca-a6fc-359c26086140,,,,0;14ef6b00-debf-4a85-9755-b4d37df496d3,724c79a3-822c-422f-9462-a5374ee0211c,,,0;11e508a7-fe7d-470e-b270-2dba33e2f7a1,,,,0;d0a9262f-5504-46a7-bb10-7507503db58e,fe304452-b57b-45bc-9c1c-b85b70bcec12,,6a007c73-d930-408a-93df-041a715e0dd4,1","HairColor":"5ee30295-b05f-4e96-819e-5ac865b2c63d","SkinColor":"85343b16-d58a-4091-96d8-083a81fb03ae","FaceFeatures":""}
|
{"OutfitSelections":"b33dbeee-5bdd-443d-aa6a-761248054e08,,,,1;6d48c545-22bb-46c1-a29d-0a38af387143,,,,2;6d48c545-22bb-46c1-a29d-0a38af387143,,,,3;3757149b-f478-4975-81e5-d808a1bed8d5,,,,1;e15b13a7-9e9a-4b32-ba2c-0cb31ed55a8c,,,,1;3a790be3-2937-44d4-be01-b5d65353bd3d,,,,3;3a790be3-2937-44d4-be01-b5d65353bd3d,,,,2;b861e5f3-fc6d-43b3-9861-c1b45cb493a8,,,,0;61ba3c90-c81e-4deb-bc79-50c0f1fe3e83,,,,0","SkinColor":"2d398478-37c4-4c4a-a471-fbcbe3e5b1f5","HairColor":"5ee30295-b05f-4e96-819e-5ac865b2c63d","FaceFeatures":""}
|
||||||
|
|||||||
15
Download/changelog.txt
Normal file
15
Download/changelog.txt
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
Third public release of OpenRec, and probably the biggest update to date.
|
||||||
|
|
||||||
|
Supports:
|
||||||
|
-October 19th 2017
|
||||||
|
-May 30th 2018
|
||||||
|
|
||||||
|
-Sandbox mode now accessed through the room create button on the watch menu
|
||||||
|
-Creating custom rooms now works
|
||||||
|
-Reset Savedata Option
|
||||||
|
-Singleplayer (Private Rooms) Option
|
||||||
|
-Lots of backend and UI improvements
|
||||||
|
|
||||||
|
Credits:
|
||||||
|
@LucasOnDiscord#0210 - Adding potions
|
||||||
|
@GabeTheFirst#7335 - Tester when my game was broken
|
||||||
@@ -1 +1 @@
|
|||||||
[{"Id":1,"ConsumableItemDesc":"7OZ5AE3uuUyqa0P","CreatedAt":"2022-02-18T23:29:59.9035571-05:00","Count":99,"UnlockedLevel":1,"IsActive":false},{"Id":2,"ConsumableItemDesc":"_jnjYGBcyEWY5Ub4OezXcA","CreatedAt":"2022-02-18T23:29:59.909138-05:00","Count":99,"UnlockedLevel":1,"IsActive":false},{"Id":3,"ConsumableItemDesc":"5hIAZ9wg5EyG1cILf4FS2A","CreatedAt":"2022-02-18T23:29:59.909138-05:00","Count":99,"UnlockedLevel":1,"IsActive":false},{"Id":4,"ConsumableItemDesc":"wUCIKdJSvEmiQHYMyx4X4w","CreatedAt":"2022-02-18T23:29:59.909138-05:00","Count":99,"UnlockedLevel":1,"IsActive":false},{"Id":5,"ConsumableItemDesc":"JfnVXFmilU6ysv-VbTAe3A","CreatedAt":"2022-02-18T23:29:59.909138-05:00","Count":99,"UnlockedLevel":1,"IsActive":false},{"Id":6,"ConsumableItemDesc":"InQ25wQMGkG_bvuD5rf2Ag","CreatedAt":"2022-02-18T23:29:59.909138-05:00","Count":99,"UnlockedLevel":1,"IsActive":false},{"Id":7,"ConsumableItemDesc":"mMCGPgK3tki5S_15q2Z81A","CreatedAt":"2022-02-18T23:29:59.909138-05:00","Count":99,"UnlockedLevel":1,"IsActive":false},{"Id":8,"ConsumableItemDesc":"ZuvkidodzkuOfGLDnTOFyg","CreatedAt":"2022-02-18T23:29:59.909138-05:00","Count":99,"UnlockedLevel":1,"IsActive":false}]
|
[{"Id":1,"ConsumableItemDesc":"7OZ5AE3uuUyqa0P","CreatedAt":"2022-02-18T23:29:59.9035571-05:00","Count":99,"UnlockedLevel":1,"IsActive":false},{"Id":2,"ConsumableItemDesc":"_jnjYGBcyEWY5Ub4OezXcA","CreatedAt":"2022-02-18T23:29:59.909138-05:00","Count":99,"UnlockedLevel":1,"IsActive":false},{"Id":3,"ConsumableItemDesc":"5hIAZ9wg5EyG1cILf4FS2A","CreatedAt":"2022-02-18T23:29:59.909138-05:00","Count":99,"UnlockedLevel":1,"IsActive":false},{"Id":4,"ConsumableItemDesc":"wUCIKdJSvEmiQHYMyx4X4w","CreatedAt":"2022-02-18T23:29:59.909138-05:00","Count":99,"UnlockedLevel":1,"IsActive":false},{"Id":5,"ConsumableItemDesc":"JfnVXFmilU6ysv-VbTAe3A","CreatedAt":"2022-02-18T23:29:59.909138-05:00","Count":99,"UnlockedLevel":1,"IsActive":false},{"Id":6,"ConsumableItemDesc":"InQ25wQMGkG_bvuD5rf2Ag","CreatedAt":"2022-02-18T23:29:59.909138-05:00","Count":99,"UnlockedLevel":1,"IsActive":false},{"Id":7,"ConsumableItemDesc":"mMCGPgK3tki5S_15q2Z81A","CreatedAt":"2022-02-18T23:29:59.909138-05:00","Count":99,"UnlockedLevel":1,"IsActive":false},{"Id":8,"ConsumableItemDesc":"ZuvkidodzkuOfGLDnTOFyg","CreatedAt":"2022-02-18T23:29:59.909138-05:00","Count":99,"UnlockedLevel":1,"IsActive":false},{"Id":9,"ConsumableItemDesc":"VQSgL2pTLkWx4B3kwYG7UA","CreatedAt":"2022-02-18T23:29:59.909138-05:00","Count":99,"UnlockedLevel":1,"IsActive":false},{"Id":10,"ConsumableItemDesc":"Tpxqe_lycUelySRHM8B0Vw","CreatedAt":"2022-02-18T23:29:59.909138-05:00","Count":99,"UnlockedLevel":1,"IsActive":false},{"Id":11,"ConsumableItemDesc":"-hy0qD-iUk-v4NHxNzanmg","CreatedAt":"2022-02-18T23:29:59.909138-05:00","Count":99,"UnlockedLevel":1,"IsActive":false}]
|
||||||
|
|||||||
1
Download/facefeaturesadd.txt
Normal file
1
Download/facefeaturesadd.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
,"FaceFeatures":""}
|
||||||
1
Download/gameconfigs.txt
Normal file
1
Download/gameconfigs.txt
Normal file
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
|||||||
0.2
|
0.4.0
|
||||||
|
|||||||
105
GameSessions.cs
105
GameSessions.cs
@@ -11,26 +11,26 @@ namespace gamesessions2018
|
|||||||
// Token: 0x060000BE RID: 190 RVA: 0x00004C08 File Offset: 0x00002E08
|
// Token: 0x060000BE RID: 190 RVA: 0x00004C08 File Offset: 0x00002E08
|
||||||
public static string JoinRandom(string jsonData)
|
public static string JoinRandom(string jsonData)
|
||||||
{
|
{
|
||||||
bool sandboxmode = false;
|
long gamesessionid = 2018L;
|
||||||
|
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\\sandbox.txt") == "Enabled")
|
if (File.ReadAllText("SaveData\\App\\privaterooms.txt") == "Enabled")
|
||||||
{
|
{
|
||||||
sandboxmode = true;
|
gamesessionid = new Random().Next(0, 100);
|
||||||
}
|
}
|
||||||
|
{
|
||||||
{
|
|
||||||
Config.localGameSession = new GameSessions.SessionInstance
|
Config.localGameSession = new GameSessions.SessionInstance
|
||||||
{
|
{
|
||||||
GameSessionId = 2018L,
|
GameSessionId = gamesessionid,
|
||||||
RegionId = "us",
|
RegionId = "us",
|
||||||
RoomId = joinRandomRequest.ActivityLevelIds[0],
|
RoomId = joinRandomRequest.ActivityLevelIds[0],
|
||||||
RecRoomId = null,
|
RecRoomId = null,
|
||||||
EventId = null,
|
EventId = null,
|
||||||
CreatorPlayerId = (long?)APIServer.CachedPlayerID,
|
CreatorPlayerId = 1243409L,
|
||||||
Name = "OpenRec",
|
Name = "OpenRec Room",
|
||||||
ActivityLevelId = joinRandomRequest.ActivityLevelIds[0],
|
ActivityLevelId = joinRandomRequest.ActivityLevelIds[0],
|
||||||
Private = false,
|
Private = false,
|
||||||
Sandbox = sandboxmode,
|
Sandbox = false,
|
||||||
SupportsScreens = true,
|
SupportsScreens = true,
|
||||||
SupportsVR = true,
|
SupportsVR = true,
|
||||||
GameInProgress = false,
|
GameInProgress = false,
|
||||||
@@ -38,7 +38,6 @@ namespace gamesessions2018
|
|||||||
IsFull = false
|
IsFull = false
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
return JsonConvert.SerializeObject(new GameSessions.JoinResult
|
return JsonConvert.SerializeObject(new GameSessions.JoinResult
|
||||||
{
|
{
|
||||||
Result = 0,
|
Result = 0,
|
||||||
@@ -61,30 +60,31 @@ namespace gamesessions2018
|
|||||||
// Token: 0x060000C0 RID: 192 RVA: 0x00004D24 File Offset: 0x00002F24
|
// Token: 0x060000C0 RID: 192 RVA: 0x00004D24 File Offset: 0x00002F24
|
||||||
public static string Create(string jsonData)
|
public static string Create(string jsonData)
|
||||||
{
|
{
|
||||||
Console.WriteLine("[API][GameSession] Creating Room...");
|
long gamesessionid = 2016L;
|
||||||
GameSessions.CreateRequest createRequest = JsonConvert.DeserializeObject<GameSessions.CreateRequest>(jsonData);
|
Console.WriteLine("OpenRec GameSession Custom Room");
|
||||||
|
if (File.ReadAllText("SaveData\\App\\privaterooms.txt") == "Enabled")
|
||||||
{
|
{
|
||||||
Config.localGameSession = new GameSessions.SessionInstance
|
gamesessionid = new Random().Next(0, 100);
|
||||||
{
|
|
||||||
GameSessionId = 2017L,
|
|
||||||
RegionId = "us",
|
|
||||||
RoomId = createRequest.ActivityLevelIds,
|
|
||||||
RecRoomId = null,
|
|
||||||
EventId = null,
|
|
||||||
CreatorPlayerId = (long?)APIServer.CachedPlayerID,
|
|
||||||
Name = "Custom Room",
|
|
||||||
ActivityLevelId = createRequest.ActivityLevelIds,
|
|
||||||
Private = false,
|
|
||||||
Sandbox = createRequest.IsSandbox,
|
|
||||||
SupportsScreens = true,
|
|
||||||
SupportsVR = true,
|
|
||||||
GameInProgress = false,
|
|
||||||
MaxCapacity = 20,
|
|
||||||
IsFull = false
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
GameSessions.CreateRequest createRequest = JsonConvert.DeserializeObject<GameSessions.CreateRequest>(jsonData);
|
||||||
|
Config.localGameSession = new GameSessions.SessionInstance
|
||||||
|
{
|
||||||
|
GameSessionId = gamesessionid,
|
||||||
|
RegionId = "us",
|
||||||
|
RoomId = createRequest.ActivityLevelId,
|
||||||
|
RecRoomId = null,
|
||||||
|
EventId = null,
|
||||||
|
CreatorPlayerId = 1243409L,
|
||||||
|
Name = "Custom Room",
|
||||||
|
ActivityLevelId = createRequest.ActivityLevelId,
|
||||||
|
Private = false,
|
||||||
|
Sandbox = true,
|
||||||
|
SupportsScreens = true,
|
||||||
|
SupportsVR = true,
|
||||||
|
GameInProgress = false,
|
||||||
|
MaxCapacity = 20,
|
||||||
|
IsFull = false
|
||||||
|
};
|
||||||
return JsonConvert.SerializeObject(new GameSessions.JoinResult
|
return JsonConvert.SerializeObject(new GameSessions.JoinResult
|
||||||
{
|
{
|
||||||
Result = 0,
|
Result = 0,
|
||||||
@@ -269,13 +269,52 @@ namespace gamesessions2018
|
|||||||
public GameSessions.RegionPing[] RegionPings { get; set; }
|
public GameSessions.RegionPing[] RegionPings { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class JoinRoomRequest2
|
||||||
|
{
|
||||||
|
// Token: 0x17000022 RID: 34
|
||||||
|
// (get) Token: 0x06000060 RID: 96 RVA: 0x00002345 File Offset: 0x00000545
|
||||||
|
// (set) Token: 0x06000061 RID: 97 RVA: 0x0000234D File Offset: 0x0000054D
|
||||||
|
public ulong[] ExpectedPlayerIds { get; set; }
|
||||||
|
|
||||||
|
// Token: 0x17000023 RID: 35
|
||||||
|
// (get) Token: 0x06000062 RID: 98 RVA: 0x00002356 File Offset: 0x00000556
|
||||||
|
// (set) Token: 0x06000063 RID: 99 RVA: 0x0000235E File Offset: 0x0000055E
|
||||||
|
public GameSessions.RegionPing[] RegionPings { get; set; }
|
||||||
|
|
||||||
|
// Token: 0x17000024 RID: 36
|
||||||
|
// (get) Token: 0x06000064 RID: 100 RVA: 0x00002367 File Offset: 0x00000567
|
||||||
|
// (set) Token: 0x06000065 RID: 101 RVA: 0x0000236F File Offset: 0x0000056F
|
||||||
|
public string[] RoomTags { get; set; }
|
||||||
|
|
||||||
|
// Token: 0x17000025 RID: 37
|
||||||
|
// (get) Token: 0x06000066 RID: 102 RVA: 0x00002378 File Offset: 0x00000578
|
||||||
|
// (set) Token: 0x06000067 RID: 103 RVA: 0x00002380 File Offset: 0x00000580
|
||||||
|
public string RoomName { get; set; }
|
||||||
|
|
||||||
|
// Token: 0x17000026 RID: 38
|
||||||
|
// (get) Token: 0x06000068 RID: 104 RVA: 0x00002389 File Offset: 0x00000589
|
||||||
|
// (set) Token: 0x06000069 RID: 105 RVA: 0x00002391 File Offset: 0x00000591
|
||||||
|
public string SceneName { get; set; }
|
||||||
|
|
||||||
|
// Token: 0x17000027 RID: 39
|
||||||
|
// (get) Token: 0x0600006A RID: 106 RVA: 0x0000239A File Offset: 0x0000059A
|
||||||
|
// (set) Token: 0x0600006B RID: 107 RVA: 0x000023A2 File Offset: 0x000005A2
|
||||||
|
public int AdditionalPlayerJoinMode { get; set; }
|
||||||
|
|
||||||
|
// Token: 0x17000028 RID: 40
|
||||||
|
// (get) Token: 0x0600006C RID: 108 RVA: 0x000023AB File Offset: 0x000005AB
|
||||||
|
// (set) Token: 0x0600006D RID: 109 RVA: 0x000023B3 File Offset: 0x000005B3
|
||||||
|
public bool Private { get; set; }
|
||||||
|
}
|
||||||
|
// Token: 0x02000025 RID: 37
|
||||||
|
|
||||||
// Token: 0x02000025 RID: 37
|
// Token: 0x02000025 RID: 37
|
||||||
public class CreateRequest
|
public class CreateRequest
|
||||||
{
|
{
|
||||||
// Token: 0x17000055 RID: 85
|
// Token: 0x17000055 RID: 85
|
||||||
// (get) Token: 0x060000F2 RID: 242 RVA: 0x0000271C File Offset: 0x0000091C
|
// (get) Token: 0x060000F2 RID: 242 RVA: 0x0000271C File Offset: 0x0000091C
|
||||||
// (set) Token: 0x060000F3 RID: 243 RVA: 0x00002724 File Offset: 0x00000924
|
// (set) Token: 0x060000F3 RID: 243 RVA: 0x00002724 File Offset: 0x00000924
|
||||||
public string ActivityLevelIds { get; set; }
|
public string ActivityLevelId { get; set; }
|
||||||
|
|
||||||
// Token: 0x17000056 RID: 86
|
// Token: 0x17000056 RID: 86
|
||||||
// (get) Token: 0x060000F4 RID: 244 RVA: 0x0000272D File Offset: 0x0000092D
|
// (get) Token: 0x060000F4 RID: 244 RVA: 0x0000272D File Offset: 0x0000092D
|
||||||
|
|||||||
231
GameSessions2.cs
Normal file
231
GameSessions2.cs
Normal file
@@ -0,0 +1,231 @@
|
|||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using rooms2018;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
|
namespace gamesessions2018
|
||||||
|
{
|
||||||
|
// Token: 0x0200000F RID: 15
|
||||||
|
internal class GameSessions2
|
||||||
|
{
|
||||||
|
// Token: 0x06000033 RID: 51 RVA: 0x000048F0 File Offset: 0x00002AF0
|
||||||
|
public static GameSessions2.JoinResult JoinRoom(string postData)
|
||||||
|
{
|
||||||
|
|
||||||
|
GameSessions.JoinRoomRequest2 joinRoomRequest = JsonConvert.DeserializeObject<GameSessions.JoinRoomRequest2>(postData);
|
||||||
|
bool flag = Rooms.RecRoomOriginalRooms.ContainsKey(joinRoomRequest.RoomName);
|
||||||
|
if (flag)
|
||||||
|
{
|
||||||
|
GameSessions2.currentRoom = Rooms.RecRoomOriginalRooms[joinRoomRequest.RoomName];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
GameSessions2.currentRoom = Rooms.RecRoomOriginalRooms["DormRoom"];
|
||||||
|
}
|
||||||
|
int num = 0;
|
||||||
|
for (int i = 0; i < GameSessions2.currentRoom.Scenes.Count<Rooms.Scene>(); i++)
|
||||||
|
{
|
||||||
|
bool flag2 = GameSessions2.currentRoom.Scenes[i].Name == joinRoomRequest.SceneName;
|
||||||
|
if (flag2)
|
||||||
|
{
|
||||||
|
num = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
long gamesessionid = 2018L;
|
||||||
|
bool sandboxmode = false;
|
||||||
|
if (File.ReadAllText("SaveData\\App\\sandbox.txt") == "Enabled")
|
||||||
|
{
|
||||||
|
sandboxmode = true;
|
||||||
|
}
|
||||||
|
if (File.ReadAllText("SaveData\\App\\privaterooms.txt") == "Enabled")
|
||||||
|
{
|
||||||
|
gamesessionid = new Random().Next(0, 100);
|
||||||
|
}
|
||||||
|
GameSessions2.currentSession = new GameSessions2.SessionData
|
||||||
|
{
|
||||||
|
GameSessionId = gamesessionid,
|
||||||
|
PhotonRegionId = "us",
|
||||||
|
PhotonRoomId = GameSessions2.currentRoom.Room.RoomId.ToString(),
|
||||||
|
Name = GameSessions2.currentRoom.Room.Name,
|
||||||
|
RoomId = GameSessions2.currentRoom.Room.RoomId,
|
||||||
|
RoomSceneId = (long)(num + 1),
|
||||||
|
RoomSceneLocationId = GameSessions2.currentRoom.Scenes[num].RoomSceneLocationId,
|
||||||
|
IsSandbox = sandboxmode,
|
||||||
|
DataBlobName = "",
|
||||||
|
PlayerEventId = null,
|
||||||
|
Private = false,
|
||||||
|
GameInProgress = false,
|
||||||
|
MaxCapacity = 20,
|
||||||
|
IsFull = false
|
||||||
|
};
|
||||||
|
return new GameSessions2.JoinResult
|
||||||
|
{
|
||||||
|
Result = 0,
|
||||||
|
GameSession = GameSessions2.currentSession,
|
||||||
|
RoomDetails = GameSessions2.currentRoom
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
// Token: 0x04000019 RID: 25
|
||||||
|
public static Rooms.RoomDetail currentRoom;
|
||||||
|
|
||||||
|
// Token: 0x0400001A RID: 26
|
||||||
|
public static GameSessions2.SessionData placeholderSession = new GameSessions2.SessionData
|
||||||
|
{
|
||||||
|
GameSessionId = 1L,
|
||||||
|
PhotonRegionId = "us",
|
||||||
|
PhotonRoomId = "1",
|
||||||
|
Name = "Dorm Room",
|
||||||
|
RoomId = 1L,
|
||||||
|
RoomSceneId = 1L,
|
||||||
|
RoomSceneLocationId = "76d98498-60a1-430c-ab76-b54a29b7a163",
|
||||||
|
IsSandbox = false,
|
||||||
|
DataBlobName = "",
|
||||||
|
PlayerEventId = null,
|
||||||
|
Private = false,
|
||||||
|
GameInProgress = false,
|
||||||
|
MaxCapacity = 20,
|
||||||
|
IsFull = false
|
||||||
|
};
|
||||||
|
|
||||||
|
// Token: 0x0400001B RID: 27
|
||||||
|
public static GameSessions2.SessionData currentSession;
|
||||||
|
|
||||||
|
// Token: 0x02000010 RID: 16
|
||||||
|
public class JoinResult
|
||||||
|
{
|
||||||
|
// Token: 0x1700000F RID: 15
|
||||||
|
// (get) Token: 0x06000036 RID: 54 RVA: 0x00002202 File Offset: 0x00000402
|
||||||
|
// (set) Token: 0x06000037 RID: 55 RVA: 0x0000220A File Offset: 0x0000040A
|
||||||
|
public int Result { get; set; }
|
||||||
|
|
||||||
|
// Token: 0x17000010 RID: 16
|
||||||
|
// (get) Token: 0x06000038 RID: 56 RVA: 0x00002213 File Offset: 0x00000413
|
||||||
|
// (set) Token: 0x06000039 RID: 57 RVA: 0x0000221B File Offset: 0x0000041B
|
||||||
|
public GameSessions2.SessionData GameSession { get; set; }
|
||||||
|
|
||||||
|
// Token: 0x17000011 RID: 17
|
||||||
|
// (get) Token: 0x0600003A RID: 58 RVA: 0x00002224 File Offset: 0x00000424
|
||||||
|
// (set) Token: 0x0600003B RID: 59 RVA: 0x0000222C File Offset: 0x0000042C
|
||||||
|
public Rooms.RoomDetail RoomDetails { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
// Token: 0x02000011 RID: 17
|
||||||
|
public class SessionData
|
||||||
|
{
|
||||||
|
// Token: 0x17000012 RID: 18
|
||||||
|
// (get) Token: 0x0600003D RID: 61 RVA: 0x00002235 File Offset: 0x00000435
|
||||||
|
// (set) Token: 0x0600003E RID: 62 RVA: 0x0000223D File Offset: 0x0000043D
|
||||||
|
public long GameSessionId { get; set; }
|
||||||
|
|
||||||
|
// Token: 0x17000013 RID: 19
|
||||||
|
// (get) Token: 0x0600003F RID: 63 RVA: 0x00002246 File Offset: 0x00000446
|
||||||
|
// (set) Token: 0x06000040 RID: 64 RVA: 0x0000224E File Offset: 0x0000044E
|
||||||
|
public string PhotonRegionId { get; set; }
|
||||||
|
|
||||||
|
// Token: 0x17000014 RID: 20
|
||||||
|
// (get) Token: 0x06000041 RID: 65 RVA: 0x00002257 File Offset: 0x00000457
|
||||||
|
// (set) Token: 0x06000042 RID: 66 RVA: 0x0000225F File Offset: 0x0000045F
|
||||||
|
public string PhotonRoomId { get; set; }
|
||||||
|
|
||||||
|
// Token: 0x17000015 RID: 21
|
||||||
|
// (get) Token: 0x06000043 RID: 67 RVA: 0x00002268 File Offset: 0x00000468
|
||||||
|
// (set) Token: 0x06000044 RID: 68 RVA: 0x00002270 File Offset: 0x00000470
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
// Token: 0x17000016 RID: 22
|
||||||
|
// (get) Token: 0x06000045 RID: 69 RVA: 0x00002279 File Offset: 0x00000479
|
||||||
|
// (set) Token: 0x06000046 RID: 70 RVA: 0x00002281 File Offset: 0x00000481
|
||||||
|
public long RoomId { get; set; }
|
||||||
|
|
||||||
|
// Token: 0x17000017 RID: 23
|
||||||
|
// (get) Token: 0x06000047 RID: 71 RVA: 0x0000228A File Offset: 0x0000048A
|
||||||
|
// (set) Token: 0x06000048 RID: 72 RVA: 0x00002292 File Offset: 0x00000492
|
||||||
|
public long RoomSceneId { get; set; }
|
||||||
|
|
||||||
|
// Token: 0x17000018 RID: 24
|
||||||
|
// (get) Token: 0x06000049 RID: 73 RVA: 0x0000229B File Offset: 0x0000049B
|
||||||
|
// (set) Token: 0x0600004A RID: 74 RVA: 0x000022A3 File Offset: 0x000004A3
|
||||||
|
public string RoomSceneLocationId { get; set; }
|
||||||
|
|
||||||
|
// Token: 0x17000019 RID: 25
|
||||||
|
// (get) Token: 0x0600004B RID: 75 RVA: 0x000022AC File Offset: 0x000004AC
|
||||||
|
// (set) Token: 0x0600004C RID: 76 RVA: 0x000022B4 File Offset: 0x000004B4
|
||||||
|
public bool IsSandbox { get; set; }
|
||||||
|
|
||||||
|
// Token: 0x1700001A RID: 26
|
||||||
|
// (get) Token: 0x0600004D RID: 77 RVA: 0x000022BD File Offset: 0x000004BD
|
||||||
|
// (set) Token: 0x0600004E RID: 78 RVA: 0x000022C5 File Offset: 0x000004C5
|
||||||
|
public string DataBlobName { get; set; }
|
||||||
|
|
||||||
|
// Token: 0x1700001B RID: 27
|
||||||
|
// (get) Token: 0x0600004F RID: 79 RVA: 0x000022CE File Offset: 0x000004CE
|
||||||
|
// (set) Token: 0x06000050 RID: 80 RVA: 0x000022D6 File Offset: 0x000004D6
|
||||||
|
public long? PlayerEventId { get; set; }
|
||||||
|
|
||||||
|
// Token: 0x1700001C RID: 28
|
||||||
|
// (get) Token: 0x06000051 RID: 81 RVA: 0x000022DF File Offset: 0x000004DF
|
||||||
|
// (set) Token: 0x06000052 RID: 82 RVA: 0x000022E7 File Offset: 0x000004E7
|
||||||
|
public bool Private { get; set; }
|
||||||
|
|
||||||
|
// Token: 0x1700001D RID: 29
|
||||||
|
// (get) Token: 0x06000053 RID: 83 RVA: 0x000022F0 File Offset: 0x000004F0
|
||||||
|
// (set) Token: 0x06000054 RID: 84 RVA: 0x000022F8 File Offset: 0x000004F8
|
||||||
|
public bool GameInProgress { get; set; }
|
||||||
|
|
||||||
|
// Token: 0x1700001E RID: 30
|
||||||
|
// (get) Token: 0x06000055 RID: 85 RVA: 0x00002301 File Offset: 0x00000501
|
||||||
|
// (set) Token: 0x06000056 RID: 86 RVA: 0x00002309 File Offset: 0x00000509
|
||||||
|
public int MaxCapacity { get; set; }
|
||||||
|
|
||||||
|
// Token: 0x1700001F RID: 31
|
||||||
|
// (get) Token: 0x06000057 RID: 87 RVA: 0x00002312 File Offset: 0x00000512
|
||||||
|
// (set) Token: 0x06000058 RID: 88 RVA: 0x0000231A File Offset: 0x0000051A
|
||||||
|
public bool IsFull { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
// Token: 0x02000012 RID: 18
|
||||||
|
public enum JoinResultIDs
|
||||||
|
{
|
||||||
|
// Token: 0x0400002E RID: 46
|
||||||
|
Success,
|
||||||
|
// Token: 0x0400002F RID: 47
|
||||||
|
NoSuchGame,
|
||||||
|
// Token: 0x04000030 RID: 48
|
||||||
|
PlayerNotOnline,
|
||||||
|
// Token: 0x04000031 RID: 49
|
||||||
|
InsufficientSpace,
|
||||||
|
// Token: 0x04000032 RID: 50
|
||||||
|
EventNotStarted,
|
||||||
|
// Token: 0x04000033 RID: 51
|
||||||
|
EventAlreadyFinished,
|
||||||
|
// Token: 0x04000034 RID: 52
|
||||||
|
EventCreatorNotReady,
|
||||||
|
// Token: 0x04000035 RID: 53
|
||||||
|
BlockedFromRoom,
|
||||||
|
// Token: 0x04000036 RID: 54
|
||||||
|
ProfileLocked,
|
||||||
|
// Token: 0x04000037 RID: 55
|
||||||
|
NoBirthday,
|
||||||
|
// Token: 0x04000038 RID: 56
|
||||||
|
MarkedForDelete,
|
||||||
|
// Token: 0x04000039 RID: 57
|
||||||
|
JuniorNotAllowed,
|
||||||
|
// Token: 0x0400003A RID: 58
|
||||||
|
Banned,
|
||||||
|
// Token: 0x0400003B RID: 59
|
||||||
|
NoSuchRoom = 20,
|
||||||
|
// Token: 0x0400003C RID: 60
|
||||||
|
RoomCreatorNotReady,
|
||||||
|
// Token: 0x0400003D RID: 61
|
||||||
|
RoomIsNotActive,
|
||||||
|
// Token: 0x0400003E RID: 62
|
||||||
|
RoomBlockedByCreator,
|
||||||
|
// Token: 0x0400003F RID: 63
|
||||||
|
RoomBlockingCreator,
|
||||||
|
// Token: 0x04000040 RID: 64
|
||||||
|
RoomIsPrivate
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
63
GetOrCreates.cs
Normal file
63
GetOrCreates.cs
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace api2017
|
||||||
|
{
|
||||||
|
// Token: 0x0200003A RID: 58
|
||||||
|
internal class getorcreate
|
||||||
|
{
|
||||||
|
public static string GetOrCreate(ulong userid)
|
||||||
|
{
|
||||||
|
int level = int.Parse(File.ReadAllText("SaveData\\Profile\\level.txt"));
|
||||||
|
string name = File.ReadAllText("SaveData\\Profile\\username.txt");
|
||||||
|
return JsonConvert.SerializeObject(new Profiles
|
||||||
|
{
|
||||||
|
Id = userid,
|
||||||
|
Username = name,
|
||||||
|
DisplayName = name,
|
||||||
|
XP = 48,
|
||||||
|
Level = level,
|
||||||
|
Reputation = 0,
|
||||||
|
Verified = true,
|
||||||
|
Developer = true,
|
||||||
|
HasEmail = true,
|
||||||
|
CanReceiveInvites = false,
|
||||||
|
ProfileImageName = name,
|
||||||
|
HasBirthday = true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// Token: 0x06000197 RID: 407 RVA: 0x0000550C File Offset: 0x0000370C
|
||||||
|
public static string GetOrCreateArray(ulong userid)
|
||||||
|
{
|
||||||
|
int level = int.Parse(File.ReadAllText("SaveData\\Profile\\level.txt"));
|
||||||
|
string name = File.ReadAllText("SaveData\\Profile\\username.txt");
|
||||||
|
return JsonConvert.SerializeObject(new Profiles[]
|
||||||
|
{
|
||||||
|
new Profiles
|
||||||
|
{
|
||||||
|
Id = userid,
|
||||||
|
Username = name,
|
||||||
|
DisplayName = name,
|
||||||
|
XP = 48,
|
||||||
|
Level = level,
|
||||||
|
Reputation = 0,
|
||||||
|
Verified = true,
|
||||||
|
Developer = true,
|
||||||
|
HasEmail = true,
|
||||||
|
CanReceiveInvites = false,
|
||||||
|
ProfileImageName = name,
|
||||||
|
JuniorProfile = false,
|
||||||
|
ForceJuniorImages = false,
|
||||||
|
HasBirthday = true
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Token: 0x06000199 RID: 409 RVA: 0x00002BBE File Offset: 0x00000DBE
|
||||||
|
public static string playerName()
|
||||||
|
{
|
||||||
|
return File.ReadAllText("playerNameConfig.txt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -30,6 +30,7 @@ namespace server
|
|||||||
this.listener.Prefixes.Add("http://localhost:20182/");
|
this.listener.Prefixes.Add("http://localhost:20182/");
|
||||||
for (; ; )
|
for (; ; )
|
||||||
{
|
{
|
||||||
|
//image server always send out profile image for now, might cause issues later but ill fix it when I need too
|
||||||
this.listener.Start();
|
this.listener.Start();
|
||||||
Console.WriteLine("ImageServer.cs is listening.");
|
Console.WriteLine("ImageServer.cs is listening.");
|
||||||
HttpListenerContext context = this.listener.GetContext();
|
HttpListenerContext context = this.listener.GetContext();
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ namespace server
|
|||||||
// Token: 0x02000050 RID: 80
|
// Token: 0x02000050 RID: 80
|
||||||
internal class NameServer
|
internal class NameServer
|
||||||
{
|
{
|
||||||
|
|
||||||
// Token: 0x06000227 RID: 551 RVA: 0x00006D1C File Offset: 0x00004F1C
|
// Token: 0x06000227 RID: 551 RVA: 0x00006D1C File Offset: 0x00004F1C
|
||||||
public NameServer()
|
public NameServer()
|
||||||
{
|
{
|
||||||
@@ -26,6 +27,7 @@ namespace server
|
|||||||
// Token: 0x06000228 RID: 552 RVA: 0x00006D84 File Offset: 0x00004F84
|
// Token: 0x06000228 RID: 552 RVA: 0x00006D84 File Offset: 0x00004F84
|
||||||
private void StartListen()
|
private void StartListen()
|
||||||
{
|
{
|
||||||
|
//nameserver is ONLY for 2018
|
||||||
this.listener.Prefixes.Add("http://localhost:20181/");
|
this.listener.Prefixes.Add("http://localhost:20181/");
|
||||||
for (; ; )
|
for (; ; )
|
||||||
{
|
{
|
||||||
|
|||||||
106
OpenRecNet.cs
Normal file
106
OpenRecNet.cs
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
using System;
|
||||||
|
using System.Net;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading;
|
||||||
|
|
||||||
|
namespace start
|
||||||
|
{
|
||||||
|
public class OpenRecNet
|
||||||
|
{
|
||||||
|
public OpenRecNet()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//ignore this its a beta feature
|
||||||
|
public static void RecNet()
|
||||||
|
{
|
||||||
|
Console.ForegroundColor = ConsoleColor.Blue;
|
||||||
|
Console.Clear();
|
||||||
|
if ((File.ReadAllText("SaveData\\App\\showopenrecinfo.txt")) == "Enabled")
|
||||||
|
{
|
||||||
|
goto ChatStart;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
goto SkipStart;
|
||||||
|
}
|
||||||
|
|
||||||
|
ChatStart:
|
||||||
|
Console.WriteLine("Welcome to OpenRecChat (Beta)!");
|
||||||
|
Console.WriteLine("You are logged in as " + File.ReadAllText("SaveData\\Profile\\username.txt" + "."));
|
||||||
|
Console.WriteLine("Your UserID is " + File.ReadAllText("SaveData\\Profile\\userid.txt" + "."));
|
||||||
|
Console.WriteLine("In the future, show this message?");
|
||||||
|
Console.WriteLine("1) Yes" + Environment.NewLine + "2) No");
|
||||||
|
string readline = Console.ReadLine();
|
||||||
|
if (readline == "1")
|
||||||
|
{
|
||||||
|
File.WriteAllText("SaveData\\App\\showopenrecinfo.txt", "Enabled");
|
||||||
|
justjoined = false;
|
||||||
|
goto SkipStart;
|
||||||
|
}
|
||||||
|
if (readline == "2")
|
||||||
|
{
|
||||||
|
File.WriteAllText("SaveData\\App\\showopenrecinfo.txt", "Disabled");
|
||||||
|
justjoined = false;
|
||||||
|
goto SkipStart;
|
||||||
|
}
|
||||||
|
|
||||||
|
SkipStart:
|
||||||
|
for (; ; )
|
||||||
|
{
|
||||||
|
Console.Clear();
|
||||||
|
string refresh = new WebClient
|
||||||
|
{
|
||||||
|
Headers =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
"username",
|
||||||
|
File.ReadAllText("SaveData\\Profile\\username.txt")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"justjoined",
|
||||||
|
Convert.ToString(justjoined)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}.DownloadString("https://openrecchat.loca.lt/refresh");
|
||||||
|
Console.WriteLine(refresh);
|
||||||
|
Console.WriteLine(Environment.NewLine + "Commands: /r -Refresh /e -Exit");
|
||||||
|
Console.WriteLine("Type your message below: ");
|
||||||
|
justjoined = false;
|
||||||
|
goto Send;
|
||||||
|
}
|
||||||
|
|
||||||
|
Send:
|
||||||
|
string send = Console.ReadLine();
|
||||||
|
if (send == "/r")
|
||||||
|
{
|
||||||
|
goto SkipStart;
|
||||||
|
}
|
||||||
|
else if (send == "/e")
|
||||||
|
{
|
||||||
|
Environment.Exit(0);
|
||||||
|
}
|
||||||
|
else if (send == "")
|
||||||
|
{
|
||||||
|
goto SkipStart;
|
||||||
|
}
|
||||||
|
new WebClient
|
||||||
|
{
|
||||||
|
Headers =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
"userid",
|
||||||
|
File.ReadAllText("SaveData\\Profile\\userid.txt")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"username",
|
||||||
|
File.ReadAllText("SaveData\\Profile\\username.txt")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}.UploadString("https://openrecchat.loca.lt/sendmessage", send);
|
||||||
|
goto SkipStart;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool justjoined = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,6 +3,16 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||||
|
<ApplicationIcon>icon2.ico</ApplicationIcon>
|
||||||
|
<AssemblyName>OpenRec</AssemblyName>
|
||||||
|
<RootNamespace>OpenRec</RootNamespace>
|
||||||
|
<Authors>recroom2016</Authors>
|
||||||
|
<PackageIcon>icon2.png</PackageIcon>
|
||||||
|
<PackageIconUrl />
|
||||||
|
<RepositoryUrl>https://github.com/recroom2016/OpenRec</RepositoryUrl>
|
||||||
|
<PackageProjectUrl>https://discord.gg/daC8QUhnFP</PackageProjectUrl>
|
||||||
|
<Company>OpenRec</Company>
|
||||||
|
<Version>0.4.0</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -15,4 +25,11 @@
|
|||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="C:\Users\Tucker\Downloads\icon2.png">
|
||||||
|
<Pack>True</Pack>
|
||||||
|
<PackagePath></PackagePath>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -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", "{3B5E3DA5-F8EC-4767-9BC3-AE95E72631D0}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
|||||||
36
PlatformLogin.cs
Normal file
36
PlatformLogin.cs
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
using System;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace api2017
|
||||||
|
{
|
||||||
|
// Token: 0x02000032 RID: 50
|
||||||
|
internal class PlatformLogin
|
||||||
|
{
|
||||||
|
// Token: 0x17000070 RID: 112
|
||||||
|
// (get) Token: 0x06000137 RID: 311 RVA: 0x00002905 File Offset: 0x00000B05
|
||||||
|
// (set) Token: 0x06000138 RID: 312 RVA: 0x0000290D File Offset: 0x00000B0D
|
||||||
|
public string Token { get; set; }
|
||||||
|
|
||||||
|
// Token: 0x17000071 RID: 113
|
||||||
|
// (get) Token: 0x06000139 RID: 313 RVA: 0x00002916 File Offset: 0x00000B16
|
||||||
|
// (set) Token: 0x0600013A RID: 314 RVA: 0x0000291E File Offset: 0x00000B1E
|
||||||
|
public ulong PlayerId { get; set; }
|
||||||
|
|
||||||
|
// Token: 0x17000072 RID: 114
|
||||||
|
// (get) Token: 0x0600013B RID: 315 RVA: 0x00002927 File Offset: 0x00000B27
|
||||||
|
// (set) Token: 0x0600013C RID: 316 RVA: 0x0000292F File Offset: 0x00000B2F
|
||||||
|
public string Error { get; set; }
|
||||||
|
|
||||||
|
// Token: 0x0600013D RID: 317 RVA: 0x00005114 File Offset: 0x00003314
|
||||||
|
public static string v4(ulong userid)
|
||||||
|
{
|
||||||
|
PlatformLogin value = new PlatformLogin
|
||||||
|
{
|
||||||
|
Token = "j3923mHJG032jew",
|
||||||
|
PlayerId = userid,
|
||||||
|
Error = ""
|
||||||
|
};
|
||||||
|
return JsonConvert.SerializeObject(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
18
Profiles.cs
18
Profiles.cs
@@ -2,12 +2,10 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace api2016
|
namespace api2017
|
||||||
|
|
||||||
{
|
{
|
||||||
class Profiles
|
class Profiles
|
||||||
{
|
{
|
||||||
|
|
||||||
public ulong Id { get; set; }
|
public ulong Id { get; set; }
|
||||||
public string Username { get; set; }
|
public string Username { get; set; }
|
||||||
public string DisplayName { get; set; }
|
public string DisplayName { get; set; }
|
||||||
@@ -15,27 +13,13 @@ namespace api2016
|
|||||||
public int Level { get; set; }
|
public int Level { get; set; }
|
||||||
public int Reputation { get; set; }
|
public int Reputation { get; set; }
|
||||||
public bool Verified { get; set; }
|
public bool Verified { get; set; }
|
||||||
|
|
||||||
public bool Developer { get; set; }
|
public bool Developer { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public bool HasEmail { get; set; }
|
public bool HasEmail { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public bool CanReceiveInvites { get; set; }
|
public bool CanReceiveInvites { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public string ProfileImageName { get; set; }
|
public string ProfileImageName { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public bool JuniorProfile { get; set; }
|
public bool JuniorProfile { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public bool ForceJuniorImages { get; set; }
|
public bool ForceJuniorImages { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public bool PendingJunior { get; set; }
|
public bool PendingJunior { get; set; }
|
||||||
|
|
||||||
public bool HasBirthday { get; set; }
|
public bool HasBirthday { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
97
Program.cs
97
Program.cs
@@ -10,57 +10,103 @@ namespace start
|
|||||||
{
|
{
|
||||||
class Program
|
class Program
|
||||||
{
|
{
|
||||||
static void Main(string[] args)
|
static void Main()
|
||||||
{
|
{
|
||||||
|
//startup for openrec
|
||||||
Setup.setup();
|
Setup.setup();
|
||||||
goto Start;
|
goto Start;
|
||||||
|
|
||||||
Start:
|
Start:
|
||||||
|
Console.ForegroundColor = ConsoleColor.Green;
|
||||||
Console.WriteLine("OpenRec - Open source RecNet server software. (Version: " + version + ")");
|
Console.WriteLine("OpenRec - Open source RecNet server software. (Version: " + version + ")");
|
||||||
Console.WriteLine("Made and provided by RecRoom 2016.");
|
Console.WriteLine("Made and provided by RecRoom 2016.");
|
||||||
Console.WriteLine("Download source code here: https://github.com/recroom2016/OpenRec");
|
Console.WriteLine("Download source code here: https://github.com/recroom2016/OpenRec");
|
||||||
Console.WriteLine("Discord: https://discord.gg/daC8QUhnFP" + Environment.NewLine);
|
Console.WriteLine("Discord: https://discord.gg/daC8QUhnFP" + Environment.NewLine);
|
||||||
if (!(new WebClient().DownloadString("https://raw.githubusercontent.com/recroom2016/OpenRec/master/Download/version.txt").Contains(version)))
|
if (!(new WebClient().DownloadString("https://raw.githubusercontent.com/recroom2016/OpenRec/master/Download/version.txt").Contains(version)))
|
||||||
{
|
{
|
||||||
Console.WriteLine("This version of OpenRec is outdated. We recommend you install the latest version, OpenRec " + new WebClient().DownloadString("https://raw.githubusercontent.com/recroom2016/OpenRec/master/Download/version.txt") + Environment.NewLine);
|
Console.WriteLine("This version of OpenRec is outdated. We recommend you install the latest version, OpenRec " + new WebClient().DownloadString("https://raw.githubusercontent.com/recroom2016/OpenRec/master/Download/version.txt"));
|
||||||
}
|
}
|
||||||
Console.WriteLine("1) Change Settings" + Environment.NewLine + "2) Modify Profile" + Environment.NewLine + "3) Start Server");
|
Console.WriteLine("1) Changelog" + Environment.NewLine +"2) Change Settings" + Environment.NewLine + "3) Modify Profile" + Environment.NewLine + "4) Start Server");
|
||||||
string readline = Console.ReadLine();
|
string readline = Console.ReadLine();
|
||||||
if (readline == "1")
|
if (readline == "1")
|
||||||
|
{
|
||||||
|
Console.Clear();
|
||||||
|
Console.WriteLine(new WebClient().DownloadString("https://raw.githubusercontent.com/recroom2016/OpenRec/master/Download/changelog.txt"));
|
||||||
|
Console.WriteLine("Press any key to continue:");
|
||||||
|
Console.ReadKey();
|
||||||
|
Console.Clear();
|
||||||
|
goto Start;
|
||||||
|
}
|
||||||
|
if (readline == "2")
|
||||||
{
|
{
|
||||||
Console.Clear();
|
Console.Clear();
|
||||||
goto Settings;
|
goto Settings;
|
||||||
|
|
||||||
Settings:
|
Settings:
|
||||||
Console.WriteLine("1) Sandbox Mode: " + File.ReadAllText("SaveData\\App\\sandbox.txt") + Environment.NewLine + "2) Go Back");
|
Console.WriteLine("1) Private Rooms: " + File.ReadAllText("SaveData\\App\\privaterooms.txt") + Environment.NewLine + "2) OpenRecNet Info Tab: " + File.ReadAllText("SaveData\\App\\showopenrecinfo.txt") + Environment.NewLine + "3) Reset SaveData" + Environment.NewLine + "4) Go Back");
|
||||||
string readline4 = Console.ReadLine();
|
string readline4 = Console.ReadLine();
|
||||||
if (readline4 == "1")
|
if (readline4 == "1")
|
||||||
{
|
{
|
||||||
if (File.ReadAllText("SaveData\\App\\sandbox.txt") == "Disabled")
|
if (File.ReadAllText("SaveData\\App\\privaterooms.txt") == "Disabled")
|
||||||
{
|
{
|
||||||
File.WriteAllText("SaveData\\App\\sandbox.txt", "Enabled");
|
File.WriteAllText("SaveData\\App\\privaterooms.txt", "Enabled");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
File.WriteAllText("SaveData\\App\\sandbox.txt", "Disabled");
|
File.WriteAllText("SaveData\\App\\privaterooms.txt", "Disabled");
|
||||||
}
|
}
|
||||||
Console.Clear();
|
Console.Clear();
|
||||||
Console.WriteLine("Success!");
|
Console.WriteLine("Success!");
|
||||||
goto Settings;
|
goto Settings;
|
||||||
}
|
}
|
||||||
else if (readline4 == "2")
|
else if (readline4 == "2")
|
||||||
|
{
|
||||||
|
if (File.ReadAllText("SaveData\\App\\showopenrecinfo.txt") == "Disabled")
|
||||||
|
{
|
||||||
|
File.WriteAllText("SaveData\\App\\showopenrecinfo.txt", "Enabled");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
File.WriteAllText("SaveData\\App\\showopenrecinfo.txt", "Disabled");
|
||||||
|
}
|
||||||
|
Console.Clear();
|
||||||
|
Console.WriteLine("Success!");
|
||||||
|
goto Settings;
|
||||||
|
}
|
||||||
|
else if (readline4 == "3")
|
||||||
|
{
|
||||||
|
File.Delete("SaveData\\avatar.txt");
|
||||||
|
File.Delete("SaveData\\avataritems.txt");
|
||||||
|
File.Delete("SaveData\\equipment.txt");
|
||||||
|
File.Delete("SaveData\\consumables.txt");
|
||||||
|
File.Delete("SaveData\\gameconfigs.txt");
|
||||||
|
File.Delete("SaveData\\storefronts2.txt");
|
||||||
|
File.Delete("SaveData\\Profile\\username.txt");
|
||||||
|
File.Delete("SaveData\\Profile\\level.txt");
|
||||||
|
File.Delete("SaveData\\Profile\\userid.txt");
|
||||||
|
File.Delete("SaveData\\myrooms.txt");
|
||||||
|
File.Delete("SaveData\\settings.txt");
|
||||||
|
File.Delete("SaveData\\App\\privaterooms.txt");
|
||||||
|
File.Delete("SaveData\\App\\showopenrecinfo.txt");
|
||||||
|
File.Delete("SaveData\\App\\facefeaturesadd.txt");
|
||||||
|
File.Delete("SaveData\\profileimage.png");
|
||||||
|
Console.WriteLine("Success!");
|
||||||
|
Setup.setup();
|
||||||
|
goto Settings;
|
||||||
|
}
|
||||||
|
else if (readline4 == "4")
|
||||||
{
|
{
|
||||||
Console.Clear();
|
Console.Clear();
|
||||||
goto Start;
|
goto Start;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (readline == "2")
|
if (readline == "3")
|
||||||
{
|
{
|
||||||
Console.Clear();
|
Console.Clear();
|
||||||
goto Profile;
|
goto Profile;
|
||||||
|
|
||||||
Profile:
|
Profile:
|
||||||
Console.WriteLine("1) Change Username" + Environment.NewLine+ "2) Change Profile Image" + Environment.NewLine + "3) Change Level" + Environment.NewLine + "4) Go Back");
|
Console.WriteLine("1) Change Username" + Environment.NewLine + "2) Change Profile Image" + Environment.NewLine + "3) Change Level" + Environment.NewLine + "4) Go Back");
|
||||||
string readline3 = Console.ReadLine();
|
string readline3 = Console.ReadLine();
|
||||||
if (readline3 == "1")
|
if (readline3 == "1")
|
||||||
{
|
{
|
||||||
@@ -137,9 +183,10 @@ namespace start
|
|||||||
goto Start;
|
goto Start;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (readline == "3")
|
|
||||||
|
if (readline == "4")
|
||||||
{
|
{
|
||||||
Console.WriteLine("Please select the version of RecRoom the server should host: (2018)");
|
Console.WriteLine("Please select the version of RecRoom the server should host: (2017, 2018)");
|
||||||
string readline2 = Console.ReadLine();
|
string readline2 = Console.ReadLine();
|
||||||
if (readline2 == "2016")
|
if (readline2 == "2016")
|
||||||
{
|
{
|
||||||
@@ -168,9 +215,33 @@ namespace start
|
|||||||
new WebSocket();
|
new WebSocket();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (readline == "5")
|
||||||
|
{
|
||||||
|
Console.Clear();
|
||||||
|
goto ChatStart;
|
||||||
|
|
||||||
|
ChatStart:
|
||||||
|
Console.WriteLine("Pinging the chat servers...");
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string ping = new WebClient().DownloadString("https://openrecchat.loca.lt/ping");
|
||||||
|
}
|
||||||
|
catch (Exception ex4)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Chat servers currently offline...");
|
||||||
|
Console.WriteLine("Press any key to continue:");
|
||||||
|
Console.ReadKey();
|
||||||
|
goto Start;
|
||||||
|
}
|
||||||
|
Console.WriteLine("Success!");
|
||||||
|
Console.WriteLine("Press any key to continue:");
|
||||||
|
Console.ReadKey();
|
||||||
|
OpenRecNet.RecNet();
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string version = "0.3";
|
public static string version = "0.4.0";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
63
Rooms.cs
Normal file
63
Rooms.cs
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace rooms2018
|
||||||
|
{
|
||||||
|
// Token: 0x0200002B RID: 43
|
||||||
|
internal class RoomsList
|
||||||
|
{
|
||||||
|
// Token: 0x17000062 RID: 98
|
||||||
|
// (get) Token: 0x060000F8 RID: 248 RVA: 0x000053F8 File Offset: 0x000035F8
|
||||||
|
public static RoomsList.FeaturedRoomData getFeaturedRooms
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
List<Rooms.RoomPlayPage> list = new List<Rooms.RoomPlayPage>();
|
||||||
|
foreach (KeyValuePair<string, Rooms.RoomDetail> keyValuePair in Rooms.RecRoomOriginalRooms)
|
||||||
|
{
|
||||||
|
Rooms.RoomPlayPage item = new Rooms.RoomPlayPage
|
||||||
|
{
|
||||||
|
RoomName = keyValuePair.Value.Room.Name,
|
||||||
|
RoomId = keyValuePair.Value.Room.RoomId,
|
||||||
|
ImageName = "93a53ced93a04f658795a87f4a4aab85"
|
||||||
|
};
|
||||||
|
list.Add(item);
|
||||||
|
}
|
||||||
|
return new RoomsList.FeaturedRoomData
|
||||||
|
{
|
||||||
|
Name = "Rec Room Originals",
|
||||||
|
FeaturedRooms = list
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Token: 0x17000063 RID: 99
|
||||||
|
// (get) Token: 0x060000F9 RID: 249 RVA: 0x000054BC File Offset: 0x000036BC
|
||||||
|
public static List<Rooms.cRoom> HotRooms
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
List<Rooms.cRoom> list = new List<Rooms.cRoom>();
|
||||||
|
foreach (KeyValuePair<string, Rooms.RoomDetail> keyValuePair in Rooms.RecRoomOriginalRooms)
|
||||||
|
{
|
||||||
|
list.Add(keyValuePair.Value.Room);
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Token: 0x0200002C RID: 44
|
||||||
|
public class FeaturedRoomData
|
||||||
|
{
|
||||||
|
// Token: 0x17000064 RID: 100
|
||||||
|
// (get) Token: 0x060000FB RID: 251 RVA: 0x00002762 File Offset: 0x00000962
|
||||||
|
// (set) Token: 0x060000FC RID: 252 RVA: 0x0000276A File Offset: 0x0000096A
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
// Token: 0x17000065 RID: 101
|
||||||
|
// (get) Token: 0x060000FD RID: 253 RVA: 0x00002773 File Offset: 0x00000973
|
||||||
|
// (set) Token: 0x060000FE RID: 254 RVA: 0x0000277B File Offset: 0x0000097B
|
||||||
|
public List<Rooms.RoomPlayPage> FeaturedRooms { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
1474
RoomsList.cs
Normal file
1474
RoomsList.cs
Normal file
File diff suppressed because it is too large
Load Diff
32
Setup.cs
32
Setup.cs
@@ -10,7 +10,9 @@ namespace start
|
|||||||
{
|
{
|
||||||
public static void setup()
|
public static void setup()
|
||||||
{
|
{
|
||||||
Console.WriteLine("Setting up...");
|
//sets up all the important files so openrec doesnt crash like lame vaultserver xD
|
||||||
|
Console.WriteLine("Setting up... (May take a minute to download everything.)");
|
||||||
|
Directory.CreateDirectory("SaveData\\Images\\");
|
||||||
Directory.CreateDirectory("SaveData\\App\\");
|
Directory.CreateDirectory("SaveData\\App\\");
|
||||||
Directory.CreateDirectory("SaveData\\Profile\\");
|
Directory.CreateDirectory("SaveData\\Profile\\");
|
||||||
if (!(File.Exists("SaveData\\avatar.txt")))
|
if (!(File.Exists("SaveData\\avatar.txt")))
|
||||||
@@ -33,6 +35,14 @@ namespace start
|
|||||||
{
|
{
|
||||||
File.WriteAllText("SaveData\\consumables.txt", new WebClient().DownloadString("https://raw.githubusercontent.com/recroom2016/OpenRec/master/Download/consumables.txt"));
|
File.WriteAllText("SaveData\\consumables.txt", new WebClient().DownloadString("https://raw.githubusercontent.com/recroom2016/OpenRec/master/Download/consumables.txt"));
|
||||||
}
|
}
|
||||||
|
if (!(File.Exists("SaveData\\gameconfigs.txt")))
|
||||||
|
{
|
||||||
|
File.WriteAllText("SaveData\\gameconfigs.txt", new WebClient().DownloadString("https://raw.githubusercontent.com/recroom2016/OpenRec/master/Download/gameconfigs.txt"));
|
||||||
|
}
|
||||||
|
if (!(File.Exists("SaveData\\storefronts2.txt")))
|
||||||
|
{
|
||||||
|
File.WriteAllText("SaveData\\storefronts2.txt", new WebClient().DownloadString("https://raw.githubusercontent.com/recroom2016/vaultButItsNewer/main/StoreFront2.json"));
|
||||||
|
}
|
||||||
if (!(File.Exists("SaveData\\Profile\\username.txt")))
|
if (!(File.Exists("SaveData\\Profile\\username.txt")))
|
||||||
{
|
{
|
||||||
File.WriteAllText("SaveData\\Profile\\username.txt", "DefaultUsername");
|
File.WriteAllText("SaveData\\Profile\\username.txt", "DefaultUsername");
|
||||||
@@ -41,6 +51,10 @@ namespace start
|
|||||||
{
|
{
|
||||||
File.WriteAllText("SaveData\\Profile\\level.txt", "10");
|
File.WriteAllText("SaveData\\Profile\\level.txt", "10");
|
||||||
}
|
}
|
||||||
|
if (!(File.Exists("SaveData\\Profile\\userid.txt")))
|
||||||
|
{
|
||||||
|
File.WriteAllText("SaveData\\Profile\\userid.txt", "2");
|
||||||
|
}
|
||||||
if (!(File.Exists("SaveData\\myrooms.txt")))
|
if (!(File.Exists("SaveData\\myrooms.txt")))
|
||||||
{
|
{
|
||||||
File.WriteAllText("SaveData\\myrooms.txt", "[]");
|
File.WriteAllText("SaveData\\myrooms.txt", "[]");
|
||||||
@@ -49,9 +63,21 @@ namespace start
|
|||||||
{
|
{
|
||||||
File.WriteAllText("SaveData\\settings.txt", Newtonsoft.Json.JsonConvert.SerializeObject(api.Settings.CreateDefaultSettings()));
|
File.WriteAllText("SaveData\\settings.txt", Newtonsoft.Json.JsonConvert.SerializeObject(api.Settings.CreateDefaultSettings()));
|
||||||
}
|
}
|
||||||
if (!(File.Exists("SaveData\\App\\sandbox.txt")))
|
if (!(File.Exists("SaveData\\App\\privaterooms.txt")))
|
||||||
{
|
{
|
||||||
File.WriteAllText("SaveData\\App\\sandbox.txt", "Disabled");
|
File.WriteAllText("SaveData\\App\\privaterooms.txt", "Disabled");
|
||||||
|
}
|
||||||
|
if (!(File.Exists("SaveData\\App\\showopenrecinfo.txt")))
|
||||||
|
{
|
||||||
|
File.WriteAllText("SaveData\\App\\showopenrecinfo.txt", "Enabled");
|
||||||
|
}
|
||||||
|
if (!(File.Exists("SaveData\\App\\facefeaturesadd.txt")))
|
||||||
|
{
|
||||||
|
File.WriteAllText("SaveData\\App\\facefeaturesadd.txt", new WebClient().DownloadString("https://raw.githubusercontent.com/recroom2016/OpenRec/master/Download/facefeaturesadd.txt"));
|
||||||
|
}
|
||||||
|
if (!(File.Exists("SaveData\\Images\\count.txt")))
|
||||||
|
{
|
||||||
|
File.WriteAllText("SaveData\\Images\\count.txt", "0");
|
||||||
}
|
}
|
||||||
if (!(File.Exists("SaveData\\profileimage.png")))
|
if (!(File.Exists("SaveData\\profileimage.png")))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user