Author Topic: show me what ya got...  (Read 16898 times)

smitty1258

  • NoBS|Administrator
  • General

  • Offline
  • *
  • "See, the problem is that God gives men a brain and a penis, and only enough blood to run one at a time."

  • 6071
  • Karma:
    +0/-0
  • Personal Text
    pwning sounds!
    • No Bullshit!
show me what ya got...
« on: July 12, 2008, 10:49:39 AM »
Code: [Select]
init ()
{
level.awe_announcerheadshot = awe\_util::cvardef ("awe_announcer_headshot", 0, 0, 3, "int");
level.awe_announcerheadbash = awe\_util::cvardef ("awe_announcer_headbash", 0, 0, 3, "int");
level.awe_announcerfirstblood = awe\_util::cvardef ("awe_announcer_firstblood", 0, 0, 3, "int");
level.awe_announcerendmatch = awe\_util::cvardef ("awe_announcer_endmatch", 0, 0, 1, "int");

level.awe_announcermultikill = awe\_util::cvardef ("awe_announcer_multikill", 0, 0, 3, "int");
if (level.awe_announcermultikill)
level.awe_announcermultikilltime = awe\_util::cvardef ("awe_announcer_multikill_time", 2, 1, 30, "int");

level.awe_announcerkillingspree = awe\_util::cvardef ("awe_announcer_killingspree", 0, 0, 3, "int");
if (level.awe_announcerkillingspree)
level.awe_announcerkillingspreekills = awe\_util::cvardef ("awe_announcer_killingspree_kills", 3, 1, 99, "int");

level.awe_announcercountdown = awe\_util::cvardef ("awe_announcer_countdown", 0, 0, 3, "int");
if (level.awe_announcercountdown)
thread checkCountdown ();

level.awe_announcercamper = awe\_util::cvardef ("awe_announcer_camper", 0, 0, 1, "int");
level.awe_announcerteamkill = awe\_util::cvardef ("awe_announcer_teamkill", 0, 0, 1, "int");
}

checkHeadKill (attacker, sHitLoc, sMeansOfDeath)
{
if (sHitLoc != "head")
return;

if (sMeansOfDeath == "MOD_MELEE")
{
if ((level.awe_announcerheadbash == 1) || (level.awe_announcerheadbash == 3))
{
self iprintlnbold (&"ANNOUNCER_TOOK_HEADBASH");
attacker iprintlnbold (&"ANNOUNCER_GAVE_HEADBASH");
}

if ((level.awe_announcerheadbash == 2) || (level.awe_announcerheadbash == 3))
{
self thread announceSound ("headhunter", 1.5);
attacker thread announceSound ("headhunter", 1.5);
}
}
else
{
if ((level.awe_announcerheadshot == 1) || (level.awe_announcerheadshot == 3))
{
self iprintlnbold (&"ANNOUNCER_TOOK_HEADSHOT");
attacker iprintlnbold (&"ANNOUNCER_GAVE_HEADSHOT");
}

if ((level.awe_announcerheadshot == 2) || (level.awe_announcerheadshot == 3))
{
self thread announceSound ("headshot", 1.5);
attacker thread announceSound ("headshot", 1.5);
}
}
}

checkFirstblood (attacker)
{
self endon ("awe_killthreads");
self endon ("disconnect");

if (! level.awe_announcerfirstblood)
return;

if (game["state"] != "playing")
return;

if ((level.awe_gametype == "esd" ) || (level.awe_gametype == "lib" ) || (level.awe_gametype == "lts" ) || (level.awe_gametype == "re" ) || (level.awe_gametype == "sd" ) && (! game["matchstarted"]))
return;

if (isdefined (game["firstblood"]))
return;

game["firstblood"] = true;

if ((level.awe_announcerfirstblood == 1) || (level.awe_announcerfirstblood == 3))
{
self iprintlnbold (&"ANNOUNCER_ARE_FIRSTBLOOD");
if (isPlayer (attacker) && (attacker != self))
attacker iprintlnbold (&"ANNOUNCER_GOT_FIRSTBLOOD");

awe\_util::iprintlnFIXED (&"ANNOUNCER_IS_FIRSTBLOOD", self);
}

if ((level.awe_announcerfirstblood == 2) || (level.awe_announcerfirstblood == 3))
{
self thread announceSound ("firstblood", 1);
if (isPlayer (attacker) && (attacker != self))
attacker thread announceSound ("firstblood", 1);
}
}

checkEndmatch ()
{
if (! level.awe_announcerendmatch)
return;

if (! level.awe_teamplay)
return;

losers = "";
winners = "";

if ((getTeamScore ("allies") == 0) && (getTeamScore ("axis") > 0))
{
losers = "allies";
winners = "axis";
}
else if ((getTeamScore ("axis") == 0) && (getTeamScore ("allies") > 0))
{
losers = "axis";
winners = "allies";
}

if (losers == "")
return;

wait 3;

players = getentarray ("player", "classname");
for (i = 0; i < players.size; i ++)
{
player = players[i];

if (! isPlayer (player))
continue;

if (! isdefined (player.pers["team"]))
continue;

if (player.pers["team"] == winners)
player thread announceSound ("flawless_victory", 0);
else if (player.pers["team"] == losers)
player thread announceSound ("humiliating_defeat", 0);
}
}

accountKill ()
{
self endon ("awe_killthreads");
self endon ("disconnect");

if (level.awe_announcermultikill)
{
if (! isdefined (self.multikill_times))
{
self.multikill_times = [];
self.multikill_next = 0;
}

self.multikill_times[self.multikill_next] = getTime ();

last0 = self.multikill_times[self.multikill_next];

index = self.multikill_next - 1;
if (index < 0)
index += 6;
last1 = self.multikill_times[index];

index --;
if (index < 0)
index += 6;
last2 = self.multikill_times[index];

index --;
if (index < 0)
index += 6;
last3 = self.multikill_times[index];

index --;
if (index < 0)
index += 6;
last4 = self.multikill_times[index];

index --;
if (index < 0)
index += 6;
last5 = self.multikill_times[index];

message = "";
sound = "";

if (isdefined (last5) && ((last0 - last5) <= 1000 * level.awe_announcermultikilltime))
{
message = &"ANNOUNCER_MONSTERKILL";
sound = "monsterkill";
}
else if (isdefined (last4) && ((last0 - last4) <= 1000 * level.awe_announcermultikilltime))
{
message = &"ANNOUNCER_ULTRAKILL";
sound = "ultrakill";
}
else if (isdefined (last3) && ((last0 - last3) <= 1000 * level.awe_announcermultikilltime))
{
message = &"ANNOUNCER_MEGAKILL";
sound = "megakill";
}
else if (isdefined (last2) && ((last0 - last2) <= 1000 * level.awe_announcermultikilltime))
{
message = &"ANNOUNCER_MULTIKILL";
sound = "multikill";
}
else if (isdefined (last1) && ((last0 - last1) <= 1000 * level.awe_announcermultikilltime))
{
message = &"ANNOUNCER_DOUBLEKILL";
sound = "doublekill";
}

if (sound != "")
{
if ((level.awe_announcermultikill == 1) || (level.awe_announcermultikill == 3))
self iprintlnbold (message);

if ((level.awe_announcermultikill == 2) || (level.awe_announcermultikill == 3))
self thread announceSound (sound, 1.5);
}

self.multikill_next ++;
if (self.multikill_next > 5)
self.multikill_next = 0;
}

if (level.awe_announcerkillingspree)
{
if (! isdefined (self.killingspree))
self.killingspree = 0;

self.killingspree ++;

ratio = self.killingspree / level.awe_announcerkillingspreekills;
if (ratio == int (ratio))
{
switch (int (ratio))
{
case 1 :
message_self = &"ANNOUNCER_KILLING_SPREE";
message_all = &"ANNOUNCER_IS_KILLING_SPREE";
sound = "killing_spree";
break;
case 2 :
message_self = &"ANNOUNCER_RAGE";
message_all = &"ANNOUNCER_IS_RAGE";
sound = "rage";
break;
case 3 :
message_self = &"ANNOUNCER_DOMINATING";
message_all = &"ANNOUNCER_IS_DOMINATING";
sound = "dominating";
break;
case 4 :
message_self = &"ANNOUNCER_RAMPAGE";
message_all = &"ANNOUNCER_IS_RAMPAGE";
sound = "rampage";
break;
case 5 :
message_self = &"ANNOUNCER_UNSTOPPABLE";
message_all = &"ANNOUNCER_IS_UNSTOPPABLE";
sound = "unstoppable";
break;
case 6 :
message_self = &"ANNOUNCER_OWNAGE";
message_all = &"ANNOUNCER_IS_OWNAGE";
sound = "ownage";
break;
case 7 :
message_self = &"ANNOUNCER_BERZERK";
message_all = &"ANNOUNCER_IS_BERZERK";
sound = "berzerk";
break;
case 8 :
message_self = &"ANNOUNCER_WHICKED_SICK";
message_all = &"ANNOUNCER_IS_WHICKED_SICK";
sound = "whicked_sick";
break;
case 9 :
message_self = &"ANNOUNCER_GODLIKE";
message_all = &"ANNOUNCER_IS_GODLIKE";
sound = "godlike";
break;
default :
message_self = &"ANNOUNCER_HOLY_SHIT";
message_all = &"ANNOUNCER_IS_HOLY_SHIT";
sound = "holy_shit";
break;
}

if ((level.awe_announcerkillingspree == 1) || (level.awe_announcerkillingspree == 3))
{
self iprintlnbold (message_self);
awe\_util::iprintlnFIXED (message_all, self);
}

if ((level.awe_announcerkillingspree == 2) || (level.awe_announcerkillingspree == 3))
self thread announceSound (sound, 1.5);
}
}
}

accountDeath ()
{
if (! level.awe_announcerkillingspree)
return;

if ((isdefined (self.killingspree)) && (self.killingspree >= level.awe_announcerkillingspreekills))
awe\_util::iprintlnFIXED (&"ANNOUNCER_END_SPREE", self);

self.killingspree = 0;
}

announceSound (sound, delay)
{
self endon ("awe_killthreads");
self endon ("disconnect");

while (isdefined (self.announceSound_running))
wait 0.1;

self.announceSound_running = true;

self playLocalSound (sound);
wait delay;

self.announceSound_running = undefined;
}

checkCountdown ()
{
if (level.awe_roundbased)
return;

while ((! isdefined (level.mapended)) || (! level.mapended))
{
wait 1;

if ((! isdefined (game["state"])) || (game["state"] != "playing"))
continue;

if ((! isdefined (level.timelimit)) || (level.timelimit <= 0))
continue;

seconds_left = int ((level.starttime + level.timelimit * 60 * 1000 - getTime () + 500) / 1000);

switch (seconds_left)
{
case 1 :
case 2 :
case 3 :
case 4 :
case 5 :
case 6 :
case 7 :
case 8 :
case 9 :
case 10 :
sound = seconds_left + "s";
message = &"ANNOUNCER_COUNTDOWN";
break;
case 30 :
case 60 :
sound = seconds_left + "s";
message = &"ANNOUNCER_COUNTDOWN_SEC";
break;
case 120 :
sound = seconds_left + "s";
message = &"ANNOUNCER_COUNTDOWN_120";
break;
case 300 :
sound = seconds_left + "s";
message = &"ANNOUNCER_COUNTDOWN_300";
break;
default :
sound = "";
message = "";
break;
}

if (sound != "")
{
if ((level.awe_announcercountdown == 1) || (level.awe_announcercountdown == 3))
{
if ((seconds_left == 120) || (seconds_left == 300))
iprintlnbold (message);
else
iprintlnbold (message, seconds_left);
}

if ((level.awe_announcercountdown == 2) || (level.awe_announcercountdown == 3))
{
players = getentarray ("player", "classname");
for (i = 0; i < players.size; i ++)
players[i] thread announceSound (sound, 0);
}
}
}
}

camper ()
{
if (! level.awe_announcercamper)
return;

self thread announceSound ("camper", 0.5);
}

teamkill (attacker)
{
if (! level.awe_announcerteamkill)
return;

self thread announceSound ("confusion", 1);
attacker thread announceSound ("confusion", 1);
}


Fix the headshot problem. Now when in the pubs if you shoot someone in the head, the announcer doesnt say headshot. My recommendation would be to copy and paste into notepad.
« Last Edit: July 14, 2008, 07:27:14 AM by smitty1258 »
A story. A man fires a rifle for many years. and he goes to war. And afterwards he comes home, and he sees that whatever else he may do with his life - build a house, love a woman, change his son's diaper - he will always remain a jarhead. And all the jarheads killing and dying, they will always be me. We are still in the desert.

Quote from: Baim
not even pentium 1 billion will improve YOUR skills :)
Quote from: Evilgenius
* Evilgenius pulls out his cock to compare

smitty1258

  • NoBS|Administrator
  • General

  • Offline
  • *
  • "See, the problem is that God gives men a brain and a penis, and only enough blood to run one at a time."

  • 6071
  • Karma:
    +0/-0
  • Personal Text
    pwning sounds!
    • No Bullshit!
Re: show me what ya got...
« Reply #1 on: July 14, 2008, 07:27:39 AM »
bump
A story. A man fires a rifle for many years. and he goes to war. And afterwards he comes home, and he sees that whatever else he may do with his life - build a house, love a woman, change his son's diaper - he will always remain a jarhead. And all the jarheads killing and dying, they will always be me. We are still in the desert.

Quote from: Baim
not even pentium 1 billion will improve YOUR skills :)
Quote from: Evilgenius
* Evilgenius pulls out his cock to compare

werth

  • NoBS|Member
  • General

  • Offline
  • *

  • 6172
  • Karma:
    +3/-5
  • Personal Text
    fuck WoW!
Re: show me what ya got...
« Reply #2 on: July 14, 2008, 03:32:23 PM »
looked throught it, i was the one that brought this up. really only the first section deals with the headshot. i dont see a problem, but then again i didnt check it thoroughly. I think it may be another file. remember one of the Headshot's was lower and one was upper case?



gohanix

  • Lieutenant

  • Offline
  • *

  • 210
  • Karma:
    +1/-0
Re: show me what ya got...
« Reply #3 on: August 06, 2008, 01:55:14 PM »
what language is that?
is tehre any tutorials for cod2 moding?

DirtOne

  • NoBS|Member
  • General

  • Offline
  • *
  • The Noob Admin

  • 4956
  • Karma:
    +5/-65535
  • Personal Text
    Death Cab For Dirty
Re: show me what ya got...
« Reply #4 on: August 06, 2008, 02:10:52 PM »
lol i got now idea what all of that means  :-[

...just a quick question..but ar eyou alt-tabbing and using same pc? if so.. please stop..

damnit dirt stop being a mexicant and start being a mexiCAN

carrot

  • Captain

  • Offline
  • *

  • 297
  • Karma:
    +0/-0
  • Personal Text
    LOL NOOB!
Re: show me what ya got...
« Reply #5 on: August 06, 2008, 05:08:15 PM »
Looks like c# to me.. but I'm an old man, poor vision, etc.
Book of Armaments, Chapter two verses 9 through 21.

.. and Saint Attila raise the hand grenade up on high saying,
"Lord bless this thy holy hand grenade, that with it thou may blow thine enemies to tiny bits... in thy mercy."
and the Lord did grin, and the people did feast upon the lambs and sloths and carps and anchovies and orangutangs and breakfast cereals and fruit bats ..
and the lord spake saying, "First shalt thou take out the holy pin. Then shalt thou count to three. No more, no less. Three shall be the number of the count, and the number thou shalt count shall be three. Four shalt thou not count, nor shalt thou count two, excepting that thou then proceed to three. Five is right out. Once the number three, being the third number reached, then lobbest thou thy hand grenade towards thy foe who, being naughty in my sight, shall snuff it."

Amen.

gohanix

  • Lieutenant

  • Offline
  • *

  • 210
  • Karma:
    +1/-0
Re: show me what ya got...
« Reply #6 on: August 07, 2008, 03:05:41 PM »
i'd be interested in working on stuff like that..

is the sound file still there?

DirtOne

  • NoBS|Member
  • General

  • Offline
  • *
  • The Noob Admin

  • 4956
  • Karma:
    +5/-65535
  • Personal Text
    Death Cab For Dirty
Re: show me what ya got...
« Reply #7 on: August 07, 2008, 04:13:00 PM »
I would too if i could understand any programming  :-[

...just a quick question..but ar eyou alt-tabbing and using same pc? if so.. please stop..

damnit dirt stop being a mexicant and start being a mexiCAN

gohanix

  • Lieutenant

  • Offline
  • *

  • 210
  • Karma:
    +1/-0
Re: show me what ya got...
« Reply #8 on: August 11, 2008, 07:57:39 AM »
its quite simple once you know the syntax..

smitty.. is there no switch/case statment? would be easier than using IF/else

vonDuTch

  • NoBS|Administrator
  • General

  • Offline
  • *

  • 6431
  • Karma:
    +0/-0
  • Personal Text
    No Bullshit Clan
Re: show me what ya got...
« Reply #9 on: August 11, 2008, 08:24:02 AM »
for me this looks like "ABRAKADABRA" like 1111000110010010001011000110101001000111!!!!!!

gohanix

  • Lieutenant

  • Offline
  • *

  • 210
  • Karma:
    +1/-0
Re: show me what ya got...
« Reply #10 on: August 11, 2008, 08:42:24 AM »
1111000110010010001011000110101001000111+1 = 1111000110010010001011000110101001001000

DirtOne

  • NoBS|Member
  • General

  • Offline
  • *
  • The Noob Admin

  • 4956
  • Karma:
    +5/-65535
  • Personal Text
    Death Cab For Dirty
Re: show me what ya got...
« Reply #11 on: August 11, 2008, 01:00:12 PM »
for me this looks like "ABRAKADABRA" like 1111000110010010001011000110101001000111!!!!!!

lol same here

...just a quick question..but ar eyou alt-tabbing and using same pc? if so.. please stop..

damnit dirt stop being a mexicant and start being a mexiCAN

Knott

  • Major

  • Offline
  • *

  • 890
  • Karma:
    +0/-0
  • Personal Text
    It's my party hat, I like to party!
Re: show me what ya got...
« Reply #12 on: August 11, 2008, 08:06:54 PM »
what language is that?
is tehre any tutorials for cod2 moding?

looks like C+ , not easy!


Evilgenius

  • Guest
Re: show me what ya got...
« Reply #13 on: August 11, 2008, 10:48:30 PM »
probably has to do with tanks as in they are connected :P


« Last Edit: August 11, 2008, 11:06:47 PM by Evilgenius »

Sounds

  • NoBS|Administrator
  • General

  • Offline
  • *

  • 1793
  • Karma:
    +0/-0
Re: show me what ya got...
« Reply #14 on: August 12, 2008, 02:25:45 AM »
what language is that?
is tehre any tutorials for cod2 moding?

looks like C+ , not easy!



yes technically it's QuakeC. and it's easy.

Quote from: smitty1258
i was expecting more white sauce i guess