mirror of
https://github.com/ineedbots/iw4_bot_warfare.git
synced 2025-04-22 22:05:44 +00:00
vars
This commit is contained in:
parent
c2d88e9f17
commit
43edbaa930
@ -573,3 +573,13 @@ set scr_sentry_killsIncreaseStreak "1"
|
|||||||
// _airdrop
|
// _airdrop
|
||||||
set scr_airdrop_killstreaksIncreaseStreak "1"
|
set scr_airdrop_killstreaksIncreaseStreak "1"
|
||||||
set scr_airdrop_patchDupeGlitch "0"
|
set scr_airdrop_patchDupeGlitch "0"
|
||||||
|
|
||||||
|
// _ac130
|
||||||
|
set scr_ac130_duration "30"
|
||||||
|
set scr_ac130_flares "1"
|
||||||
|
|
||||||
|
// _uav
|
||||||
|
set scr_uav_timeout "30"
|
||||||
|
set scr_counter_uav_timeout "30"
|
||||||
|
set scr_uav_forceon "0"
|
||||||
|
set scr_uav_does_print "1"
|
||||||
|
@ -1,12 +1,30 @@
|
|||||||
|
/*
|
||||||
|
_ac130 modded
|
||||||
|
Author: INeedGames
|
||||||
|
Date: 09/22/2020
|
||||||
|
|
||||||
|
DVARS:
|
||||||
|
- scr_ac130_duration <int>
|
||||||
|
40 - (default) how long the ac130 last for
|
||||||
|
|
||||||
|
- scr_ac130_flares <int>
|
||||||
|
2 - (default) how many flares a ac130 has
|
||||||
|
|
||||||
|
Thanks: H3X1C, Emosewaj
|
||||||
|
*/
|
||||||
|
|
||||||
#include maps\mp\_utility;
|
#include maps\mp\_utility;
|
||||||
#include common_scripts\utility;
|
#include common_scripts\utility;
|
||||||
|
|
||||||
|
|
||||||
init()
|
init()
|
||||||
{
|
{
|
||||||
level.ac130_use_duration = 40;
|
|
||||||
level.ac130_num_flares = 2;
|
setDvarIfUninitialized( "scr_ac130_duration", 40 );
|
||||||
|
setDvarIfUninitialized( "scr_ac130_flares", 2 );
|
||||||
|
level.ac130_use_duration = getDvarInt( "scr_ac130_duration" );
|
||||||
|
level.ac130_num_flares= getDvarInt( "scr_ac130_flares" );
|
||||||
|
|
||||||
makeDvarServerInfo( "ui_ac130usetime", level.ac130_use_duration );
|
makeDvarServerInfo( "ui_ac130usetime", level.ac130_use_duration );
|
||||||
|
|
||||||
precacheShader( "black" );
|
precacheShader( "black" );
|
||||||
@ -185,21 +203,21 @@ init_sounds()
|
|||||||
add_context_sensative_dialog( "ai", "in_sight", 7, "ac130_fco_gonnagethim" ); // You gonna get him?
|
add_context_sensative_dialog( "ai", "in_sight", 7, "ac130_fco_gonnagethim" ); // You gonna get him?
|
||||||
add_context_sensative_dialog( "ai", "in_sight", 8, "ac130_fco_personnelthere" ); // Personnel right there.
|
add_context_sensative_dialog( "ai", "in_sight", 8, "ac130_fco_personnelthere" ); // Personnel right there.
|
||||||
add_context_sensative_dialog( "ai", "in_sight", 9, "ac130_fco_nailthoseguys" ); // Nail those guys.
|
add_context_sensative_dialog( "ai", "in_sight", 9, "ac130_fco_nailthoseguys" ); // Nail those guys.
|
||||||
add_context_sensative_dialog( "ai", "in_sight", 11, "ac130_fco_lightemup" ); // Light ‘em up.
|
add_context_sensative_dialog( "ai", "in_sight", 11, "ac130_fco_lightemup" ); // Light <EFBFBD>em up.
|
||||||
add_context_sensative_dialog( "ai", "in_sight", 12, "ac130_fco_takehimout" ); // Yeah take him out.
|
add_context_sensative_dialog( "ai", "in_sight", 12, "ac130_fco_takehimout" ); // Yeah take him out.
|
||||||
add_context_sensative_dialog( "ai", "in_sight", 14, "ac130_plt_yeahcleared" ); // Yeah, cleared to engage.
|
add_context_sensative_dialog( "ai", "in_sight", 14, "ac130_plt_yeahcleared" ); // Yeah, cleared to engage.
|
||||||
add_context_sensative_dialog( "ai", "in_sight", 15, "ac130_plt_copysmoke" ); // Copy, smoke ‘em.
|
add_context_sensative_dialog( "ai", "in_sight", 15, "ac130_plt_copysmoke" ); // Copy, smoke <EFBFBD>em.
|
||||||
add_context_sensative_dialog( "ai", "in_sight", 16, "ac130_fco_rightthere" ); // Right there...tracking.
|
add_context_sensative_dialog( "ai", "in_sight", 16, "ac130_fco_rightthere" ); // Right there...tracking.
|
||||||
add_context_sensative_dialog( "ai", "in_sight", 17, "ac130_fco_tracking" ); // Tracking.
|
add_context_sensative_dialog( "ai", "in_sight", 17, "ac130_fco_tracking" ); // Tracking.
|
||||||
|
|
||||||
add_context_sensative_dialog( "ai", "wounded_crawl", 0, "ac130_fco_movingagain" ); // Ok he’s moving again.
|
add_context_sensative_dialog( "ai", "wounded_crawl", 0, "ac130_fco_movingagain" ); // Ok he<EFBFBD>s moving again.
|
||||||
add_context_sensative_timeout( "ai", "wounded_crawl", undefined, 6 );
|
add_context_sensative_timeout( "ai", "wounded_crawl", undefined, 6 );
|
||||||
|
|
||||||
add_context_sensative_dialog( "ai", "wounded_pain", 0, "ac130_fco_doveonground" ); // Yeah, he just dove on the ground.
|
add_context_sensative_dialog( "ai", "wounded_pain", 0, "ac130_fco_doveonground" ); // Yeah, he just dove on the ground.
|
||||||
add_context_sensative_dialog( "ai", "wounded_pain", 1, "ac130_fco_knockedwind" ); // Probably just knocked the wind out of him.
|
add_context_sensative_dialog( "ai", "wounded_pain", 1, "ac130_fco_knockedwind" ); // Probably just knocked the wind out of him.
|
||||||
add_context_sensative_dialog( "ai", "wounded_pain", 2, "ac130_fco_downstillmoving" ); // That guy's down but still moving.
|
add_context_sensative_dialog( "ai", "wounded_pain", 2, "ac130_fco_downstillmoving" ); // That guy's down but still moving.
|
||||||
add_context_sensative_dialog( "ai", "wounded_pain", 3, "ac130_fco_gettinbackup" ); // He's gettin' back up.
|
add_context_sensative_dialog( "ai", "wounded_pain", 3, "ac130_fco_gettinbackup" ); // He's gettin' back up.
|
||||||
add_context_sensative_dialog( "ai", "wounded_pain", 4, "ac130_fco_yepstillmoving" ); // Yep, that guy’s still moving.
|
add_context_sensative_dialog( "ai", "wounded_pain", 4, "ac130_fco_yepstillmoving" ); // Yep, that guy<EFBFBD>s still moving.
|
||||||
add_context_sensative_dialog( "ai", "wounded_pain", 5, "ac130_fco_stillmoving" ); // He's still moving.
|
add_context_sensative_dialog( "ai", "wounded_pain", 5, "ac130_fco_stillmoving" ); // He's still moving.
|
||||||
add_context_sensative_timeout( "ai", "wounded_pain", undefined, 12 );
|
add_context_sensative_timeout( "ai", "wounded_pain", undefined, 12 );
|
||||||
|
|
||||||
@ -470,7 +488,7 @@ setAC130Player( player )
|
|||||||
player thread shotFired();
|
player thread shotFired();
|
||||||
player thread clouds();
|
player thread clouds();
|
||||||
//thread maps\_ac130_amb::main();
|
//thread maps\_ac130_amb::main();
|
||||||
|
|
||||||
player thread removeAC130PlayerAfterTime( level.ac130_use_duration * player.killStreakScaler);
|
player thread removeAC130PlayerAfterTime( level.ac130_use_duration * player.killStreakScaler);
|
||||||
player thread removeAC130PlayerOnDisconnect();
|
player thread removeAC130PlayerOnDisconnect();
|
||||||
player thread removeAC130PlayerOnChangeTeams();
|
player thread removeAC130PlayerOnChangeTeams();
|
||||||
@ -1166,7 +1184,7 @@ context_Sensative_Dialog_Guy_Crawling()
|
|||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
level waittill ( "ai_crawling", guy );
|
level waittill ( "ai_crawling", guy );
|
||||||
|
|
||||||
/#
|
/#
|
||||||
if ( ( isdefined( guy ) ) && ( isdefined( guy.origin ) ) )
|
if ( ( isdefined( guy ) ) && ( isdefined( guy.origin ) ) )
|
||||||
{
|
{
|
||||||
|
@ -1,3 +1,21 @@
|
|||||||
|
/*
|
||||||
|
_uav modded
|
||||||
|
Author: INeedGames
|
||||||
|
Date: 09/22/2020
|
||||||
|
|
||||||
|
DVARS:
|
||||||
|
- scr_uav_timeout <int>
|
||||||
|
30 - (default) how long a uav lasts
|
||||||
|
|
||||||
|
- scr_counter_uav_timeout <int>
|
||||||
|
30 - (default) how long a cuav lasts
|
||||||
|
|
||||||
|
- scr_uav_does_print <bool>
|
||||||
|
false - (default) if uav and cuav activity is logged on the obituary
|
||||||
|
|
||||||
|
Thanks: H3X1C, Emosewaj
|
||||||
|
*/
|
||||||
|
|
||||||
#include maps\mp\_utility;
|
#include maps\mp\_utility;
|
||||||
#include maps\mp\gametypes\_hud_util;
|
#include maps\mp\gametypes\_hud_util;
|
||||||
#include common_scripts\utility;
|
#include common_scripts\utility;
|
||||||
@ -15,9 +33,16 @@ init()
|
|||||||
precacheString( &"MP_WAR_COUNTER_RADAR_EXPIRED_ENEMY" );
|
precacheString( &"MP_WAR_COUNTER_RADAR_EXPIRED_ENEMY" );
|
||||||
|
|
||||||
precacheModel( "vehicle_uav_static_mp" );
|
precacheModel( "vehicle_uav_static_mp" );
|
||||||
|
|
||||||
level.radarViewTime = 30; // time radar remains active
|
setDvarIfUninitialized( "scr_uav_timeout", 30 ); // Dvar to define timeout period (Default 30)
|
||||||
level.uavBlockTime = 30; // this only seems to be used for the FFA version.
|
setDvarIfUninitialized( "scr_counter_uav_timeout", 30 ); // Dvar to define timeout period (Default 30)
|
||||||
|
setDvarIfUninitialized( "scr_uav_forceon", 0 ); // Forces radar on or off (Default 0 off)
|
||||||
|
setDvarIfUninitialized( "scr_uav_does_print", 0 ); // Forces radar on or off (Default 0 off)
|
||||||
|
|
||||||
|
level.radarViewTime = getDvarInt( "scr_uav_timeout" ); // time radar remains active
|
||||||
|
level.uavBlockTime = getDvarInt( "scr_counter_uav_timeout" ); // time counter radar remains active
|
||||||
|
level.forceUAV = getDvarInt( "scr_uav_forceon" ); // Forces radar always on
|
||||||
|
level.uavDoesPrint = getDvarInt( "scr_uav_does_print" ); // Forces radar always on
|
||||||
|
|
||||||
assert( level.radarViewTime > 7 );
|
assert( level.radarViewTime > 7 );
|
||||||
assert( level.uavBlockTime > 7 );
|
assert( level.uavBlockTime > 7 );
|
||||||
@ -40,7 +65,9 @@ init()
|
|||||||
level.UAVRig hide();
|
level.UAVRig hide();
|
||||||
|
|
||||||
level.UAVRig thread rotateUAVRig();
|
level.UAVRig thread rotateUAVRig();
|
||||||
|
|
||||||
|
level thread onPlayerConnect();
|
||||||
|
|
||||||
if ( level.teamBased )
|
if ( level.teamBased )
|
||||||
{
|
{
|
||||||
level.radarMode["allies"] = "normal_radar";
|
level.radarMode["allies"] = "normal_radar";
|
||||||
@ -59,9 +86,7 @@ init()
|
|||||||
level.activeUAVs = [];
|
level.activeUAVs = [];
|
||||||
level.activeCounterUAVs = [];
|
level.activeCounterUAVs = [];
|
||||||
|
|
||||||
level.uavModels = [];
|
level.uavModels = [];
|
||||||
|
|
||||||
level thread onPlayerConnect();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
level thread UAVTracker();
|
level thread UAVTracker();
|
||||||
@ -73,14 +98,41 @@ onPlayerConnect()
|
|||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
level waittill( "connected", player );
|
level waittill( "connected", player );
|
||||||
|
|
||||||
level.activeUAVs[ player.guid ] = 0;
|
if ( !level.teamBased )
|
||||||
level.activeCounterUAVs[ player.guid ] = 0;
|
{
|
||||||
|
level.activeUAVs[ player.guid ] = 0;
|
||||||
level.radarMode[ player.guid ] = "normal_radar";
|
level.activeCounterUAVs[ player.guid ] = 0;
|
||||||
|
|
||||||
|
level.radarMode[ player.guid ] = "normal_radar";
|
||||||
|
}
|
||||||
|
|
||||||
|
player thread onPlayerSpawned();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onPlayerSpawned()
|
||||||
|
{
|
||||||
|
self endon("disconnect");
|
||||||
|
|
||||||
|
for(;;)
|
||||||
|
{
|
||||||
|
self waittill("spawned_player");
|
||||||
|
|
||||||
|
if ( level.forceUAV )
|
||||||
|
self thread forceRadarOn();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Hacky solution for force radar.
|
||||||
|
forceRadarOn()
|
||||||
|
{
|
||||||
|
self setClientDvar( "compassEnemyFootstepEnabled", 1);
|
||||||
|
self setClientDvar( "compassEnemyFootstepMaxRange", 2147483647);
|
||||||
|
self setClientDvar( "compassEnemyFootstepMaxZ", 2147483647);
|
||||||
|
self setClientDvar( "compassEnemyFootstepMinSpeed", 0);
|
||||||
|
}
|
||||||
|
|
||||||
rotateUAVRig()
|
rotateUAVRig()
|
||||||
{
|
{
|
||||||
for (;;)
|
for (;;)
|
||||||
@ -387,7 +439,8 @@ blockPlayerUAV()
|
|||||||
|
|
||||||
self.isRadarBlocked = false;
|
self.isRadarBlocked = false;
|
||||||
|
|
||||||
//self iPrintLn( &"MP_WAR_COUNTER_RADAR_EXPIRED" );
|
if (level.uavDoesPrint)
|
||||||
|
self iPrintLn( &"MP_WAR_COUNTER_RADAR_EXPIRED" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -423,7 +476,8 @@ usePlayerUAV( doubleUAV, useTime )
|
|||||||
|
|
||||||
self.hasRadar = false;
|
self.hasRadar = false;
|
||||||
|
|
||||||
//self iPrintLn( &"MP_WAR_RADAR_EXPIRED" );
|
if (level.uavDoesPrint)
|
||||||
|
self iPrintLn( &"MP_WAR_RADAR_EXPIRED" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -544,28 +598,30 @@ addActiveUAV()
|
|||||||
level.activeUAVs[self.team]++;
|
level.activeUAVs[self.team]++;
|
||||||
else
|
else
|
||||||
level.activeUAVs[self.owner.guid]++;
|
level.activeUAVs[self.owner.guid]++;
|
||||||
/*
|
|
||||||
if ( level.teamBased )
|
if (level.uavDoesPrint)
|
||||||
{
|
{
|
||||||
foreach ( player in level.players )
|
if ( level.teamBased )
|
||||||
{
|
{
|
||||||
if ( player.team == self.team )
|
foreach ( player in level.players )
|
||||||
player iPrintLn( &"MP_WAR_RADAR_ACQUIRED", self.owner, level.radarViewTime );
|
{
|
||||||
else if ( player.team == level.otherTeam[self.team] )
|
if ( player.team == self.team )
|
||||||
player iPrintLn( &"MP_WAR_RADAR_ACQUIRED_ENEMY", level.radarViewTime );
|
player iPrintLn( &"MP_WAR_RADAR_ACQUIRED", self.owner, level.radarViewTime );
|
||||||
}
|
else if ( player.team == level.otherTeam[self.team] )
|
||||||
}
|
player iPrintLn( &"MP_WAR_RADAR_ACQUIRED_ENEMY", level.radarViewTime );
|
||||||
else
|
}
|
||||||
{
|
}
|
||||||
foreach ( player in level.players )
|
else
|
||||||
{
|
{
|
||||||
if ( player == self.owner )
|
foreach ( player in level.players )
|
||||||
player iPrintLn( &"MP_WAR_RADAR_ACQUIRED", self.owner, level.radarViewTime );
|
{
|
||||||
else
|
if ( player == self.owner )
|
||||||
player iPrintLn( &"MP_WAR_RADAR_ACQUIRED_ENEMY", level.radarViewTime );
|
player iPrintLn( &"MP_WAR_RADAR_ACQUIRED", self.owner, level.radarViewTime );
|
||||||
|
else
|
||||||
|
player iPrintLn( &"MP_WAR_RADAR_ACQUIRED_ENEMY", level.radarViewTime );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -575,28 +631,30 @@ addActiveCounterUAV()
|
|||||||
level.activeCounterUAVs[self.team]++;
|
level.activeCounterUAVs[self.team]++;
|
||||||
else
|
else
|
||||||
level.activeCounterUAVs[self.owner.guid]++;
|
level.activeCounterUAVs[self.owner.guid]++;
|
||||||
/*
|
|
||||||
if ( level.teamBased )
|
if (level.uavDoesPrint)
|
||||||
{
|
{
|
||||||
foreach ( player in level.players )
|
if ( level.teamBased )
|
||||||
{
|
{
|
||||||
if ( player.team == self.team )
|
foreach ( player in level.players )
|
||||||
player iPrintLn( &"MP_WAR_COUNTER_RADAR_ACQUIRED", self.owner, level.uavBlockTime );
|
{
|
||||||
else if ( player.team == level.otherTeam[self.team] )
|
if ( player.team == self.team )
|
||||||
player iPrintLn( &"MP_WAR_COUNTER_RADAR_ACQUIRED_ENEMY", level.uavBlockTime );
|
player iPrintLn( &"MP_WAR_COUNTER_RADAR_ACQUIRED", self.owner, level.uavBlockTime );
|
||||||
}
|
else if ( player.team == level.otherTeam[self.team] )
|
||||||
}
|
player iPrintLn( &"MP_WAR_COUNTER_RADAR_ACQUIRED_ENEMY", level.uavBlockTime );
|
||||||
else
|
}
|
||||||
{
|
}
|
||||||
foreach ( player in level.players )
|
else
|
||||||
{
|
{
|
||||||
if ( player == self.owner )
|
foreach ( player in level.players )
|
||||||
player iPrintLn( &"MP_WAR_COUNTER_RADAR_ACQUIRED", self.owner, level.uavBlockTime );
|
{
|
||||||
else
|
if ( player == self.owner )
|
||||||
player iPrintLn( &"MP_WAR_COUNTER_RADAR_ACQUIRED_ENEMY", level.uavBlockTime );
|
player iPrintLn( &"MP_WAR_COUNTER_RADAR_ACQUIRED", self.owner, level.uavBlockTime );
|
||||||
|
else
|
||||||
|
player iPrintLn( &"MP_WAR_COUNTER_RADAR_ACQUIRED_ENEMY", level.uavBlockTime );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -608,8 +666,11 @@ removeActiveUAV()
|
|||||||
|
|
||||||
if ( !level.activeUAVs[self.team] )
|
if ( !level.activeUAVs[self.team] )
|
||||||
{
|
{
|
||||||
//printOnTeam( &"MP_WAR_RADAR_EXPIRED", self.team );
|
if (level.uavDoesPrint)
|
||||||
//printOnTeam( &"MP_WAR_RADAR_EXPIRED_ENEMY", level.otherTeam[self.team] );
|
{
|
||||||
|
printOnTeam( &"MP_WAR_RADAR_EXPIRED", self.team );
|
||||||
|
printOnTeam( &"MP_WAR_RADAR_EXPIRED_ENEMY", level.otherTeam[self.team] );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( isDefined( self.owner ) )
|
else if ( isDefined( self.owner ) )
|
||||||
@ -627,8 +688,11 @@ removeActiveCounterUAV()
|
|||||||
|
|
||||||
if ( !level.activeCounterUAVs[self.team] )
|
if ( !level.activeCounterUAVs[self.team] )
|
||||||
{
|
{
|
||||||
//printOnTeam( &"MP_WAR_COUNTER_RADAR_EXPIRED", self.team );
|
if (level.uavDoesPrint)
|
||||||
//printOnTeam( &"MP_WAR_COUNTER_RADAR_EXPIRED_ENEMY", level.otherTeam[self.team] );
|
{
|
||||||
|
printOnTeam( &"MP_WAR_COUNTER_RADAR_EXPIRED", self.team );
|
||||||
|
printOnTeam( &"MP_WAR_COUNTER_RADAR_EXPIRED_ENEMY", level.otherTeam[self.team] );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( isDefined( self.owner ) )
|
else if ( isDefined( self.owner ) )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user