WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=3)
-   -   Prat Altnames module help (https://www.wowinterface.com/forums/showthread.php?t=48907)

Tanadord 02-05-14 04:21 PM

Prat Altnames module help
 
Hi!
I downloaded the Prat 3.0 addon yesterday and love it. A lot of the features it has are exactly what i was looking for.

The main reason i downloaded it was for the Altnames module (im terrible at remembering all my guildies various alts :s)

The problem im having is that i cant seem to link peoples alts to their mains without opening the addon settings and doing it that way which is quite cumbersome to do every time. Is there some kind of /command to be able to do it in chat? or a way of doing it without having to go into the settings everytime?

Thanks
A person surrounded by altoholics

SlippyCheeze 02-06-14 03:10 AM

I hit the same pain. My solution was targeted. The "alts" addon uses lib alts just like prat does but provides a much better ui for setting mains. I use that and prat is now just a display system for me.

That works perfectly for me.

Tanadord 02-06-14 04:52 PM

Thanks for the suggestion. If i am unable to to resolve the issue using just Prat then this addon you mention might be worth a go.

pelf 02-14-14 03:24 AM

This is dry-coded, so it might not be 100% right, but something like this should add the slash commands you're looking for. This would have to be put into an addon or run at load-time by something like WowLua or _DevPad.

Code:

local function PrintError(message)
        DEFAULT_CHAT_FRAME:AddMessage(msg, 1, 0, 0)
end

local function GetAltModule()
        if not Prat then
                PrintError("Prat is not loaded!")
                return
        end
       
        local module = Prat:GetModule("AltNames", true)
       
        if not module then
                PrintError("The AltNames module is not loaded!")
                return
        end
       
        return module
end

SLASH_PRAT_ADDALT1 = "/addalt"
SlashCmdList["PRAT_ADDALT"] = function(args)
        local alt, main = strmatch(args, '(%S+)%s+(%S+)')
       
        if not main or not alt then
                PrintError("Invalid arguments to /addalt! Syntax is: /addalt ALT MAIN")
                return
        end

        local altModule = GetAltModule()       
        if not altModule then return end
       
        altModule:addAlt(alt.." "..main)       
end

SLASH_PRAT_DELALT1 = "/delalt"
SlashCmdList["PRAT_DELALT"] = function(alt)
        if not alt then
                PrintError("Invalid arguments to /delalt! Syntax is : /delalt ALT")
                return
        end
       
        local altModule = GetAltModule()       
        if not altModule then return end
       
        altModule:delAlt(alt)
end



All times are GMT -6. The time now is 08:44 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI