Error: BGLLISP`s MP Zero State

Hi. I am a new tkooler.

I wish to use some wonderful scripts, but I am having some problems.

I`m sorry if my English is bad or if I have bad manners.

The script I want to use is BGLLISP`s MP Zero State.

(from here: http://forums.rpgmakerweb.com/index.php?/topic/35401-vx-ace-yanfly-lunatic-states-death-if-mp-0/)

※Not Yanfly`s Lunatic states script.

I want to make this script work for both actors and enemies,

giving the death state when either actors or enemies` MP reaches to zero.

Problem 1:

When I use this script, enemies keep on reviving when they are defeated by HP damage.

(Maybe because they still have MP?)

Problem 2;

When an actor uses a skill and run out of MP, an error occurs.

( in 'Scene_Battle' on line 584, "undefined method 'make_targets' for nil:NilClass" )

Can anyone help me with these problems...?
That is one of my older scripts and it has never worked right with some settings on states. However, make sure you set the state to apply when MP is zero to 1 (the KO state), if it is on the default it will be HP regen, which is why they are reviving.

However, it might be best to have someone write you a better script to do the same thing, as that one I've had to desert as it has never worked 100% and I haven't had the time to make it much better. I think between me and someone else we managed to rig Yanfly's Lunatic states script (Punishment add-on) to do the same thing, with some hacking.

Try though first setting the state in the settings to 1, as by default it is 10, which is HP regen.
>>bgillisp

Oh, I`m sorry I didn`t understand.

I set the applying state to 1(KO), but the enemies still revive.

I have also tried out Yanfly`s Lunatic states script(the one you edited),

but I couldn`t make it work out very well.

There were no errors, but the death state did not happen.

Do you have any time giving some advice to using the Lunatic states script?

Thank you.
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you. At OP's request.

Original thread: https://forums.rpgmakerweb.com/threads/error-bgllisp-s-mp-zero-state.37700/