From 827d09e7a9cfdc8bc20c78c7bcc8a35a96cca9b5 Mon Sep 17 00:00:00 2001 From: ChocoTaco1 Date: Sat, 1 Aug 2020 17:32:08 -0400 Subject: [PATCH 1/9] More time checks --- Classic/scripts/autoexec/VoteMenu.cs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Classic/scripts/autoexec/VoteMenu.cs b/Classic/scripts/autoexec/VoteMenu.cs index e7d3d3c..bd56b60 100644 --- a/Classic/scripts/autoexec/VoteMenu.cs +++ b/Classic/scripts/autoexec/VoteMenu.cs @@ -325,9 +325,20 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, % return; } - if(%arg1 < $Host::TimeLimit) + //If proposed time is lower than server set or higher than unlimited + if(%arg1 < $Host::TimeLimit || %arg1 > 999) + { + messageClient(%client, "", "\c2Invalid time selection."); return; - + } + + //If proposed time is something other than what is selectable + if(%arg1 !$= "90" && %arg1 !$= "120" && %arg1 !$= "150" && %arg1 !$= "180" && %arg1 !$= "240" && %arg1 !$= "360" && %arg1 !$= "480" && %arg1 !$= "999") + { + messageClient(%client, "", "\c2Only selectable times allowed."); + return; + } + if((!%isAdmin && $Host::AllowPlayerVoteTimeLimit) || (%isAdmin && %client.ForceVote)) { if(%arg1 $= "999") %time = "unlimited"; else %time = %arg1; From f212b1c0e177e2db4002796993affcad16da3243 Mon Sep 17 00:00:00 2001 From: ChocoTaco1 Date: Sat, 1 Aug 2020 17:33:28 -0400 Subject: [PATCH 2/9] Update TKwarn.cs Exception for Mac_FlagArena Better kick function Changed warning to a more traditional "Classic" warning --- Classic/scripts/autoexec/TKwarn.cs | 80 ++++++++++++++++++++++++++++-- 1 file changed, 75 insertions(+), 5 deletions(-) diff --git a/Classic/scripts/autoexec/TKwarn.cs b/Classic/scripts/autoexec/TKwarn.cs index 17257ec..7cd4d6b 100644 --- a/Classic/scripts/autoexec/TKwarn.cs +++ b/Classic/scripts/autoexec/TKwarn.cs @@ -1,3 +1,5 @@ +//exec("scripts/autoexec/TKwarn.cs"); + package TKwarn { @@ -12,18 +14,22 @@ function DefaultGame::testTeamKill(%game, %victimID, %killerID) if($Host::TournamentMode || %killerID.isAdmin || %killerID.isAIcontrolled() || %victimID.isAIcontrolled()) return true; + // Ignore this map + if($CurrentMission $= "Mac_FlagArena") + return true; + // warn the player if((%killerID.teamkills == $Host::TKWarn1 - 1) && $Host::TKWarn1 != 0) - centerprint(%killerID, "You have teamkilled " @ %killerID.teamkills + 1 @ " players.\nCut it out!", 5, 3); + centerprint(%killerID, "You are recieving this warning for inappropriate teamkilling.\nBehave or you will be kicked.", 10, 2); // warn the player of his imminent kick else if((%killerID.teamkills == $Host::TKWarn2 - 1) && $Host::TKWarn2 != 0) - centerprint(%killerID, "You have teamkilled " @ %killerID.teamkills + 1 @ " players.\nWith " @ $Host::TKMax @ " teamkills, you will be kicked.", 5, 3); + centerprint(%killerID, "You are recieving this second warning for inappropriate teamkilling.\nBehave or you will be kicked.", 10, 2); // kick the player else if((%killerID.teamkills >= $Host::TKMax - 1) && $Host::TKMax != 0) { Game.kickClientName = %killerID.name; - kick(%killerID, false, %killerID.guid); - adminLog( %killerID, " was autokicked for too many teamkills." ); + TKkick(%killerID, true, %killerID.guid); + adminLog( %killerID, " was autokicked for teamkilling." ); } return true; } @@ -32,4 +38,68 @@ function DefaultGame::testTeamKill(%game, %victimID, %killerID) // Prevent package from being activated if it is already if (!isActivePackage(TKwarn)) - activatePackage(TKwarn); \ No newline at end of file + activatePackage(TKwarn); + +// we pass the guid as well, in case this guy leaves the server. +function TKkick( %client, %admin, %guid ) +{ + messageAll( 'MsgAdminForce', '\c2%1 has been autokicked for teamkilling.', %client.name ); // z0dd - ZOD, 7/13/03. Tell who kicked + + messageClient(%client, 'onClientKicked', ""); + messageAllExcept( %client, -1, 'MsgClientDrop', "", Game.kickClientName, %client ); + + if( %client.isAIControlled() ) + { + if($Host::ClassicCanKickBots || %admin.isAdmin) + { + if(!$Host::ClassicBalancedBots) + { + $HostGameBotCount--; + %client.drop(); + } + } + } + else + { + if( $playingOnline ) // won games + { + %count = ClientGroup.getCount(); + %found = false; + for( %i = 0; %i < %count; %i++ ) // see if this guy is still here... + { + %cl = ClientGroup.getObject( %i ); + if( %cl.guid == %guid ) + { + %found = true; + + // kill and delete this client, their done in this server. + if( isObject( %cl.player ) ) + %cl.player.scriptKill(0); + + if ( isObject( %cl ) ) + { + %client.setDisconnectReason( "You have been kicked out of the game." ); // z0dd - ZOD, 7/13/03. Tell who kicked + %cl.schedule(700, "delete"); + } + // ban by IP as well + BanList::add( %guid, %client.getAddress(), $Host::KickBanTime ); + } + } + if( !%found ) + BanList::add( %guid, "0", $Host::KickBanTime ); // keep this guy out for a while since he left. + } + else // lan games + { + // kill and delete this client + if( isObject( %client.player ) ) + %client.player.scriptKill(0); + + if ( isObject( %client ) ) + { + %client.setDisconnectReason( "You have been kicked out of the game." ); + %client.schedule(700, "delete"); + } + BanList::add( 0, %client.getAddress(), $Host::KickBanTime ); + } + } +} \ No newline at end of file From 20d3fcac30009a2918520a725f39378bf40c2c1d Mon Sep 17 00:00:00 2001 From: ChocoTaco1 Date: Sat, 1 Aug 2020 17:37:06 -0400 Subject: [PATCH 3/9] Took out May be some issues. Not sure. --- Classic/scripts/autoexec/TacoOverrides.cs | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/Classic/scripts/autoexec/TacoOverrides.cs b/Classic/scripts/autoexec/TacoOverrides.cs index 2cf905c..e1ede45 100644 --- a/Classic/scripts/autoexec/TacoOverrides.cs +++ b/Classic/scripts/autoexec/TacoOverrides.cs @@ -161,20 +161,6 @@ function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %am Parent::damageObject(%data, %targetObject, %sourceObject, %position, %amount, %damageType, %momVec, %mineSC); } -//Item 'Use' Console spam fix -function serverCmdUse(%client,%data) -{ - // Item names from the client must converted - // into DataBlocks - // %data = ItemDataBlock[%item]; - //if(isObject(%client.player)) // z0dd - ZOD, 5/18/03. Console spam fix - //%client.player.use(%data); - - //Spam Fix 7/2020 - if(isObject(%client.player) && isObject(%client.getControlObject())) - %client.getControlObject().use(%data); -} - // Global water viscosity function DefaultGame::missionLoadDone(%game) { From 25bbb020513ff2336a9d38ffd4cdc8e387ca583d Mon Sep 17 00:00:00 2001 From: ChocoTaco1 Date: Sat, 1 Aug 2020 20:51:59 -0400 Subject: [PATCH 4/9] Kick reason --- Classic/scripts/autoexec/TKwarn.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Classic/scripts/autoexec/TKwarn.cs b/Classic/scripts/autoexec/TKwarn.cs index 7cd4d6b..a5f745c 100644 --- a/Classic/scripts/autoexec/TKwarn.cs +++ b/Classic/scripts/autoexec/TKwarn.cs @@ -78,7 +78,7 @@ function TKkick( %client, %admin, %guid ) if ( isObject( %cl ) ) { - %client.setDisconnectReason( "You have been kicked out of the game." ); // z0dd - ZOD, 7/13/03. Tell who kicked + %client.setDisconnectReason( "You have been kicked out of the game for teamkilling." ); // z0dd - ZOD, 7/13/03. Tell who kicked %cl.schedule(700, "delete"); } // ban by IP as well @@ -96,7 +96,7 @@ function TKkick( %client, %admin, %guid ) if ( isObject( %client ) ) { - %client.setDisconnectReason( "You have been kicked out of the game." ); + %client.setDisconnectReason( "You have been kicked out of the game for teamkilling." ); %client.schedule(700, "delete"); } BanList::add( 0, %client.getAddress(), $Host::KickBanTime ); From 8c528d9564a565cf667d16cfd8fd37dc317925f7 Mon Sep 17 00:00:00 2001 From: ChocoTaco1 Date: Sun, 2 Aug 2020 21:04:38 -0400 Subject: [PATCH 5/9] Took out ClassicTKLimit We have our own tk system --- Classic/prefs/serverPrefs.cs | 1 - Classic/scripts/defaultGame.cs | 28 ---------------------------- Classic/scripts/serverDefaults.cs | 1 - 3 files changed, 30 deletions(-) diff --git a/Classic/prefs/serverPrefs.cs b/Classic/prefs/serverPrefs.cs index 7451852..5edcd4f 100644 --- a/Classic/prefs/serverPrefs.cs +++ b/Classic/prefs/serverPrefs.cs @@ -71,7 +71,6 @@ $Host::ClassicTelnet = 1; $Host::ClassicTelnetListenPass = "changeme"; $Host::ClassicTelnetPassword = "changeme"; $Host::ClassicTelnetPort = 666; -$Host::ClassicTkLimit = 0; $Host::ClassicUseHighPerformanceCounter = 0; $Host::ClassicViralBanning = 1; $Host::ClassicVoteLog = 1; diff --git a/Classic/scripts/defaultGame.cs b/Classic/scripts/defaultGame.cs index bde18fd..b5486d6 100644 --- a/Classic/scripts/defaultGame.cs +++ b/Classic/scripts/defaultGame.cs @@ -2497,20 +2497,6 @@ function DefaultGame::awardScoreTeamkill(%game, %victimID, %killerID) messageClient(%killerID, 'MsgScoreTeamkill', '\c0You have been penalized for killing teammate %1.', %victimID.name); %game.recalcScore(%killerID); - // z0dd - ZOD, 8/9/03. Auto vote TKers - if(!$Host::TournamentMode) - { - if(($Host::ClassicTkLimit > 4 && %killerID.teamKills >= $Host::ClassicTkLimit) && (getAdmin() == 0)) - { - serverCmdStartNewVote(%victimID, "VoteKickPlayer", %killerID, 0, 0, 0, true); - bottomPrintAll("" @ %killerID.nameBase @ " Has " @ %killerID.teamKills @ " team kills. Recommend voting yes.", 4, 2); - logEcho(%killerID.nameBase @ " GUID: " @ %killerID.guid @ " TKS: " @ %killerID.teamKills, 1); - } - //else - //{ - // BottomPrint(%killerID, "You have " @ %killerID.teamKills @ ", you better cut it out!", 2, 1 ); - //} - } } function DefaultGame::awardScoreTurretTeamKill(%game, %victimID, %killerID) @@ -2520,20 +2506,6 @@ function DefaultGame::awardScoreTurretTeamKill(%game, %victimID, %killerID) messageClient(%killerID, 'MsgScoreTeamkill', '\c0You have been penalized for killing your teammate %1, with a turret.', %victimID.name); %game.recalcScore(%killerID); - // z0dd - ZOD, 6/12/03. Auto vote TKers - if(!$Host::TournamentMode) - { - if(($Host::ClassicTkLimit > 4 && %killerID.teamKills >= $Host::ClassicTkLimit) && (getAdmin() == 0)) - { - serverCmdStartNewVote(%victimID, "VoteKickPlayer", %killerID, 0, 0, 0, true); - bottomPrintAll("" @ %killerID.nameBase @ " Has " @ %killerID.teamKills @ " team kills. Recommend voting yes.", 4, 2); - logEcho(%killerID.nameBase @ " GUID: " @ %killerID.guid @ " TKS: " @ %killerID.teamKills, 1); - } - else - { - BottomPrint(%killerID, "You have " @ %killerID.teamKills @ ", you better cut it out!", 2, 1 ); - } - } } diff --git a/Classic/scripts/serverDefaults.cs b/Classic/scripts/serverDefaults.cs index 73b9fda..e947176 100644 --- a/Classic/scripts/serverDefaults.cs +++ b/Classic/scripts/serverDefaults.cs @@ -60,7 +60,6 @@ $Host::ClassicConnectLog = 1; // Logs all connections to $Host::ClassicAntiTurtleTime = 6; // How many minutes after a stalemate in CTF are the flags returned $Host::ClassicLimitArmors = 0; // Restrict armor types like turrets, larger team dictates amount avail $Host::ClassicBadWordFilter = 0; // Replace potty mouths words with random garbage -$Host::ClassicTkLimit = 0; // When set to 5 or more and no admin is on server, a vote is started to kick the tker $Host::ClassicAllowConsoleAccess = 0; // Allows super admins to use the servers console via Admin hud. $Host::ClassicNoNullVoiceSpam = 0; // Allow or disallow NULL voice usage. 1 enabled NULL voice to be used. $Host::ClassicBalancedBots = 0; // For every client join a bot is disconnected From c518c692fff9d4b9490d927c8d947b27116c68bd Mon Sep 17 00:00:00 2001 From: ChocoTaco1 Date: Mon, 3 Aug 2020 16:24:35 -0400 Subject: [PATCH 6/9] Lower Flag Transform Lowered for more updates --- Classic/scripts/LakRabbitGame.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classic/scripts/LakRabbitGame.cs b/Classic/scripts/LakRabbitGame.cs index 54294f0..8311599 100644 --- a/Classic/scripts/LakRabbitGame.cs +++ b/Classic/scripts/LakRabbitGame.cs @@ -1649,7 +1649,7 @@ function LakRabbitGame::onClientKilled(%game, %clVictim, %clKiller, %damageType, function LakRabbitGame::updateFlagTransform(%game, %flag) { %flag.setTransform(%flag.getTransform()); - %game.updateFlagThread[%flag] = %game.schedule(500, "updateFlagTransform", %flag); + %game.updateFlagThread[%flag] = %game.schedule(100, "updateFlagTransform", %flag); } function LakRabbitGame::playerDroppedFlag(%game, %player) From e0e0a7a283ed10c2a2cee82689eaf74de8d4bf50 Mon Sep 17 00:00:00 2001 From: ChocoTaco1 Date: Mon, 3 Aug 2020 16:30:08 -0400 Subject: [PATCH 7/9] Update Log --- Classic/scripts/LakRabbitGame.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Classic/scripts/LakRabbitGame.cs b/Classic/scripts/LakRabbitGame.cs index 8311599..815cd78 100644 --- a/Classic/scripts/LakRabbitGame.cs +++ b/Classic/scripts/LakRabbitGame.cs @@ -17,6 +17,12 @@ // Thanks for helping me test! // maradona, pip, phantom jaguar, hilikus, the_ham, pip, wiggle, dragon, pancho villa, w/o, nectar and many others.. // +// v3.37 Aug 2020 +// Nerfed Blaster damage (Less spam) +// Flag Transform 500 > 100 +// Changed Duel Mode buzzer sound +// Disabled disc jump restriction in duel mode & Pro Mode +// // v3.36 Dec 2019 // Boundary bounce speed limit // Unified Lakrabbit Vars From d056ea03d6766b05304bda0d9071570071dafac2 Mon Sep 17 00:00:00 2001 From: ChocoTaco1 Date: Fri, 7 Aug 2020 12:35:57 -0400 Subject: [PATCH 8/9] NetRate Patch by Bahke 32pps --- Classic/scripts/autoexec/MemPatches.cs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Classic/scripts/autoexec/MemPatches.cs b/Classic/scripts/autoexec/MemPatches.cs index db77650..9c20772 100644 --- a/Classic/scripts/autoexec/MemPatches.cs +++ b/Classic/scripts/autoexec/MemPatches.cs @@ -24,4 +24,18 @@ function suppressTraversalRootPatch() memPatch("56AD8A", "90909090909090909090909090909090909090909090"); memPatch("56D114", "90909090909090909090909090909090909090909090"); $tvpatched = 1; -} \ No newline at end of file +} + +// Netrate patch by bahke +// 32 packets per second + +$pref::Net::PacketSize = $Host::ClassicPacketSize; + +memPatch("A3A100","5052BA00000000B8000000005150526800000000E8C7D6B4FF5A585981C20100000039C27CE65A58E95F8CB8FF"); +memPatch("A3A200","5052BA00000000B8000000005150526800000000E8C7D5B4FF5A585981C20100000039C27CE65A58E9FC8AB8FF"); +memPatch("5C2D22","E9D97447009090"); +memPatch("5C2D85","E9767347009090"); +memPatch("0058665C","9090909090909090"); +memPatch("00586682","90909090909090909090"); +memPatch("005866AB","90909090909090909090"); +memPatch("58781A","EB0C"); \ No newline at end of file From cac7ad2911c6148fbb15c74bfa110eec02cdea48 Mon Sep 17 00:00:00 2001 From: ChocoTaco1 Date: Fri, 7 Aug 2020 15:04:10 -0400 Subject: [PATCH 9/9] Turret max Reset --- Classic/scripts/defaultGame.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Classic/scripts/defaultGame.cs b/Classic/scripts/defaultGame.cs index b5486d6..8faef77 100644 --- a/Classic/scripts/defaultGame.cs +++ b/Classic/scripts/defaultGame.cs @@ -639,6 +639,10 @@ function DefaultGame::gameOver( %game ) $VehicleMax[ScoutFlyer] = 4; $VehicleMax[BomberFlyer] = 2; $VehicleMax[HAPCFlyer] = 2; + + // Choco - reset turret maxes after each round. + $TeamDeployableMin[TurretIndoorDeployable] = 4; + $TeamDeployableMin[TurretOutdoorDeployable] = 4; } //------------------------------------------------------------------------------