Equipment that prevents death once, then disappears?

I'm making an equipment that a character can wear that will prevent a knockout once, then disappears, but I have no idea how to make this. Basically, when they have this "Life Symbol" equipped, the following happens:

When the character with the symbol is brought to 0HP:
--Knockout is prevented
--1HP restored to the character
--Life Symbol is removed

I figure a common event will carry out the actual functions of the item, but I have no idea how I would call this event when a character is first brought to 0HP. I'm also not sure what scripts would both unequip the item and remove it from the party's inventory, without affecting any other Life Symbols that the party has equipped.
if "actor "actor name" has Life Symbol
if HP is < 0
hp +1
remove Life Symbol -1
end
end

in a common event or similair. idk if it checks equip part, but if you do this
for each actor, it wont check it for the party, but the actor itself.

You might need to see if = equiped with life symbol so it might have 3 if's.
but hopefully someone can give a straight answer.
But I think the answer is around that event or closely though.
Plugin WIP. See Below...
if "actor "actor name" has Life Symbol
if HP is < 0
hp +1
remove Life Symbol -1
end
end

in a common event or similair. idk if it checks equip part, but if you do this
for each actor, it wont check it for the party, but the actor itself.

You might need to see if = equiped with life symbol so it might have 3 if's.
but hopefully someone can give a straight answer.
But I think the answer is around that event or closely though.

Only problem I see with this is I want to make sure it specifically removes the Life Symbol attached to that party member. With "remove life symbol -1" I think it will just remove one at random from the party inventory.
How's this?
CTB_EquipmentEx v.3:
https://drive.google.com/open?id=1g-fPLMsavF1RxywS0qDKLvUMnvFSjOA9
Could be awkward with events...you could check each dead actor for the item, and for each one unequip the item then remove 1 from inventory?

Re plugins, Yanfly has a Tips & Tricks article on something very similar:
http://www.yanfly.moe/wiki/Phoenix_Ring_(MV_Plugin_Tips_&_Tricks)

Basically I think you could just edit this line (revive with 25% HP):
Code:
var hp = Math.floor(target.mhp * 0.25);
...to this (revive with 1 HP):
Code:
var hp = 1;
Could be awkward with events...you could check each dead actor for the item, and for each one unequip the item then remove 1 from inventory?

Re plugins, Yanfly has a Tips & Tricks article on something very similar:
http://www.yanfly.moe/wiki/Phoenix_Ring_(MV_Plugin_Tips_&_Tricks)

Basically I think you could just edit this line (revive with 25% HP):
Code:
var hp = Math.floor(target.mhp * 0.25);
...to this (revive with 1 HP):
Code:
var hp = 1;

This seems to be what I'm looking for! I followed the directions as close as I could, but it doesn't seem to be working. I made sure I have the Buffs & States Core, and put the following under the proper notetag. (The life symbol is an armor with ID 14)

Code:
<Custom Apply Effect>
if (target.isActor()) {
  var ring = $dataArmors[14];
  if (target.hasArmor(ring)) {
    target.discardEquip(ring);
    target.startAnimation(42);
    var hp = 1;
    target.gainHP(hp);
    target.startDamagePopup();
}
}
<Custom Apply Effect>

But when I tested it out, the actor still just died when they hit 0 HP. Not sure if there might be some conflicts with other plugins, like Action Sequences.
This seems to be what I'm looking for! I followed the directions as close as I could, but it doesn't seem to be working. I made sure I have the Buffs & States Core, and put the following under the proper notetag. (The life symbol is an armor with ID 14)

Code:
<Custom Apply Effect>
if (target.isActor()) {
  var ring = $dataArmors[14];
  if (target.hasArmor(ring)) {
    target.discardEquip(ring);
    target.startAnimation(42);
    var hp = 1;
    target.gainHP(hp);
    target.startDamagePopup();
}
}
<Custom Apply Effect>

But when I tested it out, the actor still just died when they hit 0 HP. Not sure if there might be some conflicts with other plugins, like Action Sequences.
Looks like you've got a typo, you have this line:
Code:
target.gainHP(hp);
...when it should be this (case-sensitive):
Code:
target.gainHp(hp);

Edit: also be sure to save your project before testing, otherwise Plugin Manager changes won't be reflected during the test. 🙂
I think it must have been me not saving, cause it works now! I thought I just had to apply changes, I hadn't actually saved before doing a battle test.

I did also fix the typo of course, so it works great now. Thanks so much!

Original thread: https://forums.rpgmakerweb.com/threads/equipment-that-prevents-death-once-then-disappears.115402/