Skill icon that matches weapon icon

Hello there, everyone.

I was wondering if any of you could help me with a question I have.

Is it possible for a skill to get its icon from your currently equipped weapon? Here's an example.

I got a skill called Power Strike. The user of this skill currently has an Iron Axe (Icon number 55) equipped. I would like Power Strike to also have icon 55 as its icon.

Then, if I change the actor's weapon to an Iron Sword (icon number 56) then I would like it for Power Strike to now show icon 56 and not icon 55 (Iron Axe).

In summary, I would like it if this skill (and physical skills in general) to always show the icon of what you have equipped on the weapon slot.

Is this possible? I'm sure it would require a plugin or some scripting, but sadly I'm not great with JavaScript.
you should be able to pull it off with yanfly's skill core plugin. try giving your skills this notetag
Code:
<Cost Display Eval>
item.iconIndex = user.weapons()[0] ? user.weapons()[0].iconIndex : 0
</Cost Display Eval>
untested, but it should change the icon dynamically
Damn, this works perfectly!

Thank you very much!

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/skill-icon-that-matches-weapon-icon.177830/