Ovale Spell Priority

Documentation

The basis

If a default script is available for your class, you should have one or two icons on your screen. You can move these icons by dragging them.

If you click on the icon, you hide or show some check boxes and/or list boxes. These allow to do simple customization (e.g. a warlock can choose which curse to cast).

You can not cast the spell by clicking on the icon, but the keyboard key to press is displayed in the icon bottom left corner (if your class uses several stances, and if the spell is in several spell bars at different places, it may be wrong).

The option interface

To customize the addon, please launch the Blizzard option dialog (accessible through ESCAPE and Interface). In the Add-ons tab, you should find Ovale.

The first sheet displays the script that creates the icons.

The second sheet "Apparence" allows you to resize the icons.

The third sheet "Profile" allows you to save or load the current profile or reset to the default profile.

The script

The script is a small program in a custom language that creates the icons and other things. The preferred way to edit it is to copy it in your favorite text editor (like Notepad), modify it, and copy it back to World of Warcraft. Click the Accept button to save the changes, and the Compile button to try your script.

The basic commands

Macro definition

Define

Define a new constant. Every occurrence of NEWDEFINITION will be replaced by value.

Define(NEWDEFINITION value)

NEWDEFINITION
The name of the definition
value
A value.

Functions that returns text strings

These functions returns strings that can be used as parameter to option functions.

SpellName

Returns the spell name using its identifier (a number). E.g. use it for the name of a check box or a list item

SpellName(spellId)

spellId
A spell identifier

L

Returns a generic text in the user langauge.

The text identifier may be AOE, Melee, None, or Blood.

L(text)

text
The text identifier.

Spell configuration

ScoreSpells

A list of SpellId that count against the scoring system. Every spell that is not in the list stops the scoring until a spell that is in the list is cast.

SpellInfo

Gives informations about a spell. It is not necessary for spells that does not have a cooldown.

SpellInfo(spellid cd=99 duration=99 canStopChannelling=3 toggle=1)

1
The SpellId
cd
The cooldown, in seconds
duration
Duration of the aura applied by this spell, in seconds (used only by OtherDebuffsExpires() at this time)
canStopChannelling
The channelling can be interrupted. The parameter is the number of ticks (e.g. canStopChannelling=3 for Mind Flay)
toggle
The spell is a toggle spell, like Heroic Strike (next-attack ability), or Divine Favor (next-spell ability)
glyph
A glyph spell Id. The character must have this glyph to use this spell infos
talent
A talent id. The character must have this talent to use this spell infos
addduration
Add a value to a duration already defined with another SpellInfo
addcd
Add a value to a cooldown already defined with another SpellInfo
inccounter
A counter identifier. Add one to the counter each time the spell is cast.
resetcounter
A counter identifier. Reset its value to zero each time the spell is cast.
buffnocd
A spell id. If the buff is present, the spell has no cooldown
targetlifenocd
A number between 0 and 100. If the target life is below this value (in percent), the spell has no cooldown

SpellList

SpellList(listname spellid1 spellid2...)

Allows to create a spell list of name ''listname''. Most functions that test auras (buffs and debuffs) and take a spell id as a parameter can use a spell list instead. In this case it will use the first spell id that matches any of the aura.

Default list names are:

  • Poison, Disease, Curse, and Magic: any spell of this school
  • fear, root, incapacitate, stun: any player spell that has this effect (does not contain any npc spell)
  • strengthagility, stamina, heroism: a buff
  • lowerarmor, magicaldamagetaken, lowerphysicaldamage, meleeslow, bleed: a debuff

SpellAddBuff

Tell Ovale that a spell applies one buff or more on the player.

SpellAddBuff(spellid buff1id=99 buff2id=99...)

1
The SpellId of the spell that applies the buffs
buff1id, buff2id...
The name of the parameter is the SpellId of the buff spell, and the value is its duration in seconds. if the value is 0 it means that the buff is removed. If the value is negative, it is the number of stacks that are removed.

SpellAddDebuff

Same as SpellAddBuff() but the spells are debuffs.

SpellAddTargetDebuff

Same as SpellAddDebuff() but the spells are applied to the target and not the player.

Option interface

AddCheckBox

Add a check box. AddCheckBox(checkboxId "Text")

checkboxId
An identifier that is used by CheckBoxOn or CheckBoxOff
"Text"
"Text" can be literal text enclosed in quotes or the SpellName or L function.
1
If this value is default, the checkbox is on by default
talent
A talent id. The character must have this talent
mastery
A number between 1 and 3. The character must have this tree as the primary talent tree.
glyph
A spell id. The character must have this glyph enabled.

AddListItem

Add a new item to a list. If the list does not exist, it is created.

AddListItem(listId itemId "Text")

listId
A list identifier. Use the same for each item in the list.
itemId
An item identifier
"Text"
A text
1
If the value is default, this list item is selected by default
talent
A talent id. The character must have this talent
mastery
A number between 1 and 3. The character must have this tree as the primary talent tree.
glyph
A spell id. The character must have this glyph enabled.

AddIcon

Add a new icon. A script should be enclosed in the braces to describe the icon.

You can set parameters in the form AddIcon key1=value1 key2=value2 {}. Valid parameters are :

size=small
show as a small icon
nocd=1
hide the icon when the action is on cooldown (parameter is the minimum number of seconds of cooldown before hiding the icon, e.g. 1 would hide the icon if the cooldown is more than 1 second)
help
any of main, offgcd, cd, aoe, buff, and mana: set the tooltip
mastery
A number between 1 and 3. The character must have this tree as the primary talent tree.

The AddIcon syntax

Nodes

The nodes are the basis of the script. A node may be:

  • a group, which is several nodes enclosed in braces
  • a keyword and its parameters (which are nodes)
  • a function

A node has:

  • a starting time, which can be "infinite"
  • an ending time, which can be "infinite"
  • an action
  • a priority Both starting and ending times define a time window. For example, if a spell is on cooldown but will be available in 2 seconds, its time window will be +2 to infinite. If a buff on the target expires in 3 seconds, its time window will be 0 to +3. The intersection of the two time windows would be from 2 to 3 seconds, and the union would be 0 to infinite.

The group

The script is a group itself.

The resulting node of a group is the node with the least remaining time. If two nodes have the same remaining time and the same priority, the first defined node is used. If a node has a lower priority than another node that would be clipped by the global cooldown, the higher priority node is chosen.

The keywords

if ''condition'' ''node''
The ''if'' node is the action and priority from the ''node'', but the time window is the intersection of the ''node'' time window and the ''condition'' time window (e.g. if TargetDebuffExpires(125) Spell(125))
unless ''condition'' ''node''
It is the same as ''node'' but the resulting time window is the ''node'' time window minus the ''condition'' time window
''node1'' or ''node2''
the time window is the union of the ''node1'' and ''node2'' time windows
''node1'' and ''node2''
The remaining time is the intersection between ''node1'' and ''node2'' time windows
''node1'' after ''node2''
The time window of ''node2'' is shifted by ''node1'' seconds
For example if you want to wait that a debuff A is present at least 1 second before casting a spell B, you may write if 1s after TargetDebuff(A) Spell(B)
''node1'' before ''node2''
The time window of ''node2'' is shifted by ''node1'' seconds
For example if you want that the spell A is cast at most 3s before the cooldown of the spell B expires, you may write if 3s before Spell(B) Spell(A)
between "node1" and "node2"
Returns the absolute difference between the starting time of ''node1'' and ''node2'', whichever is the first
from ''node1'' until ''node2''
Returns the difference between the starting time of ''node1'' and ''node2'' (the result is positive if ''node2'' comes after ''node1'', negative otherwise)
at least ''node1'' ''node2''
return 0 if ''node1''<=''node2'', infinite otherwise
at most ''node1'' ''node2''
return 0 if ''node1''>=''node2'', infinite otherwise
more than ''node1'' ''node2''
return 0 if ''node1''<''node2'', infinite otherwise
less than ''node1'' ''node2''
return 0 if ''node1''>''node2'', infinite otherwise

You must login to post a comment. Don't have an account? Register to get one!