Thread Tools Display Modes
07-01-11, 11:20 AM   #1
Kendian
A Molten Giant
 
Kendian's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 614
Spec swap script

Hiyas, all I'm looking for a script for KG panels, that will change when I swap specs. I use sStats for all my data feeds, and can't bring myself to install fortress, or chocolate bar, etc, for just one feed. So a script (for KG Panels) that will change my spec. I THINK I'll be able to muddle my way thru to mimicing (sp?) a data feed if I could get this core script for OnClick to let me swap specs.
Mebbe I should try to insert a /runscript macro into an OnClick script for KG Panels. Gah, the sheer amount of things I do not know, is horrifying
My thanks, in advance, for any/all help, this community is incredible
__________________
  Reply With Quote
07-01-11, 11:27 AM   #2
Verttex
Super Monkey
 
Verttex's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 297
/run if( GetActiveTalentGroup() == 1 ) then DEFAULT_CHAT_FRAME:AddMessage("Spec1...");SetActiveTalentGroup(2) else DEFAULT_CHAT_FRAME:AddMessage("Spec2...");SetActiveTalentGroup(1) end
/in 6 /equipset [spec:2]Eq1;Eq2
__________________

Last edited by Verttex : 07-01-11 at 11:27 AM. Reason: http://www.wowwiki.com/Useful_macros#Swap_Current_Dual-Spec_Talent
  Reply With Quote
07-01-11, 06:35 PM   #3
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,326
I use this macro to swap specs. The /usetalents command is provided in the default UI.
Code:
/usetalents [spec:1] 2;1
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
07-01-11, 07:03 PM   #4
Kendian
A Molten Giant
 
Kendian's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 614
Originally Posted by SDPhantom View Post
I use this macro to swap specs. The /usetalents command is provided in the default UI.
Code:
/usetalents [spec:1] 2;1
So how would I turn this into a kgpanels OnClick script? Aaah, nvm, thanks much for your help. Will try to see if I can work this.
__________________
  Reply With Quote
07-01-11, 08:00 PM   #5
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,326
I've never used kgPanels, and looking through the code, it looks like it takes in Lua code to run a script. I can provide code to feed into the addon, but I wouldn't know where to go to put it in. This is made to run in version 1.5.4.4 if it makes any difference. There's an added check because kgPanels appears to register CLICK events as 2 handler functions. Without checking a local variable it injects into the user script, it'll run the code twice in one click.

Code:
if released then SetActiveTalentGroup(GetActiveTalentGroup()%2+1); end
Note: released appears to be a local defined inside kgPanels to determine that it's running from the OnMouseUp handler.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 07-01-11 at 08:03 PM.
  Reply With Quote
07-03-11, 01:56 PM   #6
Kendian
A Molten Giant
 
Kendian's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 614
Originally Posted by SDPhantom View Post
Code:
if released then SetActiveTalentGroup(GetActiveTalentGroup()%2+1); end
Note: released appears to be a local defined inside kgPanels to determine that it's running from the OnMouseUp handler.
This worked PERFECTLY. My thanks!
__________________
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Spec swap 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