Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #16  
Old 08-01-2001, 08:14 AM
Guest
Posts: n/a
NPC Code:

timereverywhere;
if (created){
// Sets a few values
// this.csquirrelalive=1 means the squirrel is "alive" and free to move
// this.csquirrelalive=0 means it's dead
// this.csquirrelspeed the squirrel's speed (*this.cincreasespeed when running from player)
// this.ccloseness is how close the player gets before the player runs
this.csquirrelalive=1;
this.ncurdist=64;
this.csquirrelspeed=.6;
this.ccloseness=10;
this.cincreasespeed=1.5;
setgifpart squirrel.gif,0,0,22,23;
timeout=.05;
hearts=1;
}
if (timeout){
if (this.csquirrelalive==1){
// Basic tile check is below.
iputx = int(x/2)*2;
iputy = int(y/2)*2;
for (i=0; i<2; i++) for (j=0; j<2; j++) {
ib = board[iputx+i+64*(iputy+j)];
ibx = ib % 16;
iby = int(ib / 16);
}
// Checks to see of all the players on, which is closest.
this.ncurdist=64;
for (ipindex=0;ipindex<playerscount;ipindex++){
if (players[ipindex].id>=0){
this.nnewdist=((players[ipindex].x-x)^2+(players[ipindex].y-y)^2)^.5;
// If the newly tested distance is less than the old distance, then make it the current distance
if (this.nnewdist<=this.ncurdist){
this.ncurdist=this.nnewdist;
this.iplayer=ipindex;
}
}
}
// Tells what to do when the closest player is less than 10 spaces away
if (this.iplayer==0){
if (this.ncurdist<=this.ccloseness){
// When this.count reaches 5 it does the following to determine which random direction the squirrel will run.
if (this.icount>=5){
this.icount=0;
this.nxdist=abs(players[this.player].x-x);
this.nydist=abs(players[this.player].y-y);
// Based on the x and y distance from the player, only 3 directions may be selected.
if (this.nxdist>this.nydist){
if (players[this.iplayer].x<x){
this.itemp=(int(random(1,4)));
if (this.itemp==1) this.cdir=0;
if (this.itemp==2) this.cdir=2;
if (this.itemp==3) this.cdir=3;
}
if (players[this.iplayer].x>x){
this.itemp=(int(random(1,4)));
if (this.itemp==1) this.cdir=0;
if (this.itemp==2) this.cdir=1;
if (this.itemp==3) this.cdir=2;
}
}
if (this.nxdist<this.nydist){
if (players[this.iplayer].y<y){
this.itemp=(int(random(1,4)));
if (this.itemp==1) this.cdir=1;
if (this.itemp==2) this.cdir=2;
if (this.itemp==3) this.cdir=3;
}
if (players[this.iplayer].y>y){
this.itemp=(int(random(1,4)));
if (this.itemp==1) this.cdir=0;
if (this.itemp==2) this.cdir=1;
if (this.itemp==3) this.cdir=3;
}
}
}
this.icount++;
// Different things to do if the squirrel is under bramble.
if ((ibx==5&&iby==48)||(ibx==5&&iby==49)||(ibx==6&&ib y==48)||(ibx==6&&iby==49)){
setgifpart squirrel.gif,94,0,32,14;
if (this.cdir==0&&!onwall(x,y-(this.csquirrelspeed*this.cincreasespeed))&&!onwat er(x,y-(this.csquirrelspeed*this.cincreasespeed))) y-=this.csquirrelspeed*this.cincreasespeed;
if (this.cdir==1&&!onwall(x-(this.csquirrelspeed*this.cincreasespeed),y)&&!onw ater(x-(this.csquirrelspeed*this.cincreasespeed),y)) x-=this.csquirrelspeed*this.cincreasespeed;
if (this.cdir==2&&!onwall(x,y+(this.csquirrelspeed*th is.cincreasespeed))&&!onwater(x,y+(this.csquirrels peed*this.cincreasespeed))) y+=this.csquirrelspeed*this.cincreasespeed;
if (this.cdir==3&&!onwall(x+(this.csquirrelspeed*this .cincreasespeed),y)&&!onwater(x+(this.csquirrelspe ed*this.cincreasespeed),y)) x+=this.csquirrelspeed*this.cincreasespeed;
if (this.cdir==0&&y-5<=5) this.cdir=2;
if (this.cdir==1&&x-5<=5) this.cdir=3;
if (this.cdir==2&&y+5>=59) this.cdir=0;
if (this.cdir==3&&x+5>=59) this.cdir=1;
sleep .05;
setgifpart squirrel.gif,94,29,32,16;
}else{
// Tells where to move, and what image to show based on direction.
if (this.cdir==0){
setgifpart squirrel.gif,72,27,22,19;
if (!onwall(x,y-(this.csquirrelspeed*this.cincreasespeed))&&!onwat er(x,y-(this.csquirrelspeed*this.cincreasespeed))){
y-=this.csquirrelspeed*this.cincreasespeed;
} else {
this.icount=10;
}
sleep .05;
setgifpart squirrel.gif,72,0,22,23;
}
if (this.cdir==1){
setgifpart squirrel.gif,22,23,25,23;
if (!onwall(x-(this.csquirrelspeed*this.cincreasespeed),y)&&!onw ater(x-(this.csquirrelspeed*this.cincreasespeed),y)){
x-=this.csquirrelspeed*this.cincreasespeed;
} else {
this.icount=10;
}
sleep .05;
setgifpart squirrel.gif,21,0,24,23;
}
if (this.cdir==2){
setgifpart squirrel.gif,0,24,22,22;
if (!onwall(x,y+(this.csquirrelspeed*this.cincreasesp eed)+1)&&!onwater(x,y+(this.csquirrelspeed*this.ci ncreasespeed)+1)){
y+=this.csquirrelspeed*this.cincreasespeed;
} else {
this.icount=10;
}
sleep .05;
setgifpart squirrel.gif,0,0,22,23;
}
if (this.cdir==3){
setgifpart squirrel.gif,47,23,25,23;
if (!onwall(x+(this.csquirrelspeed*this.cincreasespee d)+1,y)&&!onwater(x+(this.csquirrelspeed*this.cinc reasespeed)+1,y)){
x+=this.csquirrelspeed*this.cincreasespeed;
} else {
this.icount=10;
}
sleep .05;
setgifpart squirrel.gif,47,0,24,23;
}
if (this.cdir==0&&y-5<=5) this.cdir=2;
if (this.cdir==1&&x-5<=5) this.cdir=3;
if (this.cdir==2&&y+5>=59) this.cdir=0;
if (this.cdir==3&&x+5>=59) this.cdir=1;
}
}else{
// What to do when the player is farther than 10 spaces.
this.icount=10;
// Sets the squirrel's "mode" every .5 seconds (1=moving)
if (this.icount2==5){
this.imode=(int(random(1,3)));
this.cdir=(int(random(0,4)));
this.icount2=0;
}
// When the squirrel is supposed to move, here's what to do.
if (this.imode==1){
// What to do when the squirrel is under bramble.
if ((ibx==5&&iby==48)||(ibx==5&&iby==49)||(ibx==6&&ib y==48)||(ibx==6&&iby==49)){
setgifpart squirrel.gif,94,0,32,14;
if (this.cdir==0&&!onwall(x,y-this.csquirrelspeed)&&!onwater(x,y-this.csquirrelspeed)) y-=this.csquirrelspeed;
if (this.cdir==1&&!onwall(x-this.csquirrelspeed,y)&&!onwater(x-this.csquirrelspeed,y)) x-=this.csquirrelspeed;
if (this.cdir==2&&!onwall(x,y+this.csquirrelspeed)&&! onwater(x,y+this.csquirrelspeed)) y+=this.csquirrelspeed;
if (this.cdir==3&&!onwall(x+this.csquirrelspeed,y)&&! onwater(x+this.csquirrelspeed,y)) x+=this.csquirrelspeed;
if (this.cdir==0&&y-5<=5) this.cdir=2;
if (this.cdir==1&&x-5<=5) this.cdir=3;
if (this.cdir==2&&y+5>=59) this.cdir=0;
if (this.cdir==3&&x+5>=59) this.cdir=1;
sleep .05;
setgifpart squirrel.gif,94,29,32,16;
}else{
// Tells where to move, and what image to show based on direction.
if (this.cdir==0){
setgifpart squirrel.gif,72,27,22,19;
if (!onwall(x,y-this.csquirrelspeed)&&!onwater(x,y-this.csquirrelspeed)){
y-=this.csquirrelspeed;
}else{
this.cdir=(int(random(0,4)));
}
sleep .05;
setgifpart squirrel.gif,72,0,22,23;
}
if (this.cdir==1){
setgifpart squirrel.gif,22,23,25,23;
if (!onwall(x-this.csquirrelspeed,y)&&!onwater(x-this.csquirrelspeed,y)){
x-=this.csquirrelspeed;
}else{
this.cdir=(int(random(0,4)));
}
sleep .05;
setgifpart squirrel.gif,21,0,24,23;
}
if (this.cdir==2){
setgifpart squirrel.gif,0,24,22,22;
if (!onwall(x,y+this.csquirrelspeed+1)&&!onwater(x,y+ this.csquirrelspeed+1)){
y+=this.csquirrelspeed;
}else{
this.cdir=(int(random(0,4)));
}
sleep .05;
setgifpart squirrel.gif,0,0,22,23;
}
if (this.cdir==3){
setgifpart squirrel.gif,47,23,25,23;
if (!onwall(x+this.csquirrelpeed+1,y)&&!onwater(x+thi s.csquirrelspeed+1,y)){
x+=this.csquirrelspeed;
}else{
this.cdir=(int(random(0,4)));
}
sleep .05;
setgifpart squirrel.gif,47,0,24,23;
}
if (this.cdir==0&&y-5<=5) this.cdir=2;
if (this.cdir==1&&x-5<=5) this.cdir=3;
if (this.cdir==2&&y+5>=59) this.cdir=0;
if (this.cdir==3&&x+5>=59) this.cdir=1;
}
}
this.icount2++;
}
}
}
timeout=.05;
}
// How to kill the squirrel.
if (washit || wasshot || waspelt){
hearts--;
setgifpart squirrel.gif,130,0,27,21;
timeout=.05;
this.csquirrelalive=0;
timeout=.10;
this.csquirrelalive=1;
}

Reply With Quote
  #17  
Old 08-01-2001, 08:39 AM
SkooL SkooL is offline
somebody to love
Join Date: Jun 2001
Location: bat country.
Posts: 3,446
SkooL is on a distinguished road
Send a message via AIM to SkooL
*blinks* You ripped that from the New World bunnies. You didn't even take the time to change the setgifparts to fit this guys squirrel.gif image correctly...
Quote:
Originally posted by IcePick_2001
NPC Code:

timereverywhere;
if (created){
// Sets a few values
// this.csquirrelalive=1 means the squirrel is "alive" and free to move
// this.csquirrelalive=0 means it's dead
// this.csquirrelspeed the squirrel's speed (*this.cincreasespeed when running from player)
// this.ccloseness is how close the player gets before the player runs
this.csquirrelalive=1;
this.ncurdist=64;
this.csquirrelspeed=.6;
this.ccloseness=10;
this.cincreasespeed=1.5;
setgifpart squirrel.gif,0,0,22,23;
timeout=.05;
hearts=1;
}
if (timeout){
if (this.csquirrelalive==1){
// Basic tile check is below.
iputx = int(x/2)*2;
iputy = int(y/2)*2;
for (i=0; i<2; i++) for (j=0; j<2; j++) {
ib = board[iputx+i+64*(iputy+j)];
ibx = ib % 16;
iby = int(ib / 16);
}
// Checks to see of all the players on, which is closest.
this.ncurdist=64;
for (ipindex=0;ipindex<playerscount;ipindex++){
if (players[ipindex].id>=0){
this.nnewdist=((players[ipindex].x-x)^2+(players[ipindex].y-y)^2)^.5;
// If the newly tested distance is less than the old distance, then make it the current distance
if (this.nnewdist<=this.ncurdist){
this.ncurdist=this.nnewdist;
this.iplayer=ipindex;
}
}
}
// Tells what to do when the closest player is less than 10 spaces away
if (this.iplayer==0){
if (this.ncurdist<=this.ccloseness){
// When this.count reaches 5 it does the following to determine which random direction the squirrel will run.
if (this.icount>=5){
this.icount=0;
this.nxdist=abs(players[this.player].x-x);
this.nydist=abs(players[this.player].y-y);
// Based on the x and y distance from the player, only 3 directions may be selected.
if (this.nxdist>this.nydist){
if (players[this.iplayer].x<x){
this.itemp=(int(random(1,4)));
if (this.itemp==1) this.cdir=0;
if (this.itemp==2) this.cdir=2;
if (this.itemp==3) this.cdir=3;
}
if (players[this.iplayer].x>x){
this.itemp=(int(random(1,4)));
if (this.itemp==1) this.cdir=0;
if (this.itemp==2) this.cdir=1;
if (this.itemp==3) this.cdir=2;
}
}
if (this.nxdist<this.nydist){
if (players[this.iplayer].y<y){
this.itemp=(int(random(1,4)));
if (this.itemp==1) this.cdir=1;
if (this.itemp==2) this.cdir=2;
if (this.itemp==3) this.cdir=3;
}
if (players[this.iplayer].y>y){
this.itemp=(int(random(1,4)));
if (this.itemp==1) this.cdir=0;
if (this.itemp==2) this.cdir=1;
if (this.itemp==3) this.cdir=3;
}
}
}
this.icount++;
// Different things to do if the squirrel is under bramble.
if ((ibx==5&&iby==48)||(ibx==5&&iby==49)||(ibx==6&&ib y==48)||(ibx==6&&iby==49)){
setgifpart squirrel.gif,94,0,32,14;
if (this.cdir==0&&!onwall(x,y-(this.csquirrelspeed*this.cincreasespeed))&&!onwat er(x,y-(this.csquirrelspeed*this.cincreasespeed))) y-=this.csquirrelspeed*this.cincreasespeed;
if (this.cdir==1&&!onwall(x-(this.csquirrelspeed*this.cincreasespeed),y)&&!onw ater(x-(this.csquirrelspeed*this.cincreasespeed),y)) x-=this.csquirrelspeed*this.cincreasespeed;
if (this.cdir==2&&!onwall(x,y+(this.csquirrelspeed*th is.cincreasespeed))&&!onwater(x,y+(this.csquirrels peed*this.cincreasespeed))) y+=this.csquirrelspeed*this.cincreasespeed;
if (this.cdir==3&&!onwall(x+(this.csquirrelspeed*this .cincreasespeed),y)&&!onwater(x+(this.csquirrelspe ed*this.cincreasespeed),y)) x+=this.csquirrelspeed*this.cincreasespeed;
if (this.cdir==0&&y-5<=5) this.cdir=2;
if (this.cdir==1&&x-5<=5) this.cdir=3;
if (this.cdir==2&&y+5>=59) this.cdir=0;
if (this.cdir==3&&x+5>=59) this.cdir=1;
sleep .05;
setgifpart squirrel.gif,94,29,32,16;
}else{
// Tells where to move, and what image to show based on direction.
if (this.cdir==0){
setgifpart squirrel.gif,72,27,22,19;
if (!onwall(x,y-(this.csquirrelspeed*this.cincreasespeed))&&!onwat er(x,y-(this.csquirrelspeed*this.cincreasespeed))){
y-=this.csquirrelspeed*this.cincreasespeed;
} else {
this.icount=10;
}
sleep .05;
setgifpart squirrel.gif,72,0,22,23;
}
if (this.cdir==1){
setgifpart squirrel.gif,22,23,25,23;
if (!onwall(x-(this.csquirrelspeed*this.cincreasespeed),y)&&!onw ater(x-(this.csquirrelspeed*this.cincreasespeed),y)){
x-=this.csquirrelspeed*this.cincreasespeed;
} else {
this.icount=10;
}
sleep .05;
setgifpart squirrel.gif,21,0,24,23;
}
if (this.cdir==2){
setgifpart squirrel.gif,0,24,22,22;
if (!onwall(x,y+(this.csquirrelspeed*this.cincreasesp eed)+1)&&!onwater(x,y+(this.csquirrelspeed*this.ci ncreasespeed)+1)){
y+=this.csquirrelspeed*this.cincreasespeed;
} else {
this.icount=10;
}
sleep .05;
setgifpart squirrel.gif,0,0,22,23;
}
if (this.cdir==3){
setgifpart squirrel.gif,47,23,25,23;
if (!onwall(x+(this.csquirrelspeed*this.cincreasespee d)+1,y)&&!onwater(x+(this.csquirrelspeed*this.cinc reasespeed)+1,y)){
x+=this.csquirrelspeed*this.cincreasespeed;
} else {
this.icount=10;
}
sleep .05;
setgifpart squirrel.gif,47,0,24,23;
}
if (this.cdir==0&&y-5<=5) this.cdir=2;
if (this.cdir==1&&x-5<=5) this.cdir=3;
if (this.cdir==2&&y+5>=59) this.cdir=0;
if (this.cdir==3&&x+5>=59) this.cdir=1;
}
}else{
// What to do when the player is farther than 10 spaces.
this.icount=10;
// Sets the squirrel's "mode" every .5 seconds (1=moving)
if (this.icount2==5){
this.imode=(int(random(1,3)));
this.cdir=(int(random(0,4)));
this.icount2=0;
}
// When the squirrel is supposed to move, here's what to do.
if (this.imode==1){
// What to do when the squirrel is under bramble.
if ((ibx==5&&iby==48)||(ibx==5&&iby==49)||(ibx==6&&ib y==48)||(ibx==6&&iby==49)){
setgifpart squirrel.gif,94,0,32,14;
if (this.cdir==0&&!onwall(x,y-this.csquirrelspeed)&&!onwater(x,y-this.csquirrelspeed)) y-=this.csquirrelspeed;
if (this.cdir==1&&!onwall(x-this.csquirrelspeed,y)&&!onwater(x-this.csquirrelspeed,y)) x-=this.csquirrelspeed;
if (this.cdir==2&&!onwall(x,y+this.csquirrelspeed)&&! onwater(x,y+this.csquirrelspeed)) y+=this.csquirrelspeed;
if (this.cdir==3&&!onwall(x+this.csquirrelspeed,y)&&! onwater(x+this.csquirrelspeed,y)) x+=this.csquirrelspeed;
if (this.cdir==0&&y-5<=5) this.cdir=2;
if (this.cdir==1&&x-5<=5) this.cdir=3;
if (this.cdir==2&&y+5>=59) this.cdir=0;
if (this.cdir==3&&x+5>=59) this.cdir=1;
sleep .05;
setgifpart squirrel.gif,94,29,32,16;
}else{
// Tells where to move, and what image to show based on direction.
if (this.cdir==0){
setgifpart squirrel.gif,72,27,22,19;
if (!onwall(x,y-this.csquirrelspeed)&&!onwater(x,y-this.csquirrelspeed)){
y-=this.csquirrelspeed;
}else{
this.cdir=(int(random(0,4)));
}
sleep .05;
setgifpart squirrel.gif,72,0,22,23;
}
if (this.cdir==1){
setgifpart squirrel.gif,22,23,25,23;
if (!onwall(x-this.csquirrelspeed,y)&&!onwater(x-this.csquirrelspeed,y)){
x-=this.csquirrelspeed;
}else{
this.cdir=(int(random(0,4)));
}
sleep .05;
setgifpart squirrel.gif,21,0,24,23;
}
if (this.cdir==2){
setgifpart squirrel.gif,0,24,22,22;
if (!onwall(x,y+this.csquirrelspeed+1)&&!onwater(x,y+ this.csquirrelspeed+1)){
y+=this.csquirrelspeed;
}else{
this.cdir=(int(random(0,4)));
}
sleep .05;
setgifpart squirrel.gif,0,0,22,23;
}
if (this.cdir==3){
setgifpart squirrel.gif,47,23,25,23;
if (!onwall(x+this.csquirrelpeed+1,y)&&!onwater(x+thi s.csquirrelspeed+1,y)){
x+=this.csquirrelspeed;
}else{
this.cdir=(int(random(0,4)));
}
sleep .05;
setgifpart squirrel.gif,47,0,24,23;
}
if (this.cdir==0&&y-5<=5) this.cdir=2;
if (this.cdir==1&&x-5<=5) this.cdir=3;
if (this.cdir==2&&y+5>=59) this.cdir=0;
if (this.cdir==3&&x+5>=59) this.cdir=1;
}
}
this.icount2++;
}
}
}
timeout=.05;
}
// How to kill the squirrel.
if (washit || wasshot || waspelt){
hearts--;
setgifpart squirrel.gif,130,0,27,21;
timeout=.05;
this.csquirrelalive=0;
timeout=.10;
this.csquirrelalive=1;
}

__________________
the sky is falling

Last edited by SkooL; 08-01-2001 at 08:45 AM..
Reply With Quote
  #18  
Old 08-01-2001, 09:21 AM
LiquidIce00 LiquidIce00 is offline
RadioActive Monkeeh
LiquidIce00's Avatar
Join Date: Apr 2001
Location: dirty south
Posts: 2,112
LiquidIce00 is on a distinguished road
Send a message via ICQ to LiquidIce00 Send a message via AIM to LiquidIce00 Send a message via Yahoo to LiquidIce00
LOL Icepick should be banned cuz releasing New World stuff is illegal.
__________________
LiquidIce *Owner* (UnholyNation)
-UN Website
http://www.unholynation.com
-UN Forum
http://forums.unholynation.com
-
-the thinker
-

-
onwall2 for nonp2p (i suck at onwall)
Reply With Quote
  #19  
Old 08-01-2001, 09:28 AM
TrueHeaT TrueHeaT is offline
Zatoichi
Join Date: Jun 2001
Posts: 7,277
TrueHeaT is an unknown quantity at this point
Quote:
Originally posted by IcePick_2001
NPC Code:

timereverywhere;
if (created){
// Sets a few values
// this.csquirrelalive=1 means the squirrel is "alive" and free to move
// this.csquirrelalive=0 means it's dead
// this.csquirrelspeed the squirrel's speed (*this.cincreasespeed when running from player)
// this.ccloseness is how close the player gets before the player runs
this.csquirrelalive=1;
this.ncurdist=64;
this.csquirrelspeed=.6;
this.ccloseness=10;
this.cincreasespeed=1.5;
setgifpart squirrel.gif,0,0,22,23;
timeout=.05;
hearts=1;
}
if (timeout){
if (this.csquirrelalive==1){
// Basic tile check is below.
iputx = int(x/2)*2;
iputy = int(y/2)*2;
for (i=0; i<2; i++) for (j=0; j<2; j++) {
ib = board[iputx+i+64*(iputy+j)];
ibx = ib % 16;
iby = int(ib / 16);
}
// Checks to see of all the players on, which is closest.
this.ncurdist=64;
for (ipindex=0;ipindex<playerscount;ipindex++){
if (players[ipindex].id>=0){
this.nnewdist=((players[ipindex].x-x)^2+(players[ipindex].y-y)^2)^.5;
// If the newly tested distance is less than the old distance, then make it the current distance
if (this.nnewdist<=this.ncurdist){
this.ncurdist=this.nnewdist;
this.iplayer=ipindex;
}
}
}
// Tells what to do when the closest player is less than 10 spaces away
if (this.iplayer==0){
if (this.ncurdist<=this.ccloseness){
// When this.count reaches 5 it does the following to determine which random direction the squirrel will run.
if (this.icount>=5){
this.icount=0;
this.nxdist=abs(players[this.player].x-x);
this.nydist=abs(players[this.player].y-y);
// Based on the x and y distance from the player, only 3 directions may be selected.
if (this.nxdist>this.nydist){
if (players[this.iplayer].x<x){
this.itemp=(int(random(1,4)));
if (this.itemp==1) this.cdir=0;
if (this.itemp==2) this.cdir=2;
if (this.itemp==3) this.cdir=3;
}
if (players[this.iplayer].x>x){
this.itemp=(int(random(1,4)));
if (this.itemp==1) this.cdir=0;
if (this.itemp==2) this.cdir=1;
if (this.itemp==3) this.cdir=2;
}
}
if (this.nxdist<this.nydist){
if (players[this.iplayer].y<y){
this.itemp=(int(random(1,4)));
if (this.itemp==1) this.cdir=1;
if (this.itemp==2) this.cdir=2;
if (this.itemp==3) this.cdir=3;
}
if (players[this.iplayer].y>y){
this.itemp=(int(random(1,4)));
if (this.itemp==1) this.cdir=0;
if (this.itemp==2) this.cdir=1;
if (this.itemp==3) this.cdir=3;
}
}
}
this.icount++;
// Different things to do if the squirrel is under bramble.
if ((ibx==5&&iby==48)||(ibx==5&&iby==49)||(ibx==6&&ib y==48)||(ibx==6&&iby==49)){
setgifpart squirrel.gif,94,0,32,14;
if (this.cdir==0&&!onwall(x,y-(this.csquirrelspeed*this.cincreasespeed))&&!onwat er(x,y-(this.csquirrelspeed*this.cincreasespeed))) y-=this.csquirrelspeed*this.cincreasespeed;
if (this.cdir==1&&!onwall(x-(this.csquirrelspeed*this.cincreasespeed),y)&&!onw ater(x-(this.csquirrelspeed*this.cincreasespeed),y)) x-=this.csquirrelspeed*this.cincreasespeed;
if (this.cdir==2&&!onwall(x,y+(this.csquirrelspeed*th is.cincreasespeed))&&!onwater(x,y+(this.csquirrels peed*this.cincreasespeed))) y+=this.csquirrelspeed*this.cincreasespeed;
if (this.cdir==3&&!onwall(x+(this.csquirrelspeed*this .cincreasespeed),y)&&!onwater(x+(this.csquirrelspe ed*this.cincreasespeed),y)) x+=this.csquirrelspeed*this.cincreasespeed;
if (this.cdir==0&&y-5<=5) this.cdir=2;
if (this.cdir==1&&x-5<=5) this.cdir=3;
if (this.cdir==2&&y+5>=59) this.cdir=0;
if (this.cdir==3&&x+5>=59) this.cdir=1;
sleep .05;
setgifpart squirrel.gif,94,29,32,16;
}else{
// Tells where to move, and what image to show based on direction.
if (this.cdir==0){
setgifpart squirrel.gif,72,27,22,19;
if (!onwall(x,y-(this.csquirrelspeed*this.cincreasespeed))&&!onwat er(x,y-(this.csquirrelspeed*this.cincreasespeed))){
y-=this.csquirrelspeed*this.cincreasespeed;
} else {
this.icount=10;
}
sleep .05;
setgifpart squirrel.gif,72,0,22,23;
}
if (this.cdir==1){
setgifpart squirrel.gif,22,23,25,23;
if (!onwall(x-(this.csquirrelspeed*this.cincreasespeed),y)&&!onw ater(x-(this.csquirrelspeed*this.cincreasespeed),y)){
x-=this.csquirrelspeed*this.cincreasespeed;
} else {
this.icount=10;
}
sleep .05;
setgifpart squirrel.gif,21,0,24,23;
}
if (this.cdir==2){
setgifpart squirrel.gif,0,24,22,22;
if (!onwall(x,y+(this.csquirrelspeed*this.cincreasesp eed)+1)&&!onwater(x,y+(this.csquirrelspeed*this.ci ncreasespeed)+1)){
y+=this.csquirrelspeed*this.cincreasespeed;
} else {
this.icount=10;
}
sleep .05;
setgifpart squirrel.gif,0,0,22,23;
}
if (this.cdir==3){
setgifpart squirrel.gif,47,23,25,23;
if (!onwall(x+(this.csquirrelspeed*this.cincreasespee d)+1,y)&&!onwater(x+(this.csquirrelspeed*this.cinc reasespeed)+1,y)){
x+=this.csquirrelspeed*this.cincreasespeed;
} else {
this.icount=10;
}
sleep .05;
setgifpart squirrel.gif,47,0,24,23;
}
if (this.cdir==0&&y-5<=5) this.cdir=2;
if (this.cdir==1&&x-5<=5) this.cdir=3;
if (this.cdir==2&&y+5>=59) this.cdir=0;
if (this.cdir==3&&x+5>=59) this.cdir=1;
}
}else{
// What to do when the player is farther than 10 spaces.
this.icount=10;
// Sets the squirrel's "mode" every .5 seconds (1=moving)
if (this.icount2==5){
this.imode=(int(random(1,3)));
this.cdir=(int(random(0,4)));
this.icount2=0;
}
// When the squirrel is supposed to move, here's what to do.
if (this.imode==1){
// What to do when the squirrel is under bramble.
if ((ibx==5&&iby==48)||(ibx==5&&iby==49)||(ibx==6&&ib y==48)||(ibx==6&&iby==49)){
setgifpart squirrel.gif,94,0,32,14;
if (this.cdir==0&&!onwall(x,y-this.csquirrelspeed)&&!onwater(x,y-this.csquirrelspeed)) y-=this.csquirrelspeed;
if (this.cdir==1&&!onwall(x-this.csquirrelspeed,y)&&!onwater(x-this.csquirrelspeed,y)) x-=this.csquirrelspeed;
if (this.cdir==2&&!onwall(x,y+this.csquirrelspeed)&&! onwater(x,y+this.csquirrelspeed)) y+=this.csquirrelspeed;
if (this.cdir==3&&!onwall(x+this.csquirrelspeed,y)&&! onwater(x+this.csquirrelspeed,y)) x+=this.csquirrelspeed;
if (this.cdir==0&&y-5<=5) this.cdir=2;
if (this.cdir==1&&x-5<=5) this.cdir=3;
if (this.cdir==2&&y+5>=59) this.cdir=0;
if (this.cdir==3&&x+5>=59) this.cdir=1;
sleep .05;
setgifpart squirrel.gif,94,29,32,16;
}else{
// Tells where to move, and what image to show based on direction.
if (this.cdir==0){
setgifpart squirrel.gif,72,27,22,19;
if (!onwall(x,y-this.csquirrelspeed)&&!onwater(x,y-this.csquirrelspeed)){
y-=this.csquirrelspeed;
}else{
this.cdir=(int(random(0,4)));
}
sleep .05;
setgifpart squirrel.gif,72,0,22,23;
}
if (this.cdir==1){
setgifpart squirrel.gif,22,23,25,23;
if (!onwall(x-this.csquirrelspeed,y)&&!onwater(x-this.csquirrelspeed,y)){
x-=this.csquirrelspeed;
}else{
this.cdir=(int(random(0,4)));
}
sleep .05;
setgifpart squirrel.gif,21,0,24,23;
}
if (this.cdir==2){
setgifpart squirrel.gif,0,24,22,22;
if (!onwall(x,y+this.csquirrelspeed+1)&&!onwater(x,y+ this.csquirrelspeed+1)){
y+=this.csquirrelspeed;
}else{
this.cdir=(int(random(0,4)));
}
sleep .05;
setgifpart squirrel.gif,0,0,22,23;
}
if (this.cdir==3){
setgifpart squirrel.gif,47,23,25,23;
if (!onwall(x+this.csquirrelpeed+1,y)&&!onwater(x+thi s.csquirrelspeed+1,y)){
x+=this.csquirrelspeed;
}else{
this.cdir=(int(random(0,4)));
}
sleep .05;
setgifpart squirrel.gif,47,0,24,23;
}
if (this.cdir==0&&y-5<=5) this.cdir=2;
if (this.cdir==1&&x-5<=5) this.cdir=3;
if (this.cdir==2&&y+5>=59) this.cdir=0;
if (this.cdir==3&&x+5>=59) this.cdir=1;
}
}
this.icount2++;
}
}
}
timeout=.05;
}
// How to kill the squirrel.
if (washit || wasshot || waspelt){
hearts--;
setgifpart squirrel.gif,130,0,27,21;
timeout=.05;
this.csquirrelalive=0;
timeout=.10;
this.csquirrelalive=1;
}

you're pathetic..
__________________

If anyone has any of my tilesets and graphics, please PM me as I would really love to have them.
Reply With Quote
  #20  
Old 08-01-2001, 09:56 AM
Guest
Posts: n/a
umm no... my friend helped me out with this script and thats what he did..
Reply With Quote
  #21  
Old 08-01-2001, 10:01 AM
kyle0654 kyle0654 is offline
-. .`
kyle0654's Avatar
Join Date: Mar 2001
Posts: 1,000
kyle0654 will become famous soon enough
did you just run that through a text replacer and overwrite rabbit with squirrel?!?! I'm looking at the old New World rabbit script right now and they're EXACTLY the same...down to variable names and formatting.
Reply With Quote
  #22  
Old 08-01-2001, 10:01 AM
Guest
Posts: n/a
I am sorry all, I didnt know that was a newworld script...
Reply With Quote
  #23  
Old 08-01-2001, 10:02 AM
kyle0654 kyle0654 is offline
-. .`
kyle0654's Avatar
Join Date: Mar 2001
Posts: 1,000
kyle0654 will become famous soon enough
and I'm supposed to believe you why?
Reply With Quote
  #24  
Old 08-01-2001, 10:12 AM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
You didnt know that you copied a script. I believe you

And the Squirl is in Webgifs if you were on Damasca. Since there whole tielset / theme was based on Zelda. (I guess thats one of the reasons it was taken down)
__________________

subliminal message: 1+1=3
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 03:24 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.