Thread Tools Display Modes
02-05-14, 04:21 PM   #1
Tanadord
A Murloc Raider
Join Date: Feb 2014
Posts: 4
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
  Reply With Quote
02-06-14, 03:10 AM   #2
SlippyCheeze
A Kobold Labourer
Join Date: Oct 2012
Posts: 1
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.
  Reply With Quote
02-06-14, 04:52 PM   #3
Tanadord
A Murloc Raider
Join Date: Feb 2014
Posts: 4
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.
  Reply With Quote
02-14-14, 03:24 AM   #4
pelf
Sentient Plasmoid
 
pelf's Avatar
Premium Member
Join Date: May 2008
Posts: 133
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

Last edited by pelf : 02-14-14 at 03:58 AM. Reason: removed color escape, used parameters
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Prat Altnames module help

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off