Is it possible to check for the weapon type of the equiped weapon with YanFly Notetag Scripting

Yeah long title which describes perfectly my problem. I have no Idea how that notetag scripting of yanfly works, it seems it's not possible to just use Javascript.

What I want to check is if a attack of an specific weapon type has hit the enemy.
Eh...I believe notetag scripts are working because Yanfly set up the plugins to read them from the notetag.

Simply put script codes in the notetags will do nothing if the plugins didn't designed to read them.
Arr, what a shame. D:

I struggle for some time with that problem, can't wrap my head around an solution. ;_;
Ok I thought about a solution about this, for MONTHS! And I believe maybe I can do this, but I do need a little help here.

I do have a simple question. Does someone know if its possible to check with yanfly notetag scripting if a certain switch is set on? I don't want to check a temporary instead I want to look for a switch in the system.
Is it possible to check for the weapon type of the equiped weapon


Yup, here is the Javascript code for that:
Code:
$gameActors.actor(id).equips()[0].wtypeId
Where "id" is the ID# of the actor that you want to check.

Does someone know if its possible to check with yanfly notetag scripting if a certain switch is set on?
Notetags, like the first commenter said, just hold text. Certain plugins may read that text and decide to execute that text as Javascript code. So, to check if a switch is on, here is the Javascript code for that:
Code:
$gameSwitches.value(id)
Where "id" is the ID# of the switch. This will return true if the switch is ON, and it will return false if the switch is OFF.

Thank you gladly it worked on the notetag with the yanfly script seems he maked sure that a lot of common javascript commands work to. That's superb!

Original thread: https://forums.rpgmakerweb.com/threads/is-it-possible-to-check-for-the-weapon-type-of-the-equiped-weapon-with-yanfly-notetag-scripting.95754/