if (_actor instanceof L2PcInstance && (_actor.isAttackingNow() || _actor.isCastingNow()) && !_actor.isMoving()) {
L2PcInstance player = (L2PcInstance) _actor;
// start MoveOnAttack Task
// Schedule a move task
if (!player.isMovingTaskDefined()) { // if not already started the task
player.defineNewMovingTask(pos);
} else {
player.modifyMovingTask(pos);
}
// Cancel action client side by sending Server->Client packet ActionFailed to the L2PcInstance actor