NPC Code:
// NPC made by Element (Developer)
//#CLIENTSIDE
if (playerenters) {
stopmidi;
playery=65;
showstats 0;
timereverywhere;
timeout=0.05;
}
if(timeout){
setani idle,;
setfocus 30,30;
this.time++;
if(this.time<=80){
showimg 202+(playerid*50),@b@All Rights Reserved Registerd 2006,26.5,32;
this.light=1-(abs(40-this.time)/40);
this.min=0;
this.max=2;
image();
}else if(this.time<=120){
showimg 201+(playerid*50),seekimg.png,19.78125,23.84375;
this.light=(this.time-80)/40;
this.min=0;
this.max=1;
image();
}else if(this.time<=160){
showimg 202+(playerid*50),@b@Start,29,40;
showimg 203+(playerid*50),@b@Leave,29,42;
showimg 204+(playerid*50),broadgoldsword.png,27,40.5+(2*th is.selection);
changeimgpart 204+(playerid*50),104,24,24,12;
showimg 205+(playerid*50),@b@(Press S to Select),26,38;
if(this.time<=140) this.light=(this.time-120)/20;
this.min=1;
if(lighteffectsenabled) this.max=5;
else this.max=4;
image();
if(keydown(0)||keydown(2)){
if(this.arrow<1){
this.selection=1-this.selection;
this.arrow=1;
}
}else this.arrow=0;
if(keydown(5)){
if(this.selection=1){
set Leave;
exit();
}
this.time=161;
}else if(this.time>140) this.time=140;
}else if(this.time<=200){
this.light=1-((this.time-160)/40);
this.min=0;
this.max=5;
image();
}else if(this.time<=300){
hideimg 203+(playerid*50);
showimg 201+(playerid*50),@#e(0,this.time-200,It was #v(int(timevar/2620800)+601) You are just a lonely temple guardian.),17,20;
if(this.time>252) showimg 202+(playerid*50),@#e(0,this.time-252,you were entrusted... ),17,22;
else hideimg 202+(playerid*50);
text();
}
//#CLIENTSIDE
else if(this.time<=360){
showimg 204+(playerid*50),white.png,11.5,24;
if(this.time>340) this.light=1;
else this.light=(this.time-340)/40;
this.min=3;
this.max=4;
image();
}
//#CLIENTSIDE
else if(this.time<=500){
hideimg 204+(playerid*50);
showimg 201+(playerid*50),@#e(0,this.time-360,...to keep the Evil
Doors in the back of the temple closed.),15,20;
if(this.time>422) showimg 202+(playerid*50),@#e(0,this.time-422,you go day by day with nothing interesting
happening to you....),15,22;
else hideimg 202+(playerid*50);
text();
}
//#CLIENTSIDE
else if(this.time<=560){
showimg 204+(playerid*50),white.png,11.5,24;
if(this.time>540) this.light=1;
else this.light=(this.time-540)/40;
this.min=3;
this.max=4;
image();
}
//#CLIENTSIDE
else if(this.time<=760){
hideimg 204+(playerid*50);
showimg 201+(playerid*50),@#e(0,this.time-560,Just getting older ...and always guarding the "Sacred Seal" from
breaking.),15,19;
if(this.time>623) showimg 202+(playerid*50),@#e(0,this.time-623,Until one fatefull day. . . .),15,21;
else hideimg 202+(playerid*50);
if(this.time>698) showimg 203+(playerid*50),@#e(0,this.time-698,-End of the Story Introduction-),15,23;
else hideimg 203+(playerid*50);
text();
}else if(this.time<=820){
showimg 204+(playerid*50),white.png,11.5,24;
if(this.time>800) this.light=1;
else this.light=(this.time-800)/40;
this.min=3;
this.max=4;
image();
}else{
exit();
}
timereverywhere;
timeout=0.05;
}
function exit(){
setcharani idle,;
showstats 2047;
resetfocus;
setlevel2 onlinestartlocal.nw,30,9.5;
}
function image(){
for(this.i=this.min;this.i<this.max;this.i++){
changeimgcolors 201+this.i+(playerid*50),this.light,this.light,thi s.light,this.light;
changeimgvis 201+this.i+(playerid*50),3;
}
}
function text(){
for(this.i=0;this.i<3;this.i++){
changeimgcolors 201+this.i+(playerid*50),1,1,0.5,0.75;
changeimgvis 201+this.i+(playerid*50),3;
}
}