Skip to content

Commit

Permalink
Fix minor issues and add new feature
Browse files Browse the repository at this point in the history
- Fixed crash issue that occurred after activating Azazel's speed and returning to the menu
- Added GetAzazelName() function
- Added Rank Spoofer
  • Loading branch information
jadis0x committed Jun 25, 2024
1 parent af76512 commit a462aa0
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 12 deletions.
26 changes: 21 additions & 5 deletions lib/private/ClientHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,16 @@ bool IsSequencePlaying()
// Return false if the object was not found.
if (survival == nullptr) return false;

bool isEndingPlaying = app::Survival_IsEndingPlaying(survival, nullptr);
bool isJumpScarePlaying = app::Survival_IsJumpScarePlaying(survival, nullptr);
bool isStartingToPlayFailEnding = app::Survival_StartingToPlayFailEnding(survival, nullptr);
if (app::Survival_IsEndingPlaying != nullptr || app::Survival_IsJumpScarePlaying != nullptr || app::Survival_StartingToPlayFailEnding != nullptr) {
bool isEndingPlaying = app::Survival_IsEndingPlaying(survival, nullptr);
bool isJumpScarePlaying = app::Survival_IsJumpScarePlaying(survival, nullptr);
bool isStartingToPlayFailEnding = app::Survival_StartingToPlayFailEnding(survival, nullptr);

// Return true if any sequence is playing.
return isEndingPlaying || isJumpScarePlaying || isStartingToPlayFailEnding;
// Return true if any sequence is playing.
return isEndingPlaying || isJumpScarePlaying || isStartingToPlayFailEnding;
}

return false;
}

app::GameObject* GetAzazel(app::Survival* survival)
Expand Down Expand Up @@ -110,6 +114,18 @@ std::string SceneName()
return std::string("");
}

std::string GetAzazelName()
{
if (IsInGame()) {
app::InGameHelpers* inGameHelpers = app::InGameHelpers_get_singleton(nullptr);

if (inGameHelpers)
return il2cppi_to_string(app::InGameHelpers_GetAzazelName(inGameHelpers, nullptr));
}

return std::string("Azazel");
}


float Time_DeltaTime()
{
Expand Down
2 changes: 2 additions & 0 deletions lib/public/ClientHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ bool IsSequencePlaying();
app::GameObject* GetAzazel(app::Survival* survival);

std::string SceneName();
std::string GetAzazelName();

float Time_DeltaTime();
4 changes: 2 additions & 2 deletions user/features/menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -319,15 +319,15 @@ void DrawMiscTab() {
if (ImGui::Button("Make random noise")) {
//Misc::PlayRandomSound();
}
ImGui::Checkbox("Walk in lobby", &settings::walk_in_lobby);
ImGui::Checkbox("Auto respawn", &settings::auto_respawn);
*/

ImGui::Checkbox("Spoof level", &settings::spoof_level);
ImGui::InputInt("New level", &settings::new_level);
*/


ImGui::Checkbox("EXP Modifier", &settings::exp_modifier);
ImGui::SliderInt("Amount", &settings::new_exp, 0, 5000);
Expand Down
5 changes: 1 addition & 4 deletions user/features/misc/misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ void Misc::InstantWin()

std::string _scene = SceneName();

if (_scene == std::string("Menu") && !IsHost() && !Player::GetLocalPlayer()) return;
if (_scene == std::string("Menu") || !IsHost() || !Player::GetLocalPlayer()) return;

int32_t progress = 10;

Expand All @@ -104,7 +104,6 @@ void Misc::InstantWin()
if (_MapController) {

// DO_APP_FUNC(0x00930CD0, void, MapController_SetProgressTo, (MapController * __this, int32_t progress, MethodInfo * method));

if (app::MapController_SetProgressTo != nullptr) {
app::MapController_SetProgressTo(_MapController, progress, nullptr);
}
Expand All @@ -116,7 +115,6 @@ void Misc::InstantWin()
if (_SlaughterhouseAltarController) {

// DO_APP_FUNC(0x0050DEB0, void, SlaughterhouseAltarController_SkipToGoat, (SlaughterhouseAltarController * __this, int32_t number, MethodInfo * method));

if (app::SlaughterhouseAltarController_SkipToGoat != nullptr) {
app::SlaughterhouseAltarController_SkipToGoat(_SlaughterhouseAltarController, progress, nullptr);
}
Expand All @@ -128,7 +126,6 @@ void Misc::InstantWin()

if (_SurvivalObjectBurnController) {
// DO_APP_FUNC(0x00562590, void, SurvivalObjectBurnController_SkipToGoat, (SurvivalObjectBurnController * __this, int32_t number, MethodInfo * method));

if (app::SurvivalObjectBurnController_SkipToGoat != nullptr) {
app::SurvivalObjectBurnController_SkipToGoat(_SurvivalObjectBurnController, progress, nullptr);
}
Expand Down
6 changes: 5 additions & 1 deletion user/hooks/hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ typedef void(__stdcall* TNolanBehaviour_Update)(app::NolanBehaviour*, MethodInfo
TNolanBehaviour_Update oNolanBehaviour_Update = NULL;
void __stdcall hNolanBehaviour_Update(app::NolanBehaviour* __this, MethodInfo* method) {

if (settings::spoof_level && IsLocalPlayer(__this)) {
Misc::RankSpoofer(settings::new_level);
}

if (settings::fly && IsLocalPlayer(__this)) {

float speed = settings::fly_speed;
Expand Down Expand Up @@ -159,7 +163,7 @@ typedef void(__stdcall* TNolanBehaviour_FixedUpdate)(app::NolanBehaviour*, Metho
TNolanBehaviour_FixedUpdate oNolanBehaviour_FixedUpdate = NULL;
void __stdcall hNolanBehaviour_FixedUpdate(app::NolanBehaviour* __this, MethodInfo* method) {

if (settings::freeze_azazel && IsHost()) {
if (settings::freeze_azazel && IsHost() && IsInGame()) {
app::GameObject* goAzazel = __this->fields.m_Survival->fields.m_Azazel;

if (goAzazel) {
Expand Down

0 comments on commit a462aa0

Please sign in to comment.