-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added hitboxes
- Loading branch information
Showing
12 changed files
with
268 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#include "Modules.h" | ||
#include <imgui.h> | ||
#include "../Cache/Cache.h" | ||
|
||
void Ripterms::Modules::FastPlace::run() | ||
{ | ||
if (!enabled || !GetAsyncKeyState(VK_RBUTTON)) return; | ||
if (Ripterms::cache->theMinecraft.getRightClickDelayTimer() == 4) | ||
{ | ||
Ripterms::cache->theMinecraft.setRightClickDelayTimer(tickDelay); | ||
} | ||
} | ||
|
||
void Ripterms::Modules::FastPlace::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("Fast Place", &enabled); | ||
ImGui::PopStyleVar(); | ||
if (ImGui::IsItemClicked(ImGuiMouseButton_Right)) display_options = !display_options; | ||
ImGui::SameLine(); | ||
ImGui::SetCursorPosX(ImGui::GetWindowWidth() - 30.0f); | ||
if (ImGui::ArrowButton("fastplaceopt", ImGuiDir_Down)) display_options = !display_options; | ||
if (display_options) | ||
{ | ||
ImGui::SetCursorPosX(ImGui::GetCursorPosX() + 10.0f); | ||
ImGui::BeginGroup(); | ||
{ | ||
ImGui::SliderInt("Tick Delay", &tickDelay, 0, 3); | ||
} | ||
ImGui::EndGroup(); | ||
} | ||
ImGui::PopStyleVar(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#include "Modules.h" | ||
#include <ImGui/imgui.h> | ||
#include "../../net/minecraft/client/entity/AbstractClientPlayer/AbstractClientPlayer.h" | ||
#include "../Cache/Cache.h" | ||
|
||
void Ripterms::Modules::HitBoxes::run() | ||
{ | ||
static Ripterms::CTimer timer(std::chrono::milliseconds(15)); | ||
if (!enabled || !timer.isElapsed()) | ||
return; | ||
|
||
Ripterms::Maths::Vector3d thePlayer_position = cache->thePlayer.getPosition(); | ||
|
||
for (EntityPlayer& target : cache->playerEntities.toVector<EntityPlayer>()) | ||
{ | ||
if | ||
( | ||
target.isEqualTo(cache->thePlayer) || | ||
(target.getPosition() - thePlayer_position).distance() > 9.0f | ||
) | ||
continue; | ||
|
||
AxisAlignedBB target_bb = target.getBoundingBox(); | ||
if | ||
( | ||
(target_bb.getMaxX() - target_bb.getMinX()) > 0.61f || | ||
(target_bb.getMaxY() - target_bb.getMinY()) > 1.81f | ||
) | ||
continue; | ||
|
||
target_bb.setMinX(target_bb.getMinX() - x_expand); | ||
target_bb.setMaxX(target_bb.getMaxX() + x_expand); | ||
target_bb.setMinZ(target_bb.getMinZ() - x_expand); | ||
target_bb.setMaxZ(target_bb.getMaxZ() + x_expand); | ||
|
||
target_bb.setMinY(target_bb.getMinY() - y_expand); | ||
target_bb.setMaxY(target_bb.getMaxY() + y_expand); | ||
} | ||
} | ||
|
||
void Ripterms::Modules::HitBoxes::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("HitBoxes", &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("hbopt", ImGuiDir_Down)) display_options = !display_options; | ||
if (display_options) { | ||
ImGui::SetCursorPosX(ImGui::GetCursorPosX() + 10.0f); | ||
ImGui::BeginGroup(); | ||
ImGui::SliderFloat("X Expand", &x_expand, 0.01f, 2.0f, "%.01f"); | ||
ImGui::SliderFloat("Y Expand", &y_expand, 0.01f, 2.0f, "%.01f"); | ||
ImGui::EndGroup(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#include "Modules.h" | ||
#include <ImGui/imgui.h> | ||
#include "../Cache/Cache.h" | ||
|
||
void Ripterms::Modules::Sprint::run() | ||
{ | ||
if (!enabled) | ||
return; | ||
cache->gameSettings.getKeyBindSprint().setPressed(true); | ||
} | ||
|
||
void Ripterms::Modules::Sprint::renderGUI() | ||
{ | ||
ImGui::PushStyleVar(ImGuiStyleVar_ItemInnerSpacing, ImVec2(20.0f, 0.0f)); | ||
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(250.0f, ImGui::GetStyle().FramePadding.y)); | ||
ImGui::Checkbox("Sprint", &enabled); | ||
ImGui::PopStyleVar(); | ||
ImGui::PopStyleVar(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#include "Modules.h" | ||
#include "../../net/minecraft/client/Minecraft/Minecraft.h" | ||
#include <imgui.h> | ||
|
||
void Ripterms::Modules::WTap::onEvent(Ripterms::Event* event) | ||
{ | ||
static int ticks = 10; | ||
|
||
if (!enabled) | ||
return; | ||
|
||
if (event->type == Ripterms::Event::Type::PRE_ATTACK) | ||
{ | ||
ticks = 0; | ||
} | ||
else if (event->type == Event::Type::PRE_MOTION) | ||
{ | ||
++ticks; | ||
EntityPlayerSP thePlayer = Minecraft::getTheMinecraft(event->env).getThePlayer(); | ||
if (thePlayer.isSprinting()) | ||
{ | ||
if (ticks == 2) thePlayer.setSprinting(false); | ||
if (ticks == 3) thePlayer.setSprinting(true); | ||
} | ||
} | ||
} | ||
|
||
void Ripterms::Modules::WTap::renderGUI() | ||
{ | ||
ImGui::PushStyleVar(ImGuiStyleVar_ItemInnerSpacing, ImVec2(20.0f, 0.0f)); | ||
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(250.0f, ImGui::GetStyle().FramePadding.y)); | ||
ImGui::Checkbox("WTap", &enabled); | ||
ImGui::PopStyleVar(); | ||
ImGui::PopStyleVar(); | ||
} |
Oops, something went wrong.