MQ2Cast

From the wonderful RedGuides Wiki
MQ2Cast
A plugin to handle your character's casting, clicking and AA activation
View details
Authors s0rCieR, A_Enchanter_00, htw, devestator, Maskoi, EqMule, three-p-o, trev, alynel
Software type Plugin
Config file Server_Character.ini


Maintained Yes and supported
Acknowledgements the authors of spell_routines.inc
Links

🏠Resource (review)
🤝Support •🛠️Repository

This plugin handles the casting and recasting of spells, whether they're on your spell bar, on items, or even an AA. It also handles memorization and spell lists.

Features

  • Reliably casts spells (auto-recasts on fizzles or gate collapses). Will attempt to immobilize you before casting. Will cast immediately when a spell is available.
  • Intelligently and reliably memorizes spells and allows saving and loading of custom spell sets.
  • 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.

Commands

Syntax Description
/castdebug [on|off] verbose output text on or off
/casting "<name>" [type] [option]... 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 by default. If the spell has more than one word, make sure to surround it with quotes.
  • Note: Although the [type] is optional, it's always recommended to specify if you're casting a spell (specify the gem or number), clicking an item (specify "item" or the slot name/slot number) or activating an AA (specify "alt"), since there are AAs which have the same name as spells and spells and items can have the same IDs.
/interrupt This will interrupt the current spell/item/AA that's casting.
/memorize <name> [gem] 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. e.g.
/memorize "Minor Shielding" 1

The plugin will attempt to immobilize you before memorizing the spell(s).

/ssd <"name"> (spell set delete) This will delete a spell set from the ini file.
/ssl (spell set list) This will list all spell sets that have been saved.
/ssm <"name"> (spell set memorize) This will memorize a previously saved spell set.
/sss <"name"> [gem(s)] (spell set save) This saves your currently memorized spells into a set you name. By default, all gems (123456789ABC) will be saved. You can also specify the gems you wish to save, e.g.
/sss powerlevel 1238

Using other commands from MQ2Cast you can then load these spell sets.

Settings

The configuration file is in the server_character.ini file, and holds spells sets for memorization.

Example for a spellset called "gandalfDPS"

[MQ2Cast(SpellSet)]
gandalfDPS 12=26|1 200|2
  • "gandalfDPS" is the spell set name,
  • "12=" refers to spell gems 1 and 2
  • "26|1" is spellID 26, spell gem 1

These are easier to configure via commands than direct editing of the .ini

See also


Top-Level Object(s)

TLOs added by MQ2Cast:

TLO Data Type(s) Description
Cast Cast Shows if plugin is loaded, and holds the Cast datatype which is much more interesting

Forms. Typical usage, /echo ${TLO}

Type TLO Description
bool Cast Return TRUE if plugin is loaded and you are in-game.

Members. More may be available if inherited. Typical usage, /echo ${TLO.Member}

TLO Data Type Return Type Member Description
Cast Cast bool Active Return TRUE if plugin is loaded and you are in-game.
Ready[X]
  • ${Cast.Ready}

Returns TRUE if ready to cast a spell, item or AA

  • ${Cast.Ready[M]}

Return TRUE if ready to memorize a spell. ${Cast.Ready[#]} Return TRUE if gem # is ready to cast. ${Cast.Ready[<name or ID>]}

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). See examples on DataType:Cast
Taken Return TRUE if last spell cast didn't take hold on target.
int Timing Returns the estimated number of miliseconds remaining until the spell finished casting.
spell Effect Returns the name of the spell being cast, or a NULL string if not casting.
Stored Returns the last spell that was cast, or NULL if no spell has been cast.
string Result Returns a string containing the result of the /casting command. It can be one of the following:
Types
Result Description
CAST_ABORTED Casting Aborted (/interrupt)
CAST_CANCELLED Casting was aborted
CAST_CANNOTSEE Cannot see target
CAST_COLLAPSE Your Gate collapsed
CAST_COMPONENTS Missing Component
CAST_DISTRACTED You were distracted
CAST_FIZZLE Your cast fizzled
CAST_IMMUNE Target is immune the spell's effect
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_UNKNOWN Unknown Spell
Return Returns the result of the casting/memorize/interrupt request.
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