Skip to content

Commit 88a3828

Browse files
committed
Final fixes
2 parents b1c4e51 + cc43ae9 commit 88a3828

File tree

4 files changed

+39
-5
lines changed

4 files changed

+39
-5
lines changed

gui/tabs/game_tab.cpp

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -435,13 +435,21 @@ namespace GameTab {
435435
if (IsInLobby() && ToggleButton("Crash Server", &State.CrashSpamReport)) {
436436
State.Save();
437437
}
438-
if (IsInLobby()) ImGui::TextColored(ImVec4(1.0f, 1.0f, 1.0f, 1.0f), ("Server crashes after starting a game-match!\nMay be hard ping in lobby"));
439-
438+
{
439+
if (IsInLobby()) ImGui::TextColored(ImVec4(1.0f, 1.0f, 1.0f, 1.0f), ("Server crashes after starting a game-match!\nMay be hard ping in lobby"));
440+
ImGui::Dummy(ImVec2(5, 5)* State.dpiScale);
441+
}
440442
if (IsInGame() && ToggleButton("Attempt to Crash", &State.UltimateSpamReport)) {
441443
State.Save();
442444
}
443-
if (IsInGame()) ImGui::TextColored(ImVec4(1.0f, 1.0f, 1.0f, 1.0f), ("Alternate Crash Server!\nMay cause game crashing!\nMay work with delay!"));
444-
445+
{
446+
if (IsInGame()) ImGui::TextColored(ImVec4(1.0f, 1.0f, 1.0f, 1.0f), ("Alternate Crash Server!\nMay cause game crashing!\nMay work with delay!"));
447+
ImGui::Dummy(ImVec2(5, 5) * State.dpiScale);
448+
}
449+
if (IsInMultiplayerGame() || IsInLobby()) (ToggleButton("Crash Chat Spam", &State.CrashChatSpam));
450+
{
451+
if (IsInMultiplayerGame() || IsInLobby()) ImGui::TextColored(ImVec4(1.0f, 1.0f, 1.0f, 1.0f), ("Upgraded [Spam Blank Chat as {Everyone}] Exploit")); State.Save();
452+
}
445453
/*ImGui::Dummy(ImVec2(10, 10)* State.dpiScale);
446454
if (IsInLobby() || IsInGame) ToggleButton("Destroy Game Logic", &State.SpoofCrashLevel) && (!State.SpoofLevel); {
447455
if (State.SpoofCrashLevel) ImGui::TextColored(ImVec4(1.0f, 0.0f, 0.0f, 1.0f), ("Zero Level = Crash Server"));

hooks/Chat.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,11 @@ void dChatController_Update(ChatController* __this, MethodInfo* method)
259259
//remove rpc queue stuff cuz of delay and anticheat kick
260260
State.MessageSent = true;
261261
}
262+
if (!State.PanicMode && State.SafeMode && State.CrashChatSpam && (State.ChatSpamMode == 0 || State.ChatSpamMode == 2) && (IsInGame() || IsInLobby()) && __this->fields.timeSinceLastMessage >= 3.5f) {
263+
PlayerControl_RpcSendChat(*Game::pLocalPlayer, convert_to_string(State.chatMessage), NULL);
264+
//remove rpc queue stuff cuz of delay and anticheat kick
265+
State.MessageSent = true;
266+
}
262267

263268

264269
ChatController_Update(__this, method);

hooks/PlayerControl.cpp

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ void dPlayerControl_FixedUpdate(PlayerControl* __this, MethodInfo* method) {
447447
}
448448
}
449449
if (State.ChatSpam && (IsInGame() || IsInLobby())) {
450-
static float spamDelay = 0;
450+
static float spamDelay = 15;
451451
auto player = !State.SafeMode && State.playerToChatAs.has_value() ? State.playerToChatAs.validate().get_PlayerControl() : *Game::pLocalPlayer;
452452
for (auto p : GetAllPlayerControl()) {
453453
if (p == player || State.ChatSpamEveryone) {
@@ -465,6 +465,25 @@ void dPlayerControl_FixedUpdate(PlayerControl* __this, MethodInfo* method) {
465465
}
466466
}
467467

468+
if (State.CrashChatSpam && (IsInGame() || IsInLobby())) {
469+
static float spamDelay = 0;
470+
auto player = !State.SafeMode && State.playerToChatAs.has_value() ? State.playerToChatAs.validate().get_PlayerControl() : *Game::pLocalPlayer;
471+
for (auto p : GetAllPlayerControl()) {
472+
if (p == player || State.CrashChatSpam) {
473+
if (!State.SafeMode && (State.CrashChatSpamMode == 1 || State.CrashChatSpamMode == 1)) {
474+
auto writer = InnerNetClient_StartRpcImmediately((InnerNetClient*)(*Game::pAmongUsClient), player->fields._.NetId,
475+
uint8_t(RpcCalls__Enum::SendChat), SendOption__Enum::None, -1, NULL);
476+
MessageWriter_WriteString(writer, convert_to_string(State.chatMessage), NULL);
477+
InnerNetClient_FinishRpcImmediately((InnerNetClient*)(*Game::pAmongUsClient), writer, NULL);
478+
ChatController_AddChat(Game::HudManager.GetInstance()->fields.Chat, player, convert_to_string(State.chatMessage), false, NULL);
479+
}
480+
else if (State.CrashChatSpamMode == 1 || State.CrashChatSpamMode == 1) {
481+
PlayerControl_RpcSendChatNote(player, p->fields.PlayerId, (ChatNoteTypes__Enum)2, NULL);
482+
}
483+
}
484+
}
485+
}
486+
468487
if ((IsHost() || !State.SafeMode) && State.ForceColorForEveryone)
469488
{
470489
static float forceColorDelay = 0;

user/state.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,10 @@ class Settings {
101101
int GameMode = 0;
102102
bool NoGameEnd = false;
103103
bool ChatSpam = false;
104+
bool CrashChatSpam = false;
104105
bool ChatSpamEveryone = false;
105106
int ChatSpamMode = 0;
107+
int CrashChatSpamMode = 1;
106108
bool AutoJoinLobby = false;
107109
std::string AutoJoinLobbyCode = "";
108110

0 commit comments

Comments
 (0)