Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Commit

Permalink
Merge pull request #32 from SkidwareMC/PR
Browse files Browse the repository at this point in the history
yes
  • Loading branch information
Blqtent authored Jan 29, 2023
2 parents 150cc11 + 7b10d14 commit 15fd785
Show file tree
Hide file tree
Showing 29 changed files with 207 additions and 46 deletions.
2 changes: 1 addition & 1 deletion jvm-paper/skidware/CAimAssistModule.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "CAimAssistModule.hpp"

CAimAssistModule::CAimAssistModule() : CModule("Rotation", 'I', COMBAT)
CAimAssistModule::CAimAssistModule() : CModule("Rotation", 'I', COMBAT, "Silent Rotation test")
{
float yaw = 0.0;
}
Expand Down
2 changes: 1 addition & 1 deletion jvm-paper/skidware/CAirJumpModule.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "CAirJumpModule.hpp"

CAirJumpModule::CAirJumpModule() : CModule("AirJump", 'F', MOVEMENT) {
CAirJumpModule::CAirJumpModule() : CModule("AirJump", 'F', MOVEMENT, "Jump in the air") {
}

void CAirJumpModule::onEvent(const CSimpleEvent* event) {
Expand Down
28 changes: 23 additions & 5 deletions jvm-paper/skidware/CAntiKBModule.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "CAntiKBModule.hpp"

CAntiKBModule::CAntiKBModule() : CModule("AntiKB", 'K', COMBAT)
CAntiKBModule::CAntiKBModule() : CModule("AntiKB", 'K', COMBAT, "(Broken) makes you not move")
{
}

Expand All @@ -17,15 +17,33 @@ void CAntiKBModule::onDisable()
void CAntiKBModule::onEvent(const CSimpleEvent*)
{
CMinecraft* mc = CCheat::theMinecraft;
if (mc->thePlayer->IsHurt()) {
mc->thePlayer->motionX = 0;
mc->thePlayer->motionX = 0;
mc->thePlayer->motionX = 0;
if (velo_current_mode == "Motion") {
if (mc->thePlayer->IsHurt()) {
mc->thePlayer->motionX = 0;
mc->thePlayer->motionX = 0;
mc->thePlayer->motionX = 0;

}
}
else if (velo_current_mode == "Jump") {
if (mc->thePlayer->IsHurt() > 7)
mc->thePlayer->jump();
}
}

void CAntiKBModule::renderSettings()
{
ImGui::Separator();
if (ImGui::BeginCombo("##combo", velo_current_mode)) // The second parameter is the label previewed before opening the combo.
{
for (int n = 0; n < IM_ARRAYSIZE(velo_modes); n++)
{
bool is_selected = (velo_current_mode == velo_modes[n]); // You can store your selection however you want, outside or inside your objects
if (ImGui::Selectable(velo_modes[n], is_selected))
velo_current_mode = velo_modes[n];
if (is_selected)
ImGui::SetItemDefaultFocus(); // You may set the initial focus when opening the combo (scrolling + for keyboard navigation support)
}
ImGui::EndCombo();
}
}
3 changes: 3 additions & 0 deletions jvm-paper/skidware/CAntiKBModule.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,7 @@ typedef struct CAntiKBModule : CModule {
virtual void renderSettings();
} CAntiKBModule;

static const char* velo_modes[] = { "Motion", "Jump" };
static const char* velo_current_mode = "Jump";

#endif // !ANTIKBMODULE_CGUARD
2 changes: 1 addition & 1 deletion jvm-paper/skidware/CAutoSprintModule.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "CAutoSprintModule.hpp"
#include "wrapper.h"

CAutoSprintModule::CAutoSprintModule() : CModule("AutoSprint", '[', MOVEMENT)
CAutoSprintModule::CAutoSprintModule() : CModule("AutoSprint", '[', MOVEMENT, "Crashes after a couple hundred ticks. idk why")
{
}

Expand Down
28 changes: 20 additions & 8 deletions jvm-paper/skidware/CClickGUIModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@ void ChromaticTab(char* label, int& tabhandler, int tab)
}
}



CClickGUIModule::CClickGUIModule() : CModule("ClickGUI", VK_RSHIFT, RENDER) {
//this->toggle();

}

void CClickGUIModule::onEnable() {
Expand All @@ -38,12 +41,13 @@ void CClickGUIModule::onEnable() {
Style->FrameRounding = 2;
Style->ChildRounding = 0;
Style->FrameBorderSize = 0;
Style->Colors[ImGuiCol_WindowBg] = ImColor(0, 128, 255);
Style->Colors[ImGuiCol_WindowBg] = ImColor(25, 25, 25);
Style->Colors[ImGuiCol_ChildBg] = ImColor(25, 25, 25);
Style->Colors[ImGuiCol_Button] = ImColor(35, 35, 35);
Style->Colors[ImGuiCol_Text] = ImColor(52, 247, 213);
Style->Colors[ImGuiCol_ButtonHovered] = ImColor(gui::clear_col);
Style->Colors[ImGuiCol_ButtonActive] = ImColor(35, 35, 35);
Style->Colors[ImGuiCol_CheckMark] = ImColor(gui::clear_col);
Style->Colors[ImGuiCol_Button] = ImColor(26, 29, 174);
Style->Colors[ImGuiCol_FrameBg] = ImColor(35, 35, 35);
Style->Colors[ImGuiCol_FrameBgActive] = ImColor(35, 35, 35);
Style->Colors[ImGuiCol_FrameBgHovered] = ImColor(35, 35, 35);
Expand All @@ -53,7 +57,7 @@ void CClickGUIModule::onEnable() {

ImGui::GetStyle().ScrollbarRounding = 5.0f;
Style->GrabMinSize = 15.0f;
Style->ScrollbarSize = 150.0f;
Style->ScrollbarSize = 50.0f;
Style->Colors[ImGuiCol_Text] = ImColor(255, 255, 255);

io.IniFilename = NULL; // GET RID OF IMGUI.INI
Expand All @@ -77,7 +81,7 @@ void CClickGUIModule::onEvent(const CSimpleEvent* event) {
ImGui_ImplOpenGL2_NewFrame();
ImGui_ImplWin32_NewFrame();
ImGui::NewFrame();
ImGui::SetNextWindowSize(ImVec2(650 - 16, 400 - 39));
ImGui::SetNextWindowSize(ImVec2(650, 400));

ImGui::Begin("Skidware", nullptr, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoSavedSettings);
ImGui::Text("Skidware b0.3");
Expand All @@ -92,26 +96,34 @@ void CClickGUIModule::onEvent(const CSimpleEvent* event) {
//ImGui::Checkbox(module->name.c_str(), &module->state);
if (gui::tab == 0) {
if (module->catagory == COMBAT) {
if (ImGui::Button(module->name.c_str())) module->toggle();
ImGui::Text(module->name.c_str()); ImGui::SameLine();
if (ImGui::Button("Toggle")) module->toggle();
module->renderSettings();
HelpMarker(module->desc);
}
}
else if (gui::tab == 1) {
if (module->catagory == MOVEMENT) {
if (ImGui::Button(module->name.c_str())) module->toggle();
ImGui::Text(module->name.c_str()); ImGui::SameLine();
if (ImGui::Button("Toggle")) module->toggle();
module->renderSettings();
HelpMarker(module->desc);
}
}
else if (gui::tab == 2) {
if (module->catagory == RENDER) {
if (ImGui::Button(module->name.c_str())) module->toggle();
ImGui::Text(module->name.c_str()); ImGui::SameLine();
if (ImGui::Button("Toggle")) module->toggle();
module->renderSettings();
HelpMarker(module->desc);
}
}
else if (gui::tab == 3) {
if (module->catagory == MISC) {
if (ImGui::Button(module->name.c_str())) module->toggle();
ImGui::Text(module->name.c_str()); ImGui::SameLine();
if (ImGui::Button("Toggle")) module->toggle();
module->renderSettings();
HelpMarker(module->desc);
}
}
/*
Expand Down
13 changes: 13 additions & 0 deletions jvm-paper/skidware/CClickGUIModule.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,19 @@ typedef struct CClickGUIModule : CModule {
virtual void renderSettings();
};

static void HelpMarker(const char* desc)
{
ImGui::TextDisabled("(?)");
if (ImGui::IsItemHovered())
{
ImGui::BeginTooltip();
ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f);
ImGui::TextUnformatted(desc);
ImGui::PopTextWrapPos();
ImGui::EndTooltip();
}
}

namespace gui {
static int tab;
extern ImVec4 clear_col;
Expand Down
6 changes: 3 additions & 3 deletions jvm-paper/skidware/CClickerModule.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "CClickerModule.hpp"

CClickerModule::CClickerModule() : CModule("Clicker", 'O', COMBAT) {
CClickerModule::CClickerModule() : CModule("RClicker", 'O', COMBAT, "Don't use") {

}

Expand Down Expand Up @@ -30,8 +30,8 @@ void CClickerModule::onEvent(const CSimpleEvent* event) {
POINT pt;
GetCursorPos(&pt);
if (FindWindowA(("LWJGL"), nullptr) == GetForegroundWindow()) {
SendMessageW(GetForegroundWindow(), WM_LBUTTONDOWN, MK_LBUTTON, MAKELPARAM(0, 0));
SendMessageW(GetForegroundWindow(), WM_LBUTTONUP, MK_LBUTTON, MAKELPARAM(0, 0));
SendMessageW(GetForegroundWindow(), WM_RBUTTONDOWN, MK_RBUTTON, MAKELPARAM(0, 0));
SendMessageW(GetForegroundWindow(), WM_RBUTTONUP, MK_RBUTTON, MAKELPARAM(0, 0));
Sleep(rand() % delay); // Sleep Delay Time
}
//swingItem();
Expand Down
2 changes: 1 addition & 1 deletion jvm-paper/skidware/CClickerModule.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ typedef struct CClickerModule : CModule {

float m_delay = {};
float m_random = {};
float f_cps = {};
float f_cps = 15;
#endif // !CCLICKERMODULE_HPP_GUARD
9 changes: 3 additions & 6 deletions jvm-paper/skidware/CFlyModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include "CCheat.hpp"
#include "wrapper.h"

CFlyModule::CFlyModule() : CModule("Fly", 'V', MOVEMENT) {
CFlyModule::CFlyModule() : CModule("Fly", 'V', MOVEMENT, "Zoom") {

}

Expand Down Expand Up @@ -42,12 +42,9 @@ void CFlyModule::onEvent(const CSimpleEvent* event) {

else if (fly_current_mode == "Keep-Y")
{
mc->thePlayer->motionX = 0;
mc->thePlayer->motionX = mc->thePlayer->motionX * 0;
mc->thePlayer->motionY = 0;
mc->thePlayer->motionZ = 0;
if (mc->gameSettings->isAnyKeyDown()) {
mc->thePlayer->strafe(mc->thePlayer->getSpeed()*1.05);
}
mc->thePlayer->motionZ = mc->thePlayer->motionZ * 0;
}
}

Expand Down
6 changes: 3 additions & 3 deletions jvm-paper/skidware/CHUDModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "CFlyModule.hpp"
#include "CSpeedModule.hpp"

CHUDModule::CHUDModule() : CModule("HUD", 'H', RENDER) {
CHUDModule::CHUDModule() : CModule("HUD", 'H', RENDER, "yes") {
this->toggle();
}

Expand Down Expand Up @@ -197,11 +197,11 @@ void CHUDModule::onEvent(const CSimpleEvent* event) {
glPopMatrix();
float yPos = 25;
for (CModule* module : CCheat::moduleManager->modules) {
/*

if (module->state == false) {
continue;
}
*/


glPushMatrix();
glScalef(2, 2, 2);
Expand Down
4 changes: 3 additions & 1 deletion jvm-paper/skidware/CIntelligentMappings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ void CIntelligentMappings::init(Version ver) {
CIntelligentMappedField movementInputField = make_field("movementInput", "Lnet/minecraft/util/MovementInput;",
"field_71158_b", "e", "Lnet/minecraft/util/MovementInput;", "Lbub;");

CIntelligentMappedField inWaterField = make_field("inWater", "Z", "field_70171_ac", "U", "Z", "Z");

CIntelligentMappedMethod jumpMethod = make_method("jump", "()V",
"func_70664_aZ", "cu", "()V", "()V");

Expand All @@ -100,7 +102,7 @@ void CIntelligentMappings::init(Version ver) {

CIntelligentMappedClass playerKlass = make_klass("net.minecraft.client.entity.EntityPlayerSP",
"net.minecraft.client.entity.EntityPlayerSP", "bud", std::vector({ onGroundField, moveForwardField,
moveStrafingField, headRotationYawField, speedInAirField, motionXField, motionYField, motionZField, hurttimeField, rotationYawField, movementInputField, theWorldField}),
moveStrafingField, headRotationYawField, inWaterField, speedInAirField, motionXField, motionYField, motionZField, hurttimeField, rotationYawField, movementInputField, theWorldField}),
std::vector({ jumpMethod, setSprintMethod }));
_klasses.push_back(playerKlass);

Expand Down
44 changes: 44 additions & 0 deletions jvm-paper/skidware/CJesusModule.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#include "CJesusModule.h"
#include "CCheat.hpp"

CJesusModule::CJesusModule() : CModule("Jesus", 'L', MOVEMENT, "Walk on water")
{
}

void CJesusModule::onEnable()
{
CCheat::eventBus->registerListener(this);
}

void CJesusModule::onDisable()
{
CCheat::eventBus->unregisterListener(this);
}

void CJesusModule::onEvent(const CSimpleEvent*)
{
double jumpfactor = 0.0336;
CMinecraft* mc = CCheat::theMinecraft;
if (jesus_current_mode == "AAC 4.2.1") {
if (mc->thePlayer->inWater) {
mc->thePlayer->motionY = jumpfactor;
}
}
}

void CJesusModule::renderSettings()
{
ImGui::Separator();
if (ImGui::BeginCombo("##kombo", jesus_current_mode)) // The second parameter is the label previewed before opening the combo.
{
for (int n = 0; n < IM_ARRAYSIZE(jesus_modes); n++)
{
bool is_selected = (jesus_current_mode == jesus_modes[n]); // You can store your selection however you want, outside or inside your objects
if (ImGui::Selectable(jesus_modes[n], is_selected))
jesus_current_mode = jesus_modes[n];
if (is_selected)
ImGui::SetItemDefaultFocus(); // You may set the initial focus when opening the combo (scrolling + for keyboard navigation support)
}
ImGui::EndCombo();
}
}
17 changes: 17 additions & 0 deletions jvm-paper/skidware/CJesusModule.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#ifndef CJesusModule_HPP_GUARD
#define CJesusModule_HPP_GUARD
#pragma once

#include "CModule.hpp"

typedef struct CJesusModule : CModule {
CJesusModule();
virtual void onEnable() override;
virtual void onDisable() override;
virtual void onEvent(const CSimpleEvent*) override;
virtual void renderSettings();
};
static const char* jesus_modes[] = { "AAC 4.2.1", "Dolphin"};
static const char* jesus_current_mode = "AAC 4.2.1";

#endif //CNoFallModule_HPP_GUARD
2 changes: 1 addition & 1 deletion jvm-paper/skidware/CKillauraModule.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "CKillauraModule.hpp"
#include "CCheat.hpp"

CKillauraModule::CKillauraModule() : CModule("Destruct", '-', MISC) {
CKillauraModule::CKillauraModule() : CModule("Destruct", '-', MISC, "Read what it says") {

}

Expand Down
3 changes: 2 additions & 1 deletion jvm-paper/skidware/CModule.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#include "CModule.hpp"

CModule::CModule(std::string name, int keyBind, CATAGORY catagory) {
CModule::CModule(std::string name, int keyBind, CATAGORY catagory, const char* desc) {
this->name = name;
this->keyBind = keyBind;
this->catagory = catagory;
this->desc = desc;
}

CModule::~CModule() {
Expand Down
3 changes: 2 additions & 1 deletion jvm-paper/skidware/CModule.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ typedef struct CModule : CEventListener {
bool state = false;
int keyBind = 0x0;
CATAGORY catagory;
const char* desc;

protected:
CModule(std::string name, int keyBind, CATAGORY catagory);
CModule(std::string name, int keyBind, CATAGORY catagory, const char* desc = "Figure it out");
public:

virtual ~CModule();
Expand Down
2 changes: 2 additions & 0 deletions jvm-paper/skidware/CModuleManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "CAntiKBModule.hpp"
#include "CAutoSprintModule.hpp"
#include "CNoFallModule.hpp"
#include "CJesusModule.h"

void CModuleManager::registerModules() {
this->registerModule(new CAirJumpModule()); //Airjump
Expand All @@ -28,5 +29,6 @@ void CModuleManager::registerModules() {
//Fix this Smellon
// this->registerModule(new CAutoSprintModule());
this->registerModule(new CNoFallDamageModule());
this->registerModule(new CJesusModule());

}
Loading

0 comments on commit 15fd785

Please sign in to comment.