NPC Code:
if (created) {
this.rgoingup=1;
this.bgoingup=1;
this.ggoingup=1;
this.goingup=1;
this.red=178;
this.blue=158;
this.green=12;
this.i=2;
this.r=7;
this.c=0;
this.a=3.14/2;
this.ox=x;
this.oy=y;
}
while(this.r>2) {
this.x=this.ox+cos(this.a)*this.r;
this.y=this.oy+sin(this.a)*this.r;
if (this.red<200&&this.rgoingup==1) this.red+=.85;
if (this.red>1&&this.rgoingup==0) this.red-=.85;
if (this.red==199) {this.rgoingup=0;setplayerprop #c,rd;}
if (this.red==1) {this.rgoingup=1;setplayerprop #c,ru;}
if (this.blue<200&&this.bgoingup==1) this.blue+=.75;
if (this.blue>1&&this.bgoingup==0) this.blue-=.75;
if (this.blue==199) {this.bgoingup=0;setplayerprop #c,bd;}
if (this.blue==1) {this.bgoingup=1;setplayerprop #c,bu;}
if (this.green<200&&this.ggoingup==1) this.green+=.67;
if (this.green>1&&this.ggoingup==0) this.green-=.67;
if (this.green==199) {this.ggoingup=0;setplayerprop #c,gd;}
if (this.green==1) {this.ggoingup=1;setplayerprop #c,gu;}
if (this.i<99&&this.goingup==1) this.i+=1;
if (this.i>1&&this.goingup==0) this.i-=1;
if (this.i==99) this.goingup=0;
if (this.i==1) this.goingup=1;
this.a+=.314;
showimg 201,light2.png,this.x,this.y;
changeimgcolors 201,int(this.red)/100,int(this.green)/100,int(this.blue)/100,(this.i%99)/100;
changeimgzoom 201,.75;
this.c=this.c+.01;
sleep .05;
}