Release v1.2.6.0
- Removed use custom delay tick option (addon will automatically use the values of the sliders for delays) - Cleaned up the custom delays section (removed collapsible background)
This commit is contained in:
parent
f3f326266c
commit
291c4aa939
5 changed files with 32 additions and 49 deletions
|
|
@ -61,20 +61,17 @@ void AutomationLogic::ApplyHealerBoons() {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
g_api->GameBinds.InvokeAsync(EGameBinds_MiscInteract, 50);
|
g_api->GameBinds.InvokeAsync(EGameBinds_MiscInteract, 50);
|
||||||
int initialDelay = g_state.useCustomDelays ? g_state.initialDelay : 390;
|
Sleep(g_state.initialDelay);
|
||||||
Sleep(initialDelay);
|
|
||||||
|
|
||||||
int delay = g_state.useCustomDelays ? g_state.stepDelay : 290;
|
|
||||||
|
|
||||||
if (g_state.isQuickDps) {
|
if (g_state.isQuickDps) {
|
||||||
for (int i = 0; i < 10; i++) {
|
for (int i = 0; i < 10; i++) {
|
||||||
CoordinateUtils::ClickAtScaled(g_coords.healerStepX[i], g_coords.healerStepY[i], delay);
|
CoordinateUtils::ClickAtScaled(g_coords.healerStepX[i], g_coords.healerStepY[i], g_state.stepDelay);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (g_state.isAlacDps) {
|
else if (g_state.isAlacDps) {
|
||||||
int alacStepY[9] = { 262, 352, 352, 305, 500, 450, 450, 305, 262 };
|
int alacStepY[9] = { 262, 352, 352, 305, 500, 450, 450, 305, 262 };
|
||||||
for (int i = 0; i < 9; i++) {
|
for (int i = 0; i < 9; i++) {
|
||||||
CoordinateUtils::ClickAtScaled(830, alacStepY[i], delay);
|
CoordinateUtils::ClickAtScaled(830, alacStepY[i], g_state.stepDelay);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -128,8 +125,7 @@ void AutomationLogic::ApplyAllBoons() {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
g_api->GameBinds.InvokeAsync(EGameBinds_MiscInteract, 50);
|
g_api->GameBinds.InvokeAsync(EGameBinds_MiscInteract, 50);
|
||||||
int initialDelay = g_state.useCustomDelays ? g_state.initialDelay : 390;
|
Sleep(g_state.initialDelay);
|
||||||
Sleep(initialDelay);
|
|
||||||
|
|
||||||
for (int i = 0; i < 20; i++) {
|
for (int i = 0; i < 20; i++) {
|
||||||
if (g_coords.boonStepX[i] == 0 && g_coords.boonStepY[i] == 0) {
|
if (g_coords.boonStepX[i] == 0 && g_coords.boonStepY[i] == 0) {
|
||||||
|
|
@ -140,7 +136,7 @@ void AutomationLogic::ApplyAllBoons() {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
int delay = (i == 19) ? 50 : (g_state.useCustomDelays ? g_state.stepDelay : 290);
|
int delay = (i == 19) ? 50 : g_state.stepDelay;
|
||||||
|
|
||||||
CoordinateUtils::ClickAtScaled(g_coords.boonStepX[i], g_coords.boonStepY[i], delay);
|
CoordinateUtils::ClickAtScaled(g_coords.boonStepX[i], g_coords.boonStepY[i], delay);
|
||||||
}
|
}
|
||||||
|
|
@ -182,8 +178,7 @@ void AutomationLogic::ApplyGolemSettings() {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
g_api->GameBinds.InvokeAsync(EGameBinds_MiscInteract, 50);
|
g_api->GameBinds.InvokeAsync(EGameBinds_MiscInteract, 50);
|
||||||
int initialDelay = g_state.useCustomDelays ? g_state.initialDelay : 390;
|
Sleep(g_state.initialDelay);
|
||||||
Sleep(initialDelay);
|
|
||||||
|
|
||||||
for (int i = 0; i < 25; i++) {
|
for (int i = 0; i < 25; i++) {
|
||||||
if (g_coords.golemStepX[i] == 0 && g_coords.golemStepY[i] == 0) {
|
if (g_coords.golemStepX[i] == 0 && g_coords.golemStepY[i] == 0) {
|
||||||
|
|
@ -211,7 +206,7 @@ void AutomationLogic::ApplyGolemSettings() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int delay = (i == 24) ? 50 : (g_state.useCustomDelays ? g_state.stepDelay : 290);
|
int delay = (i == 24) ? 50 : g_state.stepDelay;
|
||||||
|
|
||||||
CoordinateUtils::ClickAtScaled(currentX, currentY, delay);
|
CoordinateUtils::ClickAtScaled(currentX, currentY, delay);
|
||||||
|
|
||||||
|
|
@ -219,8 +214,7 @@ void AutomationLogic::ApplyGolemSettings() {
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "5 Bleeding Stacks - repeating 7th step 4 more times");
|
g_api->Log(ELogLevel_INFO, "GolemHelper", "5 Bleeding Stacks - repeating 7th step 4 more times");
|
||||||
|
|
||||||
for (int repeat = 0; repeat < 4; repeat++) {
|
for (int repeat = 0; repeat < 4; repeat++) {
|
||||||
int repeatDelay = g_state.useCustomDelays ? g_state.stepDelay : 290;
|
CoordinateUtils::ClickAtScaled(currentX, currentY, g_state.stepDelay);
|
||||||
CoordinateUtils::ClickAtScaled(currentX, currentY, repeatDelay);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,6 @@ struct GolemHelperState {
|
||||||
HitboxType hitboxType = HITBOX_SMALL;
|
HitboxType hitboxType = HITBOX_SMALL;
|
||||||
bool debugMode = false;
|
bool debugMode = false;
|
||||||
bool showUI = false;
|
bool showUI = false;
|
||||||
bool useCustomDelays = false;
|
|
||||||
bool showAdvanced = false;
|
bool showAdvanced = false;
|
||||||
bool showTimingSettings = false;
|
bool showTimingSettings = false;
|
||||||
int debugCounter = 0;
|
int debugCounter = 0;
|
||||||
|
|
@ -41,6 +40,7 @@ struct MenuCoordinates {
|
||||||
830, 830, 830, 830, 830, 830, 830, 830, 830, 830,
|
830, 830, 830, 830, 830, 830, 830, 830, 830, 830,
|
||||||
830, 830, 830, 830, 830
|
830, 830, 830, 830, 830
|
||||||
};
|
};
|
||||||
|
|
||||||
int golemStepY[25] = {
|
int golemStepY[25] = {
|
||||||
260, 260, 306, 257, 257, 306, 257, 306, 352, 400,
|
260, 260, 306, 257, 257, 306, 257, 306, 352, 400,
|
||||||
454, 508, 352, 257, 306, 454, 400, 306, 352, 400,
|
454, 508, 352, 257, 306, 454, 400, 306, 352, 400,
|
||||||
|
|
@ -51,6 +51,7 @@ struct MenuCoordinates {
|
||||||
830, 830, 830, 830, 830, 830, 830, 830, 830, 830,
|
830, 830, 830, 830, 830, 830, 830, 830, 830, 830,
|
||||||
830, 830, 830, 830, 830, 830, 830, 830, 830, 830
|
830, 830, 830, 830, 830, 830, 830, 830, 830, 830
|
||||||
};
|
};
|
||||||
|
|
||||||
int boonStepY[20] = {
|
int boonStepY[20] = {
|
||||||
262, 354, 262, 262, 400, 305, 354, 305, 262, 305,
|
262, 354, 262, 262, 400, 305, 354, 305, 262, 305,
|
||||||
450, 500, 354, 262, 305, 354, 400, 450, 262, 550
|
450, 500, 354, 262, 305, 354, 400, 450, 262, 550
|
||||||
|
|
@ -59,6 +60,7 @@ struct MenuCoordinates {
|
||||||
int healerStepX[10] = {
|
int healerStepX[10] = {
|
||||||
830, 830, 830, 830, 830, 830, 830, 830, 830, 830
|
830, 830, 830, 830, 830, 830, 830, 830, 830, 830
|
||||||
};
|
};
|
||||||
|
|
||||||
int healerStepY[10] = {
|
int healerStepY[10] = {
|
||||||
262, 352, 352, 262, 262, 500, 450, 450, 305, 262
|
262, 352, 352, 262, 262, 500, 450, 450, 305, 262
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -19,15 +19,14 @@ void ConfigManager::SaveCustomDelaySettings() {
|
||||||
}
|
}
|
||||||
|
|
||||||
configFile << "[GolemHelper]" << std::endl;
|
configFile << "[GolemHelper]" << std::endl;
|
||||||
configFile << "useCustomDelays=" << (g_state.useCustomDelays ? "1" : "0") << std::endl;
|
|
||||||
configFile << "stepDelay=" << g_state.stepDelay << std::endl;
|
|
||||||
configFile << "initialDelay=" << g_state.initialDelay << std::endl;
|
configFile << "initialDelay=" << g_state.initialDelay << std::endl;
|
||||||
|
configFile << "stepDelay=" << g_state.stepDelay << std::endl;
|
||||||
|
|
||||||
configFile.close();
|
configFile.close();
|
||||||
|
|
||||||
char logBuffer[250];
|
char logBuffer[250];
|
||||||
sprintf_s(logBuffer, "Custom delay settings saved: enabled=%s, stepDelay=%dms, initialDelay=%dms",
|
sprintf_s(logBuffer, "Delay settings saved: initialDelay=%dms, stepDelay=%dms",
|
||||||
g_state.useCustomDelays ? "true" : "false", g_state.stepDelay, g_state.initialDelay);
|
g_state.initialDelay, g_state.stepDelay);
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", logBuffer);
|
g_api->Log(ELogLevel_INFO, "GolemHelper", logBuffer);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -58,8 +57,11 @@ void ConfigManager::LoadCustomDelaySettings() {
|
||||||
std::string key = line.substr(0, equalPos);
|
std::string key = line.substr(0, equalPos);
|
||||||
std::string value = line.substr(equalPos + 1);
|
std::string value = line.substr(equalPos + 1);
|
||||||
|
|
||||||
if (key == "useCustomDelays") {
|
if (key == "initialDelay") {
|
||||||
g_state.useCustomDelays = (value == "1");
|
int delay = std::stoi(value);
|
||||||
|
if (delay >= 100 && delay <= 1000) {
|
||||||
|
g_state.initialDelay = delay;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (key == "stepDelay") {
|
else if (key == "stepDelay") {
|
||||||
int delay = std::stoi(value);
|
int delay = std::stoi(value);
|
||||||
|
|
@ -67,19 +69,13 @@ void ConfigManager::LoadCustomDelaySettings() {
|
||||||
g_state.stepDelay = delay;
|
g_state.stepDelay = delay;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (key == "initialDelay") {
|
|
||||||
int delay = std::stoi(value);
|
|
||||||
if (delay >= 100 && delay <= 1000) {
|
|
||||||
g_state.initialDelay = delay;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
configFile.close();
|
configFile.close();
|
||||||
|
|
||||||
char logBuffer[250];
|
char logBuffer[250];
|
||||||
sprintf_s(logBuffer, "Custom delay settings loaded: enabled=%s, stepDelay=%dms, initialDelay=%dms",
|
sprintf_s(logBuffer, "Delay settings loaded: initialDelay=%dms, stepDelay=%dms",
|
||||||
g_state.useCustomDelays ? "true" : "false", g_state.stepDelay, g_state.initialDelay);
|
g_state.initialDelay, g_state.stepDelay);
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", logBuffer);
|
g_api->Log(ELogLevel_INFO, "GolemHelper", logBuffer);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,10 +33,10 @@ void Load(AddonAPI* aApi) {
|
||||||
"GOLEM_HELPER_ICON",
|
"GOLEM_HELPER_ICON",
|
||||||
"GOLEM_HELPER_ICON_HOVER",
|
"GOLEM_HELPER_ICON_HOVER",
|
||||||
"GolemHelper.ToggleUI",
|
"GolemHelper.ToggleUI",
|
||||||
"Toggle GolemHelper UI"
|
"GolemHelper UI"
|
||||||
);
|
);
|
||||||
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "=== GolemHelper v1.2.5.0 Loaded ===");
|
g_api->Log(ELogLevel_INFO, "GolemHelper", "=== GolemHelper v1.2.6.0 Loaded ===");
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "<c=#00ff00>GolemHelper addon</c> loaded successfully!");
|
g_api->Log(ELogLevel_INFO, "GolemHelper", "<c=#00ff00>GolemHelper addon</c> loaded successfully!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -59,7 +59,7 @@ extern "C" __declspec(dllexport) AddonDefinition* GetAddonDef() {
|
||||||
def.Signature = -424248;
|
def.Signature = -424248;
|
||||||
def.APIVersion = NEXUS_API_VERSION;
|
def.APIVersion = NEXUS_API_VERSION;
|
||||||
def.Name = "GolemHelper";
|
def.Name = "GolemHelper";
|
||||||
def.Version = { 1, 2, 5, 0 };
|
def.Version = { 1, 2, 6, 0 };
|
||||||
def.Author = "Azrub";
|
def.Author = "Azrub";
|
||||||
def.Description = "Automates the process of setting optimal boon and golem configurations in the training area";
|
def.Description = "Automates the process of setting optimal boon and golem configurations in the training area";
|
||||||
def.Load = Load;
|
def.Load = Load;
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ void UIManager::RenderUI() {
|
||||||
|
|
||||||
if (ImGui::Begin("GolemHelper", &g_state.showUI, ImGuiWindowFlags_AlwaysAutoResize)) {
|
if (ImGui::Begin("GolemHelper", &g_state.showUI, ImGuiWindowFlags_AlwaysAutoResize)) {
|
||||||
|
|
||||||
ImGui::TextColored(ImVec4(0.2f, 0.8f, 1.0f, 1.0f), "GolemHelper v1.2.5.0");
|
ImGui::TextColored(ImVec4(0.2f, 0.8f, 1.0f, 1.0f), "GolemHelper v1.2.6.0");
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
|
||||||
ImGui::Text("Status:");
|
ImGui::Text("Status:");
|
||||||
|
|
@ -144,16 +144,13 @@ void UIManager::RenderUI() {
|
||||||
ImGui::Spacing();
|
ImGui::Spacing();
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
|
||||||
|
ImGui::PushStyleColor(ImGuiCol_Header, ImVec4(0.0f, 0.0f, 0.0f, 0.0f));
|
||||||
|
ImGui::PushStyleColor(ImGuiCol_HeaderHovered, ImVec4(0.3f, 0.5f, 0.7f, 0.8f));
|
||||||
if (ImGui::CollapsingHeader("Set Custom Delays")) {
|
if (ImGui::CollapsingHeader("Set Custom Delays")) {
|
||||||
|
|
||||||
bool oldUseCustomDelays = g_state.useCustomDelays;
|
|
||||||
int oldStepDelay = g_state.stepDelay;
|
int oldStepDelay = g_state.stepDelay;
|
||||||
int oldInitialDelay = g_state.initialDelay;
|
int oldInitialDelay = g_state.initialDelay;
|
||||||
|
|
||||||
ImGui::Checkbox("Use Custom Delays", &g_state.useCustomDelays);
|
|
||||||
|
|
||||||
ImGui::Spacing();
|
|
||||||
|
|
||||||
ImGui::Text("Initial Delay (after F key):");
|
ImGui::Text("Initial Delay (after F key):");
|
||||||
ImGui::SetNextItemWidth(205);
|
ImGui::SetNextItemWidth(205);
|
||||||
ImGui::SliderInt("##initial", &g_state.initialDelay, 100, 1000, "%d ms");
|
ImGui::SliderInt("##initial", &g_state.initialDelay, 100, 1000, "%d ms");
|
||||||
|
|
@ -179,12 +176,11 @@ void UIManager::RenderUI() {
|
||||||
ImGui::Spacing();
|
ImGui::Spacing();
|
||||||
ImGui::TextColored(ImVec4(0.8f, 0.8f, 0.2f, 1.0f), "Increase delays if clicks fail");
|
ImGui::TextColored(ImVec4(0.8f, 0.8f, 0.2f, 1.0f), "Increase delays if clicks fail");
|
||||||
|
|
||||||
if (oldUseCustomDelays != g_state.useCustomDelays ||
|
if (oldStepDelay != g_state.stepDelay || oldInitialDelay != g_state.initialDelay) {
|
||||||
oldStepDelay != g_state.stepDelay ||
|
|
||||||
oldInitialDelay != g_state.initialDelay) {
|
|
||||||
ConfigManager::SaveCustomDelaySettings();
|
ConfigManager::SaveCustomDelaySettings();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ImGui::PopStyleColor(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
|
|
@ -206,7 +202,6 @@ void UIManager::RenderOptions() {
|
||||||
g_state.skipBurning = false;
|
g_state.skipBurning = false;
|
||||||
g_state.fiveBleedingStacks = false;
|
g_state.fiveBleedingStacks = false;
|
||||||
g_state.hitboxType = HITBOX_SMALL;
|
g_state.hitboxType = HITBOX_SMALL;
|
||||||
g_state.useCustomDelays = false;
|
|
||||||
g_state.showAdvanced = false;
|
g_state.showAdvanced = false;
|
||||||
g_state.showTimingSettings = false;
|
g_state.showTimingSettings = false;
|
||||||
g_state.stepDelay = 290;
|
g_state.stepDelay = 290;
|
||||||
|
|
@ -253,10 +248,6 @@ void UIManager::RenderOptions() {
|
||||||
g_state.hitboxType == HITBOX_MEDIUM ? "Medium" : "Large";
|
g_state.hitboxType == HITBOX_MEDIUM ? "Medium" : "Large";
|
||||||
ImGui::Text("- Hitbox: %s", hitboxName);
|
ImGui::Text("- Hitbox: %s", hitboxName);
|
||||||
|
|
||||||
ImGui::Text("- Timing: %s", g_state.useCustomDelays ? "Custom" : "Default");
|
|
||||||
|
|
||||||
if (g_state.useCustomDelays) {
|
|
||||||
ImGui::Text("- Step Delay: %d ms", g_state.stepDelay);
|
ImGui::Text("- Step Delay: %d ms", g_state.stepDelay);
|
||||||
ImGui::Text("- Initial Delay: %d ms", g_state.initialDelay);
|
ImGui::Text("- Initial Delay: %d ms", g_state.initialDelay);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Loading…
Reference in a new issue