diff --git a/Classic/prefs/serverPrefs.cs b/Classic/prefs/serverPrefs.cs index 975d180..0ac2c09 100644 --- a/Classic/prefs/serverPrefs.cs +++ b/Classic/prefs/serverPrefs.cs @@ -37,6 +37,8 @@ $Host::ClassicChatLogPath = "logs/Chat/"; $Host::ClassicConnectLog = 1; $Host::ClassicConnLogPath = "logs/Connect/Connect.log"; $Host::ClassicCycleMisTypes = 0; +$Host::ClassicDailyHardRestart = 0; +$Host::ClassicDailyHardRestartTime = "10\t00\tam"; $Host::ClassicEchoChat = 0; $Host::ClassicEvoStats = 1; $Host::ClassicFairTeams = 1; @@ -123,21 +125,23 @@ $Host::LoadScreenLine2 = "Game Modes:"; $Host::LoadScreenLine2_Msg = "LakRabbit, Capture the Flag, DeathMatch, (Light Only) Capture the Flag"; $Host::LoadScreenLine3 = "Get Mappacks:"; $Host::LoadScreenLine3_Msg = "playt2.com/mappacks"; -$Host::LoadScreenLine4 = "Server Provided by:"; -$Host::LoadScreenLine4_Msg = "Ravin and Choco"; -$Host::LoadScreenLine5 = "Server Hosted by:"; -$Host::LoadScreenLine5_Msg = "Branzone"; +$Host::LoadScreenLine4 = "Server Location:"; +$Host::LoadScreenLine4_Msg = "Iowa"; +$Host::LoadScreenLine5 = "Server Hosted:"; +$Host::LoadScreenLine5_Msg = "Google Compute Engine"; $Host::LoadScreenLine6 = "Server Github:"; -$Host::LoadScreenLine6_Msg = "github.com/ChocoTaco1/TacoServer"; -$Host::LoadScreenMOTD1 = "Lak crowd early evenings after work during the week."; -$Host::LoadScreenMOTD2 = "Big CTF games Fridays, Saturdays, and Sundays!"; -$Host::LoadScreenMOTD3 = "Please make an effort to keep teams balanced!"; -$Host::LoadScreenMOTD4 = " "; +$Host::LoadScreenLine6_Msg = "https://github.com/ChocoTaco1/TacoServer"; +$Host::LoadScreenMOTD1 = "Celebrating 20 Years of Tribes2!"; +$Host::LoadScreenMOTD2 = "Come play Arena on Wednesday Nights!"; +$Host::LoadScreenMOTD3 = "Lak crowd early evenings after work during the week."; +$Host::LoadScreenMOTD4 = "Big CTF games Fridays, Saturdays, and Sundays!"; +$Host::LoadScreenShowLogo = 0; +$Host::LoadScreenShowLogoName = "dpub/DPUB_logo"; $Host::LogIntentionalQuit = 1; $Host::Map = "VaubanLak"; $Host::MarkDnDObjectives = 1; $Host::MaxBotDifficulty = 0; -$Host::MaxMessageLen = 120; +$Host::MaxMessageLen = 140; $Host::MaxPlayers = 30; $Host::MinBotDifficulty = 0; $Host::MinFlagRecordPlayerCount = 6; diff --git a/Classic/scripts/CTFGame.cs b/Classic/scripts/CTFGame.cs old mode 100644 new mode 100755 index 5ac35f8..ccba498 --- a/Classic/scripts/CTFGame.cs +++ b/Classic/scripts/CTFGame.cs @@ -1213,7 +1213,7 @@ function CTFGame::updateKillScores(%game, %clVictim, %clKiller, %damageType, %im } else { - if (%game.testTeamKill(%clVictim, %clKiller)) //otherwise test for a teamkill + if (%game.testTeamKill(%clVictim, %clKiller, %damageType)) //otherwise test for a teamkill %game.awardScoreTeamKill(%clVictim, %clKiller); } } diff --git a/Classic/scripts/LakRabbitGame.cs b/Classic/scripts/LakRabbitGame.cs index 8d5d683..cf86eba 100755 --- a/Classic/scripts/LakRabbitGame.cs +++ b/Classic/scripts/LakRabbitGame.cs @@ -917,8 +917,10 @@ function Player::setKnockback(%this, %val) // } //} +}; + //Put everyone on NonRabbit Team -function DefaultGame::missionLoadDone(%game) +function LakRabbitGame::missionLoadDone(%game) { for(%i = 0; %i < ClientGroup.getCount(); %i++) { @@ -936,8 +938,6 @@ function DefaultGame::missionLoadDone(%game) parent::missionLoadDone(%game); } -}; - // Added function LakRabbitGame::AIInit(%game) { @@ -1925,11 +1925,11 @@ function LakRabbitGame::playerTouchFlag(%game, %player, %flag) %game.showRabbitWaypoint(%player.client); } -// borlak - make rabbit invincible for 2 seconds .. + // borlak - make rabbit invincible for 2 seconds .. %player.setInvincible(true); %player.schedule(2000, "setInvincible", false); -// duel mode + // duel mode if(%game.duelMode) { %player.client.duelTimer = schedule(1000, 0, checkDuelTimer, %player.client); @@ -2032,11 +2032,11 @@ function LakRabbitGame::gameOver(%game) cancel(%client.waypointSchedule); cancel(%client.duelTimer); - if(%client.team $=0) - %client.lakobs = 1; - //Put everyone in observer //Mainly for switching to CTF + if(%client.team $=0) + %client.lakobs = 1; + %client.team = 0; %client.lastTeam = 0; } @@ -2045,9 +2045,9 @@ function LakRabbitGame::gameOver(%game) if($Host::LakRabbitShowFlagIcon == 0 && $Host::LakRabbitShowFlagTask) cancel(%game.waypointSchedule); -// borlak -- delete variables - deleteVariables("$LakFired*"); - deleteVariables("$LakDamaged*"); + // borlak -- delete variables + deleteVariables("$LakFired*"); + deleteVariables("$LakDamaged*"); } function LakRabbitGame::resetScore(%game, %client) diff --git a/Classic/scripts/SCtFGame.cs b/Classic/scripts/SCtFGame.cs old mode 100644 new mode 100755 index c709310..b4b940a --- a/Classic/scripts/SCtFGame.cs +++ b/Classic/scripts/SCtFGame.cs @@ -1316,7 +1316,7 @@ function SCtFGame::updateKillScores(%game, %clVictim, %clKiller, %damageType, %i } else { - if (%game.testTeamKill(%clVictim, %clKiller)) //otherwise test for a teamkill + if (%game.testTeamKill(%clVictim, %clKiller, %damageType)) //otherwise test for a teamkill %game.awardScoreTeamKill(%clVictim, %clKiller); } } diff --git a/Classic/scripts/admin.cs b/Classic/scripts/admin.cs index e96e180..70027e5 100755 --- a/Classic/scripts/admin.cs +++ b/Classic/scripts/admin.cs @@ -135,20 +135,13 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, % for ( %idx = 0; %idx < ClientGroup.getCount(); %idx++ ) { %cl = ClientGroup.getObject( %idx ); - - if (%cl.isAdmin == true || (%cl.team == %client.team && !%cl.isAIControlled())) - { - if(%cl.isAdmin == true && %cl.team !$= %client.team) { - messageClient(%cl, 'AdminOtherTeamKickVoteStarted', '\c2%1 has initiated a vote to kick %2 on the \c3Other Team.~wgui/objective_notification.wav', %client.name, %arg1.name); - } - else - messageClient( %cl, 'VoteStarted', '\c2%1 initiated a vote to %2 %3.', %client.name, %actionMsg, %arg1.name); - %clientsVoting++; - } + + if (%cl.team == %client.team && !%cl.isAIControlled()) + { + messageClient( %cl, 'VoteStarted', '\c2%1 initiated a vote to %2 %3.', %client.name, %actionMsg, %arg1.name); + %clientsVoting++; + } } - %VoteSoundRandom = getRandom(1,100); - $VoteSoundRandom = %VoteSoundRandom; - $VoteSoundSchedule = schedule(10000, 0, "VoteSound", %game, %typename, %arg1, %arg2, %VoteSoundRandom); } else { @@ -161,9 +154,6 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, % %clientsVoting++; } } - %VoteSoundRandom = getRandom(1,100); - $VoteSoundRandom = %VoteSoundRandom; - $VoteSoundSchedule = schedule(10000, 0, "VoteSound", %game, %typename, %arg1, %arg2, %VoteSoundRandom); } } else @@ -179,21 +169,6 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, % } } } - else if ( %typeName $= "VoteSkipMission" ) - { - for ( %idx = 0; %idx < ClientGroup.getCount(); %idx++ ) - { - %cl = ClientGroup.getObject( %idx ); - if ( !%cl.isAIControlled() ) - { - messageClient( %cl, 'VoteStarted', '\c2%1 initiated a vote to %2.', %client.name, %actionMsg, %arg1.name); - %clientsVoting++; - } - } - %VoteSoundRandom = getRandom(1,100); - $VoteSoundRandom = %VoteSoundRandom; - $VoteSoundSchedule = schedule(10000, 0, "VoteSound", %game, %typename, %arg1, %arg2, %VoteSoundRandom); - } else if ( %typeName $= "VoteChangeMission" ) { for ( %idx = 0; %idx < ClientGroup.getCount(); %idx++ ) @@ -205,9 +180,6 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, % %clientsVoting++; } } - %VoteSoundRandom = getRandom(1,100); - $VoteSoundRandom = %VoteSoundRandom; - $VoteSoundSchedule = schedule(10000, 0, "VoteSound", %game, %typename, %arg1, %arg2, %VoteSoundRandom); } else if (%arg1 !$= 0) { @@ -227,9 +199,6 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, % %clientsVoting++; } } - %VoteSoundRandom = getRandom(1,100); - $VoteSoundRandom = %VoteSoundRandom; - $VoteSoundSchedule = schedule(10000, 0, "VoteSound", %game, %typename, %arg1, %arg2, %VoteSoundRandom); } else { @@ -252,10 +221,7 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, % } else { - if( %arg1 == 999 ) - %arg1 = "unlimited"; - - for ( %idx = 0; %idx < ClientGroup.getCount(); %idx++ ) + for ( %idx = 0; %idx < ClientGroup.getCount(); %idx++ ) { %cl = ClientGroup.getObject( %idx ); if ( !%cl.isAIControlled() ) @@ -264,9 +230,6 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, % %clientsVoting++; } } - %VoteSoundRandom = getRandom(1,100); - $VoteSoundRandom = %VoteSoundRandom; - $VoteSoundSchedule = schedule(10000, 0, "VoteSound", %game, %typename, %arg1, %arg2, %VoteSoundRandom); } } else diff --git a/Classic/scripts/autoexec/AntiTurret.cs b/Classic/scripts/autoexec/AntiTurret.cs index fd83d9d..e077a33 100644 --- a/Classic/scripts/autoexec/AntiTurret.cs +++ b/Classic/scripts/autoexec/AntiTurret.cs @@ -17,22 +17,14 @@ package AntiTurret function TurretData::selectTarget(%this, %turret) { - if( !$Host::TournamentMode && $TotalTeamPlayerCount < $Host::EnableTurretPlayerCount ) - { + if(!$Host::TournamentMode && $TotalTeamPlayerCount < $Host::EnableTurretPlayerCount) %turret.clearTarget(); - } else { - //All turret types can fire - if( $Host::EnableMortarTurret ) - { + if($Host::EnableMortarTurret) //All turret types can fire parent::selectTarget(%this, %turret); - } - //Only non-MortarTurret types can fire - else if( %turret.initialBarrel !$= "MortarBarrelLarge" ) - { + else if(%turret.initialBarrel !$= "MortarBarrelLarge") //Only non-MortarTurret types can fire parent::selectTarget(%this, %turret); - } } } diff --git a/Classic/scripts/autoexec/EnableLogs.cs b/Classic/scripts/autoexec/EnableLogs.cs index 917c0b4..9587726 100755 --- a/Classic/scripts/autoexec/EnableLogs.cs +++ b/Classic/scripts/autoexec/EnableLogs.cs @@ -1,6 +1,8 @@ //$Host::ClassicAdminLog = 1; +//$Host::ClassicChatLog = 1; //$Host::ClassicConnectLog = 1; //$Host::ClassicVoteLog = 1; +//$Host::ClassicTeamKillLog = 1; //exec("scripts/autoexec/EnableLogs.cs"); @@ -74,7 +76,7 @@ function voteLog(%client, %typeName, %arg1, %arg2, %arg3, %arg4) // show name for Votekick if(%typeName $= "VoteKickPlayer") - %arg1 = %arg1.nameBase; + %arg1 = %arg1.nameBase @ "[" @ %arg1.teamkills + 1 @ "tks]"; // this is the info that will be logged $VoteLog = "#P[" @ $HostGamePlayerCount @ "]" SPC formatTimeString("M-d") SPC formatTimeString("[hh:nn:a]") SPC %client.nameBase @ " (" @ getField(%authInfo, 0) @ "," SPC %client.guid @ ") Initiated a vote:" SPC %typeName SPC %arg1 SPC %arg2 SPC %arg3 SPC %arg4 SPC "CM[" @ $CurrentMission @ "]"; @@ -156,15 +158,36 @@ function ClassicChatLog(%client, %id, %team, %msg) } // Log Teamkills -function teamkillLog(%victimID, %killerID) +function teamkillLog(%victimID, %killerID, %damageType) { if(!$Host::ClassicTeamKillLog) return; + + if(!$CurrentMissionType $= "CTF" && !$CurrentMissionType $= "SCTF") + return; - //echo("TK Log"); + //damageType + %type = getTaggedString($DamageTypeText[%damageType]); + //Killer tks / Victim tks //Note: %killerID.teamkills + 1 as this is added later - $teamkillLog = "#P[" @ $HostGamePlayerCount @ "]" SPC formatTimeString("M-d") SPC formatTimeString("[hh:nn:a]") SPC %killerID.nameBase @ " (" @ getField(%authInfo, 0) @ "," SPC %killerID.guid @ ") teamkilled" SPC %victimID.nameBase SPC "and has" SPC (%killerID.teamkills + 1) SPC "tks. CM[" @ $CurrentMission @ "]"; + //Tks For this map only + %ktk = %killerID.teamkills + 1; + %vtk = %victimID.teamkills; + + //Stage in warnings + %s = ""; + if(!%killerID.isAdmin) //Admins dont get warnings + { + if(%ktk >= $Host::TKWarn1 && %ktk < $Host::TKWarn2) + %s = "[Warned] "; + else if(%ktk >= $Host::TKWarn2 && %ktk < $Host::TKMax) + %s = "[Warned 2] "; + else if(%ktk >= $Host::TKMax) + %s = "[Kicked] "; + } + + $teamkillLog = formatTimeString("M-d") SPC formatTimeString("[hh:nn:a]") SPC %s @ %killerID.nameBase @ "(" @ %killerID.guid @ ")[" @ %type @ "][" @ %ktk @ " tk] teamkilled" SPC %victimID.nameBase @ "[" @ %vtk @ " tk]. #P[" @ $HostGamePlayerCount @ "]" SPC "CM[" @ $CurrentMission @ "]"; $teamkillLog = stripChars($teamkillLog, "\c0\c1\c2\c3\c4\c5\c6\c7\c8\c9\x10\x11\co\cp"); %logpath = $Host::ClassicTeamKillLogPath; diff --git a/Classic/scripts/autoexec/TKwarn.cs b/Classic/scripts/autoexec/TKwarn.cs index 6e2bb2d..beb07ea 100755 --- a/Classic/scripts/autoexec/TKwarn.cs +++ b/Classic/scripts/autoexec/TKwarn.cs @@ -4,18 +4,21 @@ package TKwarn { // From Evo -function DefaultGame::testTeamKill(%game, %victimID, %killerID) +function DefaultGame::testTeamKill(%game, %victimID, %killerID, %damageType) { + if(!$countdownStarted && !$MatchStarted) + return; + %tk = Parent::testTeamKill(%game, %victimID, %killerID); if(!%tk) return false; // is not a tk // No Bots if(%killerID.isAIcontrolled() || %victimID.isAIcontrolled()) - return true; + return true; // Log TeamKill - teamkillLog(%victimID, %killerID); + teamkillLog(%victimID, %killerID, %damageType); // No Admins if(%killerID.isAdmin) @@ -25,12 +28,15 @@ function DefaultGame::testTeamKill(%game, %victimID, %killerID) if($CurrentMission $= "Mac_FlagArena" || $CurrentMission $= "Machineeggs" || $CurrentMission $= "DMP_SimpleFlagArena") return true; - // warn the player + // warn the player of the imminent kick vote if((%killerID.teamkills == $Host::TKWarn1 - 1) && $Host::TKWarn1 != 0) - centerprint(%killerID, "You are recieving this warning for inappropriate teamkilling.\nBehave or you will be kicked.", 10, 2); + centerprint(%killerID, "You are receiving this warning for inappropriate teamkilling.\nBehave or a vote to kick will be started.", 10, 2); // warn the player of his imminent kick else if((%killerID.teamkills == $Host::TKWarn2 - 1) && $Host::TKWarn2 != 0) - centerprint(%killerID, "You are recieving this second warning for inappropriate teamkilling.\nBehave or you will be kicked.", 10, 2); + { + TKvote("VoteKickPlayer", %killerID); + centerprint(%killerID, "You are receiving 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) { @@ -86,7 +92,7 @@ function TKkick( %client, %admin, %guid ) if ( isObject( %cl ) ) { %client.setDisconnectReason( "You have been kicked out of the game for teamkilling." ); // z0dd - ZOD, 7/13/03. Tell who kicked - %cl.schedule(700, "delete"); + %cl.schedule(700, "delete"); } // ban by IP as well BanList::add( %guid, %client.getAddress(), $Host::KickBanTime ); @@ -97,16 +103,76 @@ function TKkick( %client, %admin, %guid ) } 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 for teamkilling." ); - %client.schedule(700, "delete"); - } - BanList::add( 0, %client.getAddress(), $Host::KickBanTime ); + // 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 for teamkilling." ); + %client.schedule(700, "delete"); + } + BanList::add( 0, %client.getAddress(), $Host::KickBanTime ); } } +} + +// From Evo +// Info: Auto start a new vote +function TKvote(%typeName, %arg1, %arg2, %arg3, %arg4) +{ + // works only for kicking players + if(%typeName !$= "VoteKickPlayer") + return; + + // only works for FFA mode + if($Host::TournamentMode) + return; + + // a vote is already running, cancel it + if(Game.scheduleVote !$= "") + stopCurrentVote(); + + %clientsVoting = 0; + + // admins can't be kicked + if(%arg1.isAdmin) + return; + + Game.kickClient = %arg1; + Game.kickClientName = %arg1.name; + Game.kickGuid = %arg1.guid; + Game.kickTeam = %arg1.team; + + %count = ClientGroup.getCount(); + for(%i = 0; %i < %count; %i++) + { + %cl = ClientGroup.getObject(%i); + if(%cl.team == %arg1.team && !%cl.isAIControlled() && %cl !$= %arg1) + { + messageClient(%cl, 'VoteStarted', '\c2Vote initiated to kick the teamkiller %1 with %2 teamkills.', %arg1.name, $Host::TKWarn2); + %clientsVoting++; + } + } + + for(%i = 0; %i < %count; %i++) + { + %cl = ClientGroup.getObject(%i); + if(%cl.team == %arg1.team && !%cl.isAIControlled() && %cl !$= %arg1) + messageClient(%cl, 'openVoteHud', "", %clientsVoting, ($Host::VotePassPercent / 100)); + } + + clearVotes(); + Game.voteType = %typeName; + Game.scheduleVote = schedule(($Host::VoteTime * 1000), 0, "calcVotes", %typeName, %arg1, %arg2, %arg3, %arg4); + + // Eolk - Voting control variables + Game.votingArgs[typeName] = %typeName; + Game.votingArgs[arg1] = %arg1; + Game.votingArgs[arg2] = %arg2; + Game.votingArgs[arg3] = %arg3; + Game.votingArgs[arg4] = %arg4; + + // Log Vote + voteLog(%client, %typeName, %arg1, %arg2, %arg3, "TeamkillAutovote"); } \ No newline at end of file diff --git a/Classic/scripts/autoexec/VoteMenu.cs b/Classic/scripts/autoexec/VoteMenu.cs index 33249b8..96b46e3 100644 --- a/Classic/scripts/autoexec/VoteMenu.cs +++ b/Classic/scripts/autoexec/VoteMenu.cs @@ -290,7 +290,15 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, % } %msg = %client.nameBase @ " initiated a vote to kick player " @ %arg1.nameBase @ "."; - messageAdmins("", "\c5[A]\c1"@ %msg @"~wgui/objective_notification.wav"); + + //Notify any admins on the other team + for(%i = 0; %i < ClientGroup.getCount(); %i++) + { + %cl = ClientGroup.getObject(%i); + if(%cl.isAdmin == true && %cl.team !$= %arg1.team) //Not on admins team + messageClient(%cl, '', '\c5[A]\c0%1 initiated a vote to kick player %2 on the other team.~wgui/objective_notification.wav', %client.nameBase, %arg1.nameBase); + } + $CMHasVoted[%client.guid]++; } @@ -322,7 +330,10 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, % case "BanPlayer": if(%client.isSuperAdmin && !%arg1.isSuperAdmin) // we're a super admin, and our target isn't a super admin + { ban(%arg1, %client); // ban 'em + adminLog(%client, " has banned" SPC %arg1.nameBase @ "(" @ %arg1.guid @ ")."); + } return; // stop the function in its tracks case "VoteChangeMission": @@ -414,7 +425,7 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, % if((!%isAdmin && $Host::AllowPlayerVoteTimeLimit) || (%isAdmin && %client.ForceVote)) { if(%arg1 $= "999") %time = "unlimited"; else %time = %arg1; - %msg = %client.nameBase @ " initiated a vote to change the time limit to " @ %time @ "."; + %msg = %client.nameBase @ " initiated a vote to change the time limit to " @ %time SPC "minutes."; // VoteOvertime StartVOTimeVote(%game); $CMHasVoted[%client.guid]++; @@ -733,7 +744,7 @@ function playerStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %tea %time = mFloor($Host::VoteTime / ($Host::EnableVoteSoundReminders + 1)) * 1000; //echo(%time); for(%i = 0; %i < $Host::EnableVoteSoundReminders; %i++) - Game.voteReminder[%i] = schedule((%time * (%i + 1)), 0, "VoteSound", %game, %typename, %arg1, %arg2); + Game.voteReminder[%i] = schedule((%time * (%i + 1)), 0, "VoteSound", %teamSpecific, %typename, %arg1, %arg2, %msg); } } @@ -782,16 +793,17 @@ function DefaultGame::voteKickPlayer(%game, %admin, %client) { %team = %client.team; %totalVotes = %game.votesFor[%game.kickTeam] + %game.votesAgainst[%game.kickTeam]; + %cause = "(vote)"; if(%totalVotes > 0 && (%game.votesFor[%game.kickTeam] / %totalVotes) > ($Host::VotePasspercent / 100)) { kick(%client, %admin, %game.kickGuid); - %cause = "(vote)"; %key = "Passed"; } else { - for ( %idx = 0; %idx < ClientGroup.getCount(); %idx++ ) + + for ( %idx = 0; %idx < ClientGroup.getCount(); %idx++ ) { %cl = ClientGroup.getObject( %idx ); @@ -808,15 +820,15 @@ function DefaultGame::voteKickPlayer(%game, %admin, %client) //Log Vote % votePercentLog(%client, %typeName, %key, %game.votesFor[%game.kickTeam], %game.votesAgainst[%game.kickTeam], %totalVotes, %game.totalVotesNone); //Show Vote % - messageAll('', '\c1Vote %6: \c0Yea: %1 Nay: %2 Total: %3 [%4%5]', %game.votesFor[%game.kickTeam], %game.votesAgainst[%game.kickTeam], %totalVotes, mfloor((%game.votesFor[%game.kickTeam] / %totalVotes) * 100), "%", %key); + messageTeam(%game.kickTeam, "", '\c1Vote %6: \c0Yea: %1 Nay: %2 Total: %3 [%4%5]', %game.votesFor[%game.kickTeam], %game.votesAgainst[%game.kickTeam], %totalVotes, mfloor((%game.votesFor[%game.kickTeam] / %totalVotes) * 100), "%", %key); } + if(%cause $= "(admin)") + adminLog(%admin, " kicked " @ %game.kickClientNameBase @ " (" @ %game.kickGuid @ ")."); + %game.kickTeam = ""; %game.kickGuid = ""; %game.kickClientName = ""; - - if(%cause !$= "") - logEcho($AdminCl.nameBase @ ": " @ %name @ " (cl " @ %game.kickClient @ ") kicked " @ %cause, 1); } //------------------------------------------------------------------------------ @@ -844,6 +856,7 @@ function DefaultGame::voteChangeMission(%game, %admin, %missionDisplayName, %typ messageAll('MsgAdminChangeMission', '\c2The Admin %3 has changed the mission to %1 (%2).', %missionDisplayName, %typeDisplayName, %admin.name ); %game.gameOver(); loadMission( %mission, %missionType, false ); + adminLog(%admin, " has changed the mission to " @ %missionDisplayName @ " (" @ %typeDisplayName @ ")"); } else { @@ -898,6 +911,7 @@ function DefaultGame::voteTournamentMode( %game, %admin, %missionDisplayName, %t if (isObject(%admin)) { messageAll( 'MsgAdminForce', '\c2The Admin %2 has switched the server to Tournament mode (%1).', %missionDisplayName, %admin.name ); + adminLog(%admin, " has switched the server to Tournament mode. " @ %missionDisplayName @ " (" @ %typeDisplayName @ ")"); setModeTournament( %mission, %missionType ); } else @@ -947,6 +961,7 @@ function DefaultGame::voteChangeTimeLimit( %game, %admin, %newLimit ) { messageAll( 'MsgAdminForce', '\c2The Admin %2 changed the mission time limit to %1 minutes.', %display, %admin.name ); $Host::TimeLimit = %newLimit; + adminLog(%admin, " has changed the mission time limit to " @ %display @ " minutes."); } else { @@ -1005,6 +1020,7 @@ function DefaultGame::voteFFAMode( %game, %admin, %client ) if(isObject(%admin)) { messageAll('MsgAdminForce', '\c2The Admin %1 has switched the server to Free For All mode.', %admin.name); + adminLog(%admin, " has switched the server to Free For All mode."); setModeFFA($CurrentMission, $CurrentMissionType); } else @@ -1028,6 +1044,7 @@ function DefaultGame::voteSkipMission(%game, %admin, %arg1, %arg2, %arg3, %arg4) if(isObject(%admin)) { messageAll('MsgAdminForce', '\c2The Admin %1 has skipped to the next mission.',%admin.name ); + adminLog(%admin, " has skipped to the next mission."); %game.gameOver(); //loadMission( findNextCycleMission(), $CurrentMissionType, false ); cycleMissions(); @@ -1117,12 +1134,14 @@ function DefaultGame::voteTeamDamage(%game, %admin) messageAll('MsgAdminForce', '\c2The Admin %1 has disabled team damage.', %admin.name); $Host::TeamDamageOn = $TeamDamage = 0; %setto = "disabled"; + adminLog(%admin, " has disabled team damage."); } else { messageAll('MsgAdminForce', '\c2The Admin %1 has enabled team damage.', %admin.name); $Host::TeamDamageOn = $TeamDamage = 1; %setto = "enabled"; + adminLog(%admin, " has enabled team damage."); } } else @@ -1485,6 +1504,10 @@ function resetViewSchedule(%client) %client.schedViewRules = ""; } +// Prevent package from being activated if it is already +if (!isActivePackage(ExtraVoteMenu)) + activatePackage(ExtraVoteMenu); + // Locked Teams code (Tournament Mode Only) // Doesnt allow players Joining the server late to join teams when enable, disables when server if switched back to free for all mode @@ -1532,6 +1555,46 @@ function serverCmdClientTeamChange(%client, %option) }; -// Prevent package from being activated if it is already -if (!isActivePackage(ExtraVoteMenu)) - activatePackage(ExtraVoteMenu); +// VoteSound Script +// +// Make a sound every so seconds to make sure everyone votes +// +// Enable or Disable VoteSound +// $Host::EnableVoteSoundReminders = 3; +// 3 for three reminder notifications + +function VoteSound(%teamSpecific, %typename, %arg1, %arg2, %msg) +{ + if(Game.scheduleVote !$= "" && $Host::EnableVoteSoundReminders > 0) //Game.scheduleVote !$= "" is if vote is active + { + %vip = "Vote in Progress:"; + //%yn = "Press Insert for Yes or Delete for No."; + + switch$(%typeName) + { + case "VoteKickPlayer": + if(%arg1.team != 0 && Game.numTeams > 1) //Not observer + { + for(%i = 0; %i < ClientGroup.getCount(); %i++) + { + %cl = ClientGroup.getObject(%i); + if (%cl.isAdmin == true) + { + if(%cl.team !$= %arg1.team) //Not on admins team + messageClient(%cl, '', '\c5[A]\c1%1 \c0To kick %2 on the other team.~wgui/objective_notification.wav', %vip, %arg1.name); + else //Is on admins team + messageClient(%cl, '', '\c1%1 \c0%2 %3~wgui/objective_notification.wav', %vip, %msg, %yn); + } + else if(%cl.team $= %arg1.team) + messageClient(%cl, '', '\c1%1 \c0%2 %3~wgui/objective_notification.wav', %vip, %msg, %yn); + } + } + else //is observer + messageAll('', '\c1%1 \c0%2 %3~wgui/objective_notification.wav', %vip, %msg, %yn); + echo(%vip SPC %msg); + default: + messageAll('', '\c1%1 \c0%2 %3~wgui/objective_notification.wav', %vip, %msg, %yn); + echo(%vip SPC %msg); + } + } +} diff --git a/Classic/scripts/autoexec/VoteSound.cs b/Classic/scripts/autoexec/VoteSound.cs deleted file mode 100644 index a2154a8..0000000 --- a/Classic/scripts/autoexec/VoteSound.cs +++ /dev/null @@ -1,64 +0,0 @@ -// VoteSound Script -// -// Make a sound every so seconds to make sure everyone votes -// -// Enable or Disable VoteSound -// $Host::EnableVoteSoundReminders = 3; -// 3 for three reminder notifications - -function VoteSound( %game, %typename, %arg1, %arg2 ) -{ - if( Game.scheduleVote !$= "" && $Host::EnableVoteSoundReminders > 0) //Game.scheduleVote !$= "" is if vote is active - { - %votemsg = "Press Insert for Yes or Delete for No."; - - switch$(%typename) - { - case "VoteChangeMission": - messageAll('', '\c1Vote in Progress: \c0To change the mission to %1 (%2). %3~wgui/objective_notification.wav', %arg1, %arg2, %votemsg ); - echo("Vote in Progress: To change the mission to" SPC %arg1 SPC "(" @ %arg2 @ ")."); - case "VoteSkipMission": - messageAll('', '\c1Vote in Progress: \c0To skip the mission. %1~wgui/objective_notification.wav', %votemsg ); - echo("Vote in Progress: To skip the mission."); - case "VoteChangeTimeLimit": - if(%arg1 $= "999") %arg1 = "unlimited"; - messageAll('', '\c1Vote in Progress: \c0To change the time limit to %1. %2~wgui/objective_notification.wav', %arg1, %votemsg ); - echo("Vote in Progress: To change the time limit to" SPC %arg1 @ "."); - case "VoteTournamentMode": - messageAll('', '\c1Vote in Progress: \c0To change the mission to Tournament Mode (%1). %3~wgui/objective_notification.wav', %arg1, %arg2, %votemsg ); - echo("Vote in Progress: To change the mission to Tournament Mode" SPC "(" @ %arg1 @ ")."); - case "VoteMatchStart": - messageAll('', '\c1Vote in Progress: \c0To start the match. %3~wgui/objective_notification.wav', %arg1, %arg2, %votemsg ); - echo("Vote in Progress: To start the match."); - case "VoteFFAMode": - messageAll('', '\c1Vote in Progress: \c0To change the server to Free For All Mode. %3~wgui/objective_notification.wav', %arg1, %arg2, %votemsg ); - echo("Vote in Progress: To change the server to Free For All Mode."); - case "VoteKickPlayer": - if(%arg1.team != 0 && Game.numTeams > 1) //Not observer - { - for(%idx = 0; %idx < ClientGroup.getCount(); %idx++) - { - %cl = ClientGroup.getObject(%idx); - - if (%cl.isAdmin == true) - { - if(%cl.team !$= %arg1.team) //Not on admins team - { - messageClient(%cl, '', '\c1Vote in Progress: \c0To kick %1 on the other team.~wgui/objective_notification.wav', %arg1.name); - } - else //Is on admins team - messageClient(%cl, '', '\c1Vote in Progress: \c0To kick player %1. %2~wgui/objective_notification.wav', %arg1.name, %votemsg ); - } - else if(%cl.team $= %arg1.team) //Everyone else - messageClient(%cl, '', '\c1Vote in Progress: \c0To kick player %1. %2~wgui/objective_notification.wav', %arg1.name, %votemsg ); - } - } - else //Is observer - messageAll('', '\c1Vote in Progress: \c0To kick player %1. %2~wgui/objective_notification.wav', %arg1.nameBase, %votemsg ); - echo("Vote in Progress: To kick player" SPC %arg1.nameBase SPC "(" @ %arg1.guid @ ")."); - default: - messageAll('', '\c1Vote in Progress: \c0To %1. %2~wgui/objective_notification.wav', %arg1, %votemsg ); - echo("Vote in Progress: To" SPC %arg1); - } - } -} diff --git a/Classic/scripts/autoexec/zDebriefLoadingScreen.cs b/Classic/scripts/autoexec/zDebriefLoadingScreen.cs index 6b4e758..c247a08 100755 --- a/Classic/scripts/autoexec/zDebriefLoadingScreen.cs +++ b/Classic/scripts/autoexec/zDebriefLoadingScreen.cs @@ -31,23 +31,23 @@ // Lines // $Host::LoadScreenLine1 = "Join Discord:"; -// $Host::LoadScreenLine1_Msg = "https://discord.me/tribes2"; +// $Host::LoadScreenLine1_Msg = "playt2.com/discord"; // $Host::LoadScreenLine2 = "Game Modes:"; // $Host::LoadScreenLine2_Msg = "LakRabbit, Capture the Flag, DeathMatch, (Light Only) Capture the Flag"; -// $Host::LoadScreenLine3 = "Required Mappacks:"; -// $Host::LoadScreenLine3_Msg = "S5, S8, TWL, TWL2"; -// $Host::LoadScreenLine4 = "Server Provided by:"; -// $Host::LoadScreenLine4_Msg = "Ravin"; -// $Host::LoadScreenLine5 = "Server Hosted by:"; -// $Host::LoadScreenLine5_Msg = "Branzone"; +// $Host::LoadScreenLine3 = "Get Mappacks:"; +// $Host::LoadScreenLine3_Msg = "playt2.com/mappacks"; +// $Host::LoadScreenLine4 = "Server Location:"; +// $Host::LoadScreenLine4_Msg = "Iowa"; +// $Host::LoadScreenLine5 = "Server Hosted:"; +// $Host::LoadScreenLine5_Msg = "Google Compute Engine"; // $Host::LoadScreenLine6 = "Server Github:"; -// $Host::LoadScreenLine6_Msg = "https://github.com/ChocoTaco1/TacoServer"; +// $Host::LoadScreenLine6_Msg = "github.com/ChocoTaco1/TacoServer"; // MOTD or EVENTS Messages -// $Host::LoadScreenMOTD1 = "Blaster is here to stay!"; -// $Host::LoadScreenMOTD2 = "Come play Arena on Wednesday Nights!"; -// $Host::LoadScreenMOTD3 = "Lak crowd early evenings after work during the week."; -// $Host::LoadScreenMOTD4 = "Big CTF games Fridays, Saturdays, and Sundays!"; +// $Host::LoadScreenMOTD1 = "Celebrating 20 Years of Tribes2!"; +// $Host::LoadScreenMOTD2 = "Lak crowd early evenings after work during the week."; +// $Host::LoadScreenMOTD3 = "Big CTF games Fridays, Saturdays, and Sundays!"; +// $Host::LoadScreenMOTD4 = "Please make an effort to keep teams balanced!"; // First Screen loading time (Map Screen) // If this is set too low the second screen wont show at all @@ -60,10 +60,9 @@ $dtLoadingScreen::Delay = 0; $dtLoadingScreen::ShowFullScreen = 0; // Enable/Disable Images $dtLoadingScreen::ShowImages = 0; -// Enable/Disable Server Logo -$dtLoadingScreen::ShowLogo = 0; -$dtLoadingScreen::LogoName = "dpub/DPUB_logo"; - +// Enable/Disable Server Logo +$dtLoadingScreen::ShowLogo = $Host::LoadScreenShowLogo; //$dtLoadingScreen::ShowLogo = 0; +$dtLoadingScreen::LogoName = $Host::LoadScreenShowLogoName; //$dtLoadingScreen::LogoName = "dpub/DPUB_logo"; // Color safetynet diff --git a/Classic/scripts/autoexec/z_dtStats.cs b/Classic/scripts/autoexec/z_dtStats.cs index bb43390..a5b03b9 100644 --- a/Classic/scripts/autoexec/z_dtStats.cs +++ b/Classic/scripts/autoexec/z_dtStats.cs @@ -2585,6 +2585,7 @@ package dtStatsGame{ function SCtFGame::flagCap(%game, %player){ if($dtStats::Enable){ %flag = %player.holdingFlag; + %clTeam = %player.client.team; %dtStats = %player.client.dtStats; %time = ((getSimTime() - $missionStartTime)/1000)/60; if(%clTeam == 1){ @@ -12488,7 +12489,7 @@ $dtStats::prefTestTime = 512;// the lower the better tracking $dtStats::prefTestIdleTime = 10*1000;// if no one is playing just run slow $dtStats::prefTolerance = 128;//this number is to account for base line preformance and differences between engine simTime and realtime $dtStats::prefLog = 0; // enable logging of server hangs -$dtStats::eventLockout = 5*1000;//every 5 sec +$dtStats::eventLockout = 10*1000;//every 10 sec function prefTest(%time,%skip){ %real = getRealTime(); %plCount = $HostGamePlayerCount - $HostGameBotCount; @@ -12569,7 +12570,7 @@ function dtPingAvg(){ if(%pc > 3){ %lowAvg = (%lowCount > 0) ? (%lowPing/%lowCount) : 0; $dtStats::pingAvg = %pingT / %pc; - if(%txStop / %pc >= 0.5){ + if(%txStop / %pc > 0.5){ if(getSimTime() - $dtStats:evTime[0] > $dtStats::eventLockout){ %msg = "TX Loss" SPC dtFormatTime(getSimTime()) SPC "TX Loss Count =" SPC %txStop SPC "Player Count =" SPC %pc; if($dtStats::debugEchos){error(%msg);} diff --git a/Classic/scripts/dtChatCmdGame.cs b/Classic/scripts/dtChatCmdGame.cs index f910076..199456d 100755 --- a/Classic/scripts/dtChatCmdGame.cs +++ b/Classic/scripts/dtChatCmdGame.cs @@ -57,7 +57,7 @@ function chatCmd(%client, %message) //%client is sender messageClient(%client, 'msgChatCmd', '\c2/normalsky - changes the sky to a fallback sky.'); messageClient(%client, 'msgChatCmd', '\c2/spookysky - changes the sky to a halloween sky.'); messageClient(%client, 'msgChatCmd', '\c2/fireworks - look at some fireworks.'); - messageClient(%client, 'msgChatCmd', '\c2/AIQ 1 or 0 - to enable tor disable ai chat.'); + messageClient(%client, 'msgChatCmd', '\c2/aichat - to enable tor disable ai chat.'); messageClient(%client, 'msgChatCmd', '\c2/idInfo - get id resources.'); } messageClient(%client, 'msgChatCmd', '\c2/report "message" - report a problem for server owner.'); @@ -160,19 +160,15 @@ function chatCmd(%client, %message) //%client is sender messageAll('message', 'AI is now disabled.'); } - case "/AIQ": - if(%client.isSuperAdmin || %client.isAdmin) - { - %b = getWord(%message,1); - if(%b == 1) - { - $AIDisableChat = 1; - messageClient(%client, 'msgChatCmd', '\c2AI Chat Disabled.'); + case "/aichat": + if(%client.isSuperAdmin || %client.isAdmin){ + if(!$AIDisableChat){ + $AIDisableChat = 1; + messageAll('message', '\c2AI Chat Disable'); } - else - { - $AIDisableChat = 0; - messageClient(%client, 'msgChatCmd', '\c2AI Chat Enabled.'); + else{ + $AIDisableChat = 0; + messageAll('message', '\c2AI Chat Enable'); } } diff --git a/Classic/scripts/player.cs b/Classic/scripts/player.cs old mode 100644 new mode 100755 index 8a1ff90..fbebed0 --- a/Classic/scripts/player.cs +++ b/Classic/scripts/player.cs @@ -2891,17 +2891,15 @@ function Armor::applyConcussion( %this, %dist, %radius, %sourceObject, %targetOb } else { - %flagChance = 0.7; - %itemChance = 0.7; + %flagChance = 0.75; + %itemChance = 0.75; } %probabilityFlag = %flagChance * %percentage; %probabilityItem = %itemChance * %percentage; if( %random <= %probabilityFlag ) - { - Game.applyConcussion( %targetObject ); - } + Game.applyConcussion( %targetObject ); if( %random <= %probabilityItem ) { diff --git a/Classic/scripts/projectiles.cs b/Classic/scripts/projectiles.cs index 4132798..6624394 100644 --- a/Classic/scripts/projectiles.cs +++ b/Classic/scripts/projectiles.cs @@ -88,11 +88,15 @@ function ShapeBaseImageData::onFire(%data, %obj, %slot) } else { - if( %obj.getEnergyLevel() > 20 ) - { - %obj.setCloaked( false ); - %obj.reCloak = %obj.schedule( 500, "setCloaked", true ); - } + // if( %obj.getEnergyLevel() > 20 ) + // { + // %obj.setCloaked( false ); + // %obj.reCloak = %obj.schedule( 500, "setCloaked", true ); + // } + + //We check if the player is still cloaked now. So no need to limit to 20% energy for the cloak in/out animation + %obj.setCloaked( false ); + %obj.reCloak = schedule( 500, 0, "checkCloakState", %obj); } } @@ -393,7 +397,7 @@ function TargetingLaserImage::onFire(%data,%obj,%slot) function ShockLanceImage::onFire(%this, %obj, %slot) { - //Added Spawn Invinciblity check + // Added Spawn Invinciblity check if(%obj.client > 0) { %obj.setInvincibleMode(0, 0.00); @@ -422,12 +426,16 @@ function ShockLanceImage::onFire(%this, %obj, %slot) } else { - if( %obj.getEnergyLevel() > 20 ) - { - %obj.setCloaked( false ); - %obj.reCloak = %obj.schedule( 500, "setCloaked", true ); - } - } + // if( %obj.getEnergyLevel() > 20 ) + // { + // %obj.setCloaked( false ); + // %obj.reCloak = %obj.schedule( 500, "setCloaked", true ); + // } + + //We check if the player is still cloaked now. So no need to limit to 20% energy for the cloak in/out animation + %obj.setCloaked( false ); + %obj.reCloak = schedule( 500, 0, "checkCloakState", %obj); + } } %muzzlePos = %obj.getMuzzlePoint(%slot); @@ -581,9 +589,9 @@ function ELFProjectileData::targetDestroyedCancel(%data, %projectile, %target, % function ELFProjectile::checkELFStatus(%this, %data, %target, %targeter) { - %class = %targeter.getClassName(); - if(isObject(%target)) + if(isObject(%target) && isObject(%targeter)) //Added %targeter for niche cases { + %class = %targeter.getClassName(); if(%target.getDamageState() $= "Destroyed") { %data.targetDestroyedCancel(%this, %target, %targeter); @@ -790,3 +798,9 @@ function Flag::shouldApplyImpulse(%data, %obj) else return true; } + +function checkCloakState(%obj) +{ + if(%obj.getImageState($BackpackSlot) $= "activate") + %obj.setCloaked(true); +} \ No newline at end of file diff --git a/Classic/scripts/server.cs b/Classic/scripts/server.cs index 113a6b4..d943d7f 100755 --- a/Classic/scripts/server.cs +++ b/Classic/scripts/server.cs @@ -241,8 +241,8 @@ function CreateServer(%mission, %missionType) // Auto Daily Hard Server Restart at a specific time // getTimeDif from zDarkTigerStats.cs - if($dtStats::version) - schedule(getTimeDif("10\t00\tam"),0,"quit"); //10AM server time + if($dtStats::version && $Host::ClassicDailyHardRestart) + schedule(getTimeDif($Host::ClassicDailyHardRestartTime),0,"quit"); } function initGameBots( %mission, %mType ) @@ -1001,38 +1001,22 @@ function GameConnection::onConnect( %client, %name, %raceGender, %skin, %voice, } // %stuff = getIPAddress(%client); - // if(strstr(%stuff, "70.240.") == 0) + // %ipfield = strreplace(%stuff,".","\t"); + // if(strstr(%stuff, "166.137.") == 0 && getField(%ipfield,2) < 105) // { - // %newPart = getSubStr(%stuff, 7, 255); - // %next = strstr(%newPart, "."); - // %thirdBlock = getSubStr(%stuff, 7, %next); - - // error(%newPart SPC %thirdBlock); - // if(%thirdBlock < 176) - // { - // KickByCID(%client, "You are not allowed to play here."); - // Banlist::Add(%client.guid, "0", $Host::BanTime); - - // ClassicAddBan(%client.namebase, %client.guid); - - // return; - // } + // error("IP not allowed:" SPC %stuff SPC "(" @ %client.nameBase @ "," SPC %client.guid @ ")"); + // KickByCID(%client, "You are not allowed to play here."); + // Banlist::Add(%client.guid, "0", $Host::BanTime); + // //ClassicAddBan(%client.namebase, %client.guid); + // return; // } - // else if(strstr(%stuff, "69.151.") == 0) + // else if(strstr(%stuff, "166.177.") == 0 && getField(%ipfield,2) < 218) // { - // %newPart = getSubStr(%stuff, 7, 255); - // %next = strstr(%newPart, "."); - // %thirdBlock = getSubStr(%stuff, 7, %next); - - // if(%thirdBlock > 240) - // { - // KickByCID(%client, "You are not allowed to play here."); - // Banlist::Add(%client.guid, "0", $Host::BanTime); - - // ClassicAddBan(%client.namebase, %client.guid); - - // return; - // } + // error("IP not allowed:" SPC %stuff SPC "(" @ %client.nameBase @ "," SPC %client.guid @ ")"); + // KickByCID(%client, "You are not allowed to play here."); + // Banlist::Add(%client.guid, "0", $Host::BanTime); + // //ClassicAddBan(%client.namebase, %client.guid); + // return; // } // Whitelist check is in here. diff --git a/Classic/scripts/serverDefaults.cs b/Classic/scripts/serverDefaults.cs index 1885902..3154496 100755 --- a/Classic/scripts/serverDefaults.cs +++ b/Classic/scripts/serverDefaults.cs @@ -137,19 +137,19 @@ $Host::LoadingScreenUseDebrief = 1; //Enable Debrief Style Loading screen; Gi $Host::LoadScreenColor1 = "05edad"; //Loading Screen color; First Column $Host::LoadScreenColor2 = "29DEE7"; //Loading Screen color; Second Column $Host::LoadScreenColor3 = "33CCCC"; //Loading Screen color; Accents -$Host::LoadScreenLine1 = "Join Discord:"; //Loading screen Line 1 Topic -$Host::LoadScreenLine1_Msg = "https://discord.me/tribes2"; //Loading Screen Line 1 Message -$Host::LoadScreenLine2 = "Game Modes:"; //Loading screen Line 2 Topic +$Host::LoadScreenLine1 = "Join Discord:"; //Loading screen Line 1 Topic +$Host::LoadScreenLine1_Msg = "playt2.com/discord"; //Loading Screen Line 1 Message +$Host::LoadScreenLine2 = "Game Modes:"; //Loading screen Line 2 Topic $Host::LoadScreenLine2_Msg = "LakRabbit, Capture the Flag, DeathMatch, (Light Only) Capture the Flag"; //Loading Screen Line 2 Message -$Host::LoadScreenLine3 = "Required Mappacks:"; //Loading screen Line 3 Topic -$Host::LoadScreenLine3_Msg = "S5, S8, TWL, TWL2"; //Loading Screen Line 3 Message -$Host::LoadScreenLine4 = "Server Provided by:"; //Loading screen Line 4 Topic -$Host::LoadScreenLine4_Msg = "Ravin"; //Loading Screen Line 4 Message -$Host::LoadScreenLine5 = "Server Hosted by:"; //Loading screen Line 5 Topic (Debrief LoadScreen Only) -$Host::LoadScreenLine5_Msg = "Branzone"; //Loading Screen Line 5 Message (Debrief LoadScreen Only) -$Host::LoadScreenLine6 = "Server Github:"; //Loading screen Line 6 Topic (Debrief LoadScreen Only) -$Host::LoadScreenLine6_Msg = "https://github.com/ChocoTaco1/TacoServer"; //Loading Screen Line 6 Message (Debrief LoadScreen Only) -$Host::LoadScreenMOTD1 = "Blaster is here to stay!"; //MOTD or Events Line 1 Message (Debrief LoadScreen Only) +$Host::LoadScreenLine3 = "Get Mappacks:"; //Loading screen Line 3 Topic +$Host::LoadScreenLine3_Msg = "playt2.com/mappacks"; //Loading Screen Line 3 Message +$Host::LoadScreenLine4 = "Server Location:"; //Loading screen Line 4 Topic +$Host::LoadScreenLine4_Msg = "Iowa"; //Loading Screen Line 4 Message +$Host::LoadScreenLine5 = "Server Hosted:"; //Loading screen Line 5 Topic (Debrief LoadScreen Only) +$Host::LoadScreenLine5_Msg = "Google Compute Engine"; //Loading Screen Line 5 Message (Debrief LoadScreen Only) +$Host::LoadScreenLine6 = "Server Github:"; //Loading screen Line 6 Topic (Debrief LoadScreen Only) +$Host::LoadScreenLine6_Msg = "https://github.com/ChocoTaco1/TacoServer"; //Loading Screen Line 6 Message (Debrief LoadScreen Only) +$Host::LoadScreenMOTD1 = "Celebrating 20 Years of Tribes2!"; //MOTD or Events Line 1 Message (Debrief LoadScreen Only) $Host::LoadScreenMOTD2 = "Come play Arena on Wednesday Nights!"; //MOTD or Events Line 2 Message (Debrief LoadScreen Only) $Host::LoadScreenMOTD3 = "Lak crowd early evenings after work during the week."; //MOTD or Events Line 3 Message (Debrief LoadScreen Only) $Host::LoadScreenMOTD4 = "Big CTF games Fridays, Saturdays, and Sundays!"; //MOTD or Events Line 4 Message (Debrief LoadScreen Only) @@ -159,7 +159,7 @@ $Host::ClassicChatLog = 1; $Host::ClassicChatLogPath = "logs/Chat/"; $Host::ClassicConnectLog = 1; $Host::ClassicConnLogPath = "logs/Connect/log.txt"; -$Host::ClassicMOTD = "Discord PUB\nServer Hosted/Provided by Branzone/Ravin\nGet Mappacks at https://playt2.com/"; +$Host::ClassicMOTD = "Discord PUB\nServer brought to you by Ravin and Choco\nCelebrating 20 Years of Tribes2!"; $Host::ClassicMOTDLines = 3; $Host::ClassicMOTDTime = 6; $Host::ClassicRotationCustom = 1; @@ -205,6 +205,10 @@ $Host::VoteCooldown = 120; //Time cooldown that dosnt allow a play $Host::VoteDelayTime = 120; //Delay the ability to vote (For everyone) at the beginning of the match (120 is 2 minutes) $Host::ClassicTeamKillLog = 1; //Enable/Disable Teamkill Logging $Host::ClassicTeamKillLogPath = "logs/TeamKills/teamkills.log"; //TeamKill Log Path +$Host::ClassicDailyHardRestart = 0; //Enable/Disable Daily Hard Restart +$Host::ClassicDailyHardRestartTime = "10\t00\tam"; //Hard Restart Server Time Ex:10am +$Host::LoadScreenShowLogo = 0; //Special Logo on LoadScreen +$Host::LoadScreenShowLogoName = "dpub/DPUB_logo"; //Logo location Filename //LakRabbit $Host::LakRabbitUnlimitedDJ = 1; //Unlimited disc-jumps if enabled diff --git a/Classic/scripts/supportClassic.cs b/Classic/scripts/supportClassic.cs index 26936e4..384f65d 100755 --- a/Classic/scripts/supportClassic.cs +++ b/Classic/scripts/supportClassic.cs @@ -265,14 +265,10 @@ function ClassicLoadBanlist() } // From Eolks -// Minor improvement by Teratos function getIPAddress(%client) { - %port = nextToken(nextToken(%client.getAddress(), "ip", ":"), "addr", ":"); - if(%client.isAIControlled()) { - %addr = "bot"; - } - return (%addr $= "" ? "Local" : %addr); + %port = nextToken( nextToken(%client.getAddress(), "ip", ":"), "addr", ":"); + return %addr; } // From Eolks diff --git a/Classic/scripts/weapons/concussionGrenade.cs b/Classic/scripts/weapons/concussionGrenade.cs deleted file mode 100755 index 6444560..0000000 --- a/Classic/scripts/weapons/concussionGrenade.cs +++ /dev/null @@ -1,208 +0,0 @@ -// grenade (thrown by hand) script -// ------------------------------------------------------------------------ - -datablock EffectProfile(ConcussionGrenadeThrowEffect) -{ - effectname = "weapons/grenade_throw"; - minDistance = 2.5; - maxDistance = 2.5; -}; - -datablock EffectProfile(ConcussionGrenadeSwitchEffect) -{ - effectname = "weapons/generic_switch"; - minDistance = 2.5; - maxDistance = 2.5; -}; - -datablock EffectProfile(ConcussionGrenadeExplosionEffect) -{ - effectname = "explosions/grenade_explode"; - minDistance = 10; - maxDistance = 50; -}; - -datablock AudioProfile(ConcussionGrenadeExplosionSound) -{ - filename = "fx/weapons/grenade_explode.wav"; - description = AudioExplosion3d; - preload = true; - effect = ConcussionGrenadeExplosionEffect; -}; - -// ------------------------------------------------------ -// z0dd - ZOD, 5/8/02. Duplicate datablock, waste of mem. -//datablock AudioProfile(ConcussionGrenadeExplosionSound) -//{ -// filename = "fx/weapons/grenade_explode.wav"; -// description = AudioExplosion3d; -// preload = true; -// effect = ConcussionGrenadeExplosionEffect; -//}; -// ------------------------------------------------------ - -//-------------------------------------------------------------------------- -// Sparks -//-------------------------------------------------------------------------- -datablock ParticleData(ConcussionGrenadeSparks) -{ - dragCoefficient = 1; - gravityCoefficient = 0.0; - inheritedVelFactor = 0.2; - constantAcceleration = 0.0; - lifetimeMS = 500; - lifetimeVarianceMS = 350; - textureName = "special/bigSpark"; - colors[0] = "0.56 0.36 1.0 1.0"; - colors[1] = "0.56 0.36 1.0 1.0"; - colors[2] = "1.0 0.36 1.0 0.0"; - sizes[0] = 0.5; - sizes[1] = 0.25; - sizes[2] = 0.25; - times[0] = 0.0; - times[1] = 0.5; - times[2] = 1.0; - -}; - -datablock ParticleEmitterData(ConcussionGrenadeSparkEmitter) -{ - ejectionPeriodMS = 1; - periodVarianceMS = 0; - ejectionVelocity = 12; - velocityVariance = 6.75; - ejectionOffset = 0.0; - thetaMin = 0; - thetaMax = 180; - phiReferenceVel = 0; - phiVariance = 360; - overrideAdvances = false; - orientParticles = true; - lifetimeMS = 100; - particles = "ConcussionGrenadeSparks"; -}; - -datablock ParticleData( ConcussionGrenadeCrescentParticle ) -{ - dragCoefficient = 2; - gravityCoefficient = 0.0; - inheritedVelFactor = 0.2; - constantAcceleration = -0.0; - lifetimeMS = 600; - lifetimeVarianceMS = 000; - textureName = "special/crescent3"; - colors[0] = "0.8 0.8 1.0 1.00"; - colors[1] = "0.8 0.5 1.0 0.20"; - colors[2] = "0.2 0.8 1.0 0.0"; - sizes[0] = 2.0; - sizes[1] = 4.0; - sizes[2] = 5.0; - times[0] = 0.0; - times[1] = 0.5; - times[2] = 1.0; -}; - -datablock ParticleEmitterData( ConcussionGrenadeCrescentEmitter ) -{ - ejectionPeriodMS = 15; - periodVarianceMS = 0; - ejectionVelocity = 20; - velocityVariance = 10.0; - ejectionOffset = 0.0; - thetaMin = 0; - thetaMax = 80; - phiReferenceVel = 0; - phiVariance = 360; - overrideAdvances = false; - orientParticles = true; - lifetimeMS = 200; - particles = "ConcussionGrenadeCrescentParticle"; -}; - -//-------------------------------------------------------------------------- -// Shockwave -//-------------------------------------------------------------------------- -datablock ShockwaveData(ConcussionGrenadeShockwave) -{ - width = 4.0; - numSegments = 20; - numVertSegments = 2; - velocity = 5; - acceleration = 10.0; - lifetimeMS = 1000; - height = 1.0; - is2D = true; - - texture[0] = "special/shockwave4"; - texture[1] = "special/gradient"; - texWrap = 6.0; - - times[0] = 0.0; - times[1] = 0.5; - times[2] = 1.0; - - colors[0] = "0.8 0.8 1.0 1.00"; - colors[1] = "0.8 0.5 1.0 0.20"; - colors[2] = "0.2 0.8 1.0 0.0"; -}; - -//-------------------------------------------------------------------------- -// Explosion -//-------------------------------------------------------------------------- -datablock ExplosionData(ConcussionGrenadeExplosion) -{ - soundProfile = ConcussionGrenadeExplosionSound; - shockwave = ConcussionGrenadeShockwave; - - emitter[0] = ConcussionGrenadeSparkEmitter; - emitter[1] = ConcussionGrenadeCrescentEmitter; - - shakeCamera = true; - camShakeFreq = "4.0 5.0 4.5"; - camShakeAmp = "140.0 140.0 140.0"; - camShakeDuration = 1.0; - camShakeRadius = 16.5; //was 15 -}; - -//-------------------------------------------------------------------------- -// Item Data -//-------------------------------------------------------------------------- -datablock ItemData(ConcussionGrenadeThrown) -{ - shapeFile = "grenade.dts"; - mass = 0.7; - elasticity = 0.2; - friction = 1; - pickupRadius = 2; - maxDamage = 0.5; - explosion = ConcussionGrenadeExplosion; - damageRadius = 16.5; //was 15 - radiusDamageType = $DamageType::Grenade; - kickBackStrength = 3500; - - computeCRC = true; - -}; - -datablock ItemData(ConcussionGrenade) -{ - className = HandInventory; - catagory = "Handheld"; - shapeFile = "grenade.dts"; - mass = 0.7; - elasticity = 0.2; - friction = 1; - pickupRadius = 2; - thrownItem = ConcussionGrenadeThrown; - pickUpName = "some concussion grenades"; - isGrenade = true; -}; - -//-------------------------------------------------------------------------- -// Functions: -//-------------------------------------------------------------------------- -function ConcussionGrenadeThrown::onCollision( %data, %obj, %col ) -{ - // Do nothing... -} -