Quote:
Originally posted by relenakat
This is sorta jsut a simple script but what I'm wondering is why is it so laggy?
NPC Code:
}
if (created||playerenters) {
setcharprop #3,head5.gif;
set O.o;
}
while (O.o&&this.O.o<=20){
npcs[0].y=npcs[0].y-.5;
sleep .3;
this.O.o = this.O.o+1;
setcharani walk,;
dir = 0;
}
while (O.o&&this.O.o<=40){
npcs[0].x=npcs[0].x+.5;
sleep .1;
this.O.o = this.O.o+1;
dir = 3;
}
while(this.O.o==41){
setcharani idle,;
message This is *blank*'s room;
}
|
your "whiles" have no sleep