33 Commits

Author SHA1 Message Date
totalllyswede 5597739ea8 Add files via upload 2025-12-15 15:10:04 -08:00
totalllyswede 826567511f Add files via upload 2025-11-27 01:35:48 -08:00
totalllyswede 99c16ba7e6 Update README.md 2025-11-26 21:32:37 -08:00
totalllyswede 6e805e351d Add files via upload 2025-11-26 21:32:11 -08:00
totalllyswede e99ca59f27 Add files via upload 2025-11-26 21:30:53 -08:00
totalllyswede bf3d5bdd65 Add files via upload 2025-11-25 07:07:57 -08:00
totalllyswede 733c7a026c Delete Images/mmOriginal.tga 2025-11-25 06:44:39 -08:00
totalllyswede 66cd0cea50 Add files via upload 2025-11-25 06:43:51 -08:00
totalllyswede 70ba72a3b5 Add files via upload 2025-11-25 01:32:48 -08:00
totalllyswede c04e16925a Add files via upload 2025-11-25 01:30:13 -08:00
totalllyswede 66e3ff2782 Add files via upload 2025-11-25 01:28:21 -08:00
totalllyswede 4215082f4f Add files via upload 2025-11-25 01:24:10 -08:00
totalllyswede ffbec677b9 Add files via upload 2025-11-25 00:27:45 -08:00
totalllyswede 819e807803 Update README.md 2025-11-25 00:26:42 -08:00
totalllyswede 1c3e1dba7d Update README.md 2025-11-25 00:24:22 -08:00
totalllyswede 298424ebdf Add files via upload 2025-11-24 00:29:28 -08:00
totalllyswede 6926a59e8e Update README.md 2025-11-24 00:29:09 -08:00
totalllyswede 8d6c686692 Update README.md 2025-11-23 02:21:22 -08:00
totalllyswede 115dc0c7e9 Add files via upload 2025-11-23 00:33:34 -08:00
totalllyswede 45a287e7cc Add files via upload 2025-11-23 00:20:42 -08:00
totalllyswede ad2b1a0091 Update README.md 2025-11-23 00:03:04 -08:00
totalllyswede ee70573392 Update README.md 2025-11-23 00:02:29 -08:00
totalllyswede 54bd7a319f Add files via upload 2025-11-23 00:01:38 -08:00
totalllyswede 9a3ad6f6c5 Update README.md 2025-11-22 23:59:42 -08:00
totalllyswede a8d4b2bf01 Update README.md 2025-11-22 07:48:34 -08:00
totalllyswede b3aa6b3a2c Update README.md 2025-11-22 07:48:17 -08:00
totalllyswede 89aa56d5a0 Update README.md 2025-11-22 07:32:21 -08:00
totalllyswede 69de94628f Update README.md 2025-11-22 07:31:48 -08:00
totalllyswede de0977dbda Update README.md 2025-11-22 07:31:25 -08:00
totalllyswede ed7a9c95dd Update README.md 2025-11-22 07:30:21 -08:00
totalllyswede a94f4c920f Update README.md 2025-11-22 07:30:02 -08:00
totalllyswede f7f4563519 Add files via upload 2025-11-22 07:27:04 -08:00
totalllyswede 91dab47f20 Update README.md 2025-11-21 06:07:21 -08:00
6 changed files with 453 additions and 164 deletions
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 16 KiB

+428 -150
View File
@@ -1,3 +1,5 @@
local MM_Initialized = false
-- --
-- Global variable for storage of settings/options -- Global variable for storage of settings/options
-- --
@@ -9,53 +11,57 @@ MiniMageOptions = { };
-- --
function class_OnLoad() function class_OnLoad()
MM_class = UnitClass("player"); MM_class = UnitClass("player");
if (MM_class ~= "Mage") then if (MM_class ~= "Mage") then
this:Hide(); this:Hide();
end end
end end
function MM_Initialize() function MM_Initialize()
MM_fac = UnitFactionGroup('player'); if MM_Initialized then return end
M_class = UnitClass("player"); MM_Initialized = true
if (M_class == "Mage") then MM_fac = UnitFactionGroup('player');
if (DEFAULT_CHAT_FRAME) then M_class = UnitClass("player");
DEFAULT_CHAT_FRAME:AddMessage(MINIMAGE_ANNOUNCE_GREETING..M_class..MINIMAGE_ANNOUNCE_ENABLED); if (M_class == "Mage") then
end if (DEFAULT_CHAT_FRAME) then
else DEFAULT_CHAT_FRAME:AddMessage(MINIMAGE_ANNOUNCE_GREETING..M_class..MINIMAGE_ANNOUNCE_ENABLED);
if (DEFAULT_CHAT_FRAME) then end
DEFAULT_CHAT_FRAME:AddMessage(MINIMAGE_ANNOUNCE_GREETING..M_class..MINIMAGE_ANNOUNCE_DISABLED); else
end if (DEFAULT_CHAT_FRAME) then
end DEFAULT_CHAT_FRAME:AddMessage(MINIMAGE_ANNOUNCE_GREETING..M_class..MINIMAGE_ANNOUNCE_DISABLED);
end
end
end end
function MM_Button_Initialize() function MM_Button_Initialize()
if(event == "VARIABLES_LOADED") then if(event == "VARIABLES_LOADED") then
if (MiniMageOptions.MMButtonPosition == nil) then if (MiniMageOptions.MMButtonPosition == nil) then
MiniMageOptions.MMButtonPosition = 0; MiniMageOptions.MMButtonPosition = 0;
end end
end if (MiniMageOptions.HidePortals == nil) then
MiniMageOptions.HidePortals = false;
end
end
end end
function MM_DropDown_Initialize() function MM_DropDown_Initialize()
local dropdown; local dropdown;
if ( UIDROPDOWNMENU_OPEN_MENU ) then if ( UIDROPDOWNMENU_OPEN_MENU ) then
dropdown = getglobal(UIDROPDOWNMENU_OPEN_MENU); dropdown = getglobal(UIDROPDOWNMENU_OPEN_MENU);
else else
dropdown = this; dropdown = this;
end end
MM_DropDown_InitButtons(); MM_DropDown_InitButtons();
end end
function MM_DropDown_OnLoad() function MM_DropDown_OnLoad()
UIDropDownMenu_Initialize(this, MM_DropDown_Initialize, "MENU"); UIDropDownMenu_Initialize(this, MM_DropDown_Initialize, "MENU");
end end
-- --
-- Minimap button drag/drop functions -- Minimap button drag/drop functions
--
-- Thanks to Atlas for the button dragging code -- Thanks to Atlas for the button dragging code
--
function MM_Button_BeingDragged() function MM_Button_BeingDragged()
local xpos,ypos = GetCursorPosition(); local xpos,ypos = GetCursorPosition();
@@ -66,7 +72,7 @@ function MM_Button_BeingDragged()
end end
function MM_Button_OnClick() function MM_Button_OnClick()
MM_ToggleDropDown(); MM_ToggleDropDown();
end end
function MM_Button_OnEnter() function MM_Button_OnEnter()
@@ -86,13 +92,54 @@ function MM_Button_SetPosition(v)
end end
function MM_Button_UpdatePosition() function MM_Button_UpdatePosition()
MM_ButtonFrame:SetPoint( MM_ButtonFrame:SetPoint(
"TOPLEFT", "TOPLEFT",
"Minimap", "Minimap",
"TOPLEFT", "TOPLEFT",
54 - (78 * cos(MiniMageOptions.MMButtonPosition)), 54 - (78 * cos(MiniMageOptions.MMButtonPosition)),
(78 * sin(MiniMageOptions.MMButtonPosition)) - 55 (78 * sin(MiniMageOptions.MMButtonPosition)) - 55
); );
end
--
-- Required level table (unchanged)
--
local MM_SpellLevels = {
-- Horde
["Teleport: Orgrimmar"] = 20,
["Portal: Orgrimmar"] = 40,
["Teleport: Thunder Bluff"] = 30,
["Portal: Thunder Bluff"] = 50,
["Teleport: Undercity"] = 20,
["Portal: Undercity"] = 40,
["Teleport: Stonard"] = 20,
["Portal: Stonard"] = 40,
-- Alliance
["Teleport: Stormwind"] = 20,
["Portal: Stormwind"] = 40,
["Teleport: Ironforge"] = 20,
["Portal: Ironforge"] = 40,
["Teleport: Darnassus"] = 30,
["Portal: Darnassus"] = 50,
["Teleport: Theramore"] = 40,
["Portal: Theramore"] = 60,
["Teleport: Alah'Thalas"] = 20,
["Portal: Alah'Thalas"] = 40,
}
function MM_CanCastSpell(spellName)
local req = MM_SpellLevels[spellName]
if not req then return true end
return UnitLevel("player") >= req
end end
-- --
@@ -100,145 +147,376 @@ end
-- --
function MM_ToggleDropDown() function MM_ToggleDropDown()
MM_DropDownFrame.point = "TOPRIGHT"; MM_DropDownFrame.point = "TOPRIGHT";
MM_DropDownFrame.relativePoint = "BOTTOMLEFT"; MM_DropDownFrame.relativePoint = "BOTTOMLEFT";
ToggleDropDownMenu(1, nil, MM_DropDownFrame); ToggleDropDownMenu(1, nil, MM_DropDownFrame);
end end
function MM_DropDown_InitButtons() function MM_DropDown_InitButtons()
local info = {}; local info = {};
info.text = MINIMAGE_LABEL_TITLE; info.text = "|cff00ff00"..MINIMAGE_LABEL_TITLE.."|r";
info.isTitle = 1; info.isTitle = 1;
info.justifyH = "CENTER"; info.justifyH = "CENTER";
info.notCheckable = 1; info.notCheckable = 1;
UIDropDownMenu_AddButton(info);
info.tooltipTitle = info.text
local fact = UnitFactionGroup('player'); info.tooltipText = "Click to cast"
if (fact == "Horde") then info.tooltipOnButton = true
MM_DropDown_ForTheHorde();
else UIDropDownMenu_AddButton(info);
MM_DropDown_ForTheAlliance();
end local fact = UnitFactionGroup('player');
if (fact == "Horde") then
MM_DropDown_ForTheHorde();
else
MM_DropDown_ForTheAlliance();
end
end end
-----------------------------------------------------
-- HORDE
-----------------------------------------------------
function MM_DropDown_ForTheHorde() function MM_DropDown_ForTheHorde()
local appender = ': '; local appender = ': ';
local info = { }; -- 🔥 REQUIRED ADDITION: Auto-hide portals if player level < 40
info.text = MINIMAGE_LABEL_PORTAL; if UnitLevel("player") < 40 then
info.isTitle = 1; MiniMageOptions.HidePortals = true
info.notCheckable = 1; end
UIDropDownMenu_AddButton(info);
info = { }; if not MiniMageOptions.HidePortals then
info.text = MINIMAGE_LABEL_ORG; local info = { };
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_PORTAL..appender..MINIMAGE_LABEL_ORG); end; info.text = MINIMAGE_LABEL_PORTAL;
UIDropDownMenu_AddButton(info); info.isTitle = 1;
info.notCheckable = 1;
info = { }; info.tooltipTitle = info.text
info.text = MINIMAGE_LABEL_STONARD; info.tooltipText = "Portal spells"
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_PORTAL..appender..MINIMAGE_LABEL_STONARD); end; info.tooltipOnButton = true
UIDropDownMenu_AddButton(info);
info = { }; UIDropDownMenu_AddButton(info);
info.text = MINIMAGE_LABEL_TB;
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_PORTAL..appender..MINIMAGE_LABEL_TB); end;
UIDropDownMenu_AddButton(info);
info = { }; -- ORG PORTAL
info.text = MINIMAGE_LABEL_UC; info = { };
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_PORTAL..appender..MINIMAGE_LABEL_UC); end; info.text = MINIMAGE_LABEL_ORG;
UIDropDownMenu_AddButton(info); info.disabled = not MM_CanCastSpell("Portal: Orgrimmar");
info.func = function(msg)
if MM_CanCastSpell("Portal: Orgrimmar") then
MM_TryCast(MINIMAGE_LABEL_PORTAL..appender..MINIMAGE_LABEL_ORG);
end
end;
UIDropDownMenu_AddButton(info);
info = { }; -- STONARD PORTAL
info.text = MINIMAGE_LABEL_TELEPORT; info = { };
info.isTitle = 1; info.text = MINIMAGE_LABEL_STONARD;
info.notCheckable = 1; info.disabled = not MM_CanCastSpell("Portal: Stonard");
UIDropDownMenu_AddButton(info); info.func = function(msg)
if MM_CanCastSpell("Portal: Stonard") then
MM_TryCast(MINIMAGE_LABEL_PORTAL..appender..MINIMAGE_LABEL_STONARD);
end
end;
UIDropDownMenu_AddButton(info);
info = { }; -- TB PORTAL
info.text = MINIMAGE_LABEL_ORG; info = { };
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_TELEPORT..appender..MINIMAGE_LABEL_ORG); end; info.text = MINIMAGE_LABEL_TB;
UIDropDownMenu_AddButton(info); info.disabled = not MM_CanCastSpell("Portal: Thunder Bluff");
info.func = function(msg)
if MM_CanCastSpell("Portal: Thunder Bluff") then
MM_TryCast(MINIMAGE_LABEL_PORTAL..appender..MINIMAGE_LABEL_TB);
end
end;
UIDropDownMenu_AddButton(info);
info = { }; -- UC PORTAL
info.text = MINIMAGE_LABEL_STONARD; info = { };
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_TELEPORT..appender..MINIMAGE_LABEL_STONARD); end; info.text = MINIMAGE_LABEL_UC;
UIDropDownMenu_AddButton(info); info.disabled = not MM_CanCastSpell("Portal: Undercity");
info.func = function(msg)
if MM_CanCastSpell("Portal: Undercity") then
MM_TryCast(MINIMAGE_LABEL_PORTAL..appender..MINIMAGE_LABEL_UC);
end
end;
UIDropDownMenu_AddButton(info);
end
info = { }; -- TELEPORT SECTION
info.text = MINIMAGE_LABEL_TB; local info = { };
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_TELEPORT..appender..MINIMAGE_LABEL_TB); end; info.text = MINIMAGE_LABEL_TELEPORT;
UIDropDownMenu_AddButton(info); info.isTitle = 1;
info.notCheckable = 1;
info = { }; UIDropDownMenu_AddButton(info);
info.text = MINIMAGE_LABEL_UC;
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_TELEPORT..appender..MINIMAGE_LABEL_UC); end; -- ORG TELEPORT
UIDropDownMenu_AddButton(info); info = { };
info.text = MINIMAGE_LABEL_ORG;
info.disabled = not MM_CanCastSpell("Teleport: Orgrimmar");
info.func = function(msg)
if MM_CanCastSpell("Teleport: Orgrimmar") then
MM_TryCast(MINIMAGE_LABEL_TELEPORT..appender..MINIMAGE_LABEL_ORG);
end
end;
UIDropDownMenu_AddButton(info);
-- STONARD TELEPORT
info = { };
info.text = MINIMAGE_LABEL_STONARD;
info.disabled = not MM_CanCastSpell("Teleport: Stonard");
info.func = function(msg)
if MM_CanCastSpell("Teleport: Stonard") then
MM_TryCast(MINIMAGE_LABEL_TELEPORT..appender..MINIMAGE_LABEL_STONARD);
end
end;
UIDropDownMenu_AddButton(info);
-- TB TELEPORT
info = { };
info.text = MINIMAGE_LABEL_TB;
info.disabled = not MM_CanCastSpell("Teleport: Thunder Bluff");
info.func = function(msg)
if MM_CanCastSpell("Teleport: Thunder Bluff") then
MM_TryCast(MINIMAGE_LABEL_TELEPORT..appender..MINIMAGE_LABEL_TB);
end
end;
UIDropDownMenu_AddButton(info);
-- UC TELEPORT
info = { };
info.text = MINIMAGE_LABEL_UC;
info.disabled = not MM_CanCastSpell("Teleport: Undercity");
info.func = function(msg)
if MM_CanCastSpell("Teleport: Undercity") then
MM_TryCast(MINIMAGE_LABEL_TELEPORT..appender..MINIMAGE_LABEL_UC);
end
end;
UIDropDownMenu_AddButton(info);
end end
-----------------------------------------------------
-- ALLIANCE
-----------------------------------------------------
function MM_DropDown_ForTheAlliance() function MM_DropDown_ForTheAlliance()
local appender = ': '; local appender = ': ';
local info = { }; -- 🔥 REQUIRED ADDITION: Auto-hide portals if player level < 40
info.text = MINIMAGE_LABEL_PORTAL; if UnitLevel("player") < 40 then
info.isTitle = 1; MiniMageOptions.HidePortals = true
info.notCheckable = 1; end
UIDropDownMenu_AddButton(info);
info = { };
info.text = MINIMAGE_LABEL_ALAH;
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_PORTAL..appender..MINIMAGE_LABEL_ALAH); end;
UIDropDownMenu_AddButton(info);
info = { }; if not MiniMageOptions.HidePortals then
info.text = MINIMAGE_LABEL_DARNASSUS; local info = { };
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_PORTAL..appender..MINIMAGE_LABEL_DARNASSUS); end; info.text = MINIMAGE_LABEL_PORTAL;
UIDropDownMenu_AddButton(info); info.isTitle = 1;
info.notCheckable = 1;
info = { }; UIDropDownMenu_AddButton(info);
info.text = MINIMAGE_LABEL_IF;
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_PORTAL..appender..MINIMAGE_LABEL_IF); end;
UIDropDownMenu_AddButton(info);
info = { }; -- ALAH PORTAL
info.text = MINIMAGE_LABEL_SW; info = { };
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_PORTAL..appender..MINIMAGE_LABEL_SW); end; info.text = MINIMAGE_LABEL_ALAH;
UIDropDownMenu_AddButton(info); info.disabled = not MM_CanCastSpell("Portal: Alah'Thalas");
info.func = function(msg)
if MM_CanCastSpell("Portal: Alah'Thalas") then
MM_TryCast(MINIMAGE_LABEL_PORTAL..appender..MINIMAGE_LABEL_ALAH);
end
end;
UIDropDownMenu_AddButton(info);
info = { }; -- DARNASSUS PORTAL
info.text = MINIMAGE_LABEL_THERAMORE; info = { };
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_PORTAL..appender..MINIMAGE_LABEL_THERAMORE); end; info.text = MINIMAGE_LABEL_DARNASSUS;
UIDropDownMenu_AddButton(info); info.disabled = not MM_CanCastSpell("Portal: Darnassus");
info.func = function(msg)
if MM_CanCastSpell("Portal: Darnassus") then
MM_TryCast(MINIMAGE_LABEL_PORTAL..appender..MINIMAGE_LABEL_DARNASSUS);
end
end;
UIDropDownMenu_AddButton(info);
info = { }; -- IF PORTAL
info.text = MINIMAGE_LABEL_TELEPORT; info = { };
info.isTitle = 1; info.text = MINIMAGE_LABEL_IF;
info.notCheckable = 1; info.disabled = not MM_CanCastSpell("Portal: Ironforge");
UIDropDownMenu_AddButton(info); info.func = function(msg)
if MM_CanCastSpell("Portal: Ironforge") then
MM_TryCast(MINIMAGE_LABEL_PORTAL..appender..MINIMAGE_LABEL_IF);
end
end;
UIDropDownMenu_AddButton(info);
info = { }; -- SW PORTAL
info.text = MINIMAGE_LABEL_ALAH; info = { };
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_TELEPORT..appender..MINIMAGE_LABEL_ALAH); end; info.text = MINIMAGE_LABEL_SW;
UIDropDownMenu_AddButton(info); info.disabled = not MM_CanCastSpell("Portal: Stormwind");
info.func = function(msg)
if MM_CanCastSpell("Portal: Stormwind") then
MM_TryCast(MINIMAGE_LABEL_PORTAL..appender..MINIMAGE_LABEL_SW);
end
end;
UIDropDownMenu_AddButton(info);
info = { }; -- THERAMORE PORTAL
info.text = MINIMAGE_LABEL_DARNASSUS; info = { };
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_TELEPORT..appender..MINIMAGE_LABEL_DARNASSUS); end; info.text = MINIMAGE_LABEL_THERAMORE;
UIDropDownMenu_AddButton(info); info.disabled = not MM_CanCastSpell("Portal: Theramore");
info.func = function(msg)
if MM_CanCastSpell("Portal: Theramore") then
MM_TryCast(MINIMAGE_LABEL_PORTAL..appender..MINIMAGE_LABEL_THERAMORE);
end
end;
UIDropDownMenu_AddButton(info);
end
info = { }; -- TELEPORT TITLE
info.text = MINIMAGE_LABEL_IF; local info = { };
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_TELEPORT..appender..MINIMAGE_LABEL_IF); end; info.text = MINIMAGE_LABEL_TELEPORT;
UIDropDownMenu_AddButton(info); info.isTitle = 1;
info.notCheckable = 1;
info = { }; UIDropDownMenu_AddButton(info);
info.text = MINIMAGE_LABEL_SW;
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_TELEPORT..appender..MINIMAGE_LABEL_SW); end;
UIDropDownMenu_AddButton(info);
info = { }; -- ALAH TELEPORT
info.text = MINIMAGE_LABEL_THERAMORE; info = { };
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_TELEPORT..appender..MINIMAGE_LABEL_THERAMORE); end; info.text = MINIMAGE_LABEL_ALAH;
UIDropDownMenu_AddButton(info); info.disabled = not MM_CanCastSpell("Teleport: Alah'Thalas");
end info.func = function(msg)
if MM_CanCastSpell("Teleport: Alah'Thalas") then
MM_TryCast(MINIMAGE_LABEL_TELEPORT..appender..MINIMAGE_LABEL_ALAH);
end
end;
UIDropDownMenu_AddButton(info);
-- DARN TELEPORT
info = { };
info.text = MINIMAGE_LABEL_DARNASSUS;
info.disabled = not MM_CanCastSpell("Teleport: Darnassus");
info.func = function(msg)
if MM_CanCastSpell("Teleport: Darnassus") then
MM_TryCast(MINIMAGE_LABEL_TELEPORT..appender..MINIMAGE_LABEL_DARNASSUS);
end
end;
UIDropDownMenu_AddButton(info);
-- IF TELEPORT
info = { };
info.text = MINIMAGE_LABEL_IF;
info.disabled = not MM_CanCastSpell("Teleport: Ironforge");
info.func = function(msg)
if MM_CanCastSpell("Teleport: Ironforge") then
MM_TryCast(MINIMAGE_LABEL_TELEPORT..appender..MINIMAGE_LABEL_IF);
end
end;
UIDropDownMenu_AddButton(info);
-- SW TELEPORT
info = { };
info.text = MINIMAGE_LABEL_SW;
info.disabled = not MM_CanCastSpell("Teleport: Stormwind");
info.func = function(msg)
if MM_CanCastSpell("Teleport: Stormwind") then
MM_TryCast(MINIMAGE_LABEL_TELEPORT..appender..MINIMAGE_LABEL_SW);
end
end;
UIDropDownMenu_AddButton(info);
-- THERAMORE TELEPORT
info = { };
info.text = MINIMAGE_LABEL_THERAMORE;
info.disabled = not MM_CanCastSpell("Teleport: Theramore");
info.func = function(msg)
if MM_CanCastSpell("Teleport: Theramore") then
MM_TryCast(MINIMAGE_LABEL_TELEPORT..appender..MINIMAGE_LABEL_THERAMORE);
end
end;
UIDropDownMenu_AddButton(info);
end
--
-- Slash Commands
--
SLASH_MINIMAGE1 = "/mmage"
SlashCmdList["MINIMAGE"] = function(msg)
msg = string.lower(msg or "")
if msg == "reset" then
MiniMageOptions = {}
DEFAULT_CHAT_FRAME:AddMessage("|cffffff00MiniMage: options reset.|r")
elseif msg == "icon" then
if MM_ButtonFrame:IsShown() then
MM_ButtonFrame:Hide()
DEFAULT_CHAT_FRAME:AddMessage("|cffffff00MiniMage: minimap button hidden.|r")
else
MM_ButtonFrame:Show()
DEFAULT_CHAT_FRAME:AddMessage("|cffffff00MiniMage: minimap button shown.|r")
end
elseif msg == "portals" then
MiniMageOptions.HidePortals = not MiniMageOptions.HidePortals
if MiniMageOptions.HidePortals then
DEFAULT_CHAT_FRAME:AddMessage("|cffffff00MiniMage: Portal hidden.|r")
else
DEFAULT_CHAT_FRAME:AddMessage("|cffffff00MiniMage: Portal shown.|r")
end
elseif msg == "help" or msg == "" then
DEFAULT_CHAT_FRAME:AddMessage("|cffffff00MiniMage commands:|r")
DEFAULT_CHAT_FRAME:AddMessage("/mmage help - Show this help")
DEFAULT_CHAT_FRAME:AddMessage("/mmage icon - Show/Hide minimap button")
DEFAULT_CHAT_FRAME:AddMessage("/mmage reset - Reset addon saved options")
else
DEFAULT_CHAT_FRAME:AddMessage("|cffff0000MiniMage: unknown command.|r")
DEFAULT_CHAT_FRAME:AddMessage("Type /mmage help for options.")
end
end
-- ===== Cast tracking + learned-check =====
local MM_LastAttemptedSpell = nil
local MM_LastAttemptTime = 0
function MM_HasSpell(spellName)
for i=1, GetNumSpellTabs() do
local _, _, offset, numSpells = GetSpellTabInfo(i)
for j=1, numSpells do
local name = GetSpellName(j + offset, BOOKTYPE_SPELL)
if name == spellName then
return true
end
end
end
return false
end
function MM_TryCast(spellName)
if not MM_HasSpell(spellName) then
DEFAULT_CHAT_FRAME:AddMessage("|cffff0000You Have Not Learned " .. spellName .. ".|r")
return
end
MM_LastAttemptedSpell = spellName
MM_LastAttemptTime = GetTime()
CastSpellByName(spellName)
end
local MM_EventFrame = CreateFrame("Frame")
MM_EventFrame:RegisterEvent("UI_ERROR_MESSAGE")
MM_EventFrame:SetScript("OnEvent", function(self, event, message)
local now = GetTime()
if MM_LastAttemptedSpell and (now - MM_LastAttemptTime) < 1.0 then
if message then
DEFAULT_CHAT_FRAME:AddMessage("|cffff0000You Have Not Learned " .. MM_LastAttemptedSpell .. ".|r")
end
MM_LastAttemptedSpell = nil
MM_LastAttemptTime = 0
end
end)
+5 -4
View File
@@ -1,7 +1,8 @@
## Interface: 11200 ## Interface: 11200
## Title: MiniMage_TWOW ## Title: MiniMage_TWOW
## Version: 1.0 ## Version: 1.5
## Notes: Forked version of MiniMage 1.2b. No original GitHub Repo found, only found in Wow1.12.1_Addons_Collection ## Notes: Minimap icon for TurtleWoW for quick and easy portals/teleports.
## SavedVariables: MiniMageOptions ## SavedVariables: MiniMageOptions
MiniMage_TWOW.xml localization.lua
localization.lua MiniMage_TWOW.lua
MiniMage_TWOW.xml
+2 -2
View File
@@ -1,6 +1,6 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ C:\Projects\WoW\Bin\Interface\FrameXML\UI.xsd"> <Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ C:\Projects\WoW\Bin\Interface\FrameXML\UI.xsd">
<Script file="MiniMage_TWOW.lua"/> <Script file="localization.lua"/>
<Script file="localization.lua"/> <Script file="MiniMage_TWOW.lua"/>
<!-- Empty core frame used for initialization and such --> <!-- Empty core frame used for initialization and such -->
+16 -6
View File
@@ -4,10 +4,10 @@ MiniMage_TWOW is a lightweight World of Warcraft addon designed for Mages, provi
## Original Addon ## Original Addon
* I found MiniMage_v1.2b in the Wow1.12.1_Addons_Collection, I cannot find the orginal GitHub or anywhere else this addon is posted. * I found MiniMage_v1.2b in the Wow1.12.1_Addons_Collection, I cannot find the orginal GitHub or anywhere else this addon is posted.
* I do not take credit for creating this addon, only modifying it to include TurtleWoW specific features * I do not take credit for creating this addon, only modifying it to include TurtleWoW specific spells and adding a few features
# Version 1.4
## TurtleWoW Specific Features ## TurtleWoW Specific Features
* Includes Alah'Thalas and Theramore for Alliance characters. * Includes Alah'Thalas and Theramore for Alliance characters.
* Includes Stonard for Horde characters. * Includes Stonard for Horde characters.
@@ -17,6 +17,12 @@ MiniMage_TWOW is a lightweight World of Warcraft addon designed for Mages, provi
* **Minimap Button**: Drag and position a minimap button for easy access. * **Minimap Button**: Drag and position a minimap button for easy access.
* **Dropdown Menu**: Quick-cast portals and teleports, organized by faction. * **Dropdown Menu**: Quick-cast portals and teleports, organized by faction.
* **Faction Support**: Automatically shows relevant portal and teleport spells for Horde or Alliance Mages. * **Faction Support**: Automatically shows relevant portal and teleport spells for Horde or Alliance Mages.
* "Haven't Learned Spell" Message when trying to cast a Teleport/Portal you don't have trained.
* **Show/Hide Based on Level**:
* Portals Section Greyed out Until Level 40
* Specific Portals/Teleports Greyed out until required level is reached
## Installation ## Installation
@@ -31,13 +37,18 @@ The launcher will automatically download and install the addon and keep it updat
### Manual Install ### Manual Install
1. Download the repository into your `Interface/AddOns/` folder. 1. Download the repository into your `Interface/AddOns/` folder.
2. Ensure the folder structure is `MiniMage_TWOW/MiniMage.lua`. 2. Ensure the folder structure is `MiniMage_TWOW/MiniMage_TWOW.lua`.
3. Reload the UI or restart WoW. 3. Reload the UI or restart WoW.
## Usage ## Usage & Options
* Click the minimap button to open the dropdown menu. * Click the minimap button to open the dropdown menu.
* Select the desired portal or teleport. * Select the desired portal or teleport.
### /mmage Commands
* /mmage help - Show Commands
* /mmage icon - Show/Hide Minimap Icon
* /mmage portals - Show/Hide Portals from Menu
* /mmage reset - Reset Addon Settings
## Contributing ## Contributing
@@ -45,5 +56,4 @@ Let me know if you have any issues, I'll fix it if I am able to.
## Screenshots ## Screenshots
![MiniMage_TWOWa](https://github.com/user-attachments/assets/ed95ae31-580e-49ae-b469-eca9d63a2328) <img width="800" height="600" alt="ss1" src="https://github.com/user-attachments/assets/e1344159-2bd9-43a1-8edb-9b16e123d022" />
+2 -2
View File
@@ -1,6 +1,6 @@
--the only place MINIMAGE_VERSION should be set --the only place MINIMAGE_VERSION should be set
MINIMAGE_VERSION = "1.0"; MINIMAGE_VERSION = "1.5";
--[[ --[[
@@ -22,7 +22,7 @@ MINIMAGE_BUTTON_TOOLTIP0 = "MiniMage";
MINIMAGE_BUTTON_TOOLTIP1 = "Left-click to open MiniMage Cast Menu."; MINIMAGE_BUTTON_TOOLTIP1 = "Left-click to open MiniMage Cast Menu.";
MINIMAGE_BUTTON_TOOLTIP2 = "Right-click and drag to move this button."; MINIMAGE_BUTTON_TOOLTIP2 = "Right-click and drag to move this button.";
MINIMAGE_LABEL_TITLE = "Select Destination"; MINIMAGE_LABEL_TITLE = "MiniMage";
MINIMAGE_LABEL_PORTAL = "Portal"; MINIMAGE_LABEL_PORTAL = "Portal";
MINIMAGE_LABEL_TELEPORT = "Teleport"; MINIMAGE_LABEL_TELEPORT = "Teleport";