MZ Is there a way to force a character to cast a spell out of battle?

And if so, is there a plugin or a script code to achieve it? Thanks in advance!
i don't THINK so, but it wouldn't be hard to event an equivalent. choose the character, play the animation on the event location you want it at, subtract some MP.
Force action in event page?
And if so, is there a plugin or a script code to achieve it? Thanks in advance!
Without leveraging an ABS, it is less-than-ideal as far as forced action execution is concerned to perform forced actions on the map.

However, the gist of it is something like this:
Spoiler: SCRIPT COMMAND
JavaScript:
// reference to the battler you want to perform the skill to be executed.
const casterBattler = $gameParty.leader();

// generate an action to apply.
const gameAction = new Game_Action(casterBattler, false);

// the id of the skill to be executed.
const skillId = 1;

// assign the skill to the action.
gameAction.setSkill(skillId);

// or
// the skill reference of the skill to be executed.
// const skill = $dataSkills[1];
// gameAction.setItemObject(skill);

// reference to the battler you want to execute the skill against.
const targetBattler = $gameParty.leader();

// apply the action against the target.
gameAction.apply(targetBattler);

I wouldn't really recommend this if possible, though. In most cases, if not in-battle, you can probably achieve your goal through alternative means more explicitly.
I haven't tried it yet but it's a skill that targets the user, if that makes a difference.
The easiest way would be to event the effects of the skill/item.

Otherwise, for a generally-applicable approach, this thread (for RMMV) may help:
I haven't tested, but I'm guessing the solution there will also work for MZ.
Hard to event it as it uses Visustella's plugin skill limited use.

Original thread: https://forums.rpgmakerweb.com/threads/is-there-a-way-to-force-a-character-to-cast-a-spell-out-of-battle.147070/