View Single Post
  #1  
Old 08-19-2006, 09:50 PM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to Yen
Zodiac.. Crashed by a Bush..

... This morning, Zodiac was crashed by a bush.
Directly from /stats:
1. 40.037491666 % npcs[128] (in level zodiacworld_am15.nw at pos (34, 20)) (bush)
The second NPC was the class 'leaps,' which is created when a bush is destroyed, at 9%.

I'm thinking it was done by a modem tap... But anyway, could anyone look at this script and tell me what may have happened or ways to prevent modem tapping?

PHP Code:
function onCreated() {
  
this.dead false;
  
setimgpart("zodiac_bush.png",0,0,32,32);
  
setshape(1,32,32);
  
drawunderplayer();
  
layer 0;
}

function 
onActionProjectile() {
  if (
this.dead) return;
  for (
this.0this.params[2].size(); this.a++) {
    if (
params[2][this.a][0] == "wepeff") {
      if (
params[2][this.a][1in {"slash","piercing"}) {
        
CutBush("slash");
        break;
      }
    }
    if (
params[2][this.a][0] == "magic") {
      if (
params[2][this.a][1] == "fire") {
        
CutBush("fire");
        break;
      }
    }
  }
}

function 
onActionDamage() {
  if (
this.dead) return;
  for (
this.0this.params[1].size(); this.a++) {
    if (
params[1][this.a][0] == "wepeff") {
      if (
params[1][this.a][1in {"slash","piercing"}) {
        
CutBush("slash");
        break;
      }
    }
    if (
params[1][this.a][0] == "magic") {
      if (
params[1][this.a][1] == "fire") {
        
CutBush("fire");
        break;
      }
    }
  }
}

function 
onTimeout() {
  
RespawnBush();
}

public function 
CutBush(cutfrom) {
  if (
this.dead) return;
  if (
cutfrom == "slash") {
    
this.leaps putnpc2(x,y,"join(\"leaps\");");
    
this.leaps.leaptype "bush";
  }
  if (
cutfrom == "fire") {
    
this.leaps putnpc2(x,y,"join(\"leaps\");");
    
this.leaps.leaptype "fire";
  }
  if (
random(0,1) < 0.3) {
    
this.dropitem putnpc2(xy"join(\"item\");");
    
this.dropitem.quantity 1;
    
this.dropitem.itemname "Leaves";
    
this.dropitem.arcname "items/leaves";
  }
  
setimgpart("zodiac_bush.png",32,0,32,32);
  
setshape(1,32,32);
  
dontblock();
  
setTimer(random(30,40));
  
this.dead true;
  if (
this.temporarydestroy();
}

public function 
RespawnBush() {
  
this.dead false;
  
setimgpart("zodiac_bush.png",0,0,32,32);
  
blockagain();
}

//#CLIENTSIDE
function onPlayerEnters() {
  
setshape(1,32,32);
  
drawunderplayer();
  
layer 0;

Reply With Quote