fuppedbuck
Veteran X
In my quest to find a script that played a local taunt from the 5150 soundpack whenever a kill was made, the closest thing I found was a flag taunt script that does the same thing. What I want to do is just change this so that the event is linked to killing a player instead of capturing the flag. This is what the script looks like now:
I know basically nothing about scripting so I don't know if this would be difficult to do or not, but any help would be much appreciated. Thanks.
Code:
// Flag Taunt Script
//
// Pr0nigy Flag Taunting
// Because everyone is a little bit of an ass.
echo("Flag taunting by Pr0nigy.");
// 5150 Pack Support
$Taunt::5150pack = true;
// Bind to a key
$Taunt::Key = "L;
// Define Taunts
if ($Taunt::5150pack) {
//Number of defined taunts
$Taunt::Max = 21;
$Taunt::Taunt[0] = "takcovr";
$Taunt::Taunt[1] = "lard";
$Taunt::Taunt[2] = "oops1";
$Taunt::Taunt[3] = "cheer1";
$Taunt::Taunt[4] = "meep";
$Taunt::Taunt[5] = "taunt10";
$Taunt::Taunt[6] = "hbye";
$Taunt::Taunt[7] = "cheer2";
$Taunt::Taunt[8] = "ohbilly";
$Taunt::Taunt[9] = "cheer3";
$Taunt::Taunt[10] = "jerk2";
$Taunt::Taunt[11] = "fookyu2";
$Taunt::Taunt[12] = "boomstick";
$Taunt::Taunt[13] = "shebitch";
$Taunt::Taunt[14] = "cmon";
$Taunt::Taunt[15] = "care";
$Taunt::Taunt[16] = "damn";
$Taunt::Taunt[17] = "peek";
$Taunt::Taunt[18] = "easy";
$Taunt::Taunt[19] = "yoda";
$Taunt::Taunt[20] = "impress";
$Taunt::Taunt[21] = "good";
} else {
//Number of defined taunts
$Taunt::Max = 7;
$Taunt::Taunt[0] = "needdef";
$Taunt::Taunt[1] = "oops1";
$Taunt::Taunt[2] = "cheer1";
$Taunt::Taunt[3] = "taunt10";
$Taunt::Taunt[4] = "cheer2";
$Taunt::Taunt[5] = "cheer3";
$Taunt::Taunt[6] = "takcovr";
$Taunt::Taunt[7] = "oops2";
}
// Attach to message events
Event::Attach(eventClientMessage, FlagTaunt::Parse);
// Bind the key
bindcommand(keyboard0, make, $Taunt::Key, TO, "FlagTaunt::Toggle();");
// Toggle Taunting
function FlagTaunt::Toggle() {
if ($FlagTaunt::On) {
$FlagTaunt::On = false;
remotecp(2048, "<f1>FlagTaunt Status is: <f2>OFF", 1);
} else {
$FlagTaunt::On = true;
remotecp(2048, "<f1>FlagTaunt Status is: <f2>ON", 1);
}
}
// Taunt them bitches
function FlagTaunt::Parse(%cl, %msg)
{
if (!$FlagTaunt::On) return;
if(%cl != 0)
{
return;
}
if(String::FindSubStr(%msg, "You took the") != -1 )
{
%randTaunt = floor(getRandom() * ($Taunt::Max-1));
remoteEval(2048, lmsg, $Taunt::Taunt[%randTaunt]);
}
else if(String::FindSubStr(%msg, "You left the mission area while") != -1 )
{
Say::Animation(doh, 4);
}
}
I know basically nothing about scripting so I don't know if this would be difficult to do or not, but any help would be much appreciated. Thanks.