From 43edbaa930d521a22f4978929cb081283b4e7042 Mon Sep 17 00:00:00 2001 From: INeedBots Date: Mon, 28 Sep 2020 22:33:32 -0600 Subject: [PATCH] vars --- main/server.cfg | 10 ++ userraw/maps/mp/killstreaks/_ac130.gsc | 36 ++++-- userraw/maps/mp/killstreaks/_uav.gsc | 168 +++++++++++++++++-------- 3 files changed, 153 insertions(+), 61 deletions(-) diff --git a/main/server.cfg b/main/server.cfg index f46daee..0d9e541 100644 --- a/main/server.cfg +++ b/main/server.cfg @@ -573,3 +573,13 @@ set scr_sentry_killsIncreaseStreak "1" // _airdrop set scr_airdrop_killstreaksIncreaseStreak "1" 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" diff --git a/userraw/maps/mp/killstreaks/_ac130.gsc b/userraw/maps/mp/killstreaks/_ac130.gsc index 81fb1f1..5e5d644 100644 --- a/userraw/maps/mp/killstreaks/_ac130.gsc +++ b/userraw/maps/mp/killstreaks/_ac130.gsc @@ -1,12 +1,30 @@ +/* + _ac130 modded + Author: INeedGames + Date: 09/22/2020 + + DVARS: + - scr_ac130_duration + 40 - (default) how long the ac130 last for + + - scr_ac130_flares + 2 - (default) how many flares a ac130 has + + Thanks: H3X1C, Emosewaj +*/ + #include maps\mp\_utility; #include common_scripts\utility; 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 ); 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", 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", 11, "ac130_fco_lightemup" ); // Light ‘em up. + add_context_sensative_dialog( "ai", "in_sight", 11, "ac130_fco_lightemup" ); // Light �em up. 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", 15, "ac130_plt_copysmoke" ); // Copy, smoke ‘em. + add_context_sensative_dialog( "ai", "in_sight", 15, "ac130_plt_copysmoke" ); // Copy, smoke �em. 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", "wounded_crawl", 0, "ac130_fco_movingagain" ); // Ok he’s moving again. + add_context_sensative_dialog( "ai", "wounded_crawl", 0, "ac130_fco_movingagain" ); // Ok he�s moving again. 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", 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", 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�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 ); @@ -470,7 +488,7 @@ setAC130Player( player ) player thread shotFired(); player thread clouds(); //thread maps\_ac130_amb::main(); - + player thread removeAC130PlayerAfterTime( level.ac130_use_duration * player.killStreakScaler); player thread removeAC130PlayerOnDisconnect(); player thread removeAC130PlayerOnChangeTeams(); @@ -1166,7 +1184,7 @@ context_Sensative_Dialog_Guy_Crawling() for (;;) { level waittill ( "ai_crawling", guy ); - + /# if ( ( isdefined( guy ) ) && ( isdefined( guy.origin ) ) ) { diff --git a/userraw/maps/mp/killstreaks/_uav.gsc b/userraw/maps/mp/killstreaks/_uav.gsc index 35630ee..c919b5e 100644 --- a/userraw/maps/mp/killstreaks/_uav.gsc +++ b/userraw/maps/mp/killstreaks/_uav.gsc @@ -1,3 +1,21 @@ +/* + _uav modded + Author: INeedGames + Date: 09/22/2020 + + DVARS: + - scr_uav_timeout + 30 - (default) how long a uav lasts + + - scr_counter_uav_timeout + 30 - (default) how long a cuav lasts + + - scr_uav_does_print + false - (default) if uav and cuav activity is logged on the obituary + + Thanks: H3X1C, Emosewaj +*/ + #include maps\mp\_utility; #include maps\mp\gametypes\_hud_util; #include common_scripts\utility; @@ -15,9 +33,16 @@ init() precacheString( &"MP_WAR_COUNTER_RADAR_EXPIRED_ENEMY" ); precacheModel( "vehicle_uav_static_mp" ); - - level.radarViewTime = 30; // time radar remains active - level.uavBlockTime = 30; // this only seems to be used for the FFA version. + + setDvarIfUninitialized( "scr_uav_timeout", 30 ); // Dvar to define timeout period (Default 30) + 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.uavBlockTime > 7 ); @@ -40,7 +65,9 @@ init() level.UAVRig hide(); level.UAVRig thread rotateUAVRig(); - + + level thread onPlayerConnect(); + if ( level.teamBased ) { level.radarMode["allies"] = "normal_radar"; @@ -59,9 +86,7 @@ init() level.activeUAVs = []; level.activeCounterUAVs = []; - level.uavModels = []; - - level thread onPlayerConnect(); + level.uavModels = []; } level thread UAVTracker(); @@ -73,14 +98,41 @@ onPlayerConnect() for(;;) { level waittill( "connected", player ); - - level.activeUAVs[ player.guid ] = 0; - level.activeCounterUAVs[ player.guid ] = 0; - - level.radarMode[ player.guid ] = "normal_radar"; + + if ( !level.teamBased ) + { + level.activeUAVs[ player.guid ] = 0; + 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() { for (;;) @@ -387,7 +439,8 @@ blockPlayerUAV() 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 iPrintLn( &"MP_WAR_RADAR_EXPIRED" ); + if (level.uavDoesPrint) + self iPrintLn( &"MP_WAR_RADAR_EXPIRED" ); } @@ -544,28 +598,30 @@ addActiveUAV() level.activeUAVs[self.team]++; else level.activeUAVs[self.owner.guid]++; -/* - if ( level.teamBased ) + + if (level.uavDoesPrint) { - foreach ( player in level.players ) + if ( level.teamBased ) { - if ( player.team == self.team ) - 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 ) + foreach ( player in level.players ) + { + if ( player.team == self.team ) + 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 { - if ( player == self.owner ) - player iPrintLn( &"MP_WAR_RADAR_ACQUIRED", self.owner, level.radarViewTime ); - else - player iPrintLn( &"MP_WAR_RADAR_ACQUIRED_ENEMY", level.radarViewTime ); + foreach ( player in level.players ) + { + if ( player == self.owner ) + 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]++; else level.activeCounterUAVs[self.owner.guid]++; -/* - if ( level.teamBased ) + + if (level.uavDoesPrint) { - foreach ( player in level.players ) + if ( level.teamBased ) { - if ( player.team == self.team ) - 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 ) + foreach ( player in level.players ) + { + if ( player.team == self.team ) + 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 { - if ( player == self.owner ) - player iPrintLn( &"MP_WAR_COUNTER_RADAR_ACQUIRED", self.owner, level.uavBlockTime ); - else - player iPrintLn( &"MP_WAR_COUNTER_RADAR_ACQUIRED_ENEMY", level.uavBlockTime ); + foreach ( player in level.players ) + { + if ( player == self.owner ) + 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] ) { - //printOnTeam( &"MP_WAR_RADAR_EXPIRED", self.team ); - //printOnTeam( &"MP_WAR_RADAR_EXPIRED_ENEMY", level.otherTeam[self.team] ); + if (level.uavDoesPrint) + { + printOnTeam( &"MP_WAR_RADAR_EXPIRED", self.team ); + printOnTeam( &"MP_WAR_RADAR_EXPIRED_ENEMY", level.otherTeam[self.team] ); + } } } else if ( isDefined( self.owner ) ) @@ -627,8 +688,11 @@ removeActiveCounterUAV() if ( !level.activeCounterUAVs[self.team] ) { - //printOnTeam( &"MP_WAR_COUNTER_RADAR_EXPIRED", self.team ); - //printOnTeam( &"MP_WAR_COUNTER_RADAR_EXPIRED_ENEMY", level.otherTeam[self.team] ); + if (level.uavDoesPrint) + { + printOnTeam( &"MP_WAR_COUNTER_RADAR_EXPIRED", self.team ); + printOnTeam( &"MP_WAR_COUNTER_RADAR_EXPIRED_ENEMY", level.otherTeam[self.team] ); + } } } else if ( isDefined( self.owner ) )