Skip to content

MQ2Cast

MQ2Cast

A plugin to handle your character's casting, clicking and AA activation

Authors: s0rCieR, A_Enchanter_00, htw, devestator, Maskoi, EqMule, three-p-o, trev, alynel • Config: Server_Character.ini

Resource Download Support Repo

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

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

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

Cast

Shows if plugin is loaded, and holds the Cast datatype which is much more interesting

DataTypes

Cast

Returns information about plugin status, current spell being cast, spell readiness and more.

Members

bool Active

Return TRUE if plugin is loaded and you are in-game.

spell Effect

Returns the name of the spell being cast, or a NULL string if not casting.

bool Ready[X]

Returns TRUE if ready to cast based on the parameter provided:

No parameter: - ${Cast.Ready} - Returns TRUE if ready to cast a spell, item or AA

Special parameters: - ${Cast.Ready[M]} - Returns TRUE if ready to memorize a spell - ${Cast.Ready[#]} - Returns TRUE if gem # is ready to cast (where # is a gem number)

Name or ID parameters: - ${Cast.Ready[<name or ID>]} - Returns TRUE if the specified spell, item, gem, ID, AA, etc. is ready to cast

Disambiguation

Since spells and items can have the same IDs, and spells and AAs can have the same names, it's recommended to specify the type of cast (e.g., gem#, item, alt). See examples below for usage patterns.

string Result

Returns a string containing the result of the /casting command.

Possible result values:

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 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_UNKNOWN Unknown Spell

string Return

Returns the result of the casting/memorize/interrupt request.

string Status

Returns a string containing all the pending events. This string often contains multiple events (e.g., when /casting still has to immobilize you and then memorize the spell before it can cast).

Possible pending event codes:

Code Description
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 Stored

Returns the last spell that was cast, or NULL if no spell has been cast.

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

Discussions that link here