Advertisement
Guest User

For Redink

a guest
Jul 17th, 2011
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 3.12 KB | None | 0 0
  1. //Killsounds V0.5
  2. //By 3lionz
  3. //
  4. //Special thanks to:
  5. //Nighthawk043
  6. //RockeyRex
  7.  
  8.  
  9.  
  10.  
  11. //Functions to call when:
  12. addMessageCallback("MsgJoinWelcome", KillSounds_reset);
  13. addMessageCallback("MsgPracticeEnd", KillSounds_reset);
  14. addMessageCallback("MsgPlayerKill", KillSounds_addkd);
  15.  
  16. //Set values
  17. if(!isObject(KillSounds))
  18. {
  19.     new ScriptObject(KillSounds)
  20.     {
  21.         PlayerName = "null";
  22.         Gkills = 0;
  23.         Skills = 0;
  24.     };
  25. }
  26.  
  27. //Reset values
  28. function KillSounds_reset(%a, %b, %c, %d)
  29. {
  30. if(%c !$= "")
  31.     {
  32.         KillSounds.Skills = 0;
  33.         //KillSounds.Gkills = 0;
  34.         KillSounds.PlayerName = KillSounds_strip(%c);
  35.     }
  36. }
  37.  
  38. //Debug
  39. function KillSounds_strip(%name)
  40. {
  41.     echo("KSDebug: ",stripColorCodes(replaceTeamStrings(detag(%name))));
  42.     return stripColorCodes(replaceTeamStrings(detag(%name)));
  43. }
  44.  
  45.  
  46. function KillSounds_addkd(%msgType, %msgString, %c, %d)
  47. {      
  48.     //If you die, reset kill streak
  49.     if(KillSounds_strip(%c) $= KillSounds.PlayerName)
  50.     {
  51.         //For Redink.
  52.         sfxPlayOnce(Humiliation);
  53.         KillSounds.Skills = 0;
  54.         KillSounds.Skills--;
  55.     }
  56.    
  57.     if(KillSounds_strip(%d) $= KillSounds.PlayerName)
  58.     {  
  59.         //If you kill someone, add to killstreak
  60.         KillSounds.Skills++;
  61.        
  62.         //Groupkills is glitchy, come back later.
  63.         //KillSounds.Gkills++;
  64.         //If there is one kill, play "FirstBlood"
  65.         /* if(KillSounds.Gkills $= 1)
  66.         {
  67.             sfxPlayOnce(FirstBlood);
  68.         } */
  69.         if(KillSounds.Skills $= 3)
  70.         {
  71.             sfxPlayOnce(KillingSpree);
  72.         }
  73.         if(KillSounds.Skills $= 4)
  74.         {
  75.             sfxPlayOnce(Rampage);
  76.         }
  77.         if(KillSounds.Skills $= 5)
  78.         {
  79.             sfxPlayOnce(Dominating);
  80.         }
  81.         if(KillSounds.Skills $= 6)
  82.         {
  83.             sfxPlayOnce(Unstoppable);
  84.         }
  85.         if(KillSounds.Skills $= 7)
  86.         {
  87.             sfxPlayOnce(Godlike);
  88.         }
  89.         if(KillSounds.Skills >= 8)
  90.         {
  91.             sfxPlayOnce(Ownage);
  92.         }
  93.         echo("KS: Solo Kills: ", KillSounds.Skills);
  94.         //echo(KillSounds.Gkills);
  95.     }
  96. }
  97.  
  98. //Add the sounds :)
  99. package KillSounds
  100. {
  101.     function Audio::initialize( )
  102.     {
  103.         parent::initialize( );
  104.         new SFXProfile(FirstBlood)
  105.         {
  106.             filename = "mods/autoexec/KillSounds/firstblood.wav";
  107.             description = AudioGui;
  108.             preload = true;
  109.         };
  110.         new SFXProfile(KillingSpree)
  111.         {
  112.             filename = "mods/autoexec/KillSounds/Killing_Spree.wav";
  113.             description = AudioGui;
  114.             preload = true;
  115.         };
  116.         new SFXProfile(Rampage)
  117.         {
  118.             filename = "mods/autoexec/KillSounds/Rampage.wav";
  119.             description = AudioGui;
  120.             preload = true;
  121.         };
  122.         new SFXProfile(Dominating)
  123.         {
  124.             filename = "mods/autoexec/KillSounds/Dominating.wav";
  125.             description = AudioGui;
  126.             preload = true;
  127.         };
  128.         new SFXProfile(Unstoppable)
  129.         {
  130.             filename = "mods/autoexec/KillSounds/Unstoppable.wav";
  131.             description = AudioGui;
  132.             preload = true;
  133.         };
  134.         new SFXProfile(GodLike)
  135.         {
  136.             filename = "mods/autoexec/KillSounds/GodLike.wav";
  137.             description = AudioGui;
  138.             preload = true;
  139.         };
  140.         new SFXProfile(Ownage)
  141.         {
  142.             filename = "mods/autoexec/KillSounds/Ownage.wav";
  143.             description = AudioGui;
  144.             preload = true;
  145.         };
  146.         new SFXProfile(Humiliation)
  147.         {
  148.             filename = "mods/autoexec/KillSounds/Humiliation.wav";
  149.             description = AudioGui;
  150.             preload = true;
  151.         };
  152.     }
  153. };
  154. activatepackage(KillSounds);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement