This repository was archived by the owner on Apr 2, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathCustomRooms.cs
More file actions
229 lines (218 loc) · 9.5 KB
/
CustomRooms.cs
File metadata and controls
229 lines (218 loc) · 9.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
using Newtonsoft.Json;
using vaultgamesesh;
using System.IO;
using server;
using api;
namespace api
{
class CustomRooms
{
public static void RoomDecode(string text)
{
ModernRooms.Root root2 = JsonConvert.DeserializeObject<ModernRooms.Root>(text);
File.WriteAllText("SaveData\\Rooms\\Downloaded\\roomname.txt", root2.Name);
File.WriteAllText("SaveData\\Rooms\\Downloaded\\roomid.txt", Convert.ToString(root2.RoomId));
File.WriteAllText("SaveData\\Rooms\\Downloaded\\datablob.txt", root2.SubRooms[0].DataBlob);
File.WriteAllText("SaveData\\Rooms\\Downloaded\\roomsceneid.txt", root2.SubRooms[0].UnitySceneId);
File.WriteAllText("SaveData\\Rooms\\Downloaded\\imagename.txt", root2.ImageName);
File.WriteAllText("SaveData\\Rooms\\Downloaded\\cheercount.txt", Convert.ToString(root2.Stats.CheerCount));
File.WriteAllText("SaveData\\Rooms\\Downloaded\\favcount.txt", Convert.ToString(root2.Stats.FavoriteCount));
File.WriteAllText("SaveData\\Rooms\\Downloaded\\visitcount.txt", Convert.ToString(root2.Stats.VisitCount));
room = new Room
{
RoomId = 29,
Name = root2.Name,
Description = "OpenRec Downloaded Room",
ImageName = root2.ImageName,
CreatorPlayerId = Convert.ToUInt64(File.ReadAllText("SaveData\\Profile\\userid.txt")),
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 = 29,
RoomSceneLocationId = root2.SubRooms[0].UnitySceneId,
Name = "Home",
IsSandbox = true,
DataBlobName = root2.SubRooms[0].DataBlob,
MaxPlayers = 20,
CanMatchmakeInto = true,
DataModifiedAt = root2.SubRooms[0].DataSavedAt,
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 = root2.Stats.CheerCount,
FavoriteCount = root2.Stats.FavoriteCount,
VisitCount = root2.Stats.VisitCount,
Tags = new List<aTag>
{
new aTag()
{
Tag = "rro",
Type = 2
}
}
};
File.WriteAllText("SaveData\\Rooms\\Downloaded\\RoomDetails.json", JsonConvert.SerializeObject(root));
}
public static void RoomGet(string roomnames)
{
string webdata = new WebClient().DownloadString("https://rooms.rec.net/rooms?name=" + roomnames + "&include=297");
ModernRooms.Root root2 = JsonConvert.DeserializeObject<ModernRooms.Root>(webdata);
room = new Room
{
RoomId = 29,
Name = root2.Name,
Description = "OpenRec Downloaded Room",
ImageName = root2.ImageName,
CreatorPlayerId = Convert.ToUInt64(File.ReadAllText("SaveData\\Profile\\userid.txt")),
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 = 29,
RoomSceneLocationId = root2.SubRooms[0].UnitySceneId,
Name = "Home",
IsSandbox = true,
DataBlobName = root2.SubRooms[0].DataBlob,
MaxPlayers = 20,
CanMatchmakeInto = true,
DataModifiedAt = root2.SubRooms[0].DataSavedAt,
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 = root2.Stats.CheerCount,
FavoriteCount = root2.Stats.FavoriteCount,
VisitCount = root2.Stats.VisitCount,
Tags = new List<aTag>
{
new aTag()
{
Tag = "rro",
Type = 2
}
}
};
File.WriteAllText("SaveData\\Rooms\\Downloaded\\roomname.txt", root2.Name);
File.WriteAllText("SaveData\\Rooms\\Downloaded\\roomid.txt", Convert.ToString(root2.RoomId));
File.WriteAllText("SaveData\\Rooms\\Downloaded\\datablob.txt", root2.SubRooms[0].DataBlob);
File.WriteAllText("SaveData\\Rooms\\Downloaded\\roomsceneid.txt", root2.SubRooms[0].UnitySceneId);
File.WriteAllText("SaveData\\Rooms\\Downloaded\\imagename.txt", root2.ImageName);
File.WriteAllText("SaveData\\Rooms\\Downloaded\\cheercount.txt", Convert.ToString(root2.Stats.CheerCount));
File.WriteAllText("SaveData\\Rooms\\Downloaded\\favcount.txt", Convert.ToString(root2.Stats.FavoriteCount));
File.WriteAllText("SaveData\\Rooms\\Downloaded\\visitcount.txt", Convert.ToString(root2.Stats.VisitCount));
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; }
}
}
}