mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-04-26 14:05:25 +00:00
Made LCTF Gamemode
This commit is contained in:
parent
90bb6175dc
commit
0c3e7c9892
7 changed files with 2705 additions and 80 deletions
2524
Classic/scripts/LCTFGame.cs
Normal file
2524
Classic/scripts/LCTFGame.cs
Normal file
File diff suppressed because it is too large
Load diff
99
Classic/scripts/aiLCTF.cs
Normal file
99
Classic/scripts/aiLCTF.cs
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
//-----------------------------------------------
|
||||
// AI functions for Spawn CtF >> LCTF
|
||||
|
||||
function LCTFGame::onAIRespawn(%game, %client)
|
||||
{
|
||||
//add the default task
|
||||
if (! %client.defaultTasksAdded)
|
||||
{
|
||||
%client.defaultTasksAdded = true;
|
||||
%client.addTask(AIEngageTask);
|
||||
%client.addTask(AIPickupItemTask);
|
||||
%client.addTask(AITauntCorpseTask);
|
||||
%client.addtask(AIEngageTurretTask);
|
||||
%client.addtask(AIDetectMineTask);
|
||||
%client.addtask(AIDetectRemeqTask); // -- Lagg... ---- 1-9-2003
|
||||
%client.addtask(AIPilotTask); // BotPilot: Josef "Werewolf" Jahn
|
||||
}
|
||||
}
|
||||
|
||||
function LCTFGame::AIInit(%game)
|
||||
{
|
||||
// load external objectives files
|
||||
loadObjectives();
|
||||
|
||||
for (%i = 1; %i <= %game.numTeams; %i++)
|
||||
{
|
||||
if (!isObject($ObjectiveQ[%i]))
|
||||
{
|
||||
$ObjectiveQ[%i] = new AIObjectiveQ();
|
||||
MissionCleanup.add($ObjectiveQ[%i]);
|
||||
}
|
||||
|
||||
error("team " @ %i @ " objectives load...");
|
||||
$ObjectiveQ[%i].clear();
|
||||
AIInitObjectives(%i, %game);
|
||||
}
|
||||
|
||||
//call the default AIInit() function
|
||||
AIInit();
|
||||
}
|
||||
|
||||
function LCTFGame::AIplayerCaptureFlipFlop(%game, %player, %flipFlop)
|
||||
{
|
||||
}
|
||||
|
||||
function LCTFGame::AIplayerTouchEnemyFlag(%game, %player, %flag)
|
||||
{
|
||||
}
|
||||
|
||||
function LCTFGame::AIplayerTouchOwnFlag(%game, %player, %flag)
|
||||
{
|
||||
}
|
||||
|
||||
function LCTFGame::AIflagCap(%game, %player, %flag)
|
||||
{
|
||||
//signal the flag cap event
|
||||
AIRespondToEvent(%player.client, 'EnemyFlagCaptured', %player.client);
|
||||
// MES - changed above line - did not pass args in correct order
|
||||
}
|
||||
|
||||
function LCTFGame::AIplayerDroppedFlag(%game, %player, %flag)
|
||||
{
|
||||
}
|
||||
|
||||
function LCTFGame::AIflagReset(%game, %flag)
|
||||
{
|
||||
}
|
||||
|
||||
function LCTFGame::onAIDamaged(%game, %clVictim, %clAttacker, %damageType, %implement)
|
||||
{
|
||||
if (%clAttacker && %clAttacker != %clVictim && %clAttacker.team == %clVictim.team)
|
||||
{
|
||||
schedule(250, %clVictim, "AIPlayAnimSound", %clVictim, %clAttacker.player.getWorldBoxCenter(), "wrn.watchit", -1, -1, 0);
|
||||
|
||||
//clear the "lastDamageClient" tag so we don't turn on teammates... unless it's uberbob!
|
||||
%clVictim.lastDamageClient = -1;
|
||||
}
|
||||
}
|
||||
|
||||
function LCTFGame::onAIKilledClient(%game, %clVictim, %clAttacker, %damageType, %implement)
|
||||
{
|
||||
if (%clVictim.team != %clAttacker.team)
|
||||
DefaultGame::onAIKilledClient(%game, %clVictim, %clAttacker, %damageType, %implement);
|
||||
}
|
||||
|
||||
function LCTFGame::onAIKilled(%game, %clVictim, %clAttacker, %damageType, %implement)
|
||||
{
|
||||
DefaultGame::onAIKilled(%game, %clVictim, %clAttacker, %damageType, %implement);
|
||||
}
|
||||
|
||||
function LCTFGame::onAIFriendlyFire(%game, %clVictim, %clAttacker, %damageType, %implement)
|
||||
{
|
||||
if (%clAttacker && %clAttacker.team == %clVictim.team && %clAttacker != %clVictim && !%clVictim.isAIControlled())
|
||||
{
|
||||
// The Bot is only a little sorry:
|
||||
if ( getRandom() > 0.9 )
|
||||
AIMessageThread("ChatSorry", %clAttacker, %clVictim);
|
||||
}
|
||||
}
|
||||
|
|
@ -54,7 +54,7 @@ function GetTeamCounts(%game)
|
|||
|
||||
if(!$Host::TournamentMode)
|
||||
{
|
||||
if($CurrentMissionType $= "CTF") //No SCtF
|
||||
if($CurrentMissionType $= "CTF") //No LCTF
|
||||
NBRStatusNotify(%game); //Base Rape
|
||||
|
||||
if($CurrentMissionType $= "CTF" || $CurrentMissionType $= "DM")
|
||||
|
|
|
|||
|
|
@ -145,6 +145,7 @@ function CreateServer(%mission, %missionType)
|
|||
exec("scripts/defaultGame.cs");
|
||||
exec("scripts/CTFGame.cs");
|
||||
exec("scripts/SCtFGame.cs");
|
||||
exec("scripts/LCTFGame.cs");
|
||||
exec("scripts/PracticeCTFGame.cs");
|
||||
exec("scripts/TeamHuntersGame.cs");
|
||||
exec("scripts/SinglePlayerGame.cs");
|
||||
|
|
@ -175,6 +176,7 @@ function CreateServer(%mission, %missionType)
|
|||
(%type !$= PracticeCTFGame) &&
|
||||
(%type !$= RabbitGame) &&
|
||||
(%type !$= SCtFGame) &&
|
||||
(%type !$= LCTFGame) &&
|
||||
(%type !$= SiegeGame) &&
|
||||
(%type !$= SinglePlayerGame) &&
|
||||
(%type !$= TeamHuntersGame) &&
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ $Host::PUGautoPassword = 0; //Auto enable a password in tournament mode
|
|||
$Host::PUGPassword = "pickup"; //PUG password, Auto or enable/disable thru admin menu
|
||||
$Host::PUGpasswordAlwaysOn = 0; //If you want the pug password Always on
|
||||
$Host::DMSLOnlyMode = 0; //Shocklance Only Mode for Deathmatch
|
||||
$Host::SCtFProMode = 0; //Pro mode for LCTF
|
||||
$Host::LCTFProMode = 0; //Pro mode for LCTF
|
||||
$Host::LoadingScreenUseDebrief = 1; //Enable Debrief Style Loading screen; Gives you more lines and MOTD
|
||||
$Host::LoadScreenColor1 = "05edad"; //Loading Screen color; First Column
|
||||
$Host::LoadScreenColor2 = "29DEE7"; //Loading Screen color; Second Column
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue