Thread Tools Display Modes
08-28-06, 04:54 PM   #21
Tuller
A Warpwood Thunder Caller
 
Tuller's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 91
Code:
BBar.SetAlpha(class, 0.5)
BBar.SetAlpha(9, 1)
class and 9 are barIDs, you need to convert them to bars. To do this, use the function BBar.IDToBar(barID):
Code:
BBar.SetAlpha(BBar.IDToBar("class"), 0.5)
BBar.SetAlpha(BBar.IDToBar(9), 1)
Also, the variable, bar, can be used for whatever bar a script is being run for. In the case of your first script, which runs for the class bar, it would look like this:
Code:
BBar.SetAlpha(bar, 0.5)
BBar.SetAlpha(BBar.IDToBar(9), 1)
  Reply With Quote
08-28-06, 05:30 PM   #22
mornaistar
A Deviate Faerie Dragon
 
mornaistar's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 15
is it possible to make 1 button (1 bar with size of 1) to toggle other bar? so it will show when u click and hide when u click again?
  Reply With Quote
08-28-06, 05:51 PM   #23
blubbo
A Kobold Labourer
Join Date: Apr 2006
Posts: 1
is it possible to make 1 button (1 bar with size of 1) to toggle other bar? so it will show when u click and hide when u click again?
That only needs a bar with a macro on it containing /bob toggle # so yes, it's doable.
  Reply With Quote
08-28-06, 05:53 PM   #24
moniker
A Defias Bandit
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 3
Originally Posted by Tuller
I'll probably end up making a plugin to add those events. I'm fairly sure that its based on watching a skill for changes in usability.
I think you're right, and I think this is how DAB handles it. I have to specify which of the buttons actions I want to do "range checking" on, and based on "in range" or "out of range", switch pages (in my case, the hunter's 'wing clip').

Thanks for considering adding this functionality!
  Reply With Quote
08-28-06, 06:57 PM   #25
Khahli
A Defias Bandit
Join Date: Aug 2006
Posts: 2
Originally Posted by Tuller
Code:
BBar.SetAlpha(bar, 0.5)
BBar.SetAlpha(BBar.IDToBar(9), 1)
Thanks Tuller.
  Reply With Quote
08-29-06, 07:24 AM   #26
Scae
A Deviate Faerie Dragon
Join Date: Jan 2006
Posts: 11
But I think you just want to make it so that if you're on a certain stance, then bar 1 and bar 2 don't change pages. Here's how that'll look:
Code:
if GetBonusBarOffset() == <whatever your default stance is> 
then BActionBar.SetStanceOffset(bar.id, 0) 
else BActionBar.SetStanceOffset(bar.id, GetBonusBarOffset()) 
end
Thanks Tuller, that helped a lot. I'm still kinda confused the logic of it though. I managed to get it working on my warrior, however I can't seem to get it working on my druid. I try it and the bars change for some of my forms and not others.

My caster form is in fact no aura at all, so I assume that the <default stance> is 0? Also two of my forms (travel and water) don't change the bars at all, so would they be included in the offset?
  Reply With Quote
08-29-06, 07:54 AM   #27
Tuller
A Warpwood Thunder Caller
 
Tuller's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 91
Originally Posted by Scae
Thanks Tuller, that helped a lot. I'm still kinda confused the logic of it though. I managed to get it working on my warrior, however I can't seem to get it working on my druid. I try it and the bars change for some of my forms and not others.

My caster form is in fact no aura at all, so I assume that the <default stance> is 0? Also two of my forms (travel and water) don't change the bars at all, so would they be included in the offset?
Yes, druids aren't always in a stance, so their default is 0. Travel, moonkin, and water do not change this.
  Reply With Quote
08-29-06, 08:41 AM   #28
Scae
A Deviate Faerie Dragon
Join Date: Jan 2006
Posts: 11
Ahah! That worked. It also didn't help that bear and cat form are differently numbered stances compared to defensive and berserker.

Thanks Tuller! Works great now
  Reply With Quote
08-30-06, 09:19 PM   #29
kogepan81
A Murloc Raider
Join Date: Aug 2006
Posts: 4
warlock question

so I got tired of the rediculously slow load times caused by DAB and decided to give bongos a try, the one thing I'm really missing and can't quite figure out how to do is work making amplify curse cast before curse of agony when it's available... I'm completely inept at lua and macros :\ I looked at the wow API stuff and wow wiki but it may as well be in hiroglyphics for me.. it would make as much sense... if anyone could point me in the right direction with some scripting help that would be fantastic. What I had in DAB was a control set on the action (say it's action button 13) so that if the action was Useable (mana, cooldown, etc) it would change the action to what was assigned for 13, Amplify Curse. if it was NOT useable it would change to what was assigned to action 25, Curse of Agony. this was great because it would automatically change it back and forth for me, I just had to push the button twice. Is this possible at all in bongos?

Thanks ahead of time.
  Reply With Quote
08-31-06, 11:25 AM   #30
Scae
A Deviate Faerie Dragon
Join Date: Jan 2006
Posts: 11
You can do that all in a macro Kogepan.

/script f=GetSpellCooldown(49, 4)
if (f<=0) then CastSpellByName("Amplify Curse");
else CastSpellByName("Curse of Agony");
end;

The (49, 4) refers to the spell numer in your spellbook and the page it's on. So you'll have to count through your spellbook (from the very first spell) to until the amplify curse spell.

What the macro will do is check amplify curse for a cooldown. If it's not on cooldown it will cast that. If it is on cooldown then it will cast Curse of Agony. To cast both you have to press it twice (not too quickly, cos there's some lag involved, give it 0.5 of a second before the second press).

P.S. Macro's should be all one line. I only seperated it out so it would clearer what was happening in the macro.



Tuller:

Is there a on mouseover function? I want thinking of making my key/bag bars invisible unless they were moused over.


Bar: key, bag
Event: MouseIsOver

if (MouseIsOver(bagbar)) then
BBar.SetAlpha(bar, 1)
else
BBar.SetAlpha(bar, 0)

Would that work?

Last edited by Scae : 08-31-06 at 11:31 AM.
  Reply With Quote
08-31-06, 06:16 PM   #31
Tuller
A Warpwood Thunder Caller
 
Tuller's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 91
Is there a on mouseover function? I want thinking of making my key/bag bars invisible unless they were moused over.
No, there is not. I'm going to have to hardcode it.
  Reply With Quote
09-01-06, 04:36 AM   #32
Haraald
A Defias Bandit
Join Date: Sep 2006
Posts: 2
Priest - Shadow Form

Hi

First of all, I want to say that Bongos is the action bar's Replacement I've been looking for for a long time.

As Priest, I'd like to switch my main Action bar (bar 1) when I change into Shadow Form and inversely.
Is there a way to do this ?

Thanks in advance.
  Reply With Quote
09-01-06, 07:25 AM   #33
kogepan81
A Murloc Raider
Join Date: Aug 2006
Posts: 4
Originally Posted by Scae
You can do that all in a macro Kogepan.

/script f=GetSpellCooldown(49, 4)
if (f<=0) then CastSpellByName("Amplify Curse");
else CastSpellByName("Curse of Agony");
end;

The (49, 4) refers to the spell numer in your spellbook and the page it's on. So you'll have to count through your spellbook (from the very first spell) to until the amplify curse spell.

What the macro will do is check amplify curse for a cooldown. If it's not on cooldown it will cast that. If it is on cooldown then it will cast Curse of Agony. To cast both you have to press it twice (not too quickly, cos there's some lag involved, give it 0.5 of a second before the second press).

P.S. Macro's should be all one line. I only seperated it out so it would clearer what was happening in the macro.



Tuller:

Is there a on mouseover function? I want thinking of making my key/bag bars invisible unless they were moused over.


Bar: key, bag
Event: MouseIsOver

if (MouseIsOver(bagbar)) then
BBar.SetAlpha(bar, 1)
else
BBar.SetAlpha(bar, 0)

Would that work?
This macro works brilliantly, thanks. My only question is, since Bongos does have the scripting option is there any way to work it in that way since that's how I was trying to do it? I mean... the script in the macro is just lua right? I just don't know how to tie it into that one button or what event that would relate to... hehe, I hate not taking advantage of an option provided, even when there is a perfectly useable way around it. Just the fact that I can't make it work myself drives me nuts
  Reply With Quote
09-01-06, 09:45 AM   #34
Tuller
A Warpwood Thunder Caller
 
Tuller's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 91
I just don't know how to tie it into that one button or what event that would relate to... hehe, I hate not taking advantage of an option provided, even when there is a perfectly useable way around it. Just the fact that I can't make it work myself drives me nuts
The macro is the only real way to do it.

As Priest, I'd like to switch my main Action bar (bar 1) when I change into Shadow Form and inversely.
Is there a way to do this ?
Yes, and it requires the addon, IsBuffActive.
Code:
event: PLAYER_AURAS_CHANGED
action:
if IsBuffActive("Shadowform") then
    BActionBar.SetStanceOffset(bar, 6)
else
    BActionBar.SetStanceOffset(bar, 0)
end
Run on Load:  checked

Last edited by Tuller : 09-06-06 at 07:24 PM.
  Reply With Quote
09-03-06, 03:46 AM   #35
foxpur
A Murloc Raider
Join Date: Aug 2006
Posts: 4
Scripting

Druid issue:

Bar 1 = normal
Bar 2 = Cat form commands
Bar 3 = Bear form commands

Using
Code:
bar:      1
event:   UPDATE_BONUS_ACTIONBAR
action:
BActionBar.SetStanceOffset(bar.id, GetBonusBarOffset())
I managed to make it so that Bar 1 swapped out for bar 2 when I changed to Cat form, nice, works like a dream. But, when I change to Bear form that doesn't work because bar 3 is not the offset...

So how do I script in the change so that Cat form gets bar 2 (like it does now) and Bear form gets bar 3 (and for those in Moonkin I would assume they also need an additional bar).

Haven't tested this yet but:

Code:
 
If GetShapeshiftFormInfo(3) then
   BActionBar.SetStanceOffset(bar.id, GetBonusBarOffset())
else
   BActionBar.SetStanceOffset(1,3)
However, my idea there doesn't take into account Moonkin form. I think that code is along the idea of what I am looking for...

Just for reference for other people TRYING try write thier own code bits:

relates to the different forms:

Druid

* 1 = Bear/Dire Bear Form
* 2 = Aquatic Form
* 3 = Cat Form
* 4 = Travel Form
* 5 = Moonkin Form

Rogue

* 1 = Stealth

Warrior

* 1 = Battle Stance
* 2 = Defensive Stance
* 3 = Beserker Stance

Last edited by foxpur : 09-03-06 at 04:23 AM.
  Reply With Quote
09-03-06, 05:20 AM   #36
Haraald
A Defias Bandit
Join Date: Sep 2006
Posts: 2
Code:
event: PLAYER_AURAS_CHANGED
action:
if UnitHasBuff("Shadowform") then
    BActionBar.SetStanceOffset(bar, 6)
else
    BActionBar.SetStanceOffset(bar, 0)
end
Run on Load:  checked
Thank you very much, Tuller !
I'll try it as soon as possible !
  Reply With Quote
09-03-06, 11:07 AM   #37
Arbiter
A Murloc Raider
Join Date: Mar 2005
Posts: 4
Is there any event to check wether i'm in raid or not ? i'm trying to create an event for bongos so 1 particular action bar (Which has all my raid macros) shows when in raid, but gets hidden when i'm out of raid or in a party.


Any ideas?
  Reply With Quote
09-05-06, 03:41 AM   #38
Minou
A Fallenroot Satyr
Join Date: Jan 2006
Posts: 27
How can I hide/show a bar when Player or Target gains a buff/debuff?

Bar 6
Action UNIT_AURA

if UNIT_AURA"Player"= "Demon Armor" then
BarShow()
else
BarHide()
end

Does not work

Could somebody post the correct syntax here please?
  Reply With Quote
09-06-06, 07:56 AM   #39
Zephra
A Murloc Raider
Join Date: Aug 2006
Posts: 4
Emergency bar

Tuller,

Totally new to this stuff, but I was hoping for a fast way to configure bongos to display a bar containing potions/bandages etc to pop up at a pre-defined health percentage. Maybe make the buttons enlarged etc to make them noticed and easier to activate. This would be a very cool feature that I am sure a ton of people would use.

Cheers,
Zephra
  Reply With Quote
09-06-06, 08:01 AM   #40
trefaes
A Murloc Raider
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 7
Is it possible to have another bar toggle when I click an action bar button?
I've tried creating a macro like
Code:
/script if(showBar = true) then showBar = false else showBar = true end
But then I have no idea if there is an event raised when I click that action bar button so I can use it to display the bar. Any ideas on how I can achieve this?
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » Released AddOns » Bongos - Scripting


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