The Exiled
http://theexiled.pwnageservers.com/forum/

Kpack modifications
http://theexiled.pwnageservers.com/forum/viewtopic.php?f=3&t=943
Page 1 of 1

Author:  TE-B.D [ Tue Jan 03, 2006 1:55 pm ]
Post subject:  Kpack modifications

Is there a way to modify the kpack so that its up to date with the anihilation kill counts??

Example:
Kpack Now
*** stayed in ??? crosshair for too long
???: Sniper Victim #455

Annihilation Example
*** was assasinated by ??? <--------- In the regular kpack this wouldnt have happened
???: Sniper Victim #456


In other words, how do you add content to the kpack without screwing it up??

Author:  TE-Noxwizard [ Tue Jan 03, 2006 2:19 pm ]
Post subject: 

I wrote one for Annihilation, but somewhere I broke it.

Kpack should be picking it up for sniper kills, if it isn't, add this in the sniper section:
Code:
   if (String::findSubStr(%msg, "was assassinated by " @ $PCFG::Name @ ".") != -1)
          {
           $Kills::Sniper[$KpackCount::ClientNum]++; 
         if ($SniperTrack == 1 || $SniperTrack == "")
         {
         say(0, "(Sniper Victim #" @ $Kills::Sniper[$KpackCount::ClientNum] @ ")");
         TopPrint(2048, "(Sniper Victim #" @ $Kills::Sniper[$KpackCount::ClientNum] @ ")");
         }
           KpackCount::Update();
          }


If you're talking about assassination kills, you'll have to add a whole new tronics. Here's the Assassin Tronics I wrote for Kpack.

Code:
///*******************************************************************************

////////   ASSASSIN TRONICS   /////////////////////////////

function AssassinTronics(%client, %msg)
   {
   if ($PCFG::Gender == "FEMALE")
      {
      $TEMP::Gender = "her";
      }
      else    
      {
      $TEMP::Gender = "his";
      }


   if (String::findSubStr(%msg, " is assassinated by " @ $PCFG::Name) != -1 && String::findSubStr(%msg, ".") != -1)
      {
      $Kills::Assassin[$KpackCount::ClientNum]++;
      if ($AssassinTrack == 1 || $AssassinTrack == "")
         {
          say(0, "(Assassination #" @ $Kills::Assassin[$KpackCount::ClientNum] @ ")");
         TopPrint(2048, "(Assassination #" @ $Kills::Assassin[$KpackCount::ClientNum] @ ")");
          }
           KpackCount::Update();
        }

   if (String::findSubStr(%msg, " gets " @ $TEMP::Gender @ " throat cut by " @ $PCFG::Name) != -1 && String::findSubStr(%msg, ".") != -1)
      {
      $Kills::Assassin[$KpackCount::ClientNum]++;
      if ($AssassinTrack == 1 || $AssassinTrack == "")
         {
          say(0, "(Assassination #" @ $Kills::Assassin[$KpackCount::ClientNum] @ ")");
         TopPrint(2048, "(Assassination #" @ $Kills::Assassin[$KpackCount::ClientNum] @ ")");
          }
           KpackCount::Update();
        }

   if (String::findSubStr(%msg, " gets stabbed in the back by " @ $PCFG::Name) != -1 && String::findSubStr(%msg, ".") != -1)
      {
      $Kills::Assassin[$KpackCount::ClientNum]++;
      if ($AssassinTrack == 1 || $AssassinTrack == "")
         {
          say(0, "(Assassination #" @ $Kills::Assassin[$KpackCount::ClientNum] @ ")");
         TopPrint(2048, "(Assassination #" @ $Kills::Assassin[$KpackCount::ClientNum] @ ")");
          }
           KpackCount::Update();
        }
   
   if (String::findSubStr(%msg, " didn't see it coming from " @ $PCFG::Name) != -1 && String::findSubStr(%msg, ".") != -1)
      {
      $Kills::Assassin[$KpackCount::ClientNum]++;
      if ($AssassinTrack == 1 || $AssassinTrack == "")
         {
          say(0, "(Assassination #" @ $Kills::Assassin[$KpackCount::ClientNum] @ ")");
         TopPrint(2048, "(Assassination #" @ $Kills::Assassin[$KpackCount::ClientNum] @ ")");
          }
           KpackCount::Update();
        }

    if (String::findSubStr(%msg, $PCFG::Name @ " slices ") != -1 && String::findSubStr(%msg, "'s throat.") != -1)
       {
      $Kills::Assassin[$KpackCount::ClientNum]++;
      if ($AssassinTrack == 1 || $AssassinTrack == "")
         {
          say(0, "(Assassination #" @ $Kills::Assassin[$KpackCount::ClientNum] @ ")");
         TopPrint(2048, "(Assassination #" @ $Kills::Assassin[$KpackCount::ClientNum] @ ")");
          }
           KpackCount::Update();
        }
   }


For that to work, you'll also need to add this to the KpackCount::Update() function:
Code:
    export("$Kills::Assassin*", "config\\KpackCount.cs", True);      // -Noxwizard


You'll also need to add this under the ReadFile part, after the other sets:
Code:
/////************************************************************************************************

         if(isFile("config\\assassinkills.cs"))
            {
              exec("assassinkills.cs");
            export("$Assassin::Kills", "config\\assassinkills.cs", True);
            $Kills::Assassin[$KpackCount::ClientNum] = ($Assassin::Kills);
              File::delete("config\\assassinkills.cs");
            File::delete("config\\kpack\\assassinct.cs");
            }
           else
            {
            $Kills::Assassin[$KpackCount::ClientNum] = 0;
              }


Then you need to add this a bit farther down with the other ones:
Code:
             $Kills::Assassin[$KpackCount::ClientNum] = 0;      // -Noxwizard


Then you need to add this at the bottom in KpackTrack:
Code:
   $AssassinTrack = 1;      // -Noxwizard


Then this after the "else" line:
Code:
   $AssassinTrack = 0;      // -Noxwizard


And finally this at the very bottom with the other ones:
Code:
Event::Attach(eventClientMessage, AssassinTronics);           // -Noxwizard
Code:

Author:  )>B<( IronX [ Tue Jan 03, 2006 4:39 pm ]
Post subject: 

.................yes <3 nox

Author:  TE-Hammy [ Tue Jan 03, 2006 6:26 pm ]
Post subject: 

<3 teh nox lots :)

Author:  )>B<( IronX [ Tue Jan 03, 2006 6:50 pm ]
Post subject: 

W()()T REPREZENT

Author:  TE-Hammy [ Tue Jan 03, 2006 9:37 pm ]
Post subject: 

reprezent wat? :|

Author:  )>B<( IronX [ Wed Jan 04, 2006 2:13 am ]
Post subject: 

Idno your uglyness

Author:  ShadowCrow [ Wed Jan 04, 2006 3:49 pm ]
Post subject: 

ohhh....burn

Author:  TE-B.D [ Fri Jan 06, 2006 6:19 pm ]
Post subject: 

thanks nox

Author:  TE-Hammy [ Fri Jan 06, 2006 8:50 pm ]
Post subject: 

i need some ice :|

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/