Page 1 of 2
Tribes Quake Announcer
Posted: Sun Dec 14, 2014 11:19 pm
by S_hift
Trying to make a quake announcer. I'm trying to keep it simple so I can copy the block multiple times for different substrings. Right now I just want to get it working for kill sprees. By the way I'd like this to work in a way that if anyone gets a killingspree then I will hear it too. Thats why I want it to be simple.
Simpler means working for both 1.1 and 1.4 clients.
Code: Select all
function onClientMessage(%client, %msg)
{
if(%msg == "is on a KILLING SPREE he has 8 kill's in a row!")
{
say::public(killingspree);//this is the custom wav i'm trying to play
}
}
btw crow, "kill's" shouldn't be possessive they should be plural. Just noticed that typo.
Re: Tribes Quake Announcer
Posted: Mon Dec 15, 2014 1:37 am
by DaJ4ck3L
it would look something more like this.
Code: Select all
function onClientMessage(%client, %msg)
{
%me = Client::getName(getManagerId());
if(String::findSubStr(%msg, %me) != "-1")
{
if(String::findSubStr(%msg, "is on a KILLING SPREE") != "-1")
{
say(0, "msg goes here ~wsound");
}
if(String::findSubStr(%msg, "is on an EXTREME KILLING SPREE") != "-1")
{
say(0, "msg goes here ~wsound");
}
}
}
Re: Tribes Quake Announcer
Posted: Mon Dec 15, 2014 8:39 am
by S_hift
nice...
Killing Spree: You kill 5 enemies without yourself getting killed
Rampage: You kill 10 enemies
Dominating: You kill 15 enemies
Unstoppable: You kill 20 enemies
Godlike: You kill 25 enemies
I was thinking something more along the lines of
10
20
30
40
50
Re: Tribes Quake Announcer
Posted: Mon Dec 15, 2014 10:57 am
by S_hift
UPDATE
So I just copied an extra block for the Unstoppable KS
Code: Select all
function onClientMessage(%client, %msg)
{
%me = Client::getName(getManagerId());
if(String::findSubStr(%msg, %me) != "-1")
{
if(String::findSubStr(%msg, "is on a KILLING SPREE") != "-1")
{
say(0, "Announcer: KILLING SPREE!!! ~wkillingspree");
}
if(String::findSubStr(%msg, "is on an EXTREME KILLING SPREE") != "-1")
{
say(0, "Announcer: DOMINATING!!! ~wdominating");
}
if(String::findSubStr(%msg, "CAN NO ONE STOP") != "-1")
{
say(0, "Announcer: UNSTOPPABLE!!! ~wunstoppable");
}
}
}
then I'm gonna add headshot sounds to the assassination and fells a shot between the eyes messages. I haven't tested this out, but could I make it bottom print the message instead of publicly say it? like this? would this work, without the typos obv.
if(string::findsubstr(%msg, "can no one stop")!= "-1")
{
printBP(0, "<color red>unstoppable!<colorredend> ~wunstoppable");
or BottomPrint(0, "<color red>unstoppable!<colorredend> ~wunstoppable");
Re: Tribes Quake Announcer
Posted: Mon Dec 15, 2014 11:20 am
by DaJ4ck3L
it already spams every kill past unstoppable lol. that going to be spam fest.
Re: Tribes Quake Announcer
Posted: Mon Dec 15, 2014 11:42 am
by S_hift
damn i never though about. i could make it do it after every ten kills then up to 100. how many kills does it take to start unstoppable? and then I'll make it recognize it at every ten kill
Re: Tribes Quake Announcer
Posted: Mon Dec 15, 2014 11:43 am
by D4M45T3R
quake sounds? r u fuken 4real
Re: Tribes Quake Announcer
Posted: Mon Dec 15, 2014 11:45 am
by S_hift
Code: Select all
function onClientMessage(%client, %msg)
{
%me = Client::getName(getManagerId());
if(String::findSubStr(%msg, %me) != "-1")
{
if(String::findSubStr(%msg, "is on a KILLING SPREE") != "-1")
{
say(0, "Announcer: KILLING SPREE!!! ~wkillingspree");
}
if(String::findSubStr(%msg, "is on an EXTREME KILLING SPREE") != "-1")
{
say(0, "Announcer: DOMINATING!!! ~wdominating");
}
if(String::findSubStr(%msg, "35 KILLS IN A ROW") != "-1")
{
say(0, "Announcer: UNSTOPPABLE!!! ~wunstoppable");
}
}
}
in br annihilation we believe in rewarding the players, not punishing them for running an outdated client.
Edit: I will post the sound files after this is complete and working. I want to add something for headshots and mid air rockets. I know the mod supports headshot damage.
maybe something like this findSubStr %dmg "headshot" I couldnt find anythin my my annihilation mod about headshot damage, but then again its Emeralds version of anni.
Re: Tribes Quake Announcer
Posted: Mon Dec 15, 2014 1:10 pm
by D4M45T3R
i hope u realize those aren't quake sounds.
Re: Tribes Quake Announcer
Posted: Mon Dec 15, 2014 1:35 pm
by DaJ4ck3L
35
and quake pro in for the save!