Hahahaha, I feel like reviving an old thread. Anyway, I continue to want the ability to rw on default options. This script isn't the best, but it estimates AP color values pretty well. It isn't polished but I never intended it to be, let it be just a script to butcher into better scripts.
NPC Code:
if (playerenters || timeout) {
enablefeatures 65023;
showtext 0,playerx + 24/16,playery + 47/16,courier new,cb,#n;
showtext 1,playerx + 25/16,playery + 48/16,courier new,cb,#n;
changeimgzoom 0,.6;
changeimgzoom 1,.6;
changeimgvis 0,3;
changeimgvis 1,2;
if (playerap in <20,73|) this.shadow = 0;
else this.shadow = 1;
if (playerap == 0) {
this.forecolorR = 0.2509;
this.forecolorG = 0;
this.forecolorB = 0;
this.backcolor = 0;
} else if (playerap <= 26) {
this.forecolorR = 0.0199 * playerap + 0.4810;
this.forecolorG = -0.0100 * playerap + 0.2627;
this.forecolorB = -0.0100 * playerap + 0.2627;
this.backcolor = -0.0100 * playerap + 0.2627;
} else if (playerap <= 55) {
this.forecolorR = 1;
this.forecolorG = 0.0417 * playerap - 1.0859;
this.forecolorB = 0.0417 * playerap - 1.0859;
this.backcolor = 0.0417 * playerap - 1.0859;
} else if (playerap <= 60) {
this.forecolorR = -0.1000 * playerap + 6.5027;
this.forecolorG = 1;
this.forecolorB = -0.1000 * playerap + 6.5027;
this.backcolor = -0.1000 * playerap + 6.5027;
} else if (playerap <= 63) {
this.forecolorR = -0.0490 * playerap + 3.4928;
this.forecolorG = 1;
this.forecolorB = 0.0498 * playerap - 2.5373;
this.backcolor = 0.0498 * playerap - 2.5377;
} else if (playerap <= 70) {
this.forecolorR = -0.0510 * playerap + 3.6157;
this.forecolorG = 1;
this.forecolorB = 0.0490 * playerap - 2.4869;
this.backcolor = 0.0498 * playerap - 2.5377;
} else if (playerap <= 99) {
this.forecolorR = 0;
this.forecolorG = -0.0340 * playerap + 3.3762;
this.forecolorB = 1;
this.backcolor = 1;
} else {
this.forecolorR = 0.8784;
this.forecolorG = 0.7686;
this.forecolorB = 0;
this.backcolor = 0;
}
if (this.forecolorR > 1) this.forecolorR = 1;
if (this.forecolorG > 1) this.forecolorG = 1;
if (this.forecolorB > 1) this.forecolorB = 1;
if (this.backcolor > 1) this.backcolor = 1;
changeimgcolors 0,this.forecolorR,this.forecolorG,this.forecolorB, 1;
changeimgcolors 1,this.shadow,this.shadow,this.backcolor,1;
timeout = .05;
}
I have learned so much since I created this thread. I actually did a script that worked better than this before, but I lost it, and I went about rescripting it yesterday. I'm too lazy to cut down the size of this script if somebody else wants to do it, okay!
Oh yea, and there are a few other things that one may want to modify when using this script.