Thread: Run Away Rupee
View Single Post
  #4  
Old 12-28-2001, 07:31 AM
Faheria_GP2 Faheria_GP2 is offline
Banned
Faheria_GP2's Avatar
Join Date: Oct 2001
Posts: 1,177
Faheria_GP2 is on a distinguished road
NPC Code:

if (created) {
this.shadeoff={-.25,1.25};
this.off={.5,1};
}
if (playertouchsme && this.jumping==0) {
dir=playerdir;
jump();
while (onwall(x+this.off[0],y+this.off[1])) {
if (this.jumping=0) jump();
sleep .05;
}
}
function jump() {
this.jumping=1;
this.shadex=x;
this.shadey=y;
for (this.i=2; this.i>=-2; this.i-=.5) {
y-=this.i;
x+=vecx(dir);
y+=vecy(dir);
this.shadex+=vecx(dir);
this.shadey+=vecy(dir);
//showimg 0,shadow.gif,this.shadex+this.shadeoff[0],this.shadey+this.shadeoff[1];
//Uncomment that line if you have shadow.gif, otherwise, massive slowdown.
changeimgvis 0,0;
sleep .05;
}
hideimg 0;
this.jumping=0;
}



use golrupee.gif or something similar
Reply With Quote