Reward based on weapon used

So I have 3 different tickets, Sword Mastery, Bow Mastery, and Tonfa Mastery along with 3 different weapon types in the system; Sword, Bow, and Tonfa.

How can I make something where if a party member is equipped with a Bow, then theres a 20% chance of being rewarded with a Bow Mastery ticket...

I want to reward the player for using certain weapon types (and winning) in battle.

Theres tons of weapons so I need something convenient because I cant just do

[Edit]
Found it , if anyone needs it, here it goes.

Check weapon
$gameActors.actor(id).equips().some(function(equip){return !!equip && equip.wtypeId == 1;})

Check Equipment
$gameActors.actor(id).equips().some(function(equip){return !!equip && equip.etypeId == 1;})

change "id" to actor number

Original thread: https://forums.rpgmakerweb.com/threads/reward-based-on-weapon-used.115480/