diff --git a/cheat-library/cheat-library.vcxproj b/cheat-library/cheat-library.vcxproj index ab88e3d..4dafbd1 100644 --- a/cheat-library/cheat-library.vcxproj +++ b/cheat-library/cheat-library.vcxproj @@ -16,6 +16,7 @@ + false @@ -118,6 +119,7 @@ + false diff --git a/cheat-library/cheat-library.vcxproj.filters b/cheat-library/cheat-library.vcxproj.filters index 5f3f132..b44f723 100644 --- a/cheat-library/cheat-library.vcxproj.filters +++ b/cheat-library/cheat-library.vcxproj.filters @@ -237,6 +237,9 @@ Header Files + + Header Files + @@ -432,6 +435,9 @@ Source Files + + Source Files + diff --git a/cheat-library/src/user/cheat/cheat.cpp b/cheat-library/src/user/cheat/cheat.cpp index e08d1f1..044080d 100644 --- a/cheat-library/src/user/cheat/cheat.cpp +++ b/cheat-library/src/user/cheat/cheat.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -83,12 +84,14 @@ namespace cheat FEAT_INST(AutoLoot), FEAT_INST(AutoTreeFarm), FEAT_INST(AutoDestroy), + FEAT_INST(AutoSeelie), FEAT_INST(DialogSkip), FEAT_INST(DumbEnemies), FEAT_INST(ElementalSight), FEAT_INST(KillAura), FEAT_INST(MobVacuum), FEAT_INST(FakeTime), + FEAT_INST(ChestTeleport), FEAT_INST(OculiTeleport), diff --git a/cheat-library/src/user/cheat/world/AutoSeelie.cpp b/cheat-library/src/user/cheat/world/AutoSeelie.cpp new file mode 100644 index 0000000..62e139c --- /dev/null +++ b/cheat-library/src/user/cheat/world/AutoSeelie.cpp @@ -0,0 +1,83 @@ +#include "pch-il2cpp.h" +#include "AutoSeelie.h" + +#include +#include +#include +#include + +namespace cheat::feature +{ + AutoSeelie::AutoSeelie() : Feature(), + NF(f_Enabled, "Auto follow seelie", "AutoSeelie", false) + + { + events::GameUpdateEvent += MY_METHOD_HANDLER(AutoSeelie::OnGameUpdate); + } + const FeatureGUIInfo& AutoSeelie::GetGUIInfo() const + { + static const FeatureGUIInfo info{ "", "World", true }; + return info; + } + + void AutoSeelie::DrawMain() + { + ConfigWidget("Auto seelie", f_Enabled, "Auto follow seelie to it home"); + ImGui::SameLine(); + ImGui::TextColored(ImColor(255, 165, 0, 255), "Don't work with Electro Seelies"); + } + + bool AutoSeelie::NeedStatusDraw() const + { + return f_Enabled; + } + + void AutoSeelie::DrawStatus() + { + ImGui::Text ("AutoSeelie"); + } + + AutoSeelie& AutoSeelie::GetInstance() + { + static AutoSeelie instance; + return instance; + } + + bool AutoSeelie::IsEntityForVac(game::Entity* entity) + { + auto& manager = game::EntityManager::instance(); + auto distance = manager.avatar()->distance(entity); + float radius = 100.0f; + + if (entity->name().find("Gear_Seelie") != std::string::npos || entity->name().find("_FireSeelie") != std::string::npos || + entity->name().find("_LitSeelie") != std::string::npos) + { + return distance <= radius; + } + + return false; + } + + + void AutoSeelie::OnGameUpdate() + { + if (!f_Enabled) + return; + + auto currentTime = util::GetCurrentTimeMillisec(); + if (currentTime < nextTime) + return; + + auto& manager = game::EntityManager::instance(); + auto avatarEntity = manager.avatar(); + for (const auto& entity : manager.entities()) + { + if (!IsEntityForVac(entity)) + continue; + + entity->setRelativePosition(avatarEntity->relativePosition()); + } + nextTime = currentTime + 1000; + } + +} \ No newline at end of file diff --git a/cheat-library/src/user/cheat/world/AutoSeelie.h b/cheat-library/src/user/cheat/world/AutoSeelie.h new file mode 100644 index 0000000..0b02057 --- /dev/null +++ b/cheat-library/src/user/cheat/world/AutoSeelie.h @@ -0,0 +1,33 @@ +#pragma once +#include +#include + +#include +#include +#include + +namespace cheat::feature +{ + + class AutoSeelie : public Feature + { + public: + config::Field> f_Enabled; + + static AutoSeelie& GetInstance(); + + const FeatureGUIInfo& GetGUIInfo() const override; + void DrawMain() override; + + virtual bool NeedStatusDraw() const override; + void DrawStatus() override; + + void OnGameUpdate(); + private: + + std::vector m_Filters; + AutoSeelie(); + int nextTime{}; + bool IsEntityForVac(cheat::game::Entity* entity); + }; +} diff --git a/cheat-library/vendor/protobuf b/cheat-library/vendor/protobuf new file mode 160000 index 0000000..6f99f12 --- /dev/null +++ b/cheat-library/vendor/protobuf @@ -0,0 +1 @@ +Subproject commit 6f99f12a6b3e2a38f444d9d052eb29822f885913