View Single Post
05-12-09, 04:49 PM   #1
Manube
A Murloc Raider
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 4
Reloacating raid frames via slash

I have been trying to put together a slash command to change my frame position biased on my roll in a raid.

This is how I've attempted to go about doing this, and I also have the Ideal.config saved in the saved variables folder via the TOC. However I cannot seem to make it save the new Ideal.config values when the reloadUI action occurs. Any help would be greatly appreciated.

Code:
if (Ideal == nil) then
Ideal = {config = {
    plx = -175,
    ply = -150,
    rax = -200,
    ray = -260,
    }}
end
Code:
SlashCmdList['IDEAL'] = function(id)
	if(id and (id=='tank' or id=='dps'))then
		Ideal.config.plx = -175
		Ideal.config.ply = -150
		Ideal.config.rax = -200
		Ideal.config.ray = -260
		ReloadUI()
	elseif(id and id=='heal10') then
		Ideal.config.plx = -175
		Ideal.config.ply = -150
		Ideal.config.rax = -20
		Ideal.config.ray = -120
		ReloadUI()
	elseif(id and id == 'heal25') then
		Ideal.config.plx = -175
		Ideal.config.ply = -150
		Ideal.config.rax = -200
		Ideal.config.ray = -260
		ReloadUI()
	else
		print("Input /ideal followed by your raid assignment: tank, dps, heal10, heal25")
	end
end
SLASH_IDEAL1='/ideal'
Do I have to do something special to pull or insert values into the saved variables folder?
  Reply With Quote