PDA

View Full Version : NPC Fun


omni-m00gle
06-21-2001, 11:03 AM
A little contest thingy..
Who can script a door (touch it, dissapears, reapears after 1 second) the longest? Not shortest..longest.. :D

KJS
06-21-2001, 02:31 PM
see I could make a script that will never end... for that script lol...

MoonAngel
06-21-2001, 03:03 PM
humm, he means, type a 358971308 pages script for a door, longest script winz =P

CrazedMerlin
06-21-2001, 04:06 PM
if (playerenters) {timeout=0.5;
message ;
sleep0;
message ;
sleep0;}
if (timeout) {message ;
sleep0;
set heyicangoonforever;}
if (heyicangoonforever) {set yougetthepoint;
unset heyicangoonforever;}
if (playertouchsme) {hide;
play nextpage.wav;
sleep1;
show;}

grim_squeaker_x
06-21-2001, 06:11 PM
I think this is one of the longest without resorting to pointless flags:
if (playertouchsme&&this.moving==0) {
this.moving=1;
playlooped stonemove.wav;
setimgpart door.gif,0,0,31,32;
sleep 0.05;
setimgpart door.gif,0,0,30,32;
sleep 0.05;
setimgpart door.gif,0,0,29,32;
sleep 0.05;
setimgpart door.gif,0,0,28,32;
sleep 0.05;
setimgpart door.gif,0,0,27,32;
sleep 0.05;
setimgpart door.gif,0,0,26,32;
sleep 0.05;
setimgpart door.gif,0,0,25,32;
sleep 0.05;
setimgpart door.gif,0,0,24,32;
sleep 0.05;
setimgpart door.gif,0,0,23,32;
sleep 0.05;
setimgpart door.gif,0,0,22,32;
sleep 0.05;
setimgpart door.gif,0,0,21,32;
sleep 0.05;
setimgpart door.gif,0,0,20,32;
sleep 0.05;
setimgpart door.gif,0,0,19,32;
sleep 0.05;
setimgpart door.gif,0,0,18,32;
sleep 0.05;
setimgpart door.gif,0,0,17,32;
sleep 0.05;
setimgpart door.gif,0,0,16,32;
sleep 0.05;
setimgpart door.gif,0,0,15,32;
sleep 0.05;
setimgpart door.gif,0,0,14,32;
sleep 0.05;
setimgpart door.gif,0,0,13,32;
sleep 0.05;
setimgpart door.gif,0,0,12,32;
sleep 0.05;
setimgpart door.gif,0,0,11,32;
sleep 0.05;
setimgpart door.gif,0,0,10,32;
sleep 0.05;
setimgpart door.gif,0,0,9,32;
sleep 0.05;
setimgpart door.gif,0,0,8,32;
sleep 0.05;
setimgpart door.gif,0,0,7,32;
sleep 0.05;
setimgpart door.gif,0,0,6,32;
sleep 0.05;
setimgpart door.gif,0,0,5,32;
sleep 0.05;
setimgpart door.gif,0,0,4,32;
sleep 0.05;
setimgpart door.gif,0,0,3,32;
sleep 0.05;
setimgpart door.gif,0,0,2,32;
sleep 0.05;
setimgpart door.gif,0,0,1,32;
sleep 0.05;
hide;
dontblock;
sleep 3;
show;
blockagain;
setimgpart door.gif,0,0,1,32;
sleep 0.05;
setimgpart door.gif,0,0,2,32;
sleep 0.05;
setimgpart door.gif,0,0,3,32;
sleep 0.05;
setimgpart door.gif,0,0,4,32;
sleep 0.05;
setimgpart door.gif,0,0,5,32;
sleep 0.05;
setimgpart door.gif,0,0,6,32;
sleep 0.05;
setimgpart door.gif,0,0,7,32;
sleep 0.05;
setimgpart door.gif,0,0,8,32;
sleep 0.05;
setimgpart door.gif,0,0,9,32;
sleep 0.05;
setimgpart door.gif,0,0,10,32;
sleep 0.05;
setimgpart door.gif,0,0,11,32;
sleep 0.05;
setimgpart door.gif,0,0,12,32;
sleep 0.05;
setimgpart door.gif,0,0,13,32;
sleep 0.05;
setimgpart door.gif,0,0,14,32;
sleep 0.05;
setimgpart door.gif,0,0,15,32;
sleep 0.05;
setimgpart door.gif,0,0,16,32;
sleep 0.05;
setimgpart door.gif,0,0,17,32;
sleep 0.05;
setimgpart door.gif,0,0,18,32;
sleep 0.05;
setimgpart door.gif,0,0,19,32;
sleep 0.05;
setimgpart door.gif,0,0,20,32;
sleep 0.05;
setimgpart door.gif,0,0,21,32;
sleep 0.05;
setimgpart door.gif,0,0,22,32;
sleep 0.05;
setimgpart door.gif,0,0,23,32;
sleep 0.05;
setimgpart door.gif,0,0,24,32;
sleep 0.05;
setimgpart door.gif,0,0,25,32;
sleep 0.05;
setimgpart door.gif,0,0,26,32;
sleep 0.05;
setimgpart door.gif,0,0,27,32;
sleep 0.05;
setimgpart door.gif,0,0,28,32;
sleep 0.05;
setimgpart door.gif,0,0,29,32;
sleep 0.05;
setimgpart door.gif,0,0,30,32;
sleep 0.05;
setimgpart door.gif,0,0,31,32;
sleep 0.05;
setimgpart door.gif,0,0,32,32;
this.moving=0;
stopsound stonemove.wav;
}
And a shortened version:
if (playertouchsme&&this.moving==0) {
playlooped stonemove.wav;
this.moving=1;
for (this.i=1;this.i<32;this.i++) {
setimgpart door.gif,0,0,32-this.i,32;
sleep 0.05;
}
hide;
dontblock;
sleep 3;
show;
blockagain;
for (this.i=1;this.i<33;this.i++) {
setimgpart door.gif,0,0,0+this.i,32;
sleep 0.05;
}
this.moving=1;
stopsound stonemove.wav;
}