vanilla-wow-addons – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
2 <html>
3 <head>
4 <meta name="GENERATOR" content="PageBreeze Free HTML Editor (http://www.pagebreeze.com)">
5 <title>FlexBar Advanced Topics - Events, Delays and Conditions</title>
6 </head>
7 <body bgcolor="#ffffff">
8 <p align="center"><strong><em><font size="5">Advanced Topics -
9 Events, Delays and Conditions</font></em></strong></p>
10 <p align="left"><strong>Introduction:</strong> &nbsp; In addition
11 to very configurable buttons, FlexBar keeps track of&nbsp;dozens of different game
12 states and raises an event (think trigger) when they change.&nbsp; This can be
13 gaining a target, losing a buff, getting poisoned, changing forms, losing
14 health.&nbsp; Many of these events can come from many different sources - health
15 events can come from you ('player') your pet ('pet') your group mates ('party1',
16 'party2', 'party3', 'party4') or your target ('target').&nbsp; In FlexBar
17 parlance this is the Target of the event.&nbsp; It's not the best way to refer
18 to it, but it's what I started with and we're stuck with it :)</p>
19 <p align="left">Taking action on these events is the core of what makes flexbar so
20 versatile - you can have your combat buttons show only when you need them, you
21 can create r-click button menus, pop-bars and a whole slew of other things by
22 taking actions on events.</p>
23 <p align="left">To further enhance this capability, FlexBar can incorporate a
24 delay in executing the command and can decide to execute/not execute based on
25 game conditions at the time of the event.</p>
26 <p align="left"><strong>Examples: </strong><em>Popbar, Combat Sensitive Buttons,
27 R-Click menus, Buff-warnings:</em></p>
28 <p align="left">PopBar (use the Scripts editor to do this example</p>
29 <p align="left">Group Button=1-12 Anchor=1<br>VerticalGroup
30 Group=1 Width=4<br>Show Group=1 On='MouseEnterGroup' Target=1<br>Hide Group=1
31 On='MouseLeaveGroup' Target=1</p>
32 <p align="left">This will create a 4 button wide, 3 button high group that will
33 popup when you mouse over it and hide when you mouse away from it.&nbsp; In
34 order to move it you'll want to type /flexbar show group=1 and move it with the
35 handle without mousing into it - as once you do it will hide on the way out and
36 you won't be able to grab the handle).</p>
37 <p align="left">Combat Sensitive Buttons - or show only when I might be in a
38 fight:</p>
39 <p>Group Button=1-12 Anchor=1<br>VerticalGroup Group=1
40 Width=6<br>Show Group=1 On='StartCombat' Target='player'<br>Show Group=1
41 On='GainTarget' Target=['hostile' 'neutral']<br>Show Group=1
42 On='TargetReactionChanged' Target=['hostile' 'neutral']<br>Hide Group=1 On='EndCombat' Target='Player'</p>
43 <p>Right Click Menus -&nbsp;a single button that pops a radial menu when
44 Right-clicked.&nbsp; The menu disappears when a button is clicked or the mouse
45 leaves the group</p>
46 <p>Group Button=1-7 Anchor=1<br>CircleGroup Group=1<br>Show
47 Button=8<br>MoveRel Button=8 Trgbtn=7<br>Group Button=1-8 Anchor=8<br>Hide
48 Button=1-7<br>Advanced Button=8 State='on'<br>Show Button=1-7
49 On='RightButtonClick' Target=8<br>Hide Button=1-7 On='LeftButtonClick'
50 Target=1-7<br>Hide Button=1-7 On='RightButtonClick' Target=1-7<br>Hide
51 Button=1-7 On='MouseLeaveGroup' Target=8</p>
52 <p>This will create an 8 button group with 7 buttons hidden - when you right
53 click the visible button, the others&nbsp;will pop up in a circle over it.&nbsp;
54 Drag the group by the visible button.</p>
55 <p>Buff Warnings - Ever get tired of realizing in the middle of a fight that
56 you've been doing it without Blessing of Might up?</p>
57 <p>Put&nbsp;Blessing of Might&nbsp; on button 1</p>
58 <p>Show Button=1 On='LoseBuff' Target='Blessing of
59 Might'<br>Hide Button=1 On='GainBuff' Target='Blessing of Might'</p>
60 <p><strong>Delays:&nbsp; </strong>Sometimes we want to take an action a set
61 amount of time after an event.&nbsp; An example of this is that, after a dodge
62 Overpower is usable, but only for a set amount of time (4 seconds or so).&nbsp;
63 To handle this we might put Overpower on button 1 then</p>
64 <p>/flexbar Show Button=1 on='TargetCombat' Target='Dodge'</p>
65 <p>/flexbar Hide Button=1 on='TargetCombat' Target='Dodge' In=40</p>
66 <p>In= is the delay in tenths of a second.</p>
67 <p><strong>Conditions:&nbsp; </strong>Because of the nature of events, you are
68 given only one at a time - there is no event for when an ability is both in
69 range and has enough mana.&nbsp; To do this we must check the other condition on
70 the event:</p>
71 <p>/Flexbar Show Button=1 On='EnoughMana' Target=1 If='InRange&lt;1&gt;'</p>
72 <p>/Flexbar Show Button=1 On='NowInRange' Target=1 If='EnoughMana&lt;1&gt;'</p>
73 <p>Note that we have to put a command in for both events we are interested in to
74 cover the 2 circumstances (1.&nbsp; We were already in range and just gained
75 enough mana for the ability and 2.&nbsp; We already had enough mana and just
76 moved into range).</p>
77 <p><strong>Order of Execution:</strong>&nbsp; If you look in the event list
78 (either in the event editor or through /flexbar listevents) you will see that
79 they are in a specific order - this is the order that the commands are processed
80 in on a given event -- the lower numbered commands will be processed first.</p>
81 <p>Also, events &gt; delay &gt; condition is the order in a command:</p>
82 <p>IE: /flexbar show button=1 on='losttarget' in=5
83 if='manabelow50&lt;"player"&gt;' will process as follows:</p>
84 <p>1.&nbsp; When you first type it in, an event is added to the event list.</p>
85 <p>2.&nbsp; When the event fires, the command is sent to the command processor
86 without the on= on it, at this time it executes any delay</p>
87 <p>3.&nbsp; At the end of the delay the command checks the If= condition -- if
88 it is true at this time, the command executes.</p>
89 <p><strong>Commands that can be executed On=, If=,
90 In=</strong>&nbsp;</p>
91 <p>"show", "hide", "fade", "shade", "scale", "moveabs", "moverel",
92 "movetomouse", "remap", "echo", "use", "runscript", "runmacro", "text", "text2",
93 "raise", "settexture", "shadetext", "shadetext2"<br></p>
94 </body>
95 </html>