Need help with "sacrifice" skill

Hey guys, I'm new to both RPG Maker and the forums.

Anyway, I want to design a skill that has an effect on a selected ally, and a different effect on the user.

From the skill creation UI I can't figure out how to have different effects on different targets, so I am assuming this requires scripting (which I have little knowledge about)

If someone could write me a quick script that:

"Sacrifice Skill" MP Cost=0

Gives user 'death' state

Removes 'death' state from selected ally

Prints (users name) makes the ultimate sacrifice!

Or at least show me how I could accomplish this, I would be very grateful.
This should do what you want:
img-1.png
 
Since some of it is cut off, here's the full Formula: line:

b.remove_state(1); a.die; b.result.used=false; 0If you want the skill to heal the target to a certain percentage of their maximum health, replace the 0 with the desired amount, keeping in mind that maximum health is referenced by battler.mhp. For example, b.mhp / 10 heals the target to 10%. If you want this amount to be displayed, remove b.result.used=false;.
Hi! I'm trying to make a skill similar to this, however instead of reviving an ally, it could heal all allies by 50% or something. Is that possible? Help would be extremely appreciated.
@JasperGrayson Posting in a thread to ask a different question is hi-jacking. Please post a new thread setting out your query with as much detail as possible.
Thanks

Original thread: https://forums.rpgmakerweb.com/threads/need-help-with-sacrifice-skill.18413/