MQ2Cast

A plugin to handle most things related to spell casting, item clicking and activating of AAs. In depth info can be found at MacroQuest2 Wiki Entry

Commands: 

/casting

/casting "Name" [type] [options]

Options:

  • 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.
  • targetid|<#> - Target this ID before casting..

/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

/memorize "name" [gem]

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.

See the following examples:

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

/sss - Spell Set Save - This will save your any number of your currently memmed spells into a spell set.


/sss "name" [gems] - Name is what you want your spell set to be called. If no gems are specified, all your gems are saved (ie. 123456789). You can specify a smaller subset if needed.

/sss dps 1238
/sss wunshi 5

/ssm - Spell Set Memorize - This will memorize a previously saved spell set.

/ssm dps

/ssl - Spell Set List - This will list all spell sets that have been saved.

/ssd - Spell Set Delete - This will delete a spell set from the ini file.

/ssd wunshi

TLO's: 
  • bool ${Cast}
    Same as ${Cast.Active} (see below).
  • bool ${Cast.Active}
    Return TRUE if plugin is loaded and you are in-game.
  • spell ${Cast.Effect}
    Returns the name of the spell being casted, or a NULL string if not casting.
  • bool ${Cast.Ready}
    Return TRUE if ready to cast a spell, item or AA.

    • bool ${Cast.Ready[M]}
      Return TRUE if ready to memorize a spell.
    • bool ${Cast.Ready[#]}
      Return TRUE if gem # is ready to cast.
    • bool ${Cast.Ready[X]}
      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
      (ie. gem#/item/alt).

  • string ${Cast.Result}
    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 interupted
    • 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 ect..)
    • 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
  • string ${Cast.Return}
    Returns the result of the casting/memorize/interrupt request.
  • string ${Cast.Status}
    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
  • spell ${Cast.Stored}
    Returns the last spell that was cast, or NULL if no spell has been cast.
  • bool ${Cast.Taken}
    Return TRUE if last spell cast didn't take hold on target.
  • int ${Cast.Timing}
    Returns the estimated number of miliseconds remaining until the spell finished casting.
Examples: 

A nice little HUD snippet to go with the plugin:

[CASTING]
CS1=3,425,150,255,255,255,~~ CASTING ~~~~~~~~~~~~~~~~~~~~~
CS2=3,425,162,255,255,255,Cast Effect: ${If[${Cast.Effect.ID},${Cast.Effect.Name},NONE]}
CS3=3,425,174,255,255,255,Cast Timing: ${Cast.Timing}
CS4=3,425,186,255,255,255,Cast Ready : ${Cast.Ready}
CS5=3,425,198,255,255,255,Cast Status: ${Cast.Status}
CS6=3,425,210,255,255,255,Cast Result: ${Cast.Result}
CS7=3,425,222,255,255,255,Cast Stored: ${If[${Cast.Stored.ID},${Cast.Stored.Name},NO