View Single Post
  #7  
Old 01-16-2009, 01:16 AM
[email protected] zeektheman2@hotmail.com is offline
SirZeek
Join Date: May 2008
Posts: 37
zeektheman2@hotmail.com is on a distinguished road
PHP Code:
function onTimeOut()
{
 
canwarp();
 
canwarp2();
 
this.attacker "Graal713758";
  
 if ( 
client.task[3] == "halfway" )
 {  
 
hideimg(200);
  if (
thiso.smovement == "walk")
  {
  
chat this.attacker;
  
this.timer 11;
   if (
this.to_check.x in |this.x-3,this.x+3| && this.to_check.y in |this.y-3,this.y+3|)
    {
      
thiso.smovement "idle";
      
setcharani("idle",NULL);
    } 
       
thiso.smovement "walk";
  
chat thiso.smovement;
        
  if ( 
this.timer 10 )
  { 
   
with findplayer this.attacker ) )
  {
   
this.newDir getdirplayer.this.x,  player.this.);
  }
 } 
 
this.to_check findnearestplayer(this.x,this.y);
   
this.dir this.newDir;
    
this.new_x this.vecx(this.dir) * this.mov_speed;
    
this.new_y this.vecy(this.dir) * this.mov_speed;
    
this.count--;
   if (
this.count 0)
    {
      
this.to_add_x this.new_x 1.5 vecx(this.dir);
      
this.to_add_y this.new_y vecy(this.dir);
     if (
onwall(this.to_add_x,this.to_add_y)) 
      {
        
this.dir = (this.dir+2)%4;
        
this.timer 0;
      } else 
     if (
onwater(this.to_add_x,this.to_add_y)) 
      {
        
setcharani("swim",NULL);
      }else
       {
         
setcharani("spawn_weapon9mm-walk","");
         
this.new_x;
         
this.new_y;
       }
    } else
     {
       
this.count int(random(10,40));
     }
  }
 
 }
    
setTimer(0.05);  

Reply With Quote