From b0b3499d5a9806fc87064231a764c30303c4abdd Mon Sep 17 00:00:00 2001 From: grimmier378 <124466615+grimmier378@users.noreply.github.com> Date: Mon, 1 Apr 2024 23:34:53 -0600 Subject: [PATCH] feat: If you left click a group member or their pet. with an item on your cursor, and they are in range you will open a trade --- init.lua | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/init.lua b/init.lua index 87922a7..c0ad6bc 100644 --- a/init.lua +++ b/init.lua @@ -356,17 +356,6 @@ local function DrawGroupMember(id) ImGui.EndTooltip() end end - ImGui.EndGroup() - if ImGui.IsItemHovered() and ImGui.IsMouseReleased(ImGuiMouseButton.Left) then - mq.cmdf("/target id %s", member.ID()) - end - if ImGui.IsItemHovered() and ImGui.IsMouseReleased(ImGuiMouseButton.Right) then - if useEQBC then - mq.cmdf("/bct %s //foreground", memberName) - else - mq.cmdf("/dex %s /foreground", memberName) - end - end -- Pet Health @@ -383,6 +372,9 @@ local function DrawGroupMember(id) ImGui.EndTooltip() if ImGui.IsMouseClicked(0) then mq.cmdf("/target id %s", member.Pet.ID()) + if mq.TLO.Cursor() then + mq.cmdf('/multiline ; /tar id %s; /face; /if (${Cursor.ID}) /click left target',member.Pet.ID()) + end end end end @@ -393,6 +385,20 @@ local function DrawGroupMember(id) ImGui.Dummy(ImGui.GetContentRegionAvail(), 20) end + ImGui.EndGroup() + if ImGui.IsItemHovered() and ImGui.IsMouseReleased(ImGuiMouseButton.Left) then + mq.cmdf("/target id %s", member.ID()) + if mq.TLO.Cursor() then + mq.cmdf('/multiline ; /tar id %s; /face; /if (${Cursor.ID}) /click left target',member.ID()) + end + end + if ImGui.IsItemHovered() and ImGui.IsMouseReleased(ImGuiMouseButton.Right) then + if useEQBC then + mq.cmdf("/bct %s //foreground", memberName) + else + mq.cmdf("/dex %s /foreground", memberName) + end + end end local function GUI_Group(open)