Plotscript of the Month
Blue Magic, by Moogle1
Download an example of this script in action

This is a simple script that teaches all capable, living party members how to use an attack that was used in battle. Remember to have that attack set the appropriate tag. Take a look inside the RPG file for more information. (Note: You must recruit the Blue Happyface to learn the Triangle spell. The default character is not a Blue Mage.)

include, plotscr.hsd
include, sample.hsi

define script (1,after battle,none)

script, after battle, begin
variable(who)
if (check tag(tag:used triangle)) then (
# A blue magic spell was used. Try to learn it.
for (who, 0, 3) do (
if (get hero stat(who, stat:HP, current stat) >> 0) then (
# This hero is alive. If he can learn it, he will.
teach spell (who, atk:Triangle)
)
)
set tag(tag:used triangle, off) # reset tags before next battle
)
)

Download an example of this script in action