// NPC made by Arcainne if (playerenters) { } if (playertouchsme) { toweapons Plasma Rifle; } if (weaponfired) { if (playerdir==0) { this.prealx=playerx; this.prealy=playery; this.plasmax=playerx+1.5; this.plasmay=playery-2; this.plasmay2=playery-2; this.guny=playery-.8; showimg 0,bo-lotus.png,playerx+1.5,this.guny; showimg 1,bo-lotus.png,playerx+1.5,this.guny-1; changeimgpart 0,38,10,16,48; changeimgpart 1,6,65,16,18; changeimgvis 0,0; changeimgvis 1,2; playersprite = 19; freezeplayer 0.05; this.plasma=0; this.fire=0; play Laser-Public_D-33.wav; timeout = 0.05; } if (playerdir==1) { this.prealx=playerx; this.prealy=playery; this.plasmax=playerx-1.5; this.plasmax2=playerx-1.5; this.plasmay=playery+.5; this.gunx=playerx-.8; showimg 0,bo-lotus.png,this.gunx,playery+.5; showimg 1,bo-lotus.png,this.gunx-1,playery+.5; changeimgpart 0,36,54,60,30; changeimgpart 1,0,51,18,16; changeimgvis 0,0; changeimgvis 1,2; playersprite = 19; freezeplayer 0.05; this.plasma=0; this.fire=0; play Laser-Public_D-33.wav; timeout = 0.05; } if (playerdir==2) { this.prealx=playerx; this.prealy=playery; this.plasmax=playerx+.5; this.plasmay=playery+2.5; this.plasmay2=playery+2.5; this.guny=playery+.8; showimg 0,bo-lotus.png,playerx+.5,this.guny; showimg 1,bo-lotus.png,playerx+.5,this.guny+3; changeimgpart 0,12,0,16,50; changeimgpart 1,19,65,16,18; changeimgvis 0,2; changeimgvis 1,2; playersprite = 19; freezeplayer 0.05; this.plasma=0; this.fire=0; play Laser-Public_D-33.wav; timeout = 0.05; } if (playerdir==3) { this.prealx=playerx; this.prealy=playery; this.plasmax=playerx+4.5; this.plasmax2=playerx+4.5; this.plasmay=playery+.5; this.gunx=playerx; showimg 0,bo-lotus.png,this.gunx,playery+.5; showimg 1,bo-lotus.png,this.gunx+4,playery+.5; changeimgpart 0,51,12,66,32; changeimgpart 1,18,51,18,16; changeimgvis 0,0; changeimgvis 1,2; playersprite = 19; freezeplayer 0.05; this.plasma=0; this.fire=0; play Laser-Public_D-33.wav; timeout = 0.05; } } if (timeout) { if (playerdir==0) { showimg 0,bo-lotus.png,playerx+1.5,this.guny; showimg 1,bo-lotus.png,playerx+1.5,this.guny-1; showimg 2,crystalflash.mng,this.plasmax,this.plasmay; changeimgpart 0,38,10,16,48; changeimgpart 1,6,65,16,18; changeimgvis 0,0; changeimgvis 1,2; changeimgvis 2,0; playersprite=int(random(15,19)); this.plasmay-=2; freezeplayer .05; this.plasma+=.05; this.guny-=random(-.3,.3); if (this.guny<=playery-1.1) { this.guny+=.2; } if (this.guny>=playery-.7) { this.guny-=.3; } if (this.plasmay=playerx-.7) { this.gunx-=.3; } if (this.plasmax=playery+1.1) { this.guny-=.2; } if (this.guny<=playery+.7) { this.guny+=.3; } if (this.plasmay>playery+12.5) { this.fire=1; } if (this.plasmay>playery+20) { this.plasmay=playery+2.5; play Laser-Public_D-33.wav; } if (this.plasmay2>playery+20) { this.plasmay2=playery+2.5; play Laser-Public_D-33.wav; } if (this.fire==1) { showimg 3,crystalflash.mng,this.plasmax,this.plasmay2; changeimgvis 3,0; this.plasmay2+=2; } } if (playerdir==3) { showimg 0,bo-lotus.png,this.gunx,playery+.5; showimg 1,bo-lotus.png,this.gunx+4,playery+.5; showimg 2,crystalflash.mng,this.plasmax,this.plasmay; changeimgpart 0,51,12,66,32; changeimgpart 1,18,51,18,16; changeimgvis 0,0; changeimgvis 1,2; changeimgvis 2,0; playersprite=int(random(15,19)); this.plasmax+=2; freezeplayer .05; this.plasma+=.05; this.gunx+=random(-.3,.3); if (this.gunx>=playerx+.3) { this.gunx-=.2; } if (this.gunx<=playerx-.1) { this.gunx+=.3; } if (this.plasmax>playerx+11.5) { this.fire=1; } if (this.plasmax>playerx+20) { this.plasmax=playerx+4.5; play Laser-Public_D-33.wav; } if (this.plasmax2>playerx+20) { this.plasmax2=playerx+4.5; play Laser-Public_D-33.wav; } if (this.fire==1) { showimg 3,crystalflash.mng,this.plasmax2,this.plasmay; changeimgvis 3,0; this.plasmax2+=2; } } timeout = .05; } if (this.plasma>=2) { timeout = 0; hideimg 0; hideimg 1; hideimg 2; hideimg 3; freezeplayer 0; this.plasma=0; this.fire=0; playerx=this.prealx; playery=this.prealy; }