stop menu from closing when skill is used

im still really new to this but i think i found a thread that deals with my problem but for a different rpg maker and was wondering how to translate that solution to xp

link to mentioned thread
You will need to add this script to your project:
Ruby:
class Scene_Skill
  attr_reader :actor_index
end

class Game_Temp
  attr_reader :skill_scene_actor_index
  alias init_skill_scene_actor_index initialize
  def initialize
    init_skill_scene_actor_index
    @skill_scene_actor_index = 0
  end
 
  def common_event_id=(id)
    if $scene.is_a?(Scene_Skill)
      @skill_scene_actor_index = $scene.actor_index
    end
    @common_event_id = id
  end
end
And in your skill's common event, your script call back to the menu is going to be this:
Code:
$scene = Scene_Skill.new(
$game_temp.skill_scene_actor_index)
thank you so much it works great

Original thread: https://forums.rpgmakerweb.com/threads/stop-menu-from-closing-when-skill-is-used.169787/