Skip to content

Commit

Permalink
Add more autoclicker settings, and remove .idea
Browse files Browse the repository at this point in the history
  • Loading branch information
SomePineaple committed Apr 7, 2022
1 parent fd76d6c commit ef31453
Show file tree
Hide file tree
Showing 13 changed files with 29 additions and 230 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/cmake-build-debug
/.idea
1 change: 0 additions & 1 deletion .idea/.name

This file was deleted.

2 changes: 0 additions & 2 deletions .idea/Phantom.iml

This file was deleted.

4 changes: 0 additions & 4 deletions .idea/misc.xml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

189 changes: 0 additions & 189 deletions .idea/workspace.xml

This file was deleted.

16 changes: 8 additions & 8 deletions src/cheats/AimAssist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@ void AimAssist::run(Minecraft *mc) {
}

void AimAssist::renderSettings() {
ImGui::SliderFloat("AimAssist: range", &range, 0, 6, "%.2f");
ImGui::SliderFloat("AimAssist: FOV", &fov, 0, 180, "%.1f");
ImGui::SliderFloat("AimAssist: hSpeed", &hSpeed, 0, 100, "%.2f");
ImGui::SliderFloat("AimAssist: vSpeed", &vSpeed, 0, 100, "%.2f");
ImGui::Checkbox("AimAssist: Only while clicking", &onlyOnClick);
ImGui::Checkbox("AimAssist: Teams Check", &teams);
ImGui::Checkbox("AimAssist: Center", &center);
ImGui::Checkbox("AimAssist: Target Dead", &dead);
ImGui::SliderFloat("range", &range, 0, 6, "%.2f");
ImGui::SliderFloat("FOV", &fov, 0, 180, "%.1f");
ImGui::SliderFloat("hSpeed", &hSpeed, 0, 100, "%.2f");
ImGui::SliderFloat("vSpeed", &vSpeed, 0, 100, "%.2f");
ImGui::Checkbox("Only while clicking", &onlyOnClick);
ImGui::Checkbox("Teams Check", &teams);
ImGui::Checkbox("Center", &center);
ImGui::Checkbox("Target Dead", &dead);
}

bool AimAssist::isInFOV(EntityPlayer *entity, Minecraft *mc, float fov) {
Expand Down
2 changes: 1 addition & 1 deletion src/cheats/AimBot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@ void AimBot::run(Minecraft *mc) {
}

void AimBot::renderSettings() {
ImGui::SliderFloat("AimBot: range", &range, 0, 6);
ImGui::SliderFloat("range", &range, 0, 6);
}
22 changes: 13 additions & 9 deletions src/cheats/AutoClicker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "../vendor/imgui/imgui.h"
#include "../utils/XUtils.h"

AutoClicker::AutoClicker() : Cheat("AutoClicker", "Does mouse clicky thingy") {
AutoClicker::AutoClicker() : Cheat("AutoClicker", "Clicks 4 u (so ur hand doesn't break)") {
cps = 12;
onlyInGame = true;

Expand All @@ -23,6 +23,7 @@ AutoClicker::AutoClicker() : Cheat("AutoClicker", "Does mouse clicky thingy") {
dropChance = 0.3;
spikeChance = 0.2;
holdLength = 0.25;
holdLengthRandom = 0;
isSpiking = false;
isDropping = false;
showAdvanced = false;
Expand Down Expand Up @@ -51,7 +52,7 @@ void AutoClicker::run(Minecraft *mc) {
clickTimer->reset();
updateValues();
// Click in new detached thread so the delay doesn't affect other modules and frame times
std::thread(XUtils::clickMouseXEvent, 1, (int) ((float) nextDelay * holdLength)).detach();
std::thread(XUtils::clickMouseXEvent, 1, (int) ((float) nextDelay * holdLength * MathHelper::randFloat(1 - holdLengthRandom, 1 + holdLengthRandom))).detach();
}
} else {
clickTimer->reset();
Expand All @@ -63,22 +64,25 @@ void AutoClicker::run(Minecraft *mc) {
}

void AutoClicker::renderSettings() {
ImGui::SliderFloat("AutoClicker: CPS", &cps, 4, 20);
ImGui::Checkbox("AutoClicker: Only in game", &onlyInGame);
ImGui::SliderFloat("CPS", &cps, 4, 20);
ImGui::Checkbox("Only in game", &onlyInGame);
ImGui::SameLine();
ImGuiUtils::drawHelper("If checked, this will only click when you are in game, otherwise, this will click "
"anytime, on any window. You could go to clickspeedtest.net and check ur clicking speed if "
"this is not checked");
ImGui::Checkbox("AutoClicker: Advanced Mode", &showAdvanced);
ImGui::Checkbox("Advanced Mode", &showAdvanced);
if (showAdvanced) {
ImGui::SliderInt("AutoClicker: Event Delay", &eventDelay, 0, 10000);
ImGui::SliderInt("Event Delay", &eventDelay, 0, 10000);
ImGui::SameLine();
ImGuiUtils::drawHelper("How long between switching from regular to spiking to dropping in milliseconds");
ImGui::SliderFloat("AutoClicker: Spike Chance", &spikeChance, 0.0, 1.0);
ImGui::SliderFloat("AutoClicker: Drop Chance", &dropChance, 0.0, 1.0);
ImGui::SliderFloat("AutoClicker: Hold Length", &holdLength, 0.0, 0.99);
ImGui::SliderFloat("Spike Chance", &spikeChance, 0.0, 1.0);
ImGui::SliderFloat("Drop Chance", &dropChance, 0.0, 1.0);
ImGui::SliderFloat("Hold Length", &holdLength, 0.0, 0.99);
ImGui::SameLine();
ImGuiUtils::drawHelper("How long to hold the button down for in terms of the delay before the next click");
ImGui::SliderFloat("Hold Length Random", &holdLengthRandom, 0.0, 0.5);
ImGui::SameLine();
ImGuiUtils::drawHelper("Add extra randomness to hold length");
}
}

Expand Down
1 change: 1 addition & 0 deletions src/cheats/AutoClicker.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class AutoClicker : public Cheat {

float cps;
float holdLength;
float holdLengthRandom;
bool onlyInGame;
bool showAdvanced;

Expand Down
3 changes: 2 additions & 1 deletion src/cheats/Reach.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ Reach::Reach(Phantom *phantom) : Cheat("Reach", "Long arm hack") {
}

void Reach::renderSettings() {
ImGui::SliderFloat("Reach: Reach", &reach, 3, 6);
ImGui::SliderFloat("Reach", &reach, 3, 6);
}

// This is basically a copy of how minecraft calculates what block your looking at, but with modified reach values.
void Reach::run(Minecraft *mc) {
if (!enabled)
return;
Expand Down
4 changes: 3 additions & 1 deletion src/vendor/imgui/imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11654,6 +11654,8 @@ void ImGui::LoadIniSettingsFromMemory(const char* ini_data, size_t ini_size)

void ImGui::SaveIniSettingsToDisk(const char* ini_filename)
{
// TODO Commented out imgui config saving
/*
ImGuiContext& g = *GImGui;
g.SettingsDirtyTimer = 0.0f;
if (!ini_filename)
Expand All @@ -11665,7 +11667,7 @@ void ImGui::SaveIniSettingsToDisk(const char* ini_filename)
if (!f)
return;
ImFileWrite(ini_data, sizeof(char), ini_data_size, f);
ImFileClose(f);
ImFileClose(f);*/
}

// Call registered handlers (e.g. SettingsHandlerWindow_WriteAll() + custom handlers) to write their stuff into a text buffer
Expand Down

0 comments on commit ef31453

Please sign in to comment.