NPC Code:
if (created) {
setstring playermagic,playermp;
}
if (playerenters) {
toweapons -200 MP;
}
if (strtofloat(#s(playermagic))>playermp) {
tempplayermagic=int(strtofloat(#s(playermagic))-playermp/2);
setstring playermagic,#v(tempplayermagic);
}
This might work, im not sure. Im too tired to load up the editor so....You just have to try it.