1. #1
    Deleted

    Question KG Panels - Script Help

    If someone could help me find a solution to the below questions, it would be hugely appreciated. I've had a good search through various forums but haven't been able to find a script/solution that works yet.

    Firstly I would like to hide one of my panels on max level characters only. I've tried parenting it to my xpbar mod, but it doesn't work as I think it's still present at max level through the reputation tracking.

    If possible, I would also like to hide/show one of my other panels depending on whether a character is in the primary or secondary specialisation (or even specifically based on the active spec such as Balance or Retribution if that's achievable).

    Currently I've managed the above by using multiple profiles, but i'd like to streamline it into one if I can.

    Thanks

  2. #2
    To hide on max level characters:

    OnLoad:
    Code:
    self:RegisterEvent("PLAYER_ENTERING_WORLD")
    OnEvent:
    Code:
    if UnitLevel("player") == 90 then
    self:Hide()
    end
    To hide based on spec:

    OnLoad:
    Code:
    self:RegisterEvent("PLAYER_ENTERING_WORLD")
    self:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED")
    OnEvent:
    Code:
    if GetSpecialization() == 2 then
    self:Show()
    else
    self:Hide()
    end
    This shows the panel if you're in specialization 2 (specializations are numbered from top to bottom, for example- specialization 2 for Rogues is Combat, Protection for Paladins, etc. You can change that number to change for which spec the panel shows or you swap the Show() and Hide() to make it hide when you're in that spec.

  3. #3
    Deleted
    Both are working perfectly, thanks for the help!

  4. #4
    nevermind nevermind

  5. #5
    Scarab Lord Greevir's Avatar
    10+ Year Old Account
    Join Date
    May 2010
    Location
    Tamriel
    Posts
    4,351
    k, nevermind :P

Posting Permissions

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