Thread Tools Display Modes
03-07-11, 04:41 AM   #1
xtf
A Defias Bandit
Join Date: Mar 2011
Posts: 3
kgpanels druid stance script

I'm in need of OnLoad and OnEvent scripts that will have a certain frame active in Feral Cat form and not active in any other forms. I've tried all night to re-word scripts that were made for dk's/warriors but I'm left with nothing. Thanks in advance.
  Reply With Quote
03-07-11, 06:03 AM   #2
Nibelheim
local roygbi-
 
Nibelheim's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 1,600
Originally Posted by xtf View Post
I'm in need of OnLoad and OnEvent scripts that will have a certain frame active in Feral Cat form and not active in any other forms. I've tried all night to re-word scripts that were made for dk's/warriors but I'm left with nothing. Thanks in advance.
-- OnLoad
Code:
self:RegisterEvent("PLAYER_ENTERING_WORLD")
self:RegisterEvent("UPDATE_SHAPESHIFT_FORM")
self:RegisterEvent("UPDATE_SHAPESHIFT_FORMS")

-- OnEvent
Code:
local Stance = GetShapeshiftForm()
local _, Class = UnitClass("player")

if Class == "DRUID" and Stance == 3 then
	-- Frame Show
	self:Show()
else
	-- Frame Hide
	self:Hide()
end
Last time I checked Feral Cat was stance 3, so hopefully that works.
  Reply With Quote
03-07-11, 07:23 AM   #3
xtf
A Defias Bandit
Join Date: Mar 2011
Posts: 3
Yes. Thank you very much for the hasty response. Works perfect.
  Reply With Quote
03-09-11, 12:31 AM   #4
xtf
A Defias Bandit
Join Date: Mar 2011
Posts: 3
How about frames depending on spec 1 - spec 2 Show/Hide?
  Reply With Quote
03-09-11, 12:41 AM   #5
Nibelheim
local roygbi-
 
Nibelheim's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 1,600
Originally Posted by xtf View Post
How about frames depending on spec 1 - spec 2 Show/Hide?
-- OnLoad
Code:
self:RegisterEvent("PLAYER_LOGIN")
self:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED")
-- OnEvent
Code:
if GetActiveTalentGroup() == 1 then
	self:Show()
else
	self:Hide()
end
Use the same code in your second frame, except replace 1 with 2.

Last edited by Nibelheim : 03-09-11 at 01:14 AM.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » kgpanels druid stance script


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