Conditional Skill notetags & Max TP recovered by items

Hello,

I have two requests, one of them it's probably somewhat odd, xP I am using passive skills/states in my game, using this script: https://quasixi.wordpress.com/2014/03/23/quasi-passive/

Everything works perfectly as I want, but I want to add some specific skills which add these "passive buffs" if a certain weapon type is equipped. For example, I am trying to add a passive skill which gives a CRI bonus, but this only if the character has a bow equipped. I tried using the "Required Weapon" feature in the editor, but it doesn't works, still applies the bonus even if I remove the bow.

So, for this script you have to use a notetag that determines which "passive state" will be applied permanently to the character, like <passive: 38>, which is the state I am using right now, and it gives the CRI bonus. So, maybe there is a script or a way to check in the notetags or something, if the character has an X weapon type equipped, then if true apply <passive: 38>?

I want to use this to give just specific bonuses if the character has the correct weapon type equipped.

It isn't that important, but I really would like to add something like this ^^

Now, for the second question; I am not using MP in my game, just TP, but I have an issue creating items that recover TP, and it's that even if the character has the max TP already, player can still use the item constantly, recovering nothing of course, as the TP is in it's maximum value already. Is there a way, maybe modifying the base scripts which allows for items to don't recover anything past the max characters TP amount, just like MP recovery items do? =)

Regards.
For your first query

Create your passive skill, which might just be calling up a state which inflicts the CRI bonus.  But perhaps you're doing it another way.  it doesn't matter, as long as the skill is available.

Create your bow and on Features, select the 4th tab 'Skill', and check the 'Add skill' box and allocate your passive skill to the weapon itself.  You would have to do that for all bows, but presumably you have a limited number of these, and it only takes moments to do each one.
Ohh, that's a great idea. But maybe is there a way to "add the bonus" just if the skill has been learned? I know that it would work like that with this method, but I am using Yanfly Learn Skill engine as well, so you have to "buy" these passive skills first before you can get the bonus, and with that method of "Add Skill", as there are multiple CRI passives, probably 4 or 5, the bow would give all 5 passives instantly >.<

I am not sure how to do this, perhaps there's a script to check conditionals for states like if X weapon is equipped? As the state is the one which actually gives you the bonus, but you have to "learn" or buy the skill first before the state actually gives you the bonus.

Original thread: https://forums.rpgmakerweb.com/threads/conditional-skill-notetags-max-tp-recovered-by-items.41548/