Skip to content

Commit

Permalink
Merge pull request #83 from Lefraudeur/dev
Browse files Browse the repository at this point in the history
added backtrack
  • Loading branch information
Lefraudeur authored Feb 23, 2024
2 parents 2da33c6 + 7595412 commit 0fc3b47
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 3 deletions.
1 change: 1 addition & 0 deletions Ripterms Ghost.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@
<ClCompile Include="Ripterms\JavaClass\JavaClassV2.cpp" />
<ClCompile Include="Ripterms\Maths\Maths.cpp" />
<ClCompile Include="Ripterms\Modules\AimAssist.cpp" />
<ClCompile Include="Ripterms\Modules\BackTrack.cpp" />
<ClCompile Include="Ripterms\Modules\Blink.cpp" />
<ClCompile Include="Ripterms\Modules\ClientBrandChanger.cpp" />
<ClCompile Include="Ripterms\Modules\FastPlace.cpp" />
Expand Down
3 changes: 3 additions & 0 deletions Ripterms Ghost.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,9 @@
<ClCompile Include="Ripterms\Modules\Speed.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="Ripterms\Modules\BackTrack.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Ripterms\Ripterms.h">
Expand Down
46 changes: 46 additions & 0 deletions Ripterms/Modules/BackTrack.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#include "Modules.h"
#include "../Cache/Cache.h"

void Ripterms::Modules::BackTrack::renderGUI()
{
static bool display_options = false;
ImGui::PushStyleVar(ImGuiStyleVar_ItemInnerSpacing, ImVec2(20.0f, 0.0f));
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(250.0f, ImGui::GetStyle().FramePadding.y));
ImGui::Checkbox("BackTrack", &enabled);
ImGui::PopStyleVar();
ImGui::PopStyleVar();
if (ImGui::IsItemClicked(ImGuiMouseButton_Right))
display_options = !display_options;
ImGui::SameLine();
ImGui::SetCursorPosX(ImGui::GetWindowWidth() - 30.0f);
if (ImGui::ArrowButton("BackTrackopt", ImGuiDir_Down))
display_options = !display_options;
if (display_options)
{
ImGui::SetCursorPosX(ImGui::GetCursorPosX() + 10.0f);
ImGui::BeginGroup();
ImGui::SliderFloat("PartialTicks in advance", &partialTicks, 0.01f, 2.0f, "%.2f");
ImGui::EndGroup();
}
}

void Ripterms::Modules::BackTrack::run()
{
if (!enabled) return;
static Ripterms::CTimer timer = std::chrono::milliseconds(10);
if (!timer.isElapsed())
return;

for (EntityPlayer& player : Ripterms::cache->playerEntities.toVector<EntityPlayer>())
{
if (player.isEqualTo(Ripterms::cache->thePlayer)) continue;
Ripterms::Maths::Vector3d vector = player.getMovementVector(partialTicks);
AxisAlignedBB bb = player.getBoundingBox();
Ripterms::Maths::Vector3d minbb(bb.getMinX(), bb.getMinY(), bb.getMinZ());
Ripterms::Maths::Vector3d maxbb(bb.getMaxX(), bb.getMaxY(), bb.getMaxZ());
minbb = minbb - vector;
maxbb = maxbb - vector;
bb.setMinX(minbb.x); bb.setMinY(minbb.y); bb.setMinZ(minbb.z);
bb.setMaxX(maxbb.x); bb.setMaxY(maxbb.y); bb.setMaxZ(maxbb.z);
}
}
15 changes: 12 additions & 3 deletions Ripterms/Modules/Modules.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ namespace Ripterms
class Xray : public IModule
{
public:
Xray() { this->keyBind = 0x58; };
//Xray() { this->keyBind = 0x58; };
void renderGUI() override;
void render() override;
void disable() override;
Expand Down Expand Up @@ -237,7 +237,7 @@ namespace Ripterms
class Glide : public IModule
{
public:
Glide() { this->keyBind = 0x47; };
//Glide() { this->keyBind = 0x47; };
void renderGUI() override;
void onUpdateWalkingPlayer(JNIEnv* env, EntityPlayerSP& this_player, bool* cancel) override;
};
Expand All @@ -260,9 +260,18 @@ namespace Ripterms
float speed = 0.1f;
};

class BackTrack : public IModule
{
public:
void renderGUI() override;
void run() override;
private:
float partialTicks = 1.0f;
};

inline std::map<std::string, std::vector<IModule*>> categories =
{
{"Combat", {new AimAssist(), new Reach(), new LeftClicker(), new WTap(), new HitBoxes()}},
{"Combat", {new AimAssist(), new Reach(), new LeftClicker(), new WTap(), new HitBoxes(), new BackTrack()}},
{"Player", {new FastPlace(), new Blink(), new LegitScaffold(), new NoFall()}},
{"Movement", {new Velocity(), new Sprint(), new Glide(), new VelocityFly(), new Speed()}},
{"Render", {new Xray(), new FullBright(), new ESP()}},
Expand Down

0 comments on commit 0fc3b47

Please sign in to comment.