Close
Page 1 of 3 1 2 3 LastLast
Showing results 1 to 10 of 22

Hybrid View

  1. #1

    Default Pitbull4 + custom group

    Code & Download UPDATED (23.02.2011)
    In search for a nice addon which support custom group (if your group splitted up in bgs or raids) i modified my pitbull4 (i dont like grid).
    I am a newbie @ lua, but this modifications work for me
    Pitbull-Version: v4.0.0-beta25

    -----------------------------

    You can download the code from here: http://tinyurl.com/y4xspgl (tinyurl, cuz i dont like to be existent for thousand years in searchengines)
    You only have to replace the names of your toons in PitBull4\GroupHeader.lua on line 311

    -----------------------------

    ... Or you can edit the pitbull code for yourself:


    File: PitBull4\Options\Units.lua
    search for:
    Code:
    MAINTANK = L["Main tanks"],


    add a line below:

    Code:
    MULTIBOX = L["Multibox"],
    -----------------------------

    search for:
    Code:
    if start == 'MAINTANK' or start == 'MAINASSIST' then
    replace with:
    Code:
    if start == 'MAINTANK' or start == 'MULTIBOX' or start == 'MAINASSIST' then
    -----------------------------



    File: PitBull4\GroupHeader.lua:

    search for:
    Code:
    local tank_list = {}
    local function get_main_tank_name_list()
        local main_tanks
        if oRA3 then
            main_tanks = oRA3:GetSortedTanks()
        elseif oRA then
            main_tanks = oRA.maintanktable
        else
            main_tanks = CT_RA_MainTanks
        end
        if main_tanks then
            wipe(tank_list)
            for i = 1, 10 do
                local v = main_tanks[i]
                if v then
                    tank_list[#tank_list+1] = v
                end
            end
            local s = table.concat(tank_list, ',')
            if s ~= "" then
                return s, #tank_list
            end
        end
        if PitBull4.leaving_world or not UnitInRaid("player") or not UnitInParty("player") then
            -- Not in a raid or a party, so no main tank list.  We have
            -- to bail out here becuase WoW whines with a You are not in a party
            -- message to the user now.  /sigh
            return nil, 0
        else
            return nil, count_returns(GetPartyAssignment("MAINTANK"))
        end
    end
    add this code below:
    Code:
    -- multibox group
    local multibox_list = {}
    local function get_multibox_name_list()
    local multibox_units = { UnitName("Reyleniken"),UnitName("Reyvilan"),UnitName("Reynohen"),UnitName("Reyjouzyn"),UnitName("Reyrazchak")}
    
    
    if multibox_units then
        wipe(multibox_list)
            for i = 1, 5 do
                local v = multibox_units[i]
                if v then
                    multibox_list[#multibox_list+1] = v
                end
            end
            local s = table.concat(multibox_list, ',')
            if s ~= "" then
                return s, #multibox_list
            end
        end
        if PitBull4.leaving_world or not UnitInRaid("player") or not UnitInParty("player") then
            -- Not in a raid or a party, so no main tank list. We have
            -- to bail out here becuase WoW whines with a You are not in a party
            -- message to the user now. /sigh
            return nil, 0
        else
            return nil, count_returns(GetPartyAssignment("MULTIBOX"))
        end
    end


    -----------------------------

    Search for:
    Code:
        if group_filter == "MAINTANK" then
            name_list = get_main_tank_name_list()
        end


    add this code below:

    Code:
        if group_filter == "MULTIBOX" then
            name_list = get_multibox_name_list()
        end


    -----------------------------

    search for:
    Code:
    if start == "MAINTANK" or start == "MAINASSIST" then
    replace with:
    Code:
    if start == "MAINTANK" or start == "MULTIBOX" or start == "MAINASSIST" then
    -----------------------------



    File: PitBull4\Options\Units.lua

    search for:
    Code:
                    disabled = disabled,
            hidden = function(info)
                local db = get_group_db()
                
                local unit_group = db.unit_group
                local party_based = unit_group:sub(1, 5) == "party"
                
                 return party_based -- only show in raid
            end
    replace with:
    Code:
            disabled = disabled,
            hidden = function(info)
                local db = get_group_db()
                
                local unit_group = db.unit_group
                local party_based = unit_group:sub(1, 5) == "party"
                
                 return -- only show in raid
            end
    -----------------------------

    File: PitBull4\GroupHeader.lua:
    search for:
    Code:
    local group_filter = not party_based and group_db.group_filter or nil


    replace with:
    Code:
    local group_filter = group_db.group_filter or nil
    -----------------------------




    File: PitBull4\Main.lua

    add somewhere in the code (maybe line 1149):
    Code:
    function refreshMultiboxingList_OnEvent()
            for header in PitBull4:IterateHeadersForSuperUnitGroup("raid") do
                local group_db = header.group_db
                if group_db and group_db.group_filter == "MULTIBOX" then
                    header:RefreshGroup()
                end
            end    
            for header in PitBull4:IterateHeadersForSuperUnitGroup("party") do
                local group_db = header.group_db
                if group_db and group_db.group_filter == "MULTIBOX" then
                    header:RefreshGroup()
                end
            end            
    end
    
    local MB_frame_party = CreateFrame("Frame","refreshMultiboxingList",UIParent)
    MB_frame_party:SetScript("OnEvent", refreshMultiboxingList_OnEvent)
    MB_frame_party:RegisterEvent("PARTY_MEMBERS_CHANGED")
    
    local MB_frame_raid = CreateFrame("Frame","refreshMultiboxingList",UIParent)
    MB_frame_raid:SetScript("OnEvent", refreshMultiboxingList_OnEvent)
    MB_frame_raid:RegisterEvent("RAID_ROSTER_UPDATE")
    ------------------------------

    File: PitBull4\GroupHeader.lua:
    search for:
    Code:
            if party_based then
                self.super_unit_group = "party"
                self.unitsuffix = unit_group:sub(6)
                self:SetAttribute("showRaid", nil)
                self:SetAttribute("showParty", true)
                self:SetAttribute("showPlayer", include_player and true or nil)
                self:SetAttribute("showSolo", show_solo and true or nil)
                self:SetAttribute("groupFilter", nil)
            else
    replace with:
    Code:
            if party_based then
                self.super_unit_group = "party"
                self.unitsuffix = unit_group:sub(6)
                self:SetAttribute("showRaid", nil)
                self:SetAttribute("showParty", true)
                self:SetAttribute("showPlayer", include_player and true or nil)
                self:SetAttribute("showSolo", show_solo and true or nil)
                if name_list then
                print ("Namelist"..name_list)
                    self:SetAttribute("groupFilter", nil) 
                    self:SetAttribute("nameList", name_list)
                else
                    self:SetAttribute("groupFilter", group_filter)
                    self:SetAttribute("nameList", nil)
                end            
            else
    search for:
    Code:
    self:SetAttribute("sortMethod", sort_method)
    replace with:
    Code:
    sort_method = "NAMELIST"
    self:SetAttribute("sortMethod", sort_method)
    for Raid:
    1. in pitbull you choose on the left side "groups"
    2. create a new group and activate it, call it "multiboxing_raid" or smt
    3. set dropdown to "Raid"
    4. Choose Tab "Filter" turn on all raid types and set the dropdownbox to "Multibox"


    for party only(if you delete the code in options\units.lua i shown above)
    1. in pitbull you choose on the left side "groups", call it "multiboxing_party" or smt
    2. create a new group and activate it (and: i prefer to disable the playerframe under the menue single units and turn on the playerframe in partymode)
    3. set dropdown to "Group"
    4. Choose Tab "Filter" turn on group and turn off all raidtypes and set the dropdownbox to "Multibox"


    There is 1 problem:
    If you form a raid, you wont get an update on multibox filtered raidframe until a player leave, join, switch to another group or you type /reloadui.
    But when the raidframes appears no further issues are present.
    Last edited by Feehza : 02-23-2011 at 06:54 PM

  2. #2

    Default

    I've been looking for something like this for a long time, thanks a ton.
    Long time hydra ....
    Asynk, Bysnk, Cysnk, Dsynk
    <Illidan Server - US-Rampage BG top 5's rating 2321-S8>
    <Glory of the Hero complete x5(1/27/09]>





    Retired- Conlaenn (6box)<Saryrn server - Everquest>

  3. #3

    Default

    Quote Originally Posted by mrmcgee21 View Post
    I've been looking for something like this for a long time, thanks a ton.
    If you have some problems with it, tell me.
    I have modified a lot since yesterday + i uploaded the necessary files on my webspace (look above).

  4. #4

    Default

    Ok seems Im the only one who dosn't mind sounding stupid but what exactly does this do?

    Are you saying this will load a different set of pitbull action bars if you are in a raid and then another set if you are in your group?

    So one set of bars for

    maintank and another for mainassist and yet another for multibox group?

    28 BoXXoR RoXXoR Website
    28 Box SOLO Nalak 4m26s! Ilevel 522! GM 970 Member Guild! Multiboxing Since Mid 2001!

  5. #5

    Default

    Quote Originally Posted by Sam DeathWalker View Post
    Ok seems Im the only one who dosn't mind sounding stupid but what exactly does this do?

    Are you saying this will load a different set of pitbull action bars if you are in a raid and then another set if you are in your group?

    So one set of bars for

    maintank and another for mainassist and yet another for multibox group?

    Hmmm approximate ...
    You can choose for partylayout and raidlayout your predefined list of names, so you have your toons always in your partyframe and always in the right sort.
    For example: In BG all your toons are splited up in different raidgroups. You just go to groups ->Tab:filter and choose not Maintank or Mainassist, you choose Multibox.
    But remember, you have to put the Names of your toons in PitBull4\GroupHeader.lua.

  6. #6

    Default

    I'm haven't written LUA before so forgive me for my ignorance. Is there a way this could be written in a modular way so that it exists as it's own addon and works with pitbull as a plug-in of sorts?

    EDIT: Submitted this post to the pitbull dev page as a feature request. (http://www.wowace.com/addons/pitbull...custom-groups/) Might get better notice if others went behind me and voiced their support.
    Last edited by lacitpo : 04-19-2010 at 09:53 AM

  7. #7

    Default

    Quote Originally Posted by lacitpo View Post
    I'm haven't written LUA before so forgive me for my ignorance. Is there a way this could be written in a modular way so that it exists as it's own addon and works with pitbull as a plug-in of sorts?

    EDIT: Submitted this post to the pitbull dev page as a feature request. (http://www.wowace.com/addons/pitbull...custom-groups/) Might get better notice if others went behind me and voiced their support.


    Download the edited files from here: http://tinyurl.com/y4xspgl
    Put the files into your AddOns\PitBull4\

    You only have to edit the line 334 in GroupHeader.lua for your real toon names
    Thats not so hard, i assume you didnt see the download link

    I am so lua-newbish, i dont think i am able to code an module for it. (I give it a try the next days)
    Its more a hack not clean nice modification.



    BTW: Somewhere i read a statement of a pitbull programer "no atm we dont plan to include custom groups"
    Last edited by Feehza : 04-19-2010 at 10:30 AM

  8. #8

    Default

    I'll download you're patch when I get home. I just think about when an update for pitbull 4 comes out and I accidently overwrite it, or you're not around to to update the code. I'm always wary to begin relying on something that may not be available to me in the future.

  9. #9

    Default bump but links dont work

    Nice work. Thank you for posting but can you update the link. It is dead.

  10. #10

    Default

    Quote Originally Posted by Nsaeyn View Post
    Nice work. Thank you for posting but can you update the link. It is dead.
    Sorry, should work again.

Tags for this Thread

Posting Rules

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