NPC Code:
timereverywhere;
timeout=.05;
if (playerchats&&strequals(#c,human)) {
toweapons -MP Bar-;
}
if (timeout)
if (isweapon) {
showstats 1+2+4+8+16+256+512+1024;
this.pos = {screenwidth-180,30};
this.mpdisplay = ((playermp/100)*100);
if (good) {
showimg 1,picture1.gif,this.pos[1],this.pos[0];
}
else if (evil) {
showimg 1,picture1.gif,this.pos[1],this.pos[0];
}
else {
showimg 1,picture1.gif,this.pos[1],this.pos[0];
}
changeimgvis 1, 4;
if (this.mpdisplay>0&&timeout) {
showimg 2,picture2.gif,this.pos[1],this.pos[0];
changeimgpart 2,0,0,this.mpdisplay,2;
changeimgvis 2,4;
}
timeout = .05;
}
try this