add details, format/punc
m (→Options) |
(add details, format/punc) |
||
| Line 2: | Line 2: | ||
Casts the first spell for which the options are true. | |||
/cast | /cast optionset spellname; optionset spellname; ... | ||
/cast item | /cast item | ||
/cast BagId slot | /cast BagId slot | ||
| Line 14: | Line 14: | ||
== Arguments == | == Arguments == | ||
:; | :;optionset : List of options below, separated by commas, enclosed in [ ] | ||
:;spellname : Name of the spell to cast | :;spellname : Name of the spell to cast | ||
:;item : The name of the item to be used. | :;item : The name of the item to be used. | ||
| Line 21: | Line 21: | ||
:;[[InventorySlotId | InvSlot]] : The slot on your character in which to use an item. | :;[[InventorySlotId | InvSlot]] : The slot on your character in which to use an item. | ||
=== | === Optionset === | ||
You may use "no" in front of any of these to invert the logic result. | You may use "no" in front of any of these to invert the logic result. All of the options below except '''target''' are actually ''conditions'' that the script will check before casting the spell. If ''any'' of the conditions in a set are false, the script will move on to the next option set, or the next semicolon (;) if there are no more; if all of the conditions in a set are true, the script will ignore any more option sets and cast '''spellname'''. Once it successfully casts a '''spellname''', the rest of that line is ignored (see Examples at bottom). | ||
Because '''target=''' is a command (not a condition), you can use multiple option sets to automatically cast the spell on the appropriate target (see Examples at bottom). | |||
:;actionbar ⇔ bar : If you are using this particular actionbar. You must specify actionbar:# (#=action bar number). | :;actionbar ⇔ bar : If you are using this particular actionbar. You must specify actionbar:# (#=action bar number). | ||
:;button ⇔ btn : If you clicked a particular button to cast the spell (button:#, where #=1-5,LeftButton,MiddleButton,RightButton,Button4, or Button5). | :;button ⇔ btn : If you clicked a particular button to cast the spell (button:#, where #=1-5, LeftButton, MiddleButton, RightButton, Button4, or Button5). | ||
:;channeling : If you are channeling a spell. You may optionally specify a specific spell using spell:''spellname''. | :;channeling : If you are channeling a spell. You may optionally specify a specific spell using spell:''spellname''. | ||
:;combat : If you are in combat. | :;combat : If you are in combat. | ||
| Line 72: | Line 74: | ||
== Examples == | == Examples == | ||
*This will revive the pet if it is out and dead, call the pet if it is not out, or mend the pet if it is out and alive | |||
/cast [target=pet,dead] Revive Pet; [nopet] Call Pet; Mend Pet | /cast [target=pet,dead] Revive Pet; [nopet] Call Pet; Mend Pet | ||
*This will cast Flash Heal on target; but it will cast it on yourself if your target is hostile, or dead, or you have no target, or if you right-click the button. | |||
/cast [target=self, btn:2][target=focus, help, nodead, exists][target=self] Flash Heal | |||
: Let's analyze: | |||
...[target=self, btn:2]... | |||
: The script sets the target of the spell to yourself, and checks to see if you right-clicked. If you did, it skips the next two option sets and casts Flash Heal, keeping the '''target''' it set (you). If you didn't r-click, it checks the next option set: | |||
...[target=focus, help, nodead, exists]... | |||
: It sets the target of the spell to whatever your current target (focus) is. If the target is friendly ('''help''') AND it's alive ('''nodead''') AND you actually have something selected ('''exists'''), then it skips the next option set and casts Flash Heal, again keeping the target it set (focus). Otherwise, if any of those conditions are not true, it checks the next option set: | |||
...[target=self] | |||
: Since there are no conditions in this set, it just casts Flash Heal, again keeping the target it just set (you). | |||