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

Kpack help
http://theexiled.pwnageservers.com/forum/viewtopic.php?f=4&t=1029
Page 1 of 1

Author:  ShadowCrow [ Tue Jan 24, 2006 9:41 am ]
Post subject:  Kpack help

I was hoping somone could script rocket and phase into kpack.... :)

Author:  TE-Noxwizard [ Tue Jan 24, 2006 10:24 am ]
Post subject: 

You'll need to put everything in it's correct place.

In: function KpackCount::Update()
Add:
Code:
     export("$Kills::Rocket*", "config\\KpackCount.cs", True);        // -Noxwizard


In: function KpackCount::ReadFile()
Add somewhere after: //Start stat tracking files
Code:
/////************************************************************************************************

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


Near the end of the same function add:
Code:
                   $Kills::Rocket[$KpackCount::ClientNum] = 0;          // -Noxwizard


Code:
////////   ROCKET TRONICS   /////////////////////////////

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


     if (String::findSubStr(%msg, " gets a hot rocket injection from " @ $PCFG::Name) != -1 && String::findSubStr(%msg, ".") != -1)
           {
           $Kills::Rocket[$KpackCount::ClientNum]++;
          if ($RocketTrack == 1 || $RocketTrack == "")
         {
         say(0, "(Rocket Victim #" @ $Kills::Rocket[$KpackCount::ClientNum] @ ")");
         TopPrint(2048, "(Rocket Victim #" @ $Kills::Rocket[$KpackCount::ClientNum] @ ")");
          }
           KpackCount::Update();
          }

     if (String::findSubStr(%msg, $PCFG::Name @ " gives ") != -1 && String::findSubStr(%msg, " a lesson in rocketry.") != -1)
           {
           $Kills::Rocket[$KpackCount::ClientNum]++;
          if ($RocketTrack == 1 || $RocketTrack == "")
         {
         say(0, "(Rocket Victim #" @ $Kills::Rocket[$KpackCount::ClientNum] @ ")");
         TopPrint(2048, "(Rocket Victim #" @ $Kills::Rocket[$KpackCount::ClientNum] @ ")");
          }
           KpackCount::Update();
          }

     if (String::findSubStr(%msg, " polishes " @ $PCFG::Name) != -1 && String::findSubStr(%msg, "'s rocket.") != -1)
           {
           $Kills::Rocket[$KpackCount::ClientNum]++;
          if ($RocketTrack == 1 || $RocketTrack == "")
         {
         say(0, "(Rocket Victim #" @ $Kills::Rocket[$KpackCount::ClientNum] @ ")");
         TopPrint(2048, "(Rocket Victim #" @ $Kills::Rocket[$KpackCount::ClientNum] @ ")");
          }
           KpackCount::Update();
          }

     if (String::findSubStr(%msg, " rides " @ $PCFG::Name) != -1 && String::findSubStr(%msg, "'s big one.") != -1)
           {
           $Kills::Rocket[$KpackCount::ClientNum]++;
          if ($RocketTrack == 1 || $RocketTrack == "")
         {
         say(0, "(Rocket Victim #" @ $Kills::Rocket[$KpackCount::ClientNum] @ ")");
         TopPrint(2048, "(Rocket Victim #" @ $Kills::Rocket[$KpackCount::ClientNum] @ ")");
          }
           KpackCount::Update();
          }

     if (String::findSubStr(%msg, " failed to outrun " @ $PCFG::Name) != -1 && String::findSubStr(%msg, "'s rocket.") != -1)
           {
           $Kills::Rocket[$KpackCount::ClientNum]++;
          if ($RocketTrack == 1 || $RocketTrack == "")
         {
         say(0, "(Rocket Victim #" @ $Kills::Rocket[$KpackCount::ClientNum] @ ")");
         TopPrint(2048, "(Rocket Victim #" @ $Kills::Rocket[$KpackCount::ClientNum] @ ")");
          }
           KpackCount::Update();
          }
      }

///**********************************************************************************


In function KpackTrack(%command, %label)
Add:
Code:
   $RocketTrack = 1;      // -Noxwizard


In the same function, just a bit farther down
Add:
Code:
   $RocketTrack = 0;      // -Noxwizard


And, near the very bottom of the file add:
Code:
Event::Attach(eventClientMessage, RocketTronics);         // -Noxwizard


Phase and rockets use the same messages. This should work, but considering the fact that my kpack doesn't work at all, don't be suprised if it doesn't work.

Author:  TE-4ev3r [ Tue Jan 24, 2006 4:49 pm ]
Post subject: 

Is this the same one that I gave you shadow? (probly is)

It has the rocket announcers, it just doesn't count them all the time. And phase disruptor kills don't use client names like the Rocket launcher, so it won't work. Otherwise every time someone got a kill with a phase/rocket, your Kpack would count it, even though you didn't make the kill!

Author:  TE-Noxwizard [ Tue Jan 24, 2006 5:33 pm ]
Post subject: 

A normal kpack doesn't count several of the annihilation rocket weapons. I wrote that myself, so I know they weren't in it.

Author:  TE-Hammy [ Tue Jan 24, 2006 8:57 pm ]
Post subject: 

u wrote the normal kpack x_x

Author:  TE-Noxwizard [ Tue Jan 24, 2006 9:52 pm ]
Post subject: 

...no

Author:  TE-4ev3r [ Thu Jan 26, 2006 6:43 pm ]
Post subject: 

I can send you my Kpack Shadow. It has rocket kills.

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