All pastes #798790 Raw Edit

Unnamed

public text v1 · immutable
#798790 ·published 2007-11-27 00:53 UTC
rendered paste body
// NPC made by Downsider
if (created) {
}
if (playertouchsme) {
  toweapons Aura/Acid;
}
if (weaponfired) {
  if (this.on == 0) {
    this.on = 1;
    timeout = 0.05;
  } else {
    for (i=0;i<=250;i++) {
      hideimg i;
    }
    this.on = 0;
  }
}
if (this.on == 0) {
  this.numdots =250;
  setarray this.dots,this.numdots*5;
  for(i=0;i<this.numdots;i++;) {
    int();
  }
  timeout = 0.05;
  timereverywhere;
}
if(timeout) {
  if (this.on == 1) {
    timeout = 0.05;
    for(i=0;i<arraylen(this.dots)/5;i++;) {
      showimg i,sen_mini_light2.png,playerx+0.5+this.dots[i*5]+sin(3.14/24*this.dots[i*5+2] + (3.14/6))*(this.dots[i*5+3])/5,playery-2.5+cos(3.14/24*this.dots[i*5+2] + (3.14/6))*4;
      changeimgzoom i,0.3;

      // color
      changeimgmode i,2;
      changeimgcolors i,0.4,0.2,3.4,.6;
      changeimgvis i,2;
      this.dots[i*5+2] += this.dots[i*5+4];
      // height
      if(this.dots[i*5+2] >= 8) {
        int();
      }
    }
  }
}
function int() {
  //Length of lights
  this.dots[i*5] = random(-1.8,-0.2);
  this.dots[i*5+1] = 0;
  this.dots[i*5+2] = 0;
  this.dots[i*5+3] = (int(random(-.4,1.4)) == 0? -1 : 1);
  //Speed of lights
  this.dots[i*5+4] = random(.1,.5);
}