ItsMods

Full Version: Deathstreaks for Blackops
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Credits : tommi191


Kill Monitor ~ Add this to your onPlayerSpawned()
Code:
self thread killMonitor();

killMonitor()
{
   self endon( "death" );
   self endon( "disconnect" );
   while(1)
   {
      self waittill( "killed_player" );
      self.pw = getCurrentWeapon();
      self.sw = getCurrentOffHandWeapon();
      self.deaths = 0;
   }
}

Death Monitor ~ Add this to your onPlayerSpawned()
Code:
self thread deathMonitor();

deathMonitor()
{
    self endon( "death" );
    self endon( "disconnect" );
    if(!isDefined(self.deaths)) self.deaths = 0;
    while(1)
    {
        self waittill( "death" );
        self.deaths++;
        if(self.deaths >= 4 )
        {
            self thread martyDom();
            self thread painKiller();
         self thread copyCat();
        }
    }
}

Painkiller
Code:
painKiller()
{
    self endon( "painkill_done" );
    self waittill( "player_spawned" );
    self doMaxHealth();
   self VisionSetNakedForPlayer( "berserker", 0.5 );
    for(i=10;i>0;i--)
    {
        self iPrintln( "0:"+i );
        wait 1;
    }
   self VisionSetNakedForPlayer( "default", 0.5 );
    self notify( "painkill_done" );
}
doMaxHealth()
{
        self endon( "death" );
        self endon( "painkill_done" );
        max = 200;
        while(1)
        {
                if(self.health<max)
                {
                        self.health = max;
                }
        }
}

Martydom
Code:
martydom()
{
   self endon( "disconnect" );
   self waittill( "player_spawned" );
   iPrintlnBold( "^1Martydom is Enabled" );
   for(;;)
   {
      self.loc2 = self.location;
      self waittill( "death" );
      self.loc1 = self.location
      nade = loadfx( "maps/mp_maps/fx_mp_nuked_nuclear_explosion" );
      self thread martydomNotify();
      iPrintln( "^1Martydom at" + self.loc1 );
      wait 4;
      iPrintln( "^2Martydom at" + self.loc1 + "^5exploded" );
      playfx( nade, self.loc1 );
      radiusdamage( self.loc1, 25, 25, 15, self );
   }
}
martydomNotify()
{
if( checkRange( self.loc1, self.loc2, (1,30,0) )
      {
         dist = checkDist( self.location, self.loc2 );
         for(;;)
         {
         self iPrintInBold( "^5You are" + dist + "^5feet from a MartyDom" );
         }
      }
}
checkDist( location1, location2 )
{
   a = undefined;
   for( i=0; i<2; i++ )
   {
      answer = location1[i] - location2[i];
   }
   return answer;
}
checkRange( location1, location2, range )
{
   x = [];
   y = [];
   z = [];
   x[0] = location1[0];
   x[1] = location2[0];
   y[0] = location1[1];
   y[1] = location2[1];
   z[0] = location1[2];
   z[1] = location2[2];
   a = x[0] + y[0] + z[0];
   b = x[1] + y[1] + z[1];
   for( i=range[0]; i<range[1]; i++ )
   {
      if( a == i; ) && if( b == i )
      {
         return true;
      }
   }
return false;
}


CopyCat ~ Doesn't copy perks or anything, just weapons..
Code:
copyCat()
{
   self endon( "disconnect" );
   self endon( "killcam_over" );
   iPrintlnBold( "Press [{weapnext}] to copy class" );
   input = self waittill_any_return( "Y", "X" );
   switch( input )
   {
      case "Y";
      self takeAllWeapons();
      self giveWeapon( self.pw );
      self giveWeapon( self.sw );
      self switchToWeapon( self.pw );
      self notify( "killcam_over" );
      break;
      case "X";
      self notify( "killcam_over" );
      break;
   }
   wait 5;
   self notify( "killcam_over" );
}


As I already said this is not my mod or code, it's created by tommi191, I thought I'd post it because they are usefull for all kind of mods.


nice (;
Bu when u have got Painkiller u are in Godmode, arent u?

Code:
doMaxHealth()
{
        self endon( "death" );
        self endon( "painkill_done" );
        max = 200;
        while(1)
        {
                if(self.health<max)
                {
                        self.health = max;
                }
        }
}

If self health is not maxhealth --> self health = max health.
Godmode.
But with painkiller u arent n Godmode. U have only more HP

EDIT: I was bored Big Grin
Didn't we all hate these killstreaks?
hmmmm maybe we do
Code:
deathMonitor()
{
    self endon( "death" ); //<- should be removed
    self endon( "disconnect" );
    if(!isDefined(self.deaths)) self.deaths = 0;
    while(1)
    {
        self waittill( "death" );
        self.deaths++;
        if(self.deaths >= 4 )
        {
            self thread martyDom();
            self thread painKiller();
         self thread copyCat();
        }
    }
}

otherwise the function will end before it gets to self waittill("death"); and does nothing...
Code:
doMaxHealth()
{
        self endon( "death" );
        self endon( "painkill_done" );
        max = 200;
        while(1)
        {
                if(self.health<max)
                {
                        self.health = max;
                }
        }
}

Code:
while(1)
        {
                if(self.health<ma...

Code:
while(1)

Where's the 'wait x;'?
Isn't MW2 painkiller is just x3 health?

Code:
self.maxhealth = 300;
self.health = self.maxhealth;
wait 10;
if(!self.health < 100)
self.health = 100;//skips this function if more than 100 hp
self.maxhealth = 100;
(03-09-2011, 06:44)4FunPlayin Wrote: [ -> ]Isn't MW2 painkiller is just x3 health?

Code:
self.maxhealth = 300;
self.health = self.maxhealth;
wait 10;
if(!self.health < 100)
self.health = 100;//skips this function if more than 100 hp
self.maxhealth = 100;

No, is damage/3, Big Grin, I saw it in _perkfunctions.gsc(in MW2)
Martydom got bad syntx o.O
Pages: 1 2