1. #1
    Deleted

    Code to change grid profile depending on party/raid size.

    As seen in http://www.mmo-champion.com/threads/...-sizes-in-Grid, it is shown how to change grid profiles based on a raid size of either 10 or more than 10.

    Here is the code:

    Code:
    local f=CreateFrame("Frame")
    local function set(p)
        if Grid.db:GetCurrentProfile() ~= p then Grid.db:SetProfile(p) end
    end
    f:SetScript("OnEvent",function(s,e) if GetNumRaidMembers() > 10 then set("raid25") else set("raid10") end end)
    f:RegisterEvent("RAID_ROSTER_UPDATE")
    How would one edit the code so that it would appropriately switch between Raid5, Raid10, Raid25 or Raid40? I'm not too good at coding, I have my own 'addon' working so that it runs this, I just wanted to expand upon it! Thanks

    P.S Could not link the thread directly due to post count, there's a space after the first "w".
    Last edited by mmocba105e19de; 2013-01-09 at 07:48 AM.

  2. #2
    Deleted
    Shameful self bump :3

  3. #3
    Deleted
    This should work:
    Code:
    local f = CreateFrame("Frame")
    local function set(p)
        if Grid.db:GetCurrentProfile() ~= p then Grid.db:SetProfile(p) end
    end
    f:SetScript("OnEvent",function(s,e)
        local numMembers = GetNumGroupMembers()
        if numMembers > 25 then
            set("raid40")
        elseif numMembers > 10 then
            set("raid25")
        elseif numMembers > 5 then
            set("raid10")
        else
            set("raid5")
        end
    end)
    f:RegisterEvent("GROUP_ROSTER_UPDATE")
    Sorry for not responding earlier, I saw your post earlier but kinda forgot.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •