Thread: baddie
View Single Post
  #10  
Old 05-12-2009, 12:02 PM
greggiles greggiles is offline
Registered User
greggiles's Avatar
Join Date: Sep 2007
Posts: 149
greggiles has a spectacular aura about
still a bug :/

I have done a bunch a tweaks and stuff to get this baddie to do what i want it to do. but for some reason, when the baddie attacks me, i cant get the clientr.stats_HP to go down

PHP Code:
function damagePlayer()
{
  
temp.randomize = int( random( 0, 101 ) );
  
temp.plyr = findPlayer( this.plyr );
  if ( 
plyr.hearts > 0 )
  {
    if ( 
randomize in | 0, 92 | )
    {
      
setCharAni( "natrius_ironsword_swing2", NULL );
      
plyr.stats_HP -= int( random( 0.5, 1 ) );    // <------------
    
}
  }
  else if ( 
randomize in | 99, 101 | )
  {
    if ( 
this.health[ 0 ] < this.health[ 1 ] )
    {
      if ( ( 
this.health[ 0 ] + 5 ) < this.health[ 1 ] )
      {
        
healBaddy( int( random( 0, 6 ) ) );
      }
      else if ( ( 
this.health[ 0 ] + 5 ) >= this.health[ 1 ] )
      {
        
healBaddy( this.health[ 1 ] );
      }
    }
  } 

Last edited by Tigairius; 05-12-2009 at 07:39 PM.. Reason: Please wrap your code in code or php tags so it's easier to read.
Reply With Quote