Kill Aura for zombies

Xeirh

Veteran
Messages
16
Reaction score
2
Points
793
go minecraft some zombies with your client

works pretty simple, kill_aura is the toggle for on and off and the thread for adjustability.

example:
add_option( "Kill Aura", ::kill_aura );
add_option( "Range Reset", ::kill_aura_thread, 100 );
add_option( "Set Range 1000", ::kill_aura_thread, 1000 );
Code:
kill_aura() {
    self.kill_aura = !isdefined( self.kill_aura ) ? true : undefined;
    if( isdefined( self.kill_aura ) )
        self thread kill_aura_thread();
    else
        self notify( "kill_aura" );
}
kill_aura_thread( value ) {
    if( !isdefined( self.kill_aura ) )
        self iprintln( "not on" );
    else {
        if( !isdefined( self.aura_range ) )
            self.aura_range = 100;
        else
            self.aura_range = int( value );
        self notify( "kill_aura" );
        self endon( "kill_aura" );
        while( isdefined( self.kill_aura ) && isalive( self ) ) {
            foreach( zombie in getaiarray( level.zombie_team ) ) {
                if( isalive( zombie ) && distance( self.origin, zombie.origin ) <= self.aura_range )
                     zombie dodamage( zombie.health + 1, self.origin );
            }
            // self iprintln( self.aura_range ); <- debug
            wait .05;
        }
    }
}
 
Last edited:
Top