MV Event conditions based on weapon type

I an currently working on a game were I can have puzzles based in what weapon a party member is holding. I am aware that there are certain conditions that let me call specific weapons, but I want it for weapon types specifically. Is there a script command that allows this? Or a plugin that allows me to do this.
Hmmm, make conditional branches and check for the weapon type (if you have dual wielder I guess you need to modify bit):
$gameParty.members()[0].weapons()[0]?.wtypeId === X

EDIT: There's also plugins like HimeWorks Custom Page Conditions, where you can put the code as event page conditions, I think
Hmmm, make conditional branches and check for the weapon type (if you have dual wielder I guess you need to modify bit):
you could simplify it by just using isWtypeEquipped(). itd check all the slots itd need to without specification

EDIT: There's also plugins like HimeWorks Custom Page Conditions, where you can put the code as event page conditions, I think
this was going to be my suggestion. i cant remember if page conditions get reevaluated or not when leaving the menu, but you can easily set up a page condition for if an actor has a certain weapon type equipped
Found what I needed. It was:
$gameActors.actor(x).isWtypeEquipped(n);

Original thread: https://forums.rpgmakerweb.com/threads/event-conditions-based-on-weapon-type.177790/