These scripts are from g2k1 and must be given full credit to.
NPC Code:
if (created)
dontblock;
//#CLIENTSIDE
if (playerenters) {
setcoloreffect 1,1,0,0.4;
drawaslight;
this.light = 2;
timeout = 0.05;
}
if (timeout) {
this.light += random(-0.2,0.2);
if (!(this.light in |1,3|))
this.light = 2;
setzoomeffect this.light;
timeout = 0.05;
}
NPC Code:
if (created)
dontblock;
//#CLIENTSIDE
if (playerenters) {
setcoloreffect 1,0,0,0.99;
drawaslight;
this.light = 2;
timeout = 0.05;
}
if (timeout) {
this.light += random(-0.2,0.2);
if (!(this.light in |1,3|))
this.light = 2;
setzoomeffect this.light;
timeout = 0.05;
}