I made an Item that is supposed to permanently alter stats, but every time I use a recovery item it gets undone, why?
This is a vague question because there are several way to make an item that changes a stat.
If you make an attack that alters a stat, and attach that attack to an item, you can change the target's stat by using the item on them.
If the item is used inside battle, the effect will always be temporary. There is no way to make permanent stat alterations in battle.
If you make the item usable outside of battle, the effect will be permanent.
With a plotscript
The last argument of the set hero stat command tells whether to change the current stat or the maximum stat. For the purposes of a script that changes a stat, you probably want to do both
variable(who) who := find hero (hero:Bob) variable(old stat) old stat := get hero stat(who, stat:strength, maximum stat) set hero stat(who, stat:strength, old stat + 10, maximum stat) set hero stat(who, stat:strength, old stat + 10, current stat)