Skip to content

Commit 64d87e2

Browse files
committed
Allow guest accounts to be used in quick chat lobbies
1 parent c84c94d commit 64d87e2

File tree

5 files changed

+33
-32
lines changed

5 files changed

+33
-32
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<img src="SickoBanner.png">
33
</p>
44

5-
<h1 align="center">👺 SickoMenu v4.3</h1>
5+
<h1 align="center">👺 SickoMenu v4.3.1</h1>
66
A powerful utility for Among Us designed to enrich your game experience with custom features!
77

88
**⚠️ Intended for educational and experimental use only.**

gui/tabs/settings_tab.cpp

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -297,36 +297,39 @@ namespace SettingsTab {
297297
if (CustomListBoxInt(" ", &State.BroadcastedMod, MODS, 100.f * State.dpiScale)) State.Save();
298298
}
299299
if (openSpoofing) {
300-
if (ToggleButton("Spoof Guest Account", &State.SpoofGuestAccount)) {
300+
/*if (ToggleButton("Spoof Guest Account", &State.SpoofGuestAccount)) {
301301
State.Save();
302302
}
303303
if (State.SpoofGuestAccount) {
304304
ImGui::SameLine();
305-
if (ToggleButton("Use Custom Guest Friend Code", &State.UseGuestFriendCode)) {
305+
if (ToggleButton("Use Custom Guest Friend Code", &State.UseNewFriendCode)) {
306306
State.Save();
307307
}
308-
if (State.UseGuestFriendCode) {
309-
if (InputString("Guest Friend Code", &State.GuestFriendCode)) {
308+
if (State.UseNewFriendCode) {
309+
if (InputString("Guest Friend Code", &State.NewFriendCode)) {
310310
State.Save();
311311
}
312312
ImGui::Text("Guest friend code should be <= 10 characters long and cannot have a hashtag.");
313313
}
314314
ImGui::TextColored(ImVec4(0.f, 1.f, 0.f, 1.f), "Pro Tip: You can bypass the free chat restriction using a space after your custom friend");
315315
ImGui::TextColored(ImVec4(0.f, 1.f, 0.f, 1.f), "code!");
316-
317-
/*if (ToggleButton("Use Custom Guest PUID", &State.UseGuestPuid)) {
318-
State.Save();
319-
}
320-
if (State.UseGuestPuid) {
321-
ImGui::SameLine();
322-
if (InputString("Guest PUID", &State.GuestPuid)) {
323-
State.Save();
324-
}
325-
}*/
326-
}
316+
}*/
327317
/*if (ImGui::Button("Force Login as Guest")) {
328318
State.ForceLoginAsGuest = true;
329319
}*/
320+
if (ToggleButton("Spoof Guest Account (Quick Chat ONLY)", &State.SpoofGuestAccount)) {
321+
State.Save();
322+
}
323+
if (ToggleButton("Use Custom Friend Code (For New/Guest Account ONLY)", &State.UseNewFriendCode)) {
324+
State.Save();
325+
}
326+
if (State.UseNewFriendCode) {
327+
ImGui::SetNextItemWidth(150 * State.dpiScale); // Adjust the width of the input box
328+
if (InputString("Friend Code (For New/Guest Account ONLY)", &State.NewFriendCode)) {
329+
State.Save();
330+
}
331+
ImGui::Text("This new friend code should be <= 10 characters long and cannot have spaces.");
332+
}
330333
if (ToggleButton("Spoof Level", &State.SpoofLevel)) {
331334
State.Save();
332335
}

hooks/EOSManager.cpp

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include "logger.h"
44
#include "state.hpp"
55

6-
static bool isRestrictedGuestAccount = false;
6+
static bool isGuestAccount = false;
77

88
void fakeSuccessfulLogin(EOSManager* eosManager)
99
{
@@ -27,7 +27,7 @@ void dEOSManager_StartInitialLoginFlow(EOSManager* __this, MethodInfo* method) {
2727
return;
2828
}
2929
EOSManager_StartTempAccountFlow(__this, method);
30-
isRestrictedGuestAccount = true;
30+
isGuestAccount = true;
3131
EOSManager_CloseStartupWaitScreen(__this, method);
3232
}
3333

@@ -51,14 +51,14 @@ void dEOSManager_InitializePlatformInterface(EOSManager* __this, MethodInfo* met
5151

5252
bool dEOSManager_IsFreechatAllowed(EOSManager* __this, MethodInfo* method)
5353
{
54-
bool ret = !isRestrictedGuestAccount || IsInGame() || IsInLobby();
54+
bool ret = !isGuestAccount || IsInGame() || IsInLobby();
5555
if (State.ShowHookLogs) LOG_DEBUG("Hook dEOSManager_IsFreechatAllowed executed");
5656
return ret;
5757
}
5858

5959
QuickChatModes__Enum dMultiplayerSettingsData_get_ChatMode(MultiplayerSettingsData* __this, QuickChatModes__Enum value, MethodInfo* method) {
6060
if (IsInGame() || IsInLobby()) return QuickChatModes__Enum::FreeChatOrQuickChat;
61-
return !isRestrictedGuestAccount || IsInGame() || IsInLobby() ? MultiplayerSettingsData_get_ChatMode(__this, value, method) : QuickChatModes__Enum::QuickChatOnly;
61+
return !isGuestAccount || IsInGame() || IsInLobby() ? MultiplayerSettingsData_get_ChatMode(__this, value, method) : QuickChatModes__Enum::QuickChatOnly;
6262
}
6363

6464
bool dEOSManager_IsFriendsListAllowed(EOSManager* __this, MethodInfo* method)
@@ -173,14 +173,13 @@ void dPlatformSpecificData_Serialize(PlatformSpecificData* __this, MessageWriter
173173

174174
void dEditAccountUsername_SaveUsername(EditAccountUsername* __this, MethodInfo* method) {
175175
if (State.ShowHookLogs) LOG_DEBUG("Hook dEditAccountUsername_SaveUsername executed");
176-
if (State.UseGuestFriendCode && State.GuestFriendCode != "") {
176+
if (State.UseNewFriendCode && State.NewFriendCode != "") {
177177
std::string newFriendCode = "";
178-
for (auto i : State.GuestFriendCode) {
179-
newFriendCode += tolower(i);
178+
for (auto i : State.NewFriendCode) {
180179
if (newFriendCode.ends_with(" ")) {
181-
isRestrictedGuestAccount = false;
182180
break;
183181
}
182+
newFriendCode += tolower(i);
184183
}
185184
TMP_Text_set_text((TMP_Text*)__this->fields.UsernameText, convert_to_string(newFriendCode), NULL);
186185
}
@@ -201,7 +200,6 @@ void dEditAccountUsername_SaveUsername(EditAccountUsername* __this, MethodInfo*
201200
}
202201
TMP_Text_set_text((TMP_Text*)__this->fields.UsernameText, convert_to_string(newFriendCode), NULL);
203202
}
204-
isRestrictedGuestAccount = true;
205203
}
206204
EditAccountUsername_SaveUsername(__this, method);
207205
}

user/state.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
Settings State;
1010

1111
void Settings::Load() {
12-
this->SickoVersion = "v4.3";
12+
this->SickoVersion = "v4.3.1";
1313

1414
auto path = getModulePath(hModule);
1515
auto configPath = path.parent_path() / "sicko-selected-config.json";
@@ -84,10 +84,10 @@ void Settings::Load() {
8484
JSON_TRYGET("SpoofLevel", this->SpoofLevel);
8585
JSON_TRYGET("FakeLevel", this->FakeLevel);
8686
JSON_TRYGET("SpoofFriendCode", this->SpoofFriendCode);
87-
JSON_TRYGET("UseGuestFriendCode", this->UseGuestFriendCode);
87+
JSON_TRYGET("UseNewFriendCode", this->UseNewFriendCode);
8888
//JSON_TRYGET("GuestPuid", this->GuestPuid);
8989
//JSON_TRYGET("UseGuestPuid", this->UseGuestPuid);
90-
JSON_TRYGET("GuestFriendCode", this->GuestFriendCode);
90+
JSON_TRYGET("NewFriendCode", this->NewFriendCode);
9191
JSON_TRYGET("FakeFriendCode", this->FakeFriendCode);
9292
JSON_TRYGET("SpoofPlatform", this->SpoofPlatform);
9393
JSON_TRYGET("FakePlatform", this->FakePlatform);
@@ -413,8 +413,8 @@ void Settings::Save() {
413413
{ "SpoofLevel", this->SpoofLevel },
414414
{ "FakeLevel", this->FakeLevel },
415415
{ "SpoofFriendCode", this->SpoofFriendCode },
416-
{ "UseGuestFriendCode", this->UseGuestFriendCode },
417-
{ "GuestFriendCode", this->GuestFriendCode },
416+
{ "UseNewFriendCode", this->UseNewFriendCode },
417+
{ "NewFriendCode", this->NewFriendCode },
418418
//{ "UseGuestPuid", this->UseGuestPuid },
419419
//{ "GuestPuid", this->GuestPuid },
420420
{ "FakeFriendCode", this->FakeFriendCode },

user/state.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ class Settings {
5555
bool ShowKeybinds = true;
5656
bool KeybindsWhileChatting = true;
5757
bool SpoofFriendCode = false;
58-
bool UseGuestFriendCode = false;
58+
bool UseNewFriendCode = false;
5959
bool UseGuestPuid = false;
60-
std::string GuestFriendCode = "";
60+
std::string NewFriendCode = "";
6161
std::string FakeFriendCode = "";
6262
std::string GuestPuid = "";
6363
std::string FakePuid = "";

0 commit comments

Comments
 (0)