MQ2Cast - MMOBugs Wiki

Plugin Info
Name MQ2Cast
Author s0rcier / A_Enchanter_00
Link Wiki Link
Commands Multiple
Source Available Yes
Uses INI File Yes


MQ2Cast is a plugin to handle most things related to spell casting, item clicking and activating of AAs.


  • Reliably casts spells (auto-recasts on fizzles or gate collapses). Will attempt to immobilize you before casting. Will cast immediately a spell is available, before the gem is even fully ready.
  • Intelligently and reliably memorizes spells and allows saving and loading of custom spell sets. Will attempt to immobilize you if moving.
  • Clicks items and activates AAs. Will equip items in bags before clicking, and then return them once clicked.
  • Utilizes MQ2Bandolier to swap in sets of items before casting (ie. Focus items).
  • Auto-pause Stick and/or Advpath if detected and resume when complete.
  • Custom interrupt function, to interrupt spells during casting (includes dismounting).
  • Returns control to the macro immediately after it has started (ie. while the spell is casting), to allow the macro to perform other checks. Eg. while casting a heal spell, you could get the macro to check if the target has already been healed and then interrupt your spell if his HPs are above a certain amount.

Additional Plugin Requirements

MQ2Bandolier For swapping in sets of items before casting (ie. focus items)

MQ2Exchange For equipping clickies before using them


  • /casting <SpellName> type options The /casting command requires only 1 argument, the name of the spell you wish to cast. If the spell is not memmed, it will try and mem it in gem5 (this is the default if no gem is specified). If the spell has more than one word, make sure to surround it with quotes.
  • /interrupt This will just interrupt the current spell/item/AA that is casting. It's the same as doing /stopcast, or /dismount then /stopcast if you're mounted at the time.
  • /memorize <SpellName> gem The /memorize command can take spell names or IDs, and can use gem# or just the numbers themselves. The gem# or number can also be appended to the end of the name.
  • /sss <Name> gems This will save your your currently memmed spells into a spell set or the gems you specifiy.
  • /ssm <Name> This will memorize a previously saved spell set.
  • /ssl This will list all spell sets that have been saved.
  • /ssd <Name> This will delete a spell set from the ini file.

/casting Options: that can be added to the /casting line:

  • -bandolier|<name> Equip the bandolier with <name> before casting. Useful for focus effects.
  • -invis With this parameter, it will not cast if you are invisible.
  • -kill Keep casting this spell until the target dies.
  • -maxtries|<#> Cast the spell this many times until successful.
  • -recast|<#> Recast the spell this many times.
  • -setin|<name> Same as bandolier (left here for backwards-compatibility purposes).
  • -targetid|<#> Target this ID before casting.

Example Usage

  • /casting "Wunshi's Focusing" gem4 -invis Will cast Wunshi out of gem4, mem it if it isn't and won't cast if invisible.
  • /casting "Complete Heal|gem1" -kill -targetid|1234 Will cast Complete Heal from gem1, mem if not already, cast until mob is dead, target id 1234 before it starts casting.
  • /casting "Fizzle a Lot|gem4" -maxtries|5 Cast Fizzle a Lot spell from gem4, mem if not, try to cast up to 5 times, ie fizzles or interrupts.
  • /casting "uber nuke|9" -kill Cast uber nuke from gem 9, mem if not, cast until target dead.
  • /casting "cannibalize" gem3 -recast|5 Cast cannibalize from gem3, mem if not, recast 5 times reguardless of success/failure.

As with the /casting command above, the /memorize command can take spell names or IDs, and can use gem# or just the numbers themselves. The gem# or number can also be appended to the end of the name.

  • /memorize "Minor Shielding"
  • /memorize "Minor Shielding" 1
  • /memorize 288|gem1

Multiple spells can be memorized with the same line, such as the following example:

  • /memorize "1234|1" "gate|2" "cannibalize|gem4"

Macro Data

This plugin adds a new TLO

  • ${Cast} : bool - Return TRUE if plugin is loaded and you are in-game.


  • ${Cast.Active} : bool Return TRUE if plugin is loaded and you are in-game.
  • ${Cast.Effect} : string Returns the name of the spell being casted, or a NULL string if not casting.
  • ${Cast.Ready} : bool Return TRUE if ready to cast a spell, item or AA.
    • ${Cast.Ready[M]} : bool Return TRUE if ready to memorize a spell.
    • ${Cast.Ready[#]} : bool Return TRUE if gem # is ready to cast.
    • ${Cast.Ready[X]} : bool Return TRUE if spell, item, gem, ID, AA, etc is ready to cast. As spells and items can have the same IDs and spells and AAs can have the same names, it's a good idea to specify the type of cast to take place gem#/item/alt.
  • ${Cast.Result} : string Returns a string containing the result of the /casting command. It can be one of the following:
    • CAST_CANCELLED Casting was aborted.
    • CAST_COLLAPSE Your Gate collapsed.
    • CAST_DISTRACTED You were distracted.
    • CAST_FIZZLE Your cast fizzled.
    • CAST_INTERRUPTED Casting was interrupted.
    • CAST_INVISIBLE You are invisible.
    • CAST_NOTARGET No target.
    • CAST_NOTREADY Not ready to cast.
    • CAST_OUTOFMANA Not enough mana to cast spell.
    • CAST_OUTOFRANGE Target is out of range.
    • CAST_OUTDOORS Spell not working here (on mount etc).
    • CAST_PENDING Casting is in progress.
    • CAST_RECOVER Spell is not ready.
    • CAST_RESIST Cast was resisted.
    • CAST_STANDING Not standing.
    • CAST_STUNNED You are stunned.
    • CAST_SUCCESS The cast was a success.
    • CAST_TAKEHOLD The spell did not take hold.
    • CAST_CANNOTSEE Cannot see target
    • CAST_COMPONENTS Missing Component
    • CAST_ABORTED Casting Aborted (/interrupt)
    • CAST_UNKNOWN Unknown Spell
  • ${Cast.Return} : string Returns the result of the casting/memorize/interrupt request.
  • ${Cast.Status} : string Returns a string containing all the pending events. This string often contains multiple events (eg. when /casting still has to immobilize you and then memorize the spell before it can cast). The list of possible pending events is:
    • I Idle and waiting for you.
    • A Advpath pause.
    • F Stick pause.
    • S Immobilize in progress.
    • M Memorize in progress.
    • E Item swapped.
    • D Ducking casting.
    • T Targeting.
    • C Spell casting in progress.
  • ${Cast.Stored} : string Returns the last spell that was cast, or NULL if no spell has been cast.
  • ${Cast.Taken} : bool Return TRUE if last spell cast didn't take hold on target.
  • ${Cast.Timing} : int Returns the estimated number of miliseconds remaining until the spell finished casting.


The MQ2Cast.ini file currently has only one option:

[Settings] section:

  • Normal - Controls command when using /cast with bard. If this key exists (any value), then /stopsong is issued before any /cast for bard. If Normal key is not there, then no /stopsong is executed. *NOTE*" This setting must be seen at plugin load. If you change iit, and are in game, then unload the plugin, and load it back up again.

Sample Configuration




This plugin is included with the MMOBugs Compile.