WoW OnCast (BCC + Classic) addon Dragonflight/Wrath of the Lich King Classic 2024
wow addon OnCast (BCC + Classic)

OnCast (BCC + Classic)

Game Version: 1.13.7 +1
Total Downloads: 1,441
Updated: Jul 3, 2021
Created: Oct 1, 2020
download OnCast (BCC + 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 409 download OnCast (BCC + Classic) OnCast 1.7.5 Classic + BCC releaseDownload
OnCast 1.7.3 Classic + BCC release 61.15 KB Jun 14, 2021 1.13.7 +1 175 download OnCast (BCC + Classic) OnCast 1.7.3 Classic + BCC releaseDownload



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.

Request Feature or Report Issue

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”



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 then unit conditions are evaluated against @player, @target, @mouseover, @focus, and @targettarget, and the target is dynamically matched after the spell is cast.

         Note: This comes at a performance cost and is mostly useful for multi-target macros where specifying a single @unit is not possible.

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”



The spell cast event to output the message on.

Events and Aliases:


Extended Events and Aliases:

HIT      EFFECT      EXTRA      MISS      DISPEL_FAIL     

Special Events and Aliases: (New in 1.7.0)


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.

DISPEL_FAIL – (New in 1.7.5) Dispel Failed due to dispel resistance of the target spell

   Example: /oncast dispel_fail info “Failed to Dispel $xspell from $target”


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



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


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)


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 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



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 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.



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



/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

None at this time


Add a comment