Release v1.5.2.0
Added Respawn Golem button
This commit is contained in:
parent
98c51aa098
commit
f6055f946c
8 changed files with 70 additions and 6 deletions
|
|
@ -348,3 +348,41 @@ void AutomationLogic::SpawnGolem() {
|
|||
|
||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "Golem settings sequence completed (25 steps)!");
|
||||
}
|
||||
|
||||
void AutomationLogic::RespawnGolem() {
|
||||
if (!g_api || !g_state.enabled) return;
|
||||
|
||||
bool uiWasVisible = g_state.showUI;
|
||||
if (uiWasVisible) {
|
||||
g_state.showUI = false;
|
||||
}
|
||||
|
||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "Starting golem respawn sequence (2 steps)");
|
||||
|
||||
try {
|
||||
g_api->GameBinds.InvokeAsync(EGameBinds_MiscInteract, 50);
|
||||
Sleep(g_state.initialDelay);
|
||||
|
||||
for (int i = 0; i < MenuSequences::GOLEM_RESPAWN_LENGTH; i++) {
|
||||
MenuOption step = MenuSequences::GOLEM_RESPAWN[i];
|
||||
auto coordIt = g_coords.coords.find(step);
|
||||
|
||||
if (coordIt == g_coords.coords.end() ||
|
||||
(coordIt->second.first == 0 && coordIt->second.second == 0)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
int delay = (i == MenuSequences::GOLEM_RESPAWN_LENGTH - 1) ? 50 : g_state.stepDelay;
|
||||
CoordinateUtils::ClickAtScaled(coordIt->second.first, coordIt->second.second, delay);
|
||||
}
|
||||
}
|
||||
catch (...) {
|
||||
g_api->Log(ELogLevel_WARNING, "GolemHelper", "Exception during golem respawn sequence");
|
||||
}
|
||||
|
||||
if (uiWasVisible) {
|
||||
g_state.showUI = true;
|
||||
}
|
||||
|
||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "Golem respawn sequence completed!");
|
||||
}
|
||||
|
|
@ -7,4 +7,5 @@ public:
|
|||
static void ApplyBoons();
|
||||
static void ApplyHealerBoons();
|
||||
static void SpawnGolem();
|
||||
static void RespawnGolem();
|
||||
};
|
||||
|
|
@ -67,7 +67,13 @@ public:
|
|||
GOLEM_PLEASESPAWNMYGOLEM
|
||||
};
|
||||
|
||||
static constexpr MenuOption GOLEM_RESPAWN[2] = {
|
||||
GOLEM_RESPAWNMYPREVIOUSGOLEMINCARNATION,
|
||||
GOLEM_EXIT
|
||||
};
|
||||
|
||||
static constexpr int BOON_LENGTH = 20;
|
||||
static constexpr int HEALER_QUICK_LENGTH = 10;
|
||||
static constexpr int GOLEM_LENGTH = 25;
|
||||
static constexpr int GOLEM_RESPAWN_LENGTH = 2;
|
||||
};
|
||||
|
|
@ -51,6 +51,7 @@ enum MenuOption {
|
|||
BOON_ENV_EXTREME,
|
||||
|
||||
// === GOLEM MENU ===
|
||||
GOLEM_RESPAWNMYPREVIOUSGOLEMINCARNATION,
|
||||
GOLEM_SPAWNAGOLEM,
|
||||
GOLEM_HITBOX_SMALL,
|
||||
GOLEM_HITBOX_MEDIUM,
|
||||
|
|
@ -79,7 +80,8 @@ enum MenuOption {
|
|||
GOLEM_WEAKNESS,
|
||||
GOLEM_GOBACK4,
|
||||
GOLEM_GOBACK5,
|
||||
GOLEM_PLEASESPAWNMYGOLEM
|
||||
GOLEM_PLEASESPAWNMYGOLEM,
|
||||
GOLEM_EXIT
|
||||
};
|
||||
|
||||
struct GolemTemplate {
|
||||
|
|
@ -193,6 +195,7 @@ struct MenuCoordinates {
|
|||
{BOON_ENV_EXTREME, {830, 262}},
|
||||
|
||||
// === GOLEM MENU ===
|
||||
{GOLEM_RESPAWNMYPREVIOUSGOLEMINCARNATION, {830, 352}},
|
||||
{GOLEM_SPAWNAGOLEM, {830, 260}},
|
||||
{GOLEM_HITBOX_SMALL, {830, 260}},
|
||||
{GOLEM_HITBOX_MEDIUM, {830, 305}},
|
||||
|
|
@ -221,6 +224,7 @@ struct MenuCoordinates {
|
|||
{GOLEM_WEAKNESS, {830, 400}},
|
||||
{GOLEM_GOBACK4, {830, 454}},
|
||||
{GOLEM_GOBACK5, {830, 454}},
|
||||
{GOLEM_PLEASESPAWNMYGOLEM, {830, 548}}
|
||||
{GOLEM_PLEASESPAWNMYGOLEM, {830, 548}},
|
||||
{GOLEM_EXIT, {830, 400}},
|
||||
};
|
||||
};
|
||||
|
|
@ -35,7 +35,7 @@ void Load(AddonAPI* aApi) {
|
|||
|
||||
MapUtils::UpdateQuickAccessVisibility();
|
||||
|
||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "=== GolemHelper v1.5.1.0 Loaded ===");
|
||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "=== GolemHelper v1.5.2.0 Loaded ===");
|
||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "<c=#00ff00>GolemHelper addon</c> loaded successfully!");
|
||||
}
|
||||
|
||||
|
|
@ -62,7 +62,7 @@ extern "C" __declspec(dllexport) AddonDefinition* GetAddonDef() {
|
|||
def.Signature = -424248;
|
||||
def.APIVersion = NEXUS_API_VERSION;
|
||||
def.Name = "GolemHelper";
|
||||
def.Version = { 1, 5, 1, 0 };
|
||||
def.Version = { 1, 5, 2, 0 };
|
||||
def.Author = "Azrub";
|
||||
def.Description = "Automates the process of setting optimal boon and golem configurations in the training area";
|
||||
def.Load = Load;
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ void KeybindManager::RegisterKeybinds() {
|
|||
Keybind kb_empty = { 0, false, false, false };
|
||||
g_api->InputBinds.RegisterWithStruct("GolemHelper.ApplyBoons", HandleBoonKeybind, kb_empty);
|
||||
g_api->InputBinds.RegisterWithStruct("GolemHelper.SpawnGolem", HandleGolemKeybind, kb_empty);
|
||||
g_api->InputBinds.RegisterWithStruct("GolemHelper.RespawnGolem", HandleRespawnGolemKeybind, kb_empty);
|
||||
g_api->InputBinds.RegisterWithStruct("GolemHelper.QuickDPS", HandleQuickDpsKeybind, kb_empty);
|
||||
g_api->InputBinds.RegisterWithStruct("GolemHelper.AlacDPS", HandleAlacDpsKeybind, kb_empty);
|
||||
g_api->InputBinds.RegisterWithStruct("GolemHelper.Toggle", HandleToggleKeybind, kb_empty);
|
||||
|
|
@ -23,6 +24,7 @@ void KeybindManager::UnregisterKeybinds() {
|
|||
|
||||
g_api->InputBinds.Deregister("GolemHelper.ApplyBoons");
|
||||
g_api->InputBinds.Deregister("GolemHelper.SpawnGolem");
|
||||
g_api->InputBinds.Deregister("GolemHelper.RespawnGolem");
|
||||
g_api->InputBinds.Deregister("GolemHelper.QuickDPS");
|
||||
g_api->InputBinds.Deregister("GolemHelper.AlacDPS");
|
||||
g_api->InputBinds.Deregister("GolemHelper.Toggle");
|
||||
|
|
@ -42,6 +44,12 @@ void KeybindManager::HandleGolemKeybind(const char* id, bool release) {
|
|||
}
|
||||
}
|
||||
|
||||
void KeybindManager::HandleRespawnGolemKeybind(const char* id, bool release) {
|
||||
if (!release && g_state.enabled) {
|
||||
AutomationLogic::RespawnGolem();
|
||||
}
|
||||
}
|
||||
|
||||
void KeybindManager::HandleToggleKeybind(const char* id, bool release) {
|
||||
if (!release) {
|
||||
g_state.enabled = !g_state.enabled;
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ public:
|
|||
|
||||
static void HandleBoonKeybind(const char* id, bool release);
|
||||
static void HandleGolemKeybind(const char* id, bool release);
|
||||
static void HandleRespawnGolemKeybind(const char* id, bool release);
|
||||
static void HandleQuickDpsKeybind(const char* id, bool release);
|
||||
static void HandleAlacDpsKeybind(const char* id, bool release);
|
||||
static void HandleToggleKeybind(const char* id, bool release);
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ void UIManager::RenderUI() {
|
|||
|
||||
if (ImGui::Begin("GolemHelper", &g_state.showUI, ImGuiWindowFlags_AlwaysAutoResize)) {
|
||||
|
||||
ImGui::TextColored(ImVec4(0.2f, 0.8f, 1.0f, 1.0f), "GolemHelper v1.5.1.0");
|
||||
ImGui::TextColored(ImVec4(0.2f, 0.8f, 1.0f, 1.0f), "GolemHelper v1.5.2.0");
|
||||
ImGui::Separator();
|
||||
|
||||
if (ImGui::BeginTabBar("GolemHelperTabs", ImGuiTabBarFlags_None)) {
|
||||
|
|
@ -162,11 +162,17 @@ void UIManager::RenderSettingsTab() {
|
|||
|
||||
ImGui::Text("Golem Configuration");
|
||||
|
||||
if (ImGui::Button("Spawn Golem", ImVec2(150, 0))) {
|
||||
if (ImGui::Button("Spawn Golem", ImVec2(120, 0))) {
|
||||
if (g_state.enabled && MapUtils::IsInTrainingArea()) {
|
||||
g_api->InputBinds.Invoke("GolemHelper.SpawnGolem", false);
|
||||
}
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Respawn", ImVec2(80, 0))) {
|
||||
if (g_state.enabled && MapUtils::IsInTrainingArea()) {
|
||||
g_api->InputBinds.Invoke("GolemHelper.RespawnGolem", false);
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::Text("Golem Hitbox:");
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue