Áƒ*žE@YG:Eú†I!ĄśŇEąkédëĹR!YNoneSendTextMessageSendVoiceMessageFindPlayerIndexGetSuicideReason GetSpreeTextGetMultiKillTextTOSTAnnouncerGetSpreeText2 SetSettingsSendAnswerMessageGetMultiKillVoiceSendClientMessage GetValue SetValue GetSettings PlayerPawnGetSpreeVoice MessageColor PlayerStructSystemCore BaseMessageEngine PieceOrder PieceVersion PieceNameEventAnswerMessageEventCheckClearanceEventPreventDeathClientMessageReceiveLocalizedMessageEventPlayerDisconnect EventInitEventTeamChangeEventGamePeriodChangedEventPlayerConnect EventMessageTOST41 s_NPCHostageDrownedEnabledHitFell ExplosionColorSetProgressTimeSetProgressColorSetProgressMessageClearProgressMessagesAnnouncerPackagePIndex HitLocation PlayerNameGame nextPawn TimeSeconds PawnList KillerNameVictim instigatedBySenderMsgType Function LocationTeamObject DamageTypeBotpackDecapitationMessage bFirstBlood RoundNumbers_SWATTO_GameBasicsF s_SWATGameZVectorji ScriptTextSB ReturnValue LevelInfoPlayerReplicationInfoStructLevel MsgParamsTOSTActorPawn TextBufferTOSTServerMutator TOSTPiecePlayerParam1Param2Param3Param4Param5Params MsgIndexGP SettingsParam6AllowedMessage StrPropertyCWModeStructPropertyClass Lastfrag RecentFrags AliveFrags PlayerInfoPackage SoundSlotOther OtherName NamePropertyObjectPropertyFloatProperty BoolProperty IntProperty FragCount BytePropertySpawned% &€… …#€ƒ€……@(@€@@€€'D€ž €…€…4€Š €@ €…1€ƒ €$€+€ƒ€@€>€ľ)@&@@S€ €ŠP€Y€€ƒ€M€€9€J€€ƒV€87ű­$2 ,Č--/ ˙˙b 2€Š< čRu6•ˆ6™ˆ A,Č-6›ˆ-D ˙˙sš,Čfw* ,ds 4,x :€;€/€@şAÚł21 -, 6– ˆ0 ˙˙ 6.."6–ˆSA- ., €=@ š{"-K"b "€ƒŁC!ĎÇN1‚š ,xš6•! ˆ,Č$&'Ł!+ $ ?Sr*ŤQw*  ka/! ëz€&#.Š1.Š .€@.Š /'%.Š0ę“}&%˙  ¨F%ş4 # *,u-%-6› ˆú c,x 6™ ˆ6• ˆú ä,y6™ ˆ6• ˆ6­ ˆ6Ž ˆ6– ˆ-6› ˆú ÷,ú ˙˙¨# €B*ţ ÂSr * ŤQw *     k a/! 6•ˆ(6­ˆ%6™ˆ.Š 6–ˆpp). ,y šGg> 7G„„a/!' --%šow*˜˘—w*˜˘”.Š ”.Šb›˙˙˙˙°?’6,—6%6D—Ľ6Ľ6ě› ˙˙˙˙Č‚™6 , w*¨p's killing spree was ended by6 %6 %5„r r*2{¨žš:˜Ÿ:˜Ÿ¨¨teamkilled#Teamkill!kill_teamkill*-¨draws first blood!#FirstBlood!kill_firstblood-'˝‚› ˙˙˙˙)ąŽ?6 đ@—¨¨spawnkilled#SpawnKill!kill_spawnkill)‚›˙˙˙˙—6&6 6Ĺ‚›˙˙˙˙{6¨¨is666ąŻ6Ą6Ą ´?,  ąkill_headshotš ĽI"ZÝ[”.ŠN›˙˙˙˙6D—Ľ E3=.#{3 -!,blew himself up with a nade E!+fell to death W!(drowned s!*got hit by a nade ˙˙ ŹL L{“ ”.Š†› ˙˙˙˙6 ˙˙˙˙6 ˙˙˙˙6 ˙˙˙˙6 ˙˙˙˙Ź €@H0GS$™0 ,#Double Kill! 0,#Multi Kill! E,#ULTRA KILL!! h,#M O N S T E R K I L L !!! ˙˙#> > > L U D I C R O U S K I L L < < < ŠO$>/ƒ ”.Šv› ˙˙˙˙6 %6 %6 %6 %Š €@K, Q%|, ,kill_doublekill 4,kill_multikill J,kill_ultrakill b,kill_monsterkill ˙˙kill_ludicrouskill ŞR#-ž˘•‚š%!š:.¤łŻ& %•– , 6 %6 %6 %6 %Ľ 7Ş €@N*[Š&†* ,#Killing Spree -,#Rampage @, #Dominating U, #Unstoppable! g,#Godlike!! ~,#WICKED SICK!!! ˙˙ Ś!$!-(Ś €@Q5gí'†5 ,on Killing Spree 1,on Rampage C, Dominating W, Unstoppable! h,Godlike!! ~,WICKED SICK!!! ˙˙ SŹ//---------------------------------------------------------------------------- // Project : TOST Announcer // File : TOSTAnnouncer.uc // Version : 0.1 (08/05/2003) // Author : DiLDoG //---------------------------------------------------------------------------- // Version Changes // 0.1 + Ported from AOTAnnouncer_102 // 0.2 + "Killing spree ended by..." added // + Fixed #WICKEDSICK!!! //---------------------------------------------------------------------------- class TOSTAnnouncer extends TOSTPiece; struct PlayerStruct { var int Spawned; var int Lastfrag; var int RecentFrags; var int AliveFrags; }; var PlayerStruct PlayerInfo[32]; var bool CWMode; var bool bFirstblood; var color MessageColor; var config bool Enabled; var config int SoundSlot; var config string AnnouncerPackage; //---------------------------------------------------------------------------- // Event Handling //---------------------------------------------------------------------------- function EventInit() { bFirstblood = false; super.EventInit(); } function EventGamePeriodChanged(int GP) { local int i; // check for AdminReset -> reset player data if (GP==0 && s_SWATGame(Level.Game).RoundNumber==1) { for (i=0; i<32; i++) { PlayerInfo[i].Spawned = 0; PlayerInfo[i].Lastfrag = 0; PlayerInfo[i].RecentFrags = 0; PlayerInfo[i].AliveFrags = 0; } } super.EventGamePeriodChanged(GP); } function EventPlayerConnect(Pawn Player) { local int i; // Initialize the new player's info i = TOST.FindPlayerIndex(PlayerPawn(Player)); if (i != -1) { PlayerInfo[i].Spawned = 0; PlayerInfo[i].Lastfrag = 0; PlayerInfo[i].RecentFrags = 0; PlayerInfo[i].AliveFrags = 0; } super.EventPlayerConnect(Player); } function EventPlayerDisconnect(Pawn Player) { local int i; // Reset the player's info i = TOST.FindPlayerIndex(PlayerPawn(Player)); if (i != -1) { PlayerInfo[i].Spawned = -1; PlayerInfo[i].Lastfrag = -1; PlayerInfo[i].RecentFrags = -1; PlayerInfo[i].AliveFrags = -1; } super.EventPlayerDisconnect(Player); } function EventTeamChange(Pawn Other) { local int i; // Set the players spawned value to current time i = TOST.FindPlayerIndex(PlayerPawn(Other)); if (i != -1) { PlayerInfo[i].Spawned = Level.TimeSeconds; } super.EventTeamChange(Other); } function bool EventPreventDeath (Pawn Victim, Pawn instigatedBy, name DamageType, Vector HitLocation) { local string KillerName; local string OtherName; local int i, j; // skip hossie kills if (Victim.IsA('s_NPCHostage') || !Enabled || CWMode) return super.EventPreventDeath(Victim, instigatedBy, DamageType, HitLocation); // Load player info if (instigatedBy != none) KillerName = instigatedBy.PlayerReplicationInfo.PlayerName; if (Victim != none) OtherName = Victim.PlayerReplicationInfo.PlayerName; // Get the player's tost index i = TOST.FindPlayerIndex(PlayerPawn(instigatedBy)); j = TOST.FindPlayerIndex(PlayerPawn(Victim)); // Update Player stats if(i != -1) { if(PlayerInfo[i].Lastfrag + 5 < Level.TimeSeconds) PlayerInfo[i].RecentFrags = 0; PlayerInfo[i].Lastfrag = Level.TimeSeconds; PlayerInfo[i].RecentFrags++; PlayerInfo[i].AliveFrags++; } if(j != -1) { if(PlayerInfo[j].AliveFrags >= 3 && instigatedBy != none) { SendTextMessage(OtherName$"'s killing spree was ended by"@KillerName); } PlayerInfo[j].RecentFrags = 0; PlayerInfo[j].AliveFrags = 0; } // Check for suicide if(instigatedBy==Victim || instigatedBy==none) { if(GetSuicideReason(DamageType) != "") SendTextMessage(OtherName@GetSuicideReason(DamageType)); } // Check for Teamkill else if(instigatedBy.PlayerReplicationInfo.Team == Victim.PlayerReplicationInfo.Team) { SendTextMessage(KillerName@"teamkilled"@OtherName); SendTextMessage("#Teamkill!",instigatedBy); SendVoiceMessage("kill_teamkill",instigatedBy); } // Check for First blood else if(!bFirstblood) { SendTextMessage(KillerName@"draws first blood!"); SendTextMessage("#FirstBlood!", instigatedBy); SendVoiceMessage("kill_firstblood", instigatedBy); bFirstblood = true; } // Check for spawnkill else if(j != -1 && (PlayerInfo[j].Spawned + 7.5) > Level.TimeSeconds) { SendTextMessage(KillerName@"spawnkilled"@OtherName); SendTextMessage("#SpawnKill!", instigatedBy); SendVoiceMessage("kill_spawnkill", instigatedBy); } // Check for doublekill else if(i != -1 && PlayerInfo[i].RecentFrags > 1) { SendTextMessage(GetMultiKillText(PlayerInfo[i].RecentFrags), instigatedBy); SendVoiceMessage(GetMultiKillVoice(PlayerInfo[i].RecentFrags), instigatedBy); } // Check for killing spree else if(i != -1 && GetSpreeText(PlayerInfo[i].AliveFrags) != "") { SendTextMessage(KillerName@"is"@GetSpreeText2(PlayerInfo[i].AliveFrags)); SendTextMessage(GetSpreeText(PlayerInfo[i].AliveFrags), instigatedBy); SendVoiceMessage(GetSpreeVoice(PlayerInfo[i].AliveFrags), instigatedBy); } // Check for Headshot else if ((HitLocation.Z - Victim.Location.Z) > 28) { InstigatedBy.ReceiveLocalizedMessage( class'DecapitationMessage' ); //SendTextMessage("#Headshot", InstigatedBy); SendVoiceMessage("kill_headshot", InstigatedBy); } return super.EventPreventDeath(Victim, instigatedBy, DamageType, HitLocation); } //---------------------------------------------------------------------------- // TOST Message Handling //---------------------------------------------------------------------------- function EventMessage(TOSTPiece Sender, int MsgIndex) { switch (MsgIndex) { // CWModeChanges case 117 : CWMode = Sender.Params.Param5; break; // GetValue case 120 : GetValue(Sender.Params.Param6, Sender, Sender.Params.Param1); break; // SetValue case 121 : SetValue(Sender.Params.Param6, Sender.Params.Param1, Sender.Params.Param2, Sender.Params.Param3, Sender.Params.Param4, Sender.Params.Param5); break; // GetSettings case 143 : GetSettings(Sender); break; } super.EventMessage(Sender, MsgIndex); } function bool EventCheckClearance(TOSTPiece Sender, PlayerPawn Player, int MsgType, out int Allowed) { // allow reading values if (MsgType == 120 && (Sender.Params.Param1 == 200)) { Allowed = 1; return true; } return super.EventCheckClearance(Sender, Player, MsgType, Allowed); } function EventAnswerMessage(TOSTPiece Sender, int MsgIndex) { switch (MsgIndex) { // SetSettings - report back error messages case 144 : SetSettings(Sender, Sender.Params.Param4); break; } } //---------------------------------------------------------------------------- // TOST Settings Handling //---------------------------------------------------------------------------- function GetValue(PlayerPawn Player, TOSTPiece Sender, int Index) { Params.Param1 = Index; Params.Param6 = Player; switch (Index) { case 200 : Params.Param5 = Enabled; break; } if (Index == 200) { if (Player != None) SendClientMessage(100); else SendAnswerMessage(Sender, 120); } } function SetValue(PlayerPawn Player, int Index, int i, float f, string s, bool b) { switch (Index) { case 200 : Enabled = b; break; } SaveConfig(); } function GetSettings(TOSTPiece Sender) { Params.Param4 = string(int(Enabled)); SendAnswerMessage(Sender, 143); } function SetSettings(TOSTPiece Sender, string Settings) { if (Settings != "") { Enabled = bool(Settings); SaveConfig(); } } //---------------------------------------------------------------------------- // Player message functions //---------------------------------------------------------------------------- function SendTextMessage(string Message, optional Pawn P) { if (P == none) { for (P=Level.PawnList; P!=None; P=P.nextPawn) { SendTextMessage(Message, P); } return; } if (!P.IsA('PlayerPawn')) return; if (left(Message,1) == "#") { PlayerPawn(P).ClearProgressMessages(); PlayerPawn(P).SetProgressTime(4); PlayerPawn(P).SetProgressColor(MessageColor,0); PlayerPawn(P).SetProgressMessage(right(Message,len(Message)-1),0); } else { P.ClientMessage(Message); } } function SendVoiceMessage(string Message, optional Pawn P) { if (P == none) { for (P=Level.PawnList; P!=None; P=P.nextPawn) { SendVoiceMessage(Message, P); } return; } if (!P.IsA('PlayerPawn')) return; Params.Param1 = SoundSlot; Params.Param2 = 0; Params.Param6 = PlayerPawn(P); Params.Param4 = AnnouncerPackage$"."$Message; SendClientMessage(121); } //---------------------------------------------------------------------------- // Message functionsm //---------------------------------------------------------------------------- function string GetSuicideReason(name DamageType) { switch DamageType { case 'Explosion': return "blew himself up with a nade"; case 'Fell': return "fell to death"; case 'Drowned': return "drowned"; case 'Hit': return "got hit by a nade"; default: return ""; } } function string GetMultiKillText(int RecentFrags) { switch RecentFrags { case 2: return "#Double Kill!"; case 3: return "#Multi Kill!"; case 4: return "#ULTRA KILL!!"; case 5: return "#M O N S T E R K I L L !!!"; default: return "#> > > L U D I C R O U S K I L L < < <"; } } function string GetMultiKillVoice(int RecentFrags) { switch RecentFrags { case 2: return "kill_doublekill"; case 3: return "kill_multikill"; case 4: return "kill_ultrakill"; case 5: return "kill_monsterkill"; default: return "kill_ludicrouskill"; } } function string GetSpreeText(int FragCount) { switch FragCount { case 4: return "#Killing Spree"; case 7: return "#Rampage"; case 10: return "#Dominating"; case 13: return "#Unstoppable!"; case 16: return "#Godlike!!"; case 20: return "#WICKED SICK!!!"; default: return ""; } } function string GetSpreeText2(int FragCount) { switch FragCount { case 4: return "on Killing Spree"; case 7: return "on Rampage"; case 10: return "Dominating"; case 13: return "Unstoppable!"; case 16: return "Godlike!!"; case 20: return "WICKED SICK!!!"; default: return ""; } } function string GetSpreeVoice(int FragCount) { switch FragCount { case 4: return "state_killingspree"; case 7: return "state_rampage"; case 10: return "state_dominating"; case 13: return "state_unstoppable"; case 16: return "state_godlike"; case 20: return "state_whickedsick"; default: return ""; } } //---------------------------------------------------------------------------- // defaultproperties //---------------------------------------------------------------------------- €@T-s1)- !,state_killingspree 6,state_rampage N, state_dominating g, state_unstoppable |,state_godlike •,state_whickedsick ˙˙ ƒUW˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙0XyĂ/5ƒ]ŞybŒŽ”…žtČ…žtČ…žtČŒŽ”…žtČ…žtČ…žtČŠ> ŁYŠ> ŁYŠ> ŁYŠ> ŁY…žtČƒ]Şybƒ]Şybƒ]Şybƒ]Şybƒ]Şybƒ]Şybƒ]Şybƒ]Şybƒ]Şybƒ]Şybƒ]Şyb…žtČ…žtȏ{#Uż…žtȏ{#Uż’–c’–cŒŽ”ŒŽ”…žtȏ{#Uż…žtȏ{#UżŒŽ”…žtČ…žtČ’–cŒŽ”’–c’–cŒŽ”¤ř¸đ§&“*-˙)Ó2] Announcer2k3MTOST Announcer] 0.4.7.0",",€@uu&pţ˙˙˙_upü˙˙˙\p˙˙˙˙}p˙˙˙˙@oý˙˙˙fWý˙˙˙Ypü˙˙˙p˙˙˙˙zpü˙˙˙Up˙˙˙˙mpü˙˙˙[pü˙˙˙Vzň˙˙˙Xp˙˙˙˙|pţ˙˙˙^p˙˙˙˙Czý˙˙˙Z}÷˙˙˙am÷˙˙˙d{ô˙˙˙9zű˙˙˙Vz÷˙˙˙j@ý˙˙˙|÷˙˙˙euIp˙˙˙˙oWí˙˙˙Nń˙˙˙Bzű˙˙˙8{â˙˙˙Mmń˙˙˙6@ý˙˙˙pä˙˙˙L@ý˙˙˙"@ý˙˙˙!p˙˙˙˙y@ý˙˙˙%@ý˙˙˙$@ý˙˙˙#zô˙˙˙:@ý˙˙˙ }÷˙˙˙b{÷˙˙˙cĐ˙˙˙Hpä˙˙˙JpÎ˙˙˙FuEzô˙˙˙7oň˙˙˙AWí˙˙˙-p˙˙˙˙pp˙˙˙˙Wp˙˙˙˙]p˙˙˙˙{@ý˙˙˙Xt q ‹F= ~ †FP K!‹B3 W!‹C> d!†&s q!†&r }!‹F< I"‹E3 V"†OP c"†FO o"†LP {"†IP G#F; S#‘X) _#Bl k#†&q w#†&@ C$Fx O$§FD [$†84 g$‘XG s$†GP $F5K%‹I` Y%‹Gw f%‹8` s%El @&‹L` L&‹<> Y&†Oh f&†A? r&‹A> ~&?i K'†Cg W'†Ak c'‘Xn o'ˇX{'X M(†Xv Z(X2 f(†Q~ r(‹A` (†Nr L)†W~ Y)‹=> f)‘6S s)†Kr )†<g L*†64 X*§HD d*‹8> q*†T~ ~*‡X4K+‹6` +‡X aL,†6P m-š6K y-6R E.‡şX:Q.‡X,K/‘AT w/‡X /C0‹?> r0‡ŁXJ0‡XzI2‡¨X%wC5‘FT z7‡XKF8‡šXq Q:‡ĽX"NBH‡XFPI‡ŹX qVKHT GM‡XpSM‡ŠX$aCPKT dQ‡X SpQ‡ŞX#zCTNT }U‡X]IV‡ŚX!#fXQT IY‡X]UY¸XQ4_Źr[TT Qˆ‡Xt]ˆƒ|Q‹WT M”