mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-03-02 19:30:21 +00:00
Corrected file structure
This commit is contained in:
parent
2fe441f421
commit
2097008ccb
30 changed files with 6 additions and 1700 deletions
15
Classic/scripts/autoexec/AntiCloak.cs
Normal file
15
Classic/scripts/autoexec/AntiCloak.cs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
$AntiCloakPlayerCount = 6; // amount of players needed on server for CloakPack to be selectable
|
||||
|
||||
//Activates when default Inventory for player is set so player cant select it thru hotkeys or select it thru the gui.
|
||||
function ActivateAntiCloak ()
|
||||
{
|
||||
//echo("TotalTeamPlayerCount " @ $TotalTeamPlayerCount);
|
||||
//echo("AntiCloakPlayerCount " @ $AntiCloakPlayerCount);
|
||||
|
||||
if(!$Host::TournamentMode && $TotalTeamPlayerCount < $AntiCloakPlayerCount)
|
||||
//If server is in Tourny mode or if the server population isnt higher than the AntiCloakPlayerCount the CloakPack is not selectable.
|
||||
$InvBanList[CTF, "CloakingPack"] = true;
|
||||
else
|
||||
//If AntiCloakPlayerCount is lower than server population, CloakPack is enabled and Selectable.
|
||||
$InvBanList[CTF, "CloakingPack"] = false;
|
||||
}
|
||||
99
Classic/scripts/autoexec/GetTeamCounts.cs
Normal file
99
Classic/scripts/autoexec/GetTeamCounts.cs
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
//This function is Called at:
|
||||
//CreateServer(%mission, %missionType) in Server.cs
|
||||
|
||||
package StartTeamCounts {
|
||||
|
||||
//Start
|
||||
function CreateServer(%mission, %missionType)
|
||||
{
|
||||
//Call default function
|
||||
parent::CreateServer(%mission, %missionType);
|
||||
//Start
|
||||
//Make sure our activation variable is set
|
||||
ResetClientChangedTeams();
|
||||
//Keeps server Auto Reset off
|
||||
$Host::Dedicated = 0;
|
||||
//Call for a GetTeamCount update
|
||||
GetTeamCounts( %game, %client, %respawn );
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Prevent package from being activated if it is already
|
||||
if (!isActivePackage(StartTeamCounts))
|
||||
activatePackage(StartTeamCounts);
|
||||
|
||||
function GetTeamCounts( %game, %client, %respawn )
|
||||
{
|
||||
if (!isActivePackage(StartTeamCounts)) {
|
||||
deactivatePackage(StartTeamCounts);
|
||||
}
|
||||
|
||||
//Check pug password
|
||||
CheckPUGpassword();
|
||||
|
||||
//Get teamcounts
|
||||
if($GetCountsClientTeamChange && $countdownStarted && $MatchStarted) {
|
||||
//Team Count code by Keen
|
||||
$PlayerCount[0] = 0;
|
||||
$PlayerCount[1] = 0;
|
||||
$PlayerCount[2] = 0;
|
||||
|
||||
for(%i = 0; %i < ClientGroup.getCount(); %i++)
|
||||
{
|
||||
%client = ClientGroup.getObject(%i);
|
||||
|
||||
//if(!%client.isAIControlled())
|
||||
$PlayerCount[%client.team]++;
|
||||
}
|
||||
|
||||
//echo ("Clientgroup " @ ClientGroup.getCount());
|
||||
//echo ("$PlayerCount[0] " @ $PlayerCount[0]);
|
||||
//echo ("$PlayerCount[1] " @ $PlayerCount[1]);
|
||||
//echo ("$PlayerCount[2] " @ $PlayerCount[2]);
|
||||
//echo ("client.team " @ %client.team);
|
||||
|
||||
//Other variables
|
||||
//Amount of players on teams
|
||||
$TotalTeamPlayerCount = $PlayerCount[1] + $PlayerCount[2];
|
||||
//Amount of all players including observers
|
||||
$AllPlayerCount = $PlayerCount[1] + $PlayerCount[2] + $PlayerCount[0];
|
||||
|
||||
|
||||
//Start Base Rape Notify
|
||||
//Make sure it's CTF Mode
|
||||
if($CurrentMissionType $= "CTF") {
|
||||
PlayerNotify::AtSpawn( %game, %client, %respawn );
|
||||
}
|
||||
//Call Team Balance Notify
|
||||
//Make sure it's CTF Mode
|
||||
if($CurrentMissionType $= "CTF" && $TotalTeamPlayerCount !$= 0) {
|
||||
TeamBalanceNotify::AtSpawn( %game, %client, %respawn );
|
||||
}
|
||||
if($CurrentMissionType $= "sctf" && $TotalTeamPlayerCount !$= 0) {
|
||||
TeamBalanceNotify::AtSpawn( %game, %client, %respawn );
|
||||
}
|
||||
//AntiCloak Start
|
||||
//if($CurrentMissionType $= "CTF") {
|
||||
//ActivateAntiCloak ();
|
||||
//}
|
||||
|
||||
$GetCountsClientTeamChange = false;
|
||||
|
||||
}
|
||||
|
||||
//Call itself again. Every 5 seconds.
|
||||
schedule(5000, 0, "GetTeamCounts");
|
||||
|
||||
}
|
||||
|
||||
//Run at DefaultGame::clientJoinTeam, DefaultGame::clientChangeTeam, DefaultGame::assignClientTeam in evo defaultgame.ovl
|
||||
//Also Run at DefaultGame::onClientEnterObserverMode, DefaultGame::AIChangeTeam, DefaultGame::onClientLeaveGame, DefaultGame::forceObserver in evo defaultgame.ovl
|
||||
//And finally GameConnection::onConnect in evo server.ovl
|
||||
//Added so the bulk of GetCounts doesnt run when it doesnt need to causing unnecessary latency that may or may not have existed, but probably is good practice.
|
||||
//GetCounts still runs every 5 seconds as it did, but whether or not someone has changed teams, joined obs, left, etc etc will decide whether or not the bulk of it runs.
|
||||
function ResetClientChangedTeams() {
|
||||
//Let GetTeamCounts run if there is a Teamchange.
|
||||
$GetCountsClientTeamChange = true;
|
||||
}
|
||||
72
Classic/scripts/autoexec/NoBaseRapeNotify.cs
Normal file
72
Classic/scripts/autoexec/NoBaseRapeNotify.cs
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
//Start and Reset Notify
|
||||
//package NoRapeNotify {
|
||||
|
||||
//Start Notify
|
||||
//function DefaultGame::spawnPlayer( %game, %client, %respawn ) {
|
||||
//Call default function
|
||||
//parent::spawnPlayer( %game, %client, %respawn );
|
||||
//Start
|
||||
//Make sure it's CTF Mode
|
||||
//if( $CurrentMissionType $= "CTF" ) {
|
||||
//PlayerNotify::AtSpawn( %game, %client, %respawn );
|
||||
//}
|
||||
//}
|
||||
|
||||
//Moved the DefaultGame::gameOver in evo defaultgame.ovl
|
||||
|
||||
//Reset Notify
|
||||
//function DefaultGame::gameOver( %game ) {
|
||||
//Call default function
|
||||
//parent::gameOver( %game );
|
||||
//Reset NoBaseRape Notify
|
||||
//ResetNotify::MissionEnd( %game, %client );
|
||||
//}
|
||||
|
||||
//};
|
||||
|
||||
// Prevent package from being activated if it is already
|
||||
//if (!isActivePackage(NoRapeNotify))
|
||||
//activatePackage(NoRapeNotify);
|
||||
|
||||
|
||||
|
||||
//This function is at DefaultGame::spawnPlayer( %game, %client, %respawn ) defaultGame.cs
|
||||
//Notifys the user if NoBase rape is on or off. Has a Counter so it is only run once and doesnt spam the client. It is triggered at spawn.
|
||||
function PlayerNotify::AtSpawn( %game, %client, %respawn )
|
||||
{
|
||||
//echo ("%client " @ %client);
|
||||
//echo ("$TeamBalanceClient " @ $TeamBalanceClient);
|
||||
|
||||
//Is NoBaseRape On or off
|
||||
if( !$Host::TournamentMode && $Host::EvoNoBaseRapeEnabled && $Host::EvoNoBaseRapeClassicPlayerCount > $TotalTeamPlayerCount ) {
|
||||
//If on, has the client gotten the notification already
|
||||
if($NoBaseRapeNotifyCount !$= 0) {
|
||||
messageAll('MsgNoBaseRapeNotify', 'No Base Rape is \c1Enabled.~wfx/misc/nexus_cap.wav');
|
||||
$NoBaseRapeNotifyCount = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
//NoBaseRape is off
|
||||
//Has the client gotten the notification already
|
||||
if($NoBaseRapeNotifyCount !$= 1) {
|
||||
messageAll('MsgNoBaseRapeNotify', 'No Base Rape is \c1Disabled.~wfx/misc/diagnostic_on.wav');
|
||||
$NoBaseRapeNotifyCount = 1;
|
||||
}
|
||||
}
|
||||
|
||||
//This function is at StaticShapeData::damageObject(%data, %targetObject, %sourceObject, %position, %amount, %damageType)
|
||||
//In the evopackage.cs or evoClassic.vl2
|
||||
//Plays a sound when a player hits a protected asset
|
||||
function PlayerNotifyEnabled::OnDamage( %game, %sourceObject )
|
||||
{
|
||||
messageClient(%sourceObject.client, 'MsgNoBaseRapeNotify', '~wfx/misc/diagnostic_beep.wav');
|
||||
}
|
||||
|
||||
//This function is at DefaultGame::gameOver(%game) CTFGame.cs
|
||||
//Resets the client NotifyCount when the mission ends
|
||||
function ResetNotify::MissionEnd( %game, %client )
|
||||
{
|
||||
$NoBaseRapeNotifyCount = -1;
|
||||
}
|
||||
|
||||
|
||||
58
Classic/scripts/autoexec/PUGpasscheck.cs
Normal file
58
Classic/scripts/autoexec/PUGpasscheck.cs
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
//To activate a password in certain gamemodes
|
||||
//called in Getcounts.cs
|
||||
//and also other options like distance and speed
|
||||
//turn tournament mode off when switched to lak
|
||||
|
||||
// Variables
|
||||
// Add these to ServerPrefs
|
||||
//
|
||||
// Turn on Auto Password at a player limit
|
||||
// $Host::PUGautoPassword = 1;
|
||||
// What value does Auto Password turn on
|
||||
// $Host::PUGautoPasswordLimit = 10;
|
||||
// The PUG password you want
|
||||
// $Host::PUGPassword = "pickup";
|
||||
|
||||
function CheckPUGpassword()
|
||||
{
|
||||
//Only run before mission start and countdown start
|
||||
if( !$MatchStarted && !$countdownStarted )
|
||||
{
|
||||
if( $CurrentMissionType !$= "LakRabbit" )
|
||||
{
|
||||
if( $Host::TournamentMode )
|
||||
$Host::Password = $Host::PUGPassword;
|
||||
|
||||
else if( !$Host::TournamentMode )
|
||||
{
|
||||
$Host::Password = "";
|
||||
|
||||
//if 10 players are already on the server when the map changes
|
||||
if( $TotalTeamPlayerCount >= $Host::PUGautoPasswordLimit && $Host::PUGautoPassword )
|
||||
$Host::Password = $Host::PUGPassword;
|
||||
}
|
||||
|
||||
$Host::HiVisibility = "0";
|
||||
}
|
||||
else if( $CurrentMissionType $= "LakRabbit" )
|
||||
{
|
||||
$Host::Password = "";
|
||||
$Host::TournamentMode = 0;
|
||||
|
||||
$Host::HiVisibility = "1";
|
||||
}
|
||||
|
||||
//echo ("PUGpassCheck");
|
||||
}
|
||||
|
||||
//If someone changes teams
|
||||
else if( $Host::PUGautoPassword && $CurrentMissionType !$= "LakRabbit" && !$Host::TournamentMode )
|
||||
{
|
||||
if( $TotalTeamPlayerCount < $Host::PUGautoPasswordLimit )
|
||||
$Host::Password = "";
|
||||
else if( $TotalTeamPlayerCount >= $Host::PUGautoPasswordLimit )
|
||||
$Host::Password = $Host::PUGPassword;
|
||||
|
||||
//echo ("PUGpassCheckTeamchange");
|
||||
}
|
||||
}
|
||||
77
Classic/scripts/autoexec/TeamBalanceNotify.cs
Normal file
77
Classic/scripts/autoexec/TeamBalanceNotify.cs
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
//Give the client a notification on the current state of balancing.
|
||||
//This function is in GetTeamCounts( %game, %client, %respawn ) GetTeamCounts.cs
|
||||
function TeamBalanceNotify::AtSpawn( %game, %client, %respawn )
|
||||
{
|
||||
//Call for a GetTeamCount update
|
||||
//GetTeamCounts( %game, %client, %respawn );
|
||||
|
||||
//evoplayercount does not count yourself
|
||||
|
||||
//variables
|
||||
//%balancedifference = 2; //player difference you want to allow before sending notifications between teams.
|
||||
//%Team1Difference = $PlayerCount[1] - $PlayerCount[2];
|
||||
//%Team2Difference = $PlayerCount[2] - $PlayerCount[1];
|
||||
|
||||
|
||||
//echo ("%Team1Difference " @ %Team1Difference);
|
||||
//echo ("%Team2Difference " @ %Team2Difference);
|
||||
|
||||
|
||||
//Are teams unbalanced?
|
||||
if( $PlayerCount[1] !$= $PlayerCount[2] ) {
|
||||
//Reset Balanced
|
||||
$BalancedCount = 0;
|
||||
if( ($PlayerCount[1] - $PlayerCount[2]) >= 2 || ($PlayerCount[2] - $PlayerCount[1]) >= 2 ) {
|
||||
//Has the client gotten the notification already
|
||||
if($TeamBalanceNotifyCount !$= 1) {
|
||||
//If unbalanced, send a notification. Will continue to send notifications until teams are balanced.
|
||||
messageAll('MsgTeamBalanceNotify', '\c1Teams are unbalanced.');
|
||||
//Only get the notification once per spawn.
|
||||
$TeamBalanceNotifyCount = 1;
|
||||
//Reset Stat
|
||||
$StatsBalanceCount = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
//If teams are balanced and teams dont equal 0.
|
||||
if( $PlayerCount[1] == $PlayerCount[2] && $TotalTeamPlayerCount !$= 0 ) {
|
||||
//Has the client gotten the notification already
|
||||
if($BalancedCount !$= 1) {
|
||||
//If balanced, send a notification.
|
||||
messageAll('MsgTeamBalanceNotify', '\c1Teams are balanced.');
|
||||
//Only get the balance notification once.
|
||||
$BalancedCount = 1;
|
||||
//Reset Unbalanced
|
||||
$TeamBalanceNotifyCount = 0;
|
||||
//Reset Stat
|
||||
$StatsBalanceCount = 0;
|
||||
}
|
||||
}
|
||||
|
||||
//3 or more difference gets a count notify
|
||||
if( ($PlayerCount[1] - $PlayerCount[2]) >= 3 || ($PlayerCount[2] - $PlayerCount[1]) >= 3 ) {
|
||||
//Run it once
|
||||
if($StatsBalanceCount !$= 1) {
|
||||
messageAll('MsgTeamBalanceNotify', '\c1It is currently %1 vs %2 with %3 observers.', $PlayerCount[1], $PlayerCount[2], $PlayerCount[0] );
|
||||
$StatsBalanceCount = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Called in CTFGame::flagCap in evo CTFGame.ovl
|
||||
//Allows for another unbalanced notification everytime the flag is capped.
|
||||
function ResetUnbalancedNotifyPerCap()
|
||||
{
|
||||
$TeamBalanceNotifyCount = 0;
|
||||
$StatsBalanceCount = 0;
|
||||
}
|
||||
|
||||
//Reset Notify at defaultgame::gameOver in evo defaultgame.ovl
|
||||
function ResetTeamBalanceNotifyGameOver( %game ) {
|
||||
//Reset TeamBalance Variables
|
||||
$BalancedCount = -1;
|
||||
$TeamBalanceNotifyCount = -1;
|
||||
$StatsBalanceCount = -1;
|
||||
|
||||
}
|
||||
88
Classic/scripts/autoexec/VoteOverTime.cs
Normal file
88
Classic/scripts/autoexec/VoteOverTime.cs
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
//Changes were also made in the Evo Admin.ovl and DefaultGame.ovl
|
||||
//DefaultGame::voteChangeMission, DefaultGame::voteChangeTimeLimit, serverCmdStartNewVote
|
||||
|
||||
package VoteOverTime {
|
||||
|
||||
function DefaultGame::checkTimeLimit(%game, %forced)
|
||||
{
|
||||
// Don't add extra checks:
|
||||
if ( %forced )
|
||||
cancel( %game.timeCheck );
|
||||
|
||||
// if there is no time limit, check back in a minute to see if it's been set
|
||||
if(($Host::TimeLimit $= "") || $Host::TimeLimit == 0)
|
||||
{
|
||||
%game.timeCheck = %game.schedule(20000, "checkTimeLimit");
|
||||
return;
|
||||
}
|
||||
|
||||
%curTimeLeftMS = ($Host::TimeLimit * 60 * 1000) + $missionStartTime - getSimTime();
|
||||
|
||||
if (%curTimeLeftMS <= 0)
|
||||
{
|
||||
//Vote Overtime
|
||||
//Check if Vote is active or if the timelimit has changed.
|
||||
if( !$VoteInProgress && !$TimeLimitChanged ) {
|
||||
// time's up, put down your pencils
|
||||
%game.timeLimitReached();
|
||||
|
||||
//Reset Everything to do with Vote Overtime
|
||||
//Moved to function DefaultGame::gameOver in DefaultGame.ovl in evo
|
||||
}
|
||||
else if( $missionRunning && $VoteInProgress && !$TimeLimitChanged ) {
|
||||
//Restart the function so the map can end if the Vote doesnt pass.
|
||||
schedule(2000, 0, "RestartcheckTimeLimit", %game, %forced);
|
||||
|
||||
//Messege
|
||||
if( !$VoteInProgressMessege ) {
|
||||
messageAll('', '\c2Vote Overtime Initiated.~wfx/powered/turret_heavy_activate.wav', %display);
|
||||
$VoteInProgressMessege = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(%curTimeLeftMS >= 20000)
|
||||
%game.timeCheck = %game.schedule(20000, "checkTimeLimit");
|
||||
else
|
||||
%game.timeCheck = %game.schedule(%curTimeLeftMS + 1, "checkTimeLimit");
|
||||
|
||||
//now synchronize everyone's clock
|
||||
messageAll('MsgSystemClock', "", $Host::TimeLimit, %curTimeLeftMS);
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
function RestartcheckTimeLimit(%game, %forced)
|
||||
{
|
||||
%game.checkTimeLimit(%game, %forced);
|
||||
}
|
||||
|
||||
function StartVOTimeVote(%game)
|
||||
{
|
||||
$VoteSoundInProgress = true;
|
||||
$VoteInProgress = true;
|
||||
$TimeLimitChanged = false;
|
||||
}
|
||||
|
||||
function ResetVOTimeChanged(%game)
|
||||
{
|
||||
$VoteInProgress = false;
|
||||
$TimeLimitChanged = true;
|
||||
$VoteInProgressMessege = false;
|
||||
$VoteSoundInProgress = false;
|
||||
}
|
||||
|
||||
function ResetVOall(%game)
|
||||
{
|
||||
$VoteInProgress = false;
|
||||
$TimeLimitChanged = false;
|
||||
$VoteInProgressMessege = false;
|
||||
$VoteSoundInProgress = false;
|
||||
}
|
||||
|
||||
|
||||
// Prevent package from being activated if it is already
|
||||
if (!isActivePackage(VoteOverTime))
|
||||
activatePackage(VoteOverTime);
|
||||
13
Classic/scripts/autoexec/VoteSound.cs
Normal file
13
Classic/scripts/autoexec/VoteSound.cs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
//Make a sound every so seconds to make sure everyone votes
|
||||
|
||||
function VoteSound( %game ) {
|
||||
|
||||
if($VoteSoundInProgress) {
|
||||
messageAll('', '\c1Vote in Progress: \c0Press Insert for Yes or Delete for No.~wgui/objective_notification.wav', %display);
|
||||
//$VoteSoundSchedule = schedule(12000, "VoteSound", %game);
|
||||
schedule(12000, 0, "VoteSound", %game);
|
||||
}
|
||||
else
|
||||
return;
|
||||
|
||||
}
|
||||
19
Classic/scripts/autoexec/antiTurret.cs
Normal file
19
Classic/scripts/autoexec/antiTurret.cs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
$TurretPlayerCount = 10; // amount of players needed on server for turrets
|
||||
|
||||
package antiTurret {
|
||||
|
||||
function TurretData::selectTarget(%this, %turret)
|
||||
{
|
||||
if( !$Host::TournamentMode && $TotalTeamPlayerCount < $TurretPlayerCount) {
|
||||
%turret.clearTarget();
|
||||
}
|
||||
else {
|
||||
Parent::selectTarget(%this, %turret);
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Prevent package from being activated if it is already
|
||||
if (!isActivePackage(antiTurret))
|
||||
activatePackage(antiTurret);
|
||||
21
Classic/scripts/autoexec/anti_NoFog_Snipe.cs
Normal file
21
Classic/scripts/autoexec/anti_NoFog_Snipe.cs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
// anti NoFog Snipe by Red Shifter
|
||||
// A far cry to the solution of noFog, but this'll stop the snipes
|
||||
// This is a Server-Side Script
|
||||
|
||||
package antiNoFogSnipe {
|
||||
|
||||
function DefaultGame::missionLoadDone(%game) {
|
||||
|
||||
Parent::missionLoadDone(%game);
|
||||
|
||||
if (Sky.visibleDistance $= "" || Sky.visibleDistance == 0) {
|
||||
// This script plays it safe. You better have a map that works.
|
||||
error("WARNING! This map will not work with NoFog Snipe!");
|
||||
BasicSniperShot.maxRifleRange = 1000;
|
||||
}
|
||||
else
|
||||
BasicSniperShot.maxRifleRange = Sky.visibleDistance;
|
||||
}
|
||||
|
||||
};
|
||||
activatePackage(antiNoFogSnipe);
|
||||
77
Classic/scripts/autoexec/checkver.cs
Normal file
77
Classic/scripts/autoexec/checkver.cs
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
// TribesNext Minimum Version Enforcement
|
||||
// Written by Thyth
|
||||
// 2014-08-18
|
||||
|
||||
// Updated on 2014-08-31 after testing/feedback from Heat Killer.
|
||||
|
||||
// This script prevents clients from joining a non-observer team if they are not running
|
||||
// TribesNext RC2a or newer, with the tournamentNetClient.vl2 installed. An early form of
|
||||
// anticheat was added to the RC2 patch that kills HM2. This script allows detecting of
|
||||
// a new enough version by the interaction with the TribesNext community/browser system.
|
||||
// Support for clan tags (and account renaming) was added along with the HM2 killer in RC2,
|
||||
// but no client side code to talk to the browser server was in yet. Now that the browser
|
||||
// system backend is complete, all clients can install the tournamentNetClient to the
|
||||
// browser, and users running RC2 (with HM2 killer) can be detected.
|
||||
|
||||
// The variable on the client object:
|
||||
// %client.t2csri_sentComCertDone
|
||||
// Will be 1 if they are running RC2+ with tournamentNetClient.vl2
|
||||
|
||||
// Admins can override this restriction when forcing players to join a team.
|
||||
|
||||
function checkVer_showBanner(%client)
|
||||
{
|
||||
// customize me
|
||||
commandToClient(%client, 'CenterPrint', "<font:Sui Generis:22><color:3cb4b4>Version Check Failed!\n<font:Univers:16><color:3cb4b4>You need the latest TribesNext patch and TournyNetClient to play.\n Download it from T2Discord.tk and drop it into your GameData/Base folder.", 10, 3);
|
||||
}
|
||||
|
||||
package checkver
|
||||
{
|
||||
function serverCmdClientJoinTeam(%client, %team)
|
||||
{
|
||||
if (!%client.t2csri_sentComCertDone)
|
||||
{
|
||||
checkVer_showBanner(%client);
|
||||
return;
|
||||
}
|
||||
Parent::serverCmdClientJoinTeam(%client, %team);
|
||||
}
|
||||
function serverCmdClientJoinGame(%client)
|
||||
{
|
||||
if (!%client.t2csri_sentComCertDone)
|
||||
{
|
||||
checkVer_showBanner(%client);
|
||||
return;
|
||||
}
|
||||
Parent::serverCmdClientJoinGame(%client);
|
||||
}
|
||||
function serverCmdClientPickedTeam(%client, %option)
|
||||
{
|
||||
if (!%client.t2csri_sentComCertDone)
|
||||
{
|
||||
checkVer_showBanner(%client);
|
||||
return;
|
||||
}
|
||||
Parent::serverCmdClientPickedTeam(%client, %option);
|
||||
}
|
||||
function serverCmdClientTeamChange(%client, %option)
|
||||
{
|
||||
if (!%client.t2csri_sentComCertDone)
|
||||
{
|
||||
checkVer_showBanner(%client);
|
||||
return;
|
||||
}
|
||||
Parent::serverCmdClientTeamChange(%client, %option);
|
||||
}
|
||||
function Observer::onTrigger(%data, %obj, %trigger, %state)
|
||||
{
|
||||
%client = %obj.getControllingClient();
|
||||
if (!%client.t2csri_sentComCertDone)
|
||||
{
|
||||
checkVer_showBanner(%client);
|
||||
return;
|
||||
}
|
||||
Parent::onTrigger(%data, %obj, %trigger, %state);
|
||||
}
|
||||
};
|
||||
activatePackage(checkver);
|
||||
19
Classic/scripts/autoexec/noMortarTurret.cs
Normal file
19
Classic/scripts/autoexec/noMortarTurret.cs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
// ban mortar turret from inventory in main gametypes
|
||||
$InvBanList[CTF, "MortarBarrelPack"] = 1;
|
||||
$InvBanList[CnH, "MortarBarrelPack"] = 1;
|
||||
$InvBanList[Siege, "MortarBarrelPack"] = 1;
|
||||
|
||||
package noMortarTurret {
|
||||
|
||||
// if a mortar turret somehow makes it into the game, keep it from working
|
||||
function TurretData::selectTarget(%this, %turret) {
|
||||
if( %turret.initialBarrel !$= "MortarBarrelLarge" ) {
|
||||
Parent::selectTarget(%this, %turret);
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Prevent package from being activated if it is already
|
||||
if (!isActivePackage( noMortarTurret ))
|
||||
activatePackage( noMortarTurret );
|
||||
13
Classic/scripts/autoexec/packetsettings.cs
Normal file
13
Classic/scripts/autoexec/packetsettings.cs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
$pref::Net::PacketRateToClient = "32"; //determines how many packets per second sent to each client
|
||||
$pref::Net::PacketRateToServer = "32"; //may determine how many packets are allowed from each client
|
||||
$pref::Net::PacketSize = "450"; //size of each packet sent to each client, maximum.has no effect on size of packets client send to the server
|
||||
|
||||
|
||||
setlogmode(0);
|
||||
// leave this set to zero unless you are coding and need a log it will make a huge file...!!!
|
||||
|
||||
$logechoenabled=0;
|
||||
//set to 1 you can now see game details in console. Thanks to tubaguy.
|
||||
|
||||
SetPerfCounterEnable(0);
|
||||
//server stutter fix
|
||||
8
Classic/scripts/autoexec/security.cs
Normal file
8
Classic/scripts/autoexec/security.cs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
memPatch("A3C300","A370C3A300E8D609A0FF8B46205053E98103A0FF");
|
||||
memPatch("A3C330","C70570C3A30000000000E8A109A0FF8B462085C0E96D03A0FF");
|
||||
memPatch("A3C400","E80BFB9FFF6089C38B1570C3A300B8FF00000029D039C37D0661E92509A0FFA380C3A30061A180C3A300E91509A0FF");
|
||||
memPatch("A3C430","E8DBFA9FFF6089C38B1570C3A300B8FF00000029D039C37D0661E9A009A0FFA380C3A30061A180C3A300E99009A0FF");
|
||||
memPatch("43C68B","E970FC5F00");
|
||||
memPatch("43C6AC","E97FFC5F00");
|
||||
memPatch("43CD3F","E9BCF65F00");
|
||||
memPatch("43CDEA","E941F65F00");
|
||||
Loading…
Add table
Add a link
Reference in a new issue