View Single Post
  #1  
Old 12-23-2001, 07:48 PM
LordMatt LordMatt is offline
V Avatar
LordMatt's Avatar
Join Date: Jun 2001
Location: Texas
Posts: 954
LordMatt is on a distinguished road
Send a message via AIM to LordMatt
Possibly overhaul this script?

Is there a way you could make this script any better?

NPC Code:
if (timeout) {
if (isweapon) {
showstats 1+2+9+4+16+256+512+1024;
this.pos = {screenwidth-180,30};
this.hpdisplay = ((playerhearts/playerfullhearts)*100);
this.mpdisplay = ((playermp/100)*100);
this.apdisplay = ((playerap/100)*100);
if (good) {
showimg 1,z_healthmain.gif,this.pos[0],this.pos[1];
}
else if (evil) {
showimg 1,z_healthmain.gif,this.pos[0],this.pos[1];
}
else {
showimg 1,z_healthmain.gif,this.pos[0],this.pos[1];
}
changeimgvis 1, 4;
if (this.hpdisplay>0) {
showimg 3,z_hpbar.gif,this.pos[0]+15,this.pos[1]+33;
changeimgpart 3,0,0,this.hpdisplay,6;
changeimgvis 3,4;
}
else {
hideimg 3;
}
if (this.apdisplay>0) {
showimg 4,z_apbar.gif,this.pos[0]+15,this.pos[1]+50;
changeimgpart 4,0,0,this.apdisplay,6;
changeimgvis 4,4;
}
else {
hideimg 4;
}
if (this.mpdisplay>0) {
showimg 5,z_mpbar.gif,this.pos[0]+17,this.pos[1]+66;
changeimgpart 5,0,0,this.mpdisplay,6;
changeimgvis 5,4;
}
else {
hideimg 5;
}
}
timeout=.05;
}
if (playerdies) {playerap=playerap;playermp=playermp;}

__________________
-Matt
Reply With Quote