Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-20-2001, 07:45 AM
Termina_GP7 Termina_GP7 is offline
Registered User
Join Date: May 2001
Posts: 155
Termina_GP7 is on a distinguished road
Cool Mace (Some one ask for this and here it is )

I did not make this ncp stefan did or some one on his staff so here it is

Ncp made by Some one on stefans staff or it was by stefan i dont know =)
PHP Code:
if (playertouchsme) {
  
set gotmace;
  
toweapons Mace;
  
destroy;
}
if (
playerenters) {
  for (
i=1i<=4i++) hideimg i;
  
this.step 0;
  
timeout 0;
  
show;
}
if (
weaponfired && this.step<=0) {
  
this.steps 20;
  
this.anglestep 3.14/this.steps;
  
this.flylen 10;

  for (
i=1i<=4i++) hideimg i;
  
timeout 0.05;
  
this.step 0;
  
this.angle = -3.14/4;
  
this.oldx playerx;
  
this.oldy playery;
}
if (
timeout) {
  
timeout 0.05;
  
this.step++;
  if (
this.step<4) {
  } else if (
this.step==4) {
    
freezeplayer this.steps*0.05;
    
hidesword this.steps*0.05;
    
playersprite 0;
    
this.mx 0;
    
this.my 0;
    if (
playerx>this.oldxthis.mx++;
    if (
playerx<this.oldxthis.mx--;
    if (
playery>this.oldythis.my++;
    if (
playery<this.oldythis.my--;
    if (
this.mx!=&& this.my!=0) {
      
this.mx*=0.714;
      
this.my*=0.714;
    }
    if (
this.mx==&& this.my==0) {
      if (
playerdir==0this.my--;
      if (
playerdir==1this.mx--;
      if (
playerdir==2this.my++;
      if (
playerdir==3this.mx++;
    }
  } else {
    
this.angle += this.anglestep;
    if (
this.angle>3.14/&& this.angle<3.14 )
      
this.angle+=3.14;
    if (
this.angle<3.14/4) {
      
playersprite 6;
    }  else 
playersprite 11;

    if (
this.angle>=3.14*7/4) {
      for (
i=1i<=4i++) hideimg i;
      
timeout 0;
      
this.step 0;
    } else {
      
dist cos(3.14/4) - cos(this.angle);
      for (
i=1i<=4i++) {
        
this.flyx playerx+0.5+this.flylen*this.mx*dist*i/4;
        
this.flyy playery+1+this.flylen*this.my*dist*i/4;
        if (
playerdir==0this.flyx-=0.5;
        if (
playerdir==1this.flyx+=0.5;
        if (
playerdir==2this.flyx++;
        if (
i==4showimg i,wmace.gif,this.flyx,this.flyy;
        else 
showimg i,wmace0.gif,this.flyx+0.5,
          
this.flyy+0.5;
      }
      if (
this.angle>3.14/&& this.angle<3.14 &&
          
onwall(this.flyx+0.5,this.flyy+0.5)) {
        
putleaps 4,this.flyx,this.flyy;
        
this.angle 3.14-this.angle;
      }
    }
    
this.testhurt 1;
  }
}
if (
this.testhurt == 1) {
  for (
i=0i<compuscounti++) {
    if (
abs(this.flyx-compus[i].x)<=&&
        
abs(this.flyy-(compus[i].y-0.5))<=1.5 &&
        
compus[i].mode!=&& 
compus[i].mode!=5)
      
hitcompu i,1,this.flyx+0.5,this.flyy+0.5;
  }
  for (
i=1i<playerscounti++) {
    if (
abs((this.flyx+0.7)-(players[i].x+1.5))<=&&
        
abs((this.flyy+0.5)-(players[i].y+1.5))<=1.5)
      
hitplayer i,1,this.flyx+0.5,this.flyy+0.5;
  }
  
this.testhurt 0;

__________________

-= Rice Was Here -=

Last edited by Admins; 10-22-2013 at 01:14 AM..
Reply With Quote
 


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 04:11 AM.


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