WoW OnCast (classic) addon Dragonflight/Wrath of the Lich King Classic 2024
logo
wow addon OnCast (classic)

OnCast (classic)

Game Version: 1.13.7 +1
Total Downloads: 742
Updated: Jul 3, 2021
Created: Oct 1, 2020
download OnCast (classic)Download Earlier Versions

Earlier Versions

Name Size Uploaded Game Version Downloads
OnCast 1.7.5 Classic + BCC release 62.18 KB Jul 3, 2021 1.13.7 +1 0 download OnCast (classic) OnCast 1.7.5 Classic + BCC releaseDownload
OnCast 1.7.4 Classic + BCC release 61.67 KB Jun 25, 2021 1.13.7 +1 83 download OnCast (classic) OnCast 1.7.4 Classic + BCC releaseDownload
OnCast 1.7.3 Classic + BCC release 61.15 KB Jun 14, 2021 1.13.7 +1 72 download OnCast (classic) OnCast 1.7.3 Classic + BCC releaseDownload

Screenshots

Description

Share this:

OnCast allows you to use simple, safe, flexible macro commands, or registered spells, to output custom messages to various group chat channels, or supported extensions, when you cast a spell or use an ability.

Report Issue   Request Feature

Better Macros

Macro Command

/oncast-m [condition] event channel “message” …

A short alias is available for the macro command: /oc-m

The macro command can accept multiple sets of: event channel “message”

Example: /oc-m success party “$spell on $target” failed info “$spell failed: $reason”

 

Condition

Conditions are an optional first argument to the macro command, must be all lower case, enclosed in [ ] square bracers, and are separated by a , (comma).

@unit is supported as the first argument in conditions. @unit can be any valid macro unit ID such as @target, @mouseover, @player, etc.

Aliases: (New in 1.7.0)

@target      @mouseover      @focus      @targettarget      @player     
@t @mo @f @tt @p

   Note: @unit is not validated, and can differ from the actual target of the cast, so please ensure it is correct and accurate

Unit conditions:

   exists,  harm,  noharm,  help,  nohelp,  dead,  nodead

      Unit conditions check the status of the specified @unit and output will only occur if all conditions are met.

      (New in 1.7.0) If no @unit is specified the conditions are evaluated dynamically. This is mostly useful for multi-target macros and it is recommended to specify an @unit whenever possible.

         Note: Dynamic evaluation only works when the target of a spell is @target, @mouseover, @focus, @targettarget or @player and a target name is provided by the WoW API (which is most spells)

Button / Modifier conditions:

   btn:n and nobtn:n, where n is a mouse button from 1 to 5

   mod:key or mod (for any) and nomod:key or nomod (for none), where key is shift ctrl alt or a combination separated by a / (forward slash)

Example: /oncast [@target,exists,nobtn:2,mod:ctrl/shift] success raid,party,bg “$spell on $target”

 

Event

The spell cast event to output the message on.

Events and Aliases:

START      STOP      SUCCEEDED      FAILED      INTERRUPTED      DELAYED      HIT      EFFECT      EXTRA      MISS     
STARTED STOPPED SUCCESS FAIL INTERRUPT DELAY        
SR SP SU FL IN DL HT EF EX MS

Special Events and Aliases: (New in 1.7.0)

FAILED_COOLDOWN      FAILED_LOSSOFCONTROL     
FAIL_CD FAIL_LOC
FCD FLC

Note: SUCCEEDED and FAILED refer to the success or failure of the cast; HIT and MISS are the events for when a spell hits or misses the target.

 

Extended Events

Used just like standard events, except that some have variables (vars) that can be set. Variables directly follow the event name, are enclosed in ( ) (parentheses), and are separated by a ; (semi-colon).

HIT – Direct damage or healing.

   Vars: Critical Only (crit or true), Minimum (number)

   Example: /oncast hit(crit;5000) info “$spell crit for $amount!”

EFFECT – Any special effects such as buffs, debuffs, interrupts, dispels, power gains, etc.

EXTRA – An extra effect applied by the spell, for example Fire Vulnerability applied by Improved Scorch

   Vars: Effect_Name or SpellId (required)

   Example: /oncast extra(Fire_Vulnerability) info “$outcome $spell x$amount on $target”

MISS – Any ‘miss’ such as your spell or ability being resisted, reflected, dodged, blocked, parried, etc. or the target being immune.

 

Special Events (New in 1.7.0)

Used just like standard events, except they take the place of standard events if conditions are met. Variables directly follow the event name, are enclosed in ( ) (parentheses), and are separated by a ; (semi-colon).

FAILED_COOLDOWN – Cast failed due to cooldown.

   Vars: Minimum (seconds, default 2.0), Maximum (seconds)

   Example: /oncast failed_cooldown(5;_) info “$spell is still on cooldown for $cooldown”

   Note: Replaces the FAILED event if conditions, including minimum and maximum, are met

FAILED_LOSSOFCONTROL – Cast failed due loss of control (stunned, silenced, etc.)

   Vars: Minimum (seconds), Maximum (seconds)

   Example: /oncast failed_lossofcontrol(5;_) info “I’m $reason and can’t cast for $cooldown”

   Note: Replaces the FAILED event if conditions, including minimum and maximum, are met

 

Multiple events can be specified for the same command by separating them with a , (comma) and without spaces.

Example: /oncast failed,interrupted,miss say “Oh no, my $spell didn’t work”

 

Spell Types and Events

Depending on the spell or ability a different series of events can occur during and after the cast. In general:

– All spells can have a FAILED event

– Instant spells have a SUCCEEDED event

– Casted spells have START > [ DELAYED ] > INTERRUPTED or SUCCEEDED > STOP events

– Channelled spells have START and SUCCEEDED > [ DELAYED ] > STOP events

– Direct Damage and Healing spells have a HIT event, and some, such as Fireball can also have an EFFECT event

– Other spells including, buffs, debuffs, interrupts, and power gains have an EFFECT event

– Spells cast on hostile targets can have a MISS event. Note: Helpful spells (heals and buffs) don’t tend to have MISS events, though their cast can still be FAILED

– Some spells, usually Improved by talents, can have an EXTRA effect event of a different name to the base spell

 

Channel

The channel you want to send the message to.

Standard Channels and Aliases:

RAID      RAID10      RAID20      RAIDPARTY      PARTY      BATTLEGROUND      ARENA      SAY      WHISPER      EMOTE     
R R10 R20 RP P BG AR S W E

 

Channel Precedence

In order to avoid spamming your group, only a single standard channel will be output to per event. The order, and conditions under which the channel is chosen are as follows:

BATTLEGROUND – In a PvP Battleground

ARENA – In a PvP Arena

RAID10 – In a PvE Raid of 1 to 10 players

RAID20 – In a PvE Raid of 11 to 20 players

RAID – In a PvE Raid

RAIDPARTY – In a PvE Raid

PARTY – In a non-raid PvE Party

WHISPER – The target is a friendly player in your Raid, Party or PvP team

SAY – You are in an instance (this is due to API limitations)

EMOTE

For Example: /oncast effect party,raid,whisper,say “$spell $outcome!” will output to Raid chat if you are in a PvE Raid, OR Party chat if you are in a PvE Party, OR will whisper the target is they are in your group, OR will SAY if you are in an instance… or won’t do anything if none of these conditions are true.

 

Extended Channels

Extended channels are private channels that display only to you, and as such are always output to even if other channels are included in the command. They are used just like standard channels but also have variables (vars) that can be set depending on the channel. Variables directly follow the channel name, are enclosed in ( ) (parentheses), and are separated by a ; (semi-colon).

INFO – Prints to the default chat window.

   Vars: Color (RRGGBB) in hexadecimal; e.g. FF334C

PARROT – Requires Parrot 2 to be installed. Outputs to a Parrot Scroll Area.

   Vars: Scroll_Area (required), Sticky, Color (RRGGBB), FontSize, Outline

   Example: /oncast delayed parrot(Notification;true;FF2C2C;16;Thick) “$spell Delayed $delay!”

   Note: _ (underscore) can be used as a default value for Vars; e.g. parrot(Outgoing;_;_;20) would use the default sticky, color and (omitted) outline values for the Outgoing scroll area.

 

Multiple channels can be specified for the same command by separating them with a , (comma) and without spaces.

Example: /oncast effect raid10,party,say “$xspell removed from $target”

 

“Message”

Message is the chat message to output and must be enclosed in ” “ (quotes). Messages can also include special message tokens, prefixed by a $ symbol, that are dynamically replaced based on the circumstances of the spell cast. Note: $tokens can also be written ${token}

Supported Tokens and Aliases:

$spell, $sp – The name of the spell being cast. e.g. Power Infusion

$target, $t – The name of the target of the cast or spell effect. e.g. Golemagg the Incinerator

$rt – The raid target marker of the specified @unit. e.g. the Skull icon

$event, $ev – The current event: START, STOP, FAILED, SUCCEEDED, HEAL, DISPEL, RESIST, DEBUFF, etc.

$outcome, $oc – The cast or spell outcome: Succeeded, Failed, Interrupted, Crit!, Resisted, Inflicted, etc.

$reason, $rsn – The reason the cast FAILED. e.g. On Cooldown (20s), Line of Sight, etc.

$delay, $dl – Total delay time of the cast so far. Can be negative if the cast stopped early. e.g. 0.7s

$time, $tm – The current or final cast time. e.g. 3.0s

$group, $grp – The raid group of the target; or Party, or the name of the target. e.g. Group 7

$amount, $amt – The amount of damage, healing, power gain or current number of buff / debuff stacks

$xspell, $xsp – The target’s spell that was interrupted, dispelled or stolen

$xtype, $xtp – The type of aura (“buff” or “debuff”) or power gain (“Mana”,”Rage”,etc.)

$cooldown, $cd – (New in 1.7.0) The remaining cooldown / loss of control duration. e.g. 3.9s, 21s, 1m37s

 

/oncast

Runs the same logic as /oncast-m but has a longer timeout (30 seconds). This is useful for testing commands by typing them into the chat window.

 

Registering Spells

/oncast-spell “Spell” event channel “message”

 

Similar to the macro command, except the “Spell” is monitored and the “message” output each time event occurs. This happens regardless of how the spell or ability was cast and is particularly useful if you have other addons that cast spells or abilities for you, or simply if you want to save on macro slots.

Note: The /oncast-spell command does not support conditions, nor does it support more than one set of event channel “message” at this time.

Example: /oncast-spell “Resurrection” started raid,party “Ressing $target”

 

“Spell”

Spell can either be the name of the spell or ability – e.g. Greater_Heal – or the Spell Id – e.g. 25314 (which is Greater Heal Rank 5). Spell names are case sensitive, must match exactly, and must either be enclosed in ” “ (quotes) or use an _ (underscore) in place of a space.

 

/oncast-spell show “Spell” event

Prints all registered messages for the given spell and event. The “Spell” and event arguments are optional; show will print all messages for the spell, or all messages generally, if they are omitted.

 

/oncast-spell remove “Spell” event channel

Removes the registration for the given “Spell”, event, and channel. The event and channel arguments are optional; remove will remove the event, or the entire spell if they are omitted.

 

Help

In game help can be accessed via /oncast help and /oncast-spell help

 

Debug

/oncast-debug [on/off]

Debug lets you see information on events during spell casts, which can helpful to see which events different spells have.

 

Known Issues

– Loading error for new installs prior to 1.7.2.

Please install the latest version. Apologies for the inconvenience.

– FAILED_LOSSOFCONTROL event fails to trigger; fixed in 1.7.3

Comments

Add a comment