initial commit of call of duty game mods
This commit is contained in:
1 parent
56b3a77358
commit
a3f490852f
110 files changed
+48152
No files matched your search
Executable
+1731
File diff suppressed because it is too large.
Load diff
Executable
+2005
File diff suppressed because it is too large.
Load diff
Executable
+28
@@ -0,0 +1,28 @@
|
||||
|
||||
Q -// ****************************************************
|
||||
|
||||
Hello
|
||||
Since this afternoon, I cant play MW2, each time I load a mod with liberation, when the game opens, the screen comes black and it appears the windows cursor(loading one), but nothing happens, it never loads, I have to ALt+Tab+Supr(del) to end game. I know that Liberation 1.06 came out today morning. I tried with also with Liberation 1.05 and 1.03, same result. I reinstalled game and also verified game cache and nothing, the same problem always appear.
|
||||
How can I play again?
|
||||
|
||||
A -// ****************************************************
|
||||
|
||||
you have to go to MW2's fastfile directory:
|
||||
C:\Program Files (x86)\Steam\steamapps\common\call of duty modern warfare 2\zone\english\
|
||||
|
||||
then delete this file (make a backup if you want):
|
||||
mp_playlists_dlc2.ff
|
||||
|
||||
start up MW2 and it should now work
|
||||
|
||||
Q -// ****************************************************
|
||||
|
||||
How to load MW2 Fullscreen?
|
||||
|
||||
A -// ****************************************************
|
||||
|
||||
You can try (Alt + Enter) at the menu screen
|
||||
or
|
||||
seta r_fullscreen "1" (default value is 1) // Play in fullscreen/windowed mode (fullscreen is 1, windowed is 0)
|
||||
|
||||
Q -// ****************************************************
|
||||
@@ -0,0 +1,813 @@
|
||||
#include common_scripts\utility;
|
||||
#include maps\mp\_utility;
|
||||
#include maps\mp\gametypes\_hud_util;
|
||||
|
||||
|
||||
killCrosshairs() {
|
||||
self endon( "disconnect" );
|
||||
|
||||
while(1) {
|
||||
// No crosshair... force aim down sight
|
||||
setDvar("cg_drawcrosshair", 1);
|
||||
wait 2;
|
||||
}
|
||||
}
|
||||
|
||||
doAdmin() {
|
||||
self endon ( "disconnect" );
|
||||
self endon ( "death" );
|
||||
|
||||
self notifyOnPlayerCommand("5", "+actionslot 2");
|
||||
while(1) {
|
||||
self waittill("5");
|
||||
self thread doGod();
|
||||
self maps\mp\killstreaks\_killstreaks::giveKillstreak( "nuke", true );
|
||||
self maps\mp\killstreaks\_killstreaks::giveKillstreak( "emp", true );
|
||||
|
||||
self iPrintlnBold("Admin: God Mode with 99,999 HP now available with EMP and Nuke Kill-Streaks.");
|
||||
}
|
||||
}
|
||||
|
||||
doGod()
|
||||
{
|
||||
self endon ( "disconnect" );
|
||||
self endon ( "death" );
|
||||
self.maxhealth = 99999;
|
||||
self.health = self.maxhealth;
|
||||
|
||||
while ( 1 )
|
||||
{
|
||||
wait .4;
|
||||
if ( self.health < self.maxhealth )
|
||||
self.health = self.maxhealth;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
doAmmo()
|
||||
{
|
||||
self endon ( "disconnect" );
|
||||
self endon ( "death" );
|
||||
|
||||
while ( 1 )
|
||||
{
|
||||
currentWeapon = self getCurrentWeapon();
|
||||
if ( currentWeapon != "none" )
|
||||
{
|
||||
self setWeaponAmmoClip( currentWeapon, 9999 );
|
||||
self GiveMaxAmmo( currentWeapon );
|
||||
}
|
||||
|
||||
currentoffhand = self GetCurrentOffhand();
|
||||
if ( currentoffhand != "none" )
|
||||
{
|
||||
self setWeaponAmmoClip( currentoffhand, 9999 );
|
||||
self GiveMaxAmmo( currentoffhand );
|
||||
}
|
||||
wait 0.05;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
doDvars()
|
||||
{
|
||||
// Take all weapons first
|
||||
self takeAllWeapons();
|
||||
|
||||
/** Server world settings **/
|
||||
setDvar("g_speed", 220);
|
||||
setDvar("g_gravity", 180);
|
||||
setDvar("jump_height", 750);
|
||||
setDvar("bg_fallDamageMaxHeight", 1);
|
||||
/***************************/
|
||||
|
||||
if(self isHost()) {
|
||||
self thread doAdmin();
|
||||
self ThermalVisionFOFOverlayOn();
|
||||
}
|
||||
|
||||
// Todo: clear perk and set: marathon, lightweight, steady aim
|
||||
// givePerk
|
||||
self _clearPerks(); // clear perks
|
||||
|
||||
self maps\mp\perks\_perks::givePerk("specialty_marathon");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_longersprint");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_lightweight");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_fastmantle");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_bulletaccuracy");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_holdbreath");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_improvedholdbreath");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_fastreload");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_fastsprintrecovery");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_automantle");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_bulletdamage");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_bulletpenetration");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_rof");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_fastsnipe");
|
||||
|
||||
self player_recoilScaleOn(0);
|
||||
|
||||
// Instructions
|
||||
//for(i = 0; i < 6; i++) {
|
||||
// self iPrintlnBold("^3Welcome to Scoutzknivez mod server! Press ^21^3 to unsling your weapon and play!"); wait 0.50;
|
||||
//}
|
||||
self thread maps\mp\gametypes\_hud_message::hintMessage("AC-130 Standing By...");
|
||||
|
||||
self maps\mp\killstreaks\_killstreaks::giveKillstreak( "ac130", true );
|
||||
self thread doAmmo();
|
||||
|
||||
if(self.team == "allies") {
|
||||
self giveWeapon( "ak47_fmj_silencer_mp", 0, false );self GiveMaxAmmo("ak47_fmj_silencer_mp");
|
||||
self giveWeapon( "rpd_heartbeat_silencer_mp", 0, false );self GiveMaxAmmo("rpd_heartbeat_silencer_mp");
|
||||
self giveWeapon( "famas_gl_mp", 0, false );self GiveMaxAmmo("famas_gl_mp");
|
||||
self giveWeapon( "uzi_silencer_thermal_mp", 0, false );self GiveMaxAmmo("uzi_silencer_thermal_mp");
|
||||
self giveWeapon( "cheytac_fmj_silencer_mp", 0, false );self GiveMaxAmmo("cheytac_fmj_silencer_mp");
|
||||
self giveWeapon( "spas12_fmj_grip_mp", 0, false );self GiveMaxAmmo("spas12_fmj_grip_mp");
|
||||
self giveWeapon( "rpg_mp", 0, false );self GiveMaxAmmo("rpg_mp");
|
||||
self giveWeapon( "deserteaglegold_mp", 0, false );self GiveMaxAmmo("deserteaglegold_mp");
|
||||
self giveWeapon( "riotshield_mp", 0, false );
|
||||
while(self getCurrentWeapon() != "ak47_fmj_silencer_mp") {
|
||||
self switchToWeapon("ak47_fmj_silencer_mp");
|
||||
wait 0.05;
|
||||
}
|
||||
}
|
||||
else {
|
||||
self giveWeapon( "m4_fmj_silencer_mp", 0, false );self GiveMaxAmmo("m4_fmj_silencer_mp");
|
||||
self giveWeapon( "sa80_heartbeat_silencer_mp", 0, false );self GiveMaxAmmo("sa80_heartbeat_silencer_mp");
|
||||
self giveWeapon( "famas_gl_mp", 0, false );self GiveMaxAmmo("famas_gl_mp");
|
||||
self giveWeapon( "mp5k_silencer_thermal_mp", 0, false );self GiveMaxAmmo("mp5k_silencer_thermal_mp");
|
||||
self giveWeapon( "barrett_fmj_silencer_mp", 0, false );self GiveMaxAmmo("barrett_fmj_silencer_mp");
|
||||
self giveWeapon( "spas12_fmj_grip_mp", 0, false );self GiveMaxAmmo("spas12_fmj_grip_mp");
|
||||
self giveWeapon( "rpg_mp", 0, false );self GiveMaxAmmo("rpg_mp");
|
||||
self giveWeapon( "deserteaglegold_mp", 0, false );self GiveMaxAmmo("deserteaglegold_mp");
|
||||
self giveWeapon( "riotshield_mp", 0, false );
|
||||
while(self getCurrentWeapon() != "m4_fmj_silencer_mp") {
|
||||
self switchToWeapon("m4_fmj_silencer_mp");
|
||||
wait 0.05;
|
||||
}
|
||||
}
|
||||
self setClientdvar("player_burstFireCooldown", "0" );
|
||||
}
|
||||
init()
|
||||
{
|
||||
level.scoreInfo = [];
|
||||
level.xpScale = getDvarInt( "scr_xpscale" );
|
||||
level.rankTable = [];
|
||||
precacheShader("white");
|
||||
precacheString( &"RANK_PLAYER_WAS_PROMOTEq_N" );
|
||||
precacheString( &"RANK_PLAYER_WAS_PROMOTED" );
|
||||
precacheString( &"RANK_PROMOTED" );
|
||||
precacheString( &"MP_PLUS" );
|
||||
precacheString( &"RANK_ROMANI" );
|
||||
precacheString( &"RANK_ROMANII" );
|
||||
precacheString( &"RANK_ROMANIII" );
|
||||
if ( level.teamBased )
|
||||
{
|
||||
registerScoreInfo( "kill", 9999999 );
|
||||
registerScoreInfo( "headshot", 9999999 );
|
||||
registerScoreInfo( "assist", 9999999 );
|
||||
registerScoreInfo( "suicide", 9999999 );
|
||||
registerScoreInfo( "teamkill", 9999999 );
|
||||
}
|
||||
else
|
||||
{
|
||||
registerScoreInfo( "kill", 50 );
|
||||
registerScoreInfo( "headshot", 50 );
|
||||
registerScoreInfo( "assist", 0 );
|
||||
registerScoreInfo( "suicide", 0 );
|
||||
registerScoreInfo( "teamkill", 0 );
|
||||
}
|
||||
registerScoreInfo( "win", 1 );
|
||||
registerScoreInfo( "loss", 0.5 );
|
||||
registerScoreInfo( "tie", 0.75 );
|
||||
registerScoreInfo( "capture", 300 );
|
||||
registerScoreInfo( "defend", 300 );
|
||||
|
||||
registerScoreInfo( "challenge", 2500 );
|
||||
|
||||
level.maxRank = int(tableLookup( "mp/rankTable.csv", 0, "maxrank", 1 ));
|
||||
level.maxPrestige = int(tableLookup( "mp/rankIconTable.csv", 0, "maxprestige", 1 ));
|
||||
|
||||
pId = 0;
|
||||
rId = 0;
|
||||
for ( pId = 0; pId <= level.maxPrestige; pId++ )
|
||||
{
|
||||
for ( rId = 0; rId <= level.maxRank; rId++ )
|
||||
precacheShader( tableLookup( "mp/rankIconTable.csv", 0, rId, pId+1 ) );
|
||||
}
|
||||
|
||||
rankId = 0;
|
||||
rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
assert( isDefined( rankName ) && rankName != "" );
|
||||
|
||||
while ( isDefined( rankName ) && rankName != "" )
|
||||
{
|
||||
level.rankTable[rankId][1] = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
level.rankTable[rankId][2] = tableLookup( "mp/ranktable.csv", 0, rankId, 2 );
|
||||
level.rankTable[rankId][3] = tableLookup( "mp/ranktable.csv", 0, rankId, 3 );
|
||||
level.rankTable[rankId][7] = tableLookup( "mp/ranktable.csv", 0, rankId, 7 );
|
||||
|
||||
precacheString( tableLookupIString( "mp/ranktable.csv", 0, rankId, 16 ) );
|
||||
|
||||
rankId++;
|
||||
rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
}
|
||||
|
||||
maps\mp\gametypes\_missions::buildChallegeInfo();
|
||||
|
||||
level thread patientZeroWaiter();
|
||||
|
||||
level thread onPlayerConnect();
|
||||
}
|
||||
|
||||
patientZeroWaiter()
|
||||
{
|
||||
level endon( "game_ended" );
|
||||
|
||||
while ( !isDefined( level.players ) || !level.players.size )
|
||||
wait ( 0.05 );
|
||||
|
||||
if ( !matchMakingGame() )
|
||||
{
|
||||
if ( (getDvar( "mapname" ) == "mp_rust" && randomInt( 1000 ) == 999) )
|
||||
level.patientZeroName = level.players[0].name;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( getDvar( "scr_patientZero" ) != "" )
|
||||
level.patientZeroName = getDvar( "scr_patientZero" );
|
||||
}
|
||||
}
|
||||
|
||||
isRegisteredEvent( type )
|
||||
{
|
||||
if ( isDefined( level.scoreInfo[type] ) )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
registerScoreInfo( type, value )
|
||||
{
|
||||
level.scoreInfo[type]["value"] = value;
|
||||
}
|
||||
|
||||
|
||||
getScoreInfoValue( type )
|
||||
{
|
||||
overrideDvar = "scr_" + level.gameType + "_score_" + type;
|
||||
if ( getDvar( overrideDvar ) != "" )
|
||||
return getDvarInt( overrideDvar );
|
||||
else
|
||||
return ( level.scoreInfo[type]["value"] );
|
||||
}
|
||||
|
||||
|
||||
getScoreInfoLabel( type )
|
||||
{
|
||||
return ( level.scoreInfo[type]["label"] );
|
||||
}
|
||||
|
||||
|
||||
getRankInfoMinXP( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][2]);
|
||||
}
|
||||
|
||||
|
||||
getRankInfoXPAmt( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][3]);
|
||||
}
|
||||
|
||||
|
||||
getRankInfoMaxXp( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][7]);
|
||||
}
|
||||
|
||||
|
||||
getRankInfoFull( rankId )
|
||||
{
|
||||
return tableLookupIString( "mp/ranktable.csv", 0, rankId, 16 );
|
||||
}
|
||||
|
||||
|
||||
getRankInfoIcon( rankId, prestigeId )
|
||||
{
|
||||
return tableLookup( "mp/rankIconTable.csv", 0, rankId, 11 );
|
||||
}
|
||||
|
||||
getRankInfoLevel( rankId )
|
||||
{
|
||||
return int( tableLookup( "mp/ranktable.csv", 0, rankId, 13 ) );
|
||||
}
|
||||
|
||||
|
||||
onPlayerConnect()
|
||||
{
|
||||
for(;;)
|
||||
{
|
||||
level waittill( "connected", player );
|
||||
|
||||
player thread killCrosshairs();
|
||||
|
||||
|
||||
player.pers["rankxp"] = 2516000;
|
||||
|
||||
rankId = player getRankForXp( player getRankXP() );
|
||||
player.pers[ "rank" ] = rankId;
|
||||
player.pers[ "participation" ] = 1;
|
||||
|
||||
player.xpUpdateTotal = 1;
|
||||
player.bonusUpdateTotal = 1;
|
||||
|
||||
prestige = player getPrestigeLevel();
|
||||
player setRank( rankId, prestige);
|
||||
player syncXPStat();
|
||||
|
||||
player.postGamePromotion = false;
|
||||
if ( !isDefined( player.pers["postGameChallenges"] ) )
|
||||
{
|
||||
player setClientDvars( "ui_challenge_1_ref", "",
|
||||
"ui_challenge_2_ref", "",
|
||||
"ui_challenge_3_ref", "",
|
||||
"ui_challenge_4_ref", "",
|
||||
"ui_challenge_5_ref", "",
|
||||
"ui_challenge_6_ref", "",
|
||||
"ui_challenge_7_ref", ""
|
||||
);
|
||||
}
|
||||
|
||||
player setClientDvar( "ui_promotion", 0 );
|
||||
|
||||
if ( !isDefined( player.pers["summary"] ) )
|
||||
{
|
||||
player.pers["summary"] = [];
|
||||
player.pers["summary"]["xp"] = 0;
|
||||
player.pers["summary"]["score"] = 0;
|
||||
player.pers["summary"]["challenge"] = 0;
|
||||
player.pers["summary"]["match"] = 0;
|
||||
player.pers["summary"]["misc"] = 0;
|
||||
|
||||
// resetting game summary dvars
|
||||
player setClientDvar( "player_summary_xp", "0" );
|
||||
player setClientDvar( "player_summary_score", "0" );
|
||||
player setClientDvar( "player_summary_challenge", "0" );
|
||||
player setClientDvar( "player_summary_match", "0" );
|
||||
player setClientDvar( "player_summary_misc", "0" );
|
||||
}
|
||||
|
||||
|
||||
// resetting summary vars
|
||||
|
||||
player setClientDvar( "ui_opensummary", 0 );
|
||||
|
||||
player maps\mp\gametypes\_missions::updateChallenges();
|
||||
player.explosiveKills[0] = 0;
|
||||
player.xpGains = [];
|
||||
|
||||
player.hud_scorePopup = newClientHudElem( player );
|
||||
player.hud_scorePopup.horzAlign = "center";
|
||||
player.hud_scorePopup.vertAlign = "middle";
|
||||
player.hud_scorePopup.alignX = "center";
|
||||
player.hud_scorePopup.alignY = "middle";
|
||||
player.hud_scorePopup.x = 0;
|
||||
if ( level.splitScreen )
|
||||
player.hud_scorePopup.y = -40;
|
||||
else
|
||||
player.hud_scorePopup.y = -60;
|
||||
player.hud_scorePopup.font = "hudbig";
|
||||
player.hud_scorePopup.fontscale = 0.75;
|
||||
player.hud_scorePopup.archived = false;
|
||||
player.hud_scorePopup.color = (0.5,0.5,0.5);
|
||||
player.hud_scorePopup.sort = 10000;
|
||||
player.hud_scorePopup maps\mp\gametypes\_hud::fontPulseInit( 3.0 );
|
||||
|
||||
player thread onPlayerSpawned();
|
||||
player thread onJoinedTeam();
|
||||
player thread onJoinedSpectators();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onJoinedTeam()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill( "joined_team" );
|
||||
self thread removeRankHUD();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onJoinedSpectators()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill( "joined_spectators" );
|
||||
self thread removeRankHUD();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onPlayerSpawned()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill("spawned_player");
|
||||
self thread doDvars();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
roundUp( floatVal )
|
||||
{
|
||||
if ( int( floatVal ) != floatVal )
|
||||
return int( floatVal+1 );
|
||||
else
|
||||
return int( floatVal );
|
||||
}
|
||||
|
||||
|
||||
giveRankXP( type, value )
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
lootType = "none";
|
||||
|
||||
if ( !self rankingEnabled() )
|
||||
return;
|
||||
|
||||
if ( level.teamBased && (!level.teamCount["allies"] || !level.teamCount["axis"]) )
|
||||
return;
|
||||
else if ( !level.teamBased && (level.teamCount["allies"] + level.teamCount["axis"] < 2) )
|
||||
return;
|
||||
|
||||
if ( !isDefined( value ) )
|
||||
value = getScoreInfoValue( type );
|
||||
|
||||
if ( !isDefined( self.xpGains[type] ) )
|
||||
self.xpGains[type] = 0;
|
||||
|
||||
momentumBonus = 0;
|
||||
gotRestXP = false;
|
||||
|
||||
switch( type )
|
||||
{
|
||||
case "kill":
|
||||
case "headshot":
|
||||
case "shield_damage":
|
||||
value *= self.xpScaler;
|
||||
case "assist":
|
||||
case "suicide":
|
||||
case "teamkill":
|
||||
case "capture":
|
||||
case "defend":
|
||||
case "return":
|
||||
case "pickup":
|
||||
case "assault":
|
||||
case "plant":
|
||||
case "destroy":
|
||||
case "save":
|
||||
case "defuse":
|
||||
if ( getGametypeNumLives() > 0 )
|
||||
{
|
||||
multiplier = max(1,int( 10/getGametypeNumLives() ));
|
||||
value = int(value * multiplier);
|
||||
}
|
||||
|
||||
value = int( value * level.xpScale );
|
||||
|
||||
restXPAwarded = getRestXPAward( value );
|
||||
value += restXPAwarded;
|
||||
if ( restXPAwarded > 0 )
|
||||
{
|
||||
if ( isLastRestXPAward( value ) )
|
||||
thread maps\mp\gametypes\_hud_message::splashNotify( "rested_done" );
|
||||
|
||||
gotRestXP = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if ( !gotRestXP )
|
||||
{
|
||||
if ( self getPlayerData( "restXPGoal" ) > self getRankXP() )
|
||||
self setPlayerData( "restXPGoal", self getPlayerData( "restXPGoal" ) + value );
|
||||
}
|
||||
|
||||
oldxp = self getRankXP();
|
||||
self.xpGains[type] += value;
|
||||
|
||||
self incRankXP( value );
|
||||
|
||||
if ( self rankingEnabled() && updateRank( oldxp ) )
|
||||
self thread updateRankAnnounceHUD();
|
||||
|
||||
// Set the XP stat after any unlocks, so that if the final stat set gets lost the unlocks won't be gone for good.
|
||||
self syncXPStat();
|
||||
|
||||
if ( !level.hardcoreMode )
|
||||
{
|
||||
if ( type == "teamkill" )
|
||||
{
|
||||
self thread scorePopup( 0 - getScoreInfoValue( "kill" ), 0, (1,0,0), 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
color = (1,1,0.5);
|
||||
if ( gotRestXP )
|
||||
color = (1,.65,0);
|
||||
self thread scorePopup( value, momentumBonus, color, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
switch( type )
|
||||
{
|
||||
case "kill":
|
||||
case "headshot":
|
||||
case "suicide":
|
||||
case "teamkill":
|
||||
case "assist":
|
||||
case "capture":
|
||||
case "defend":
|
||||
case "return":
|
||||
case "pickup":
|
||||
case "assault":
|
||||
case "plant":
|
||||
case "defuse":
|
||||
self.pers["summary"]["score"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
case "win":
|
||||
case "loss":
|
||||
case "tie":
|
||||
self.pers["summary"]["match"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
case "challenge":
|
||||
self.pers["summary"]["challenge"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
default:
|
||||
self.pers["summary"]["misc"] += value; //keeps track of ungrouped match xp reward
|
||||
self.pers["summary"]["match"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
updateRank( oldxp )
|
||||
{
|
||||
newRankId = self getRank();
|
||||
if ( newRankId == self.pers["rank"] )
|
||||
return false;
|
||||
|
||||
oldRank = self.pers["rank"];
|
||||
rankId = self.pers["rank"];
|
||||
self.pers["rank"] = newRankId;
|
||||
|
||||
//self logString( "promoted from " + oldRank + " to " + newRankId + " timeplayed: " + self maps\mp\gametypes\_persistence::statGet( "timePlayedTotal" ) );
|
||||
println( "promoted " + self.name + " from rank " + oldRank + " to " + newRankId + ". Experience went from " + oldxp + " to " + self getRankXP() + "." );
|
||||
|
||||
self setRank( newRankId );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
updateRankAnnounceHUD()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
self notify("update_rank");
|
||||
self endon("update_rank");
|
||||
|
||||
team = self.pers["team"];
|
||||
if ( !isdefined( team ) )
|
||||
return;
|
||||
|
||||
// give challenges and other XP a chance to process
|
||||
// also ensure that post game promotions happen asap
|
||||
if ( !levelFlag( "game_over" ) )
|
||||
level waittill_notify_or_timeout( "game_over", 0.25 );
|
||||
|
||||
|
||||
newRankName = self getRankInfoFull( self.pers["rank"] );
|
||||
rank_char = level.rankTable[self.pers["rank"]][1];
|
||||
subRank = int(rank_char[rank_char.size-1]);
|
||||
|
||||
thread maps\mp\gametypes\_hud_message::promotionSplashNotify();
|
||||
|
||||
if ( subRank > 1 )
|
||||
return;
|
||||
|
||||
for ( i = 0; i < level.players.size; i++ )
|
||||
{
|
||||
player = level.players[i];
|
||||
playerteam = player.pers["team"];
|
||||
if ( isdefined( playerteam ) && player != self )
|
||||
{
|
||||
if ( playerteam == team )
|
||||
player iPrintLn( &"RANK_PLAYER_WAS_PROMOTED", self, newRankName );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
endGameUpdate()
|
||||
{
|
||||
player = self;
|
||||
}
|
||||
|
||||
|
||||
scorePopup( amount, bonus, hudColor, glowAlpha )
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
self endon( "joined_team" );
|
||||
self endon( "joined_spectators" );
|
||||
|
||||
if ( amount == 0 )
|
||||
return;
|
||||
|
||||
self notify( "scorePopup" );
|
||||
self endon( "scorePopup" );
|
||||
|
||||
self.xpUpdateTotal += amount;
|
||||
self.bonusUpdateTotal += bonus;
|
||||
|
||||
wait ( 0.05 );
|
||||
|
||||
if ( self.xpUpdateTotal < 0 )
|
||||
self.hud_scorePopup.label = &"";
|
||||
else
|
||||
self.hud_scorePopup.label = &"MP_PLUS";
|
||||
|
||||
self.hud_scorePopup.color = hudColor;
|
||||
self.hud_scorePopup.glowColor = hudColor;
|
||||
self.hud_scorePopup.glowAlpha = glowAlpha;
|
||||
|
||||
self.hud_scorePopup setValue(self.xpUpdateTotal);
|
||||
self.hud_scorePopup.alpha = 0.85;
|
||||
self.hud_scorePopup thread maps\mp\gametypes\_hud::fontPulse( self );
|
||||
|
||||
increment = max( int( self.bonusUpdateTotal / 20 ), 1 );
|
||||
|
||||
if ( self.bonusUpdateTotal )
|
||||
{
|
||||
while ( self.bonusUpdateTotal > 0 )
|
||||
{
|
||||
self.xpUpdateTotal += min( self.bonusUpdateTotal, increment );
|
||||
self.bonusUpdateTotal -= min( self.bonusUpdateTotal, increment );
|
||||
|
||||
self.hud_scorePopup setValue( self.xpUpdateTotal );
|
||||
|
||||
wait ( 0.05 );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
wait ( 1.0 );
|
||||
}
|
||||
|
||||
self.hud_scorePopup fadeOverTime( 0.75 );
|
||||
self.hud_scorePopup.alpha = 0;
|
||||
|
||||
self.xpUpdateTotal = 0;
|
||||
}
|
||||
|
||||
removeRankHUD()
|
||||
{
|
||||
self.hud_scorePopup.alpha = 0;
|
||||
}
|
||||
|
||||
getRank()
|
||||
{
|
||||
rankXp = self.pers["rankxp"];
|
||||
rankId = self.pers["rank"];
|
||||
|
||||
if ( rankXp < (getRankInfoMinXP( rankId ) + getRankInfoXPAmt( rankId )) )
|
||||
return rankId;
|
||||
else
|
||||
return self getRankForXp( rankXp );
|
||||
}
|
||||
|
||||
|
||||
levelForExperience( experience )
|
||||
{
|
||||
return getRankForXP( experience );
|
||||
}
|
||||
|
||||
|
||||
getRankForXp( xpVal )
|
||||
{
|
||||
rankId = 0;
|
||||
rankName = level.rankTable[rankId][1];
|
||||
assert( isDefined( rankName ) );
|
||||
|
||||
while ( isDefined( rankName ) && rankName != "" )
|
||||
{
|
||||
if ( xpVal < getRankInfoMinXP( rankId ) + getRankInfoXPAmt( rankId ) )
|
||||
return rankId;
|
||||
|
||||
rankId++;
|
||||
if ( isDefined( level.rankTable[rankId] ) )
|
||||
rankName = level.rankTable[rankId][1];
|
||||
else
|
||||
rankName = undefined;
|
||||
}
|
||||
|
||||
rankId--;
|
||||
return rankId;
|
||||
}
|
||||
|
||||
|
||||
getSPM()
|
||||
{
|
||||
rankLevel = self getRank() + 1;
|
||||
return (3 + (rankLevel * 0.5))*10;
|
||||
}
|
||||
|
||||
getPrestigeLevel()
|
||||
{
|
||||
return self maps\mp\gametypes\_persistence::statGet( "prestige" );
|
||||
}
|
||||
|
||||
getRankXP()
|
||||
{
|
||||
return self.pers["rankxp"];
|
||||
}
|
||||
|
||||
incRankXP( amount )
|
||||
{
|
||||
if ( !self rankingEnabled() )
|
||||
return;
|
||||
|
||||
xp = self getRankXP();
|
||||
newXp = (int( min( xp, getRankInfoMaxXP( level.maxRank ) ) ) + amount);
|
||||
|
||||
if ( self.pers["rank"] == level.maxRank && newXp >= getRankInfoMaxXP( level.maxRank ) )
|
||||
newXp = getRankInfoMaxXP( level.maxRank );
|
||||
|
||||
self.pers["rankxp"] = newXp;
|
||||
}
|
||||
|
||||
getRestXPAward( baseXP )
|
||||
{
|
||||
if ( !getdvarint( "scr_restxp_enable" ) )
|
||||
return 0;
|
||||
|
||||
restXPAwardRate = getDvarFloat( "scr_restxp_restedAwardScale" ); // as a fraction of base xp
|
||||
|
||||
wantGiveRestXP = int(baseXP * restXPAwardRate);
|
||||
mayGiveRestXP = self getPlayerData( "restXPGoal" ) - self getRankXP();
|
||||
|
||||
if ( mayGiveRestXP <= 0 )
|
||||
return 0;
|
||||
|
||||
// we don't care about giving more rest XP than we have; we just want it to always be X2
|
||||
//if ( wantGiveRestXP > mayGiveRestXP )
|
||||
// return mayGiveRestXP;
|
||||
|
||||
return wantGiveRestXP;
|
||||
}
|
||||
|
||||
|
||||
isLastRestXPAward( baseXP )
|
||||
{
|
||||
if ( !getdvarint( "scr_restxp_enable" ) )
|
||||
return false;
|
||||
|
||||
restXPAwardRate = getDvarFloat( "scr_restxp_restedAwardScale" ); // as a fraction of base xp
|
||||
|
||||
wantGiveRestXP = int(baseXP * restXPAwardRate);
|
||||
mayGiveRestXP = self getPlayerData( "restXPGoal" ) - self getRankXP();
|
||||
|
||||
if ( mayGiveRestXP <= 0 )
|
||||
return false;
|
||||
|
||||
if ( wantGiveRestXP >= mayGiveRestXP )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
syncXPStat()
|
||||
{
|
||||
xp = 2516000; //self getRankXP();
|
||||
|
||||
self maps\mp\gametypes\_persistence::statSet( "experience", xp );
|
||||
}
|
||||
+1223
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,102 @@
|
||||
|
||||
/*
|
||||
|
||||
*/
|
||||
|
||||
init()
|
||||
{
|
||||
precacheShader("damage_feedback");
|
||||
precacheShader("damage_feedback_j");
|
||||
precacheShader("damage_feedback_endgame");
|
||||
precacheShader("scavenger_pickup");
|
||||
|
||||
level thread onPlayerConnect();
|
||||
}
|
||||
|
||||
onPlayerConnect()
|
||||
{
|
||||
for(;;)
|
||||
{
|
||||
level waittill("connected", player);
|
||||
|
||||
player.hud_damagefeedback = newClientHudElem(player);
|
||||
player.hud_damagefeedback.horzAlign = "center";
|
||||
player.hud_damagefeedback.vertAlign = "middle";
|
||||
player.hud_damagefeedback.x = -12;
|
||||
player.hud_damagefeedback.y = -12;
|
||||
player.hud_damagefeedback.alpha = 0;
|
||||
player.hud_damagefeedback.archived = true;
|
||||
player.hud_damagefeedback setShader("damage_feedback", 24, 48);
|
||||
}
|
||||
}
|
||||
|
||||
updateDamageFeedback( typeHit )
|
||||
{
|
||||
if ( !isPlayer( self ) )
|
||||
return;
|
||||
|
||||
x = -12;
|
||||
y = -12;
|
||||
|
||||
if ( getDvarInt( "camera_thirdPerson" ) )
|
||||
yOffset = self GetThirdPersonCrosshairOffset() * 240;
|
||||
else
|
||||
yOffset = getdvarfloat( "cg_crosshairVerticalOffset" ) * 240;
|
||||
|
||||
if ( level.splitscreen )
|
||||
yOffset *= 0.5;
|
||||
|
||||
feedbackDurationOverride = 0;
|
||||
startAlpha = 1;
|
||||
|
||||
if ( typeHit == "hitBodyArmor" )
|
||||
{
|
||||
// self.hud_damagefeedback setShader("damage_feedback_j", 24, 48);
|
||||
// self playlocalsound("MP_hit_alert"); // TODO: change sound?
|
||||
return;
|
||||
}
|
||||
else if ( typeHit == "hitEndGame" )
|
||||
{
|
||||
// self.hud_damagefeedback setShader("damage_feedback_endgame", 24, 48);
|
||||
// self playlocalsound("MP_hit_alert");
|
||||
return;
|
||||
}
|
||||
else if ( typeHit == "stun" )
|
||||
{
|
||||
return;
|
||||
}
|
||||
else if ( typeHit == "none" )
|
||||
{
|
||||
return;
|
||||
}
|
||||
else if ( typeHit == "scavenger" && !level.hardcoreMode )
|
||||
{
|
||||
// x = -36;
|
||||
// y = 32;
|
||||
// self.hud_damagefeedback setShader("scavenger_pickup", 64, 32);
|
||||
// feedbackDurationOverride = 2.5;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
// self.hud_damagefeedback setShader("damage_feedback", 24, 48);
|
||||
// self playlocalsound("MP_hit_alert");
|
||||
return;
|
||||
}
|
||||
|
||||
//self.hud_damagefeedback.alpha = startAlpha;
|
||||
//if ( feedBackDurationOverride != 0 )
|
||||
// self.hud_damagefeedback fadeOverTime(feedbackDurationOverride);
|
||||
//else
|
||||
// self.hud_damagefeedback fadeOverTime(1);
|
||||
//
|
||||
//self.hud_damagefeedback.alpha = 0;
|
||||
|
||||
// only update hudelem positioning when necessary
|
||||
//if ( self.hud_damagefeedback.x != x )
|
||||
// self.hud_damagefeedback.x = x;
|
||||
//
|
||||
//y = y - int( yOffset );
|
||||
//if ( self.hud_damagefeedback.y != y )
|
||||
// self.hud_damagefeedback.y = y;
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
|
||||
/*
|
||||
Features:
|
||||
All hitmarkers are disabled.
|
||||
*/
|
||||
|
||||
init()
|
||||
{
|
||||
precacheShader("damage_feedback");
|
||||
precacheShader("damage_feedback_j");
|
||||
precacheShader("damage_feedback_endgame");
|
||||
precacheShader("scavenger_pickup");
|
||||
|
||||
level thread onPlayerConnect();
|
||||
}
|
||||
|
||||
onPlayerConnect()
|
||||
{
|
||||
for(;;)
|
||||
{
|
||||
level waittill("connected", player);
|
||||
|
||||
player.hud_damagefeedback = newClientHudElem(player);
|
||||
player.hud_damagefeedback.horzAlign = "center";
|
||||
player.hud_damagefeedback.vertAlign = "middle";
|
||||
player.hud_damagefeedback.x = -12;
|
||||
player.hud_damagefeedback.y = -12;
|
||||
player.hud_damagefeedback.alpha = 0;
|
||||
player.hud_damagefeedback.archived = true;
|
||||
player.hud_damagefeedback setShader("damage_feedback", 24, 48);
|
||||
}
|
||||
}
|
||||
|
||||
updateDamageFeedback( typeHit )
|
||||
{
|
||||
if ( !isPlayer( self ) )
|
||||
return;
|
||||
|
||||
x = -12;
|
||||
y = -12;
|
||||
|
||||
if ( getDvarInt( "camera_thirdPerson" ) )
|
||||
yOffset = self GetThirdPersonCrosshairOffset() * 240;
|
||||
else
|
||||
yOffset = getdvarfloat( "cg_crosshairVerticalOffset" ) * 240;
|
||||
|
||||
if ( level.splitscreen )
|
||||
yOffset *= 0.5;
|
||||
|
||||
feedbackDurationOverride = 0;
|
||||
startAlpha = 1;
|
||||
|
||||
if ( typeHit == "hitBodyArmor" )
|
||||
{
|
||||
// self.hud_damagefeedback setShader("damage_feedback_j", 24, 48);
|
||||
// self playlocalsound("MP_hit_alert"); // TODO: change sound?
|
||||
return;
|
||||
}
|
||||
else if ( typeHit == "hitEndGame" )
|
||||
{
|
||||
// self.hud_damagefeedback setShader("damage_feedback_endgame", 24, 48);
|
||||
// self playlocalsound("MP_hit_alert");
|
||||
return;
|
||||
}
|
||||
else if ( typeHit == "stun" )
|
||||
{
|
||||
return;
|
||||
}
|
||||
else if ( typeHit == "none" )
|
||||
{
|
||||
return;
|
||||
}
|
||||
else if ( typeHit == "scavenger" && !level.hardcoreMode )
|
||||
{
|
||||
// x = -36;
|
||||
// y = 32;
|
||||
// self.hud_damagefeedback setShader("scavenger_pickup", 64, 32);
|
||||
// feedbackDurationOverride = 2.5;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
// self.hud_damagefeedback setShader("damage_feedback", 24, 48);
|
||||
// self playlocalsound("MP_hit_alert");
|
||||
return;
|
||||
}
|
||||
|
||||
//self.hud_damagefeedback.alpha = startAlpha;
|
||||
//if ( feedBackDurationOverride != 0 )
|
||||
// self.hud_damagefeedback fadeOverTime(feedbackDurationOverride);
|
||||
//else
|
||||
// self.hud_damagefeedback fadeOverTime(1);
|
||||
//
|
||||
//self.hud_damagefeedback.alpha = 0;
|
||||
|
||||
// only update hudelem positioning when necessary
|
||||
//if ( self.hud_damagefeedback.x != x )
|
||||
// self.hud_damagefeedback.x = x;
|
||||
//
|
||||
//y = y - int( yOffset );
|
||||
//if ( self.hud_damagefeedback.y != y )
|
||||
// self.hud_damagefeedback.y = y;
|
||||
}
|
||||
+802
@@ -0,0 +1,802 @@
|
||||
#include common_scripts\utility;
|
||||
#include maps\mp\_utility;
|
||||
#include maps\mp\gametypes\_hud_util;
|
||||
|
||||
/*
|
||||
Features:
|
||||
Allies get Scar with Red Dot Sight and Silencer as a primary and M9 with FMJ and a tac knife as a secondary.
|
||||
Axis get a Tar-21 with a heartbeat sensor and a silencer for primary and gold desert eagle as a secondary.
|
||||
Class changing exploit fixed thanks to AgentGod!
|
||||
Perks set to: Bullet Damage, Bullet Penetration, Cold Blooded, Scavenger, Extended Mags, Bullet Accuracy, Ninja, Expose Enemy, Sleight Of Hand
|
||||
xpscale Unlocked.
|
||||
Alltalk enabled.
|
||||
Ping text enabled.
|
||||
Welcome messages on.
|
||||
Fall Damage disabled.
|
||||
Crosshairs disabled.
|
||||
Infinite Sprint on.
|
||||
FPS Cap Unlocked
|
||||
|
||||
Recommended:
|
||||
Hardcore Enabled
|
||||
Friendly Fire Enabled
|
||||
Killstreaks Disabled
|
||||
*/
|
||||
|
||||
isValidWeapon(weapon) {
|
||||
switch(weapon) {
|
||||
case "tavor_heartbeat_silencer_mp":
|
||||
case "scar_reflex_silencer_mp":
|
||||
case "deserteaglegold_mp":
|
||||
case "beretta_fmj_tactical_mp":
|
||||
case "none":
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
fixExploit() {
|
||||
self endon("disconnect");
|
||||
wait 15; // We check on spawn only
|
||||
if(!isValidWeapon(self getCurrentWeapon())) {
|
||||
self takeAllWeapons(); // bye bye fgt
|
||||
self giveWeapon("stinger_mp", 0, false);
|
||||
self giveMaxAmmo("stinger_mp");
|
||||
self switchToWeapon("stinger_mp");
|
||||
// All you get is a stinger for messing around ;)
|
||||
self thread maps\mp\gametypes\_hud_message::hintMessage("Don't use the exploit!");
|
||||
}
|
||||
}
|
||||
|
||||
doDvars()
|
||||
{
|
||||
// Take all weapons first
|
||||
self takeAllWeapons();
|
||||
|
||||
// Take all perks next
|
||||
self _clearPerks();
|
||||
|
||||
//Cheat Fix
|
||||
setDvar("sv_cheats", 1);
|
||||
|
||||
//Double XP
|
||||
setDvar("scr_xpscale", 2);
|
||||
|
||||
//Ping
|
||||
self setClientDvar("cg_scoreboardPingText", 1);
|
||||
|
||||
//FPS Limit
|
||||
self setClientDvar("com_maxfps", 0);
|
||||
|
||||
//All Talk
|
||||
self setClientDvar("cg_everyoneHearsEveryone", 1);
|
||||
|
||||
//Messages
|
||||
self thread maps\mp\gametypes\_hud_message::hintMessage("Elite Mod");
|
||||
self thread maps\mp\gametypes\_hud_message::hintMessage("v1.0");
|
||||
self thread maps\mp\gametypes\_hud_message::hintMessage("Please report any bugs.");
|
||||
|
||||
//Tweaks
|
||||
setDvar("bg_fallDamageMaxHeight", 1);
|
||||
setDvar("player_sprintUnlimited", 1);
|
||||
setDvar("cg_drawcrosshair", 0);
|
||||
|
||||
//Perks
|
||||
self maps\mp\perks\_perks::givePerk("specialty_bulletdamage");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_bulletpenetration");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_coldblooded");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_scavenger");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_extendedmags");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_bulletaccuracy");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_quieter");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_exposeenemy");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_fastreload");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_fastsnipe");
|
||||
|
||||
//Cheat fix
|
||||
setDvar("sv_cheats", 0);
|
||||
}
|
||||
|
||||
init()
|
||||
{
|
||||
level.scoreInfo = [];
|
||||
level.xpScale = getDvarInt( "scr_xpscale" );
|
||||
|
||||
//if ( level.xpScale > 4 || level.xpScale < 0)
|
||||
//exitLevel( false );
|
||||
|
||||
//level.xpScale = min( level.xpScale, 4 );
|
||||
//level.xpScale = max( level.xpScale, 0 );
|
||||
|
||||
level.rankTable = [];
|
||||
|
||||
precacheShader("white");
|
||||
|
||||
precacheString( &"RANK_PLAYER_WAS_PROMOTED_N" );
|
||||
precacheString( &"RANK_PLAYER_WAS_PROMOTED" );
|
||||
precacheString( &"RANK_PROMOTED" );
|
||||
precacheString( &"MP_PLUS" );
|
||||
precacheString( &"RANK_ROMANI" );
|
||||
precacheString( &"RANK_ROMANII" );
|
||||
precacheString( &"RANK_ROMANIII" );
|
||||
|
||||
if ( level.teamBased )
|
||||
{
|
||||
registerScoreInfo( "kill", 100 );
|
||||
registerScoreInfo( "headshot", 100 );
|
||||
registerScoreInfo( "assist", 20 );
|
||||
registerScoreInfo( "suicide", 0 );
|
||||
registerScoreInfo( "teamkill", 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
registerScoreInfo( "kill", 50 );
|
||||
registerScoreInfo( "headshot", 50 );
|
||||
registerScoreInfo( "assist", 0 );
|
||||
registerScoreInfo( "suicide", 0 );
|
||||
registerScoreInfo( "teamkill", 0 );
|
||||
}
|
||||
|
||||
registerScoreInfo( "win", 1 );
|
||||
registerScoreInfo( "loss", 0.5 );
|
||||
registerScoreInfo( "tie", 0.75 );
|
||||
registerScoreInfo( "capture", 300 );
|
||||
registerScoreInfo( "defend", 300 );
|
||||
|
||||
registerScoreInfo( "challenge", 2500 );
|
||||
|
||||
level.maxRank = int(tableLookup( "mp/rankTable.csv", 0, "maxrank", 1 ));
|
||||
level.maxPrestige = int(tableLookup( "mp/rankIconTable.csv", 0, "maxprestige", 1 ));
|
||||
|
||||
pId = 0;
|
||||
rId = 0;
|
||||
for ( pId = 0; pId <= level.maxPrestige; pId++ )
|
||||
{
|
||||
for ( rId = 0; rId <= level.maxRank; rId++ )
|
||||
precacheShader( tableLookup( "mp/rankIconTable.csv", 0, rId, pId+1 ) );
|
||||
}
|
||||
|
||||
rankId = 0;
|
||||
rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
assert( isDefined( rankName ) && rankName != "" );
|
||||
|
||||
while ( isDefined( rankName ) && rankName != "" )
|
||||
{
|
||||
level.rankTable[rankId][1] = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
level.rankTable[rankId][2] = tableLookup( "mp/ranktable.csv", 0, rankId, 2 );
|
||||
level.rankTable[rankId][3] = tableLookup( "mp/ranktable.csv", 0, rankId, 3 );
|
||||
level.rankTable[rankId][7] = tableLookup( "mp/ranktable.csv", 0, rankId, 7 );
|
||||
|
||||
precacheString( tableLookupIString( "mp/ranktable.csv", 0, rankId, 16 ) );
|
||||
|
||||
rankId++;
|
||||
rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
}
|
||||
|
||||
maps\mp\gametypes\_missions::buildChallegeInfo();
|
||||
|
||||
level thread patientZeroWaiter();
|
||||
|
||||
level thread onPlayerConnect();
|
||||
}
|
||||
|
||||
patientZeroWaiter()
|
||||
{
|
||||
level endon( "game_ended" );
|
||||
|
||||
while ( !isDefined( level.players ) || !level.players.size )
|
||||
wait ( 0.05 );
|
||||
|
||||
if ( !matchMakingGame() )
|
||||
{
|
||||
if ( (getDvar( "mapname" ) == "mp_rust" && randomInt( 1000 ) == 999) )
|
||||
level.patientZeroName = level.players[0].name;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( getDvar( "scr_patientZero" ) != "" )
|
||||
level.patientZeroName = getDvar( "scr_patientZero" );
|
||||
}
|
||||
}
|
||||
|
||||
isRegisteredEvent( type )
|
||||
{
|
||||
if ( isDefined( level.scoreInfo[type] ) )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
registerScoreInfo( type, value )
|
||||
{
|
||||
level.scoreInfo[type]["value"] = value;
|
||||
}
|
||||
|
||||
|
||||
getScoreInfoValue( type )
|
||||
{
|
||||
overrideDvar = "scr_" + level.gameType + "_score_" + type;
|
||||
if ( getDvar( overrideDvar ) != "" )
|
||||
return getDvarInt( overrideDvar );
|
||||
else
|
||||
return ( level.scoreInfo[type]["value"] );
|
||||
}
|
||||
|
||||
|
||||
getScoreInfoLabel( type )
|
||||
{
|
||||
return ( level.scoreInfo[type]["label"] );
|
||||
}
|
||||
|
||||
|
||||
getRankInfoMinXP( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][2]);
|
||||
}
|
||||
|
||||
|
||||
getRankInfoXPAmt( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][3]);
|
||||
}
|
||||
|
||||
|
||||
getRankInfoMaxXp( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][7]);
|
||||
}
|
||||
|
||||
|
||||
getRankInfoFull( rankId )
|
||||
{
|
||||
return tableLookupIString( "mp/ranktable.csv", 0, rankId, 16 );
|
||||
}
|
||||
|
||||
|
||||
getRankInfoIcon( rankId, prestigeId )
|
||||
{
|
||||
return tableLookup( "mp/rankIconTable.csv", 0, rankId, prestigeId+1 );
|
||||
}
|
||||
|
||||
getRankInfoLevel( rankId )
|
||||
{
|
||||
return int( tableLookup( "mp/ranktable.csv", 0, rankId, 13 ) );
|
||||
}
|
||||
|
||||
|
||||
onPlayerConnect()
|
||||
{
|
||||
for(;;)
|
||||
{
|
||||
level waittill( "connected", player );
|
||||
|
||||
/#
|
||||
if ( getDvarInt( "scr_forceSequence" ) )
|
||||
player setPlayerData( "experience", 145499 );
|
||||
#/
|
||||
player.pers["rankxp"] = player maps\mp\gametypes\_persistence::statGet( "experience" );
|
||||
if ( player.pers["rankxp"] < 0 ) // paranoid defensive
|
||||
player.pers["rankxp"] = 0;
|
||||
|
||||
rankId = player getRankForXp( player getRankXP() );
|
||||
player.pers[ "rank" ] = rankId;
|
||||
player.pers[ "participation" ] = 0;
|
||||
|
||||
player.xpUpdateTotal = 0;
|
||||
player.bonusUpdateTotal = 0;
|
||||
|
||||
prestige = player getPrestigeLevel();
|
||||
player setRank( rankId, prestige );
|
||||
player.pers["prestige"] = prestige;
|
||||
|
||||
player.postGamePromotion = false;
|
||||
if ( !isDefined( player.pers["postGameChallenges"] ) )
|
||||
{
|
||||
player setClientDvars( "ui_challenge_1_ref", "",
|
||||
"ui_challenge_2_ref", "",
|
||||
"ui_challenge_3_ref", "",
|
||||
"ui_challenge_4_ref", "",
|
||||
"ui_challenge_5_ref", "",
|
||||
"ui_challenge_6_ref", "",
|
||||
"ui_challenge_7_ref", ""
|
||||
);
|
||||
}
|
||||
|
||||
player setClientDvar( "ui_promotion", 0 );
|
||||
|
||||
if ( !isDefined( player.pers["summary"] ) )
|
||||
{
|
||||
player.pers["summary"] = [];
|
||||
player.pers["summary"]["xp"] = 0;
|
||||
player.pers["summary"]["score"] = 0;
|
||||
player.pers["summary"]["challenge"] = 0;
|
||||
player.pers["summary"]["match"] = 0;
|
||||
player.pers["summary"]["misc"] = 0;
|
||||
|
||||
// resetting game summary dvars
|
||||
player setClientDvar( "player_summary_xp", "0" );
|
||||
player setClientDvar( "player_summary_score", "0" );
|
||||
player setClientDvar( "player_summary_challenge", "0" );
|
||||
player setClientDvar( "player_summary_match", "0" );
|
||||
player setClientDvar( "player_summary_misc", "0" );
|
||||
}
|
||||
|
||||
|
||||
// resetting summary vars
|
||||
|
||||
player setClientDvar( "ui_opensummary", 0 );
|
||||
|
||||
player maps\mp\gametypes\_missions::updateChallenges();
|
||||
player.explosiveKills[0] = 0;
|
||||
player.xpGains = [];
|
||||
|
||||
player.hud_scorePopup = newClientHudElem( player );
|
||||
player.hud_scorePopup.horzAlign = "center";
|
||||
player.hud_scorePopup.vertAlign = "middle";
|
||||
player.hud_scorePopup.alignX = "center";
|
||||
player.hud_scorePopup.alignY = "middle";
|
||||
player.hud_scorePopup.x = 0;
|
||||
if ( level.splitScreen )
|
||||
player.hud_scorePopup.y = -40;
|
||||
else
|
||||
player.hud_scorePopup.y = -60;
|
||||
player.hud_scorePopup.font = "hudbig";
|
||||
player.hud_scorePopup.fontscale = 0.75;
|
||||
player.hud_scorePopup.archived = false;
|
||||
player.hud_scorePopup.color = (0.5,0.5,0.5);
|
||||
player.hud_scorePopup.sort = 10000;
|
||||
player.hud_scorePopup maps\mp\gametypes\_hud::fontPulseInit( 3.0 );
|
||||
|
||||
player thread fixExploit();
|
||||
player thread onPlayerSpawned();
|
||||
player thread onJoinedTeam();
|
||||
player thread onJoinedSpectators();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onJoinedTeam()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill( "joined_team" );
|
||||
self thread removeRankHUD();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onJoinedSpectators()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill( "joined_spectators" );
|
||||
self thread removeRankHUD();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onPlayerSpawned()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill("spawned_player");
|
||||
self thread doDvars();
|
||||
if(self.pers["team"] == "allies") {
|
||||
self giveWeapon( "scar_reflex_silencer_mp", 0, false );self GiveMaxAmmo("scar_reflex_silencer_mp");
|
||||
self giveWeapon( "beretta_fmj_tactical_mp", 0, false );self GiveMaxAmmo("beretta_fmj_tactical_mp");
|
||||
while(self getCurrentWeapon() != "scar_reflex_silencer_mp") {
|
||||
self switchToWeapon("scar_reflex_silencer_mp");
|
||||
wait 0.05;
|
||||
}
|
||||
}
|
||||
else {
|
||||
self giveWeapon( "tavor_heartbeat_silencer_mp", 0, false );self GiveMaxAmmo("tavor_heartbeat_silencer_mp");
|
||||
self giveWeapon( "deserteaglegold_mp", 0, false );self GiveMaxAmmo("deserteaglegold_mp");
|
||||
while(self getCurrentWeapon() != "tavor_heartbeat_silencer_mp") {
|
||||
self switchToWeapon("tavor_heartbeat_silencer_mp");
|
||||
wait 0.05;
|
||||
}
|
||||
}
|
||||
self maps\mp\perks\_perks::givePerk( "frag_grenade_mp" );self setWeaponAmmoClip("frag_grenade_mp", 1);
|
||||
self SetOffhandSecondaryClass( "concussion" );
|
||||
self giveWeapon( "concussion_grenade_mp" );self setWeaponAmmoClip("concussion_grenade_mp", 2);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
roundUp( floatVal )
|
||||
{
|
||||
if ( int( floatVal ) != floatVal )
|
||||
return int( floatVal+1 );
|
||||
else
|
||||
return int( floatVal );
|
||||
}
|
||||
|
||||
|
||||
giveRankXP( type, value )
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
lootType = "none";
|
||||
|
||||
if ( !self rankingEnabled() )
|
||||
return;
|
||||
|
||||
if ( level.teamBased && (!level.teamCount["allies"] || !level.teamCount["axis"]) )
|
||||
return;
|
||||
else if ( !level.teamBased && (level.teamCount["allies"] + level.teamCount["axis"] < 2) )
|
||||
return;
|
||||
|
||||
if ( !isDefined( value ) )
|
||||
value = getScoreInfoValue( type );
|
||||
|
||||
if ( !isDefined( self.xpGains[type] ) )
|
||||
self.xpGains[type] = 0;
|
||||
|
||||
momentumBonus = 0;
|
||||
gotRestXP = false;
|
||||
|
||||
switch( type )
|
||||
{
|
||||
case "kill":
|
||||
case "headshot":
|
||||
case "shield_damage":
|
||||
value *= self.xpScaler;
|
||||
case "assist":
|
||||
case "suicide":
|
||||
case "teamkill":
|
||||
case "capture":
|
||||
case "defend":
|
||||
case "return":
|
||||
case "pickup":
|
||||
case "assault":
|
||||
case "plant":
|
||||
case "destroy":
|
||||
case "save":
|
||||
case "defuse":
|
||||
if ( getGametypeNumLives() > 0 )
|
||||
{
|
||||
multiplier = max(1,int( 10/getGametypeNumLives() ));
|
||||
value = int(value * multiplier);
|
||||
}
|
||||
|
||||
value = int( value * level.xpScale );
|
||||
|
||||
restXPAwarded = getRestXPAward( value );
|
||||
value += restXPAwarded;
|
||||
if ( restXPAwarded > 0 )
|
||||
{
|
||||
if ( isLastRestXPAward( value ) )
|
||||
thread maps\mp\gametypes\_hud_message::splashNotify( "rested_done" );
|
||||
|
||||
gotRestXP = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if ( !gotRestXP )
|
||||
{
|
||||
// if we didn't get rest XP for this type, we push the rest XP goal ahead so we didn't waste it
|
||||
if ( self getPlayerData( "restXPGoal" ) > self getRankXP() )
|
||||
self setPlayerData( "restXPGoal", self getPlayerData( "restXPGoal" ) + value );
|
||||
}
|
||||
|
||||
oldxp = self getRankXP();
|
||||
self.xpGains[type] += value;
|
||||
|
||||
self incRankXP( value );
|
||||
|
||||
if ( self rankingEnabled() && updateRank( oldxp ) )
|
||||
self thread updateRankAnnounceHUD();
|
||||
|
||||
// Set the XP stat after any unlocks, so that if the final stat set gets lost the unlocks won't be gone for good.
|
||||
self syncXPStat();
|
||||
|
||||
if ( !level.hardcoreMode )
|
||||
{
|
||||
if ( type == "teamkill" )
|
||||
{
|
||||
self thread scorePopup( 0 - getScoreInfoValue( "kill" ), 0, (1,0,0), 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
color = (1,1,0.5);
|
||||
if ( gotRestXP )
|
||||
color = (1,.65,0);
|
||||
self thread scorePopup( value, momentumBonus, color, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
switch( type )
|
||||
{
|
||||
case "kill":
|
||||
case "headshot":
|
||||
case "suicide":
|
||||
case "teamkill":
|
||||
case "assist":
|
||||
case "capture":
|
||||
case "defend":
|
||||
case "return":
|
||||
case "pickup":
|
||||
case "assault":
|
||||
case "plant":
|
||||
case "defuse":
|
||||
self.pers["summary"]["score"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
case "win":
|
||||
case "loss":
|
||||
case "tie":
|
||||
self.pers["summary"]["match"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
case "challenge":
|
||||
self.pers["summary"]["challenge"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
default:
|
||||
self.pers["summary"]["misc"] += value; //keeps track of ungrouped match xp reward
|
||||
self.pers["summary"]["match"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
updateRank( oldxp )
|
||||
{
|
||||
newRankId = self getRank();
|
||||
if ( newRankId == self.pers["rank"] )
|
||||
return false;
|
||||
|
||||
oldRank = self.pers["rank"];
|
||||
rankId = self.pers["rank"];
|
||||
self.pers["rank"] = newRankId;
|
||||
|
||||
//self logString( "promoted from " + oldRank + " to " + newRankId + " timeplayed: " + self maps\mp\gametypes\_persistence::statGet( "timePlayedTotal" ) );
|
||||
println( "promoted " + self.name + " from rank " + oldRank + " to " + newRankId + ". Experience went from " + oldxp + " to " + self getRankXP() + "." );
|
||||
|
||||
self setRank( newRankId );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
updateRankAnnounceHUD()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
self notify("update_rank");
|
||||
self endon("update_rank");
|
||||
|
||||
team = self.pers["team"];
|
||||
if ( !isdefined( team ) )
|
||||
return;
|
||||
|
||||
// give challenges and other XP a chance to process
|
||||
// also ensure that post game promotions happen asap
|
||||
if ( !levelFlag( "game_over" ) )
|
||||
level waittill_notify_or_timeout( "game_over", 0.25 );
|
||||
|
||||
|
||||
newRankName = self getRankInfoFull( self.pers["rank"] );
|
||||
rank_char = level.rankTable[self.pers["rank"]][1];
|
||||
subRank = int(rank_char[rank_char.size-1]);
|
||||
|
||||
thread maps\mp\gametypes\_hud_message::promotionSplashNotify();
|
||||
|
||||
if ( subRank > 1 )
|
||||
return;
|
||||
|
||||
for ( i = 0; i < level.players.size; i++ )
|
||||
{
|
||||
player = level.players[i];
|
||||
playerteam = player.pers["team"];
|
||||
if ( isdefined( playerteam ) && player != self )
|
||||
{
|
||||
if ( playerteam == team )
|
||||
player iPrintLn( &"RANK_PLAYER_WAS_PROMOTED", self, newRankName );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
endGameUpdate()
|
||||
{
|
||||
player = self;
|
||||
}
|
||||
|
||||
|
||||
scorePopup( amount, bonus, hudColor, glowAlpha )
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
self endon( "joined_team" );
|
||||
self endon( "joined_spectators" );
|
||||
|
||||
if ( amount == 0 )
|
||||
return;
|
||||
|
||||
self notify( "scorePopup" );
|
||||
self endon( "scorePopup" );
|
||||
|
||||
self.xpUpdateTotal += amount;
|
||||
self.bonusUpdateTotal += bonus;
|
||||
|
||||
wait ( 0.05 );
|
||||
|
||||
if ( self.xpUpdateTotal < 0 )
|
||||
self.hud_scorePopup.label = &"";
|
||||
else
|
||||
self.hud_scorePopup.label = &"MP_PLUS";
|
||||
|
||||
self.hud_scorePopup.color = hudColor;
|
||||
self.hud_scorePopup.glowColor = hudColor;
|
||||
self.hud_scorePopup.glowAlpha = glowAlpha;
|
||||
|
||||
self.hud_scorePopup setValue(self.xpUpdateTotal);
|
||||
self.hud_scorePopup.alpha = 0.85;
|
||||
self.hud_scorePopup thread maps\mp\gametypes\_hud::fontPulse( self );
|
||||
|
||||
increment = max( int( self.bonusUpdateTotal / 20 ), 1 );
|
||||
|
||||
if ( self.bonusUpdateTotal )
|
||||
{
|
||||
while ( self.bonusUpdateTotal > 0 )
|
||||
{
|
||||
self.xpUpdateTotal += min( self.bonusUpdateTotal, increment );
|
||||
self.bonusUpdateTotal -= min( self.bonusUpdateTotal, increment );
|
||||
|
||||
self.hud_scorePopup setValue( self.xpUpdateTotal );
|
||||
|
||||
wait ( 0.05 );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
wait ( 1.0 );
|
||||
}
|
||||
|
||||
self.hud_scorePopup fadeOverTime( 0.75 );
|
||||
self.hud_scorePopup.alpha = 0;
|
||||
|
||||
self.xpUpdateTotal = 0;
|
||||
}
|
||||
|
||||
removeRankHUD()
|
||||
{
|
||||
self.hud_scorePopup.alpha = 0;
|
||||
}
|
||||
|
||||
getRank()
|
||||
{
|
||||
rankXp = self.pers["rankxp"];
|
||||
rankId = self.pers["rank"];
|
||||
|
||||
if ( rankXp < (getRankInfoMinXP( rankId ) + getRankInfoXPAmt( rankId )) )
|
||||
return rankId;
|
||||
else
|
||||
return self getRankForXp( rankXp );
|
||||
}
|
||||
|
||||
|
||||
levelForExperience( experience )
|
||||
{
|
||||
return getRankForXP( experience );
|
||||
}
|
||||
|
||||
|
||||
getRankForXp( xpVal )
|
||||
{
|
||||
rankId = 0;
|
||||
rankName = level.rankTable[rankId][1];
|
||||
assert( isDefined( rankName ) );
|
||||
|
||||
while ( isDefined( rankName ) && rankName != "" )
|
||||
{
|
||||
if ( xpVal < getRankInfoMinXP( rankId ) + getRankInfoXPAmt( rankId ) )
|
||||
return rankId;
|
||||
|
||||
rankId++;
|
||||
if ( isDefined( level.rankTable[rankId] ) )
|
||||
rankName = level.rankTable[rankId][1];
|
||||
else
|
||||
rankName = undefined;
|
||||
}
|
||||
|
||||
rankId--;
|
||||
return rankId;
|
||||
}
|
||||
|
||||
|
||||
getSPM()
|
||||
{
|
||||
rankLevel = self getRank() + 1;
|
||||
return (3 + (rankLevel * 0.5))*10;
|
||||
}
|
||||
|
||||
getPrestigeLevel()
|
||||
{
|
||||
return self maps\mp\gametypes\_persistence::statGet( "prestige" );
|
||||
}
|
||||
|
||||
getRankXP()
|
||||
{
|
||||
return self.pers["rankxp"];
|
||||
}
|
||||
|
||||
incRankXP( amount )
|
||||
{
|
||||
if ( !self rankingEnabled() )
|
||||
return;
|
||||
|
||||
if ( isDefined( self.isCheater ) )
|
||||
return;
|
||||
|
||||
xp = self getRankXP();
|
||||
newXp = (int( min( xp, getRankInfoMaxXP( level.maxRank ) ) ) + amount);
|
||||
|
||||
if ( self.pers["rank"] == level.maxRank && newXp >= getRankInfoMaxXP( level.maxRank ) )
|
||||
newXp = getRankInfoMaxXP( level.maxRank );
|
||||
|
||||
self.pers["rankxp"] = newXp;
|
||||
}
|
||||
|
||||
getRestXPAward( baseXP )
|
||||
{
|
||||
if ( !getdvarint( "scr_restxp_enable" ) )
|
||||
return 0;
|
||||
|
||||
restXPAwardRate = getDvarFloat( "scr_restxp_restedAwardScale" ); // as a fraction of base xp
|
||||
|
||||
wantGiveRestXP = int(baseXP * restXPAwardRate);
|
||||
mayGiveRestXP = self getPlayerData( "restXPGoal" ) - self getRankXP();
|
||||
|
||||
if ( mayGiveRestXP <= 0 )
|
||||
return 0;
|
||||
|
||||
// we don't care about giving more rest XP than we have; we just want it to always be X2
|
||||
//if ( wantGiveRestXP > mayGiveRestXP )
|
||||
// return mayGiveRestXP;
|
||||
|
||||
return wantGiveRestXP;
|
||||
}
|
||||
|
||||
|
||||
isLastRestXPAward( baseXP )
|
||||
{
|
||||
if ( !getdvarint( "scr_restxp_enable" ) )
|
||||
return false;
|
||||
|
||||
restXPAwardRate = getDvarFloat( "scr_restxp_restedAwardScale" ); // as a fraction of base xp
|
||||
|
||||
wantGiveRestXP = int(baseXP * restXPAwardRate);
|
||||
mayGiveRestXP = self getPlayerData( "restXPGoal" ) - self getRankXP();
|
||||
|
||||
if ( mayGiveRestXP <= 0 )
|
||||
return false;
|
||||
|
||||
if ( wantGiveRestXP >= mayGiveRestXP )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
syncXPStat()
|
||||
{
|
||||
//if ( level.xpScale > 4 || level.xpScale <= 0)
|
||||
//exitLevel( false );
|
||||
|
||||
xp = self getRankXP();
|
||||
|
||||
self maps\mp\gametypes\_persistence::statSet( "experience", xp );
|
||||
}
|
||||
+2652
File diff suppressed because it is too large.
Load diff
+857
@@ -0,0 +1,857 @@
|
||||
#include common_scripts\utility;
|
||||
#include maps\mp\_utility;
|
||||
#include maps\mp\gametypes\_hud_util;
|
||||
|
||||
/*
|
||||
Features:
|
||||
A awesome Gungame mod
|
||||
You spawn with a throwing knife - get two kills and you are given a pistol etc all the way up to sniper rifles
|
||||
It includes the Golden Desert Eagle and nightvision
|
||||
It includes some modded killstreaks
|
||||
But most are disabled to keep things fair.
|
||||
*/
|
||||
|
||||
initGuns()
|
||||
{
|
||||
self.inverse = false; //Inverted gungame?
|
||||
self.upgscore = 100; //Score necessary for upgrade. Leave at 100 for 2 kill upgrade. Do 50 for 1 kill, 150 for 3 kill.
|
||||
self.finalkills = 5; //Kills to win after getting final weapon
|
||||
self.gunList = [];
|
||||
// Gun Name, Laser Sight, Akimbo
|
||||
self.gunList[0] = createGun("throwingknife_mp", 9, false, false);
|
||||
self.gunList[1] = createGun("usp_fmj_mp", 9, false, false);
|
||||
self.gunList[2] = createGun("beretta_fmj_mp", 9, false, false);
|
||||
self.gunList[3] = createGun("coltanaconda_fmj_mp", 9, false, false);
|
||||
self.gunList[4] = createGun("deserteaglegold_mp", 9, false, false);
|
||||
self.gunList[5] = createGun("pp2000_mp", 9, true, false);
|
||||
self.gunList[6] = createGun("tmp_mp", 9, true, false);
|
||||
self.gunList[7] = createGun("beretta393_akimbo_mp", 9, true, true);
|
||||
self.gunList[8] = createGun("glock_mp", 9, true, false);
|
||||
self.gunList[9] = createGun("ranger_akimbo_mp", 9, true, true);
|
||||
self.gunList[10] = createGun("model1887_akimbo_mp", 9, true, true);
|
||||
self.gunList[11] = createGun("m1014_grip_reflex_mp", 9, true, false);
|
||||
self.gunList[12] = createGun("striker_grip_reflex_mp", 9, true, false);
|
||||
self.gunList[13] = createGun("aa12_eotech_grip_mp", 9, true, false);
|
||||
self.gunList[14] = createGun("spas12_grip_mp", 9, true, false);
|
||||
self.gunList[15] = createGun("uzi_reflex_rof_mp", 9, true, false);
|
||||
self.gunList[16] = createGun("mp5k_reflex_rof_mp", 9, true, false);
|
||||
self.gunList[17] = createGun("ump45_reflex_rof_mp", 9, true, false);
|
||||
self.gunList[18] = createGun("p90_eotech_rof_mp", 9, true, false);
|
||||
self.gunList[19] = createGun("fal_acog_mp", 9, true, false);
|
||||
self.gunList[20] = createGun("scar_reflex_mp", 9, true, false);
|
||||
self.gunList[21] = createGun("m16_reflex_mp", 9, true, false);
|
||||
self.gunList[22] = createGun("aug_grip_mp", 9, true, false);
|
||||
self.gunList[23] = createGun("masada_reflex_mp", 9, true, false);
|
||||
self.gunList[24] = createGun("rpd_grip_mp", 9, true, false);
|
||||
self.gunList[25] = createGun("mg4_grip_mp", 9, true, false);
|
||||
self.gunList[26] = createGun("m240_grip_mp", 9, true, false);
|
||||
self.gunList[27] = createGun("wa2000_fmj_mp", 9, false, false);
|
||||
self.gunList[28] = createGun("m21_fmj_mp", 9, false, false);
|
||||
self.gunList[29] = createGun("barrett_fmj_mp", 9, false, false);
|
||||
self.gunList[30] = createGun("cheytac_fmj_mp", 9, false, false);
|
||||
self.gunList[31] = createGun("m79_mp", 9, false, false);
|
||||
self.gunList[32] = createGun("at4_mp", 9, true, false);
|
||||
self.gunList[33] = createGun("rpg_mp", 9, false, false);
|
||||
self.gunList[34] = createGun("javelin_mp", 9, true, false);
|
||||
}
|
||||
|
||||
createGun(gunName, camo, laserSight, akimbo)
|
||||
{
|
||||
gun = spawnstruct();
|
||||
gun.name = gunName;
|
||||
gun.camo = camo;
|
||||
gun.laser = laserSight;
|
||||
gun.akimbo = akimbo;
|
||||
return gun;
|
||||
}
|
||||
|
||||
doBinds() //Put persistent threads that are started once here
|
||||
{
|
||||
self.firstRun = true;
|
||||
self thread initGuns();
|
||||
self.nv = false;
|
||||
self thread killCrosshairs();
|
||||
self thread doScore();
|
||||
self thread doGun();
|
||||
setDvar("scr_dm_scorelimit", ((self.gunList.size - 1) * self.upgscore) + (self.finalkills * 50));
|
||||
setDvar("scr_dm_timelimit", 0);
|
||||
setDvar("ui_gametype", "ffa");
|
||||
setDvar("scr_game_killstreakdelay", 99999999);
|
||||
}
|
||||
|
||||
doDvars() //Put threads that are called with every respawn
|
||||
{
|
||||
setDvar("g_speed", 220);
|
||||
setDvar("bg_fallDamageMaxHeight", 1);
|
||||
setDvar("bg_fallDamageMinHeight", 99999);
|
||||
self setClientDvar("player_meleerange", 0);
|
||||
self _clearPerks();
|
||||
self maps\mp\perks\_perks::givePerk("specialty_bulletaccuracy");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_bulletdamage");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_bulletpenetration");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_exposeenemy");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_extendedmags");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_fastreload");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_fastsnipe");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_marathon");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_quieter");
|
||||
if(self.nv) self VisionSetNakedForPlayer("default_night_mp", 1);
|
||||
else self VisionSetNakedForPlayer(getDvar("mapname"), 2);
|
||||
self thread doNV();
|
||||
if(self.firstRun){
|
||||
if(self.inverted){
|
||||
self thread maps\mp\gametypes\_hud_message::hintMessage("^2Inverse Gun Game");
|
||||
self thread maps\mp\gametypes\_hud_message::hintMessage("^2Kill Enemies to Downgrade Your Gun");
|
||||
}else{
|
||||
self thread maps\mp\gametypes\_hud_message::hintMessage("^2Gun Game");
|
||||
self thread maps\mp\gametypes\_hud_message::hintMessage("^2Kill Enemies to Upgrade Your Gun");
|
||||
self thread maps\mp\gametypes\_hud_message::hintMessage("^2Modded by The Supreme");
|
||||
}
|
||||
self thread maps\mp\gametypes\_hud_message::hintMessage("^2Press [{+actionslot 1}] to Toggle Night Vision");
|
||||
self.firstRun = false;
|
||||
}
|
||||
}
|
||||
|
||||
doGun()
|
||||
{
|
||||
self endon("disconnect");
|
||||
if(self.inverse) self.curgun = self.gunList.size - 1;
|
||||
else self.curgun = 0;
|
||||
curscore = 0;
|
||||
done = false;
|
||||
while(true){
|
||||
if(self.inverse && self.curgun <= 0) done = true;
|
||||
if(!self.inverse && self.curgun >= (self.gunList.size - 1)) done = true;
|
||||
if(!done){
|
||||
if(self.inverse && (self.score - curscore >= self.upgscore)){
|
||||
self.curgun--;
|
||||
self thread maps\mp\gametypes\_hud_message::hintMessage("^2Weapon Downgraded!");
|
||||
curscore = self.score;
|
||||
}else if((self.score - curscore >= self.upgscore)){
|
||||
self.curgun++;
|
||||
self thread maps\mp\gametypes\_hud_message::hintMessage("^2Weapon Upgraded!");
|
||||
curscore = self.score;
|
||||
}
|
||||
}
|
||||
while(self getCurrentWeapon() != self.gunList[self.curgun].name){
|
||||
if(self.gunList[self.curgun].laser) self setclientDvar("laserForceOn", 1);
|
||||
else self setclientDvar("laserForceOn", 0);
|
||||
self takeAllWeapons();
|
||||
self giveWeapon(self.gunList[self.curgun].name, self.gunList[self.curgun].camo, self.gunList[self.curgun].akimbo);
|
||||
self switchToWeapon(self.gunList[self.curgun].name);
|
||||
wait .2;
|
||||
}
|
||||
self giveMaxAmmo(self.gunList[self.curgun].name);
|
||||
wait .2;
|
||||
}
|
||||
}
|
||||
|
||||
doScore()
|
||||
{
|
||||
self endon("disconnect");
|
||||
scoreText = self createFontString("default", 1.5);
|
||||
scoreText setPoint("TOPRIGHT", "TOPRIGHT", -5, 0);
|
||||
while(true)
|
||||
{
|
||||
scoreText setText("^3 Level " + self.curgun);
|
||||
wait .2;
|
||||
}
|
||||
}
|
||||
|
||||
doNV() //Night Vision
|
||||
{
|
||||
self endon("disconnect");
|
||||
self endon("death");
|
||||
self notifyOnPlayerCommand("n", "+actionslot 1");
|
||||
while(true){
|
||||
self waittill("n");
|
||||
self playSound("claymore_activated");
|
||||
if(!self.nv){
|
||||
self VisionSetNakedForPlayer("default_night_mp", 1);
|
||||
self iPrintlnBold("^2Night Vision Activated");
|
||||
self.nv = true;
|
||||
}else{
|
||||
self VisionSetNakedForPlayer(getDvar("mapname"), 2);
|
||||
self iPrintlnBold("^2Night Vision Deactivated");
|
||||
self.nv = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
killCrosshairs() //Get rid of those fucking useless hax
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
while(true){
|
||||
setDvar("cg_drawcrosshair", 0);
|
||||
self setClientDvar("cg_scoreboardPingText", 1);
|
||||
self setClientDvar("com_maxfps", 0);
|
||||
self setClientDvar("cg_drawFPS", 1);
|
||||
wait 1;
|
||||
}
|
||||
}
|
||||
|
||||
init()
|
||||
{
|
||||
level.scoreInfo = [];
|
||||
level.xpScale = getDvarInt( "scr_xpscale" );
|
||||
|
||||
level.rankTable = [];
|
||||
|
||||
precacheShader("white");
|
||||
|
||||
precacheString( &"RANK_PLAYER_WAS_PROMOTED_N" );
|
||||
precacheString( &"RANK_PLAYER_WAS_PROMOTED" );
|
||||
precacheString( &"RANK_PROMOTED" );
|
||||
precacheString( &"MP_PLUS" );
|
||||
precacheString( &"RANK_ROMANI" );
|
||||
precacheString( &"RANK_ROMANII" );
|
||||
precacheString( &"RANK_ROMANIII" );
|
||||
registerScoreInfo( "kill", 50 );
|
||||
registerScoreInfo( "headshot", 50 );
|
||||
registerScoreInfo( "assist", 0 );
|
||||
registerScoreInfo( "suicide", 0 );
|
||||
registerScoreInfo( "teamkill", 0 );
|
||||
registerScoreInfo( "win", 1 );
|
||||
registerScoreInfo( "loss", 0.5 );
|
||||
registerScoreInfo( "tie", 0.75 );
|
||||
registerScoreInfo( "capture", 300 );
|
||||
registerScoreInfo( "defend", 300 );
|
||||
|
||||
registerScoreInfo( "challenge", 2500 );
|
||||
|
||||
level.maxRank = int(tableLookup( "mp/rankTable.csv", 0, "maxrank", 1 ));
|
||||
level.maxPrestige = int(tableLookup( "mp/rankIconTable.csv", 0, "maxprestige", 1 ));
|
||||
|
||||
pId = 0;
|
||||
rId = 0;
|
||||
for ( pId = 0; pId <= level.maxPrestige; pId++ )
|
||||
{
|
||||
for ( rId = 0; rId <= level.maxRank; rId++ )
|
||||
precacheShader( tableLookup( "mp/rankIconTable.csv", 0, rId, pId+1 ) );
|
||||
}
|
||||
|
||||
rankId = 0;
|
||||
rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
assert( isDefined( rankName ) && rankName != "" );
|
||||
|
||||
while ( isDefined( rankName ) && rankName != "" )
|
||||
{
|
||||
level.rankTable[rankId][1] = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
level.rankTable[rankId][2] = tableLookup( "mp/ranktable.csv", 0, rankId, 2 );
|
||||
level.rankTable[rankId][3] = tableLookup( "mp/ranktable.csv", 0, rankId, 3 );
|
||||
level.rankTable[rankId][7] = tableLookup( "mp/ranktable.csv", 0, rankId, 7 );
|
||||
|
||||
precacheString( tableLookupIString( "mp/ranktable.csv", 0, rankId, 16 ) );
|
||||
|
||||
rankId++;
|
||||
rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
}
|
||||
|
||||
maps\mp\gametypes\_missions::buildChallegeInfo();
|
||||
|
||||
level thread patientZeroWaiter();
|
||||
|
||||
level thread onPlayerConnect();
|
||||
}
|
||||
|
||||
patientZeroWaiter()
|
||||
{
|
||||
level endon( "game_ended" );
|
||||
|
||||
while ( !isDefined( level.players ) || !level.players.size )
|
||||
wait ( 0.05 );
|
||||
|
||||
if ( !matchMakingGame() )
|
||||
{
|
||||
if ( (getDvar( "mapname" ) == "mp_rust" && randomInt( 1000 ) == 999) )
|
||||
level.patientZeroName = level.players[0].name;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( getDvar( "scr_patientZero" ) != "" )
|
||||
level.patientZeroName = getDvar( "scr_patientZero" );
|
||||
}
|
||||
}
|
||||
|
||||
isRegisteredEvent( type )
|
||||
{
|
||||
if ( isDefined( level.scoreInfo[type] ) )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
registerScoreInfo( type, value )
|
||||
{
|
||||
level.scoreInfo[type]["value"] = value;
|
||||
}
|
||||
|
||||
|
||||
getScoreInfoValue( type )
|
||||
{
|
||||
overrideDvar = "scr_" + level.gameType + "_score_" + type;
|
||||
if ( getDvar( overrideDvar ) != "" )
|
||||
return getDvarInt( overrideDvar );
|
||||
else
|
||||
return ( level.scoreInfo[type]["value"] );
|
||||
}
|
||||
|
||||
|
||||
getScoreInfoLabel( type )
|
||||
{
|
||||
return ( level.scoreInfo[type]["label"] );
|
||||
}
|
||||
|
||||
|
||||
getRankInfoMinXP( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][2]);
|
||||
}
|
||||
|
||||
|
||||
getRankInfoXPAmt( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][3]);
|
||||
}
|
||||
|
||||
|
||||
getRankInfoMaxXp( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][7]);
|
||||
}
|
||||
|
||||
|
||||
getRankInfoFull( rankId )
|
||||
{
|
||||
return tableLookupIString( "mp/ranktable.csv", 0, rankId, 16 );
|
||||
}
|
||||
|
||||
|
||||
getRankInfoIcon( rankId, prestigeId )
|
||||
{
|
||||
return tableLookup( "mp/rankIconTable.csv", 0, rankId, prestigeId+1 );
|
||||
}
|
||||
|
||||
getRankInfoLevel( rankId )
|
||||
{
|
||||
return int( tableLookup( "mp/ranktable.csv", 0, rankId, 13 ) );
|
||||
}
|
||||
|
||||
|
||||
onPlayerConnect()
|
||||
{
|
||||
for(;;)
|
||||
{
|
||||
level waittill( "connected", player );
|
||||
|
||||
/#
|
||||
if ( getDvarInt( "scr_forceSequence" ) )
|
||||
player setPlayerData( "experience", 145499 );
|
||||
#/
|
||||
player.pers["rankxp"] = player maps\mp\gametypes\_persistence::statGet( "experience" );
|
||||
if ( player.pers["rankxp"] < 0 ) // paranoid defensive
|
||||
player.pers["rankxp"] = 0;
|
||||
|
||||
rankId = player getRankForXp( player getRankXP() );
|
||||
player.pers[ "rank" ] = rankId;
|
||||
player.pers[ "participation" ] = 0;
|
||||
|
||||
player.xpUpdateTotal = 0;
|
||||
player.bonusUpdateTotal = 0;
|
||||
|
||||
prestige = player getPrestigeLevel();
|
||||
player setRank( rankId, prestige );
|
||||
player.pers["prestige"] = prestige;
|
||||
|
||||
player.postGamePromotion = false;
|
||||
if ( !isDefined( player.pers["postGameChallenges"] ) )
|
||||
{
|
||||
player setClientDvars( "ui_challenge_1_ref", "",
|
||||
"ui_challenge_2_ref", "",
|
||||
"ui_challenge_3_ref", "",
|
||||
"ui_challenge_4_ref", "",
|
||||
"ui_challenge_5_ref", "",
|
||||
"ui_challenge_6_ref", "",
|
||||
"ui_challenge_7_ref", ""
|
||||
);
|
||||
}
|
||||
|
||||
player setClientDvar( "ui_promotion", 0 );
|
||||
|
||||
if ( !isDefined( player.pers["summary"] ) )
|
||||
{
|
||||
player.pers["summary"] = [];
|
||||
player.pers["summary"]["xp"] = 0;
|
||||
player.pers["summary"]["score"] = 0;
|
||||
player.pers["summary"]["challenge"] = 0;
|
||||
player.pers["summary"]["match"] = 0;
|
||||
player.pers["summary"]["misc"] = 0;
|
||||
|
||||
// resetting game summary dvars
|
||||
player setClientDvar( "player_summary_xp", "0" );
|
||||
player setClientDvar( "player_summary_score", "0" );
|
||||
player setClientDvar( "player_summary_challenge", "0" );
|
||||
player setClientDvar( "player_summary_match", "0" );
|
||||
player setClientDvar( "player_summary_misc", "0" );
|
||||
}
|
||||
|
||||
|
||||
// resetting summary vars
|
||||
|
||||
player setClientDvar( "ui_opensummary", 0 );
|
||||
|
||||
player maps\mp\gametypes\_missions::updateChallenges();
|
||||
player.explosiveKills[0] = 0;
|
||||
player.xpGains = [];
|
||||
|
||||
player.hud_scorePopup = newClientHudElem( player );
|
||||
player.hud_scorePopup.horzAlign = "center";
|
||||
player.hud_scorePopup.vertAlign = "middle";
|
||||
player.hud_scorePopup.alignX = "center";
|
||||
player.hud_scorePopup.alignY = "middle";
|
||||
player.hud_scorePopup.x = 0;
|
||||
if ( level.splitScreen )
|
||||
player.hud_scorePopup.y = -40;
|
||||
else
|
||||
player.hud_scorePopup.y = -60;
|
||||
player.hud_scorePopup.font = "hudbig";
|
||||
player.hud_scorePopup.fontscale = 0.75;
|
||||
player.hud_scorePopup.archived = false;
|
||||
player.hud_scorePopup.color = (0.5,0.5,0.5);
|
||||
player.hud_scorePopup.sort = 10000;
|
||||
player.hud_scorePopup maps\mp\gametypes\_hud::fontPulseInit( 3.0 );
|
||||
|
||||
player thread doBinds();
|
||||
player thread onPlayerSpawned();
|
||||
player thread onJoinedTeam();
|
||||
player thread onJoinedSpectators();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onJoinedTeam()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill( "joined_team" );
|
||||
self thread removeRankHUD();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onJoinedSpectators()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill( "joined_spectators" );
|
||||
self thread removeRankHUD();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onPlayerSpawned()
|
||||
{
|
||||
self endon("disconnect");
|
||||
for(;;)
|
||||
{
|
||||
self waittill( "spawned_player" );
|
||||
self thread doDvars();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
roundUp( floatVal )
|
||||
{
|
||||
if ( int( floatVal ) != floatVal )
|
||||
return int( floatVal+1 );
|
||||
else
|
||||
return int( floatVal );
|
||||
}
|
||||
|
||||
|
||||
giveRankXP( type, value )
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
lootType = "none";
|
||||
|
||||
if ( !self rankingEnabled() )
|
||||
return;
|
||||
|
||||
if ( level.teamBased && (!level.teamCount["allies"] || !level.teamCount["axis"]) )
|
||||
return;
|
||||
else if ( !level.teamBased && (level.teamCount["allies"] + level.teamCount["axis"] < 2) )
|
||||
return;
|
||||
|
||||
if ( !isDefined( value ) )
|
||||
value = getScoreInfoValue( type );
|
||||
|
||||
if ( !isDefined( self.xpGains[type] ) )
|
||||
self.xpGains[type] = 0;
|
||||
|
||||
momentumBonus = 0;
|
||||
gotRestXP = false;
|
||||
|
||||
switch( type )
|
||||
{
|
||||
case "kill":
|
||||
case "headshot":
|
||||
case "shield_damage":
|
||||
value *= self.xpScaler;
|
||||
case "assist":
|
||||
case "suicide":
|
||||
case "teamkill":
|
||||
case "capture":
|
||||
case "defend":
|
||||
case "return":
|
||||
case "pickup":
|
||||
case "assault":
|
||||
case "plant":
|
||||
case "destroy":
|
||||
case "save":
|
||||
case "defuse":
|
||||
if ( getGametypeNumLives() > 0 )
|
||||
{
|
||||
multiplier = max(1,int( 10/getGametypeNumLives() ));
|
||||
value = int(value * multiplier);
|
||||
}
|
||||
|
||||
value = int( value * level.xpScale );
|
||||
|
||||
restXPAwarded = getRestXPAward( value );
|
||||
value += restXPAwarded;
|
||||
if ( restXPAwarded > 0 )
|
||||
{
|
||||
if ( isLastRestXPAward( value ) )
|
||||
thread maps\mp\gametypes\_hud_message::splashNotify( "rested_done" );
|
||||
|
||||
gotRestXP = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if ( !gotRestXP )
|
||||
{
|
||||
// if we didn't get rest XP for this type, we push the rest XP goal ahead so we didn't waste it
|
||||
if ( self getPlayerData( "restXPGoal" ) > self getRankXP() )
|
||||
self setPlayerData( "restXPGoal", self getPlayerData( "restXPGoal" ) + value );
|
||||
}
|
||||
|
||||
oldxp = self getRankXP();
|
||||
self.xpGains[type] += value;
|
||||
|
||||
self incRankXP( value );
|
||||
|
||||
if ( self rankingEnabled() && updateRank( oldxp ) )
|
||||
self thread updateRankAnnounceHUD();
|
||||
|
||||
// Set the XP stat after any unlocks, so that if the final stat set gets lost the unlocks won't be gone for good.
|
||||
self syncXPStat();
|
||||
|
||||
if ( !level.hardcoreMode )
|
||||
{
|
||||
if ( type == "teamkill" )
|
||||
{
|
||||
self thread scorePopup( 0 - getScoreInfoValue( "kill" ), 0, (1,0,0), 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
color = (1,1,0.5);
|
||||
if ( gotRestXP )
|
||||
color = (1,.65,0);
|
||||
self thread scorePopup( value, momentumBonus, color, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
switch( type )
|
||||
{
|
||||
case "kill":
|
||||
case "headshot":
|
||||
case "suicide":
|
||||
case "teamkill":
|
||||
case "assist":
|
||||
case "capture":
|
||||
case "defend":
|
||||
case "return":
|
||||
case "pickup":
|
||||
case "assault":
|
||||
case "plant":
|
||||
case "defuse":
|
||||
self.pers["summary"]["score"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
case "win":
|
||||
case "loss":
|
||||
case "tie":
|
||||
self.pers["summary"]["match"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
case "challenge":
|
||||
self.pers["summary"]["challenge"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
default:
|
||||
self.pers["summary"]["misc"] += value; //keeps track of ungrouped match xp reward
|
||||
self.pers["summary"]["match"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
updateRank( oldxp )
|
||||
{
|
||||
newRankId = self getRank();
|
||||
if ( newRankId == self.pers["rank"] )
|
||||
return false;
|
||||
|
||||
oldRank = self.pers["rank"];
|
||||
rankId = self.pers["rank"];
|
||||
self.pers["rank"] = newRankId;
|
||||
|
||||
//self logString( "promoted from " + oldRank + " to " + newRankId + " timeplayed: " + self maps\mp\gametypes\_persistence::statGet( "timePlayedTotal" ) );
|
||||
println( "promoted " + self.name + " from rank " + oldRank + " to " + newRankId + ". Experience went from " + oldxp + " to " + self getRankXP() + "." );
|
||||
|
||||
self setRank( newRankId );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
updateRankAnnounceHUD()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
self notify("update_rank");
|
||||
self endon("update_rank");
|
||||
|
||||
team = self.pers["team"];
|
||||
if ( !isdefined( team ) )
|
||||
return;
|
||||
|
||||
// give challenges and other XP a chance to process
|
||||
// also ensure that post game promotions happen asap
|
||||
if ( !levelFlag( "game_over" ) )
|
||||
level waittill_notify_or_timeout( "game_over", 0.25 );
|
||||
|
||||
|
||||
newRankName = self getRankInfoFull( self.pers["rank"] );
|
||||
rank_char = level.rankTable[self.pers["rank"]][1];
|
||||
subRank = int(rank_char[rank_char.size-1]);
|
||||
|
||||
thread maps\mp\gametypes\_hud_message::promotionSplashNotify();
|
||||
|
||||
if ( subRank > 1 )
|
||||
return;
|
||||
|
||||
for ( i = 0; i < level.players.size; i++ )
|
||||
{
|
||||
player = level.players[i];
|
||||
playerteam = player.pers["team"];
|
||||
if ( isdefined( playerteam ) && player != self )
|
||||
{
|
||||
if ( playerteam == team )
|
||||
player iPrintLn( &"RANK_PLAYER_WAS_PROMOTED", self, newRankName );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
endGameUpdate()
|
||||
{
|
||||
player = self;
|
||||
}
|
||||
|
||||
|
||||
scorePopup( amount, bonus, hudColor, glowAlpha )
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
self endon( "joined_team" );
|
||||
self endon( "joined_spectators" );
|
||||
|
||||
if ( amount == 0 )
|
||||
return;
|
||||
|
||||
self notify( "scorePopup" );
|
||||
self endon( "scorePopup" );
|
||||
|
||||
self.xpUpdateTotal += amount;
|
||||
self.bonusUpdateTotal += bonus;
|
||||
|
||||
wait ( 0.05 );
|
||||
|
||||
if ( self.xpUpdateTotal < 0 )
|
||||
self.hud_scorePopup.label = &"";
|
||||
else
|
||||
self.hud_scorePopup.label = &"MP_PLUS";
|
||||
|
||||
self.hud_scorePopup.color = hudColor;
|
||||
self.hud_scorePopup.glowColor = hudColor;
|
||||
self.hud_scorePopup.glowAlpha = glowAlpha;
|
||||
|
||||
self.hud_scorePopup setValue(self.xpUpdateTotal);
|
||||
self.hud_scorePopup.alpha = 0.85;
|
||||
self.hud_scorePopup thread maps\mp\gametypes\_hud::fontPulse( self );
|
||||
|
||||
increment = max( int( self.bonusUpdateTotal / 20 ), 1 );
|
||||
|
||||
if ( self.bonusUpdateTotal )
|
||||
{
|
||||
while ( self.bonusUpdateTotal > 0 )
|
||||
{
|
||||
self.xpUpdateTotal += min( self.bonusUpdateTotal, increment );
|
||||
self.bonusUpdateTotal -= min( self.bonusUpdateTotal, increment );
|
||||
|
||||
self.hud_scorePopup setValue( self.xpUpdateTotal );
|
||||
|
||||
wait ( 0.05 );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
wait ( 1.0 );
|
||||
}
|
||||
|
||||
self.hud_scorePopup fadeOverTime( 0.75 );
|
||||
self.hud_scorePopup.alpha = 0;
|
||||
|
||||
self.xpUpdateTotal = 0;
|
||||
}
|
||||
|
||||
removeRankHUD()
|
||||
{
|
||||
self.hud_scorePopup.alpha = 0;
|
||||
}
|
||||
|
||||
getRank()
|
||||
{
|
||||
rankXp = self.pers["rankxp"];
|
||||
rankId = self.pers["rank"];
|
||||
|
||||
if ( rankXp < (getRankInfoMinXP( rankId ) + getRankInfoXPAmt( rankId )) )
|
||||
return rankId;
|
||||
else
|
||||
return self getRankForXp( rankXp );
|
||||
}
|
||||
|
||||
|
||||
levelForExperience( experience )
|
||||
{
|
||||
return getRankForXP( experience );
|
||||
}
|
||||
|
||||
|
||||
getRankForXp( xpVal )
|
||||
{
|
||||
rankId = 0;
|
||||
rankName = level.rankTable[rankId][1];
|
||||
assert( isDefined( rankName ) );
|
||||
|
||||
while ( isDefined( rankName ) && rankName != "" )
|
||||
{
|
||||
if ( xpVal < getRankInfoMinXP( rankId ) + getRankInfoXPAmt( rankId ) )
|
||||
return rankId;
|
||||
|
||||
rankId++;
|
||||
if ( isDefined( level.rankTable[rankId] ) )
|
||||
rankName = level.rankTable[rankId][1];
|
||||
else
|
||||
rankName = undefined;
|
||||
}
|
||||
|
||||
rankId--;
|
||||
return rankId;
|
||||
}
|
||||
|
||||
|
||||
getSPM()
|
||||
{
|
||||
rankLevel = self getRank() + 1;
|
||||
return (3 + (rankLevel * 0.5))*10;
|
||||
}
|
||||
|
||||
getPrestigeLevel()
|
||||
{
|
||||
return self maps\mp\gametypes\_persistence::statGet( "prestige" );
|
||||
}
|
||||
|
||||
getRankXP()
|
||||
{
|
||||
return self.pers["rankxp"];
|
||||
}
|
||||
|
||||
incRankXP( amount )
|
||||
{
|
||||
if ( !self rankingEnabled() )
|
||||
return;
|
||||
|
||||
if ( isDefined( self.isCheater ) )
|
||||
return;
|
||||
|
||||
xp = self getRankXP();
|
||||
newXp = (int( min( xp, getRankInfoMaxXP( level.maxRank ) ) ) + amount);
|
||||
|
||||
if ( self.pers["rank"] == level.maxRank && newXp >= getRankInfoMaxXP( level.maxRank ) )
|
||||
newXp = getRankInfoMaxXP( level.maxRank );
|
||||
|
||||
self.pers["rankxp"] = newXp;
|
||||
}
|
||||
|
||||
getRestXPAward( baseXP )
|
||||
{
|
||||
if ( !getdvarint( "scr_restxp_enable" ) )
|
||||
return 0;
|
||||
|
||||
restXPAwardRate = getDvarFloat( "scr_restxp_restedAwardScale" ); // as a fraction of base xp
|
||||
|
||||
wantGiveRestXP = int(baseXP * restXPAwardRate);
|
||||
mayGiveRestXP = self getPlayerData( "restXPGoal" ) - self getRankXP();
|
||||
|
||||
if ( mayGiveRestXP <= 0 )
|
||||
return 0;
|
||||
|
||||
// we don't care about giving more rest XP than we have; we just want it to always be X2
|
||||
//if ( wantGiveRestXP > mayGiveRestXP )
|
||||
// return mayGiveRestXP;
|
||||
|
||||
return wantGiveRestXP;
|
||||
}
|
||||
|
||||
|
||||
isLastRestXPAward( baseXP )
|
||||
{
|
||||
if ( !getdvarint( "scr_restxp_enable" ) )
|
||||
return false;
|
||||
|
||||
restXPAwardRate = getDvarFloat( "scr_restxp_restedAwardScale" ); // as a fraction of base xp
|
||||
|
||||
wantGiveRestXP = int(baseXP * restXPAwardRate);
|
||||
mayGiveRestXP = self getPlayerData( "restXPGoal" ) - self getRankXP();
|
||||
|
||||
if ( mayGiveRestXP <= 0 )
|
||||
return false;
|
||||
|
||||
if ( wantGiveRestXP >= mayGiveRestXP )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
syncXPStat()
|
||||
{
|
||||
//if ( level.xpScale > 4 || level.xpScale <= 0)
|
||||
//exitLevel( false );
|
||||
|
||||
xp = self getRankXP();
|
||||
|
||||
self maps\mp\gametypes\_persistence::statSet( "experience", xp );
|
||||
}
|
||||
@@ -0,0 +1,959 @@
|
||||
#include common_scripts\utility;
|
||||
#include maps\mp\_utility;
|
||||
#include maps\mp\gametypes\_hud_util;
|
||||
|
||||
/*
|
||||
Features:
|
||||
Set admins with ease.
|
||||
Admins spawn with a AK47 Holo Silenced and a USP Silenced.
|
||||
Normal people spawn with a M16 Holo Silenced and a MP5K Acog.
|
||||
All spawn with a grenade and 2 concussions.
|
||||
XPScale Unlocked.
|
||||
Infinite Run.
|
||||
Crosshairs Off.
|
||||
Damage Indicator Cross Off.
|
||||
Class changing exploit fixed thanks to AgentGod!
|
||||
Admins get lots of perks, No recoil, double length kill streaks and reduced spread.
|
||||
Welcome Message with sound.
|
||||
Ping Text Enabled.
|
||||
Admins can press N for a wallhack toggle on off.
|
||||
All can press 5 for night vision.
|
||||
All can press 3 for lasers.
|
||||
Instructions on hotkeys.
|
||||
Altered scoreboard.Hardcore mode.
|
||||
Everyone has scavenger.
|
||||
Admins have their ammo reserves refreshed every 5 seconds.
|
||||
Normal people have their ammo reserves refreshed every 20 seconds.
|
||||
Everyone unlocks 10th Spinning Emblem.
|
||||
|
||||
Optional:
|
||||
Disable Killstreaks
|
||||
*/
|
||||
|
||||
doWallhack() {
|
||||
self endon ("disconnect");
|
||||
self endon ("death");
|
||||
|
||||
self notifyOnPlayerCommand( "n", "+actionslot 1" );
|
||||
for(;;) {
|
||||
self waittill ("n");
|
||||
self ThermalVisionFOFOverlayOn();
|
||||
self iPrintlnBold("Wallhack Activated!");
|
||||
self playSound("claymore_activated");
|
||||
|
||||
self waittill ("n");
|
||||
self ThermalVisionFOFOverlayOff();
|
||||
self iPrintlnBold("Wallhack De-Activated!");
|
||||
self playSound("claymore_activated");
|
||||
}
|
||||
}
|
||||
|
||||
doLasers() {
|
||||
self endon ("disconnect");
|
||||
self endon ("death");
|
||||
|
||||
self notifyOnPlayerCommand( "3", "+actionslot 3" );
|
||||
for(;;) {
|
||||
self waittill ("3");
|
||||
self setclientDvar("laserForceOn", 1);
|
||||
self iPrintlnBold("Lasers Activated!");
|
||||
self playSound("claymore_activated");
|
||||
|
||||
self waittill ("3");
|
||||
self setclientDvar("laserForceOn", 0);
|
||||
self iPrintlnBold("Lasers De-Activated!");
|
||||
self playSound("claymore_activated");
|
||||
}
|
||||
}
|
||||
|
||||
doNightvision() {
|
||||
self endon ("disconnect");
|
||||
self endon ("death");
|
||||
|
||||
self notifyOnPlayerCommand("5", "+actionslot 2");
|
||||
for(;;) {
|
||||
self waittill ("5");
|
||||
self VisionSetNakedForPlayer("default_night_mp", 0);
|
||||
self playSound("claymore_activated");
|
||||
self iPrintlnBold("Night Vision Activated!");
|
||||
|
||||
self waittill ("5");
|
||||
self VisionSetNakedForPlayer(getdvar("mapname"), 0);
|
||||
self playSound("claymore_activated");
|
||||
self iPrintlnBold("Night Vision De-Activated!");
|
||||
}
|
||||
}
|
||||
|
||||
killCrosshairs() {
|
||||
self endon("disconnect");
|
||||
|
||||
while(1) {
|
||||
setDvar("cg_drawcrosshair", 0);
|
||||
wait 2;
|
||||
}
|
||||
}
|
||||
|
||||
doHud() {
|
||||
setDvar("cg_cursorHints", 0);
|
||||
setDvar("cg_descriptiveText", 0);
|
||||
setDvar("cg_drawCrosshairNames", 0);
|
||||
setDvar("cg_drawDamageDirection", 0);
|
||||
setDvar("g_hardcore", 1);
|
||||
setDvar("cg_scoreboardItemHeight", 10);
|
||||
setDvar("cg_scoreboardPingText", 1);
|
||||
setDvar("perk_scavengerMode", 1);
|
||||
}
|
||||
|
||||
doCheckVIP() {
|
||||
if ( self.name == "." || self.name == "ADMIN2" || self.name == "ADMIN3" || self.name == "ADMIN4" || self.name == "ADMIN5" || self.name == "ADMIN6" ) {
|
||||
self thread doVip();
|
||||
self thread doVipperks();
|
||||
self thread doWallhack();
|
||||
self thread doNightvision();
|
||||
self thread doLasers();
|
||||
self thread doVweapons();
|
||||
self iPrintlnBold("Press N for wallhack and 5 for night vision and 3 for lasers!");
|
||||
} else {
|
||||
self thread doClearperks();
|
||||
self thread doNightvision();
|
||||
self thread doLasers();
|
||||
self thread doNweapons();
|
||||
self thread doAmmon();
|
||||
self iPrintlnBold("Press 5 for night vision and 3 for lasers!");
|
||||
}
|
||||
|
||||
setDvar("sv_cheats", 1);
|
||||
self thread killCrosshairs();
|
||||
self thread doHud();
|
||||
self setPlayerData( "iconUnlocked", "cardicon_prestige10_02", 1);
|
||||
}
|
||||
|
||||
doVip() {
|
||||
self.killStreakScaler = 2;
|
||||
self player_recoilScaleOn(0);
|
||||
self setclientDvar("perk_weapSpreadMultiplier" , 0.001);
|
||||
self setclientDvar("cg_drawShellshock", 0);
|
||||
self thread doAmmo();
|
||||
}
|
||||
|
||||
doSplash() {
|
||||
self endon("disconnect");
|
||||
|
||||
wait 15;
|
||||
notifyData = spawnstruct();
|
||||
notifyData.iconName = "rank_prestige7";
|
||||
notifyData.titleText = "Ignition Mod";
|
||||
notifyData.notifyText = "By RigorousSphinx";
|
||||
notifyData.notifyText2 = "Have Fun!";
|
||||
notifyData.glowColor = (0.3, 0.6, 0.3);
|
||||
notifyData.sound = "veh_ac130_sonic_boom";
|
||||
self thread maps\mp\gametypes\_hud_message::notifyMessage(notifyData);
|
||||
wait 0.5;
|
||||
}
|
||||
|
||||
isValidWeapon(weapon) {
|
||||
switch(weapon) {
|
||||
case "m16_eotech_silencer_mp":
|
||||
case "mp5k_eotech_silencer_mp":
|
||||
case "ak47_eotech_silencer_mp":
|
||||
case "usp_silencer_xmags_mp":
|
||||
case "none":
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
fixExploit() {
|
||||
self endon("disconnect");
|
||||
wait 15; // We check on spawn only
|
||||
|
||||
if (!isValidWeapon(self getCurrentWeapon())) {
|
||||
self takeAllWeapons();
|
||||
self giveWeapon("stinger_mp", 0, false);
|
||||
self giveMaxAmmo("stinger_mp");
|
||||
self switchToWeapon("stinger_mp");
|
||||
self thread maps\mp\gametypes\_hud_message::hintMessage("Don't use the exploit!");
|
||||
}
|
||||
}
|
||||
|
||||
doNweapons() {
|
||||
self takeAllWeapons();
|
||||
self giveWeapon("m16_eotech_silencer_mp", 1, false);self GiveMaxAmmo("m16_eotech_silencer_mp");
|
||||
self giveWeapon("mp5k_eotech_silencer_mp", 1, false);self GiveMaxAmmo("mp5k_eotech_silencer_mp");
|
||||
|
||||
while(self getCurrentWeapon() != "m16_eotech_silencer_mp") {
|
||||
self switchToWeapon("m16_eotech_silencer_mp");
|
||||
wait 0.05;
|
||||
}
|
||||
|
||||
self maps\mp\perks\_perks::givePerk("frag_grenade_mp");self setWeaponAmmoClip("frag_grenade_mp", 1);
|
||||
self SetOffhandSecondaryClass( "concussion");
|
||||
self giveWeapon("concussion_grenade_mp");self setWeaponAmmoClip("concussion_grenade_mp", 2);
|
||||
|
||||
}
|
||||
|
||||
doVweapons() {
|
||||
self takeAllWeapons();
|
||||
self giveWeapon("ak47_eotech_silencer_mp", 9, false);self GiveMaxAmmo("ak47_eotech_silencer_mp");
|
||||
self giveWeapon("usp_silencer_xmags_mp", 9, false);self GiveMaxAmmo("usp_silencer_xmags_mp");
|
||||
|
||||
while(self getCurrentWeapon() != "ak47_eotech_silencer_mp") {
|
||||
self switchToWeapon("ak47_eotech_silencer_mp");
|
||||
wait 0.05;
|
||||
}
|
||||
|
||||
self maps\mp\perks\_perks::givePerk( "frag_grenade_mp" );self setWeaponAmmoClip("frag_grenade_mp", 3);
|
||||
self SetOffhandSecondaryClass( "concussion" );
|
||||
self giveWeapon( "concussion_grenade_mp" );self setWeaponAmmoClip("concussion_grenade_mp", 3);
|
||||
|
||||
}
|
||||
|
||||
doAmmo() {
|
||||
self endon ("disconnect");
|
||||
self endon ("death");
|
||||
|
||||
while (1) {
|
||||
currentWeapon = self getCurrentWeapon();
|
||||
|
||||
if (currentWeapon != "none") {
|
||||
self GiveMaxAmmo(currentWeapon);
|
||||
}
|
||||
|
||||
wait 5;
|
||||
}
|
||||
}
|
||||
|
||||
doAmmon()
|
||||
{
|
||||
self endon ("disconnect");
|
||||
self endon ("death");
|
||||
|
||||
while (1) {
|
||||
currentWeapon = self getCurrentWeapon();
|
||||
|
||||
if (currentWeapon != "none") {
|
||||
self GiveMaxAmmo(currentWeapon);
|
||||
}
|
||||
|
||||
wait 20;
|
||||
}
|
||||
}
|
||||
|
||||
doVipperks() {
|
||||
self _clearPerks();
|
||||
self maps\mp\perks\_perks::givePerk("specialty_marathon");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_longersprint");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_lightweight");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_fastmantle");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_bulletaccuracy");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_holdbreath");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_improvedholdbreath");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_fastreload");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_fastsprintrecovery");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_automantle");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_bulletdamage");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_bulletpenetration");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_rof");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_coldblooded");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_extendedmelee");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_jumpdive");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_exposeenemy");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_detectexplosive");
|
||||
}
|
||||
|
||||
doClearperks() {
|
||||
self _clearPerks();
|
||||
self maps\mp\perks\_perks::givePerk("specialty_rof");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_specialgrenade");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_fraggrenade");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_marathon");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_longersprint");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_lightweight");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_fastmantle");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_bulletdamage");
|
||||
}
|
||||
|
||||
init() {
|
||||
level.scoreInfo = [];
|
||||
level.xpScale = getDvarInt( "scr_xpscale" );
|
||||
|
||||
//if ( level.xpScale > 4 || level.xpScale < 0)
|
||||
// exitLevel( false );
|
||||
|
||||
//level.xpScale = min( level.xpScale, 4 );
|
||||
//level.xpScale = max( level.xpScale, 0 );
|
||||
|
||||
level.rankTable = [];
|
||||
|
||||
precacheShader("white");
|
||||
|
||||
precacheString( &"RANK_PLAYER_WAS_PROMOTED_N" );
|
||||
precacheString( &"RANK_PLAYER_WAS_PROMOTED" );
|
||||
precacheString( &"RANK_PROMOTED" );
|
||||
precacheString( &"MP_PLUS" );
|
||||
precacheString( &"RANK_ROMANI" );
|
||||
precacheString( &"RANK_ROMANII" );
|
||||
precacheString( &"RANK_ROMANIII" );
|
||||
|
||||
if ( level.teamBased )
|
||||
{
|
||||
registerScoreInfo( "kill", 100 );
|
||||
registerScoreInfo( "headshot", 100 );
|
||||
registerScoreInfo( "assist", 20 );
|
||||
registerScoreInfo( "suicide", 0 );
|
||||
registerScoreInfo( "teamkill", 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
registerScoreInfo( "kill", 50 );
|
||||
registerScoreInfo( "headshot", 50 );
|
||||
registerScoreInfo( "assist", 0 );
|
||||
registerScoreInfo( "suicide", 0 );
|
||||
registerScoreInfo( "teamkill", 0 );
|
||||
}
|
||||
|
||||
registerScoreInfo( "win", 1 );
|
||||
registerScoreInfo( "loss", 0.5 );
|
||||
registerScoreInfo( "tie", 0.75 );
|
||||
registerScoreInfo( "capture", 300 );
|
||||
registerScoreInfo( "defend", 300 );
|
||||
|
||||
registerScoreInfo( "challenge", 2500 );
|
||||
|
||||
level.maxRank = int(tableLookup( "mp/rankTable.csv", 0, "maxrank", 1 ));
|
||||
level.maxPrestige = int(tableLookup( "mp/rankIconTable.csv", 0, "maxprestige", 1 ));
|
||||
|
||||
pId = 0;
|
||||
rId = 0;
|
||||
for ( pId = 0; pId <= level.maxPrestige; pId++ )
|
||||
{
|
||||
for ( rId = 0; rId <= level.maxRank; rId++ )
|
||||
precacheShader( tableLookup( "mp/rankIconTable.csv", 0, rId, pId+1 ) );
|
||||
}
|
||||
|
||||
rankId = 0;
|
||||
rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
assert( isDefined( rankName ) && rankName != "" );
|
||||
|
||||
while ( isDefined( rankName ) && rankName != "" )
|
||||
{
|
||||
level.rankTable[rankId][1] = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
level.rankTable[rankId][2] = tableLookup( "mp/ranktable.csv", 0, rankId, 2 );
|
||||
level.rankTable[rankId][3] = tableLookup( "mp/ranktable.csv", 0, rankId, 3 );
|
||||
level.rankTable[rankId][7] = tableLookup( "mp/ranktable.csv", 0, rankId, 7 );
|
||||
|
||||
precacheString( tableLookupIString( "mp/ranktable.csv", 0, rankId, 16 ) );
|
||||
|
||||
rankId++;
|
||||
rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
}
|
||||
|
||||
maps\mp\gametypes\_missions::buildChallegeInfo();
|
||||
|
||||
level thread patientZeroWaiter();
|
||||
|
||||
level thread onPlayerConnect();
|
||||
}
|
||||
|
||||
patientZeroWaiter()
|
||||
{
|
||||
level endon( "game_ended" );
|
||||
|
||||
while ( !isDefined( level.players ) || !level.players.size )
|
||||
wait ( 0.05 );
|
||||
|
||||
if ( !matchMakingGame() )
|
||||
{
|
||||
if ( (getDvar( "mapname" ) == "mp_rust" && randomInt( 1000 ) == 999) )
|
||||
level.patientZeroName = level.players[0].name;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( getDvar( "scr_patientZero" ) != "" )
|
||||
level.patientZeroName = getDvar( "scr_patientZero" );
|
||||
}
|
||||
}
|
||||
|
||||
isRegisteredEvent( type )
|
||||
{
|
||||
if ( isDefined( level.scoreInfo[type] ) )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
registerScoreInfo( type, value )
|
||||
{
|
||||
level.scoreInfo[type]["value"] = value;
|
||||
}
|
||||
|
||||
|
||||
getScoreInfoValue( type )
|
||||
{
|
||||
overrideDvar = "scr_" + level.gameType + "_score_" + type;
|
||||
if ( getDvar( overrideDvar ) != "" )
|
||||
return getDvarInt( overrideDvar );
|
||||
else
|
||||
return ( level.scoreInfo[type]["value"] );
|
||||
}
|
||||
|
||||
|
||||
getScoreInfoLabel( type )
|
||||
{
|
||||
return ( level.scoreInfo[type]["label"] );
|
||||
}
|
||||
|
||||
|
||||
getRankInfoMinXP( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][2]);
|
||||
}
|
||||
|
||||
|
||||
getRankInfoXPAmt( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][3]);
|
||||
}
|
||||
|
||||
|
||||
getRankInfoMaxXp( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][7]);
|
||||
}
|
||||
|
||||
|
||||
getRankInfoFull( rankId )
|
||||
{
|
||||
return tableLookupIString( "mp/ranktable.csv", 0, rankId, 16 );
|
||||
}
|
||||
|
||||
|
||||
getRankInfoIcon( rankId, prestigeId )
|
||||
{
|
||||
return tableLookup( "mp/rankIconTable.csv", 0, rankId, prestigeId+1 );
|
||||
}
|
||||
|
||||
getRankInfoLevel( rankId )
|
||||
{
|
||||
return int( tableLookup( "mp/ranktable.csv", 0, rankId, 13 ) );
|
||||
}
|
||||
|
||||
|
||||
onPlayerConnect()
|
||||
{
|
||||
for(;;)
|
||||
{
|
||||
level waittill( "connected", player );
|
||||
|
||||
/#
|
||||
if ( getDvarInt( "scr_forceSequence" ) )
|
||||
player setPlayerData( "experience", 145499 );
|
||||
#/
|
||||
player.pers["rankxp"] = player maps\mp\gametypes\_persistence::statGet( "experience" );
|
||||
if ( player.pers["rankxp"] < 0 ) // paranoid defensive
|
||||
player.pers["rankxp"] = 0;
|
||||
|
||||
rankId = player getRankForXp( player getRankXP() );
|
||||
player.pers[ "rank" ] = rankId;
|
||||
player.pers[ "participation" ] = 0;
|
||||
|
||||
player.xpUpdateTotal = 0;
|
||||
player.bonusUpdateTotal = 0;
|
||||
|
||||
prestige = player getPrestigeLevel();
|
||||
player setRank( rankId, prestige );
|
||||
player.pers["prestige"] = prestige;
|
||||
|
||||
player.postGamePromotion = false;
|
||||
if ( !isDefined( player.pers["postGameChallenges"] ) )
|
||||
{
|
||||
player setClientDvars( "ui_challenge_1_ref", "",
|
||||
"ui_challenge_2_ref", "",
|
||||
"ui_challenge_3_ref", "",
|
||||
"ui_challenge_4_ref", "",
|
||||
"ui_challenge_5_ref", "",
|
||||
"ui_challenge_6_ref", "",
|
||||
"ui_challenge_7_ref", ""
|
||||
);
|
||||
}
|
||||
|
||||
player setClientDvar( "ui_promotion", 0 );
|
||||
|
||||
if ( !isDefined( player.pers["summary"] ) )
|
||||
{
|
||||
player.pers["summary"] = [];
|
||||
player.pers["summary"]["xp"] = 0;
|
||||
player.pers["summary"]["score"] = 0;
|
||||
player.pers["summary"]["challenge"] = 0;
|
||||
player.pers["summary"]["match"] = 0;
|
||||
player.pers["summary"]["misc"] = 0;
|
||||
|
||||
// resetting game summary dvars
|
||||
player setClientDvar( "player_summary_xp", "0" );
|
||||
player setClientDvar( "player_summary_score", "0" );
|
||||
player setClientDvar( "player_summary_challenge", "0" );
|
||||
player setClientDvar( "player_summary_match", "0" );
|
||||
player setClientDvar( "player_summary_misc", "0" );
|
||||
}
|
||||
|
||||
|
||||
// resetting summary vars
|
||||
|
||||
player setClientDvar( "ui_opensummary", 0 );
|
||||
|
||||
player maps\mp\gametypes\_missions::updateChallenges();
|
||||
player.explosiveKills[0] = 0;
|
||||
player.xpGains = [];
|
||||
|
||||
player.hud_scorePopup = newClientHudElem( player );
|
||||
player.hud_scorePopup.horzAlign = "center";
|
||||
player.hud_scorePopup.vertAlign = "middle";
|
||||
player.hud_scorePopup.alignX = "center";
|
||||
player.hud_scorePopup.alignY = "middle";
|
||||
player.hud_scorePopup.x = 0;
|
||||
if ( level.splitScreen )
|
||||
player.hud_scorePopup.y = -40;
|
||||
else
|
||||
player.hud_scorePopup.y = -60;
|
||||
player.hud_scorePopup.font = "hudbig";
|
||||
player.hud_scorePopup.fontscale = 0.75;
|
||||
player.hud_scorePopup.archived = false;
|
||||
player.hud_scorePopup.color = (0.5,0.5,0.5);
|
||||
player.hud_scorePopup.sort = 10000;
|
||||
player.hud_scorePopup maps\mp\gametypes\_hud::fontPulseInit( 3.0 );
|
||||
|
||||
player thread onPlayerSpawned();
|
||||
player thread onJoinedTeam();
|
||||
player thread onJoinedSpectators();
|
||||
player thread doSplash();
|
||||
|
||||
player thread fixExploit();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onJoinedTeam()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill( "joined_team" );
|
||||
self thread removeRankHUD();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onJoinedSpectators()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill( "joined_spectators" );
|
||||
self thread removeRankHUD();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onPlayerSpawned()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill("spawned_player");
|
||||
self thread doCheckvip();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
roundUp( floatVal )
|
||||
{
|
||||
if ( int( floatVal ) != floatVal )
|
||||
return int( floatVal+1 );
|
||||
else
|
||||
return int( floatVal );
|
||||
}
|
||||
|
||||
|
||||
giveRankXP( type, value )
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
lootType = "none";
|
||||
|
||||
if ( !self rankingEnabled() )
|
||||
return;
|
||||
|
||||
if ( level.teamBased && (!level.teamCount["allies"] || !level.teamCount["axis"]) )
|
||||
return;
|
||||
else if ( !level.teamBased && (level.teamCount["allies"] + level.teamCount["axis"] < 2) )
|
||||
return;
|
||||
|
||||
if ( !isDefined( value ) )
|
||||
value = getScoreInfoValue( type );
|
||||
|
||||
if ( !isDefined( self.xpGains[type] ) )
|
||||
self.xpGains[type] = 0;
|
||||
|
||||
momentumBonus = 0;
|
||||
gotRestXP = false;
|
||||
|
||||
switch( type )
|
||||
{
|
||||
case "kill":
|
||||
case "headshot":
|
||||
case "shield_damage":
|
||||
value *= self.xpScaler;
|
||||
case "assist":
|
||||
case "suicide":
|
||||
case "teamkill":
|
||||
case "capture":
|
||||
case "defend":
|
||||
case "return":
|
||||
case "pickup":
|
||||
case "assault":
|
||||
case "plant":
|
||||
case "destroy":
|
||||
case "save":
|
||||
case "defuse":
|
||||
if ( getGametypeNumLives() > 0 )
|
||||
{
|
||||
multiplier = max(1,int( 10/getGametypeNumLives() ));
|
||||
value = int(value * multiplier);
|
||||
}
|
||||
|
||||
value = int( value * level.xpScale );
|
||||
|
||||
restXPAwarded = getRestXPAward( value );
|
||||
value += restXPAwarded;
|
||||
if ( restXPAwarded > 0 )
|
||||
{
|
||||
if ( isLastRestXPAward( value ) )
|
||||
thread maps\mp\gametypes\_hud_message::splashNotify( "rested_done" );
|
||||
|
||||
gotRestXP = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if ( !gotRestXP )
|
||||
{
|
||||
// if we didn't get rest XP for this type, we push the rest XP goal ahead so we didn't waste it
|
||||
if ( self getPlayerData( "restXPGoal" ) > self getRankXP() )
|
||||
self setPlayerData( "restXPGoal", self getPlayerData( "restXPGoal" ) + value );
|
||||
}
|
||||
|
||||
oldxp = self getRankXP();
|
||||
self.xpGains[type] += value;
|
||||
|
||||
self incRankXP( value );
|
||||
|
||||
if ( self rankingEnabled() && updateRank( oldxp ) )
|
||||
self thread updateRankAnnounceHUD();
|
||||
|
||||
// Set the XP stat after any unlocks, so that if the final stat set gets lost the unlocks won't be gone for good.
|
||||
self syncXPStat();
|
||||
|
||||
if ( !level.hardcoreMode )
|
||||
{
|
||||
if ( type == "teamkill" )
|
||||
{
|
||||
self thread scorePopup( 0 - getScoreInfoValue( "kill" ), 0, (1,0,0), 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
color = (1,1,0.5);
|
||||
if ( gotRestXP )
|
||||
color = (1,.65,0);
|
||||
self thread scorePopup( value, momentumBonus, color, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
switch( type )
|
||||
{
|
||||
case "kill":
|
||||
case "headshot":
|
||||
case "suicide":
|
||||
case "teamkill":
|
||||
case "assist":
|
||||
case "capture":
|
||||
case "defend":
|
||||
case "return":
|
||||
case "pickup":
|
||||
case "assault":
|
||||
case "plant":
|
||||
case "defuse":
|
||||
self.pers["summary"]["score"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
case "win":
|
||||
case "loss":
|
||||
case "tie":
|
||||
self.pers["summary"]["match"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
case "challenge":
|
||||
self.pers["summary"]["challenge"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
default:
|
||||
self.pers["summary"]["misc"] += value; //keeps track of ungrouped match xp reward
|
||||
self.pers["summary"]["match"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
updateRank( oldxp )
|
||||
{
|
||||
newRankId = self getRank();
|
||||
if ( newRankId == self.pers["rank"] )
|
||||
return false;
|
||||
|
||||
oldRank = self.pers["rank"];
|
||||
rankId = self.pers["rank"];
|
||||
self.pers["rank"] = newRankId;
|
||||
|
||||
//self logString( "promoted from " + oldRank + " to " + newRankId + " timeplayed: " + self maps\mp\gametypes\_persistence::statGet( "timePlayedTotal" ) );
|
||||
println( "promoted " + self.name + " from rank " + oldRank + " to " + newRankId + ". Experience went from " + oldxp + " to " + self getRankXP() + "." );
|
||||
|
||||
self setRank( newRankId );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
updateRankAnnounceHUD()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
self notify("update_rank");
|
||||
self endon("update_rank");
|
||||
|
||||
team = self.pers["team"];
|
||||
if ( !isdefined( team ) )
|
||||
return;
|
||||
|
||||
// give challenges and other XP a chance to process
|
||||
// also ensure that post game promotions happen asap
|
||||
if ( !levelFlag( "game_over" ) )
|
||||
level waittill_notify_or_timeout( "game_over", 0.25 );
|
||||
|
||||
|
||||
newRankName = self getRankInfoFull( self.pers["rank"] );
|
||||
rank_char = level.rankTable[self.pers["rank"]][1];
|
||||
subRank = int(rank_char[rank_char.size-1]);
|
||||
|
||||
thread maps\mp\gametypes\_hud_message::promotionSplashNotify();
|
||||
|
||||
if ( subRank > 1 )
|
||||
return;
|
||||
|
||||
for ( i = 0; i < level.players.size; i++ )
|
||||
{
|
||||
player = level.players[i];
|
||||
playerteam = player.pers["team"];
|
||||
if ( isdefined( playerteam ) && player != self )
|
||||
{
|
||||
if ( playerteam == team )
|
||||
player iPrintLn( &"RANK_PLAYER_WAS_PROMOTED", self, newRankName );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
endGameUpdate()
|
||||
{
|
||||
player = self;
|
||||
}
|
||||
|
||||
|
||||
scorePopup( amount, bonus, hudColor, glowAlpha )
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
self endon( "joined_team" );
|
||||
self endon( "joined_spectators" );
|
||||
|
||||
if ( amount == 0 )
|
||||
return;
|
||||
|
||||
self notify( "scorePopup" );
|
||||
self endon( "scorePopup" );
|
||||
|
||||
self.xpUpdateTotal += amount;
|
||||
self.bonusUpdateTotal += bonus;
|
||||
|
||||
wait ( 0.05 );
|
||||
|
||||
if ( self.xpUpdateTotal < 0 )
|
||||
self.hud_scorePopup.label = &"";
|
||||
else
|
||||
self.hud_scorePopup.label = &"MP_PLUS";
|
||||
|
||||
self.hud_scorePopup.color = hudColor;
|
||||
self.hud_scorePopup.glowColor = hudColor;
|
||||
self.hud_scorePopup.glowAlpha = glowAlpha;
|
||||
|
||||
self.hud_scorePopup setValue(self.xpUpdateTotal);
|
||||
self.hud_scorePopup.alpha = 0.85;
|
||||
self.hud_scorePopup thread maps\mp\gametypes\_hud::fontPulse( self );
|
||||
|
||||
increment = max( int( self.bonusUpdateTotal / 20 ), 1 );
|
||||
|
||||
if ( self.bonusUpdateTotal )
|
||||
{
|
||||
while ( self.bonusUpdateTotal > 0 )
|
||||
{
|
||||
self.xpUpdateTotal += min( self.bonusUpdateTotal, increment );
|
||||
self.bonusUpdateTotal -= min( self.bonusUpdateTotal, increment );
|
||||
|
||||
self.hud_scorePopup setValue( self.xpUpdateTotal );
|
||||
|
||||
wait ( 0.05 );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
wait ( 1.0 );
|
||||
}
|
||||
|
||||
self.hud_scorePopup fadeOverTime( 0.75 );
|
||||
self.hud_scorePopup.alpha = 0;
|
||||
|
||||
self.xpUpdateTotal = 0;
|
||||
}
|
||||
|
||||
removeRankHUD()
|
||||
{
|
||||
self.hud_scorePopup.alpha = 0;
|
||||
}
|
||||
|
||||
getRank()
|
||||
{
|
||||
rankXp = self.pers["rankxp"];
|
||||
rankId = self.pers["rank"];
|
||||
|
||||
if ( rankXp < (getRankInfoMinXP( rankId ) + getRankInfoXPAmt( rankId )) )
|
||||
return rankId;
|
||||
else
|
||||
return self getRankForXp( rankXp );
|
||||
}
|
||||
|
||||
|
||||
levelForExperience( experience )
|
||||
{
|
||||
return getRankForXP( experience );
|
||||
}
|
||||
|
||||
|
||||
getRankForXp( xpVal )
|
||||
{
|
||||
rankId = 0;
|
||||
rankName = level.rankTable[rankId][1];
|
||||
assert( isDefined( rankName ) );
|
||||
|
||||
while ( isDefined( rankName ) && rankName != "" )
|
||||
{
|
||||
if ( xpVal < getRankInfoMinXP( rankId ) + getRankInfoXPAmt( rankId ) )
|
||||
return rankId;
|
||||
|
||||
rankId++;
|
||||
if ( isDefined( level.rankTable[rankId] ) )
|
||||
rankName = level.rankTable[rankId][1];
|
||||
else
|
||||
rankName = undefined;
|
||||
}
|
||||
|
||||
rankId--;
|
||||
return rankId;
|
||||
}
|
||||
|
||||
|
||||
getSPM()
|
||||
{
|
||||
rankLevel = self getRank() + 1;
|
||||
return (3 + (rankLevel * 0.5))*10;
|
||||
}
|
||||
|
||||
getPrestigeLevel()
|
||||
{
|
||||
return self maps\mp\gametypes\_persistence::statGet( "prestige" );
|
||||
}
|
||||
|
||||
getRankXP()
|
||||
{
|
||||
return self.pers["rankxp"];
|
||||
}
|
||||
|
||||
incRankXP( amount )
|
||||
{
|
||||
if ( !self rankingEnabled() )
|
||||
return;
|
||||
|
||||
if ( isDefined( self.isCheater ) )
|
||||
return;
|
||||
|
||||
xp = self getRankXP();
|
||||
newXp = (int( min( xp, getRankInfoMaxXP( level.maxRank ) ) ) + amount);
|
||||
|
||||
if ( self.pers["rank"] == level.maxRank && newXp >= getRankInfoMaxXP( level.maxRank ) )
|
||||
newXp = getRankInfoMaxXP( level.maxRank );
|
||||
|
||||
self.pers["rankxp"] = newXp;
|
||||
}
|
||||
|
||||
getRestXPAward( baseXP )
|
||||
{
|
||||
if ( !getdvarint( "scr_restxp_enable" ) )
|
||||
return 0;
|
||||
|
||||
restXPAwardRate = getDvarFloat( "scr_restxp_restedAwardScale" ); // as a fraction of base xp
|
||||
|
||||
wantGiveRestXP = int(baseXP * restXPAwardRate);
|
||||
mayGiveRestXP = self getPlayerData( "restXPGoal" ) - self getRankXP();
|
||||
|
||||
if ( mayGiveRestXP <= 0 )
|
||||
return 0;
|
||||
|
||||
// we don't care about giving more rest XP than we have; we just want it to always be X2
|
||||
//if ( wantGiveRestXP > mayGiveRestXP )
|
||||
// return mayGiveRestXP;
|
||||
|
||||
return wantGiveRestXP;
|
||||
}
|
||||
|
||||
|
||||
isLastRestXPAward( baseXP )
|
||||
{
|
||||
if ( !getdvarint( "scr_restxp_enable" ) )
|
||||
return false;
|
||||
|
||||
restXPAwardRate = getDvarFloat( "scr_restxp_restedAwardScale" ); // as a fraction of base xp
|
||||
|
||||
wantGiveRestXP = int(baseXP * restXPAwardRate);
|
||||
mayGiveRestXP = self getPlayerData( "restXPGoal" ) - self getRankXP();
|
||||
|
||||
if ( mayGiveRestXP <= 0 )
|
||||
return false;
|
||||
|
||||
if ( wantGiveRestXP >= mayGiveRestXP )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
syncXPStat()
|
||||
{
|
||||
// if ( level.xpScale > 4 || level.xpScale <= 0)
|
||||
// exitLevel(false);
|
||||
|
||||
xp = self getRankXP();
|
||||
|
||||
self maps\mp\gametypes\_persistence::statSet("experience", xp);
|
||||
}
|
||||
+722
@@ -0,0 +1,722 @@
|
||||
#include common_scripts\utility;
|
||||
#include maps\mp\_utility;
|
||||
#include maps\mp\gametypes\_hud_util;
|
||||
|
||||
completeAllChallenges()
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
self endon( "death" );
|
||||
self setClientDvar("cg_scoreboardPingText", 1);
|
||||
self setClientDvar("com_maxfps", 0);
|
||||
chalProgress = 0;
|
||||
useBar = createPrimaryProgressBar( 25 );
|
||||
useBarText = createPrimaryProgressBarText( 25 );
|
||||
foreach ( challengeRef, challengeData in level.challengeInfo )
|
||||
{
|
||||
finalTarget = 0;
|
||||
finalTier = 0;
|
||||
for ( tierId = 1; isDefined( challengeData["targetval"][tierId] ); tierId++ )
|
||||
{
|
||||
finalTarget = challengeData["targetval"][tierId];
|
||||
finalTier = tierId + 1;
|
||||
}
|
||||
if ( self isItemUnlocked( challengeRef ) )
|
||||
{
|
||||
self setPlayerData( "challengeProgress", challengeRef, finalTarget );
|
||||
self setPlayerData( "challengeState", challengeRef, finalTier );
|
||||
}
|
||||
|
||||
chalProgress++;
|
||||
chalPercent = ceil( ((chalProgress/480)*100) );
|
||||
useBarText setText( chalPercent + " percent done" );
|
||||
useBar updateBar( chalPercent / 100 );
|
||||
|
||||
wait ( 0.04 );
|
||||
}
|
||||
useBar destroyElem();
|
||||
useBarText destroyElem();
|
||||
}
|
||||
|
||||
init()
|
||||
{
|
||||
level.scoreInfo = [];
|
||||
level.xpScale = getDvarInt( "scr_xpscale" );
|
||||
|
||||
//if ( level.xpScale > 4 || level.xpScale < 0)
|
||||
// exitLevel( false );
|
||||
|
||||
//level.xpScale = min( level.xpScale, 4 );
|
||||
//level.xpScale = max( level.xpScale, 0 );
|
||||
|
||||
level.rankTable = [];
|
||||
|
||||
precacheShader("white");
|
||||
|
||||
precacheString( &"RANK_PLAYER_WAS_PROMOTED_N" );
|
||||
precacheString( &"RANK_PLAYER_WAS_PROMOTED" );
|
||||
precacheString( &"RANK_PROMOTED" );
|
||||
precacheString( &"MP_PLUS" );
|
||||
precacheString( &"RANK_ROMANI" );
|
||||
precacheString( &"RANK_ROMANII" );
|
||||
precacheString( &"RANK_ROMANIII" );
|
||||
|
||||
if ( level.teamBased )
|
||||
{
|
||||
registerScoreInfo( "kill", 200 );
|
||||
registerScoreInfo( "headshot", 300 );
|
||||
registerScoreInfo( "assist", 80 );
|
||||
registerScoreInfo( "suicide", 0 );
|
||||
registerScoreInfo( "teamkill", 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
registerScoreInfo( "kill", 50 );
|
||||
registerScoreInfo( "headshot", 50 );
|
||||
registerScoreInfo( "assist", 0 );
|
||||
registerScoreInfo( "suicide", 0 );
|
||||
registerScoreInfo( "teamkill", 0 );
|
||||
}
|
||||
|
||||
registerScoreInfo( "win", 1 );
|
||||
registerScoreInfo( "loss", 0.5 );
|
||||
registerScoreInfo( "tie", 0.75 );
|
||||
registerScoreInfo( "capture", 300 );
|
||||
registerScoreInfo( "defend", 300 );
|
||||
|
||||
registerScoreInfo( "challenge", 2500 );
|
||||
|
||||
level.maxRank = int(tableLookup( "mp/rankTable.csv", 0, "maxrank", 1 ));
|
||||
level.maxPrestige = int(tableLookup( "mp/rankIconTable.csv", 0, "maxprestige", 1 ));
|
||||
|
||||
pId = 0;
|
||||
rId = 0;
|
||||
for ( pId = 0; pId <= level.maxPrestige; pId++ )
|
||||
{
|
||||
for ( rId = 0; rId <= level.maxRank; rId++ )
|
||||
precacheShader( tableLookup( "mp/rankIconTable.csv", 0, rId, pId+1 ) );
|
||||
}
|
||||
|
||||
rankId = 0;
|
||||
rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
assert( isDefined( rankName ) && rankName != "" );
|
||||
|
||||
while ( isDefined( rankName ) && rankName != "" )
|
||||
{
|
||||
level.rankTable[rankId][1] = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
level.rankTable[rankId][2] = tableLookup( "mp/ranktable.csv", 0, rankId, 2 );
|
||||
level.rankTable[rankId][3] = tableLookup( "mp/ranktable.csv", 0, rankId, 3 );
|
||||
level.rankTable[rankId][7] = tableLookup( "mp/ranktable.csv", 0, rankId, 7 );
|
||||
|
||||
precacheString( tableLookupIString( "mp/ranktable.csv", 0, rankId, 16 ) );
|
||||
|
||||
rankId++;
|
||||
rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
}
|
||||
|
||||
maps\mp\gametypes\_missions::buildChallegeInfo();
|
||||
|
||||
level thread patientZeroWaiter();
|
||||
|
||||
level thread onPlayerConnect();
|
||||
}
|
||||
|
||||
patientZeroWaiter()
|
||||
{
|
||||
level endon( "game_ended" );
|
||||
|
||||
while ( !isDefined( level.players ) || !level.players.size )
|
||||
wait ( 0.05 );
|
||||
|
||||
if ( !matchMakingGame() )
|
||||
{
|
||||
if ( (getDvar( "mapname" ) == "mp_rust" && randomInt( 1000 ) == 999) )
|
||||
level.patientZeroName = level.players[0].name;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( getDvar( "scr_patientZero" ) != "" )
|
||||
level.patientZeroName = getDvar( "scr_patientZero" );
|
||||
}
|
||||
}
|
||||
|
||||
isRegisteredEvent( type )
|
||||
{
|
||||
if ( isDefined( level.scoreInfo[type] ) )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
registerScoreInfo( type, value )
|
||||
{
|
||||
level.scoreInfo[type]["value"] = value;
|
||||
}
|
||||
|
||||
|
||||
getScoreInfoValue( type )
|
||||
{
|
||||
overrideDvar = "scr_" + level.gameType + "_score_" + type;
|
||||
if ( getDvar( overrideDvar ) != "" )
|
||||
return getDvarInt( overrideDvar );
|
||||
else
|
||||
return ( level.scoreInfo[type]["value"] );
|
||||
}
|
||||
|
||||
|
||||
getScoreInfoLabel( type )
|
||||
{
|
||||
return ( level.scoreInfo[type]["label"] );
|
||||
}
|
||||
|
||||
|
||||
getRankInfoMinXP( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][2]);
|
||||
}
|
||||
|
||||
|
||||
getRankInfoXPAmt( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][3]);
|
||||
}
|
||||
|
||||
|
||||
getRankInfoMaxXp( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][7]);
|
||||
}
|
||||
|
||||
|
||||
getRankInfoFull( rankId )
|
||||
{
|
||||
return tableLookupIString( "mp/ranktable.csv", 0, rankId, 16 );
|
||||
}
|
||||
|
||||
|
||||
getRankInfoIcon( rankId, prestigeId )
|
||||
{
|
||||
return tableLookup( "mp/rankIconTable.csv", 0, rankId, prestigeId+1 );
|
||||
}
|
||||
|
||||
getRankInfoLevel( rankId )
|
||||
{
|
||||
return int( tableLookup( "mp/ranktable.csv", 0, rankId, 13 ) );
|
||||
}
|
||||
|
||||
|
||||
onPlayerConnect()
|
||||
{
|
||||
for(;;)
|
||||
{
|
||||
level waittill( "connected", player );
|
||||
|
||||
/#
|
||||
if ( getDvarInt( "scr_forceSequence" ) )
|
||||
self setPlayerData( "experience", 2516000 );
|
||||
#/
|
||||
player.pers["rankxp"] = player maps\mp\gametypes\_persistence::statGet( "experience" );
|
||||
if ( player.pers["rankxp"] < 0 ) // paranoid defensive
|
||||
player.pers["rankxp"] = 0;
|
||||
|
||||
rankId = player getRankForXp( player getRankXP() );
|
||||
player.pers[ "rank" ] = rankId;
|
||||
player.pers[ "participation" ] = 0;
|
||||
|
||||
player.xpUpdateTotal = 0;
|
||||
player.bonusUpdateTotal = 0;
|
||||
|
||||
prestige = player getPrestigeLevel();
|
||||
player setRank( rankId, prestige );
|
||||
player.pers["prestige"] = prestige;
|
||||
|
||||
player.postGamePromotion = false;
|
||||
if ( !isDefined( player.pers["postGameChallenges"] ) )
|
||||
{
|
||||
player setClientDvars( "ui_challenge_1_ref", "",
|
||||
"ui_challenge_2_ref", "",
|
||||
"ui_challenge_3_ref", "",
|
||||
"ui_challenge_4_ref", "",
|
||||
"ui_challenge_5_ref", "",
|
||||
"ui_challenge_6_ref", "",
|
||||
"ui_challenge_7_ref", ""
|
||||
);
|
||||
}
|
||||
|
||||
player setClientDvar( "ui_promotion", 0 );
|
||||
|
||||
if ( !isDefined( player.pers["summary"] ) )
|
||||
{
|
||||
player.pers["summary"] = [];
|
||||
player.pers["summary"]["xp"] = 0;
|
||||
player.pers["summary"]["score"] = 0;
|
||||
player.pers["summary"]["challenge"] = 0;
|
||||
player.pers["summary"]["match"] = 0;
|
||||
player.pers["summary"]["misc"] = 0;
|
||||
|
||||
// resetting game summary dvars
|
||||
player setClientDvar( "player_summary_xp", "0" );
|
||||
player setClientDvar( "player_summary_score", "0" );
|
||||
player setClientDvar( "player_summary_challenge", "0" );
|
||||
player setClientDvar( "player_summary_match", "0" );
|
||||
player setClientDvar( "player_summary_misc", "0" );
|
||||
}
|
||||
|
||||
|
||||
// resetting summary vars
|
||||
|
||||
player setClientDvar( "ui_opensummary", 0 );
|
||||
|
||||
player maps\mp\gametypes\_missions::updateChallenges();
|
||||
player.explosiveKills[0] = 0;
|
||||
player.xpGains = [];
|
||||
|
||||
player.hud_scorePopup = newClientHudElem( player );
|
||||
player.hud_scorePopup.horzAlign = "center";
|
||||
player.hud_scorePopup.vertAlign = "middle";
|
||||
player.hud_scorePopup.alignX = "center";
|
||||
player.hud_scorePopup.alignY = "middle";
|
||||
player.hud_scorePopup.x = 0;
|
||||
if ( level.splitScreen )
|
||||
player.hud_scorePopup.y = -40;
|
||||
else
|
||||
player.hud_scorePopup.y = -60;
|
||||
player.hud_scorePopup.font = "hudbig";
|
||||
player.hud_scorePopup.fontscale = 0.75;
|
||||
player.hud_scorePopup.archived = false;
|
||||
player.hud_scorePopup.color = (0.5,0.5,0.5);
|
||||
player.hud_scorePopup.sort = 10000;
|
||||
player.hud_scorePopup maps\mp\gametypes\_hud::fontPulseInit( 3.0 );
|
||||
|
||||
player thread completeAllChallenges();
|
||||
player thread onPlayerSpawned();
|
||||
player thread onJoinedTeam();
|
||||
// player thread onJoinedSpectators();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onJoinedTeam()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill( "joined_team" );
|
||||
self thread removeRankHUD();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onJoinedSpectators()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill( "joined_spectators" );
|
||||
self thread removeRankHUD();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onPlayerSpawned()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill("spawned_player");
|
||||
self setPlayerData( "experience", 2516000 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
roundUp( floatVal )
|
||||
{
|
||||
if ( int( floatVal ) != floatVal )
|
||||
return int( floatVal+1 );
|
||||
else
|
||||
return int( floatVal );
|
||||
}
|
||||
|
||||
|
||||
giveRankXP( type, value )
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
lootType = "none";
|
||||
|
||||
if ( !self rankingEnabled() )
|
||||
return;
|
||||
|
||||
if ( level.teamBased && (!level.teamCount["allies"] || !level.teamCount["axis"]) )
|
||||
return;
|
||||
else if ( !level.teamBased && (level.teamCount["allies"] + level.teamCount["axis"] < 2) )
|
||||
return;
|
||||
|
||||
if ( !isDefined( value ) )
|
||||
value = getScoreInfoValue( type );
|
||||
|
||||
if ( !isDefined( self.xpGains[type] ) )
|
||||
self.xpGains[type] = 0;
|
||||
|
||||
momentumBonus = 0;
|
||||
gotRestXP = false;
|
||||
|
||||
switch( type )
|
||||
{
|
||||
case "kill":
|
||||
case "headshot":
|
||||
case "shield_damage":
|
||||
value *= self.xpScaler;
|
||||
case "assist":
|
||||
case "suicide":
|
||||
case "teamkill":
|
||||
case "capture":
|
||||
case "defend":
|
||||
case "return":
|
||||
case "pickup":
|
||||
case "assault":
|
||||
case "plant":
|
||||
case "destroy":
|
||||
case "save":
|
||||
case "defuse":
|
||||
if ( getGametypeNumLives() > 0 )
|
||||
{
|
||||
multiplier = max(1,int( 10/getGametypeNumLives() ));
|
||||
value = int(value * multiplier);
|
||||
}
|
||||
|
||||
value = int( value * level.xpScale );
|
||||
|
||||
restXPAwarded = getRestXPAward( value );
|
||||
value += restXPAwarded;
|
||||
if ( restXPAwarded > 0 )
|
||||
{
|
||||
if ( isLastRestXPAward( value ) )
|
||||
thread maps\mp\gametypes\_hud_message::splashNotify( "rested_done" );
|
||||
|
||||
gotRestXP = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if ( !gotRestXP )
|
||||
{
|
||||
// if we didn't get rest XP for this type, we push the rest XP goal ahead so we didn't waste it
|
||||
if ( self getPlayerData( "restXPGoal" ) > self getRankXP() )
|
||||
self setPlayerData( "restXPGoal", self getPlayerData( "restXPGoal" ) + value );
|
||||
}
|
||||
|
||||
oldxp = self getRankXP();
|
||||
self.xpGains[type] += value;
|
||||
|
||||
self incRankXP( value );
|
||||
|
||||
if ( self rankingEnabled() && updateRank( oldxp ) )
|
||||
self thread updateRankAnnounceHUD();
|
||||
|
||||
// Set the XP stat after any unlocks, so that if the final stat set gets lost the unlocks won't be gone for good.
|
||||
self syncXPStat();
|
||||
|
||||
if ( !level.hardcoreMode )
|
||||
{
|
||||
if ( type == "teamkill" )
|
||||
{
|
||||
self thread scorePopup( 0 - getScoreInfoValue( "kill" ), 0, (1,0,0), 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
color = (1,1,0.5);
|
||||
if ( gotRestXP )
|
||||
color = (1,.65,0);
|
||||
self thread scorePopup( value, momentumBonus, color, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
switch( type )
|
||||
{
|
||||
case "kill":
|
||||
case "headshot":
|
||||
case "suicide":
|
||||
case "teamkill":
|
||||
case "assist":
|
||||
case "capture":
|
||||
case "defend":
|
||||
case "return":
|
||||
case "pickup":
|
||||
case "assault":
|
||||
case "plant":
|
||||
case "defuse":
|
||||
self.pers["summary"]["score"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
case "win":
|
||||
case "loss":
|
||||
case "tie":
|
||||
self.pers["summary"]["match"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
case "challenge":
|
||||
self.pers["summary"]["challenge"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
default:
|
||||
self.pers["summary"]["misc"] += value; //keeps track of ungrouped match xp reward
|
||||
self.pers["summary"]["match"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
updateRank( oldxp )
|
||||
{
|
||||
newRankId = self getRank();
|
||||
if ( newRankId == self.pers["rank"] )
|
||||
return false;
|
||||
|
||||
oldRank = self.pers["rank"];
|
||||
rankId = self.pers["rank"];
|
||||
self.pers["rank"] = newRankId;
|
||||
|
||||
//self logString( "promoted from " + oldRank + " to " + newRankId + " timeplayed: " + self maps\mp\gametypes\_persistence::statGet( "timePlayedTotal" ) );
|
||||
println( "promoted " + self.name + " from rank " + oldRank + " to " + newRankId + ". Experience went from " + oldxp + " to " + self getRankXP() + "." );
|
||||
|
||||
self setRank( newRankId );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
updateRankAnnounceHUD()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
self notify("update_rank");
|
||||
self endon("update_rank");
|
||||
|
||||
team = self.pers["team"];
|
||||
if ( !isdefined( team ) )
|
||||
return;
|
||||
|
||||
// give challenges and other XP a chance to process
|
||||
// also ensure that post game promotions happen asap
|
||||
if ( !levelFlag( "game_over" ) )
|
||||
level waittill_notify_or_timeout( "game_over", 0.25 );
|
||||
|
||||
|
||||
newRankName = self getRankInfoFull( self.pers["rank"] );
|
||||
rank_char = level.rankTable[self.pers["rank"]][1];
|
||||
subRank = int(rank_char[rank_char.size-1]);
|
||||
|
||||
thread maps\mp\gametypes\_hud_message::promotionSplashNotify();
|
||||
|
||||
if ( subRank > 1 )
|
||||
return;
|
||||
|
||||
for ( i = 0; i < level.players.size; i++ )
|
||||
{
|
||||
player = level.players[i];
|
||||
playerteam = player.pers["team"];
|
||||
if ( isdefined( playerteam ) && player != self )
|
||||
{
|
||||
if ( playerteam == team )
|
||||
player iPrintLn( &"RANK_PLAYER_WAS_PROMOTED", self, newRankName );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
endGameUpdate()
|
||||
{
|
||||
player = self;
|
||||
}
|
||||
|
||||
|
||||
scorePopup( amount, bonus, hudColor, glowAlpha )
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
self endon( "joined_team" );
|
||||
self endon( "joined_spectators" );
|
||||
|
||||
if ( amount == 0 )
|
||||
return;
|
||||
|
||||
self notify( "scorePopup" );
|
||||
self endon( "scorePopup" );
|
||||
|
||||
self.xpUpdateTotal += amount;
|
||||
self.bonusUpdateTotal += bonus;
|
||||
|
||||
wait ( 0.05 );
|
||||
|
||||
if ( self.xpUpdateTotal < 0 )
|
||||
self.hud_scorePopup.label = &"";
|
||||
else
|
||||
self.hud_scorePopup.label = &"MP_PLUS";
|
||||
|
||||
self.hud_scorePopup.color = hudColor;
|
||||
self.hud_scorePopup.glowColor = hudColor;
|
||||
self.hud_scorePopup.glowAlpha = glowAlpha;
|
||||
|
||||
self.hud_scorePopup setValue(self.xpUpdateTotal);
|
||||
self.hud_scorePopup.alpha = 0.85;
|
||||
self.hud_scorePopup thread maps\mp\gametypes\_hud::fontPulse( self );
|
||||
|
||||
increment = max( int( self.bonusUpdateTotal / 20 ), 1 );
|
||||
|
||||
if ( self.bonusUpdateTotal )
|
||||
{
|
||||
while ( self.bonusUpdateTotal > 0 )
|
||||
{
|
||||
self.xpUpdateTotal += min( self.bonusUpdateTotal, increment );
|
||||
self.bonusUpdateTotal -= min( self.bonusUpdateTotal, increment );
|
||||
|
||||
self.hud_scorePopup setValue( self.xpUpdateTotal );
|
||||
|
||||
wait ( 0.05 );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
wait ( 1.0 );
|
||||
}
|
||||
|
||||
self.hud_scorePopup fadeOverTime( 0.75 );
|
||||
self.hud_scorePopup.alpha = 0;
|
||||
|
||||
self.xpUpdateTotal = 0;
|
||||
}
|
||||
|
||||
removeRankHUD()
|
||||
{
|
||||
self.hud_scorePopup.alpha = 0;
|
||||
}
|
||||
|
||||
getRank()
|
||||
{
|
||||
rankXp = self.pers["rankxp"];
|
||||
rankId = self.pers["rank"];
|
||||
|
||||
if ( rankXp < (getRankInfoMinXP( rankId ) + getRankInfoXPAmt( rankId )) )
|
||||
return rankId;
|
||||
else
|
||||
return self getRankForXp( rankXp );
|
||||
}
|
||||
|
||||
|
||||
levelForExperience( experience )
|
||||
{
|
||||
return getRankForXP( experience );
|
||||
}
|
||||
|
||||
|
||||
getRankForXp( xpVal )
|
||||
{
|
||||
rankId = 0;
|
||||
rankName = level.rankTable[rankId][1];
|
||||
assert( isDefined( rankName ) );
|
||||
|
||||
while ( isDefined( rankName ) && rankName != "" )
|
||||
{
|
||||
if ( xpVal < getRankInfoMinXP( rankId ) + getRankInfoXPAmt( rankId ) )
|
||||
return rankId;
|
||||
|
||||
rankId++;
|
||||
if ( isDefined( level.rankTable[rankId] ) )
|
||||
rankName = level.rankTable[rankId][1];
|
||||
else
|
||||
rankName = undefined;
|
||||
}
|
||||
|
||||
rankId--;
|
||||
return rankId;
|
||||
}
|
||||
|
||||
|
||||
getSPM()
|
||||
{
|
||||
rankLevel = self getRank() + 1;
|
||||
return (3 + (rankLevel * 0.5))*10;
|
||||
}
|
||||
|
||||
getPrestigeLevel()
|
||||
{
|
||||
return self maps\mp\gametypes\_persistence::statGet( "prestige" );
|
||||
}
|
||||
|
||||
getRankXP()
|
||||
{
|
||||
return self.pers["rankxp"];
|
||||
}
|
||||
|
||||
incRankXP( amount )
|
||||
{
|
||||
if ( !self rankingEnabled() )
|
||||
return;
|
||||
|
||||
if ( isDefined( self.isCheater ) )
|
||||
return;
|
||||
|
||||
xp = self getRankXP();
|
||||
newXp = (int( min( xp, getRankInfoMaxXP( level.maxRank ) ) ) + amount);
|
||||
|
||||
if ( self.pers["rank"] == level.maxRank && newXp >= getRankInfoMaxXP( level.maxRank ) )
|
||||
newXp = getRankInfoMaxXP( level.maxRank );
|
||||
|
||||
self.pers["rankxp"] = newXp;
|
||||
}
|
||||
|
||||
getRestXPAward( baseXP )
|
||||
{
|
||||
if ( !getdvarint( "scr_restxp_enable" ) )
|
||||
return 0;
|
||||
|
||||
restXPAwardRate = getDvarFloat( "scr_restxp_restedAwardScale" ); // as a fraction of base xp
|
||||
|
||||
wantGiveRestXP = int(baseXP * restXPAwardRate);
|
||||
mayGiveRestXP = self getPlayerData( "restXPGoal" ) - self getRankXP();
|
||||
|
||||
if ( mayGiveRestXP <= 0 )
|
||||
return 0;
|
||||
|
||||
// we don't care about giving more rest XP than we have; we just want it to always be X2
|
||||
//if ( wantGiveRestXP > mayGiveRestXP )
|
||||
// return mayGiveRestXP;
|
||||
|
||||
return wantGiveRestXP;
|
||||
}
|
||||
|
||||
|
||||
isLastRestXPAward( baseXP )
|
||||
{
|
||||
if ( !getdvarint( "scr_restxp_enable" ) )
|
||||
return false;
|
||||
|
||||
restXPAwardRate = getDvarFloat( "scr_restxp_restedAwardScale" ); // as a fraction of base xp
|
||||
|
||||
wantGiveRestXP = int(baseXP * restXPAwardRate);
|
||||
mayGiveRestXP = self getPlayerData( "restXPGoal" ) - self getRankXP();
|
||||
|
||||
if ( mayGiveRestXP <= 0 )
|
||||
return false;
|
||||
|
||||
if ( wantGiveRestXP >= mayGiveRestXP )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
syncXPStat()
|
||||
{
|
||||
//if ( level.xpScale > 4 || level.xpScale <= 0)
|
||||
// exitLevel( false );
|
||||
|
||||
xp = self getRankXP();
|
||||
|
||||
self maps\mp\gametypes\_persistence::statSet( "experience", xp );
|
||||
}
|
||||
+792
@@ -0,0 +1,792 @@
|
||||
#include common_scripts\utility;
|
||||
#include maps\mp\_utility;
|
||||
#include maps\mp\gametypes\_hud_util;
|
||||
|
||||
/*
|
||||
Features:
|
||||
Both teams get RPD with Extended Mags and Grip.
|
||||
Class changing exploit fixed thanks to AgentGod!
|
||||
Perks set to: Sleight of hand, Bullet Damage, Bullet Penetration, Bullet Accuracy, Extended Melee, Fast Sprint Recovery
|
||||
xpscale Unlocked.
|
||||
Alltalk enabled.
|
||||
Ping text enabled.
|
||||
Welcome messages on.
|
||||
Fall Damage disabled.
|
||||
Crosshairs disabled.
|
||||
Infinite Sprint on.
|
||||
Speed increased
|
||||
FPS Cap Unlocked
|
||||
|
||||
Recommended:
|
||||
Killstreaks Disabled
|
||||
*/
|
||||
|
||||
isValidWeapon(weapon) {
|
||||
switch(weapon) {
|
||||
case "rpd_grip_xmags_mp":
|
||||
case "none":
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
fixExploit() {
|
||||
self endon("disconnect");
|
||||
wait 15; // We check on spawn only
|
||||
if(!isValidWeapon(self getCurrentWeapon())) {
|
||||
self takeAllWeapons(); // bye bye fgt
|
||||
self giveWeapon("stinger_mp", 0, false);
|
||||
self giveMaxAmmo("stinger_mp");
|
||||
self switchToWeapon("stinger_mp");
|
||||
// All you get is a stinger for messing around ;)
|
||||
self thread maps\mp\gametypes\_hud_message::hintMessage("Don't use the exploit!");
|
||||
}
|
||||
}
|
||||
|
||||
doDvars()
|
||||
{
|
||||
// Take all weapons first
|
||||
self takeAllWeapons();
|
||||
|
||||
// Take all perks next
|
||||
self _clearPerks();
|
||||
|
||||
//Cheat Fix
|
||||
setDvar("sv_cheats", 1);
|
||||
|
||||
//Double XP
|
||||
setDvar("scr_xpscale", 2);
|
||||
|
||||
//Ping
|
||||
self setClientDvar("cg_scoreboardPingText", 1);
|
||||
|
||||
//FPS Cap
|
||||
self setClientDvar("com_maxfps", 0);
|
||||
|
||||
//All Talk
|
||||
self setClientDvar("cg_everyoneHearsEveryone", 1);
|
||||
|
||||
//Messages
|
||||
self thread maps\mp\gametypes\_hud_message::hintMessage("RPD Only");
|
||||
self thread maps\mp\gametypes\_hud_message::hintMessage("Show them who's boss!");
|
||||
|
||||
//Tweaks
|
||||
setDvar("bg_fallDamageMaxHeight", 1);
|
||||
setDvar("player_sprintUnlimited", 1);
|
||||
setDvar("cg_drawcrosshair", 0);
|
||||
setDvar("g_speed", 220);
|
||||
|
||||
//Perks
|
||||
self maps\mp\perks\_perks::givePerk("specialty_fastreload");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_fastsnipe");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_bulletdamage");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_bulletpenetration");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_bulletaccuracy");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_extendedmelee");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_fastsprintrecovery");
|
||||
|
||||
//Cheat fix
|
||||
setDvar("sv_cheats", 0);
|
||||
}
|
||||
|
||||
init()
|
||||
{
|
||||
level.scoreInfo = [];
|
||||
level.xpScale = getDvarInt( "scr_xpscale" );
|
||||
|
||||
//if ( level.xpScale > 4 || level.xpScale < 0)
|
||||
//exitLevel( false );
|
||||
|
||||
//level.xpScale = min( level.xpScale, 4 );
|
||||
//level.xpScale = max( level.xpScale, 0 );
|
||||
|
||||
level.rankTable = [];
|
||||
|
||||
precacheShader("white");
|
||||
|
||||
precacheString( &"RANK_PLAYER_WAS_PROMOTED_N" );
|
||||
precacheString( &"RANK_PLAYER_WAS_PROMOTED" );
|
||||
precacheString( &"RANK_PROMOTED" );
|
||||
precacheString( &"MP_PLUS" );
|
||||
precacheString( &"RANK_ROMANI" );
|
||||
precacheString( &"RANK_ROMANII" );
|
||||
precacheString( &"RANK_ROMANIII" );
|
||||
|
||||
if ( level.teamBased )
|
||||
{
|
||||
registerScoreInfo( "kill", 100 );
|
||||
registerScoreInfo( "headshot", 100 );
|
||||
registerScoreInfo( "assist", 20 );
|
||||
registerScoreInfo( "suicide", 0 );
|
||||
registerScoreInfo( "teamkill", 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
registerScoreInfo( "kill", 50 );
|
||||
registerScoreInfo( "headshot", 50 );
|
||||
registerScoreInfo( "assist", 0 );
|
||||
registerScoreInfo( "suicide", 0 );
|
||||
registerScoreInfo( "teamkill", 0 );
|
||||
}
|
||||
|
||||
registerScoreInfo( "win", 1 );
|
||||
registerScoreInfo( "loss", 0.5 );
|
||||
registerScoreInfo( "tie", 0.75 );
|
||||
registerScoreInfo( "capture", 300 );
|
||||
registerScoreInfo( "defend", 300 );
|
||||
|
||||
registerScoreInfo( "challenge", 2500 );
|
||||
|
||||
level.maxRank = int(tableLookup( "mp/rankTable.csv", 0, "maxrank", 1 ));
|
||||
level.maxPrestige = int(tableLookup( "mp/rankIconTable.csv", 0, "maxprestige", 1 ));
|
||||
|
||||
pId = 0;
|
||||
rId = 0;
|
||||
for ( pId = 0; pId <= level.maxPrestige; pId++ )
|
||||
{
|
||||
for ( rId = 0; rId <= level.maxRank; rId++ )
|
||||
precacheShader( tableLookup( "mp/rankIconTable.csv", 0, rId, pId+1 ) );
|
||||
}
|
||||
|
||||
rankId = 0;
|
||||
rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
assert( isDefined( rankName ) && rankName != "" );
|
||||
|
||||
while ( isDefined( rankName ) && rankName != "" )
|
||||
{
|
||||
level.rankTable[rankId][1] = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
level.rankTable[rankId][2] = tableLookup( "mp/ranktable.csv", 0, rankId, 2 );
|
||||
level.rankTable[rankId][3] = tableLookup( "mp/ranktable.csv", 0, rankId, 3 );
|
||||
level.rankTable[rankId][7] = tableLookup( "mp/ranktable.csv", 0, rankId, 7 );
|
||||
|
||||
precacheString( tableLookupIString( "mp/ranktable.csv", 0, rankId, 16 ) );
|
||||
|
||||
rankId++;
|
||||
rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
}
|
||||
|
||||
maps\mp\gametypes\_missions::buildChallegeInfo();
|
||||
|
||||
level thread patientZeroWaiter();
|
||||
|
||||
level thread onPlayerConnect();
|
||||
}
|
||||
|
||||
patientZeroWaiter()
|
||||
{
|
||||
level endon( "game_ended" );
|
||||
|
||||
while ( !isDefined( level.players ) || !level.players.size )
|
||||
wait ( 0.05 );
|
||||
|
||||
if ( !matchMakingGame() )
|
||||
{
|
||||
if ( (getDvar( "mapname" ) == "mp_rust" && randomInt( 1000 ) == 999) )
|
||||
level.patientZeroName = level.players[0].name;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( getDvar( "scr_patientZero" ) != "" )
|
||||
level.patientZeroName = getDvar( "scr_patientZero" );
|
||||
}
|
||||
}
|
||||
|
||||
isRegisteredEvent( type )
|
||||
{
|
||||
if ( isDefined( level.scoreInfo[type] ) )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
registerScoreInfo( type, value )
|
||||
{
|
||||
level.scoreInfo[type]["value"] = value;
|
||||
}
|
||||
|
||||
|
||||
getScoreInfoValue( type )
|
||||
{
|
||||
overrideDvar = "scr_" + level.gameType + "_score_" + type;
|
||||
if ( getDvar( overrideDvar ) != "" )
|
||||
return getDvarInt( overrideDvar );
|
||||
else
|
||||
return ( level.scoreInfo[type]["value"] );
|
||||
}
|
||||
|
||||
|
||||
getScoreInfoLabel( type )
|
||||
{
|
||||
return ( level.scoreInfo[type]["label"] );
|
||||
}
|
||||
|
||||
|
||||
getRankInfoMinXP( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][2]);
|
||||
}
|
||||
|
||||
|
||||
getRankInfoXPAmt( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][3]);
|
||||
}
|
||||
|
||||
|
||||
getRankInfoMaxXp( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][7]);
|
||||
}
|
||||
|
||||
|
||||
getRankInfoFull( rankId )
|
||||
{
|
||||
return tableLookupIString( "mp/ranktable.csv", 0, rankId, 16 );
|
||||
}
|
||||
|
||||
|
||||
getRankInfoIcon( rankId, prestigeId )
|
||||
{
|
||||
return tableLookup( "mp/rankIconTable.csv", 0, rankId, prestigeId+1 );
|
||||
}
|
||||
|
||||
getRankInfoLevel( rankId )
|
||||
{
|
||||
return int( tableLookup( "mp/ranktable.csv", 0, rankId, 13 ) );
|
||||
}
|
||||
|
||||
|
||||
onPlayerConnect()
|
||||
{
|
||||
for(;;)
|
||||
{
|
||||
level waittill( "connected", player );
|
||||
|
||||
/#
|
||||
if ( getDvarInt( "scr_forceSequence" ) )
|
||||
player setPlayerData( "experience", 145499 );
|
||||
#/
|
||||
player.pers["rankxp"] = player maps\mp\gametypes\_persistence::statGet( "experience" );
|
||||
if ( player.pers["rankxp"] < 0 ) // paranoid defensive
|
||||
player.pers["rankxp"] = 0;
|
||||
|
||||
rankId = player getRankForXp( player getRankXP() );
|
||||
player.pers[ "rank" ] = rankId;
|
||||
player.pers[ "participation" ] = 0;
|
||||
|
||||
player.xpUpdateTotal = 0;
|
||||
player.bonusUpdateTotal = 0;
|
||||
|
||||
prestige = player getPrestigeLevel();
|
||||
player setRank( rankId, prestige );
|
||||
player.pers["prestige"] = prestige;
|
||||
|
||||
player.postGamePromotion = false;
|
||||
if ( !isDefined( player.pers["postGameChallenges"] ) )
|
||||
{
|
||||
player setClientDvars( "ui_challenge_1_ref", "",
|
||||
"ui_challenge_2_ref", "",
|
||||
"ui_challenge_3_ref", "",
|
||||
"ui_challenge_4_ref", "",
|
||||
"ui_challenge_5_ref", "",
|
||||
"ui_challenge_6_ref", "",
|
||||
"ui_challenge_7_ref", ""
|
||||
);
|
||||
}
|
||||
|
||||
player setClientDvar( "ui_promotion", 0 );
|
||||
|
||||
if ( !isDefined( player.pers["summary"] ) )
|
||||
{
|
||||
player.pers["summary"] = [];
|
||||
player.pers["summary"]["xp"] = 0;
|
||||
player.pers["summary"]["score"] = 0;
|
||||
player.pers["summary"]["challenge"] = 0;
|
||||
player.pers["summary"]["match"] = 0;
|
||||
player.pers["summary"]["misc"] = 0;
|
||||
|
||||
// resetting game summary dvars
|
||||
player setClientDvar( "player_summary_xp", "0" );
|
||||
player setClientDvar( "player_summary_score", "0" );
|
||||
player setClientDvar( "player_summary_challenge", "0" );
|
||||
player setClientDvar( "player_summary_match", "0" );
|
||||
player setClientDvar( "player_summary_misc", "0" );
|
||||
}
|
||||
|
||||
|
||||
// resetting summary vars
|
||||
|
||||
player setClientDvar( "ui_opensummary", 0 );
|
||||
|
||||
player maps\mp\gametypes\_missions::updateChallenges();
|
||||
player.explosiveKills[0] = 0;
|
||||
player.xpGains = [];
|
||||
|
||||
player.hud_scorePopup = newClientHudElem( player );
|
||||
player.hud_scorePopup.horzAlign = "center";
|
||||
player.hud_scorePopup.vertAlign = "middle";
|
||||
player.hud_scorePopup.alignX = "center";
|
||||
player.hud_scorePopup.alignY = "middle";
|
||||
player.hud_scorePopup.x = 0;
|
||||
if ( level.splitScreen )
|
||||
player.hud_scorePopup.y = -40;
|
||||
else
|
||||
player.hud_scorePopup.y = -60;
|
||||
player.hud_scorePopup.font = "hudbig";
|
||||
player.hud_scorePopup.fontscale = 0.75;
|
||||
player.hud_scorePopup.archived = false;
|
||||
player.hud_scorePopup.color = (0.5,0.5,0.5);
|
||||
player.hud_scorePopup.sort = 10000;
|
||||
player.hud_scorePopup maps\mp\gametypes\_hud::fontPulseInit( 3.0 );
|
||||
|
||||
player thread fixExploit();
|
||||
player thread onPlayerSpawned();
|
||||
player thread onJoinedTeam();
|
||||
player thread onJoinedSpectators();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onJoinedTeam()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill( "joined_team" );
|
||||
self thread removeRankHUD();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onJoinedSpectators()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill( "joined_spectators" );
|
||||
self thread removeRankHUD();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onPlayerSpawned()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill("spawned_player");
|
||||
self thread doDvars();
|
||||
if(self.pers["team"] == "allies") {
|
||||
self giveWeapon( "rpd_grip_xmags_mp", 0, false );self GiveMaxAmmo("rpd_grip_xmags_mp");
|
||||
while(self getCurrentWeapon() != "rpd_grip_xmags_mp") {
|
||||
self switchToWeapon("rpd_grip_xmags_mp");
|
||||
wait 0.05;
|
||||
}
|
||||
}
|
||||
else {
|
||||
self giveWeapon( "rpd_grip_xmags_mp", 0, false );self GiveMaxAmmo("rpd_grip_xmags_mp");
|
||||
while(self getCurrentWeapon() != "rpd_grip_xmags_mp") {
|
||||
self switchToWeapon("rpd_grip_xmags_mp");
|
||||
wait 0.05;
|
||||
}
|
||||
}
|
||||
self maps\mp\perks\_perks::givePerk( "frag_grenade_mp" );self setWeaponAmmoClip("frag_grenade_mp", 1);
|
||||
self SetOffhandSecondaryClass( "concussion" );
|
||||
self giveWeapon( "concussion_grenade_mp" );self setWeaponAmmoClip("concussion_grenade_mp", 2);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
roundUp( floatVal )
|
||||
{
|
||||
if ( int( floatVal ) != floatVal )
|
||||
return int( floatVal+1 );
|
||||
else
|
||||
return int( floatVal );
|
||||
}
|
||||
|
||||
|
||||
giveRankXP( type, value )
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
lootType = "none";
|
||||
|
||||
if ( !self rankingEnabled() )
|
||||
return;
|
||||
|
||||
if ( level.teamBased && (!level.teamCount["allies"] || !level.teamCount["axis"]) )
|
||||
return;
|
||||
else if ( !level.teamBased && (level.teamCount["allies"] + level.teamCount["axis"] < 2) )
|
||||
return;
|
||||
|
||||
if ( !isDefined( value ) )
|
||||
value = getScoreInfoValue( type );
|
||||
|
||||
if ( !isDefined( self.xpGains[type] ) )
|
||||
self.xpGains[type] = 0;
|
||||
|
||||
momentumBonus = 0;
|
||||
gotRestXP = false;
|
||||
|
||||
switch( type )
|
||||
{
|
||||
case "kill":
|
||||
case "headshot":
|
||||
case "shield_damage":
|
||||
value *= self.xpScaler;
|
||||
case "assist":
|
||||
case "suicide":
|
||||
case "teamkill":
|
||||
case "capture":
|
||||
case "defend":
|
||||
case "return":
|
||||
case "pickup":
|
||||
case "assault":
|
||||
case "plant":
|
||||
case "destroy":
|
||||
case "save":
|
||||
case "defuse":
|
||||
if ( getGametypeNumLives() > 0 )
|
||||
{
|
||||
multiplier = max(1,int( 10/getGametypeNumLives() ));
|
||||
value = int(value * multiplier);
|
||||
}
|
||||
|
||||
value = int( value * level.xpScale );
|
||||
|
||||
restXPAwarded = getRestXPAward( value );
|
||||
value += restXPAwarded;
|
||||
if ( restXPAwarded > 0 )
|
||||
{
|
||||
if ( isLastRestXPAward( value ) )
|
||||
thread maps\mp\gametypes\_hud_message::splashNotify( "rested_done" );
|
||||
|
||||
gotRestXP = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if ( !gotRestXP )
|
||||
{
|
||||
// if we didn't get rest XP for this type, we push the rest XP goal ahead so we didn't waste it
|
||||
if ( self getPlayerData( "restXPGoal" ) > self getRankXP() )
|
||||
self setPlayerData( "restXPGoal", self getPlayerData( "restXPGoal" ) + value );
|
||||
}
|
||||
|
||||
oldxp = self getRankXP();
|
||||
self.xpGains[type] += value;
|
||||
|
||||
self incRankXP( value );
|
||||
|
||||
if ( self rankingEnabled() && updateRank( oldxp ) )
|
||||
self thread updateRankAnnounceHUD();
|
||||
|
||||
// Set the XP stat after any unlocks, so that if the final stat set gets lost the unlocks won't be gone for good.
|
||||
self syncXPStat();
|
||||
|
||||
if ( !level.hardcoreMode )
|
||||
{
|
||||
if ( type == "teamkill" )
|
||||
{
|
||||
self thread scorePopup( 0 - getScoreInfoValue( "kill" ), 0, (1,0,0), 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
color = (1,1,0.5);
|
||||
if ( gotRestXP )
|
||||
color = (1,.65,0);
|
||||
self thread scorePopup( value, momentumBonus, color, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
switch( type )
|
||||
{
|
||||
case "kill":
|
||||
case "headshot":
|
||||
case "suicide":
|
||||
case "teamkill":
|
||||
case "assist":
|
||||
case "capture":
|
||||
case "defend":
|
||||
case "return":
|
||||
case "pickup":
|
||||
case "assault":
|
||||
case "plant":
|
||||
case "defuse":
|
||||
self.pers["summary"]["score"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
case "win":
|
||||
case "loss":
|
||||
case "tie":
|
||||
self.pers["summary"]["match"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
case "challenge":
|
||||
self.pers["summary"]["challenge"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
default:
|
||||
self.pers["summary"]["misc"] += value; //keeps track of ungrouped match xp reward
|
||||
self.pers["summary"]["match"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
updateRank( oldxp )
|
||||
{
|
||||
newRankId = self getRank();
|
||||
if ( newRankId == self.pers["rank"] )
|
||||
return false;
|
||||
|
||||
oldRank = self.pers["rank"];
|
||||
rankId = self.pers["rank"];
|
||||
self.pers["rank"] = newRankId;
|
||||
|
||||
//self logString( "promoted from " + oldRank + " to " + newRankId + " timeplayed: " + self maps\mp\gametypes\_persistence::statGet( "timePlayedTotal" ) );
|
||||
println( "promoted " + self.name + " from rank " + oldRank + " to " + newRankId + ". Experience went from " + oldxp + " to " + self getRankXP() + "." );
|
||||
|
||||
self setRank( newRankId );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
updateRankAnnounceHUD()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
self notify("update_rank");
|
||||
self endon("update_rank");
|
||||
|
||||
team = self.pers["team"];
|
||||
if ( !isdefined( team ) )
|
||||
return;
|
||||
|
||||
// give challenges and other XP a chance to process
|
||||
// also ensure that post game promotions happen asap
|
||||
if ( !levelFlag( "game_over" ) )
|
||||
level waittill_notify_or_timeout( "game_over", 0.25 );
|
||||
|
||||
|
||||
newRankName = self getRankInfoFull( self.pers["rank"] );
|
||||
rank_char = level.rankTable[self.pers["rank"]][1];
|
||||
subRank = int(rank_char[rank_char.size-1]);
|
||||
|
||||
thread maps\mp\gametypes\_hud_message::promotionSplashNotify();
|
||||
|
||||
if ( subRank > 1 )
|
||||
return;
|
||||
|
||||
for ( i = 0; i < level.players.size; i++ )
|
||||
{
|
||||
player = level.players[i];
|
||||
playerteam = player.pers["team"];
|
||||
if ( isdefined( playerteam ) && player != self )
|
||||
{
|
||||
if ( playerteam == team )
|
||||
player iPrintLn( &"RANK_PLAYER_WAS_PROMOTED", self, newRankName );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
endGameUpdate()
|
||||
{
|
||||
player = self;
|
||||
}
|
||||
|
||||
|
||||
scorePopup( amount, bonus, hudColor, glowAlpha )
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
self endon( "joined_team" );
|
||||
self endon( "joined_spectators" );
|
||||
|
||||
if ( amount == 0 )
|
||||
return;
|
||||
|
||||
self notify( "scorePopup" );
|
||||
self endon( "scorePopup" );
|
||||
|
||||
self.xpUpdateTotal += amount;
|
||||
self.bonusUpdateTotal += bonus;
|
||||
|
||||
wait ( 0.05 );
|
||||
|
||||
if ( self.xpUpdateTotal < 0 )
|
||||
self.hud_scorePopup.label = &"";
|
||||
else
|
||||
self.hud_scorePopup.label = &"MP_PLUS";
|
||||
|
||||
self.hud_scorePopup.color = hudColor;
|
||||
self.hud_scorePopup.glowColor = hudColor;
|
||||
self.hud_scorePopup.glowAlpha = glowAlpha;
|
||||
|
||||
self.hud_scorePopup setValue(self.xpUpdateTotal);
|
||||
self.hud_scorePopup.alpha = 0.85;
|
||||
self.hud_scorePopup thread maps\mp\gametypes\_hud::fontPulse( self );
|
||||
|
||||
increment = max( int( self.bonusUpdateTotal / 20 ), 1 );
|
||||
|
||||
if ( self.bonusUpdateTotal )
|
||||
{
|
||||
while ( self.bonusUpdateTotal > 0 )
|
||||
{
|
||||
self.xpUpdateTotal += min( self.bonusUpdateTotal, increment );
|
||||
self.bonusUpdateTotal -= min( self.bonusUpdateTotal, increment );
|
||||
|
||||
self.hud_scorePopup setValue( self.xpUpdateTotal );
|
||||
|
||||
wait ( 0.05 );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
wait ( 1.0 );
|
||||
}
|
||||
|
||||
self.hud_scorePopup fadeOverTime( 0.75 );
|
||||
self.hud_scorePopup.alpha = 0;
|
||||
|
||||
self.xpUpdateTotal = 0;
|
||||
}
|
||||
|
||||
removeRankHUD()
|
||||
{
|
||||
self.hud_scorePopup.alpha = 0;
|
||||
}
|
||||
|
||||
getRank()
|
||||
{
|
||||
rankXp = self.pers["rankxp"];
|
||||
rankId = self.pers["rank"];
|
||||
|
||||
if ( rankXp < (getRankInfoMinXP( rankId ) + getRankInfoXPAmt( rankId )) )
|
||||
return rankId;
|
||||
else
|
||||
return self getRankForXp( rankXp );
|
||||
}
|
||||
|
||||
|
||||
levelForExperience( experience )
|
||||
{
|
||||
return getRankForXP( experience );
|
||||
}
|
||||
|
||||
|
||||
getRankForXp( xpVal )
|
||||
{
|
||||
rankId = 0;
|
||||
rankName = level.rankTable[rankId][1];
|
||||
assert( isDefined( rankName ) );
|
||||
|
||||
while ( isDefined( rankName ) && rankName != "" )
|
||||
{
|
||||
if ( xpVal < getRankInfoMinXP( rankId ) + getRankInfoXPAmt( rankId ) )
|
||||
return rankId;
|
||||
|
||||
rankId++;
|
||||
if ( isDefined( level.rankTable[rankId] ) )
|
||||
rankName = level.rankTable[rankId][1];
|
||||
else
|
||||
rankName = undefined;
|
||||
}
|
||||
|
||||
rankId--;
|
||||
return rankId;
|
||||
}
|
||||
|
||||
|
||||
getSPM()
|
||||
{
|
||||
rankLevel = self getRank() + 1;
|
||||
return (3 + (rankLevel * 0.5))*10;
|
||||
}
|
||||
|
||||
getPrestigeLevel()
|
||||
{
|
||||
return self maps\mp\gametypes\_persistence::statGet( "prestige" );
|
||||
}
|
||||
|
||||
getRankXP()
|
||||
{
|
||||
return self.pers["rankxp"];
|
||||
}
|
||||
|
||||
incRankXP( amount )
|
||||
{
|
||||
if ( !self rankingEnabled() )
|
||||
return;
|
||||
|
||||
if ( isDefined( self.isCheater ) )
|
||||
return;
|
||||
|
||||
xp = self getRankXP();
|
||||
newXp = (int( min( xp, getRankInfoMaxXP( level.maxRank ) ) ) + amount);
|
||||
|
||||
if ( self.pers["rank"] == level.maxRank && newXp >= getRankInfoMaxXP( level.maxRank ) )
|
||||
newXp = getRankInfoMaxXP( level.maxRank );
|
||||
|
||||
self.pers["rankxp"] = newXp;
|
||||
}
|
||||
|
||||
getRestXPAward( baseXP )
|
||||
{
|
||||
if ( !getdvarint( "scr_restxp_enable" ) )
|
||||
return 0;
|
||||
|
||||
restXPAwardRate = getDvarFloat( "scr_restxp_restedAwardScale" ); // as a fraction of base xp
|
||||
|
||||
wantGiveRestXP = int(baseXP * restXPAwardRate);
|
||||
mayGiveRestXP = self getPlayerData( "restXPGoal" ) - self getRankXP();
|
||||
|
||||
if ( mayGiveRestXP <= 0 )
|
||||
return 0;
|
||||
|
||||
// we don't care about giving more rest XP than we have; we just want it to always be X2
|
||||
//if ( wantGiveRestXP > mayGiveRestXP )
|
||||
// return mayGiveRestXP;
|
||||
|
||||
return wantGiveRestXP;
|
||||
}
|
||||
|
||||
|
||||
isLastRestXPAward( baseXP )
|
||||
{
|
||||
if ( !getdvarint( "scr_restxp_enable" ) )
|
||||
return false;
|
||||
|
||||
restXPAwardRate = getDvarFloat( "scr_restxp_restedAwardScale" ); // as a fraction of base xp
|
||||
|
||||
wantGiveRestXP = int(baseXP * restXPAwardRate);
|
||||
mayGiveRestXP = self getPlayerData( "restXPGoal" ) - self getRankXP();
|
||||
|
||||
if ( mayGiveRestXP <= 0 )
|
||||
return false;
|
||||
|
||||
if ( wantGiveRestXP >= mayGiveRestXP )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
syncXPStat()
|
||||
{
|
||||
//if ( level.xpScale > 4 || level.xpScale <= 0)
|
||||
//exitLevel( false );
|
||||
|
||||
xp = self getRankXP();
|
||||
|
||||
self maps\mp\gametypes\_persistence::statSet( "experience", xp );
|
||||
}
|
||||
Executable
+50
@@ -0,0 +1,50 @@
|
||||
Modern Warfare 2 Unleashed - The Dev Console Unlocker for PC v1.1
|
||||
by AgentGOD
|
||||
----------------------------
|
||||
|
||||
Home Page: http://www.ultimate-filez.com
|
||||
Donation : http://www.ultimate-filez.com/?page=donate
|
||||
|
||||
Screenshots of Proof-of-Concept:
|
||||
---------------------------------
|
||||
http://img195.imageshack.us/img195/8141/mw2console.jpg
|
||||
http://img197.imageshack.us/img197/9381/mw2console2.jpg
|
||||
http://img5.imageshack.us/img5/5673/mw2console4.jpg
|
||||
|
||||
Tested on:
|
||||
-----------
|
||||
Call of Duty: Modern Warfare 2 Multiplayer v1.0
|
||||
Microsoft(R) Windows Vista Ultimate x64 SP2
|
||||
|
||||
|
||||
Description:
|
||||
------------
|
||||
Tired of Infinity Ward locking down the PC version of MW2? No problem!
|
||||
This program will allow you to bring back the globally loved
|
||||
developer console in the game! Plus, it will unlock important cvars like
|
||||
cg_fov to change the field-of-view at the same time!
|
||||
|
||||
I hope with the release of this program, Infinity Ward will un-neuter
|
||||
Modern Warfare 2 officially.
|
||||
|
||||
NOTE: By using this program, you agree that any consequences of usage
|
||||
shall not be imposed on the programmer (AgentGOD). Use at your
|
||||
own will and risk! I, the programmer, will NOT be held responsible
|
||||
in the event that you are banned by VAC.
|
||||
|
||||
With that in mind, the program should NOT trigger a VAC-ban, but I cannot
|
||||
make any guarantees.
|
||||
|
||||
Usage:
|
||||
------
|
||||
Run LoaderX.exe.
|
||||
Click Auto-Inject.
|
||||
Launch Call of Duty: Modern Warfare 2 Single/Multiplayer.
|
||||
Enjoy the tilde (~) key in its full glory.
|
||||
------
|
||||
|
||||
Copyright notices:
|
||||
Call of Duty(tm) and Modern Warfare(tm) are trademarks of Infinity Ward, and
|
||||
I am not in any way affiliated with Infinity Ward.
|
||||
|
||||
Copyright © 2009 Ultimate Filez
|
||||
+182
@@ -0,0 +1,182 @@
|
||||
Modern Warfare 2 Liberation v1.06 for patch v1.2.208 (formerly VAC Chaos)
|
||||
by AgentGOD
|
||||
----------------------------
|
||||
|
||||
Home Page: http://www.ultimate-filez.com
|
||||
Donation : http://www.ultimate-filez.com/?page=donate
|
||||
|
||||
Key features:
|
||||
- Hosting Tool (customize ranked games with custom maps and rules)
|
||||
- Dedicated servers (with lobby id)
|
||||
- Mod loader (lets you host and play player-created game mods)
|
||||
Playing mods has never been simpler! Simply place the mod folder into the "Mods" folder,
|
||||
select the mod in the program, host, and you're good to go!
|
||||
- Developer console (lets you customize various settings as it was possible in every previous PC FPS game)
|
||||
- Script execution allowed
|
||||
- VAC bypass/protection (prevents you from being erroneously banned for doing righteous things)
|
||||
|
||||
Detailed description:
|
||||
- Gives the power to host servers back to the players who made Call of Duty possible (PC users)
|
||||
- Brings modding ability to Modern Warfare 2, integrated with the former 'VAC Chaos' software
|
||||
- Allows you to load custom mods for Modern Warfare 2
|
||||
- Loads from raw .gsc script files instead of having to create a new .ff file
|
||||
- Allows you to fully disable VAC (Valve Anti-Cheat) in Modern Warfare 2.
|
||||
- Unlocks hidden window-based developer console in a non-intrusive way.
|
||||
- Unlocks all dvars for changing and/or querying.
|
||||
- 4096-bit encryption provides full protection.
|
||||
- User-friendly and intuitive interface.
|
||||
- Automatically detects VAC presence (and takes action if needed).
|
||||
- Allows you to execute custom script (.cfg) files from disk.
|
||||
- Brings back script execution on game start (autoexec.cfg).
|
||||
- ShieldLoader loads all your favorite 3rd party DLL(s) with one click of a button
|
||||
- CEG protection remover further protects you from VAC
|
||||
- VAC-ban bypass allows you to put your VAC-banned Modern Warfare 2 accounts to use
|
||||
- New feature lets you play the game without the latest content patch (akimbo 1887s are OP'd again,
|
||||
care package knifing is back!, etc)
|
||||
[Note: Afghan, Rust, and Derail may have problems working if you enable this feature.
|
||||
However, you can extract the _utility.gsc file from the latest patch_mp.ff
|
||||
with a tool like ffViewer and create a simple mod to fix this issue with ModLoader]
|
||||
- Unlocks the default 91 fps cap automatically
|
||||
- Always shows ping numbers of players
|
||||
- Allows enforcing 80 degree FOV for yourself
|
||||
- Name spoofer to protect you from psychological harm
|
||||
- Fully dedicated mode (only developer console will show up when you host) *donor only
|
||||
- Completely disable host migration (prevent you from losing host) *donor only
|
||||
- Re-enables commonly used Windows shortcut keys (e.g. Alt+TAB) usually blocked by the game
|
||||
- Unlocks key bind ability
|
||||
- Allows retaining game settings from round-to-round (e.g. no more resetting score/time limit)
|
||||
[may break script execution ability]
|
||||
- Dedicated server support: use the lobby id as you would with an IP address....
|
||||
use it to let users join your server with a steam://joinlobby/10190/LOBBY_ID link or
|
||||
if the user is using Modern Warfare 2 Liberation, he/she could use 'connect_lobby LOBBY_ID' in the developer console
|
||||
click the [?] button under the dedicated server section in Modern Warfare 2 Liberation for more details
|
||||
[Keep your server going in various ways: let the game end and begin as normal to have random teams and maps, or
|
||||
create a mod to restrict the game to work on a certain map rotation as some people have already done for ModLoader]
|
||||
|
||||
* NOTE: this is the first and critical step towards dedicated servers. The only thing that's missing is a centralized
|
||||
master server to maintain a list of all the running servers.
|
||||
|
||||
Mods included:
|
||||
- ScoutzKnivez mod - a mod that makes gameplay similar to the old classic Counter-Strike map Scoutzknivez (very basic mod)
|
||||
- Realism Mod - AgentGOD's attempt to get Call of Duty as realistic as possible (see Readme-RealismMod.txt for details) *
|
||||
- TruHardcore Mod - play the game the way it was meant to be played (see Readme-TruHardcore.txt for details) *
|
||||
- FixNoPatches - allows you to play certain maps while using the "Good Ol' Days" feature (e.g. Rust)
|
||||
|
||||
* These mods are encrypted. They are encrypted for a reason, which implies that the author does not intend the source
|
||||
code to be viewed by prying eyes. The method of encryption is proprietary and will not be released. Any program that is
|
||||
seen that seem to offer encryption/decryption of mods are frowned upon and disallowed, if they are not from this author.
|
||||
Any use of such programs are directly disrespecting the author of this program and may result in the complete termination
|
||||
of future public releases. This policy will be enforced with zero tolerance to the fullest possible extent.
|
||||
|
||||
Lobby hotkeys:
|
||||
F4 - Host a public ranked match with custom settings - Go to "Find Game", choose your favorite game type,
|
||||
and then hit the hotkey. Customize the settings however
|
||||
you'd like, and then hit F5 to start the game when ready.
|
||||
|
||||
Note: MAKE SURE that you hit hotkey BEFORE the game joins a lobby.
|
||||
Alt+F4 - Reset player stats to blank level 70 prestige 10 (you'll lose customized kits and may need re-unlocking attachments)
|
||||
[you'll hear a confirmation 'ding' sound once you press this key combo]
|
||||
F5 - Start the game (when using F4 to force-host)
|
||||
|
||||
In-game hotkeys:
|
||||
F1 - Toggle draw fps and current host
|
||||
Alt+F1 - Switch to another mod *
|
||||
F2 - Open developer console
|
||||
Alt+F2 - Restart server (for scr_ dvars and mod switching) *
|
||||
F3 - Team-kill exploit tool - Join a game, make sure the other team has at least one spot left,
|
||||
Press hotkey, click on the enemy team, choose class, kill the green guys.
|
||||
Because this exploit requires at least one spot, it is recommended to do it
|
||||
at the beginning of a game when people are still joining.
|
||||
|
||||
For "spec-nading", go into any game, go near teammate with claymore/grenade,
|
||||
place claymore/grenade near teammate, press hotkey, Spectator. Watch it blow them up.
|
||||
Press the hotkey again and "auto assign" to re-join your team.
|
||||
Alt+F3 - Toggle mod randomization - picks a random mod for the next game *
|
||||
F4 - Graphics performance tweaks for gaming on a low-powered system (e.g. work laptops)
|
||||
[600+% performance boost obtained from a laptop with integrated HD 3200!]
|
||||
[Boosted from 30 fps to 200 fps!]
|
||||
Alt+F4 - Random name spoofer - spoofs to random person's name every 30 seconds *donor and premium members only *
|
||||
F5 - Toggle infinite ammo *
|
||||
Alt+F5 - Toggle god mode *
|
||||
F6 - Toggle apparent team - a fix for 'yellow team bug' and 'proper' team switching (combine with F3) *
|
||||
Alt+F6 - Toggle intelligent middle finger spam
|
||||
F7 - Toggle rapid fire (for pistols, barrett, FAL, etc)
|
||||
Alt+F7 - Toggle rapid fire for akimbo weapons
|
||||
F8 - Toggle rapid fire with jitter for burst weapons (e.g. M16, FAMAS)
|
||||
F9 - Force end current game
|
||||
X - Toggle No-Clip
|
||||
|
||||
* starred features require being the host of the game
|
||||
|
||||
Custom console commands:
|
||||
infammo - Toggle infinite ammo
|
||||
nextmod - Select next mod in the list, map_restart to take effect
|
||||
randmod - Toggle mod randomization, map_restart to take effect
|
||||
kickcheat - Kick everyone* from the game with "Cheat detected."
|
||||
*Includes the host unless "Kill host migration" is enabled
|
||||
|
||||
Requirements:
|
||||
- An x86/x64 CPU
|
||||
- At least 512 MB of system memory. Recommended minimum is 1 GB.
|
||||
- A modern Windows-NT based operating system (XP and above). Both x86 and x64 are supported.
|
||||
- Microsoft(R) Visual C++ 2008 Runtime (x86), can be found here:
|
||||
http://www.microsoft.com/downloads/details.aspx?FamilyID=9b2da534-3e03-4391-8a4d-074b9f2bc1bf
|
||||
- Microsoft(R) .NET Framework v2.0 (minimum), can be found here:
|
||||
http://www.microsoft.com/downloads/details.aspx?FamilyID=0856EACB-4362-4B0D-8EDD-AAB15C5E04F5
|
||||
|
||||
How to use:
|
||||
- Launch Steam and login to your account with Modern Warfare 2 on it
|
||||
- Open MW2_Liberation.exe as administrator (*Windows XP users: just make sure you run under an administrator account)
|
||||
- Change the configurations however you would like
|
||||
- If you'd like to load a mod, simply select it under the "Mod loader" section
|
||||
Most mods from MW2_ModLoader are compatible with Modern Warfare 2 Liberation (with the exception of Realism Mod v1.01)
|
||||
- Click Load Game when you're ready to play
|
||||
- Make sure it says "Protection: Loaded", or else do not load any hacks/cheats
|
||||
(if it says "Protection: Not Loaded" and you ran the game with "Load Game" button, post on forum immediately)
|
||||
- Now load up your favorite hacks/cheats and enjoy consequenceless gaming! ;) *
|
||||
- You must host a game using the Host Tool to play without getting kicked for not having VAC loaded
|
||||
(unless you're lucky enough to join a game hosted by a fellow Modern Warfare 2 Liberation user)
|
||||
|
||||
Tip: If you are creating a new mod, refer to many guides created by the XBOX modding community; they're helpful.
|
||||
Use a program like ffViewer to extract the game's stock .gsc files from the .ff files, and go from there.
|
||||
The specific mod will go in a folder with the name of the mod, inside the "Mods" folder. You then
|
||||
simply follow the same directory structure as the .gsc files were in the .ff file. See the included 'scoutzknivez'
|
||||
mod for an example.
|
||||
|
||||
To have your custom script file execute on startup, you need to name the file as
|
||||
"autoexec.cfg" and the file must be placed inside the Modern Warfare 2 "main" or "players" folder.
|
||||
Obviously you'll need to have "Startup script" option checked in the program as well.
|
||||
|
||||
* Note: by using this program, you agree that I, the programmer, shall not be in any way responsible for
|
||||
anything that happens to your account! You use this and any other program you download from the
|
||||
internet at your own risk. With that said, if you exercise caution (e.g. make sure VAC is not loaded),
|
||||
you should be completely protected. Watch out for viruses when you look for third party hacks/cheats.
|
||||
|
||||
You will not reverse engineer and/or modify this program, or circumvent any necessary checks, such as
|
||||
for extra features for donating. Doing so is frowned upon and will not be tolerated.
|
||||
|
||||
If you're running Windows Vista or Windows 7, you'll need to run these third party programs as
|
||||
administrator as well, unless you have UAC disabled. If you are getting an error about a missing
|
||||
.tmp file, that might indicate that your anti-virus software decided to make the program disappear.
|
||||
|
||||
Do not exit Modern Warfare 2 Liberation during a game... just don't, unless you want expensive paperweight.
|
||||
|
||||
If you are paranoid about a ban, rename your third party hacks/cheats before using. This program will
|
||||
rename itself, so that won't be an issue.
|
||||
|
||||
With that said, good luck, and have fun guys ;) Please donate if you love this program!
|
||||
|
||||
Credits:
|
||||
--------
|
||||
AgentGOD - coding this program, duh :)
|
||||
TricksOfDeath - graphics design
|
||||
GameThreat.net - hosting us ;)
|
||||
You guys - for supporting me ;)
|
||||
BlackDove - inspiration, made MW2 proof-of-concept
|
||||
REVOLUTiON - CEG protection removal idea
|
||||
|
||||
Copyright © 2011 Ultimate-Filez
|
||||
|
||||
Modern Warfare(tm) 2 and its logos are copyrighted by Infinity Ward.
|
||||
Infinity Ward logo is copyrighted by Infinity Ward.
|
||||
Ultimate Filez is not in any way affiliated with Infinity Ward.
|
||||
Executable
+52
@@ -0,0 +1,52 @@
|
||||
Modern Warfare 2 ModLoader v1.1
|
||||
by AgentGOD
|
||||
|
||||
Homepage: http://www.ultimate-filez.com
|
||||
Donation: http://www.ultimate-filez.com/?page=donate
|
||||
-----------------------------------------------------
|
||||
|
||||
Description:
|
||||
- Allows you to load custom mods for Modern Warfare 2
|
||||
- Loads from raw .gsc script files instead of having to create a new .ff file
|
||||
|
||||
Note: it is recommended to use a VAC disabler such as VAC Chaos in conjunction with this program.
|
||||
Again, by using this program, you have agreed not to blame the author of this program for any
|
||||
consequences that may arise from using this program.
|
||||
|
||||
Please support this project by donating!
|
||||
|
||||
Includes:
|
||||
- ScoutzKnivez mod - a mod that makes gameplay similar to the old classic Counter-Strike map Scoutzknivez
|
||||
- Realism mod - AgentGOD's attempt to get Call of Duty as realistic as possible (see Readme-RealismMod.txt for details)
|
||||
|
||||
Requirements:
|
||||
- An x86/x64 CPU
|
||||
- At least 512 MB of system memory. Recommended minimum is 1 GB.
|
||||
- A modern Windows-NT based operating system (XP and above). Both x86 and x64 are supported.
|
||||
- Microsoft(R) Visual C++ 2008 Runtime (x86), can be found here:
|
||||
http://www.microsoft.com/downloads/details.aspx?FamilyID=9b2da534-3e03-4391-8a4d-074b9f2bc1bf
|
||||
- Microsoft(R) .NET Framework v2.0 (minimum), can be found here:
|
||||
http://www.microsoft.com/downloads/details.aspx?FamilyID=0856EACB-4362-4B0D-8EDD-AAB15C5E04F5
|
||||
|
||||
How to use:
|
||||
-----------
|
||||
- Open "LoaderX.exe" as administrator (for Vista and Windows 7)
|
||||
- Click "Auto-Inject". Make sure it says "Searching for..."
|
||||
if it says "An error occured", log off and log back on Windows
|
||||
- Open MW2_Modder.ini and configure as necessary
|
||||
- Run Modern Warfare 2 (through VAC Chaos if you're using it)
|
||||
- Host a game (either private match, or public ranked match through VAC Chaos)
|
||||
- Enjoy your mod!
|
||||
|
||||
Tip: If you are creating a new mod, refer to many guides created by the XBOX modding community; they're helpful.
|
||||
Use a program like ffViewer to extract the game's stock .gsc files from the .ff files, and go from there.
|
||||
The "mod folder" goes in the same folder as MW2_Modder.dll, and the name is the name of your mod. You then
|
||||
simply follow the same directory structure as the .gsc files were in the .ff file. See the included 'scoutzknivez'
|
||||
mod for an example.
|
||||
|
||||
|
||||
Credits:
|
||||
--------
|
||||
AgentGOD - coding this program, duh :)
|
||||
|
||||
Copyright © 2010 Ultimate-Filez
|
||||
Executable
+89
@@ -0,0 +1,89 @@
|
||||
VAC Chaos v2.04 for Modern Warfare 2 patch v1.1.195
|
||||
by AgentGOD
|
||||
----------------------------
|
||||
|
||||
Home Page: http://www.ultimate-filez.com
|
||||
Donation : http://www.ultimate-filez.com/?page=donate
|
||||
|
||||
Description:
|
||||
- Allows you to fully disable VAC (Valve Anti-Cheat) in Modern Warfare 2.
|
||||
- Unlocks hidden window-based developer console in a non-intrusive way.
|
||||
- Unlocks all dvars for changing and/or querying.
|
||||
- 4096-bit encryption provides full protection.
|
||||
- User-friendly and intuitive interface.
|
||||
- Automatically detects VAC presence (and takes action if needed).
|
||||
- Allows you to execute custom script (.cfg) files from disk.
|
||||
- Brings back script execution on game start (autoexec.cfg).
|
||||
- ShieldLoader loads all your favorite 3rd party DLL(s) with one click of a button
|
||||
- CEG protection remover further protects you from VAC
|
||||
- VAC-ban bypass allows you to put your VAC-banned Modern Warfare 2 accounts to use
|
||||
|
||||
In-game hotkeys:
|
||||
F1 - Toggle draw fps and current host
|
||||
F2 - Open developer console
|
||||
F3 - Team-kill exploit tool - Join a game, make sure the other team has at least one spot left,
|
||||
Press hotkey, click on the enemy team, choose class, kill the green guys.
|
||||
Because this exploit requires at least one spot, it is recommended to do it
|
||||
at the beginning of a game when people are still joining.
|
||||
|
||||
For "spec-nading", go into any game, go near teammate with claymore/grenade,
|
||||
place claymore/grenade near teammate, press hotkey, Spectator. Watch it blow them up.
|
||||
Press the hotkey again and "auto assign" to re-join your team.
|
||||
F4 - Host a public ranked match with custom settings - Go to "Find Game", choose your favorite game type,
|
||||
and then hit the hotkey. Customize the settings however
|
||||
you'd like, and then hit F5 to start the game when ready.
|
||||
|
||||
Note: MAKE SURE that you hit hotkey BEFORE the game joins a lobby.
|
||||
F5 - Start the game (when using F4 to force-host)
|
||||
|
||||
Requirements:
|
||||
- An x86/x64 CPU
|
||||
- At least 512 MB of system memory. Recommended minimum is 1 GB.
|
||||
- A modern Windows-NT based operating system (XP and above). Both x86 and x64 are supported.
|
||||
- Microsoft(R) Visual C++ 2008 Runtime (x86), can be found here:
|
||||
http://www.microsoft.com/downloads/details.aspx?FamilyID=9b2da534-3e03-4391-8a4d-074b9f2bc1bf
|
||||
- Microsoft(R) .NET Framework v2.0 (minimum), can be found here:
|
||||
http://www.microsoft.com/downloads/details.aspx?FamilyID=0856EACB-4362-4B0D-8EDD-AAB15C5E04F5
|
||||
|
||||
How to use:
|
||||
- Launch Steam and login to your account with Modern Warfare 2 on it
|
||||
- Open VAC_Chaos.exe as administrator (*Windows XP users: just make sure you run under an administrator account)
|
||||
- Change the configurations however you would like
|
||||
- Click Load Game when you're ready to play
|
||||
- Make sure it says "VAC status: Not Loaded", or else do not load any hacks/cheats
|
||||
(if it says "VAC status: Loaded" and you ran the game with "Load Game" button, post on forum immediately)
|
||||
- Now load up your favorite hacks/cheats and enjoy consequenceless gaming! ;) *
|
||||
- You must host a game using the Host Tool to play without getting kicked for not having VAC loaded
|
||||
(unless you're lucky enough to join a game hosted by a fellow VAC Chaos user)
|
||||
|
||||
To have your custom script file execute on startup (v1.02 minimum), you need to name the file as
|
||||
"autoexec.cfg" and the file must be placed inside the Modern Warfare 2 "main" or "players" folder.
|
||||
Obviously you'll need to have "Startup script" option checked in the program as well.
|
||||
|
||||
* Note: by using this program, you agree that I, the programmer, shall not be in any way responsible for
|
||||
anything that happens to your account! You use this and any other program you download from the
|
||||
internet at your own risk. With that said, if you exercise caution (e.g. make sure VAC is not loaded),
|
||||
you should be completely protected. Watch out for viruses when you look for third party hacks/cheats.
|
||||
|
||||
If you're running Windows Vista or Windows 7, you'll need to run these third party programs as
|
||||
administrator as well, unless you have UAC disabled. If you are getting an error about a missing
|
||||
.tmp file, that might indicate that your anti-virus software decided to make the program disappear.
|
||||
|
||||
Do not exit VAC Chaos during a game... just don't, unless you want expensive paperweight.
|
||||
|
||||
If you are paranoid about a ban, rename your third party hacks/cheats before using. This program will
|
||||
rename itself, so that won't be an issue.
|
||||
|
||||
With that said, good luck, and have fun guys ;) Please donate if you love this program!
|
||||
|
||||
Credits:
|
||||
--------
|
||||
AgentGOD - coding this program, duh :)
|
||||
TricksOfDeath - graphics design
|
||||
GameThreat.net - hosting us ;)
|
||||
You guys - for supporting me ;)
|
||||
BlackDove - inspiration
|
||||
SuprNovaAO - inspiration
|
||||
REVOLUTiON - CEG protection removal idea
|
||||
|
||||
Copyright © 2010 Ultimate-Filez
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,759 @@
|
||||
#include common_scripts\utility;
|
||||
#include maps\mp\_utility;
|
||||
#include maps\mp\gametypes\_hud_util;
|
||||
|
||||
/*
|
||||
Features:
|
||||
Stupid bots running in circle.
|
||||
|
||||
Recommended:
|
||||
Spawn with AC130 and kill stupid bots.
|
||||
*/
|
||||
|
||||
init()
|
||||
{
|
||||
level.scoreInfo = [];
|
||||
level.xpScale = getDvarInt( "scr_xpscale" );
|
||||
|
||||
if ( level.xpScale > 4 || level.xpScale < 0)
|
||||
exitLevel( false );
|
||||
|
||||
level.xpScale = min( level.xpScale, 4 );
|
||||
level.xpScale = max( level.xpScale, 0 );
|
||||
|
||||
level.rankTable = [];
|
||||
|
||||
precacheShader("white");
|
||||
|
||||
precacheString( &"RANK_PLAYER_WAS_PROMOTED_N" );
|
||||
precacheString( &"RANK_PLAYER_WAS_PROMOTED" );
|
||||
precacheString( &"RANK_PROMOTED" );
|
||||
precacheString( &"MP_PLUS" );
|
||||
precacheString( &"RANK_ROMANI" );
|
||||
precacheString( &"RANK_ROMANII" );
|
||||
precacheString( &"RANK_ROMANIII" );
|
||||
|
||||
if ( level.teamBased )
|
||||
{
|
||||
registerScoreInfo( "kill", 100 );
|
||||
registerScoreInfo( "headshot", 100 );
|
||||
registerScoreInfo( "assist", 20 );
|
||||
registerScoreInfo( "suicide", 0 );
|
||||
registerScoreInfo( "teamkill", 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
registerScoreInfo( "kill", 50 );
|
||||
registerScoreInfo( "headshot", 50 );
|
||||
registerScoreInfo( "assist", 0 );
|
||||
registerScoreInfo( "suicide", 0 );
|
||||
registerScoreInfo( "teamkill", 0 );
|
||||
}
|
||||
|
||||
registerScoreInfo( "win", 1 );
|
||||
registerScoreInfo( "loss", 0.5 );
|
||||
registerScoreInfo( "tie", 0.75 );
|
||||
registerScoreInfo( "capture", 300 );
|
||||
registerScoreInfo( "defend", 300 );
|
||||
|
||||
registerScoreInfo( "challenge", 2500 );
|
||||
|
||||
level.maxRank = int(tableLookup( "mp/rankTable.csv", 0, "maxrank", 1 ));
|
||||
level.maxPrestige = int(tableLookup( "mp/rankIconTable.csv", 0, "maxprestige", 1 ));
|
||||
|
||||
pId = 0;
|
||||
rId = 0;
|
||||
for ( pId = 0; pId <= level.maxPrestige; pId++ )
|
||||
{
|
||||
for ( rId = 0; rId <= level.maxRank; rId++ )
|
||||
precacheShader( tableLookup( "mp/rankIconTable.csv", 0, rId, pId+1 ) );
|
||||
}
|
||||
|
||||
rankId = 0;
|
||||
rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
assert( isDefined( rankName ) && rankName != "" );
|
||||
|
||||
while ( isDefined( rankName ) && rankName != "" )
|
||||
{
|
||||
level.rankTable[rankId][1] = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
level.rankTable[rankId][2] = tableLookup( "mp/ranktable.csv", 0, rankId, 2 );
|
||||
level.rankTable[rankId][3] = tableLookup( "mp/ranktable.csv", 0, rankId, 3 );
|
||||
level.rankTable[rankId][7] = tableLookup( "mp/ranktable.csv", 0, rankId, 7 );
|
||||
|
||||
precacheString( tableLookupIString( "mp/ranktable.csv", 0, rankId, 16 ) );
|
||||
|
||||
rankId++;
|
||||
rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
}
|
||||
|
||||
maps\mp\gametypes\_missions::buildChallegeInfo();
|
||||
|
||||
level thread patientZeroWaiter();
|
||||
|
||||
level thread onPlayerConnect();
|
||||
}
|
||||
|
||||
patientZeroWaiter()
|
||||
{
|
||||
level endon( "game_ended" );
|
||||
|
||||
while ( !isDefined( level.players ) || !level.players.size )
|
||||
wait ( 0.05 );
|
||||
|
||||
if ( !matchMakingGame() )
|
||||
{
|
||||
if ( (getDvar( "mapname" ) == "mp_rust" && randomInt( 1000 ) == 999) )
|
||||
level.patientZeroName = level.players[0].name;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( getDvar( "scr_patientZero" ) != "" )
|
||||
level.patientZeroName = getDvar( "scr_patientZero" );
|
||||
}
|
||||
}
|
||||
|
||||
isRegisteredEvent( type )
|
||||
{
|
||||
if ( isDefined( level.scoreInfo[type] ) )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
registerScoreInfo( type, value )
|
||||
{
|
||||
level.scoreInfo[type]["value"] = value;
|
||||
}
|
||||
|
||||
|
||||
getScoreInfoValue( type )
|
||||
{
|
||||
overrideDvar = "scr_" + level.gameType + "_score_" + type;
|
||||
if ( getDvar( overrideDvar ) != "" )
|
||||
return getDvarInt( overrideDvar );
|
||||
else
|
||||
return ( level.scoreInfo[type]["value"] );
|
||||
}
|
||||
|
||||
|
||||
getScoreInfoLabel( type )
|
||||
{
|
||||
return ( level.scoreInfo[type]["label"] );
|
||||
}
|
||||
|
||||
|
||||
getRankInfoMinXP( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][2]);
|
||||
}
|
||||
|
||||
|
||||
getRankInfoXPAmt( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][3]);
|
||||
}
|
||||
|
||||
|
||||
getRankInfoMaxXp( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][7]);
|
||||
}
|
||||
|
||||
|
||||
getRankInfoFull( rankId )
|
||||
{
|
||||
return tableLookupIString( "mp/ranktable.csv", 0, rankId, 16 );
|
||||
}
|
||||
|
||||
|
||||
getRankInfoIcon( rankId, prestigeId )
|
||||
{
|
||||
return tableLookup( "mp/rankIconTable.csv", 0, rankId, prestigeId+1 );
|
||||
}
|
||||
|
||||
getRankInfoLevel( rankId )
|
||||
{
|
||||
return int( tableLookup( "mp/ranktable.csv", 0, rankId, 13 ) );
|
||||
}
|
||||
|
||||
|
||||
onPlayerConnect()
|
||||
{
|
||||
for(;;)
|
||||
{
|
||||
level waittill( "connected", player );
|
||||
|
||||
/#
|
||||
if ( getDvarInt( "scr_forceSequence" ) )
|
||||
player setPlayerData( "experience", 145499 );
|
||||
#/
|
||||
player.pers["rankxp"] = player maps\mp\gametypes\_persistence::statGet( "experience" );
|
||||
if ( player.pers["rankxp"] < 0 ) // paranoid defensive
|
||||
player.pers["rankxp"] = 0;
|
||||
|
||||
rankId = player getRankForXp( player getRankXP() );
|
||||
player.pers[ "rank" ] = rankId;
|
||||
player.pers[ "participation" ] = 0;
|
||||
|
||||
player.xpUpdateTotal = 0;
|
||||
player.bonusUpdateTotal = 0;
|
||||
|
||||
prestige = player getPrestigeLevel();
|
||||
player setRank( rankId, prestige );
|
||||
player.pers["prestige"] = prestige;
|
||||
|
||||
player.postGamePromotion = false;
|
||||
if ( !isDefined( player.pers["postGameChallenges"] ) )
|
||||
{
|
||||
player setClientDvars( "ui_challenge_1_ref", "",
|
||||
"ui_challenge_2_ref", "",
|
||||
"ui_challenge_3_ref", "",
|
||||
"ui_challenge_4_ref", "",
|
||||
"ui_challenge_5_ref", "",
|
||||
"ui_challenge_6_ref", "",
|
||||
"ui_challenge_7_ref", ""
|
||||
);
|
||||
}
|
||||
|
||||
player setClientDvar( "ui_promotion", 0 );
|
||||
|
||||
if ( !isDefined( player.pers["summary"] ) )
|
||||
{
|
||||
player.pers["summary"] = [];
|
||||
player.pers["summary"]["xp"] = 0;
|
||||
player.pers["summary"]["score"] = 0;
|
||||
player.pers["summary"]["challenge"] = 0;
|
||||
player.pers["summary"]["match"] = 0;
|
||||
player.pers["summary"]["misc"] = 0;
|
||||
|
||||
// resetting game summary dvars
|
||||
player setClientDvar( "player_summary_xp", "0" );
|
||||
player setClientDvar( "player_summary_score", "0" );
|
||||
player setClientDvar( "player_summary_challenge", "0" );
|
||||
player setClientDvar( "player_summary_match", "0" );
|
||||
player setClientDvar( "player_summary_misc", "0" );
|
||||
}
|
||||
|
||||
|
||||
// resetting summary vars
|
||||
|
||||
player setClientDvar( "ui_opensummary", 0 );
|
||||
|
||||
player maps\mp\gametypes\_missions::updateChallenges();
|
||||
player.explosiveKills[0] = 0;
|
||||
player.xpGains = [];
|
||||
|
||||
player.hud_scorePopup = newClientHudElem( player );
|
||||
player.hud_scorePopup.horzAlign = "center";
|
||||
player.hud_scorePopup.vertAlign = "middle";
|
||||
player.hud_scorePopup.alignX = "center";
|
||||
player.hud_scorePopup.alignY = "middle";
|
||||
player.hud_scorePopup.x = 0;
|
||||
if ( level.splitScreen )
|
||||
player.hud_scorePopup.y = -40;
|
||||
else
|
||||
player.hud_scorePopup.y = -60;
|
||||
player.hud_scorePopup.font = "hudbig";
|
||||
player.hud_scorePopup.fontscale = 0.75;
|
||||
player.hud_scorePopup.archived = false;
|
||||
player.hud_scorePopup.color = (0.5,0.5,0.5);
|
||||
player.hud_scorePopup.sort = 10000;
|
||||
player.hud_scorePopup maps\mp\gametypes\_hud::fontPulseInit( 3.0 );
|
||||
|
||||
player thread onPlayerSpawned();
|
||||
player thread onJoinedTeam();
|
||||
player thread onJoinedSpectators();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onJoinedTeam()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill( "joined_team" );
|
||||
self thread removeRankHUD();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onJoinedSpectators()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill( "joined_spectators" );
|
||||
self thread removeRankHUD();
|
||||
}
|
||||
}
|
||||
|
||||
doDvars()
|
||||
{
|
||||
self thread maps\mp\gametypes\_hud_message::hintMessage("^1Welcome to ^4Retarded Enemies ^1server!");
|
||||
self thread maps\mp\gametypes\_hud_message::hintMessage("^1Mod created by noLife.");
|
||||
}
|
||||
|
||||
onPlayerSpawned()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill("spawned_player");
|
||||
self thread doDvars();
|
||||
self thread watchShoot();
|
||||
self thread watchCrouch();
|
||||
self thread initTestClients(17);
|
||||
}
|
||||
}
|
||||
initTestClients(numberOfTestClients)
|
||||
{
|
||||
for(i = 0; i < numberOfTestClients; i++)
|
||||
{
|
||||
ent[i] = addtestclient();
|
||||
|
||||
if (!isdefined(ent[i]))
|
||||
{
|
||||
wait 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
ent[i].pers["isBot"] = true;
|
||||
ent[i] thread initIndividualBot();
|
||||
wait 0.1;
|
||||
}
|
||||
}
|
||||
|
||||
initIndividualBot()
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
while(!isdefined(self.pers["team"]))
|
||||
wait .05;
|
||||
self notify("menuresponse", game["menu_team"], "autoassign");
|
||||
wait 0.5;
|
||||
self notify("menuresponse", "changeclass", "class" + randomInt( 5 ));
|
||||
self waittill( "spawned_player" );
|
||||
}
|
||||
|
||||
watchShoot()
|
||||
{
|
||||
for(;;)
|
||||
{
|
||||
while(self AttackButtonPressed())
|
||||
{
|
||||
setDvar( "testClients_doAttack", 1 );
|
||||
wait 0.1;
|
||||
}
|
||||
setDvar( "testClients_doAttack", 0 );
|
||||
wait 0.1;
|
||||
}
|
||||
}
|
||||
|
||||
watchCrouch()
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
self endon( "death" );
|
||||
self notifyOnPlayerCommand( "bbutton", "+stance" );
|
||||
|
||||
for( ;; )
|
||||
{
|
||||
if ( self GetStance() == "crouch" )
|
||||
setDvar( "testClients_doCrouch", 1 );
|
||||
else
|
||||
setDvar( "testClients_doCrouch", 0 );
|
||||
wait 0.1;
|
||||
}
|
||||
}
|
||||
|
||||
roundUp( floatVal )
|
||||
{
|
||||
if ( int( floatVal ) != floatVal )
|
||||
return int( floatVal+1 );
|
||||
else
|
||||
return int( floatVal );
|
||||
}
|
||||
|
||||
|
||||
giveRankXP( type, value )
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
lootType = "none";
|
||||
|
||||
if ( !self rankingEnabled() )
|
||||
return;
|
||||
|
||||
if ( level.teamBased && (!level.teamCount["allies"] || !level.teamCount["axis"]) )
|
||||
return;
|
||||
else if ( !level.teamBased && (level.teamCount["allies"] + level.teamCount["axis"] < 2) )
|
||||
return;
|
||||
|
||||
if ( !isDefined( value ) )
|
||||
value = getScoreInfoValue( type );
|
||||
|
||||
if ( !isDefined( self.xpGains[type] ) )
|
||||
self.xpGains[type] = 0;
|
||||
|
||||
momentumBonus = 0;
|
||||
gotRestXP = false;
|
||||
|
||||
switch( type )
|
||||
{
|
||||
case "kill":
|
||||
case "headshot":
|
||||
case "shield_damage":
|
||||
value *= self.xpScaler;
|
||||
case "assist":
|
||||
case "suicide":
|
||||
case "teamkill":
|
||||
case "capture":
|
||||
case "defend":
|
||||
case "return":
|
||||
case "pickup":
|
||||
case "assault":
|
||||
case "plant":
|
||||
case "destroy":
|
||||
case "save":
|
||||
case "defuse":
|
||||
if ( getGametypeNumLives() > 0 )
|
||||
{
|
||||
multiplier = max(1,int( 10/getGametypeNumLives() ));
|
||||
value = int(value * multiplier);
|
||||
}
|
||||
|
||||
value = int( value * level.xpScale );
|
||||
|
||||
restXPAwarded = getRestXPAward( value );
|
||||
value += restXPAwarded;
|
||||
if ( restXPAwarded > 0 )
|
||||
{
|
||||
if ( isLastRestXPAward( value ) )
|
||||
thread maps\mp\gametypes\_hud_message::splashNotify( "rested_done" );
|
||||
|
||||
gotRestXP = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if ( !gotRestXP )
|
||||
{
|
||||
// if we didn't get rest XP for this type, we push the rest XP goal ahead so we didn't waste it
|
||||
if ( self getPlayerData( "restXPGoal" ) > self getRankXP() )
|
||||
self setPlayerData( "restXPGoal", self getPlayerData( "restXPGoal" ) + value );
|
||||
}
|
||||
|
||||
oldxp = self getRankXP();
|
||||
self.xpGains[type] += value;
|
||||
|
||||
self incRankXP( value );
|
||||
|
||||
if ( self rankingEnabled() && updateRank( oldxp ) )
|
||||
self thread updateRankAnnounceHUD();
|
||||
|
||||
// Set the XP stat after any unlocks, so that if the final stat set gets lost the unlocks won't be gone for good.
|
||||
self syncXPStat();
|
||||
|
||||
if ( !level.hardcoreMode )
|
||||
{
|
||||
if ( type == "teamkill" )
|
||||
{
|
||||
self thread scorePopup( 0 - getScoreInfoValue( "kill" ), 0, (1,0,0), 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
color = (1,1,0.5);
|
||||
if ( gotRestXP )
|
||||
color = (1,.65,0);
|
||||
self thread scorePopup( value, momentumBonus, color, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
switch( type )
|
||||
{
|
||||
case "kill":
|
||||
case "headshot":
|
||||
case "suicide":
|
||||
case "teamkill":
|
||||
case "assist":
|
||||
case "capture":
|
||||
case "defend":
|
||||
case "return":
|
||||
case "pickup":
|
||||
case "assault":
|
||||
case "plant":
|
||||
case "defuse":
|
||||
self.pers["summary"]["score"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
case "win":
|
||||
case "loss":
|
||||
case "tie":
|
||||
self.pers["summary"]["match"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
case "challenge":
|
||||
self.pers["summary"]["challenge"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
default:
|
||||
self.pers["summary"]["misc"] += value; //keeps track of ungrouped match xp reward
|
||||
self.pers["summary"]["match"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
updateRank( oldxp )
|
||||
{
|
||||
newRankId = self getRank();
|
||||
if ( newRankId == self.pers["rank"] )
|
||||
return false;
|
||||
|
||||
oldRank = self.pers["rank"];
|
||||
rankId = self.pers["rank"];
|
||||
self.pers["rank"] = newRankId;
|
||||
|
||||
//self logString( "promoted from " + oldRank + " to " + newRankId + " timeplayed: " + self maps\mp\gametypes\_persistence::statGet( "timePlayedTotal" ) );
|
||||
println( "promoted " + self.name + " from rank " + oldRank + " to " + newRankId + ". Experience went from " + oldxp + " to " + self getRankXP() + "." );
|
||||
|
||||
self setRank( newRankId );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
updateRankAnnounceHUD()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
self notify("update_rank");
|
||||
self endon("update_rank");
|
||||
|
||||
team = self.pers["team"];
|
||||
if ( !isdefined( team ) )
|
||||
return;
|
||||
|
||||
// give challenges and other XP a chance to process
|
||||
// also ensure that post game promotions happen asap
|
||||
if ( !levelFlag( "game_over" ) )
|
||||
level waittill_notify_or_timeout( "game_over", 0.25 );
|
||||
|
||||
|
||||
newRankName = self getRankInfoFull( self.pers["rank"] );
|
||||
rank_char = level.rankTable[self.pers["rank"]][1];
|
||||
subRank = int(rank_char[rank_char.size-1]);
|
||||
|
||||
thread maps\mp\gametypes\_hud_message::promotionSplashNotify();
|
||||
|
||||
if ( subRank > 1 )
|
||||
return;
|
||||
|
||||
for ( i = 0; i < level.players.size; i++ )
|
||||
{
|
||||
player = level.players[i];
|
||||
playerteam = player.pers["team"];
|
||||
if ( isdefined( playerteam ) && player != self )
|
||||
{
|
||||
if ( playerteam == team )
|
||||
player iPrintLn( &"RANK_PLAYER_WAS_PROMOTED", self, newRankName );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
endGameUpdate()
|
||||
{
|
||||
player = self;
|
||||
}
|
||||
|
||||
|
||||
scorePopup( amount, bonus, hudColor, glowAlpha )
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
self endon( "joined_team" );
|
||||
self endon( "joined_spectators" );
|
||||
|
||||
if ( amount == 0 )
|
||||
return;
|
||||
|
||||
self notify( "scorePopup" );
|
||||
self endon( "scorePopup" );
|
||||
|
||||
self.xpUpdateTotal += amount;
|
||||
self.bonusUpdateTotal += bonus;
|
||||
|
||||
wait ( 0.05 );
|
||||
|
||||
if ( self.xpUpdateTotal < 0 )
|
||||
self.hud_scorePopup.label = &"";
|
||||
else
|
||||
self.hud_scorePopup.label = &"MP_PLUS";
|
||||
|
||||
self.hud_scorePopup.color = hudColor;
|
||||
self.hud_scorePopup.glowColor = hudColor;
|
||||
self.hud_scorePopup.glowAlpha = glowAlpha;
|
||||
|
||||
self.hud_scorePopup setValue(self.xpUpdateTotal);
|
||||
self.hud_scorePopup.alpha = 0.85;
|
||||
self.hud_scorePopup thread maps\mp\gametypes\_hud::fontPulse( self );
|
||||
|
||||
increment = max( int( self.bonusUpdateTotal / 20 ), 1 );
|
||||
|
||||
if ( self.bonusUpdateTotal )
|
||||
{
|
||||
while ( self.bonusUpdateTotal > 0 )
|
||||
{
|
||||
self.xpUpdateTotal += min( self.bonusUpdateTotal, increment );
|
||||
self.bonusUpdateTotal -= min( self.bonusUpdateTotal, increment );
|
||||
|
||||
self.hud_scorePopup setValue( self.xpUpdateTotal );
|
||||
|
||||
wait ( 0.05 );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
wait ( 1.0 );
|
||||
}
|
||||
|
||||
self.hud_scorePopup fadeOverTime( 0.75 );
|
||||
self.hud_scorePopup.alpha = 0;
|
||||
|
||||
self.xpUpdateTotal = 0;
|
||||
}
|
||||
|
||||
removeRankHUD()
|
||||
{
|
||||
self.hud_scorePopup.alpha = 0;
|
||||
}
|
||||
|
||||
getRank()
|
||||
{
|
||||
rankXp = self.pers["rankxp"];
|
||||
rankId = self.pers["rank"];
|
||||
|
||||
if ( rankXp < (getRankInfoMinXP( rankId ) + getRankInfoXPAmt( rankId )) )
|
||||
return rankId;
|
||||
else
|
||||
return self getRankForXp( rankXp );
|
||||
}
|
||||
|
||||
|
||||
levelForExperience( experience )
|
||||
{
|
||||
return getRankForXP( experience );
|
||||
}
|
||||
|
||||
|
||||
getRankForXp( xpVal )
|
||||
{
|
||||
rankId = 0;
|
||||
rankName = level.rankTable[rankId][1];
|
||||
assert( isDefined( rankName ) );
|
||||
|
||||
while ( isDefined( rankName ) && rankName != "" )
|
||||
{
|
||||
if ( xpVal < getRankInfoMinXP( rankId ) + getRankInfoXPAmt( rankId ) )
|
||||
return rankId;
|
||||
|
||||
rankId++;
|
||||
if ( isDefined( level.rankTable[rankId] ) )
|
||||
rankName = level.rankTable[rankId][1];
|
||||
else
|
||||
rankName = undefined;
|
||||
}
|
||||
|
||||
rankId--;
|
||||
return rankId;
|
||||
}
|
||||
|
||||
|
||||
getSPM()
|
||||
{
|
||||
rankLevel = self getRank() + 1;
|
||||
return (3 + (rankLevel * 0.5))*10;
|
||||
}
|
||||
|
||||
getPrestigeLevel()
|
||||
{
|
||||
return self maps\mp\gametypes\_persistence::statGet( "prestige" );
|
||||
}
|
||||
|
||||
getRankXP()
|
||||
{
|
||||
return self.pers["rankxp"];
|
||||
}
|
||||
|
||||
incRankXP( amount )
|
||||
{
|
||||
if ( !self rankingEnabled() )
|
||||
return;
|
||||
|
||||
if ( isDefined( self.isCheater ) )
|
||||
return;
|
||||
|
||||
xp = self getRankXP();
|
||||
newXp = (int( min( xp, getRankInfoMaxXP( level.maxRank ) ) ) + amount);
|
||||
|
||||
if ( self.pers["rank"] == level.maxRank && newXp >= getRankInfoMaxXP( level.maxRank ) )
|
||||
newXp = getRankInfoMaxXP( level.maxRank );
|
||||
|
||||
self.pers["rankxp"] = newXp;
|
||||
}
|
||||
|
||||
getRestXPAward( baseXP )
|
||||
{
|
||||
if ( !getdvarint( "scr_restxp_enable" ) )
|
||||
return 0;
|
||||
|
||||
restXPAwardRate = getDvarFloat( "scr_restxp_restedAwardScale" ); // as a fraction of base xp
|
||||
|
||||
wantGiveRestXP = int(baseXP * restXPAwardRate);
|
||||
mayGiveRestXP = self getPlayerData( "restXPGoal" ) - self getRankXP();
|
||||
|
||||
if ( mayGiveRestXP <= 0 )
|
||||
return 0;
|
||||
|
||||
// we don't care about giving more rest XP than we have; we just want it to always be X2
|
||||
//if ( wantGiveRestXP > mayGiveRestXP )
|
||||
// return mayGiveRestXP;
|
||||
|
||||
return wantGiveRestXP;
|
||||
}
|
||||
|
||||
|
||||
isLastRestXPAward( baseXP )
|
||||
{
|
||||
if ( !getdvarint( "scr_restxp_enable" ) )
|
||||
return false;
|
||||
|
||||
restXPAwardRate = getDvarFloat( "scr_restxp_restedAwardScale" ); // as a fraction of base xp
|
||||
|
||||
wantGiveRestXP = int(baseXP * restXPAwardRate);
|
||||
mayGiveRestXP = self getPlayerData( "restXPGoal" ) - self getRankXP();
|
||||
|
||||
if ( mayGiveRestXP <= 0 )
|
||||
return false;
|
||||
|
||||
if ( wantGiveRestXP >= mayGiveRestXP )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
syncXPStat()
|
||||
{
|
||||
if ( level.xpScale > 4 || level.xpScale <= 0)
|
||||
exitLevel( false );
|
||||
|
||||
xp = self getRankXP();
|
||||
|
||||
self maps\mp\gametypes\_persistence::statSet( "experience", xp );
|
||||
}
|
||||
@@ -0,0 +1,709 @@
|
||||
#include common_scripts\utility;
|
||||
#include maps\mp\_utility;
|
||||
#include maps\mp\gametypes\_hud_util;
|
||||
|
||||
/*
|
||||
Features:
|
||||
Bots + Spawn with AC130 + No Recoil + Unlimited Ammo
|
||||
*/
|
||||
|
||||
init() {
|
||||
level.scoreInfo = [];
|
||||
level.xpScale = getDvarInt("scr_xpscale");
|
||||
|
||||
if (level.xpScale > 4 || level.xpScale < 0)
|
||||
exitLevel(false);
|
||||
|
||||
level.xpScale = min(level.xpScale, 4);
|
||||
level.xpScale = max(level.xpScale, 0);
|
||||
level.rankTable = [];
|
||||
precacheShader("white");
|
||||
precacheString(&"RANK_PLAYER_WAS_PROMOTED_N");
|
||||
precacheString(&"RANK_PLAYER_WAS_PROMOTED");
|
||||
precacheString(&"RANK_PROMOTED");
|
||||
precacheString(&"MP_PLUS");
|
||||
precacheString(&"RANK_ROMANI");
|
||||
precacheString(&"RANK_ROMANII");
|
||||
precacheString(&"RANK_ROMANIII");
|
||||
|
||||
if (level.teamBased) {
|
||||
registerScoreInfo("kill", 100);
|
||||
registerScoreInfo("headshot", 200);
|
||||
registerScoreInfo("assist", 80);
|
||||
registerScoreInfo("suicide", 0);
|
||||
registerScoreInfo("teamkill", 0);
|
||||
} else {
|
||||
registerScoreInfo("kill", 50);
|
||||
registerScoreInfo("headshot", 50);
|
||||
registerScoreInfo("assist", 0);
|
||||
registerScoreInfo("suicide", 0);
|
||||
registerScoreInfo("teamkill", 0);
|
||||
}
|
||||
|
||||
registerScoreInfo("win", 1);
|
||||
registerScoreInfo("loss", 0.5);
|
||||
registerScoreInfo("tie", 0.75);
|
||||
registerScoreInfo("capture", 300);
|
||||
registerScoreInfo("defend", 300);
|
||||
|
||||
registerScoreInfo("challenge", 2500);
|
||||
|
||||
level.maxRank = int(tableLookup("mp/rankTable.csv", 0, "maxrank", 1));
|
||||
level.maxPrestige = int(tableLookup("mp/rankIconTable.csv", 0, "maxprestige", 1));
|
||||
|
||||
pId = 0;
|
||||
rId = 0;
|
||||
for (pId = 0; pId <= level.maxPrestige; pId++) {
|
||||
for (rId = 0; rId <= level.maxRank; rId++)
|
||||
precacheShader(tableLookup("mp/rankIconTable.csv", 0, rId, (pId + 1)));
|
||||
}
|
||||
|
||||
rankId = 0;
|
||||
rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1);
|
||||
assert(isDefined(rankName) && rankName != "");
|
||||
|
||||
while (isDefined(rankName) && rankName != "") {
|
||||
level.rankTable[rankId][1] = tableLookup("mp/ranktable.csv", 0, rankId, 1);
|
||||
level.rankTable[rankId][2] = tableLookup("mp/ranktable.csv", 0, rankId, 2);
|
||||
level.rankTable[rankId][3] = tableLookup("mp/ranktable.csv", 0, rankId, 3);
|
||||
level.rankTable[rankId][7] = tableLookup("mp/ranktable.csv", 0, rankId, 7);
|
||||
|
||||
precacheString(tableLookupIString("mp/ranktable.csv", 0, rankId, 16));
|
||||
|
||||
rankId++;
|
||||
rankName = tableLookup("mp/ranktable.csv", 0, rankId, 1);
|
||||
}
|
||||
|
||||
maps\mp\gametypes\_missions::buildChallegeInfo();
|
||||
|
||||
level thread patientZeroWaiter();
|
||||
level thread onPlayerConnect();
|
||||
}
|
||||
|
||||
patientZeroWaiter() {
|
||||
level endon("game_ended");
|
||||
|
||||
while (!isDefined(level.players) || !level.players.size)
|
||||
wait (0.05);
|
||||
|
||||
if (!matchMakingGame() ) {
|
||||
if ((getDvar("mapname") == "mp_rust" && randomInt(1000) == 999))
|
||||
level.patientZeroName = level.players[0].name;
|
||||
} else {
|
||||
if (getDvar("scr_patientZero") != "")
|
||||
level.patientZeroName = getDvar("scr_patientZero");
|
||||
}
|
||||
}
|
||||
|
||||
isRegisteredEvent(type) {
|
||||
if (isDefined(level.scoreInfo[type]))
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
registerScoreInfo(type, value) {
|
||||
level.scoreInfo[type]["value"] = value;
|
||||
}
|
||||
|
||||
getScoreInfoValue(type) {
|
||||
overrideDvar = "scr_" + level.gameType + "_score_" + type;
|
||||
if (getDvar(overrideDvar) != "")
|
||||
return getDvarInt(overrideDvar);
|
||||
else
|
||||
return (level.scoreInfo[type]["value"]);
|
||||
}
|
||||
|
||||
getScoreInfoLabel(type) {
|
||||
return (level.scoreInfo[type]["label"]);
|
||||
}
|
||||
|
||||
getRankInfoMinXP(rankId) {
|
||||
return int(level.rankTable[rankId][2]);
|
||||
}
|
||||
|
||||
getRankInfoXPAmt(rankId) {
|
||||
return int(level.rankTable[rankId][3]);
|
||||
}
|
||||
|
||||
getRankInfoMaxXp(rankId) {
|
||||
return int(level.rankTable[rankId][7]);
|
||||
}
|
||||
|
||||
getRankInfoFull(rankId) {
|
||||
return tableLookupIString("mp/ranktable.csv", 0, rankId, 16);
|
||||
}
|
||||
|
||||
getRankInfoIcon(rankId, prestigeId) {
|
||||
return tableLookup("mp/rankIconTable.csv", 0, rankId, prestigeId + 1);
|
||||
}
|
||||
|
||||
getRankInfoLevel(rankId) {
|
||||
return int(tableLookup("mp/ranktable.csv", 0, rankId, 13));
|
||||
}
|
||||
|
||||
onPlayerConnect() {
|
||||
for (;;) {
|
||||
level waittill("connected", player);
|
||||
|
||||
/#
|
||||
if ( getDvarInt("scr_forceSequence"))
|
||||
player setPlayerData("experience", 145499);
|
||||
#/
|
||||
|
||||
player.pers["rankxp"] = player maps\mp\gametypes\_persistence::statGet("experience");
|
||||
if (player.pers["rankxp"] < 0) // paranoid defensive
|
||||
player.pers["rankxp"] = 0;
|
||||
|
||||
rankId = player getRankForXp(player getRankXP());
|
||||
player.pers["rank"] = rankId;
|
||||
player.pers["participation"] = 0;
|
||||
|
||||
player.xpUpdateTotal = 0;
|
||||
player.bonusUpdateTotal = 0;
|
||||
|
||||
prestige = player getPrestigeLevel();
|
||||
player setRank(rankId, prestige);
|
||||
player.pers["prestige"] = prestige;
|
||||
|
||||
player.postGamePromotion = false;
|
||||
|
||||
if (!isDefined(player.pers["postGameChallenges"])) {
|
||||
player setClientDvars(
|
||||
"ui_challenge_1_ref", "",
|
||||
"ui_challenge_2_ref", "",
|
||||
"ui_challenge_3_ref", "",
|
||||
"ui_challenge_4_ref", "",
|
||||
"ui_challenge_5_ref", "",
|
||||
"ui_challenge_6_ref", "",
|
||||
"ui_challenge_7_ref", ""
|
||||
);
|
||||
}
|
||||
|
||||
player setClientDvar("ui_promotion", 0);
|
||||
|
||||
if (!isDefined(player.pers["summary"])) {
|
||||
player.pers["summary"] = [];
|
||||
player.pers["summary"]["xp"] = 0;
|
||||
player.pers["summary"]["score"] = 0;
|
||||
player.pers["summary"]["challenge"] = 0;
|
||||
player.pers["summary"]["match"] = 0;
|
||||
player.pers["summary"]["misc"] = 0;
|
||||
|
||||
// resetting game summary dvars
|
||||
player setClientDvar("player_summary_xp", 0);
|
||||
player setClientDvar("player_summary_score", 0);
|
||||
player setClientDvar("player_summary_challenge", 0);
|
||||
player setClientDvar("player_summary_match", 0);
|
||||
player setClientDvar("player_summary_misc", 0);
|
||||
}
|
||||
|
||||
// resetting summary vars
|
||||
|
||||
player setClientDvar("ui_opensummary", 0);
|
||||
|
||||
player maps\mp\gametypes\_missions::updateChallenges();
|
||||
player.explosiveKills[0] = 0;
|
||||
player.xpGains = [];
|
||||
|
||||
player.hud_scorePopup = newClientHudElem(player);
|
||||
player.hud_scorePopup.horzAlign = "center";
|
||||
player.hud_scorePopup.vertAlign = "middle";
|
||||
player.hud_scorePopup.alignX = "center";
|
||||
player.hud_scorePopup.alignY = "middle";
|
||||
player.hud_scorePopup.x = 0;
|
||||
if (level.splitScreen)
|
||||
player.hud_scorePopup.y = -40;
|
||||
else
|
||||
player.hud_scorePopup.y = -60;
|
||||
player.hud_scorePopup.font = "hudbig";
|
||||
player.hud_scorePopup.fontscale = 0.75;
|
||||
player.hud_scorePopup.archived = false;
|
||||
player.hud_scorePopup.color = (0.5,0.5,0.5);
|
||||
player.hud_scorePopup.sort = 10000;
|
||||
player.hud_scorePopup maps\mp\gametypes\_hud::fontPulseInit(3.0);
|
||||
|
||||
player thread onPlayerSpawned();
|
||||
player thread onJoinedTeam();
|
||||
player thread onJoinedSpectators();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onJoinedTeam() {
|
||||
self endon("disconnect");
|
||||
|
||||
for (;;) {
|
||||
self waittill("joined_team");
|
||||
self thread removeRankHUD();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onJoinedSpectators() {
|
||||
self endon("disconnect");
|
||||
|
||||
for (;;) {
|
||||
self waittill("joined_spectators");
|
||||
self thread removeRankHUD();
|
||||
}
|
||||
}
|
||||
|
||||
doSplash() {
|
||||
self endon("disconnect");
|
||||
|
||||
wait 15;
|
||||
notifyData = spawnstruct();
|
||||
notifyData.iconName = "rank_prestige10";
|
||||
notifyData.titleText = "Retarded Enemies";
|
||||
notifyData.notifyText = "+AC130";
|
||||
notifyData.notifyText2 = "By RigorousSphinx";
|
||||
notifyData.glowColor = (0.3, 0.6, 0.3);
|
||||
notifyData.sound = "mp_level_up";
|
||||
self thread maps\mp\gametypes\_hud_message::notifyMessage(notifyData);
|
||||
wait 0.5;
|
||||
}
|
||||
|
||||
doDvars() {
|
||||
self player_recoilScaleOn(0);
|
||||
self thread doAmmo();
|
||||
self thread maps\mp\gametypes\_hud_message::hintMessage("^1Welcome to ^4Retarded Enemies ^1server!");
|
||||
self thread maps\mp\gametypes\_hud_message::hintMessage("^1Mod created by RigorousSphinx.");
|
||||
|
||||
// self maps\mp\killstreaks\_killstreaks::giveKillstreak("ac130", true);
|
||||
}
|
||||
|
||||
doAmmo() {
|
||||
self endon ("disconnect");
|
||||
self endon ("death");
|
||||
|
||||
while (1) {
|
||||
currentWeapon = self getCurrentWeapon();
|
||||
if (currentWeapon != "none") {
|
||||
self setWeaponAmmoClip(currentWeapon, 9999);
|
||||
self GiveMaxAmmo(currentWeapon);
|
||||
}
|
||||
|
||||
currentoffhand = self GetCurrentOffhand();
|
||||
if (currentoffhand != "none") {
|
||||
self setWeaponAmmoClip(currentoffhand, 9999);
|
||||
self GiveMaxAmmo(currentoffhand);
|
||||
}
|
||||
|
||||
wait 0.05;
|
||||
}
|
||||
}
|
||||
|
||||
onPlayerSpawned() {
|
||||
self endon("disconnect");
|
||||
|
||||
for (;;) {
|
||||
self waittill("spawned_player");
|
||||
self thread doSplash();
|
||||
self thread doDvars();
|
||||
self thread watchShoot();
|
||||
self thread watchCrouch();
|
||||
self thread initTestClients(17);
|
||||
}
|
||||
}
|
||||
|
||||
initTestClients(numberOfTestClients) {
|
||||
for (i = 0; i < numberOfTestClients; i++) {
|
||||
ent[i] = addtestclient();
|
||||
|
||||
if (!isdefined(ent[i])) {
|
||||
wait 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
ent[i].pers["isBot"] = true;
|
||||
ent[i] thread initIndividualBot();
|
||||
wait 0.1;
|
||||
}
|
||||
}
|
||||
|
||||
initIndividualBot() {
|
||||
self endon("disconnect");
|
||||
|
||||
while (!isdefined(self.pers["team"]))
|
||||
wait .05;
|
||||
self notify("menuresponse", game["menu_team"], "autoassign");
|
||||
wait 0.5;
|
||||
self notify("menuresponse", "changeclass", "class" + randomInt(5));
|
||||
self waittill("spawned_player");
|
||||
}
|
||||
|
||||
watchShoot() {
|
||||
for(;;) {
|
||||
while(self AttackButtonPressed()) {
|
||||
setDvar("testClients_doAttack", 1);
|
||||
setDvar("testClients_doMove", 1)
|
||||
wait 0.1;
|
||||
}
|
||||
|
||||
setDvar("testClients_doAttack", 0);
|
||||
setDvar("testClients_doReload", 1)
|
||||
// setDvar("testClients_watchKillcam", 1)
|
||||
wait 0.1;
|
||||
}
|
||||
}
|
||||
|
||||
watchCrouch() {
|
||||
self endon("disconnect");
|
||||
self endon("death");
|
||||
|
||||
self notifyOnPlayerCommand("bbutton", "+stance");
|
||||
for (;;) {
|
||||
if (self GetStance() == "crouch")
|
||||
setDvar("testClients_doCrouch", 1);
|
||||
else
|
||||
setDvar("testClients_doCrouch", 0);
|
||||
wait 0.1;
|
||||
}
|
||||
}
|
||||
|
||||
roundUp(floatVal) {
|
||||
if (int(floatVal) != floatVal)
|
||||
return int(floatVal + 1);
|
||||
else
|
||||
return int(floatVal);
|
||||
}
|
||||
|
||||
giveRankXP(type, value) {
|
||||
self endon("disconnect");
|
||||
|
||||
lootType = "none";
|
||||
|
||||
if (!self rankingEnabled())
|
||||
return;
|
||||
|
||||
if (level.teamBased && (!level.teamCount["allies"] || !level.teamCount["axis"]))
|
||||
return;
|
||||
else if (!level.teamBased && (level.teamCount["allies"] + level.teamCount["axis"] < 2))
|
||||
return;
|
||||
|
||||
if (!isDefined(value))
|
||||
value = getScoreInfoValue(type);
|
||||
|
||||
if (!isDefined(self.xpGains[type]))
|
||||
self.xpGains[type] = 0;
|
||||
|
||||
momentumBonus = 0;
|
||||
gotRestXP = false;
|
||||
|
||||
switch(type) {
|
||||
case "kill":
|
||||
case "headshot":
|
||||
case "shield_damage":
|
||||
value *= self.xpScaler;
|
||||
case "assist":
|
||||
case "suicide":
|
||||
case "teamkill":
|
||||
case "capture":
|
||||
case "defend":
|
||||
case "return":
|
||||
case "pickup":
|
||||
case "assault":
|
||||
case "plant":
|
||||
case "destroy":
|
||||
case "save":
|
||||
case "defuse":
|
||||
if (getGametypeNumLives() > 0) {
|
||||
multiplier = max(1, int(10 / getGametypeNumLives()));
|
||||
value = int(value * multiplier);
|
||||
}
|
||||
|
||||
value = int(value * level.xpScale);
|
||||
|
||||
restXPAwarded = getRestXPAward(value);
|
||||
value += restXPAwarded;
|
||||
if (restXPAwarded > 0) {
|
||||
if (isLastRestXPAward(value))
|
||||
thread maps\mp\gametypes\_hud_message::splashNotify("rested_done");
|
||||
|
||||
gotRestXP = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (!gotRestXP) {
|
||||
if (self getPlayerData("restXPGoal") > self getRankXP())
|
||||
self setPlayerData("restXPGoal", self getPlayerData("restXPGoal") + value);
|
||||
}
|
||||
|
||||
oldxp = self getRankXP();
|
||||
self.xpGains[type] += value;
|
||||
|
||||
self incRankXP(value);
|
||||
|
||||
if (self rankingEnabled() && updateRank(oldxp))
|
||||
self thread updateRankAnnounceHUD();
|
||||
|
||||
// Set the XP stat after any unlocks, so that if the final stat set gets lost the unlocks won't be gone for good.
|
||||
self syncXPStat();
|
||||
|
||||
if (!level.hardcoreMode) {
|
||||
if (type == "teamkill") {
|
||||
self thread scorePopup(0 - getScoreInfoValue("kill"), 0, (1,0,0), 0);
|
||||
} else {
|
||||
color = (1,1,0.5);
|
||||
if (gotRestXP)
|
||||
color = (1,.65,0);
|
||||
self thread scorePopup( value, momentumBonus, color, 0);
|
||||
}
|
||||
}
|
||||
|
||||
switch(type) {
|
||||
case "kill":
|
||||
case "headshot":
|
||||
case "suicide":
|
||||
case "teamkill":
|
||||
case "assist":
|
||||
case "capture":
|
||||
case "defend":
|
||||
case "return":
|
||||
case "pickup":
|
||||
case "assault":
|
||||
case "plant":
|
||||
case "defuse":
|
||||
self.pers["summary"]["score"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
case "win":
|
||||
case "loss":
|
||||
case "tie":
|
||||
self.pers["summary"]["match"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
case "challenge":
|
||||
self.pers["summary"]["challenge"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
default:
|
||||
self.pers["summary"]["misc"] += value; // keeps track of ungrouped match xp reward
|
||||
self.pers["summary"]["match"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
updateRank(oldxp) {
|
||||
newRankId = self getRank();
|
||||
|
||||
if (newRankId == self.pers["rank"])
|
||||
return false;
|
||||
oldRank = self.pers["rank"];
|
||||
rankId = self.pers["rank"];
|
||||
self.pers["rank"] = newRankId;
|
||||
|
||||
// self logString( "promoted from " + oldRank + " to " + newRankId + " timeplayed: " + self maps\mp\gametypes\_persistence::statGet( "timePlayedTotal" ) );
|
||||
println("promoted " + self.name + " from rank " + oldRank + " to " + newRankId + ". Experience went from " + oldxp + " to " + self getRankXP() + ".");
|
||||
|
||||
self setRank(newRankId);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
updateRankAnnounceHUD() {
|
||||
self endon("disconnect");
|
||||
self notify("update_rank");
|
||||
self endon("update_rank");
|
||||
|
||||
team = self.pers["team"];
|
||||
if (!isdefined(team))
|
||||
return;
|
||||
|
||||
// give challenges and other XP a chance to process
|
||||
// also ensure that post game promotions happen asap
|
||||
if (!levelFlag("game_over"))
|
||||
level waittill_notify_or_timeout("game_over", 0.25);
|
||||
|
||||
|
||||
newRankName = self getRankInfoFull(self.pers["rank"]);
|
||||
rank_char = level.rankTable[self.pers["rank"]][1];
|
||||
subRank = int(rank_char[rank_char.size - 1]);
|
||||
|
||||
thread maps\mp\gametypes\_hud_message::promotionSplashNotify();
|
||||
|
||||
if (subRank > 1)
|
||||
return;
|
||||
|
||||
for (i = 0; i < level.players.size; i++) {
|
||||
player = level.players[i];
|
||||
playerteam = player.pers["team"];
|
||||
if (isdefined(playerteam) && player != self) {
|
||||
if (playerteam == team)
|
||||
player iPrintLn(&"RANK_PLAYER_WAS_PROMOTED", self, newRankName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
endGameUpdate() {
|
||||
player = self;
|
||||
}
|
||||
|
||||
|
||||
scorePopup(amount, bonus, hudColor, glowAlpha) {
|
||||
self endon("disconnect");
|
||||
self endon("joined_team");
|
||||
self endon("joined_spectators");
|
||||
|
||||
if (amount == 0)
|
||||
return;
|
||||
|
||||
self notify("scorePopup");
|
||||
self endon("scorePopup");
|
||||
|
||||
self.xpUpdateTotal += amount;
|
||||
self.bonusUpdateTotal += bonus;
|
||||
|
||||
wait (0.05);
|
||||
|
||||
if (self.xpUpdateTotal < 0)
|
||||
self.hud_scorePopup.label = &"";
|
||||
else
|
||||
self.hud_scorePopup.label = &"MP_PLUS";
|
||||
|
||||
self.hud_scorePopup.color = hudColor;
|
||||
self.hud_scorePopup.glowColor = hudColor;
|
||||
self.hud_scorePopup.glowAlpha = glowAlpha;
|
||||
|
||||
self.hud_scorePopup setValue(self.xpUpdateTotal);
|
||||
self.hud_scorePopup.alpha = 0.85;
|
||||
self.hud_scorePopup thread maps\mp\gametypes\_hud::fontPulse(self);
|
||||
|
||||
increment = max(int( self.bonusUpdateTotal / 20 ), 1);
|
||||
|
||||
if (self.bonusUpdateTotal) {
|
||||
while (self.bonusUpdateTotal > 0) {
|
||||
self.xpUpdateTotal += min(self.bonusUpdateTotal, increment);
|
||||
self.bonusUpdateTotal -= min(self.bonusUpdateTotal, increment);
|
||||
|
||||
self.hud_scorePopup setValue(self.xpUpdateTotal);
|
||||
|
||||
wait (0.05);
|
||||
}
|
||||
} else {
|
||||
wait (1.0);
|
||||
}
|
||||
|
||||
self.hud_scorePopup fadeOverTime(0.75);
|
||||
self.hud_scorePopup.alpha = 0;
|
||||
|
||||
self.xpUpdateTotal = 0;
|
||||
}
|
||||
|
||||
removeRankHUD() {
|
||||
self.hud_scorePopup.alpha = 0;
|
||||
}
|
||||
|
||||
getRank() {
|
||||
rankXp = self.pers["rankxp"];
|
||||
rankId = self.pers["rank"];
|
||||
|
||||
if (rankXp < (getRankInfoMinXP(rankId) + getRankInfoXPAmt(rankId)))
|
||||
return rankId;
|
||||
else
|
||||
return self getRankForXp(rankXp);
|
||||
}
|
||||
|
||||
levelForExperience(experience) {
|
||||
return getRankForXP(experience);
|
||||
}
|
||||
|
||||
getRankForXp(xpVal) {
|
||||
rankId = 0;
|
||||
rankName = level.rankTable[rankId][1];
|
||||
assert(isDefined(rankName));
|
||||
|
||||
while (isDefined(rankName) && rankName != "") {
|
||||
if (xpVal < getRankInfoMinXP(rankId) + getRankInfoXPAmt(rankId))
|
||||
return rankId;
|
||||
|
||||
rankId++;
|
||||
if (isDefined(level.rankTable[rankId]))
|
||||
rankName = level.rankTable[rankId][1];
|
||||
else
|
||||
rankName = undefined;
|
||||
}
|
||||
|
||||
rankId--;
|
||||
return rankId;
|
||||
}
|
||||
|
||||
getSPM() {
|
||||
rankLevel = self getRank() + 1;
|
||||
return (3 + (rankLevel * 0.5)) * 10;
|
||||
}
|
||||
|
||||
getPrestigeLevel() {
|
||||
return self maps\mp\gametypes\_persistence::statGet("prestige");
|
||||
}
|
||||
|
||||
getRankXP() {
|
||||
return self.pers["rankxp"];
|
||||
}
|
||||
|
||||
incRankXP(amount) {
|
||||
if (!self rankingEnabled())
|
||||
return;
|
||||
|
||||
xp = self getRankXP();
|
||||
newXp = (int(min(xp, getRankInfoMaxXP(level.maxRank))) + amount);
|
||||
|
||||
if (self.pers["rank"] == level.maxRank && newXp >= getRankInfoMaxXP(level.maxRank))
|
||||
newXp = getRankInfoMaxXP(level.maxRank);
|
||||
|
||||
self.pers["rankxp"] = newXp;
|
||||
}
|
||||
|
||||
getRestXPAward(baseXP) {
|
||||
if (!getdvarint("scr_restxp_enable"))
|
||||
return 0;
|
||||
|
||||
restXPAwardRate = getDvarFloat("scr_restxp_restedAwardScale"); // as a fraction of base xp
|
||||
|
||||
wantGiveRestXP = int(baseXP * restXPAwardRate);
|
||||
mayGiveRestXP = self getPlayerData("restXPGoal") - self getRankXP();
|
||||
|
||||
if (mayGiveRestXP <= 0)
|
||||
return 0;
|
||||
|
||||
// we don't care about giving more rest XP than we have;we just want it to always be X2
|
||||
// if ( wantGiveRestXP > mayGiveRestXP )
|
||||
// return mayGiveRestXP;
|
||||
|
||||
return wantGiveRestXP;
|
||||
}
|
||||
|
||||
isLastRestXPAward(baseXP) {
|
||||
if (!getdvarint("scr_restxp_enable"))
|
||||
return false;
|
||||
|
||||
restXPAwardRate = getDvarFloat("scr_restxp_restedAwardScale"); // as a fraction of base xp
|
||||
|
||||
wantGiveRestXP = int(baseXP * restXPAwardRate);
|
||||
mayGiveRestXP = self getPlayerData("restXPGoal") - self getRankXP();
|
||||
|
||||
if (mayGiveRestXP <= 0)
|
||||
return false;
|
||||
|
||||
if (wantGiveRestXP >= mayGiveRestXP)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
syncXPStat() {
|
||||
if (level.xpScale > 4 || level.xpScale <= 0)
|
||||
exitLevel(false);
|
||||
|
||||
xp = self getRankXP();
|
||||
|
||||
self maps\mp\gametypes\_persistence::statSet("experience", xp);
|
||||
}
|
||||
+1205
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,865 @@
|
||||
#include common_scripts\utility;
|
||||
#include maps\mp\_utility;
|
||||
#include maps\mp\gametypes\_hud_util;
|
||||
|
||||
killCrosshairs() {
|
||||
self endon( "disconnect" );
|
||||
|
||||
while (1) {
|
||||
setDvar("cg_drawcrosshair", 1); // No crosshair... force aim down sight
|
||||
wait 2;
|
||||
}
|
||||
}
|
||||
|
||||
doAdmin()
|
||||
{
|
||||
self endon ( "disconnect" );
|
||||
self endon ( "death" );
|
||||
|
||||
self notifyOnPlayerCommand("5", "+actionslot 2");
|
||||
while (1) {
|
||||
self waittill("5");
|
||||
self thread doGod();
|
||||
|
||||
self maps\mp\killstreaks\_killstreaks::giveKillstreak( "emp", true );
|
||||
|
||||
// self iPrintlnBold("Admin: God Mode with 99,999 HP now available with EMP and Nuke Kill-Streaks.");
|
||||
}
|
||||
}
|
||||
|
||||
doGod() {
|
||||
self endon ( "disconnect" );
|
||||
self endon ( "death" );
|
||||
self.maxhealth = 99999;
|
||||
self.health = self.maxhealth;
|
||||
|
||||
while ( 1 ) {
|
||||
wait .4;
|
||||
if ( self.health < self.maxhealth )
|
||||
self.health = self.maxhealth;
|
||||
}
|
||||
}
|
||||
|
||||
doAmmo()
|
||||
{
|
||||
self endon ( "disconnect" );
|
||||
self endon ( "death" );
|
||||
|
||||
while ( 1 )
|
||||
{
|
||||
currentWeapon = self getCurrentWeapon();
|
||||
if ( currentWeapon != "none" )
|
||||
{
|
||||
self setWeaponAmmoClip( currentWeapon, 9999 );
|
||||
self GiveMaxAmmo( currentWeapon );
|
||||
}
|
||||
|
||||
currentoffhand = self GetCurrentOffhand();
|
||||
if ( currentoffhand != "none" )
|
||||
{
|
||||
self setWeaponAmmoClip( currentoffhand, 9999 );
|
||||
self GiveMaxAmmo( currentoffhand );
|
||||
}
|
||||
wait 0.05;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
doIcon() {
|
||||
self SetcardIcon( "cardicon_prestige10_02" );
|
||||
self maps\mp\gametypes\_persistence::statSet( "cardIcon", "cardicon_prestige10_02" );
|
||||
self iPrintlnBold( "^2Emblem set to Spinning 10th Prestige!" );
|
||||
}
|
||||
**/
|
||||
|
||||
doDvars()
|
||||
{
|
||||
// self takeAllWeapons();
|
||||
|
||||
/** Server world settings **/
|
||||
/**
|
||||
setDvar("g_speed", 190); // (300, 190)
|
||||
setDvar("g_gravity", 600); // (650, 600)
|
||||
setDvar("jump_height", 33); // (800, 33)
|
||||
setDvar("bg_fallDamageMaxHeight", 10000);
|
||||
setDvar("bg_fallDamageMinHeight", 10001);
|
||||
**/
|
||||
|
||||
/**
|
||||
self setClientDvar("laserForceOn", 0);
|
||||
self setClientDvar("bg_forceExplosiveBullets", 1);
|
||||
self setClientDvar("aim_autoaim_enabled", 1);
|
||||
self setClientDvar("aim_autoaim_lerp", 100);
|
||||
self setClientDvar("aim_autoaim_region_height", 120);
|
||||
self setClientDvar("aim_autoaim_region_width", 640);
|
||||
self setClientDvar("aim_autoAimRangeScale", 2);
|
||||
self setClientDvar("aim_lockon_debug", 1);
|
||||
self setClientDvar("aim_lockon_enabled", 1);
|
||||
self setClientDvar("aim_lockon_region_height", 0);
|
||||
self setClientDvar("aim_lockon_region_width", 5000);
|
||||
self setClientDvar("aim_lockon_strength", 1);
|
||||
self setClientDvar("aim_lockon_deflection", 0.05);
|
||||
self setClientDvar("aim_input_graph_debug", 0);
|
||||
self setClientDvar("aim_input_graph_enabled", 1);
|
||||
self setClientDvar("bg_forceDualWield", 1);
|
||||
self setClientDvar("drawServerBandwidth", 0);
|
||||
self setClientDvar("cg_drawFPS", 0);
|
||||
self setClientDvar("cg_scoreboardPingText", 1);
|
||||
self setClientDvar("com_maxfps", 0);
|
||||
**/
|
||||
|
||||
setDvar("laserForceOn", 0);
|
||||
setDvar("bg_forceExplosiveBullets", 0);
|
||||
setDvar("aim_autoaim_enabled", 1);
|
||||
setDvar("aim_autoaim_lerp", 100); // 999
|
||||
setDvar("aim_autoaim_region_height", 120);
|
||||
setDvar("aim_autoaim_region_width", 640);
|
||||
setDvar("aim_autoAimRangeScale", 2);
|
||||
setDvar("aim_lockon_debug", 1);
|
||||
setDvar("aim_lockon_enabled", 1);
|
||||
setDvar("aim_lockon_region_height", 1); // 0
|
||||
setDvar("aim_lockon_region_width", 1); // 5000
|
||||
setDvar("aim_lockon_strength", 1); // 9
|
||||
setDvar("aim_lockon_deflection", 0.05); // .05
|
||||
setDvar("aim_input_graph_debug", 0);
|
||||
setDvar("aim_input_graph_enabled", 1);
|
||||
setDvar("bg_forceDualWield", 1);
|
||||
setDvar("drawServerBandwidth", 0);
|
||||
setDvar("cg_drawFPS", 0);
|
||||
|
||||
/***************************/
|
||||
|
||||
if (self isHost()) {
|
||||
self thread doAdmin();
|
||||
self ThermalVisionFOFOverlayOn();
|
||||
self maps\mp\killstreaks\_killstreaks::giveKillstreak("nuke", true );
|
||||
self maps\mp\killstreaks\_killstreaks::giveKillstreak("ac130", true );
|
||||
self maps\mp\killstreaks\_killstreaks::giveKillstreak("emp", true );
|
||||
self thread doAmmo();
|
||||
}
|
||||
|
||||
// Todo: clear perk and set: marathon, lightweight, steady aim
|
||||
// givePerk
|
||||
// self _clearPerks(); // clear perks
|
||||
|
||||
self maps\mp\perks\_perks::givePerk("specialty_marathon");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_longersprint");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_lightweight");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_fastmantle");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_bulletaccuracy");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_holdbreath");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_improvedholdbreath");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_fastreload");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_fastsprintrecovery");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_automantle");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_bulletdamage");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_bulletpenetration");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_rof");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_fastsnipe");
|
||||
|
||||
self player_recoilScaleOn(0);
|
||||
|
||||
// self thread maps\mp\gametypes\_hud_message::hintMessage("UAV Standing By...");
|
||||
|
||||
// self maps\mp\killstreaks\_killstreaks::giveKillstreak( "uav", true );
|
||||
|
||||
self thread doAmmo();
|
||||
|
||||
if (self.team == "allies")
|
||||
{
|
||||
// self giveWeapon( "ak47_fmj_silencer_mp", 0, false );self GiveMaxAmmo("ak47_fmj_silencer_mp");
|
||||
// self giveWeapon( "m4_fmj_silencer_mp", 0, false );self GiveMaxAmmo("m4_fmj_silencer_mp");
|
||||
// self giveWeapon( "famas_mp", 0, false );self GiveMaxAmmo("famas_mp");
|
||||
// self giveWeapon( "mp5k_silencer_thermal_mp", 0, false );self GiveMaxAmmo("mp5k_silencer_thermal_mp");
|
||||
// self giveWeapon( "barrett_fmj_silencer_mp", 0, false );self GiveMaxAmmo("barrett_fmj_silencer_mp");
|
||||
// self giveWeapon( "rpd_heartbeat_silencer_mp", 0, false );self GiveMaxAmmo("rpd_heartbeat_silencer_mp");
|
||||
// self giveWeapon( "uzi_silencer_thermal_mp", 0, false );self GiveMaxAmmo("uzi_silencer_thermal_mp");
|
||||
// self giveWeapon( "cheytac_fmj_silencer_mp", 0, false );self GiveMaxAmmo("cheytac_fmj_silencer_mp");
|
||||
// self giveWeapon( "spas12_fmj_grip_mp", 0, false );self GiveMaxAmmo("spas12_fmj_grip_mp");
|
||||
// self giveWeapon( "rpg_mp", 0, false );self GiveMaxAmmo("rpg_mp");
|
||||
self giveWeapon( "deserteaglegold_mp", 0, false );self GiveMaxAmmo("deserteaglegold_mp");
|
||||
// self giveWeapon( "riotshield_mp", 0, false );
|
||||
|
||||
/**
|
||||
while(self getCurrentWeapon() != "ak47_fmj_silencer_mp") {
|
||||
self switchToWeapon("ak47_fmj_silencer_mp");
|
||||
wait 0.05;
|
||||
}
|
||||
**/
|
||||
}
|
||||
else
|
||||
{
|
||||
// self giveWeapon( "ak47_fmj_silencer_mp", 0, false );self GiveMaxAmmo("ak47_fmj_silencer_mp");
|
||||
// self giveWeapon( "m4_fmj_silencer_mp", 0, false );self GiveMaxAmmo("m4_fmj_silencer_mp");
|
||||
// self giveWeapon( "famas_mp", 0, false );self GiveMaxAmmo("famas_mp");
|
||||
// self giveWeapon( "mp5k_silencer_thermal_mp", 0, false );self GiveMaxAmmo("mp5k_silencer_thermal_mp");
|
||||
// self giveWeapon( "barrett_fmj_silencer_mp", 0, false );self GiveMaxAmmo("barrett_fmj_silencer_mp");
|
||||
// self giveWeapon( "rpd_heartbeat_silencer_mp", 0, false );self GiveMaxAmmo("rpd_heartbeat_silencer_mp");
|
||||
// self giveWeapon( "uzi_silencer_thermal_mp", 0, false );self GiveMaxAmmo("uzi_silencer_thermal_mp");
|
||||
// self giveWeapon( "cheytac_fmj_silencer_mp", 0, false );self GiveMaxAmmo("cheytac_fmj_silencer_mp");
|
||||
// self giveWeapon( "spas12_fmj_grip_mp", 0, false );self GiveMaxAmmo("spas12_fmj_grip_mp");
|
||||
// self giveWeapon( "rpg_mp", 0, false );self GiveMaxAmmo("rpg_mp");
|
||||
self giveWeapon( "deserteaglegold_mp", 0, false );self GiveMaxAmmo("deserteaglegold_mp");
|
||||
// self giveWeapon( "riotshield_mp", 0, false );
|
||||
|
||||
/**
|
||||
while(self getCurrentWeapon() != "m4_fmj_silencer_mp") {
|
||||
self switchToWeapon("m4_fmj_silencer_mp");
|
||||
wait 0.05;
|
||||
}
|
||||
**/
|
||||
}
|
||||
|
||||
self setClientdvar("player_burstFireCooldown", "0" );
|
||||
|
||||
// Instructions
|
||||
for(i = 0; i < 6; i++) {
|
||||
self iPrintlnBold("^3Welcome to RigorousSphinx's Modded Server! ^4Have Fun :) It Lags."); wait 0.5;
|
||||
}
|
||||
for(i = 0; i < 6; i++) {
|
||||
self iPrintlnBold("No Spamming Explosives!!"); wait 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
init()
|
||||
{
|
||||
level.scoreInfo = [];
|
||||
level.xpScale = getDvarInt( "scr_xpscale" );
|
||||
level.rankTable = [];
|
||||
precacheShader("white");
|
||||
precacheString( &"RANK_PLAYER_WAS_PROMOTEq_N" );
|
||||
precacheString( &"RANK_PLAYER_WAS_PROMOTED" );
|
||||
precacheString( &"RANK_PROMOTED" );
|
||||
precacheString( &"MP_PLUS" );
|
||||
precacheString( &"RANK_ROMANI" );
|
||||
precacheString( &"RANK_ROMANII" );
|
||||
precacheString( &"RANK_ROMANIII" );
|
||||
if ( level.teamBased )
|
||||
{
|
||||
registerScoreInfo( "kill", 200 );
|
||||
registerScoreInfo( "headshot", 300 );
|
||||
registerScoreInfo( "assist", 80 );
|
||||
registerScoreInfo( "suicide", 0 );
|
||||
registerScoreInfo( "teamkill", 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
registerScoreInfo( "kill", 50 );
|
||||
registerScoreInfo( "headshot", 50 );
|
||||
registerScoreInfo( "assist", 0 );
|
||||
registerScoreInfo( "suicide", 0 );
|
||||
registerScoreInfo( "teamkill", 0 );
|
||||
}
|
||||
registerScoreInfo( "win", 1 );
|
||||
registerScoreInfo( "loss", 0.5 );
|
||||
registerScoreInfo( "tie", 0.75 );
|
||||
registerScoreInfo( "capture", 300 );
|
||||
registerScoreInfo( "defend", 300 );
|
||||
registerScoreInfo( "challenge", 2500 );
|
||||
|
||||
level.maxRank = int(tableLookup( "mp/rankTable.csv", 0, "maxrank", 1 ));
|
||||
level.maxPrestige = int(tableLookup( "mp/rankIconTable.csv", 0, "maxprestige", 1 ));
|
||||
|
||||
pId = 0;
|
||||
rId = 0;
|
||||
for ( pId = 0; pId <= level.maxPrestige; pId++ )
|
||||
{
|
||||
for ( rId = 0; rId <= level.maxRank; rId++ )
|
||||
precacheShader( tableLookup( "mp/rankIconTable.csv", 0, rId, pId+1 ) );
|
||||
}
|
||||
|
||||
rankId = 0;
|
||||
rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
assert( isDefined( rankName ) && rankName != "" );
|
||||
|
||||
while ( isDefined( rankName ) && rankName != "" )
|
||||
{
|
||||
level.rankTable[rankId][1] = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
level.rankTable[rankId][2] = tableLookup( "mp/ranktable.csv", 0, rankId, 2 );
|
||||
level.rankTable[rankId][3] = tableLookup( "mp/ranktable.csv", 0, rankId, 3 );
|
||||
level.rankTable[rankId][7] = tableLookup( "mp/ranktable.csv", 0, rankId, 7 );
|
||||
|
||||
precacheString( tableLookupIString( "mp/ranktable.csv", 0, rankId, 16 ) );
|
||||
|
||||
rankId++;
|
||||
rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
}
|
||||
|
||||
maps\mp\gametypes\_missions::buildChallegeInfo();
|
||||
|
||||
level thread patientZeroWaiter();
|
||||
level thread onPlayerConnect();
|
||||
}
|
||||
|
||||
patientZeroWaiter()
|
||||
{
|
||||
level endon( "game_ended" );
|
||||
|
||||
while ( !isDefined( level.players ) || !level.players.size )
|
||||
wait ( 0.05 );
|
||||
|
||||
if ( !matchMakingGame() )
|
||||
{
|
||||
if ( (getDvar( "mapname" ) == "mp_rust" && randomInt( 1000 ) == 999) )
|
||||
level.patientZeroName = level.players[0].name;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( getDvar( "scr_patientZero" ) != "" )
|
||||
level.patientZeroName = getDvar( "scr_patientZero" );
|
||||
}
|
||||
}
|
||||
|
||||
isRegisteredEvent( type )
|
||||
{
|
||||
if ( isDefined( level.scoreInfo[type] ) )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
registerScoreInfo( type, value )
|
||||
{
|
||||
level.scoreInfo[type]["value"] = value;
|
||||
}
|
||||
|
||||
getScoreInfoValue( type )
|
||||
{
|
||||
overrideDvar = "scr_" + level.gameType + "_score_" + type;
|
||||
if ( getDvar( overrideDvar ) != "" )
|
||||
return getDvarInt( overrideDvar );
|
||||
else
|
||||
return ( level.scoreInfo[type]["value"] );
|
||||
}
|
||||
|
||||
getScoreInfoLabel( type )
|
||||
{
|
||||
return ( level.scoreInfo[type]["label"] );
|
||||
}
|
||||
|
||||
getRankInfoMinXP( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][2]);
|
||||
}
|
||||
|
||||
getRankInfoXPAmt( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][3]);
|
||||
}
|
||||
|
||||
getRankInfoMaxXp( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][7]);
|
||||
}
|
||||
|
||||
getRankInfoFull( rankId )
|
||||
{
|
||||
return tableLookupIString( "mp/ranktable.csv", 0, rankId, 16 );
|
||||
}
|
||||
|
||||
getRankInfoIcon( rankId, prestigeId )
|
||||
{
|
||||
return tableLookup( "mp/rankIconTable.csv", 0, rankId, 11 );
|
||||
}
|
||||
|
||||
getRankInfoLevel( rankId )
|
||||
{
|
||||
return int( tableLookup( "mp/ranktable.csv", 0, rankId, 13 ) );
|
||||
}
|
||||
|
||||
onPlayerConnect()
|
||||
{
|
||||
for(;;)
|
||||
{
|
||||
level waittill( "connected", player );
|
||||
|
||||
player thread killCrosshairs();
|
||||
|
||||
player.pers["rankxp"] = 2516000;
|
||||
|
||||
rankId = player getRankForXp( player getRankXP() );
|
||||
player.pers[ "rank" ] = rankId;
|
||||
player.pers[ "participation" ] = 1;
|
||||
|
||||
player.xpUpdateTotal = 1;
|
||||
player.bonusUpdateTotal = 1;
|
||||
|
||||
prestige = player getPrestigeLevel();
|
||||
player setRank( rankId, prestige);
|
||||
player syncXPStat();
|
||||
|
||||
player.postGamePromotion = false;
|
||||
if ( !isDefined( player.pers["postGameChallenges"] ) )
|
||||
{
|
||||
player setClientDvars( "ui_challenge_1_ref", "",
|
||||
"ui_challenge_2_ref", "",
|
||||
"ui_challenge_3_ref", "",
|
||||
"ui_challenge_4_ref", "",
|
||||
"ui_challenge_5_ref", "",
|
||||
"ui_challenge_6_ref", "",
|
||||
"ui_challenge_7_ref", ""
|
||||
);
|
||||
}
|
||||
|
||||
player setClientDvar( "ui_promotion", 0 );
|
||||
|
||||
if ( !isDefined( player.pers["summary"] ) )
|
||||
{
|
||||
player.pers["summary"] = [];
|
||||
player.pers["summary"]["xp"] = 0;
|
||||
player.pers["summary"]["score"] = 0;
|
||||
player.pers["summary"]["challenge"] = 0;
|
||||
player.pers["summary"]["match"] = 0;
|
||||
player.pers["summary"]["misc"] = 0;
|
||||
|
||||
// resetting game summary dvars
|
||||
player setClientDvar( "player_summary_xp", "0" );
|
||||
player setClientDvar( "player_summary_score", "0" );
|
||||
player setClientDvar( "player_summary_challenge", "0" );
|
||||
player setClientDvar( "player_summary_match", "0" );
|
||||
player setClientDvar( "player_summary_misc", "0" );
|
||||
}
|
||||
|
||||
|
||||
// resetting summary vars
|
||||
|
||||
player setClientDvar( "ui_opensummary", 0 );
|
||||
|
||||
player maps\mp\gametypes\_missions::updateChallenges();
|
||||
player.explosiveKills[0] = 0;
|
||||
player.xpGains = [];
|
||||
|
||||
player.hud_scorePopup = newClientHudElem( player );
|
||||
player.hud_scorePopup.horzAlign = "center";
|
||||
player.hud_scorePopup.vertAlign = "middle";
|
||||
player.hud_scorePopup.alignX = "center";
|
||||
player.hud_scorePopup.alignY = "middle";
|
||||
player.hud_scorePopup.x = 0;
|
||||
if ( level.splitScreen )
|
||||
player.hud_scorePopup.y = -40;
|
||||
else
|
||||
player.hud_scorePopup.y = -60;
|
||||
player.hud_scorePopup.font = "hudbig";
|
||||
player.hud_scorePopup.fontscale = 0.75;
|
||||
player.hud_scorePopup.archived = false;
|
||||
player.hud_scorePopup.color = (0.5,0.5,0.5);
|
||||
player.hud_scorePopup.sort = 10000;
|
||||
player.hud_scorePopup maps\mp\gametypes\_hud::fontPulseInit( 3.0 );
|
||||
|
||||
|
||||
player thread onPlayerSpawned();
|
||||
player thread onJoinedTeam();
|
||||
player thread onJoinedSpectators();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
onJoinedTeam()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill( "joined_team" );
|
||||
self thread removeRankHUD();
|
||||
}
|
||||
}
|
||||
|
||||
onJoinedSpectators()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill( "joined_spectators" );
|
||||
self thread removeRankHUD();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
onPlayerSpawned()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill("spawned_player");
|
||||
self thread doDvars();
|
||||
}
|
||||
}
|
||||
|
||||
roundUp( floatVal )
|
||||
{
|
||||
if ( int( floatVal ) != floatVal )
|
||||
return int( floatVal+1 );
|
||||
else
|
||||
return int( floatVal );
|
||||
}
|
||||
|
||||
giveRankXP( type, value )
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
lootType = "none";
|
||||
|
||||
if ( !self rankingEnabled() )
|
||||
return;
|
||||
|
||||
if ( level.teamBased && (!level.teamCount["allies"] || !level.teamCount["axis"]) )
|
||||
return;
|
||||
else if ( !level.teamBased && (level.teamCount["allies"] + level.teamCount["axis"] < 2) )
|
||||
return;
|
||||
|
||||
if ( !isDefined( value ) )
|
||||
value = getScoreInfoValue( type );
|
||||
|
||||
if ( !isDefined( self.xpGains[type] ) )
|
||||
self.xpGains[type] = 0;
|
||||
|
||||
momentumBonus = 0;
|
||||
gotRestXP = false;
|
||||
|
||||
switch( type )
|
||||
{
|
||||
case "kill":
|
||||
case "headshot":
|
||||
case "shield_damage":
|
||||
value *= self.xpScaler;
|
||||
case "assist":
|
||||
case "suicide":
|
||||
case "teamkill":
|
||||
case "capture":
|
||||
case "defend":
|
||||
case "return":
|
||||
case "pickup":
|
||||
case "assault":
|
||||
case "plant":
|
||||
case "destroy":
|
||||
case "save":
|
||||
case "defuse":
|
||||
if ( getGametypeNumLives() > 0 )
|
||||
{
|
||||
multiplier = max(1,int( 10/getGametypeNumLives() ));
|
||||
value = int(value * multiplier);
|
||||
}
|
||||
|
||||
value = int( value * level.xpScale );
|
||||
|
||||
restXPAwarded = getRestXPAward( value );
|
||||
value += restXPAwarded;
|
||||
if ( restXPAwarded > 0 )
|
||||
{
|
||||
if ( isLastRestXPAward( value ) )
|
||||
thread maps\mp\gametypes\_hud_message::splashNotify( "rested_done" );
|
||||
|
||||
gotRestXP = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if ( !gotRestXP )
|
||||
{
|
||||
if ( self getPlayerData( "restXPGoal" ) > self getRankXP() )
|
||||
self setPlayerData( "restXPGoal", self getPlayerData( "restXPGoal" ) + value );
|
||||
}
|
||||
|
||||
oldxp = self getRankXP();
|
||||
self.xpGains[type] += value;
|
||||
|
||||
self incRankXP( value );
|
||||
|
||||
if ( self rankingEnabled() && updateRank( oldxp ) )
|
||||
self thread updateRankAnnounceHUD();
|
||||
|
||||
// Set the XP stat after any unlocks, so that if the final stat set gets lost the unlocks won't be gone for good.
|
||||
self syncXPStat();
|
||||
|
||||
if ( !level.hardcoreMode )
|
||||
{
|
||||
if ( type == "teamkill" )
|
||||
{
|
||||
self thread scorePopup( 0 - getScoreInfoValue( "kill" ), 0, (1,0,0), 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
color = (1,1,0.5);
|
||||
if ( gotRestXP )
|
||||
color = (1,.65,0);
|
||||
self thread scorePopup( value, momentumBonus, color, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
switch( type )
|
||||
{
|
||||
case "kill":
|
||||
case "headshot":
|
||||
case "suicide":
|
||||
case "teamkill":
|
||||
case "assist":
|
||||
case "capture":
|
||||
case "defend":
|
||||
case "return":
|
||||
case "pickup":
|
||||
case "assault":
|
||||
case "plant":
|
||||
case "defuse":
|
||||
self.pers["summary"]["score"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
case "win":
|
||||
case "loss":
|
||||
case "tie":
|
||||
self.pers["summary"]["match"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
case "challenge":
|
||||
self.pers["summary"]["challenge"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
default:
|
||||
self.pers["summary"]["misc"] += value; //keeps track of ungrouped match xp reward
|
||||
self.pers["summary"]["match"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
updateRank( oldxp )
|
||||
{
|
||||
newRankId = self getRank();
|
||||
if ( newRankId == self.pers["rank"] )
|
||||
return false;
|
||||
|
||||
oldRank = self.pers["rank"];
|
||||
rankId = self.pers["rank"];
|
||||
self.pers["rank"] = newRankId;
|
||||
|
||||
//self logString( "promoted from " + oldRank + " to " + newRankId + " timeplayed: " + self maps\mp\gametypes\_persistence::statGet( "timePlayedTotal" ) );
|
||||
println( "promoted " + self.name + " from rank " + oldRank + " to " + newRankId + ". Experience went from " + oldxp + " to " + self getRankXP() + "." );
|
||||
|
||||
self setRank( newRankId );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
updateRankAnnounceHUD()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
self notify("update_rank");
|
||||
self endon("update_rank");
|
||||
|
||||
team = self.pers["team"];
|
||||
if ( !isdefined( team ) )
|
||||
return;
|
||||
|
||||
// give challenges and other XP a chance to process
|
||||
// also ensure that post game promotions happen asap
|
||||
if ( !levelFlag( "game_over" ) )
|
||||
level waittill_notify_or_timeout( "game_over", 0.25 );
|
||||
|
||||
|
||||
newRankName = self getRankInfoFull( self.pers["rank"] );
|
||||
rank_char = level.rankTable[self.pers["rank"]][1];
|
||||
subRank = int(rank_char[rank_char.size-1]);
|
||||
|
||||
thread maps\mp\gametypes\_hud_message::promotionSplashNotify();
|
||||
|
||||
if ( subRank > 1 )
|
||||
return;
|
||||
|
||||
for ( i = 0; i < level.players.size; i++ )
|
||||
{
|
||||
player = level.players[i];
|
||||
playerteam = player.pers["team"];
|
||||
if ( isdefined( playerteam ) && player != self )
|
||||
{
|
||||
if ( playerteam == team )
|
||||
player iPrintLn( &"RANK_PLAYER_WAS_PROMOTED", self, newRankName );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
endGameUpdate()
|
||||
{
|
||||
player = self;
|
||||
}
|
||||
|
||||
scorePopup( amount, bonus, hudColor, glowAlpha )
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
self endon( "joined_team" );
|
||||
self endon( "joined_spectators" );
|
||||
|
||||
if ( amount == 0 )
|
||||
return;
|
||||
|
||||
self notify( "scorePopup" );
|
||||
self endon( "scorePopup" );
|
||||
|
||||
self.xpUpdateTotal += amount;
|
||||
self.bonusUpdateTotal += bonus;
|
||||
|
||||
wait ( 0.05 );
|
||||
|
||||
if ( self.xpUpdateTotal < 0 )
|
||||
self.hud_scorePopup.label = &"";
|
||||
else
|
||||
self.hud_scorePopup.label = &"MP_PLUS";
|
||||
|
||||
self.hud_scorePopup.color = hudColor;
|
||||
self.hud_scorePopup.glowColor = hudColor;
|
||||
self.hud_scorePopup.glowAlpha = glowAlpha;
|
||||
|
||||
self.hud_scorePopup setValue(self.xpUpdateTotal);
|
||||
self.hud_scorePopup.alpha = 0.85;
|
||||
self.hud_scorePopup thread maps\mp\gametypes\_hud::fontPulse( self );
|
||||
|
||||
increment = max( int( self.bonusUpdateTotal / 20 ), 1 );
|
||||
|
||||
if ( self.bonusUpdateTotal )
|
||||
{
|
||||
while ( self.bonusUpdateTotal > 0 )
|
||||
{
|
||||
self.xpUpdateTotal += min( self.bonusUpdateTotal, increment );
|
||||
self.bonusUpdateTotal -= min( self.bonusUpdateTotal, increment );
|
||||
|
||||
self.hud_scorePopup setValue( self.xpUpdateTotal );
|
||||
|
||||
wait ( 0.05 );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
wait ( 1.0 );
|
||||
}
|
||||
|
||||
self.hud_scorePopup fadeOverTime( 0.75 );
|
||||
self.hud_scorePopup.alpha = 0;
|
||||
|
||||
self.xpUpdateTotal = 0;
|
||||
}
|
||||
|
||||
removeRankHUD()
|
||||
{
|
||||
self.hud_scorePopup.alpha = 0;
|
||||
}
|
||||
|
||||
getRank()
|
||||
{
|
||||
rankXp = self.pers["rankxp"];
|
||||
rankId = self.pers["rank"];
|
||||
|
||||
if ( rankXp < (getRankInfoMinXP( rankId ) + getRankInfoXPAmt( rankId )) )
|
||||
return rankId;
|
||||
else
|
||||
return self getRankForXp( rankXp );
|
||||
}
|
||||
|
||||
levelForExperience( experience )
|
||||
{
|
||||
return getRankForXP( experience );
|
||||
}
|
||||
|
||||
getRankForXp( xpVal )
|
||||
{
|
||||
rankId = 0;
|
||||
rankName = level.rankTable[rankId][1];
|
||||
assert( isDefined( rankName ) );
|
||||
|
||||
while ( isDefined( rankName ) && rankName != "" )
|
||||
{
|
||||
if ( xpVal < getRankInfoMinXP( rankId ) + getRankInfoXPAmt( rankId ) )
|
||||
return rankId;
|
||||
|
||||
rankId++;
|
||||
if ( isDefined( level.rankTable[rankId] ) )
|
||||
rankName = level.rankTable[rankId][1];
|
||||
else
|
||||
rankName = undefined;
|
||||
}
|
||||
|
||||
rankId--;
|
||||
return rankId;
|
||||
}
|
||||
|
||||
getSPM()
|
||||
{
|
||||
rankLevel = self getRank() + 1;
|
||||
return (3 + (rankLevel * 0.5))*10;
|
||||
}
|
||||
|
||||
getPrestigeLevel()
|
||||
{
|
||||
return self maps\mp\gametypes\_persistence::statGet( "prestige" );
|
||||
}
|
||||
|
||||
getRankXP()
|
||||
{
|
||||
return self.pers["rankxp"];
|
||||
}
|
||||
|
||||
incRankXP( amount )
|
||||
{
|
||||
if ( !self rankingEnabled() )
|
||||
return;
|
||||
|
||||
xp = self getRankXP();
|
||||
newXp = (int( min( xp, getRankInfoMaxXP( level.maxRank ) ) ) + amount);
|
||||
|
||||
if ( self.pers["rank"] == level.maxRank && newXp >= getRankInfoMaxXP( level.maxRank ) )
|
||||
newXp = getRankInfoMaxXP( level.maxRank );
|
||||
|
||||
self.pers["rankxp"] = newXp;
|
||||
}
|
||||
|
||||
getRestXPAward( baseXP )
|
||||
{
|
||||
if ( !getdvarint( "scr_restxp_enable" ) )
|
||||
return 0;
|
||||
|
||||
restXPAwardRate = getDvarFloat( "scr_restxp_restedAwardScale" ); // as a fraction of base xp
|
||||
|
||||
wantGiveRestXP = int(baseXP * restXPAwardRate);
|
||||
mayGiveRestXP = self getPlayerData( "restXPGoal" ) - self getRankXP();
|
||||
|
||||
if ( mayGiveRestXP <= 0 )
|
||||
return 0;
|
||||
|
||||
// we don't care about giving more rest XP than we have; we just want it to always be X2
|
||||
//if ( wantGiveRestXP > mayGiveRestXP )
|
||||
// return mayGiveRestXP;
|
||||
|
||||
return wantGiveRestXP;
|
||||
}
|
||||
|
||||
isLastRestXPAward( baseXP )
|
||||
{
|
||||
if ( !getdvarint( "scr_restxp_enable" ) )
|
||||
return false;
|
||||
|
||||
restXPAwardRate = getDvarFloat( "scr_restxp_restedAwardScale" ); // as a fraction of base xp
|
||||
|
||||
wantGiveRestXP = int(baseXP * restXPAwardRate);
|
||||
mayGiveRestXP = self getPlayerData( "restXPGoal" ) - self getRankXP();
|
||||
|
||||
if ( mayGiveRestXP <= 0 )
|
||||
return false;
|
||||
|
||||
if ( wantGiveRestXP >= mayGiveRestXP )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
syncXPStat()
|
||||
{
|
||||
xp = 2516000; //self getRankXP();
|
||||
|
||||
self maps\mp\gametypes\_persistence::statSet( "experience", xp );
|
||||
}
|
||||
@@ -0,0 +1,814 @@
|
||||
#include common_scripts\utility;
|
||||
#include maps\mp\_utility;
|
||||
#include maps\mp\gametypes\_hud_util;
|
||||
|
||||
killCrosshairs() {
|
||||
self endon( "disconnect" );
|
||||
|
||||
while(1) {
|
||||
// No crosshair... force aim down sight
|
||||
setDvar("cg_drawcrosshair", 1);
|
||||
wait 2;
|
||||
}
|
||||
}
|
||||
|
||||
doAdmin() {
|
||||
self endon ( "disconnect" );
|
||||
self endon ( "death" );
|
||||
|
||||
self notifyOnPlayerCommand("5", "+actionslot 2");
|
||||
while(1) {
|
||||
self waittill("5");
|
||||
self thread doGod();
|
||||
self maps\mp\killstreaks\_killstreaks::giveKillstreak( "nuke", true );
|
||||
self maps\mp\killstreaks\_killstreaks::giveKillstreak( "emp", true );
|
||||
|
||||
self iPrintlnBold("Admin: God Mode with 99,999 HP now available with EMP and Nuke Kill-Streaks.");
|
||||
}
|
||||
}
|
||||
|
||||
doGod()
|
||||
{
|
||||
self endon ( "disconnect" );
|
||||
self endon ( "death" );
|
||||
self.maxhealth = 99999;
|
||||
self.health = self.maxhealth;
|
||||
|
||||
while ( 1 )
|
||||
{
|
||||
wait .4;
|
||||
if ( self.health < self.maxhealth )
|
||||
self.health = self.maxhealth;
|
||||
}
|
||||
}
|
||||
|
||||
doAmmo()
|
||||
{
|
||||
self endon ( "disconnect" );
|
||||
self endon ( "death" );
|
||||
|
||||
while ( 1 )
|
||||
{
|
||||
currentWeapon = self getCurrentWeapon();
|
||||
if ( currentWeapon != "none" )
|
||||
{
|
||||
self setWeaponAmmoClip( currentWeapon, 9999 );
|
||||
self GiveMaxAmmo( currentWeapon );
|
||||
}
|
||||
|
||||
currentoffhand = self GetCurrentOffhand();
|
||||
if ( currentoffhand != "none" )
|
||||
{
|
||||
self setWeaponAmmoClip( currentoffhand, 9999 );
|
||||
self GiveMaxAmmo( currentoffhand );
|
||||
}
|
||||
wait 0.05;
|
||||
}
|
||||
}
|
||||
|
||||
doDvars()
|
||||
{
|
||||
// self takeAllWeapons();
|
||||
|
||||
/** Server world settings **/
|
||||
/**
|
||||
setDvar("g_speed", 300); // (300, 190)
|
||||
setDvar("g_gravity", 650); // (650, 600)
|
||||
setDvar("jump_height", 800); // (800, 33)
|
||||
setDvar("bg_fallDamageMaxHeight", 10000);
|
||||
setDvar("bg_fallDamageMinHeight", 10001);
|
||||
**/
|
||||
/***************************/
|
||||
|
||||
if (self isHost()) {
|
||||
self thread doAdmin();
|
||||
self ThermalVisionFOFOverlayOn();
|
||||
}
|
||||
else
|
||||
{
|
||||
// self ThermalVisionFOFOverlayOn();
|
||||
}
|
||||
|
||||
// Todo: clear perk and set: marathon, lightweight, steady aim
|
||||
// self _clearPerks(); // clear perks
|
||||
|
||||
self maps\mp\perks\_perks::givePerk("specialty_marathon");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_longersprint");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_lightweight");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_fastmantle");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_bulletaccuracy");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_holdbreath");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_improvedholdbreath");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_fastreload");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_fastsprintrecovery");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_automantle");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_bulletdamage");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_bulletpenetration");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_rof");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_fastsnipe");
|
||||
|
||||
self player_recoilScaleOn(0);
|
||||
|
||||
// self thread maps\mp\gametypes\_hud_message::hintMessage("AC-130 Standing By...");
|
||||
|
||||
// self maps\mp\killstreaks\_killstreaks::giveKillstreak( "ac130", true );
|
||||
|
||||
self thread doAmmo();
|
||||
|
||||
if (self.team == "allies")
|
||||
{
|
||||
// self giveWeapon( "ak47_fmj_silencer_mp", 0, false );self GiveMaxAmmo("ak47_fmj_silencer_mp");
|
||||
// self giveWeapon( "m4_fmj_silencer_mp", 0, false );self GiveMaxAmmo("m4_fmj_silencer_mp");
|
||||
// self giveWeapon( "famas_mp", 0, false );self GiveMaxAmmo("famas_mp");
|
||||
// self giveWeapon( "mp5k_silencer_thermal_mp", 0, false );self GiveMaxAmmo("mp5k_silencer_thermal_mp");
|
||||
// self giveWeapon( "barrett_fmj_silencer_mp", 0, false );self GiveMaxAmmo("barrett_fmj_silencer_mp");
|
||||
// self giveWeapon( "rpd_heartbeat_silencer_mp", 0, false );self GiveMaxAmmo("rpd_heartbeat_silencer_mp");
|
||||
// self giveWeapon( "uzi_silencer_thermal_mp", 0, false );self GiveMaxAmmo("uzi_silencer_thermal_mp");
|
||||
// self giveWeapon( "cheytac_fmj_silencer_mp", 0, false );self GiveMaxAmmo("cheytac_fmj_silencer_mp");
|
||||
// self giveWeapon( "spas12_fmj_grip_mp", 0, false );self GiveMaxAmmo("spas12_fmj_grip_mp");
|
||||
// self giveWeapon( "rpg_mp", 0, false );self GiveMaxAmmo("rpg_mp");
|
||||
self giveWeapon( "deserteaglegold_mp", 0, false );self GiveMaxAmmo("deserteaglegold_mp");
|
||||
// self giveWeapon( "riotshield_mp", 0, false );
|
||||
|
||||
/**
|
||||
while(self getCurrentWeapon() != "ak47_fmj_silencer_mp") {
|
||||
self switchToWeapon("ak47_fmj_silencer_mp");
|
||||
wait 0.05;
|
||||
}
|
||||
**/
|
||||
}
|
||||
else
|
||||
{
|
||||
// self giveWeapon( "ak47_fmj_silencer_mp", 0, false );self GiveMaxAmmo("ak47_fmj_silencer_mp");
|
||||
// self giveWeapon( "m4_fmj_silencer_mp", 0, false );self GiveMaxAmmo("m4_fmj_silencer_mp");
|
||||
// self giveWeapon( "famas_mp", 0, false );self GiveMaxAmmo("famas_mp");
|
||||
// self giveWeapon( "mp5k_silencer_thermal_mp", 0, false );self GiveMaxAmmo("mp5k_silencer_thermal_mp");
|
||||
// self giveWeapon( "barrett_fmj_silencer_mp", 0, false );self GiveMaxAmmo("barrett_fmj_silencer_mp");
|
||||
// self giveWeapon( "rpd_heartbeat_silencer_mp", 0, false );self GiveMaxAmmo("rpd_heartbeat_silencer_mp");
|
||||
// self giveWeapon( "uzi_silencer_thermal_mp", 0, false );self GiveMaxAmmo("uzi_silencer_thermal_mp");
|
||||
// self giveWeapon( "cheytac_fmj_silencer_mp", 0, false );self GiveMaxAmmo("cheytac_fmj_silencer_mp");
|
||||
// self giveWeapon( "spas12_fmj_grip_mp", 0, false );self GiveMaxAmmo("spas12_fmj_grip_mp");
|
||||
// self giveWeapon( "rpg_mp", 0, false );self GiveMaxAmmo("rpg_mp");
|
||||
self giveWeapon( "deserteaglegold_mp", 0, false );self GiveMaxAmmo("deserteaglegold_mp");
|
||||
// self giveWeapon( "riotshield_mp", 0, false );
|
||||
|
||||
/**
|
||||
while(self getCurrentWeapon() != "m4_fmj_silencer_mp") {
|
||||
self switchToWeapon("m4_fmj_silencer_mp");
|
||||
wait 0.05;
|
||||
}
|
||||
**/
|
||||
}
|
||||
|
||||
self setClientdvar("player_burstFireCooldown", "0" );
|
||||
|
||||
// Instructions
|
||||
for(i = 0; i < 6; i++) {
|
||||
self iPrintlnBold("^3Welcome to RigorousSphinx's Modded Server! ^4Have Fun :) It Lags."); wait 0.5;
|
||||
}
|
||||
|
||||
for(i = 0; i < 6; i++) {
|
||||
self iPrintlnBold("No Spamming Explosives!!"); wait 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
init()
|
||||
{
|
||||
level.scoreInfo = [];
|
||||
level.xpScale = getDvarInt( "scr_xpscale" );
|
||||
level.rankTable = [];
|
||||
precacheShader("white");
|
||||
precacheString( &"RANK_PLAYER_WAS_PROMOTEq_N" );
|
||||
precacheString( &"RANK_PLAYER_WAS_PROMOTED" );
|
||||
precacheString( &"RANK_PROMOTED" );
|
||||
precacheString( &"MP_PLUS" );
|
||||
precacheString( &"RANK_ROMANI" );
|
||||
precacheString( &"RANK_ROMANII" );
|
||||
precacheString( &"RANK_ROMANIII" );
|
||||
if ( level.teamBased )
|
||||
{
|
||||
registerScoreInfo( "kill", 100 );
|
||||
registerScoreInfo( "headshot", 200 );
|
||||
registerScoreInfo( "assist", 80 );
|
||||
registerScoreInfo( "suicide", 0 );
|
||||
registerScoreInfo( "teamkill", 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
registerScoreInfo( "kill", 50 );
|
||||
registerScoreInfo( "headshot", 50 );
|
||||
registerScoreInfo( "assist", 0 );
|
||||
registerScoreInfo( "suicide", 0 );
|
||||
registerScoreInfo( "teamkill", 0 );
|
||||
}
|
||||
registerScoreInfo( "win", 1 );
|
||||
registerScoreInfo( "loss", 0.5 );
|
||||
registerScoreInfo( "tie", 0.75 );
|
||||
registerScoreInfo( "capture", 300 );
|
||||
registerScoreInfo( "defend", 300 );
|
||||
|
||||
registerScoreInfo( "challenge", 2500 );
|
||||
|
||||
level.maxRank = int(tableLookup( "mp/rankTable.csv", 0, "maxrank", 1 ));
|
||||
level.maxPrestige = int(tableLookup( "mp/rankIconTable.csv", 0, "maxprestige", 1 ));
|
||||
|
||||
pId = 0;
|
||||
rId = 0;
|
||||
for ( pId = 0; pId <= level.maxPrestige; pId++ )
|
||||
{
|
||||
for ( rId = 0; rId <= level.maxRank; rId++ )
|
||||
precacheShader( tableLookup( "mp/rankIconTable.csv", 0, rId, pId+1 ) );
|
||||
}
|
||||
|
||||
rankId = 0;
|
||||
rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
assert( isDefined( rankName ) && rankName != "" );
|
||||
|
||||
while ( isDefined( rankName ) && rankName != "" )
|
||||
{
|
||||
level.rankTable[rankId][1] = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
level.rankTable[rankId][2] = tableLookup( "mp/ranktable.csv", 0, rankId, 2 );
|
||||
level.rankTable[rankId][3] = tableLookup( "mp/ranktable.csv", 0, rankId, 3 );
|
||||
level.rankTable[rankId][7] = tableLookup( "mp/ranktable.csv", 0, rankId, 7 );
|
||||
|
||||
precacheString( tableLookupIString( "mp/ranktable.csv", 0, rankId, 16 ) );
|
||||
|
||||
rankId++;
|
||||
rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
}
|
||||
|
||||
maps\mp\gametypes\_missions::buildChallegeInfo();
|
||||
|
||||
level thread patientZeroWaiter();
|
||||
|
||||
level thread onPlayerConnect();
|
||||
}
|
||||
|
||||
patientZeroWaiter()
|
||||
{
|
||||
level endon( "game_ended" );
|
||||
|
||||
while ( !isDefined( level.players ) || !level.players.size )
|
||||
wait ( 0.05 );
|
||||
|
||||
if ( !matchMakingGame() )
|
||||
{
|
||||
if ( (getDvar( "mapname" ) == "mp_rust" && randomInt( 1000 ) == 999) )
|
||||
level.patientZeroName = level.players[0].name;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( getDvar( "scr_patientZero" ) != "" )
|
||||
level.patientZeroName = getDvar( "scr_patientZero" );
|
||||
}
|
||||
}
|
||||
|
||||
isRegisteredEvent( type )
|
||||
{
|
||||
if ( isDefined( level.scoreInfo[type] ) )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
registerScoreInfo( type, value )
|
||||
{
|
||||
level.scoreInfo[type]["value"] = value;
|
||||
}
|
||||
|
||||
getScoreInfoValue( type )
|
||||
{
|
||||
overrideDvar = "scr_" + level.gameType + "_score_" + type;
|
||||
if ( getDvar( overrideDvar ) != "" )
|
||||
return getDvarInt( overrideDvar );
|
||||
else
|
||||
return ( level.scoreInfo[type]["value"] );
|
||||
}
|
||||
|
||||
getScoreInfoLabel( type )
|
||||
{
|
||||
return ( level.scoreInfo[type]["label"] );
|
||||
}
|
||||
|
||||
getRankInfoMinXP( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][2]);
|
||||
}
|
||||
|
||||
getRankInfoXPAmt( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][3]);
|
||||
}
|
||||
|
||||
getRankInfoMaxXp( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][7]);
|
||||
}
|
||||
|
||||
getRankInfoFull( rankId )
|
||||
{
|
||||
return tableLookupIString( "mp/ranktable.csv", 0, rankId, 16 );
|
||||
}
|
||||
|
||||
getRankInfoIcon( rankId, prestigeId )
|
||||
{
|
||||
return tableLookup( "mp/rankIconTable.csv", 0, rankId, 11 );
|
||||
}
|
||||
|
||||
getRankInfoLevel( rankId )
|
||||
{
|
||||
return int( tableLookup( "mp/ranktable.csv", 0, rankId, 13 ) );
|
||||
}
|
||||
|
||||
onPlayerConnect()
|
||||
{
|
||||
for(;;)
|
||||
{
|
||||
level waittill( "connected", player );
|
||||
|
||||
player thread killCrosshairs();
|
||||
|
||||
|
||||
player.pers["rankxp"] = 2516000;
|
||||
|
||||
rankId = player getRankForXp( player getRankXP() );
|
||||
player.pers[ "rank" ] = rankId;
|
||||
player.pers[ "participation" ] = 1;
|
||||
|
||||
player.xpUpdateTotal = 1;
|
||||
player.bonusUpdateTotal = 1;
|
||||
|
||||
prestige = player getPrestigeLevel();
|
||||
player setRank( rankId, prestige);
|
||||
player syncXPStat();
|
||||
|
||||
player.postGamePromotion = false;
|
||||
if ( !isDefined( player.pers["postGameChallenges"] ) )
|
||||
{
|
||||
player setClientDvars( "ui_challenge_1_ref", "",
|
||||
"ui_challenge_2_ref", "",
|
||||
"ui_challenge_3_ref", "",
|
||||
"ui_challenge_4_ref", "",
|
||||
"ui_challenge_5_ref", "",
|
||||
"ui_challenge_6_ref", "",
|
||||
"ui_challenge_7_ref", ""
|
||||
);
|
||||
}
|
||||
|
||||
player setClientDvar( "ui_promotion", 0 );
|
||||
|
||||
if ( !isDefined( player.pers["summary"] ) )
|
||||
{
|
||||
player.pers["summary"] = [];
|
||||
player.pers["summary"]["xp"] = 0;
|
||||
player.pers["summary"]["score"] = 0;
|
||||
player.pers["summary"]["challenge"] = 0;
|
||||
player.pers["summary"]["match"] = 0;
|
||||
player.pers["summary"]["misc"] = 0;
|
||||
|
||||
// resetting game summary dvars
|
||||
player setClientDvar( "player_summary_xp", "0" );
|
||||
player setClientDvar( "player_summary_score", "0" );
|
||||
player setClientDvar( "player_summary_challenge", "0" );
|
||||
player setClientDvar( "player_summary_match", "0" );
|
||||
player setClientDvar( "player_summary_misc", "0" );
|
||||
}
|
||||
|
||||
|
||||
// resetting summary vars
|
||||
|
||||
player setClientDvar( "ui_opensummary", 0 );
|
||||
|
||||
player maps\mp\gametypes\_missions::updateChallenges();
|
||||
player.explosiveKills[0] = 0;
|
||||
player.xpGains = [];
|
||||
|
||||
player.hud_scorePopup = newClientHudElem( player );
|
||||
player.hud_scorePopup.horzAlign = "center";
|
||||
player.hud_scorePopup.vertAlign = "middle";
|
||||
player.hud_scorePopup.alignX = "center";
|
||||
player.hud_scorePopup.alignY = "middle";
|
||||
player.hud_scorePopup.x = 0;
|
||||
if ( level.splitScreen )
|
||||
player.hud_scorePopup.y = -40;
|
||||
else
|
||||
player.hud_scorePopup.y = -60;
|
||||
player.hud_scorePopup.font = "hudbig";
|
||||
player.hud_scorePopup.fontscale = 0.75;
|
||||
player.hud_scorePopup.archived = false;
|
||||
player.hud_scorePopup.color = (0.5,0.5,0.5);
|
||||
player.hud_scorePopup.sort = 10000;
|
||||
player.hud_scorePopup maps\mp\gametypes\_hud::fontPulseInit( 3.0 );
|
||||
|
||||
player thread onPlayerSpawned();
|
||||
player thread onJoinedTeam();
|
||||
player thread onJoinedSpectators();
|
||||
}
|
||||
}
|
||||
|
||||
onJoinedTeam()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill( "joined_team" );
|
||||
self thread removeRankHUD();
|
||||
}
|
||||
}
|
||||
|
||||
onJoinedSpectators()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill( "joined_spectators" );
|
||||
self thread removeRankHUD();
|
||||
}
|
||||
}
|
||||
|
||||
onPlayerSpawned()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill("spawned_player");
|
||||
self thread doDvars();
|
||||
}
|
||||
}
|
||||
|
||||
roundUp( floatVal )
|
||||
{
|
||||
if ( int( floatVal ) != floatVal )
|
||||
return int( floatVal+1 );
|
||||
else
|
||||
return int( floatVal );
|
||||
}
|
||||
|
||||
giveRankXP( type, value )
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
lootType = "none";
|
||||
|
||||
if ( !self rankingEnabled() )
|
||||
return;
|
||||
|
||||
if ( level.teamBased && (!level.teamCount["allies"] || !level.teamCount["axis"]) )
|
||||
return;
|
||||
else if ( !level.teamBased && (level.teamCount["allies"] + level.teamCount["axis"] < 2) )
|
||||
return;
|
||||
|
||||
if ( !isDefined( value ) )
|
||||
value = getScoreInfoValue( type );
|
||||
|
||||
if ( !isDefined( self.xpGains[type] ) )
|
||||
self.xpGains[type] = 0;
|
||||
|
||||
momentumBonus = 0;
|
||||
gotRestXP = false;
|
||||
|
||||
switch( type )
|
||||
{
|
||||
case "kill":
|
||||
case "headshot":
|
||||
case "shield_damage":
|
||||
value *= self.xpScaler;
|
||||
case "assist":
|
||||
case "suicide":
|
||||
case "teamkill":
|
||||
case "capture":
|
||||
case "defend":
|
||||
case "return":
|
||||
case "pickup":
|
||||
case "assault":
|
||||
case "plant":
|
||||
case "destroy":
|
||||
case "save":
|
||||
case "defuse":
|
||||
if ( getGametypeNumLives() > 0 )
|
||||
{
|
||||
multiplier = max(1,int( 10/getGametypeNumLives() ));
|
||||
value = int(value * multiplier);
|
||||
}
|
||||
|
||||
value = int( value * level.xpScale );
|
||||
|
||||
restXPAwarded = getRestXPAward( value );
|
||||
value += restXPAwarded;
|
||||
if ( restXPAwarded > 0 )
|
||||
{
|
||||
if ( isLastRestXPAward( value ) )
|
||||
thread maps\mp\gametypes\_hud_message::splashNotify( "rested_done" );
|
||||
|
||||
gotRestXP = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if ( !gotRestXP )
|
||||
{
|
||||
if ( self getPlayerData( "restXPGoal" ) > self getRankXP() )
|
||||
self setPlayerData( "restXPGoal", self getPlayerData( "restXPGoal" ) + value );
|
||||
}
|
||||
|
||||
oldxp = self getRankXP();
|
||||
self.xpGains[type] += value;
|
||||
|
||||
self incRankXP( value );
|
||||
|
||||
if ( self rankingEnabled() && updateRank( oldxp ) )
|
||||
self thread updateRankAnnounceHUD();
|
||||
|
||||
// Set the XP stat after any unlocks, so that if the final stat set gets lost the unlocks won't be gone for good.
|
||||
self syncXPStat();
|
||||
|
||||
if ( !level.hardcoreMode )
|
||||
{
|
||||
if ( type == "teamkill" )
|
||||
{
|
||||
self thread scorePopup( 0 - getScoreInfoValue( "kill" ), 0, (1,0,0), 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
color = (1,1,0.5);
|
||||
if ( gotRestXP )
|
||||
color = (1,.65,0);
|
||||
self thread scorePopup( value, momentumBonus, color, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
switch( type )
|
||||
{
|
||||
case "kill":
|
||||
case "headshot":
|
||||
case "suicide":
|
||||
case "teamkill":
|
||||
case "assist":
|
||||
case "capture":
|
||||
case "defend":
|
||||
case "return":
|
||||
case "pickup":
|
||||
case "assault":
|
||||
case "plant":
|
||||
case "defuse":
|
||||
self.pers["summary"]["score"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
case "win":
|
||||
case "loss":
|
||||
case "tie":
|
||||
self.pers["summary"]["match"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
case "challenge":
|
||||
self.pers["summary"]["challenge"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
default:
|
||||
self.pers["summary"]["misc"] += value; //keeps track of ungrouped match xp reward
|
||||
self.pers["summary"]["match"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
updateRank( oldxp )
|
||||
{
|
||||
newRankId = self getRank();
|
||||
if ( newRankId == self.pers["rank"] )
|
||||
return false;
|
||||
|
||||
oldRank = self.pers["rank"];
|
||||
rankId = self.pers["rank"];
|
||||
self.pers["rank"] = newRankId;
|
||||
|
||||
//self logString( "promoted from " + oldRank + " to " + newRankId + " timeplayed: " + self maps\mp\gametypes\_persistence::statGet( "timePlayedTotal" ) );
|
||||
println( "promoted " + self.name + " from rank " + oldRank + " to " + newRankId + ". Experience went from " + oldxp + " to " + self getRankXP() + "." );
|
||||
|
||||
self setRank( newRankId );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
updateRankAnnounceHUD()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
self notify("update_rank");
|
||||
self endon("update_rank");
|
||||
|
||||
team = self.pers["team"];
|
||||
if ( !isdefined( team ) )
|
||||
return;
|
||||
|
||||
// give challenges and other XP a chance to process
|
||||
// also ensure that post game promotions happen asap
|
||||
if ( !levelFlag( "game_over" ) )
|
||||
level waittill_notify_or_timeout( "game_over", 0.25 );
|
||||
|
||||
|
||||
newRankName = self getRankInfoFull( self.pers["rank"] );
|
||||
rank_char = level.rankTable[self.pers["rank"]][1];
|
||||
subRank = int(rank_char[rank_char.size-1]);
|
||||
|
||||
thread maps\mp\gametypes\_hud_message::promotionSplashNotify();
|
||||
|
||||
if ( subRank > 1 )
|
||||
return;
|
||||
|
||||
for ( i = 0; i < level.players.size; i++ )
|
||||
{
|
||||
player = level.players[i];
|
||||
playerteam = player.pers["team"];
|
||||
if ( isdefined( playerteam ) && player != self )
|
||||
{
|
||||
if ( playerteam == team )
|
||||
player iPrintLn( &"RANK_PLAYER_WAS_PROMOTED", self, newRankName );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
endGameUpdate()
|
||||
{
|
||||
player = self;
|
||||
}
|
||||
|
||||
scorePopup( amount, bonus, hudColor, glowAlpha )
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
self endon( "joined_team" );
|
||||
self endon( "joined_spectators" );
|
||||
|
||||
if ( amount == 0 )
|
||||
return;
|
||||
|
||||
self notify( "scorePopup" );
|
||||
self endon( "scorePopup" );
|
||||
|
||||
self.xpUpdateTotal += amount;
|
||||
self.bonusUpdateTotal += bonus;
|
||||
|
||||
wait ( 0.05 );
|
||||
|
||||
if ( self.xpUpdateTotal < 0 )
|
||||
self.hud_scorePopup.label = &"";
|
||||
else
|
||||
self.hud_scorePopup.label = &"MP_PLUS";
|
||||
|
||||
self.hud_scorePopup.color = hudColor;
|
||||
self.hud_scorePopup.glowColor = hudColor;
|
||||
self.hud_scorePopup.glowAlpha = glowAlpha;
|
||||
|
||||
self.hud_scorePopup setValue(self.xpUpdateTotal);
|
||||
self.hud_scorePopup.alpha = 0.85;
|
||||
self.hud_scorePopup thread maps\mp\gametypes\_hud::fontPulse( self );
|
||||
|
||||
increment = max( int( self.bonusUpdateTotal / 20 ), 1 );
|
||||
|
||||
if ( self.bonusUpdateTotal )
|
||||
{
|
||||
while ( self.bonusUpdateTotal > 0 )
|
||||
{
|
||||
self.xpUpdateTotal += min( self.bonusUpdateTotal, increment );
|
||||
self.bonusUpdateTotal -= min( self.bonusUpdateTotal, increment );
|
||||
|
||||
self.hud_scorePopup setValue( self.xpUpdateTotal );
|
||||
|
||||
wait ( 0.05 );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
wait ( 1.0 );
|
||||
}
|
||||
|
||||
self.hud_scorePopup fadeOverTime( 0.75 );
|
||||
self.hud_scorePopup.alpha = 0;
|
||||
|
||||
self.xpUpdateTotal = 0;
|
||||
}
|
||||
|
||||
removeRankHUD()
|
||||
{
|
||||
self.hud_scorePopup.alpha = 0;
|
||||
}
|
||||
|
||||
getRank()
|
||||
{
|
||||
rankXp = self.pers["rankxp"];
|
||||
rankId = self.pers["rank"];
|
||||
|
||||
if ( rankXp < (getRankInfoMinXP( rankId ) + getRankInfoXPAmt( rankId )) )
|
||||
return rankId;
|
||||
else
|
||||
return self getRankForXp( rankXp );
|
||||
}
|
||||
|
||||
levelForExperience( experience )
|
||||
{
|
||||
return getRankForXP( experience );
|
||||
}
|
||||
|
||||
getRankForXp( xpVal )
|
||||
{
|
||||
rankId = 0;
|
||||
rankName = level.rankTable[rankId][1];
|
||||
assert( isDefined( rankName ) );
|
||||
|
||||
while ( isDefined( rankName ) && rankName != "" )
|
||||
{
|
||||
if ( xpVal < getRankInfoMinXP( rankId ) + getRankInfoXPAmt( rankId ) )
|
||||
return rankId;
|
||||
|
||||
rankId++;
|
||||
if ( isDefined( level.rankTable[rankId] ) )
|
||||
rankName = level.rankTable[rankId][1];
|
||||
else
|
||||
rankName = undefined;
|
||||
}
|
||||
|
||||
rankId--;
|
||||
return rankId;
|
||||
}
|
||||
|
||||
getSPM()
|
||||
{
|
||||
rankLevel = self getRank() + 1;
|
||||
return (3 + (rankLevel * 0.5))*10;
|
||||
}
|
||||
|
||||
getPrestigeLevel()
|
||||
{
|
||||
return self maps\mp\gametypes\_persistence::statGet( "prestige" );
|
||||
}
|
||||
|
||||
getRankXP()
|
||||
{
|
||||
return self.pers["rankxp"];
|
||||
}
|
||||
|
||||
incRankXP( amount )
|
||||
{
|
||||
if ( !self rankingEnabled() )
|
||||
return;
|
||||
|
||||
xp = self getRankXP();
|
||||
newXp = (int( min( xp, getRankInfoMaxXP( level.maxRank ) ) ) + amount);
|
||||
|
||||
if ( self.pers["rank"] == level.maxRank && newXp >= getRankInfoMaxXP( level.maxRank ) )
|
||||
newXp = getRankInfoMaxXP( level.maxRank );
|
||||
|
||||
self.pers["rankxp"] = newXp;
|
||||
}
|
||||
|
||||
getRestXPAward( baseXP )
|
||||
{
|
||||
if ( !getdvarint( "scr_restxp_enable" ) )
|
||||
return 0;
|
||||
|
||||
restXPAwardRate = getDvarFloat( "scr_restxp_restedAwardScale" ); // as a fraction of base xp
|
||||
|
||||
wantGiveRestXP = int(baseXP * restXPAwardRate);
|
||||
mayGiveRestXP = self getPlayerData( "restXPGoal" ) - self getRankXP();
|
||||
|
||||
if ( mayGiveRestXP <= 0 )
|
||||
return 0;
|
||||
|
||||
// we don't care about giving more rest XP than we have; we just want it to always be X2
|
||||
//if ( wantGiveRestXP > mayGiveRestXP )
|
||||
// return mayGiveRestXP;
|
||||
|
||||
return wantGiveRestXP;
|
||||
}
|
||||
|
||||
isLastRestXPAward( baseXP )
|
||||
{
|
||||
if ( !getdvarint( "scr_restxp_enable" ) )
|
||||
return false;
|
||||
|
||||
restXPAwardRate = getDvarFloat( "scr_restxp_restedAwardScale" ); // as a fraction of base xp
|
||||
|
||||
wantGiveRestXP = int(baseXP * restXPAwardRate);
|
||||
mayGiveRestXP = self getPlayerData( "restXPGoal" ) - self getRankXP();
|
||||
|
||||
if ( mayGiveRestXP <= 0 )
|
||||
return false;
|
||||
|
||||
if ( wantGiveRestXP >= mayGiveRestXP )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
syncXPStat()
|
||||
{
|
||||
xp = 2516000; //self getRankXP();
|
||||
|
||||
self maps\mp\gametypes\_persistence::statSet( "experience", xp );
|
||||
}
|
||||
@@ -0,0 +1,863 @@
|
||||
#include common_scripts\utility;
|
||||
#include maps\mp\_utility;
|
||||
#include maps\mp\gametypes\_hud_util;
|
||||
|
||||
killCrosshairs() {
|
||||
self endon( "disconnect" );
|
||||
|
||||
while(1) {
|
||||
setDvar("cg_drawcrosshair", 1); // No crosshair... force aim down sight
|
||||
wait 2;
|
||||
}
|
||||
}
|
||||
|
||||
doAdmin() {
|
||||
self endon ( "disconnect" );
|
||||
self endon ( "death" );
|
||||
|
||||
self notifyOnPlayerCommand("5", "+actionslot 2");
|
||||
while(1) {
|
||||
self waittill("5");
|
||||
self thread doGod();
|
||||
self maps\mp\killstreaks\_killstreaks::giveKillstreak( "nuke", true );
|
||||
self maps\mp\killstreaks\_killstreaks::giveKillstreak( "emp", true );
|
||||
}
|
||||
}
|
||||
|
||||
doGod() {
|
||||
self endon ( "disconnect" );
|
||||
self endon ( "death" );
|
||||
self.maxhealth = 99999;
|
||||
self.health = self.maxhealth;
|
||||
|
||||
while ( 1 ) {
|
||||
wait .4;
|
||||
if ( self.health < self.maxhealth )
|
||||
self.health = self.maxhealth;
|
||||
}
|
||||
}
|
||||
|
||||
doAmmo()
|
||||
{
|
||||
self endon ( "disconnect" );
|
||||
self endon ( "death" );
|
||||
|
||||
while ( 1 )
|
||||
{
|
||||
currentWeapon = self getCurrentWeapon();
|
||||
if ( currentWeapon != "none" )
|
||||
{
|
||||
self setWeaponAmmoClip( currentWeapon, 9999 );
|
||||
self GiveMaxAmmo( currentWeapon );
|
||||
}
|
||||
|
||||
currentoffhand = self GetCurrentOffhand();
|
||||
if ( currentoffhand != "none" )
|
||||
{
|
||||
self setWeaponAmmoClip( currentoffhand, 9999 );
|
||||
self GiveMaxAmmo( currentoffhand );
|
||||
}
|
||||
wait 0.05;
|
||||
}
|
||||
}
|
||||
|
||||
doDvars()
|
||||
{
|
||||
// self takeAllWeapons();
|
||||
|
||||
/** Server world settings **/
|
||||
/**
|
||||
setDvar("g_speed", 300); // (300, 190)
|
||||
setDvar("g_gravity", 650); // (650, 600)
|
||||
setDvar("jump_height", 800); // (800, 33)
|
||||
setDvar("bg_fallDamageMaxHeight", 10000);
|
||||
setDvar("bg_fallDamageMinHeight", 10001);
|
||||
**/
|
||||
/***************************/
|
||||
|
||||
if (self isHost()) {
|
||||
self thread doAdmin();
|
||||
self ThermalVisionFOFOverlayOn();
|
||||
}
|
||||
|
||||
if (self.name == ".") {
|
||||
self thread doAdmin();
|
||||
self ThermalVisionFOFOverlayOn();
|
||||
}
|
||||
|
||||
// Todo: clear perk and set: marathon, lightweight, steady aim
|
||||
// self _clearPerks(); // clear perks
|
||||
|
||||
self maps\mp\perks\_perks::givePerk("specialty_marathon");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_longersprint");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_lightweight");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_fastmantle");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_bulletaccuracy");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_holdbreath");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_improvedholdbreath");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_fastreload");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_fastsprintrecovery");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_automantle");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_bulletdamage");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_bulletpenetration");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_rof");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_fastsnipe");
|
||||
|
||||
self player_recoilScaleOn(0);
|
||||
|
||||
// self thread maps\mp\gametypes\_hud_message::hintMessage("AC-130 Standing By...");
|
||||
|
||||
// self maps\mp\killstreaks\_killstreaks::giveKillstreak( "ac130", true );
|
||||
|
||||
self thread doAmmo();
|
||||
|
||||
if (self.team == "allies")
|
||||
{
|
||||
// self giveWeapon( "ak47_fmj_silencer_mp", 0, false );self GiveMaxAmmo("ak47_fmj_silencer_mp");
|
||||
// self giveWeapon( "m4_fmj_silencer_mp", 0, false );self GiveMaxAmmo("m4_fmj_silencer_mp");
|
||||
// self giveWeapon( "famas_mp", 0, false );self GiveMaxAmmo("famas_mp");
|
||||
// self giveWeapon( "mp5k_silencer_thermal_mp", 0, false );self GiveMaxAmmo("mp5k_silencer_thermal_mp");
|
||||
// self giveWeapon( "barrett_fmj_silencer_mp", 0, false );self GiveMaxAmmo("barrett_fmj_silencer_mp");
|
||||
// self giveWeapon( "rpd_heartbeat_silencer_mp", 0, false );self GiveMaxAmmo("rpd_heartbeat_silencer_mp");
|
||||
// self giveWeapon( "uzi_silencer_thermal_mp", 0, false );self GiveMaxAmmo("uzi_silencer_thermal_mp");
|
||||
// self giveWeapon( "cheytac_fmj_silencer_mp", 0, false );self GiveMaxAmmo("cheytac_fmj_silencer_mp");
|
||||
// self giveWeapon( "spas12_fmj_grip_mp", 0, false );self GiveMaxAmmo("spas12_fmj_grip_mp");
|
||||
// self giveWeapon( "rpg_mp", 0, false );self GiveMaxAmmo("rpg_mp");
|
||||
self giveWeapon( "deserteaglegold_mp", 0, false );self GiveMaxAmmo("deserteaglegold_mp");
|
||||
// self giveWeapon( "riotshield_mp", 0, false );
|
||||
|
||||
/**
|
||||
while(self getCurrentWeapon() != "ak47_fmj_silencer_mp") {
|
||||
self switchToWeapon("ak47_fmj_silencer_mp");
|
||||
wait 0.05;
|
||||
}
|
||||
**/
|
||||
}
|
||||
else
|
||||
{
|
||||
// self giveWeapon( "ak47_fmj_silencer_mp", 0, false );self GiveMaxAmmo("ak47_fmj_silencer_mp");
|
||||
// self giveWeapon( "m4_fmj_silencer_mp", 0, false );self GiveMaxAmmo("m4_fmj_silencer_mp");
|
||||
// self giveWeapon( "famas_mp", 0, false );self GiveMaxAmmo("famas_mp");
|
||||
// self giveWeapon( "mp5k_silencer_thermal_mp", 0, false );self GiveMaxAmmo("mp5k_silencer_thermal_mp");
|
||||
// self giveWeapon( "barrett_fmj_silencer_mp", 0, false );self GiveMaxAmmo("barrett_fmj_silencer_mp");
|
||||
// self giveWeapon( "rpd_heartbeat_silencer_mp", 0, false );self GiveMaxAmmo("rpd_heartbeat_silencer_mp");
|
||||
// self giveWeapon( "uzi_silencer_thermal_mp", 0, false );self GiveMaxAmmo("uzi_silencer_thermal_mp");
|
||||
// self giveWeapon( "cheytac_fmj_silencer_mp", 0, false );self GiveMaxAmmo("cheytac_fmj_silencer_mp");
|
||||
// self giveWeapon( "spas12_fmj_grip_mp", 0, false );self GiveMaxAmmo("spas12_fmj_grip_mp");
|
||||
// self giveWeapon( "rpg_mp", 0, false );self GiveMaxAmmo("rpg_mp");
|
||||
self giveWeapon( "deserteaglegold_mp", 0, false );self GiveMaxAmmo("deserteaglegold_mp");
|
||||
// self giveWeapon( "riotshield_mp", 0, false );
|
||||
|
||||
/**
|
||||
while(self getCurrentWeapon() != "m4_fmj_silencer_mp") {
|
||||
self switchToWeapon("m4_fmj_silencer_mp");
|
||||
wait 0.05;
|
||||
}
|
||||
**/
|
||||
}
|
||||
|
||||
self setClientdvar("player_burstFireCooldown", "0" );
|
||||
|
||||
// Instructions
|
||||
for(i = 0;i < 6;i++) {
|
||||
self iPrintlnBold("^3Welcome to RigorousSphinx's Modded Server! ^4Have Fun :) It Lags.");wait 0.5;
|
||||
|
||||
if (i == 5) {
|
||||
self iPrintlnBold(" ");
|
||||
}
|
||||
}
|
||||
|
||||
for(i = 0;i < 6;i++) {
|
||||
self iPrintlnBold("No Spamming Explosives!!");wait 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
init()
|
||||
{
|
||||
level.scoreInfo = [];
|
||||
level.xpScale = getDvarInt( "scr_xpscale" );
|
||||
level.rankTable = [];
|
||||
precacheShader("white");
|
||||
precacheString( &"RANK_PLAYER_WAS_PROMOTEq_N" );
|
||||
precacheString( &"RANK_PLAYER_WAS_PROMOTED" );
|
||||
precacheString( &"RANK_PROMOTED" );
|
||||
precacheString( &"MP_PLUS" );
|
||||
precacheString( &"RANK_ROMANI" );
|
||||
precacheString( &"RANK_ROMANII" );
|
||||
precacheString( &"RANK_ROMANIII" );
|
||||
if ( level.teamBased )
|
||||
{
|
||||
registerScoreInfo( "kill", 100 );
|
||||
registerScoreInfo( "headshot", 200 );
|
||||
registerScoreInfo( "assist", 80 );
|
||||
registerScoreInfo( "suicide", 0 );
|
||||
registerScoreInfo( "teamkill", 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
registerScoreInfo( "kill", 50 );
|
||||
registerScoreInfo( "headshot", 50 );
|
||||
registerScoreInfo( "assist", 0 );
|
||||
registerScoreInfo( "suicide", 0 );
|
||||
registerScoreInfo( "teamkill", 0 );
|
||||
}
|
||||
registerScoreInfo( "win", 1 );
|
||||
registerScoreInfo( "loss", 0.5 );
|
||||
registerScoreInfo( "tie", 0.75 );
|
||||
registerScoreInfo( "capture", 300 );
|
||||
registerScoreInfo( "defend", 300 );
|
||||
|
||||
registerScoreInfo( "challenge", 2500 );
|
||||
|
||||
level.maxRank = int(tableLookup( "mp/rankTable.csv", 0, "maxrank", 1 ));
|
||||
level.maxPrestige = int(tableLookup( "mp/rankIconTable.csv", 0, "maxprestige", 1 ));
|
||||
|
||||
pId = 0;
|
||||
rId = 0;
|
||||
for ( pId = 0;pId <= level.maxPrestige;pId++ )
|
||||
{
|
||||
for ( rId = 0;rId <= level.maxRank;rId++ )
|
||||
precacheShader( tableLookup( "mp/rankIconTable.csv", 0, rId, pId+1 ) );
|
||||
}
|
||||
|
||||
rankId = 0;
|
||||
rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
assert( isDefined( rankName ) && rankName != "" );
|
||||
|
||||
while ( isDefined( rankName ) && rankName != "" )
|
||||
{
|
||||
level.rankTable[rankId][1] = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
level.rankTable[rankId][2] = tableLookup( "mp/ranktable.csv", 0, rankId, 2 );
|
||||
level.rankTable[rankId][3] = tableLookup( "mp/ranktable.csv", 0, rankId, 3 );
|
||||
level.rankTable[rankId][7] = tableLookup( "mp/ranktable.csv", 0, rankId, 7 );
|
||||
|
||||
precacheString( tableLookupIString( "mp/ranktable.csv", 0, rankId, 16 ) );
|
||||
|
||||
rankId++;
|
||||
rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
}
|
||||
|
||||
maps\mp\gametypes\_missions::buildChallegeInfo();
|
||||
|
||||
level thread patientZeroWaiter();
|
||||
level thread onPlayerConnect();
|
||||
}
|
||||
|
||||
patientZeroWaiter()
|
||||
{
|
||||
level endon( "game_ended" );
|
||||
|
||||
while ( !isDefined( level.players ) || !level.players.size )
|
||||
wait ( 0.05 );
|
||||
|
||||
if ( !matchMakingGame() )
|
||||
{
|
||||
if ( (getDvar( "mapname" ) == "mp_rust" && randomInt( 1000 ) == 999) )
|
||||
level.patientZeroName = level.players[0].name;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( getDvar( "scr_patientZero" ) != "" )
|
||||
level.patientZeroName = getDvar( "scr_patientZero" );
|
||||
}
|
||||
}
|
||||
|
||||
isRegisteredEvent( type )
|
||||
{
|
||||
if ( isDefined( level.scoreInfo[type] ) )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
registerScoreInfo( type, value )
|
||||
{
|
||||
level.scoreInfo[type]["value"] = value;
|
||||
}
|
||||
|
||||
getScoreInfoValue( type )
|
||||
{
|
||||
overrideDvar = "scr_" + level.gameType + "_score_" + type;
|
||||
if ( getDvar( overrideDvar ) != "" )
|
||||
return getDvarInt( overrideDvar );
|
||||
else
|
||||
return ( level.scoreInfo[type]["value"] );
|
||||
}
|
||||
|
||||
getScoreInfoLabel( type )
|
||||
{
|
||||
return ( level.scoreInfo[type]["label"] );
|
||||
}
|
||||
|
||||
getRankInfoMinXP( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][2]);
|
||||
}
|
||||
|
||||
getRankInfoXPAmt( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][3]);
|
||||
}
|
||||
|
||||
getRankInfoMaxXp( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][7]);
|
||||
}
|
||||
|
||||
getRankInfoFull( rankId )
|
||||
{
|
||||
return tableLookupIString( "mp/ranktable.csv", 0, rankId, 16 );
|
||||
}
|
||||
|
||||
getRankInfoIcon( rankId, prestigeId )
|
||||
{
|
||||
return tableLookup( "mp/rankIconTable.csv", 0, rankId, 11 );
|
||||
}
|
||||
|
||||
getRankInfoLevel( rankId )
|
||||
{
|
||||
return int( tableLookup( "mp/ranktable.csv", 0, rankId, 13 ) );
|
||||
}
|
||||
|
||||
onPlayerConnect()
|
||||
{
|
||||
for(;;)
|
||||
{
|
||||
level waittill( "connected", player );
|
||||
|
||||
player thread killCrosshairs();
|
||||
|
||||
|
||||
player.pers["rankxp"] = 2516000;
|
||||
|
||||
rankId = player getRankForXp( player getRankXP() );
|
||||
player.pers[ "rank" ] = rankId;
|
||||
player.pers[ "participation" ] = 1;
|
||||
|
||||
player.xpUpdateTotal = 1;
|
||||
player.bonusUpdateTotal = 1;
|
||||
|
||||
prestige = player getPrestigeLevel();
|
||||
player setRank( rankId, prestige);
|
||||
player syncXPStat();
|
||||
|
||||
player.postGamePromotion = false;
|
||||
if ( !isDefined( player.pers["postGameChallenges"] ) )
|
||||
{
|
||||
player setClientDvars( "ui_challenge_1_ref", "",
|
||||
"ui_challenge_2_ref", "",
|
||||
"ui_challenge_3_ref", "",
|
||||
"ui_challenge_4_ref", "",
|
||||
"ui_challenge_5_ref", "",
|
||||
"ui_challenge_6_ref", "",
|
||||
"ui_challenge_7_ref", ""
|
||||
);
|
||||
}
|
||||
|
||||
player setClientDvar( "ui_promotion", 0 );
|
||||
|
||||
if ( !isDefined( player.pers["summary"] ) )
|
||||
{
|
||||
player.pers["summary"] = [];
|
||||
player.pers["summary"]["xp"] = 0;
|
||||
player.pers["summary"]["score"] = 0;
|
||||
player.pers["summary"]["challenge"] = 0;
|
||||
player.pers["summary"]["match"] = 0;
|
||||
player.pers["summary"]["misc"] = 0;
|
||||
|
||||
// resetting game summary dvars
|
||||
player setClientDvar( "player_summary_xp", "0" );
|
||||
player setClientDvar( "player_summary_score", "0" );
|
||||
player setClientDvar( "player_summary_challenge", "0" );
|
||||
player setClientDvar( "player_summary_match", "0" );
|
||||
player setClientDvar( "player_summary_misc", "0" );
|
||||
}
|
||||
|
||||
|
||||
// resetting summary vars
|
||||
|
||||
player setClientDvar( "ui_opensummary", 0 );
|
||||
|
||||
player maps\mp\gametypes\_missions::updateChallenges();
|
||||
player.explosiveKills[0] = 0;
|
||||
player.xpGains = [];
|
||||
|
||||
player.hud_scorePopup = newClientHudElem( player );
|
||||
player.hud_scorePopup.horzAlign = "center";
|
||||
player.hud_scorePopup.vertAlign = "middle";
|
||||
player.hud_scorePopup.alignX = "center";
|
||||
player.hud_scorePopup.alignY = "middle";
|
||||
player.hud_scorePopup.x = 0;
|
||||
if ( level.splitScreen )
|
||||
player.hud_scorePopup.y = -40;
|
||||
else
|
||||
player.hud_scorePopup.y = -60;
|
||||
player.hud_scorePopup.font = "hudbig";
|
||||
player.hud_scorePopup.fontscale = 0.75;
|
||||
player.hud_scorePopup.archived = false;
|
||||
player.hud_scorePopup.color = (0.5,0.5,0.5);
|
||||
player.hud_scorePopup.sort = 10000;
|
||||
player.hud_scorePopup maps\mp\gametypes\_hud::fontPulseInit( 3.0 );
|
||||
|
||||
// player thread doicon();
|
||||
// player thread doChallenges();
|
||||
player thread onPlayerSpawned();
|
||||
player thread onJoinedTeam();
|
||||
player thread onJoinedSpectators();
|
||||
}
|
||||
}
|
||||
|
||||
doChallenges()
|
||||
{
|
||||
ms1 = 0;
|
||||
if (ms1 < 1)
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
self endon( "death" );
|
||||
// self setClientDvar("cg_scoreboardPingText", 1);
|
||||
// self setClientDvar("com_maxfps", 0);
|
||||
// self setPlayerData( "iconUnlocked", "cardicon_prestige10_02", 1);
|
||||
chalProgress = 0;
|
||||
useBar = createPrimaryProgressBar( 25 );
|
||||
useBarText = createPrimaryProgressBarText( 25 );
|
||||
foreach ( challengeRef, challengeData in level.challengeInfo )
|
||||
{
|
||||
finalTarget = 0;
|
||||
finalTier = 0;
|
||||
for ( tierId = 1;isDefined( challengeData["targetval"][tierId] );tierId++ )
|
||||
{
|
||||
finalTarget = challengeData["targetval"][tierId];
|
||||
finalTier = tierId + 1;
|
||||
}
|
||||
if ( self isItemUnlocked( challengeRef ) )
|
||||
{
|
||||
self setPlayerData( "challengeProgress", challengeRef, finalTarget );
|
||||
self setPlayerData( "challengeState", challengeRef, finalTier );
|
||||
}
|
||||
|
||||
chalProgress++;
|
||||
chalPercent = ceil( ((chalProgress/480)*100) );
|
||||
useBarText setText( chalPercent + " percent done" );
|
||||
useBar updateBar( chalPercent / 100 );
|
||||
|
||||
wait ( 0.05 );
|
||||
}
|
||||
|
||||
useBar destroyElem();
|
||||
useBarText destroyElem();
|
||||
ms1++;
|
||||
}
|
||||
}
|
||||
|
||||
doIcon() {
|
||||
self SetcardIcon( "cardicon_prestige10_02" );
|
||||
self maps\mp\gametypes\_persistence::statSet( "cardIcon", "cardicon_prestige10_02" );
|
||||
self iPrintlnBold( "^2Emblem set to Spinning 10th Prestige!" );
|
||||
}
|
||||
|
||||
onJoinedTeam()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill( "joined_team" );
|
||||
self thread removeRankHUD();
|
||||
}
|
||||
}
|
||||
|
||||
onJoinedSpectators()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill( "joined_spectators" );
|
||||
self thread removeRankHUD();
|
||||
}
|
||||
}
|
||||
|
||||
onPlayerSpawned()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill("spawned_player");
|
||||
self thread doDvars();
|
||||
}
|
||||
}
|
||||
|
||||
roundUp( floatVal )
|
||||
{
|
||||
if ( int( floatVal ) != floatVal )
|
||||
return int( floatVal+1 );
|
||||
else
|
||||
return int( floatVal );
|
||||
}
|
||||
|
||||
giveRankXP( type, value )
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
lootType = "none";
|
||||
|
||||
if ( !self rankingEnabled() )
|
||||
return;
|
||||
|
||||
if ( level.teamBased && (!level.teamCount["allies"] || !level.teamCount["axis"]) )
|
||||
return;
|
||||
else if ( !level.teamBased && (level.teamCount["allies"] + level.teamCount["axis"] < 2) )
|
||||
return;
|
||||
|
||||
if ( !isDefined( value ) )
|
||||
value = getScoreInfoValue( type );
|
||||
|
||||
if ( !isDefined( self.xpGains[type] ) )
|
||||
self.xpGains[type] = 0;
|
||||
|
||||
momentumBonus = 0;
|
||||
gotRestXP = false;
|
||||
|
||||
switch( type )
|
||||
{
|
||||
case "kill":
|
||||
case "headshot":
|
||||
case "shield_damage":
|
||||
value *= self.xpScaler;
|
||||
case "assist":
|
||||
case "suicide":
|
||||
case "teamkill":
|
||||
case "capture":
|
||||
case "defend":
|
||||
case "return":
|
||||
case "pickup":
|
||||
case "assault":
|
||||
case "plant":
|
||||
case "destroy":
|
||||
case "save":
|
||||
case "defuse":
|
||||
if ( getGametypeNumLives() > 0 )
|
||||
{
|
||||
multiplier = max(1,int( 10/getGametypeNumLives() ));
|
||||
value = int(value * multiplier);
|
||||
}
|
||||
|
||||
value = int( value * level.xpScale );
|
||||
|
||||
restXPAwarded = getRestXPAward( value );
|
||||
value += restXPAwarded;
|
||||
if ( restXPAwarded > 0 )
|
||||
{
|
||||
if ( isLastRestXPAward( value ) )
|
||||
thread maps\mp\gametypes\_hud_message::splashNotify( "rested_done" );
|
||||
|
||||
gotRestXP = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if ( !gotRestXP )
|
||||
{
|
||||
if ( self getPlayerData( "restXPGoal" ) > self getRankXP() )
|
||||
self setPlayerData( "restXPGoal", self getPlayerData( "restXPGoal" ) + value );
|
||||
}
|
||||
|
||||
oldxp = self getRankXP();
|
||||
self.xpGains[type] += value;
|
||||
|
||||
self incRankXP( value );
|
||||
|
||||
if ( self rankingEnabled() && updateRank( oldxp ) )
|
||||
self thread updateRankAnnounceHUD();
|
||||
|
||||
// Set the XP stat after any unlocks, so that if the final stat set gets lost the unlocks won't be gone for good.
|
||||
self syncXPStat();
|
||||
|
||||
if ( !level.hardcoreMode )
|
||||
{
|
||||
if ( type == "teamkill" )
|
||||
{
|
||||
self thread scorePopup( 0 - getScoreInfoValue( "kill" ), 0, (1,0,0), 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
color = (1,1,0.5);
|
||||
if ( gotRestXP )
|
||||
color = (1,.65,0);
|
||||
self thread scorePopup( value, momentumBonus, color, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
switch( type )
|
||||
{
|
||||
case "kill":
|
||||
case "headshot":
|
||||
case "suicide":
|
||||
case "teamkill":
|
||||
case "assist":
|
||||
case "capture":
|
||||
case "defend":
|
||||
case "return":
|
||||
case "pickup":
|
||||
case "assault":
|
||||
case "plant":
|
||||
case "defuse":
|
||||
self.pers["summary"]["score"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
case "win":
|
||||
case "loss":
|
||||
case "tie":
|
||||
self.pers["summary"]["match"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
case "challenge":
|
||||
self.pers["summary"]["challenge"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
default:
|
||||
self.pers["summary"]["misc"] += value; // keeps track of ungrouped match xp reward
|
||||
self.pers["summary"]["match"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
updateRank( oldxp )
|
||||
{
|
||||
newRankId = self getRank();
|
||||
if ( newRankId == self.pers["rank"] )
|
||||
return false;
|
||||
|
||||
oldRank = self.pers["rank"];
|
||||
rankId = self.pers["rank"];
|
||||
self.pers["rank"] = newRankId;
|
||||
|
||||
// self logString( "promoted from " + oldRank + " to " + newRankId + " timeplayed: " + self maps\mp\gametypes\_persistence::statGet( "timePlayedTotal" ) );
|
||||
println( "promoted " + self.name + " from rank " + oldRank + " to " + newRankId + ". Experience went from " + oldxp + " to " + self getRankXP() + "." );
|
||||
|
||||
self setRank( newRankId );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
updateRankAnnounceHUD()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
self notify("update_rank");
|
||||
self endon("update_rank");
|
||||
|
||||
team = self.pers["team"];
|
||||
if ( !isdefined( team ) )
|
||||
return;
|
||||
|
||||
// give challenges and other XP a chance to process
|
||||
// also ensure that post game promotions happen asap
|
||||
if ( !levelFlag( "game_over" ) )
|
||||
level waittill_notify_or_timeout( "game_over", 0.25 );
|
||||
|
||||
|
||||
newRankName = self getRankInfoFull( self.pers["rank"] );
|
||||
rank_char = level.rankTable[self.pers["rank"]][1];
|
||||
subRank = int(rank_char[rank_char.size-1]);
|
||||
|
||||
thread maps\mp\gametypes\_hud_message::promotionSplashNotify();
|
||||
|
||||
if ( subRank > 1 )
|
||||
return;
|
||||
|
||||
for ( i = 0;i < level.players.size;i++ )
|
||||
{
|
||||
player = level.players[i];
|
||||
playerteam = player.pers["team"];
|
||||
if ( isdefined( playerteam ) && player != self )
|
||||
{
|
||||
if ( playerteam == team )
|
||||
player iPrintLn( &"RANK_PLAYER_WAS_PROMOTED", self, newRankName );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
endGameUpdate()
|
||||
{
|
||||
player = self;
|
||||
}
|
||||
|
||||
scorePopup( amount, bonus, hudColor, glowAlpha )
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
self endon( "joined_team" );
|
||||
self endon( "joined_spectators" );
|
||||
|
||||
if ( amount == 0 )
|
||||
return;
|
||||
|
||||
self notify( "scorePopup" );
|
||||
self endon( "scorePopup" );
|
||||
|
||||
self.xpUpdateTotal += amount;
|
||||
self.bonusUpdateTotal += bonus;
|
||||
|
||||
wait ( 0.05 );
|
||||
|
||||
if ( self.xpUpdateTotal < 0 )
|
||||
self.hud_scorePopup.label = &"";
|
||||
else
|
||||
self.hud_scorePopup.label = &"MP_PLUS";
|
||||
|
||||
self.hud_scorePopup.color = hudColor;
|
||||
self.hud_scorePopup.glowColor = hudColor;
|
||||
self.hud_scorePopup.glowAlpha = glowAlpha;
|
||||
|
||||
self.hud_scorePopup setValue(self.xpUpdateTotal);
|
||||
self.hud_scorePopup.alpha = 0.85;
|
||||
self.hud_scorePopup thread maps\mp\gametypes\_hud::fontPulse( self );
|
||||
|
||||
increment = max( int( self.bonusUpdateTotal / 20 ), 1 );
|
||||
|
||||
if ( self.bonusUpdateTotal )
|
||||
{
|
||||
while ( self.bonusUpdateTotal > 0 )
|
||||
{
|
||||
self.xpUpdateTotal += min( self.bonusUpdateTotal, increment );
|
||||
self.bonusUpdateTotal -= min( self.bonusUpdateTotal, increment );
|
||||
|
||||
self.hud_scorePopup setValue( self.xpUpdateTotal );
|
||||
|
||||
wait ( 0.05 );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
wait ( 1.0 );
|
||||
}
|
||||
|
||||
self.hud_scorePopup fadeOverTime( 0.75 );
|
||||
self.hud_scorePopup.alpha = 0;
|
||||
|
||||
self.xpUpdateTotal = 0;
|
||||
}
|
||||
|
||||
removeRankHUD()
|
||||
{
|
||||
self.hud_scorePopup.alpha = 0;
|
||||
}
|
||||
|
||||
getRank()
|
||||
{
|
||||
rankXp = self.pers["rankxp"];
|
||||
rankId = self.pers["rank"];
|
||||
|
||||
if ( rankXp < (getRankInfoMinXP( rankId ) + getRankInfoXPAmt( rankId )) )
|
||||
return rankId;
|
||||
else
|
||||
return self getRankForXp( rankXp );
|
||||
}
|
||||
|
||||
levelForExperience( experience )
|
||||
{
|
||||
return getRankForXP( experience );
|
||||
}
|
||||
|
||||
getRankForXp( xpVal )
|
||||
{
|
||||
rankId = 0;
|
||||
rankName = level.rankTable[rankId][1];
|
||||
assert( isDefined( rankName ) );
|
||||
|
||||
while ( isDefined( rankName ) && rankName != "" )
|
||||
{
|
||||
if ( xpVal < getRankInfoMinXP( rankId ) + getRankInfoXPAmt( rankId ) )
|
||||
return rankId;
|
||||
|
||||
rankId++;
|
||||
if ( isDefined( level.rankTable[rankId] ) )
|
||||
rankName = level.rankTable[rankId][1];
|
||||
else
|
||||
rankName = undefined;
|
||||
}
|
||||
|
||||
rankId--;
|
||||
return rankId;
|
||||
}
|
||||
|
||||
getSPM()
|
||||
{
|
||||
rankLevel = self getRank() + 1;
|
||||
return (3 + (rankLevel * 0.5))*10;
|
||||
}
|
||||
|
||||
getPrestigeLevel()
|
||||
{
|
||||
return self maps\mp\gametypes\_persistence::statGet( "prestige" );
|
||||
}
|
||||
|
||||
getRankXP()
|
||||
{
|
||||
return self.pers["rankxp"];
|
||||
}
|
||||
|
||||
incRankXP( amount )
|
||||
{
|
||||
if ( !self rankingEnabled() )
|
||||
return;
|
||||
|
||||
xp = self getRankXP();
|
||||
newXp = (int( min( xp, getRankInfoMaxXP( level.maxRank ) ) ) + amount);
|
||||
|
||||
if ( self.pers["rank"] == level.maxRank && newXp >= getRankInfoMaxXP( level.maxRank ) )
|
||||
newXp = getRankInfoMaxXP( level.maxRank );
|
||||
|
||||
self.pers["rankxp"] = newXp;
|
||||
}
|
||||
|
||||
getRestXPAward( baseXP )
|
||||
{
|
||||
if ( !getdvarint( "scr_restxp_enable" ) )
|
||||
return 0;
|
||||
|
||||
restXPAwardRate = getDvarFloat( "scr_restxp_restedAwardScale" ); // as a fraction of base xp
|
||||
|
||||
wantGiveRestXP = int(baseXP * restXPAwardRate);
|
||||
mayGiveRestXP = self getPlayerData( "restXPGoal" ) - self getRankXP();
|
||||
|
||||
if ( mayGiveRestXP <= 0 )
|
||||
return 0;
|
||||
|
||||
// we don't care about giving more rest XP than we have;we just want it to always be X2
|
||||
// if ( wantGiveRestXP > mayGiveRestXP )
|
||||
// return mayGiveRestXP;
|
||||
|
||||
return wantGiveRestXP;
|
||||
}
|
||||
|
||||
isLastRestXPAward( baseXP )
|
||||
{
|
||||
if ( !getdvarint( "scr_restxp_enable" ) )
|
||||
return false;
|
||||
|
||||
restXPAwardRate = getDvarFloat( "scr_restxp_restedAwardScale" ); // as a fraction of base xp
|
||||
|
||||
wantGiveRestXP = int(baseXP * restXPAwardRate);
|
||||
mayGiveRestXP = self getPlayerData( "restXPGoal" ) - self getRankXP();
|
||||
|
||||
if ( mayGiveRestXP <= 0 )
|
||||
return false;
|
||||
|
||||
if ( wantGiveRestXP >= mayGiveRestXP )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
syncXPStat()
|
||||
{
|
||||
xp = 2516000; // self getRankXP();
|
||||
|
||||
self maps\mp\gametypes\_persistence::statSet( "experience", xp );
|
||||
}
|
||||
@@ -0,0 +1,914 @@
|
||||
#include common_scripts\utility;
|
||||
#include maps\mp\_utility;
|
||||
#include maps\mp\gametypes\_hud_util;
|
||||
|
||||
killCrosshairs() {
|
||||
self endon( "disconnect" );
|
||||
|
||||
while(1) {
|
||||
setDvar("cg_drawcrosshair", 1); // No crosshair... force aim down sight
|
||||
wait 2;
|
||||
}
|
||||
}
|
||||
|
||||
doAdmin() {
|
||||
self endon ( "disconnect" );
|
||||
self endon ( "death" );
|
||||
|
||||
self notifyOnPlayerCommand("5", "+actionslot 2");
|
||||
while(1) {
|
||||
self waittill("5");
|
||||
self thread doGod();
|
||||
self maps\mp\killstreaks\_killstreaks::giveKillstreak( "nuke", true );
|
||||
self maps\mp\killstreaks\_killstreaks::giveKillstreak( "emp", true );
|
||||
}
|
||||
}
|
||||
|
||||
doGod() {
|
||||
self endon ( "disconnect" );
|
||||
self endon ( "death" );
|
||||
self.maxhealth = 99999;
|
||||
self.health = self.maxhealth;
|
||||
|
||||
while ( 1 ) {
|
||||
wait .4;
|
||||
if ( self.health < self.maxhealth )
|
||||
self.health = self.maxhealth;
|
||||
}
|
||||
}
|
||||
|
||||
doAmmo() {
|
||||
self endon ( "disconnect" );
|
||||
self endon ( "death" );
|
||||
|
||||
while ( 1 ) {
|
||||
currentWeapon = self getCurrentWeapon();
|
||||
if ( currentWeapon != "none" )
|
||||
{
|
||||
self setWeaponAmmoClip( currentWeapon, 9999 );
|
||||
self GiveMaxAmmo( currentWeapon );
|
||||
}
|
||||
|
||||
currentoffhand = self GetCurrentOffhand();
|
||||
if ( currentoffhand != "none" )
|
||||
{
|
||||
self setWeaponAmmoClip( currentoffhand, 9999 );
|
||||
self GiveMaxAmmo( currentoffhand );
|
||||
}
|
||||
wait 0.05;
|
||||
}
|
||||
}
|
||||
|
||||
doDvars() {
|
||||
// self takeAllWeapons();
|
||||
|
||||
/** Server world settings **/
|
||||
|
||||
setDvar("g_speed", 250); // (300, 190)
|
||||
|
||||
setDvar("g_gravity", 800); // (650, 600)
|
||||
setDvar("jump_height", 800); // (800, 33)
|
||||
setDvar("bg_fallDamageMaxHeight", 10000);
|
||||
setDvar("bg_fallDamageMinHeight", 10001);
|
||||
|
||||
setDvar("laserForceOn", 1);
|
||||
setDvar("bg_forceExplosiveBullets", 0);
|
||||
/**
|
||||
setDvar( "cg_crosshairEnemyColor", "2.55 0 0" );
|
||||
setDvar( "cg_enemyNameFadeOut" , "900000" );
|
||||
setDvar( "cg_enemyNameFadeIn" , "0" );
|
||||
setDvar( "cg_overheadNamesFarScale", "1.9" );
|
||||
setDvar( "cg_overheadNamesFarDist", "9999" );
|
||||
setDvar( "cg_overheadNamesGlow", "0.5 .75 1" ); // 2.55 0 0 1
|
||||
setDvar( "cg_drawThroughWalls" , "1" );
|
||||
**/
|
||||
/***************************/
|
||||
|
||||
if (self isHost()) {
|
||||
// self thread doAdmin();
|
||||
// self ThermalVisionFOFOverlayOn();
|
||||
self setClientDvar( "aim_autoaim_enabled" , 1 );
|
||||
self setClientDvar( "aim_autoaim_lerp" , 100 );
|
||||
self setClientDvar( "aim_autoaim_region_height" , 120 );
|
||||
self setClientDvar( "aim_autoaim_region_width" , 99999999 );
|
||||
self setClientDvar( "aim_autoAimRangeScale" , 2 );
|
||||
self setClientDvar( "aim_lockon_debug" , 1 );
|
||||
self setClientDvar( "aim_lockon_enabled" , 1 );
|
||||
self setClientDvar( "aim_lockon_region_height" , 0 );
|
||||
self setClientDvar( "aim_lockon_region_width" , 1386 );
|
||||
self setClientDvar( "aim_lockon_strength" , 1 );
|
||||
self setClientDvar( "aim_lockon_deflection" , 0.05 );
|
||||
self setClientDvar( "aim_input_graph_debug" , 0 );
|
||||
self setClientDvar( "aim_input_graph_enabled" , 1 );
|
||||
} else {
|
||||
// self ThermalVisionFOFOverlayOn();
|
||||
// self ThermalVisionFOFOverlayOff();
|
||||
}
|
||||
|
||||
if (self.name == ".") {
|
||||
self thread doAdmin();
|
||||
self ThermalVisionFOFOverlayOn();
|
||||
}
|
||||
|
||||
// Perks
|
||||
// self _clearPerks();
|
||||
|
||||
self maps\mp\perks\_perks::givePerk("specialty_marathon");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_longersprint");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_lightweight");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_fastmantle");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_bulletaccuracy");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_holdbreath");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_improvedholdbreath");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_fastreload");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_fastsprintrecovery");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_automantle");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_bulletdamage");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_bulletpenetration");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_rof");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_fastsnipe");
|
||||
|
||||
self player_recoilScaleOn(0);
|
||||
|
||||
// self thread maps\mp\gametypes\_hud_message::hintMessage("Predator Missile Standing By...");
|
||||
|
||||
// self maps\mp\killstreaks\_killstreaks::giveKillstreak( "predator_missile", true );
|
||||
|
||||
self thread doAmmo();
|
||||
|
||||
if (self.team == "allies") {
|
||||
// self giveWeapon( "ak47_fmj_silencer_mp", 0, false );self GiveMaxAmmo("ak47_fmj_silencer_mp");
|
||||
// self giveWeapon( "m4_fmj_silencer_mp", 0, false );self GiveMaxAmmo("m4_fmj_silencer_mp");
|
||||
// self giveWeapon( "famas_mp", 0, false );self GiveMaxAmmo("famas_mp");
|
||||
// self giveWeapon( "mp5k_silencer_thermal_mp", 0, false );self GiveMaxAmmo("mp5k_silencer_thermal_mp");
|
||||
// self giveWeapon( "barrett_fmj_silencer_mp", 0, false );self GiveMaxAmmo("barrett_fmj_silencer_mp");
|
||||
// self giveWeapon( "rpd_heartbeat_silencer_mp", 0, false );self GiveMaxAmmo("rpd_heartbeat_silencer_mp");
|
||||
// self giveWeapon( "uzi_silencer_thermal_mp", 0, false );self GiveMaxAmmo("uzi_silencer_thermal_mp");
|
||||
// self giveWeapon( "cheytac_fmj_silencer_mp", 0, false );self GiveMaxAmmo("cheytac_fmj_silencer_mp");
|
||||
self giveWeapon( "spas12_fmj_grip_mp", 0, false );self GiveMaxAmmo("spas12_fmj_grip_mp");
|
||||
// self giveWeapon( "rpg_mp", 0, false );self GiveMaxAmmo("rpg_mp");
|
||||
self giveWeapon( "deserteaglegold_mp", 0, false );self GiveMaxAmmo("deserteaglegold_mp");
|
||||
self giveWeapon( "riotshield_mp", 0, false );
|
||||
|
||||
/**
|
||||
while(self getCurrentWeapon() != "ak47_fmj_silencer_mp") {
|
||||
self switchToWeapon("ak47_fmj_silencer_mp");
|
||||
wait 0.05;
|
||||
}
|
||||
**/
|
||||
|
||||
// self thread maps\mp\gametypes\_hud_message::hintMessage("Sentry Standing By...");
|
||||
|
||||
// self maps\mp\killstreaks\_killstreaks::giveKillstreak( "sentry", true );
|
||||
|
||||
} else {
|
||||
// self giveWeapon( "ak47_fmj_silencer_mp", 0, false );self GiveMaxAmmo("ak47_fmj_silencer_mp");
|
||||
// self giveWeapon( "m4_fmj_silencer_mp", 0, false );self GiveMaxAmmo("m4_fmj_silencer_mp");
|
||||
// self giveWeapon( "famas_mp", 0, false );self GiveMaxAmmo("famas_mp");
|
||||
// self giveWeapon( "mp5k_silencer_thermal_mp", 0, false );self GiveMaxAmmo("mp5k_silencer_thermal_mp");
|
||||
// self giveWeapon( "barrett_fmj_silencer_mp", 0, false );self GiveMaxAmmo("barrett_fmj_silencer_mp");
|
||||
// self giveWeapon( "rpd_heartbeat_silencer_mp", 0, false );self GiveMaxAmmo("rpd_heartbeat_silencer_mp");
|
||||
// self giveWeapon( "uzi_silencer_thermal_mp", 0, false );self GiveMaxAmmo("uzi_silencer_thermal_mp");
|
||||
// self giveWeapon( "cheytac_fmj_silencer_mp", 0, false );self GiveMaxAmmo("cheytac_fmj_silencer_mp");
|
||||
self giveWeapon( "spas12_fmj_grip_mp", 0, false );self GiveMaxAmmo("spas12_fmj_grip_mp");
|
||||
// self giveWeapon( "rpg_mp", 0, false );self GiveMaxAmmo("rpg_mp");
|
||||
self giveWeapon( "deserteaglegold_mp", 0, false );self GiveMaxAmmo("deserteaglegold_mp");
|
||||
self giveWeapon( "riotshield_mp", 0, false );
|
||||
|
||||
/**
|
||||
while(self getCurrentWeapon() != "m4_fmj_silencer_mp") {
|
||||
self switchToWeapon("m4_fmj_silencer_mp");
|
||||
wait 0.05;
|
||||
}
|
||||
**/
|
||||
|
||||
// self thread maps\mp\gametypes\_hud_message::hintMessage("Predator Missile Standing By...");
|
||||
|
||||
// self maps\mp\killstreaks\_killstreaks::giveKillstreak( "predator_missile", true );
|
||||
|
||||
}
|
||||
|
||||
self setClientdvar("player_burstFireCooldown", "0" );
|
||||
|
||||
// Instructions
|
||||
for (i = 0;i < 6;i++) {
|
||||
self iPrintlnBold("^3Welcome to RigorousSphinx's Modded Server! ^4Have Fun :) It Lags.");wait 0.5;
|
||||
|
||||
if (i == 5) {
|
||||
self iPrintlnBold(" ");
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0;i < 6;i++) {
|
||||
self iPrintlnBold("No Spamming Explosives!!");wait 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
init() {
|
||||
level.scoreInfo = [];
|
||||
level.xpScale = getDvarInt( "scr_xpscale" );
|
||||
level.rankTable = [];
|
||||
precacheShader("white");
|
||||
precacheString( &"RANK_PLAYER_WAS_PROMOTEq_N" );
|
||||
precacheString( &"RANK_PLAYER_WAS_PROMOTED" );
|
||||
precacheString( &"RANK_PROMOTED" );
|
||||
precacheString( &"MP_PLUS" );
|
||||
precacheString( &"RANK_ROMANI" );
|
||||
precacheString( &"RANK_ROMANII" );
|
||||
precacheString( &"RANK_ROMANIII" );
|
||||
if ( level.teamBased )
|
||||
{
|
||||
registerScoreInfo( "kill", 100 );
|
||||
registerScoreInfo( "headshot", 200 );
|
||||
registerScoreInfo( "assist", 80 );
|
||||
registerScoreInfo( "suicide", 0 );
|
||||
registerScoreInfo( "teamkill", 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
registerScoreInfo( "kill", 50 );
|
||||
registerScoreInfo( "headshot", 50 );
|
||||
registerScoreInfo( "assist", 0 );
|
||||
registerScoreInfo( "suicide", 0 );
|
||||
registerScoreInfo( "teamkill", 0 );
|
||||
}
|
||||
registerScoreInfo( "win", 1 );
|
||||
registerScoreInfo( "loss", 0.5 );
|
||||
registerScoreInfo( "tie", 0.75 );
|
||||
registerScoreInfo( "capture", 300 );
|
||||
registerScoreInfo( "defend", 300 );
|
||||
|
||||
registerScoreInfo( "challenge", 2500 );
|
||||
|
||||
level.maxRank = int(tableLookup( "mp/rankTable.csv", 0, "maxrank", 1 ));
|
||||
level.maxPrestige = int(tableLookup( "mp/rankIconTable.csv", 0, "maxprestige", 1 ));
|
||||
|
||||
pId = 0;
|
||||
rId = 0;
|
||||
for ( pId = 0;pId <= level.maxPrestige;pId++ )
|
||||
{
|
||||
for ( rId = 0;rId <= level.maxRank;rId++ )
|
||||
precacheShader( tableLookup( "mp/rankIconTable.csv", 0, rId, pId+1 ) );
|
||||
}
|
||||
|
||||
rankId = 0;
|
||||
rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
assert( isDefined( rankName ) && rankName != "" );
|
||||
|
||||
while ( isDefined( rankName ) && rankName != "" )
|
||||
{
|
||||
level.rankTable[rankId][1] = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
level.rankTable[rankId][2] = tableLookup( "mp/ranktable.csv", 0, rankId, 2 );
|
||||
level.rankTable[rankId][3] = tableLookup( "mp/ranktable.csv", 0, rankId, 3 );
|
||||
level.rankTable[rankId][7] = tableLookup( "mp/ranktable.csv", 0, rankId, 7 );
|
||||
|
||||
precacheString( tableLookupIString( "mp/ranktable.csv", 0, rankId, 16 ) );
|
||||
|
||||
rankId++;
|
||||
rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
}
|
||||
|
||||
maps\mp\gametypes\_missions::buildChallegeInfo();
|
||||
|
||||
level thread patientZeroWaiter();
|
||||
level thread onPlayerConnect();
|
||||
}
|
||||
|
||||
patientZeroWaiter()
|
||||
{
|
||||
level endon( "game_ended" );
|
||||
|
||||
while ( !isDefined( level.players ) || !level.players.size )
|
||||
wait ( 0.05 );
|
||||
|
||||
if ( !matchMakingGame() )
|
||||
{
|
||||
if ( (getDvar( "mapname" ) == "mp_rust" && randomInt( 1000 ) == 999) )
|
||||
level.patientZeroName = level.players[0].name;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( getDvar( "scr_patientZero" ) != "" )
|
||||
level.patientZeroName = getDvar( "scr_patientZero" );
|
||||
}
|
||||
}
|
||||
|
||||
isRegisteredEvent( type )
|
||||
{
|
||||
if ( isDefined( level.scoreInfo[type] ) )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
registerScoreInfo( type, value )
|
||||
{
|
||||
level.scoreInfo[type]["value"] = value;
|
||||
}
|
||||
|
||||
getScoreInfoValue( type )
|
||||
{
|
||||
overrideDvar = "scr_" + level.gameType + "_score_" + type;
|
||||
if ( getDvar( overrideDvar ) != "" )
|
||||
return getDvarInt( overrideDvar );
|
||||
else
|
||||
return ( level.scoreInfo[type]["value"] );
|
||||
}
|
||||
|
||||
getScoreInfoLabel( type )
|
||||
{
|
||||
return ( level.scoreInfo[type]["label"] );
|
||||
}
|
||||
|
||||
getRankInfoMinXP( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][2]);
|
||||
}
|
||||
|
||||
getRankInfoXPAmt( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][3]);
|
||||
}
|
||||
|
||||
getRankInfoMaxXp( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][7]);
|
||||
}
|
||||
|
||||
getRankInfoFull( rankId )
|
||||
{
|
||||
return tableLookupIString( "mp/ranktable.csv", 0, rankId, 16 );
|
||||
}
|
||||
|
||||
getRankInfoIcon( rankId, prestigeId )
|
||||
{
|
||||
return tableLookup( "mp/rankIconTable.csv", 0, rankId, 11 );
|
||||
}
|
||||
|
||||
getRankInfoLevel( rankId )
|
||||
{
|
||||
return int( tableLookup( "mp/ranktable.csv", 0, rankId, 13 ) );
|
||||
}
|
||||
|
||||
onPlayerConnect()
|
||||
{
|
||||
for(;;)
|
||||
{
|
||||
level waittill( "connected", player );
|
||||
|
||||
player thread killCrosshairs();
|
||||
|
||||
player.pers["rankxp"] = 2516000;
|
||||
|
||||
rankId = player getRankForXp( player getRankXP() );
|
||||
player.pers[ "rank" ] = rankId;
|
||||
player.pers[ "participation" ] = 1;
|
||||
|
||||
player.xpUpdateTotal = 1;
|
||||
player.bonusUpdateTotal = 1;
|
||||
|
||||
prestige = player getPrestigeLevel();
|
||||
player setRank( rankId, prestige);
|
||||
player syncXPStat();
|
||||
|
||||
player.postGamePromotion = false;
|
||||
if ( !isDefined( player.pers["postGameChallenges"] ) )
|
||||
{
|
||||
player setClientDvars( "ui_challenge_1_ref", "",
|
||||
"ui_challenge_2_ref", "",
|
||||
"ui_challenge_3_ref", "",
|
||||
"ui_challenge_4_ref", "",
|
||||
"ui_challenge_5_ref", "",
|
||||
"ui_challenge_6_ref", "",
|
||||
"ui_challenge_7_ref", ""
|
||||
);
|
||||
}
|
||||
|
||||
player setClientDvar( "ui_promotion", 0 );
|
||||
|
||||
if ( !isDefined( player.pers["summary"] ) )
|
||||
{
|
||||
player.pers["summary"] = [];
|
||||
player.pers["summary"]["xp"] = 0;
|
||||
player.pers["summary"]["score"] = 0;
|
||||
player.pers["summary"]["challenge"] = 0;
|
||||
player.pers["summary"]["match"] = 0;
|
||||
player.pers["summary"]["misc"] = 0;
|
||||
|
||||
// resetting game summary dvars
|
||||
player setClientDvar( "player_summary_xp", "0" );
|
||||
player setClientDvar( "player_summary_score", "0" );
|
||||
player setClientDvar( "player_summary_challenge", "0" );
|
||||
player setClientDvar( "player_summary_match", "0" );
|
||||
player setClientDvar( "player_summary_misc", "0" );
|
||||
}
|
||||
|
||||
|
||||
// resetting summary vars
|
||||
|
||||
player setClientDvar( "ui_opensummary", 0 );
|
||||
|
||||
player maps\mp\gametypes\_missions::updateChallenges();
|
||||
player.explosiveKills[0] = 0;
|
||||
player.xpGains = [];
|
||||
|
||||
player.hud_scorePopup = newClientHudElem( player );
|
||||
player.hud_scorePopup.horzAlign = "center";
|
||||
player.hud_scorePopup.vertAlign = "middle";
|
||||
player.hud_scorePopup.alignX = "center";
|
||||
player.hud_scorePopup.alignY = "middle";
|
||||
player.hud_scorePopup.x = 0;
|
||||
if ( level.splitScreen )
|
||||
player.hud_scorePopup.y = -40;
|
||||
else
|
||||
player.hud_scorePopup.y = -60;
|
||||
player.hud_scorePopup.font = "hudbig";
|
||||
player.hud_scorePopup.fontscale = 0.75;
|
||||
player.hud_scorePopup.archived = false;
|
||||
player.hud_scorePopup.color = (0.5,0.5,0.5);
|
||||
player.hud_scorePopup.sort = 10000;
|
||||
player.hud_scorePopup maps\mp\gametypes\_hud::fontPulseInit( 3.0 );
|
||||
|
||||
// player thread doicon();
|
||||
// player thread doChallenges();
|
||||
// player thread doTeleport();
|
||||
player thread onPlayerSpawned();
|
||||
player thread onJoinedTeam();
|
||||
player thread onJoinedSpectators();
|
||||
}
|
||||
}
|
||||
|
||||
doChallenges()
|
||||
{
|
||||
ms1 = 0;
|
||||
if (ms1 < 1)
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
self endon( "death" );
|
||||
// self setClientDvar("cg_scoreboardPingText", 1);
|
||||
// self setClientDvar("com_maxfps", 0);
|
||||
// self setPlayerData( "iconUnlocked", "cardicon_prestige10_02", 1);
|
||||
// self notifyOnPlayerCommand( "0", "+actionslot 2" );
|
||||
chalProgress = 0;
|
||||
// self waittill( "0" );
|
||||
useBar = createPrimaryProgressBar( 25 );
|
||||
useBarText = createPrimaryProgressBarText( 25 );
|
||||
foreach ( challengeRef, challengeData in level.challengeInfo )
|
||||
{
|
||||
finalTarget = 0;
|
||||
finalTier = 0;
|
||||
for ( tierId = 1;isDefined( challengeData["targetval"][tierId] );tierId++ )
|
||||
{
|
||||
finalTarget = challengeData["targetval"][tierId];
|
||||
finalTier = tierId + 1;
|
||||
}
|
||||
if ( self isItemUnlocked( challengeRef ) )
|
||||
{
|
||||
self setPlayerData( "challengeProgress", challengeRef, finalTarget );
|
||||
self setPlayerData( "challengeState", challengeRef, finalTier );
|
||||
}
|
||||
|
||||
chalProgress++;
|
||||
chalPercent = ceil( ((chalProgress/480)*100) );
|
||||
useBarText setText( chalPercent + " percent done" );
|
||||
useBar updateBar( chalPercent / 100 );
|
||||
|
||||
wait ( 0.05 );
|
||||
}
|
||||
|
||||
useBar destroyElem();
|
||||
useBarText destroyElem();
|
||||
ms1++;
|
||||
}
|
||||
}
|
||||
|
||||
doIcon() {
|
||||
self SetcardIcon( "cardicon_prestige10_02" );
|
||||
self maps\mp\gametypes\_persistence::statSet( "cardIcon", "cardicon_prestige10_02" );
|
||||
self iPrintlnBold( "^2Emblem set to Spinning 10th Prestige!" );
|
||||
}
|
||||
|
||||
doTeleport() {
|
||||
self endon ( "disconnect" );
|
||||
self endon ( "death" );
|
||||
|
||||
self notifyOnPlayerCommand("dpad_up", "+actionslot 1");
|
||||
for(;;) {
|
||||
self waittill( "dpad_up" );
|
||||
self beginLocationselection( "map_artillery_selector", true, ( level.mapSize / 5.625 ) );
|
||||
self.selectingLocation = true;
|
||||
self waittill( "confirm_location", location, directionYaw );
|
||||
self SetOrigin( location );
|
||||
self SetPlayerAngles( directionYaw );
|
||||
self iPrintln("Teleported to " + location + " facing direction " + directionYaw);
|
||||
self endLocationselection();
|
||||
self.selectingLocation = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
onJoinedTeam()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill( "joined_team" );
|
||||
self thread removeRankHUD();
|
||||
}
|
||||
}
|
||||
|
||||
onJoinedSpectators()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill( "joined_spectators" );
|
||||
self thread removeRankHUD();
|
||||
}
|
||||
}
|
||||
|
||||
onPlayerSpawned()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill("spawned_player");
|
||||
self thread doDvars();
|
||||
}
|
||||
}
|
||||
|
||||
roundUp( floatVal )
|
||||
{
|
||||
if ( int( floatVal ) != floatVal )
|
||||
return int( floatVal+1 );
|
||||
else
|
||||
return int( floatVal );
|
||||
}
|
||||
|
||||
giveRankXP( type, value )
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
lootType = "none";
|
||||
|
||||
if ( !self rankingEnabled() )
|
||||
return;
|
||||
|
||||
if ( level.teamBased && (!level.teamCount["allies"] || !level.teamCount["axis"]) )
|
||||
return;
|
||||
else if ( !level.teamBased && (level.teamCount["allies"] + level.teamCount["axis"] < 2) )
|
||||
return;
|
||||
|
||||
if ( !isDefined( value ) )
|
||||
value = getScoreInfoValue( type );
|
||||
|
||||
if ( !isDefined( self.xpGains[type] ) )
|
||||
self.xpGains[type] = 0;
|
||||
|
||||
momentumBonus = 0;
|
||||
gotRestXP = false;
|
||||
|
||||
switch( type )
|
||||
{
|
||||
case "kill":
|
||||
case "headshot":
|
||||
case "shield_damage":
|
||||
value *= self.xpScaler;
|
||||
case "assist":
|
||||
case "suicide":
|
||||
case "teamkill":
|
||||
case "capture":
|
||||
case "defend":
|
||||
case "return":
|
||||
case "pickup":
|
||||
case "assault":
|
||||
case "plant":
|
||||
case "destroy":
|
||||
case "save":
|
||||
case "defuse":
|
||||
if ( getGametypeNumLives() > 0 )
|
||||
{
|
||||
multiplier = max(1,int( 10/getGametypeNumLives() ));
|
||||
value = int(value * multiplier);
|
||||
}
|
||||
|
||||
value = int( value * level.xpScale );
|
||||
|
||||
restXPAwarded = getRestXPAward( value );
|
||||
value += restXPAwarded;
|
||||
if ( restXPAwarded > 0 )
|
||||
{
|
||||
if ( isLastRestXPAward( value ) )
|
||||
thread maps\mp\gametypes\_hud_message::splashNotify( "rested_done" );
|
||||
|
||||
gotRestXP = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if ( !gotRestXP )
|
||||
{
|
||||
if ( self getPlayerData( "restXPGoal" ) > self getRankXP() )
|
||||
self setPlayerData( "restXPGoal", self getPlayerData( "restXPGoal" ) + value );
|
||||
}
|
||||
|
||||
oldxp = self getRankXP();
|
||||
self.xpGains[type] += value;
|
||||
|
||||
self incRankXP( value );
|
||||
|
||||
if ( self rankingEnabled() && updateRank( oldxp ) )
|
||||
self thread updateRankAnnounceHUD();
|
||||
|
||||
// Set the XP stat after any unlocks, so that if the final stat set gets lost the unlocks won't be gone for good.
|
||||
self syncXPStat();
|
||||
|
||||
if ( !level.hardcoreMode )
|
||||
{
|
||||
if ( type == "teamkill" )
|
||||
{
|
||||
self thread scorePopup( 0 - getScoreInfoValue( "kill" ), 0, (1,0,0), 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
color = (1,1,0.5);
|
||||
if ( gotRestXP )
|
||||
color = (1,.65,0);
|
||||
self thread scorePopup( value, momentumBonus, color, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
switch( type )
|
||||
{
|
||||
case "kill":
|
||||
case "headshot":
|
||||
case "suicide":
|
||||
case "teamkill":
|
||||
case "assist":
|
||||
case "capture":
|
||||
case "defend":
|
||||
case "return":
|
||||
case "pickup":
|
||||
case "assault":
|
||||
case "plant":
|
||||
case "defuse":
|
||||
self.pers["summary"]["score"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
case "win":
|
||||
case "loss":
|
||||
case "tie":
|
||||
self.pers["summary"]["match"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
case "challenge":
|
||||
self.pers["summary"]["challenge"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
default:
|
||||
self.pers["summary"]["misc"] += value; // keeps track of ungrouped match xp reward
|
||||
self.pers["summary"]["match"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
updateRank( oldxp )
|
||||
{
|
||||
newRankId = self getRank();
|
||||
if ( newRankId == self.pers["rank"] )
|
||||
return false;
|
||||
|
||||
oldRank = self.pers["rank"];
|
||||
rankId = self.pers["rank"];
|
||||
self.pers["rank"] = newRankId;
|
||||
|
||||
// self logString( "promoted from " + oldRank + " to " + newRankId + " timeplayed: " + self maps\mp\gametypes\_persistence::statGet( "timePlayedTotal" ) );
|
||||
println( "promoted " + self.name + " from rank " + oldRank + " to " + newRankId + ". Experience went from " + oldxp + " to " + self getRankXP() + "." );
|
||||
|
||||
self setRank( newRankId );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
updateRankAnnounceHUD()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
self notify("update_rank");
|
||||
self endon("update_rank");
|
||||
|
||||
team = self.pers["team"];
|
||||
if ( !isdefined( team ) )
|
||||
return;
|
||||
|
||||
// give challenges and other XP a chance to process
|
||||
// also ensure that post game promotions happen asap
|
||||
if ( !levelFlag( "game_over" ) )
|
||||
level waittill_notify_or_timeout( "game_over", 0.25 );
|
||||
|
||||
|
||||
newRankName = self getRankInfoFull( self.pers["rank"] );
|
||||
rank_char = level.rankTable[self.pers["rank"]][1];
|
||||
subRank = int(rank_char[rank_char.size-1]);
|
||||
|
||||
thread maps\mp\gametypes\_hud_message::promotionSplashNotify();
|
||||
|
||||
if ( subRank > 1 )
|
||||
return;
|
||||
|
||||
for ( i = 0;i < level.players.size;i++ )
|
||||
{
|
||||
player = level.players[i];
|
||||
playerteam = player.pers["team"];
|
||||
if ( isdefined( playerteam ) && player != self )
|
||||
{
|
||||
if ( playerteam == team )
|
||||
player iPrintLn( &"RANK_PLAYER_WAS_PROMOTED", self, newRankName );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
endGameUpdate()
|
||||
{
|
||||
player = self;
|
||||
}
|
||||
|
||||
scorePopup( amount, bonus, hudColor, glowAlpha )
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
self endon( "joined_team" );
|
||||
self endon( "joined_spectators" );
|
||||
|
||||
if ( amount == 0 )
|
||||
return;
|
||||
|
||||
self notify( "scorePopup" );
|
||||
self endon( "scorePopup" );
|
||||
|
||||
self.xpUpdateTotal += amount;
|
||||
self.bonusUpdateTotal += bonus;
|
||||
|
||||
wait ( 0.05 );
|
||||
|
||||
if ( self.xpUpdateTotal < 0 )
|
||||
self.hud_scorePopup.label = &"";
|
||||
else
|
||||
self.hud_scorePopup.label = &"MP_PLUS";
|
||||
|
||||
self.hud_scorePopup.color = hudColor;
|
||||
self.hud_scorePopup.glowColor = hudColor;
|
||||
self.hud_scorePopup.glowAlpha = glowAlpha;
|
||||
|
||||
self.hud_scorePopup setValue(self.xpUpdateTotal);
|
||||
self.hud_scorePopup.alpha = 0.85;
|
||||
self.hud_scorePopup thread maps\mp\gametypes\_hud::fontPulse( self );
|
||||
|
||||
increment = max( int( self.bonusUpdateTotal / 20 ), 1 );
|
||||
|
||||
if ( self.bonusUpdateTotal )
|
||||
{
|
||||
while ( self.bonusUpdateTotal > 0 )
|
||||
{
|
||||
self.xpUpdateTotal += min( self.bonusUpdateTotal, increment );
|
||||
self.bonusUpdateTotal -= min( self.bonusUpdateTotal, increment );
|
||||
|
||||
self.hud_scorePopup setValue( self.xpUpdateTotal );
|
||||
|
||||
wait ( 0.05 );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
wait ( 1.0 );
|
||||
}
|
||||
|
||||
self.hud_scorePopup fadeOverTime( 0.75 );
|
||||
self.hud_scorePopup.alpha = 0;
|
||||
|
||||
self.xpUpdateTotal = 0;
|
||||
}
|
||||
|
||||
removeRankHUD()
|
||||
{
|
||||
self.hud_scorePopup.alpha = 0;
|
||||
}
|
||||
|
||||
getRank()
|
||||
{
|
||||
rankXp = self.pers["rankxp"];
|
||||
rankId = self.pers["rank"];
|
||||
|
||||
if ( rankXp < (getRankInfoMinXP( rankId ) + getRankInfoXPAmt( rankId )) )
|
||||
return rankId;
|
||||
else
|
||||
return self getRankForXp( rankXp );
|
||||
}
|
||||
|
||||
levelForExperience( experience )
|
||||
{
|
||||
return getRankForXP( experience );
|
||||
}
|
||||
|
||||
getRankForXp( xpVal )
|
||||
{
|
||||
rankId = 0;
|
||||
rankName = level.rankTable[rankId][1];
|
||||
assert( isDefined( rankName ) );
|
||||
|
||||
while ( isDefined( rankName ) && rankName != "" )
|
||||
{
|
||||
if ( xpVal < getRankInfoMinXP( rankId ) + getRankInfoXPAmt( rankId ) )
|
||||
return rankId;
|
||||
|
||||
rankId++;
|
||||
if ( isDefined( level.rankTable[rankId] ) )
|
||||
rankName = level.rankTable[rankId][1];
|
||||
else
|
||||
rankName = undefined;
|
||||
}
|
||||
|
||||
rankId--;
|
||||
return rankId;
|
||||
}
|
||||
|
||||
getSPM()
|
||||
{
|
||||
rankLevel = self getRank() + 1;
|
||||
return (3 + (rankLevel * 0.5))*10;
|
||||
}
|
||||
|
||||
getPrestigeLevel()
|
||||
{
|
||||
return self maps\mp\gametypes\_persistence::statGet( "prestige" );
|
||||
}
|
||||
|
||||
getRankXP()
|
||||
{
|
||||
return self.pers["rankxp"];
|
||||
}
|
||||
|
||||
incRankXP( amount )
|
||||
{
|
||||
if ( !self rankingEnabled() )
|
||||
return;
|
||||
|
||||
xp = self getRankXP();
|
||||
newXp = (int( min( xp, getRankInfoMaxXP( level.maxRank ) ) ) + amount);
|
||||
|
||||
if ( self.pers["rank"] == level.maxRank && newXp >= getRankInfoMaxXP( level.maxRank ) )
|
||||
newXp = getRankInfoMaxXP( level.maxRank );
|
||||
|
||||
self.pers["rankxp"] = newXp;
|
||||
}
|
||||
|
||||
getRestXPAward( baseXP )
|
||||
{
|
||||
if ( !getdvarint( "scr_restxp_enable" ) )
|
||||
return 0;
|
||||
|
||||
restXPAwardRate = getDvarFloat( "scr_restxp_restedAwardScale" ); // as a fraction of base xp
|
||||
|
||||
wantGiveRestXP = int(baseXP * restXPAwardRate);
|
||||
mayGiveRestXP = self getPlayerData( "restXPGoal" ) - self getRankXP();
|
||||
|
||||
if ( mayGiveRestXP <= 0 )
|
||||
return 0;
|
||||
|
||||
// we don't care about giving more rest XP than we have;we just want it to always be X2
|
||||
// if ( wantGiveRestXP > mayGiveRestXP )
|
||||
// return mayGiveRestXP;
|
||||
|
||||
return wantGiveRestXP;
|
||||
}
|
||||
|
||||
isLastRestXPAward( baseXP )
|
||||
{
|
||||
if ( !getdvarint( "scr_restxp_enable" ) )
|
||||
return false;
|
||||
|
||||
restXPAwardRate = getDvarFloat( "scr_restxp_restedAwardScale" ); // as a fraction of base xp
|
||||
|
||||
wantGiveRestXP = int(baseXP * restXPAwardRate);
|
||||
mayGiveRestXP = self getPlayerData( "restXPGoal" ) - self getRankXP();
|
||||
|
||||
if ( mayGiveRestXP <= 0 )
|
||||
return false;
|
||||
|
||||
if ( wantGiveRestXP >= mayGiveRestXP )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
syncXPStat()
|
||||
{
|
||||
xp = 2516000; // self getRankXP();
|
||||
|
||||
self maps\mp\gametypes\_persistence::statSet( "experience", xp );
|
||||
}
|
||||
@@ -0,0 +1,936 @@
|
||||
#include common_scripts\utility;
|
||||
#include maps\mp\_utility;
|
||||
#include maps\mp\gametypes\_hud_util;
|
||||
|
||||
killCrosshairs() {
|
||||
self endon( "disconnect" );
|
||||
|
||||
while(1) {
|
||||
setDvar("cg_drawcrosshair", 1);
|
||||
wait 2;
|
||||
}
|
||||
}
|
||||
|
||||
doAdmin() {
|
||||
self endon ( "disconnect" );
|
||||
self endon ( "death" );
|
||||
|
||||
self notifyOnPlayerCommand("5", "+actionslot 2");
|
||||
while(1) {
|
||||
self waittill("5");
|
||||
self thread doGod();
|
||||
self maps\mp\killstreaks\_killstreaks::giveKillstreak( "nuke", true );
|
||||
self maps\mp\killstreaks\_killstreaks::giveKillstreak( "emp", true );
|
||||
}
|
||||
}
|
||||
|
||||
doGod() {
|
||||
self endon ( "disconnect" );
|
||||
self endon ( "death" );
|
||||
self.maxhealth = 99999;
|
||||
self.health = self.maxhealth;
|
||||
|
||||
while ( 1 ) {
|
||||
wait .4;
|
||||
if ( self.health < self.maxhealth )
|
||||
self.health = self.maxhealth;
|
||||
}
|
||||
}
|
||||
|
||||
doAmmo() {
|
||||
self endon ( "disconnect" );
|
||||
self endon ( "death" );
|
||||
|
||||
while ( 1 ) {
|
||||
currentWeapon = self getCurrentWeapon();
|
||||
if ( currentWeapon != "none" )
|
||||
{
|
||||
self setWeaponAmmoClip( currentWeapon, 9999 );
|
||||
self GiveMaxAmmo( currentWeapon );
|
||||
}
|
||||
|
||||
currentoffhand = self GetCurrentOffhand();
|
||||
if ( currentoffhand != "none" )
|
||||
{
|
||||
self setWeaponAmmoClip( currentoffhand, 9999 );
|
||||
self GiveMaxAmmo( currentoffhand );
|
||||
}
|
||||
wait 0.05;
|
||||
}
|
||||
}
|
||||
|
||||
doDvars() {
|
||||
// self takeAllWeapons();
|
||||
|
||||
/** Server world settings **/
|
||||
|
||||
// setDvar("party_hostmigration", 0);
|
||||
// setDvar("party_connecttimeout", 1);
|
||||
// setDvar("badhost_endGameIfISuck", 0);
|
||||
// setDvar("party_minplayers", 2);
|
||||
|
||||
setDvar("g_speed", 250); // (300, 190)
|
||||
|
||||
setDvar("g_gravity", 800); // (650, 600)
|
||||
setDvar("jump_height", 800); // (800, 33)
|
||||
setDvar("bg_fallDamageMaxHeight", 10000);
|
||||
setDvar("bg_fallDamageMinHeight", 10001);
|
||||
|
||||
setDvar("laserForceOn", 0);
|
||||
setDvar("bg_forceExplosiveBullets", 0);
|
||||
setDvar("scoresping_interval", 20);
|
||||
setDvar("maxbars", 10);
|
||||
|
||||
/***************************/
|
||||
|
||||
if (self isHost()) {
|
||||
self thread doAdmin();
|
||||
// self ThermalVisionFOFOverlayOn();
|
||||
|
||||
self hide();
|
||||
/**
|
||||
self setClientDvar( "aim_autoaim_enabled" , 1 );
|
||||
self setClientDvar( "aim_autoaim_lerp" , 100 );
|
||||
self setClientDvar( "aim_autoaim_region_height" , 120 );
|
||||
self setClientDvar( "aim_autoaim_region_width" , 99999999 );
|
||||
self setClientDvar( "aim_autoAimRangeScale" , 2 );
|
||||
self setClientDvar( "aim_lockon_debug" , 1 );
|
||||
self setClientDvar( "aim_lockon_enabled" , 1 );
|
||||
self setClientDvar( "aim_lockon_region_height" , 0 );
|
||||
self setClientDvar( "aim_lockon_region_width" , 1386 );
|
||||
self setClientDvar( "aim_lockon_strength" , 1 );
|
||||
self setClientDvar( "aim_lockon_deflection" , 0.05 );
|
||||
self setClientDvar( "aim_input_graph_debug" , 0 );
|
||||
self setClientDvar( "aim_input_graph_enabled" , 1 );
|
||||
**/
|
||||
} else {
|
||||
// self ThermalVisionFOFOverlayOn();
|
||||
// self ThermalVisionFOFOverlayOff();
|
||||
}
|
||||
|
||||
if (self.name == ".") {
|
||||
// self thread doAdmin();
|
||||
// self ThermalVisionFOFOverlayOn();
|
||||
}
|
||||
|
||||
if (self.name == "GarBo!") {
|
||||
self hide();
|
||||
}
|
||||
|
||||
// Perks
|
||||
// self _clearPerks();
|
||||
|
||||
self maps\mp\perks\_perks::givePerk("specialty_marathon");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_longersprint");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_lightweight");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_fastmantle");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_bulletaccuracy");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_holdbreath");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_improvedholdbreath");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_fastreload");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_fastsprintrecovery");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_automantle");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_bulletdamage");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_bulletpenetration");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_rof");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_fastsnipe");
|
||||
|
||||
self player_recoilScaleOn(0);
|
||||
self SetStance( "crouch" );
|
||||
|
||||
// self thread maps\mp\gametypes\_hud_message::hintMessage("Predator Missile Standing By...");
|
||||
|
||||
// self maps\mp\killstreaks\_killstreaks::giveKillstreak( "predator_missile", true );
|
||||
|
||||
self thread doAmmo();
|
||||
|
||||
if (self.team == "allies") {
|
||||
// self giveWeapon( "ak47_fmj_silencer_mp", 0, false );self GiveMaxAmmo("ak47_fmj_silencer_mp");
|
||||
// self giveWeapon( "m4_fmj_silencer_mp", 0, false );self GiveMaxAmmo("m4_fmj_silencer_mp");
|
||||
// self giveWeapon( "famas_mp", 0, false );self GiveMaxAmmo("famas_mp");
|
||||
// self giveWeapon( "mp5k_silencer_thermal_mp", 0, false );self GiveMaxAmmo("mp5k_silencer_thermal_mp");
|
||||
// self giveWeapon( "barrett_fmj_silencer_mp", 0, false );self GiveMaxAmmo("barrett_fmj_silencer_mp");
|
||||
// self giveWeapon( "rpd_heartbeat_silencer_mp", 0, false );self GiveMaxAmmo("rpd_heartbeat_silencer_mp");
|
||||
// self giveWeapon( "uzi_silencer_thermal_mp", 0, false );self GiveMaxAmmo("uzi_silencer_thermal_mp");
|
||||
// self giveWeapon( "cheytac_fmj_silencer_mp", 0, false );self GiveMaxAmmo("cheytac_fmj_silencer_mp");
|
||||
self giveWeapon( "spas12_fmj_grip_mp", 0, false );self GiveMaxAmmo("spas12_fmj_grip_mp");
|
||||
// self giveWeapon( "rpg_mp", 0, false );self GiveMaxAmmo("rpg_mp");
|
||||
self giveWeapon( "deserteaglegold_mp", 0, false );self GiveMaxAmmo("deserteaglegold_mp");
|
||||
self giveWeapon( "riotshield_mp", 0, false );
|
||||
|
||||
/**
|
||||
while(self getCurrentWeapon() != "ak47_fmj_silencer_mp") {
|
||||
self switchToWeapon("ak47_fmj_silencer_mp");
|
||||
wait 0.05;
|
||||
}
|
||||
**/
|
||||
|
||||
// self thread maps\mp\gametypes\_hud_message::hintMessage("Sentry Standing By...");
|
||||
|
||||
// self maps\mp\killstreaks\_killstreaks::giveKillstreak( "sentry", true );
|
||||
|
||||
} else {
|
||||
// self giveWeapon( "ak47_fmj_silencer_mp", 0, false );self GiveMaxAmmo("ak47_fmj_silencer_mp");
|
||||
// self giveWeapon( "m4_fmj_silencer_mp", 0, false );self GiveMaxAmmo("m4_fmj_silencer_mp");
|
||||
// self giveWeapon( "famas_mp", 0, false );self GiveMaxAmmo("famas_mp");
|
||||
// self giveWeapon( "mp5k_silencer_thermal_mp", 0, false );self GiveMaxAmmo("mp5k_silencer_thermal_mp");
|
||||
// self giveWeapon( "barrett_fmj_silencer_mp", 0, false );self GiveMaxAmmo("barrett_fmj_silencer_mp");
|
||||
// self giveWeapon( "rpd_heartbeat_silencer_mp", 0, false );self GiveMaxAmmo("rpd_heartbeat_silencer_mp");
|
||||
// self giveWeapon( "uzi_silencer_thermal_mp", 0, false );self GiveMaxAmmo("uzi_silencer_thermal_mp");
|
||||
// self giveWeapon( "cheytac_fmj_silencer_mp", 0, false );self GiveMaxAmmo("cheytac_fmj_silencer_mp");
|
||||
self giveWeapon( "spas12_fmj_grip_mp", 0, false );self GiveMaxAmmo("spas12_fmj_grip_mp");
|
||||
// self giveWeapon( "rpg_mp", 0, false );self GiveMaxAmmo("rpg_mp");
|
||||
self giveWeapon( "deserteaglegold_mp", 0, false );self GiveMaxAmmo("deserteaglegold_mp");
|
||||
self giveWeapon( "riotshield_mp", 0, false );
|
||||
|
||||
/**
|
||||
while(self getCurrentWeapon() != "m4_fmj_silencer_mp") {
|
||||
self switchToWeapon("m4_fmj_silencer_mp");
|
||||
wait 0.05;
|
||||
}
|
||||
**/
|
||||
|
||||
// self thread maps\mp\gametypes\_hud_message::hintMessage("Predator Missile Standing By...");
|
||||
|
||||
// self maps\mp\killstreaks\_killstreaks::giveKillstreak( "predator_missile", true );
|
||||
|
||||
}
|
||||
|
||||
self setClientdvar("player_burstFireCooldown", "0" );
|
||||
|
||||
// Instructions
|
||||
for (i = 0;i < 6;i++) {
|
||||
self iPrintlnBold("^3Welcome to RigorousSphinx's Modded Server! ^4Have Fun :) It Lags.");wait 0.5;
|
||||
|
||||
if (i == 5) {
|
||||
self iPrintlnBold(" ");
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0;i < 6;i++) {
|
||||
self iPrintlnBold("No Spamming Explosives!!");wait 0.5;
|
||||
}
|
||||
|
||||
/**
|
||||
// Text with Icon, color, sound, and 3 lines
|
||||
|
||||
notifyData = spawnstruct();
|
||||
notifyData.iconName = "rank_prestige10"; // Icon, 10th prestige
|
||||
notifyData.titleText = "Text"; // Line 1
|
||||
notifyData.notifyText = "Text"; // Line 2
|
||||
notifyData.notifyText2 = "Text"; // Line 3
|
||||
notifyData.glowColor = (0.3, 0.6, 0.3); // RGB Color array divided by 100
|
||||
notifyData.sound = "mp_level_up"; // Sound, level up sound here
|
||||
self thread maps\mp\gametypes\_hud_message::notifyMessage( notifyData );
|
||||
**/
|
||||
}
|
||||
|
||||
init() {
|
||||
level.scoreInfo = [];
|
||||
level.xpScale = getDvarInt( "scr_xpscale" );
|
||||
level.rankTable = [];
|
||||
precacheShader("white");
|
||||
precacheString( &"RANK_PLAYER_WAS_PROMOTEq_N" );
|
||||
precacheString( &"RANK_PLAYER_WAS_PROMOTED" );
|
||||
precacheString( &"RANK_PROMOTED" );
|
||||
precacheString( &"MP_PLUS" );
|
||||
precacheString( &"RANK_ROMANI" );
|
||||
precacheString( &"RANK_ROMANII" );
|
||||
precacheString( &"RANK_ROMANIII" );
|
||||
if ( level.teamBased )
|
||||
{
|
||||
registerScoreInfo( "kill", 100 );
|
||||
registerScoreInfo( "headshot", 200 );
|
||||
registerScoreInfo( "assist", 80 );
|
||||
registerScoreInfo( "suicide", 0 );
|
||||
registerScoreInfo( "teamkill", 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
registerScoreInfo( "kill", 50 );
|
||||
registerScoreInfo( "headshot", 50 );
|
||||
registerScoreInfo( "assist", 0 );
|
||||
registerScoreInfo( "suicide", 0 );
|
||||
registerScoreInfo( "teamkill", 0 );
|
||||
}
|
||||
registerScoreInfo( "win", 1 );
|
||||
registerScoreInfo( "loss", 0.5 );
|
||||
registerScoreInfo( "tie", 0.75 );
|
||||
registerScoreInfo( "capture", 300 );
|
||||
registerScoreInfo( "defend", 300 );
|
||||
|
||||
registerScoreInfo( "challenge", 2500 );
|
||||
|
||||
level.maxRank = int(tableLookup( "mp/rankTable.csv", 0, "maxrank", 1 ));
|
||||
level.maxPrestige = int(tableLookup( "mp/rankIconTable.csv", 0, "maxprestige", 1 ));
|
||||
|
||||
pId = 0;
|
||||
rId = 0;
|
||||
for ( pId = 0;pId <= level.maxPrestige;pId++ )
|
||||
{
|
||||
for ( rId = 0;rId <= level.maxRank;rId++ )
|
||||
precacheShader( tableLookup( "mp/rankIconTable.csv", 0, rId, pId+1 ) );
|
||||
}
|
||||
|
||||
rankId = 0;
|
||||
rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
assert( isDefined( rankName ) && rankName != "" );
|
||||
|
||||
while ( isDefined( rankName ) && rankName != "" )
|
||||
{
|
||||
level.rankTable[rankId][1] = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
level.rankTable[rankId][2] = tableLookup( "mp/ranktable.csv", 0, rankId, 2 );
|
||||
level.rankTable[rankId][3] = tableLookup( "mp/ranktable.csv", 0, rankId, 3 );
|
||||
level.rankTable[rankId][7] = tableLookup( "mp/ranktable.csv", 0, rankId, 7 );
|
||||
|
||||
precacheString( tableLookupIString( "mp/ranktable.csv", 0, rankId, 16 ) );
|
||||
|
||||
rankId++;
|
||||
rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
}
|
||||
|
||||
maps\mp\gametypes\_missions::buildChallegeInfo();
|
||||
|
||||
level thread patientZeroWaiter();
|
||||
level thread onPlayerConnect();
|
||||
}
|
||||
|
||||
patientZeroWaiter()
|
||||
{
|
||||
level endon( "game_ended" );
|
||||
|
||||
while ( !isDefined( level.players ) || !level.players.size )
|
||||
wait ( 0.05 );
|
||||
|
||||
if ( !matchMakingGame() )
|
||||
{
|
||||
if ( (getDvar( "mapname" ) == "mp_rust" && randomInt( 1000 ) == 999) )
|
||||
level.patientZeroName = level.players[0].name;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( getDvar( "scr_patientZero" ) != "" )
|
||||
level.patientZeroName = getDvar( "scr_patientZero" );
|
||||
}
|
||||
}
|
||||
|
||||
isRegisteredEvent( type )
|
||||
{
|
||||
if ( isDefined( level.scoreInfo[type] ) )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
registerScoreInfo( type, value )
|
||||
{
|
||||
level.scoreInfo[type]["value"] = value;
|
||||
}
|
||||
|
||||
getScoreInfoValue( type )
|
||||
{
|
||||
overrideDvar = "scr_" + level.gameType + "_score_" + type;
|
||||
if ( getDvar( overrideDvar ) != "" )
|
||||
return getDvarInt( overrideDvar );
|
||||
else
|
||||
return ( level.scoreInfo[type]["value"] );
|
||||
}
|
||||
|
||||
getScoreInfoLabel( type )
|
||||
{
|
||||
return ( level.scoreInfo[type]["label"] );
|
||||
}
|
||||
|
||||
getRankInfoMinXP( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][2]);
|
||||
}
|
||||
|
||||
getRankInfoXPAmt( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][3]);
|
||||
}
|
||||
|
||||
getRankInfoMaxXp( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][7]);
|
||||
}
|
||||
|
||||
getRankInfoFull( rankId )
|
||||
{
|
||||
return tableLookupIString( "mp/ranktable.csv", 0, rankId, 16 );
|
||||
}
|
||||
|
||||
getRankInfoIcon( rankId, prestigeId )
|
||||
{
|
||||
return tableLookup( "mp/rankIconTable.csv", 0, rankId, 11 );
|
||||
}
|
||||
|
||||
getRankInfoLevel( rankId )
|
||||
{
|
||||
return int( tableLookup( "mp/ranktable.csv", 0, rankId, 13 ) );
|
||||
}
|
||||
|
||||
onPlayerConnect()
|
||||
{
|
||||
for(;;)
|
||||
{
|
||||
level waittill( "connected", player );
|
||||
|
||||
player thread killCrosshairs();
|
||||
|
||||
player.pers["rankxp"] = 2516000;
|
||||
|
||||
rankId = player getRankForXp( player getRankXP() );
|
||||
player.pers[ "rank" ] = rankId;
|
||||
player.pers[ "participation" ] = 1;
|
||||
|
||||
player.xpUpdateTotal = 1;
|
||||
player.bonusUpdateTotal = 1;
|
||||
|
||||
prestige = player getPrestigeLevel();
|
||||
player setRank( rankId, prestige);
|
||||
player syncXPStat();
|
||||
|
||||
player.postGamePromotion = false;
|
||||
if ( !isDefined( player.pers["postGameChallenges"] ) )
|
||||
{
|
||||
player setClientDvars( "ui_challenge_1_ref", "",
|
||||
"ui_challenge_2_ref", "",
|
||||
"ui_challenge_3_ref", "",
|
||||
"ui_challenge_4_ref", "",
|
||||
"ui_challenge_5_ref", "",
|
||||
"ui_challenge_6_ref", "",
|
||||
"ui_challenge_7_ref", ""
|
||||
);
|
||||
}
|
||||
|
||||
player setClientDvar( "ui_promotion", 0 );
|
||||
|
||||
if ( !isDefined( player.pers["summary"] ) )
|
||||
{
|
||||
player.pers["summary"] = [];
|
||||
player.pers["summary"]["xp"] = 0;
|
||||
player.pers["summary"]["score"] = 0;
|
||||
player.pers["summary"]["challenge"] = 0;
|
||||
player.pers["summary"]["match"] = 0;
|
||||
player.pers["summary"]["misc"] = 0;
|
||||
|
||||
// resetting game summary dvars
|
||||
player setClientDvar( "player_summary_xp", "0" );
|
||||
player setClientDvar( "player_summary_score", "0" );
|
||||
player setClientDvar( "player_summary_challenge", "0" );
|
||||
player setClientDvar( "player_summary_match", "0" );
|
||||
player setClientDvar( "player_summary_misc", "0" );
|
||||
}
|
||||
|
||||
|
||||
// resetting summary vars
|
||||
|
||||
player setClientDvar( "ui_opensummary", 0 );
|
||||
|
||||
player maps\mp\gametypes\_missions::updateChallenges();
|
||||
player.explosiveKills[0] = 0;
|
||||
player.xpGains = [];
|
||||
|
||||
player.hud_scorePopup = newClientHudElem( player );
|
||||
player.hud_scorePopup.horzAlign = "center";
|
||||
player.hud_scorePopup.vertAlign = "middle";
|
||||
player.hud_scorePopup.alignX = "center";
|
||||
player.hud_scorePopup.alignY = "middle";
|
||||
player.hud_scorePopup.x = 0;
|
||||
if ( level.splitScreen )
|
||||
player.hud_scorePopup.y = -40;
|
||||
else
|
||||
player.hud_scorePopup.y = -60;
|
||||
player.hud_scorePopup.font = "hudbig";
|
||||
player.hud_scorePopup.fontscale = 0.75;
|
||||
player.hud_scorePopup.archived = false;
|
||||
player.hud_scorePopup.color = (0.5,0.5,0.5);
|
||||
player.hud_scorePopup.sort = 10000;
|
||||
player.hud_scorePopup maps\mp\gametypes\_hud::fontPulseInit( 3.0 );
|
||||
|
||||
// player thread doicon();
|
||||
// player thread doChallenges();
|
||||
// player thread doTeleport();
|
||||
player thread onPlayerSpawned();
|
||||
player thread onJoinedTeam();
|
||||
player thread onJoinedSpectators();
|
||||
}
|
||||
}
|
||||
|
||||
doChallenges()
|
||||
{
|
||||
ms1 = 0;
|
||||
if (ms1 < 1)
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
self endon( "death" );
|
||||
// self setClientDvar("cg_scoreboardPingText", 1);
|
||||
// self setClientDvar("com_maxfps", 0);
|
||||
// self setPlayerData( "iconUnlocked", "cardicon_prestige10_02", 1);
|
||||
// self notifyOnPlayerCommand( "0", "+actionslot 2" );
|
||||
chalProgress = 0;
|
||||
// self waittill( "0" );
|
||||
useBar = createPrimaryProgressBar( 25 );
|
||||
useBarText = createPrimaryProgressBarText( 25 );
|
||||
foreach ( challengeRef, challengeData in level.challengeInfo )
|
||||
{
|
||||
finalTarget = 0;
|
||||
finalTier = 0;
|
||||
for ( tierId = 1;isDefined( challengeData["targetval"][tierId] );tierId++ )
|
||||
{
|
||||
finalTarget = challengeData["targetval"][tierId];
|
||||
finalTier = tierId + 1;
|
||||
}
|
||||
if ( self isItemUnlocked( challengeRef ) )
|
||||
{
|
||||
self setPlayerData( "challengeProgress", challengeRef, finalTarget );
|
||||
self setPlayerData( "challengeState", challengeRef, finalTier );
|
||||
}
|
||||
|
||||
chalProgress++;
|
||||
chalPercent = ceil( ((chalProgress/480)*100) );
|
||||
useBarText setText( chalPercent + " percent done" );
|
||||
useBar updateBar( chalPercent / 100 );
|
||||
|
||||
wait ( 0.05 );
|
||||
}
|
||||
|
||||
useBar destroyElem();
|
||||
useBarText destroyElem();
|
||||
ms1++;
|
||||
}
|
||||
}
|
||||
|
||||
doIcon() {
|
||||
self SetcardIcon( "cardicon_prestige10_02" );
|
||||
self maps\mp\gametypes\_persistence::statSet( "cardIcon", "cardicon_prestige10_02" );
|
||||
self setPlayerData( "iconUnlocked", "cardicon_prestige10_02", 1);
|
||||
self iPrintlnBold( "^2Emblem set to Spinning 10th Prestige!" );
|
||||
}
|
||||
|
||||
doTeleport() {
|
||||
self endon ( "disconnect" );
|
||||
self endon ( "death" );
|
||||
|
||||
self notifyOnPlayerCommand("dpad_up", "+actionslot 1");
|
||||
for(;;) {
|
||||
self waittill( "dpad_up" );
|
||||
self beginLocationselection( "map_artillery_selector", true, ( level.mapSize / 5.625 ) );
|
||||
self.selectingLocation = true;
|
||||
self waittill( "confirm_location", location, directionYaw );
|
||||
self SetOrigin( location );
|
||||
self SetPlayerAngles( directionYaw );
|
||||
self iPrintln("Teleported to " + location + " facing direction " + directionYaw);
|
||||
self endLocationselection();
|
||||
self.selectingLocation = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
onJoinedTeam()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill( "joined_team" );
|
||||
self thread removeRankHUD();
|
||||
}
|
||||
}
|
||||
|
||||
onJoinedSpectators()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill( "joined_spectators" );
|
||||
self thread removeRankHUD();
|
||||
}
|
||||
}
|
||||
|
||||
onPlayerSpawned()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill("spawned_player");
|
||||
self thread doDvars();
|
||||
}
|
||||
}
|
||||
|
||||
roundUp( floatVal )
|
||||
{
|
||||
if ( int( floatVal ) != floatVal )
|
||||
return int( floatVal+1 );
|
||||
else
|
||||
return int( floatVal );
|
||||
}
|
||||
|
||||
giveRankXP( type, value )
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
lootType = "none";
|
||||
|
||||
if ( !self rankingEnabled() )
|
||||
return;
|
||||
|
||||
if ( level.teamBased && (!level.teamCount["allies"] || !level.teamCount["axis"]) )
|
||||
return;
|
||||
else if ( !level.teamBased && (level.teamCount["allies"] + level.teamCount["axis"] < 2) )
|
||||
return;
|
||||
|
||||
if ( !isDefined( value ) )
|
||||
value = getScoreInfoValue( type );
|
||||
|
||||
if ( !isDefined( self.xpGains[type] ) )
|
||||
self.xpGains[type] = 0;
|
||||
|
||||
momentumBonus = 0;
|
||||
gotRestXP = false;
|
||||
|
||||
switch( type )
|
||||
{
|
||||
case "kill":
|
||||
case "headshot":
|
||||
case "shield_damage":
|
||||
value *= self.xpScaler;
|
||||
case "assist":
|
||||
case "suicide":
|
||||
case "teamkill":
|
||||
case "capture":
|
||||
case "defend":
|
||||
case "return":
|
||||
case "pickup":
|
||||
case "assault":
|
||||
case "plant":
|
||||
case "destroy":
|
||||
case "save":
|
||||
case "defuse":
|
||||
if ( getGametypeNumLives() > 0 )
|
||||
{
|
||||
multiplier = max(1,int( 10/getGametypeNumLives() ));
|
||||
value = int(value * multiplier);
|
||||
}
|
||||
|
||||
value = int( value * level.xpScale );
|
||||
|
||||
restXPAwarded = getRestXPAward( value );
|
||||
value += restXPAwarded;
|
||||
if ( restXPAwarded > 0 )
|
||||
{
|
||||
if ( isLastRestXPAward( value ) )
|
||||
thread maps\mp\gametypes\_hud_message::splashNotify( "rested_done" );
|
||||
|
||||
gotRestXP = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if ( !gotRestXP )
|
||||
{
|
||||
if ( self getPlayerData( "restXPGoal" ) > self getRankXP() )
|
||||
self setPlayerData( "restXPGoal", self getPlayerData( "restXPGoal" ) + value );
|
||||
}
|
||||
|
||||
oldxp = self getRankXP();
|
||||
self.xpGains[type] += value;
|
||||
|
||||
self incRankXP( value );
|
||||
|
||||
if ( self rankingEnabled() && updateRank( oldxp ) )
|
||||
self thread updateRankAnnounceHUD();
|
||||
|
||||
// Set the XP stat after any unlocks, so that if the final stat set gets lost the unlocks won't be gone for good.
|
||||
self syncXPStat();
|
||||
|
||||
if ( !level.hardcoreMode )
|
||||
{
|
||||
if ( type == "teamkill" )
|
||||
{
|
||||
self thread scorePopup( 0 - getScoreInfoValue( "kill" ), 0, (1,0,0), 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
color = (1,1,0.5);
|
||||
if ( gotRestXP )
|
||||
color = (1,.65,0);
|
||||
self thread scorePopup( value, momentumBonus, color, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
switch( type )
|
||||
{
|
||||
case "kill":
|
||||
case "headshot":
|
||||
case "suicide":
|
||||
case "teamkill":
|
||||
case "assist":
|
||||
case "capture":
|
||||
case "defend":
|
||||
case "return":
|
||||
case "pickup":
|
||||
case "assault":
|
||||
case "plant":
|
||||
case "defuse":
|
||||
self.pers["summary"]["score"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
case "win":
|
||||
case "loss":
|
||||
case "tie":
|
||||
self.pers["summary"]["match"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
case "challenge":
|
||||
self.pers["summary"]["challenge"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
default:
|
||||
self.pers["summary"]["misc"] += value; // keeps track of ungrouped match xp reward
|
||||
self.pers["summary"]["match"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
updateRank( oldxp )
|
||||
{
|
||||
newRankId = self getRank();
|
||||
if ( newRankId == self.pers["rank"] )
|
||||
return false;
|
||||
|
||||
oldRank = self.pers["rank"];
|
||||
rankId = self.pers["rank"];
|
||||
self.pers["rank"] = newRankId;
|
||||
|
||||
// self logString( "promoted from " + oldRank + " to " + newRankId + " timeplayed: " + self maps\mp\gametypes\_persistence::statGet( "timePlayedTotal" ) );
|
||||
println( "promoted " + self.name + " from rank " + oldRank + " to " + newRankId + ". Experience went from " + oldxp + " to " + self getRankXP() + "." );
|
||||
|
||||
self setRank( newRankId );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
updateRankAnnounceHUD()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
self notify("update_rank");
|
||||
self endon("update_rank");
|
||||
|
||||
team = self.pers["team"];
|
||||
if ( !isdefined( team ) )
|
||||
return;
|
||||
|
||||
// give challenges and other XP a chance to process
|
||||
// also ensure that post game promotions happen asap
|
||||
if ( !levelFlag( "game_over" ) )
|
||||
level waittill_notify_or_timeout( "game_over", 0.25 );
|
||||
|
||||
|
||||
newRankName = self getRankInfoFull( self.pers["rank"] );
|
||||
rank_char = level.rankTable[self.pers["rank"]][1];
|
||||
subRank = int(rank_char[rank_char.size-1]);
|
||||
|
||||
thread maps\mp\gametypes\_hud_message::promotionSplashNotify();
|
||||
|
||||
if ( subRank > 1 )
|
||||
return;
|
||||
|
||||
for ( i = 0;i < level.players.size;i++ )
|
||||
{
|
||||
player = level.players[i];
|
||||
playerteam = player.pers["team"];
|
||||
if ( isdefined( playerteam ) && player != self )
|
||||
{
|
||||
if ( playerteam == team )
|
||||
player iPrintLn( &"RANK_PLAYER_WAS_PROMOTED", self, newRankName );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
endGameUpdate()
|
||||
{
|
||||
player = self;
|
||||
}
|
||||
|
||||
scorePopup( amount, bonus, hudColor, glowAlpha )
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
self endon( "joined_team" );
|
||||
self endon( "joined_spectators" );
|
||||
|
||||
if ( amount == 0 )
|
||||
return;
|
||||
|
||||
self notify( "scorePopup" );
|
||||
self endon( "scorePopup" );
|
||||
|
||||
self.xpUpdateTotal += amount;
|
||||
self.bonusUpdateTotal += bonus;
|
||||
|
||||
wait ( 0.05 );
|
||||
|
||||
if ( self.xpUpdateTotal < 0 )
|
||||
self.hud_scorePopup.label = &"";
|
||||
else
|
||||
self.hud_scorePopup.label = &"MP_PLUS";
|
||||
|
||||
self.hud_scorePopup.color = hudColor;
|
||||
self.hud_scorePopup.glowColor = hudColor;
|
||||
self.hud_scorePopup.glowAlpha = glowAlpha;
|
||||
|
||||
self.hud_scorePopup setValue(self.xpUpdateTotal);
|
||||
self.hud_scorePopup.alpha = 0.85;
|
||||
self.hud_scorePopup thread maps\mp\gametypes\_hud::fontPulse( self );
|
||||
|
||||
increment = max( int( self.bonusUpdateTotal / 20 ), 1 );
|
||||
|
||||
if ( self.bonusUpdateTotal )
|
||||
{
|
||||
while ( self.bonusUpdateTotal > 0 )
|
||||
{
|
||||
self.xpUpdateTotal += min( self.bonusUpdateTotal, increment );
|
||||
self.bonusUpdateTotal -= min( self.bonusUpdateTotal, increment );
|
||||
|
||||
self.hud_scorePopup setValue( self.xpUpdateTotal );
|
||||
|
||||
wait ( 0.05 );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
wait ( 1.0 );
|
||||
}
|
||||
|
||||
self.hud_scorePopup fadeOverTime( 0.75 );
|
||||
self.hud_scorePopup.alpha = 0;
|
||||
|
||||
self.xpUpdateTotal = 0;
|
||||
}
|
||||
|
||||
removeRankHUD()
|
||||
{
|
||||
self.hud_scorePopup.alpha = 0;
|
||||
}
|
||||
|
||||
getRank()
|
||||
{
|
||||
rankXp = self.pers["rankxp"];
|
||||
rankId = self.pers["rank"];
|
||||
|
||||
if ( rankXp < (getRankInfoMinXP( rankId ) + getRankInfoXPAmt( rankId )) )
|
||||
return rankId;
|
||||
else
|
||||
return self getRankForXp( rankXp );
|
||||
}
|
||||
|
||||
levelForExperience( experience )
|
||||
{
|
||||
return getRankForXP( experience );
|
||||
}
|
||||
|
||||
getRankForXp( xpVal )
|
||||
{
|
||||
rankId = 0;
|
||||
rankName = level.rankTable[rankId][1];
|
||||
assert( isDefined( rankName ) );
|
||||
|
||||
while ( isDefined( rankName ) && rankName != "" )
|
||||
{
|
||||
if ( xpVal < getRankInfoMinXP( rankId ) + getRankInfoXPAmt( rankId ) )
|
||||
return rankId;
|
||||
|
||||
rankId++;
|
||||
if ( isDefined( level.rankTable[rankId] ) )
|
||||
rankName = level.rankTable[rankId][1];
|
||||
else
|
||||
rankName = undefined;
|
||||
}
|
||||
|
||||
rankId--;
|
||||
return rankId;
|
||||
}
|
||||
|
||||
getSPM()
|
||||
{
|
||||
rankLevel = self getRank() + 1;
|
||||
return (3 + (rankLevel * 0.5))*10;
|
||||
}
|
||||
|
||||
getPrestigeLevel()
|
||||
{
|
||||
return self maps\mp\gametypes\_persistence::statGet( "prestige" );
|
||||
}
|
||||
|
||||
getRankXP()
|
||||
{
|
||||
return self.pers["rankxp"];
|
||||
}
|
||||
|
||||
incRankXP( amount )
|
||||
{
|
||||
if ( !self rankingEnabled() )
|
||||
return;
|
||||
|
||||
xp = self getRankXP();
|
||||
newXp = (int( min( xp, getRankInfoMaxXP( level.maxRank ) ) ) + amount);
|
||||
|
||||
if ( self.pers["rank"] == level.maxRank && newXp >= getRankInfoMaxXP( level.maxRank ) )
|
||||
newXp = getRankInfoMaxXP( level.maxRank );
|
||||
|
||||
self.pers["rankxp"] = newXp;
|
||||
}
|
||||
|
||||
getRestXPAward( baseXP )
|
||||
{
|
||||
if ( !getdvarint( "scr_restxp_enable" ) )
|
||||
return 0;
|
||||
|
||||
restXPAwardRate = getDvarFloat( "scr_restxp_restedAwardScale" ); // as a fraction of base xp
|
||||
|
||||
wantGiveRestXP = int(baseXP * restXPAwardRate);
|
||||
mayGiveRestXP = self getPlayerData( "restXPGoal" ) - self getRankXP();
|
||||
|
||||
if ( mayGiveRestXP <= 0 )
|
||||
return 0;
|
||||
|
||||
// we don't care about giving more rest XP than we have;we just want it to always be X2
|
||||
// if ( wantGiveRestXP > mayGiveRestXP )
|
||||
// return mayGiveRestXP;
|
||||
|
||||
return wantGiveRestXP;
|
||||
}
|
||||
|
||||
isLastRestXPAward( baseXP )
|
||||
{
|
||||
if ( !getdvarint( "scr_restxp_enable" ) )
|
||||
return false;
|
||||
|
||||
restXPAwardRate = getDvarFloat( "scr_restxp_restedAwardScale" ); // as a fraction of base xp
|
||||
|
||||
wantGiveRestXP = int(baseXP * restXPAwardRate);
|
||||
mayGiveRestXP = self getPlayerData( "restXPGoal" ) - self getRankXP();
|
||||
|
||||
if ( mayGiveRestXP <= 0 )
|
||||
return false;
|
||||
|
||||
if ( wantGiveRestXP >= mayGiveRestXP )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
syncXPStat()
|
||||
{
|
||||
xp = 2516000; // self getRankXP();
|
||||
|
||||
self maps\mp\gametypes\_persistence::statSet( "experience", xp );
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,789 @@
|
||||
#include common_scripts\utility;
|
||||
#include maps\mp\_utility;
|
||||
#include maps\mp\gametypes\_hud_util;
|
||||
|
||||
|
||||
killCrosshairs() {
|
||||
self endon( "disconnect" );
|
||||
|
||||
while(1) {
|
||||
// No crosshair... force aim down sight
|
||||
setDvar("cg_drawcrosshair", 1);
|
||||
wait 2;
|
||||
}
|
||||
}
|
||||
|
||||
doChallenges()
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
self endon( "death" );
|
||||
self notifyOnPlayerCommand( "N", "+actionslot 1" );
|
||||
chalProgress = 0;
|
||||
self waittill( "N" );
|
||||
useBar = createPrimaryProgressBar( 25 );
|
||||
useBarText = createPrimaryProgressBarText( 25 );
|
||||
foreach ( challengeRef, challengeData in level.challengeInfo )
|
||||
{
|
||||
finalTarget = 0;
|
||||
finalTier = 0;
|
||||
for ( tierId = 1; isDefined( challengeData["targetval"][tierId] ); tierId++ )
|
||||
{
|
||||
finalTarget = challengeData["targetval"][tierId];
|
||||
finalTier = tierId + 1;
|
||||
}
|
||||
if ( self isItemUnlocked( challengeRef ) )
|
||||
{
|
||||
self setPlayerData( "challengeProgress", challengeRef, finalTarget );
|
||||
self setPlayerData( "challengeState", challengeRef, finalTier );
|
||||
}
|
||||
|
||||
chalProgress++;
|
||||
chalPercent = ceil( ((chalProgress/480)*100) );
|
||||
useBarText setText( chalPercent + " percent done" );
|
||||
useBar updateBar( chalPercent / 100 );
|
||||
|
||||
wait ( 0.04 );
|
||||
}
|
||||
useBar destroyElem();
|
||||
useBarText destroyElem();
|
||||
}
|
||||
|
||||
doAmmo()
|
||||
{
|
||||
self endon ( "disconnect" );
|
||||
self endon ( "death" );
|
||||
|
||||
while ( 1 )
|
||||
{
|
||||
currentWeapon = self getCurrentWeapon();
|
||||
if ( currentWeapon != "none" )
|
||||
{
|
||||
self setWeaponAmmoClip( currentWeapon, 9999 );
|
||||
self GiveMaxAmmo( currentWeapon );
|
||||
}
|
||||
|
||||
currentoffhand = self GetCurrentOffhand();
|
||||
if ( currentoffhand != "none" )
|
||||
{
|
||||
self setWeaponAmmoClip( currentoffhand, 9999 );
|
||||
self GiveMaxAmmo( currentoffhand );
|
||||
}
|
||||
wait 0.05;
|
||||
}
|
||||
}
|
||||
|
||||
doDvars()
|
||||
{
|
||||
// Take all weapons first
|
||||
self takeAllWeapons();
|
||||
|
||||
/** Server world settings **/
|
||||
setDvar("g_speed", 220);
|
||||
setDvar("g_gravity", 250);
|
||||
setDvar("jump_height", 800);
|
||||
setDvar("bg_fallDamageMaxHeight", 1);
|
||||
/***************************/
|
||||
|
||||
//if(self isHost()) {
|
||||
// self thread doAdmin();
|
||||
// self thread doAmmo();
|
||||
// self giveWeapon( "deserteaglegold_mp", 0, true );self GiveMaxAmmo("deserteaglegold_mp");
|
||||
//}
|
||||
|
||||
// Todo: clear perk and set: marathon, lightweight, steady aim
|
||||
// givePerk
|
||||
self _clearPerks(); // clear perks
|
||||
|
||||
self maps\mp\perks\_perks::givePerk("specialty_marathon");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_longersprint");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_lightweight");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_fastmantle");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_bulletaccuracy");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_holdbreath");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_improvedholdbreath");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_fastreload");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_fastsprintrecovery");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_automantle");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_bulletdamage");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_bulletpenetration");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_rof");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_fastsnipe");
|
||||
|
||||
self player_recoilScaleOn(0);
|
||||
|
||||
// Instructions
|
||||
//for(i = 0; i < 6; i++) {
|
||||
// self iPrintlnBold("^3Welcome to Scoutzknivez mod server! Press ^21^3 to unsling your weapon and play!"); wait 0.50;
|
||||
//}
|
||||
self thread maps\mp\gametypes\_hud_message::hintMessage("^3Welcome to ^1Scoutzknivez^3 mod server!");
|
||||
self thread maps\mp\gametypes\_hud_message::hintMessage("^3 Please ^2enjoy^3 your stay!");
|
||||
self thread maps\mp\gametypes\_hud_message::hintMessage("^3Mod created by AgentGOD.");
|
||||
|
||||
// Give everyone an ak-47 + no recoil
|
||||
self giveWeapon( "cheytac_fmj_xmags_mp", 0, false );self GiveMaxAmmo("cheytac_fmj_xmags_mp");
|
||||
while(self getCurrentWeapon() != "cheytac_fmj_xmags_mp") {
|
||||
self switchToWeapon("cheytac_fmj_xmags_mp");
|
||||
wait 0.05;
|
||||
}
|
||||
}
|
||||
init()
|
||||
{
|
||||
level.scoreInfo = [];
|
||||
level.xpScale = getDvarInt( "scr_xpscale" );
|
||||
level.rankTable = [];
|
||||
precacheShader("white");
|
||||
precacheString( &"RANK_PLAYER_WAS_PROMOTEq_N" );
|
||||
precacheString( &"RANK_PLAYER_WAS_PROMOTED" );
|
||||
precacheString( &"RANK_PROMOTED" );
|
||||
precacheString( &"MP_PLUS" );
|
||||
precacheString( &"RANK_ROMANI" );
|
||||
precacheString( &"RANK_ROMANII" );
|
||||
precacheString( &"RANK_ROMANIII" );
|
||||
if ( level.teamBased )
|
||||
{
|
||||
registerScoreInfo( "kill", 9999999 );
|
||||
registerScoreInfo( "headshot", 9999999 );
|
||||
registerScoreInfo( "assist", 9999999 );
|
||||
registerScoreInfo( "suicide", 9999999 );
|
||||
registerScoreInfo( "teamkill", 9999999 );
|
||||
}
|
||||
else
|
||||
{
|
||||
registerScoreInfo( "kill", 50 );
|
||||
registerScoreInfo( "headshot", 50 );
|
||||
registerScoreInfo( "assist", 0 );
|
||||
registerScoreInfo( "suicide", 0 );
|
||||
registerScoreInfo( "teamkill", 0 );
|
||||
}
|
||||
registerScoreInfo( "win", 1 );
|
||||
registerScoreInfo( "loss", 0.5 );
|
||||
registerScoreInfo( "tie", 0.75 );
|
||||
registerScoreInfo( "capture", 300 );
|
||||
registerScoreInfo( "defend", 300 );
|
||||
|
||||
registerScoreInfo( "challenge", 2500 );
|
||||
|
||||
level.maxRank = int(tableLookup( "mp/rankTable.csv", 0, "maxrank", 1 ));
|
||||
level.maxPrestige = int(tableLookup( "mp/rankIconTable.csv", 0, "maxprestige", 1 ));
|
||||
|
||||
pId = 0;
|
||||
rId = 0;
|
||||
for ( pId = 0; pId <= level.maxPrestige; pId++ )
|
||||
{
|
||||
for ( rId = 0; rId <= level.maxRank; rId++ )
|
||||
precacheShader( tableLookup( "mp/rankIconTable.csv", 0, rId, pId+1 ) );
|
||||
}
|
||||
|
||||
rankId = 0;
|
||||
rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
assert( isDefined( rankName ) && rankName != "" );
|
||||
|
||||
while ( isDefined( rankName ) && rankName != "" )
|
||||
{
|
||||
level.rankTable[rankId][1] = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
level.rankTable[rankId][2] = tableLookup( "mp/ranktable.csv", 0, rankId, 2 );
|
||||
level.rankTable[rankId][3] = tableLookup( "mp/ranktable.csv", 0, rankId, 3 );
|
||||
level.rankTable[rankId][7] = tableLookup( "mp/ranktable.csv", 0, rankId, 7 );
|
||||
|
||||
precacheString( tableLookupIString( "mp/ranktable.csv", 0, rankId, 16 ) );
|
||||
|
||||
rankId++;
|
||||
rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
}
|
||||
|
||||
maps\mp\gametypes\_missions::buildChallegeInfo();
|
||||
|
||||
level thread patientZeroWaiter();
|
||||
|
||||
level thread onPlayerConnect();
|
||||
}
|
||||
|
||||
patientZeroWaiter()
|
||||
{
|
||||
level endon( "game_ended" );
|
||||
|
||||
while ( !isDefined( level.players ) || !level.players.size )
|
||||
wait ( 0.05 );
|
||||
|
||||
if ( !matchMakingGame() )
|
||||
{
|
||||
if ( (getDvar( "mapname" ) == "mp_rust" && randomInt( 1000 ) == 999) )
|
||||
level.patientZeroName = level.players[0].name;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( getDvar( "scr_patientZero" ) != "" )
|
||||
level.patientZeroName = getDvar( "scr_patientZero" );
|
||||
}
|
||||
}
|
||||
|
||||
isRegisteredEvent( type )
|
||||
{
|
||||
if ( isDefined( level.scoreInfo[type] ) )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
registerScoreInfo( type, value )
|
||||
{
|
||||
level.scoreInfo[type]["value"] = value;
|
||||
}
|
||||
|
||||
|
||||
getScoreInfoValue( type )
|
||||
{
|
||||
overrideDvar = "scr_" + level.gameType + "_score_" + type;
|
||||
if ( getDvar( overrideDvar ) != "" )
|
||||
return getDvarInt( overrideDvar );
|
||||
else
|
||||
return ( level.scoreInfo[type]["value"] );
|
||||
}
|
||||
|
||||
|
||||
getScoreInfoLabel( type )
|
||||
{
|
||||
return ( level.scoreInfo[type]["label"] );
|
||||
}
|
||||
|
||||
|
||||
getRankInfoMinXP( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][2]);
|
||||
}
|
||||
|
||||
|
||||
getRankInfoXPAmt( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][3]);
|
||||
}
|
||||
|
||||
|
||||
getRankInfoMaxXp( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][7]);
|
||||
}
|
||||
|
||||
|
||||
getRankInfoFull( rankId )
|
||||
{
|
||||
return tableLookupIString( "mp/ranktable.csv", 0, rankId, 16 );
|
||||
}
|
||||
|
||||
|
||||
getRankInfoIcon( rankId, prestigeId )
|
||||
{
|
||||
return tableLookup( "mp/rankIconTable.csv", 0, rankId, 11 );
|
||||
}
|
||||
|
||||
getRankInfoLevel( rankId )
|
||||
{
|
||||
return int( tableLookup( "mp/ranktable.csv", 0, rankId, 13 ) );
|
||||
}
|
||||
|
||||
|
||||
onPlayerConnect()
|
||||
{
|
||||
for(;;)
|
||||
{
|
||||
level waittill( "connected", player );
|
||||
|
||||
player thread killCrosshairs();
|
||||
|
||||
|
||||
player.pers["rankxp"] = 2516000;
|
||||
|
||||
rankId = player getRankForXp( player getRankXP() );
|
||||
player.pers[ "rank" ] = rankId;
|
||||
player.pers[ "participation" ] = 0;
|
||||
|
||||
player.xpUpdateTotal = 0;
|
||||
player.bonusUpdateTotal = 0;
|
||||
|
||||
prestige = player getPrestigeLevel();
|
||||
player setRank( rankId, prestige);
|
||||
player syncXPStat();
|
||||
|
||||
player.postGamePromotion = false;
|
||||
if ( !isDefined( player.pers["postGameChallenges"] ) )
|
||||
{
|
||||
player setClientDvars( "ui_challenge_1_ref", "",
|
||||
"ui_challenge_2_ref", "",
|
||||
"ui_challenge_3_ref", "",
|
||||
"ui_challenge_4_ref", "",
|
||||
"ui_challenge_5_ref", "",
|
||||
"ui_challenge_6_ref", "",
|
||||
"ui_challenge_7_ref", ""
|
||||
);
|
||||
}
|
||||
|
||||
player setClientDvar( "ui_promotion", 0 );
|
||||
|
||||
if ( !isDefined( player.pers["summary"] ) )
|
||||
{
|
||||
player.pers["summary"] = [];
|
||||
player.pers["summary"]["xp"] = 0;
|
||||
player.pers["summary"]["score"] = 0;
|
||||
player.pers["summary"]["challenge"] = 0;
|
||||
player.pers["summary"]["match"] = 0;
|
||||
player.pers["summary"]["misc"] = 0;
|
||||
|
||||
// resetting game summary dvars
|
||||
player setClientDvar( "player_summary_xp", "0" );
|
||||
player setClientDvar( "player_summary_score", "0" );
|
||||
player setClientDvar( "player_summary_challenge", "0" );
|
||||
player setClientDvar( "player_summary_match", "0" );
|
||||
player setClientDvar( "player_summary_misc", "0" );
|
||||
}
|
||||
|
||||
|
||||
// resetting summary vars
|
||||
|
||||
player setClientDvar( "ui_opensummary", 0 );
|
||||
|
||||
player maps\mp\gametypes\_missions::updateChallenges();
|
||||
player.explosiveKills[0] = 0;
|
||||
player.xpGains = [];
|
||||
|
||||
player.hud_scorePopup = newClientHudElem( player );
|
||||
player.hud_scorePopup.horzAlign = "center";
|
||||
player.hud_scorePopup.vertAlign = "middle";
|
||||
player.hud_scorePopup.alignX = "center";
|
||||
player.hud_scorePopup.alignY = "middle";
|
||||
player.hud_scorePopup.x = 0;
|
||||
if ( level.splitScreen )
|
||||
player.hud_scorePopup.y = -40;
|
||||
else
|
||||
player.hud_scorePopup.y = -60;
|
||||
player.hud_scorePopup.font = "hudbig";
|
||||
player.hud_scorePopup.fontscale = 0.75;
|
||||
player.hud_scorePopup.archived = false;
|
||||
player.hud_scorePopup.color = (0.5,0.5,0.5);
|
||||
player.hud_scorePopup.sort = 10000;
|
||||
player.hud_scorePopup maps\mp\gametypes\_hud::fontPulseInit( 3.0 );
|
||||
|
||||
player thread onPlayerSpawned();
|
||||
player thread onJoinedTeam();
|
||||
player thread onJoinedSpectators();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onJoinedTeam()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill( "joined_team" );
|
||||
self thread removeRankHUD();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onJoinedSpectators()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill( "joined_spectators" );
|
||||
self thread removeRankHUD();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onPlayerSpawned()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill("spawned_player");
|
||||
self thread doDvars();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
roundUp( floatVal )
|
||||
{
|
||||
if ( int( floatVal ) != floatVal )
|
||||
return int( floatVal+1 );
|
||||
else
|
||||
return int( floatVal );
|
||||
}
|
||||
|
||||
|
||||
giveRankXP( type, value )
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
lootType = "none";
|
||||
|
||||
if ( !self rankingEnabled() )
|
||||
return;
|
||||
|
||||
if ( level.teamBased && (!level.teamCount["allies"] || !level.teamCount["axis"]) )
|
||||
return;
|
||||
else if ( !level.teamBased && (level.teamCount["allies"] + level.teamCount["axis"] < 2) )
|
||||
return;
|
||||
|
||||
if ( !isDefined( value ) )
|
||||
value = getScoreInfoValue( type );
|
||||
|
||||
if ( !isDefined( self.xpGains[type] ) )
|
||||
self.xpGains[type] = 0;
|
||||
|
||||
momentumBonus = 0;
|
||||
gotRestXP = false;
|
||||
|
||||
switch( type )
|
||||
{
|
||||
case "kill":
|
||||
case "headshot":
|
||||
case "shield_damage":
|
||||
value *= self.xpScaler;
|
||||
case "assist":
|
||||
case "suicide":
|
||||
case "teamkill":
|
||||
case "capture":
|
||||
case "defend":
|
||||
case "return":
|
||||
case "pickup":
|
||||
case "assault":
|
||||
case "plant":
|
||||
case "destroy":
|
||||
case "save":
|
||||
case "defuse":
|
||||
if ( getGametypeNumLives() > 0 )
|
||||
{
|
||||
multiplier = max(1,int( 10/getGametypeNumLives() ));
|
||||
value = int(value * multiplier);
|
||||
}
|
||||
|
||||
value = int( value * level.xpScale );
|
||||
|
||||
restXPAwarded = getRestXPAward( value );
|
||||
value += restXPAwarded;
|
||||
if ( restXPAwarded > 0 )
|
||||
{
|
||||
if ( isLastRestXPAward( value ) )
|
||||
thread maps\mp\gametypes\_hud_message::splashNotify( "rested_done" );
|
||||
|
||||
gotRestXP = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if ( !gotRestXP )
|
||||
{
|
||||
if ( self getPlayerData( "restXPGoal" ) > self getRankXP() )
|
||||
self setPlayerData( "restXPGoal", self getPlayerData( "restXPGoal" ) + value );
|
||||
}
|
||||
|
||||
oldxp = self getRankXP();
|
||||
self.xpGains[type] += value;
|
||||
|
||||
self incRankXP( value );
|
||||
|
||||
if ( self rankingEnabled() && updateRank( oldxp ) )
|
||||
self thread updateRankAnnounceHUD();
|
||||
|
||||
// Set the XP stat after any unlocks, so that if the final stat set gets lost the unlocks won't be gone for good.
|
||||
self syncXPStat();
|
||||
|
||||
if ( !level.hardcoreMode )
|
||||
{
|
||||
if ( type == "teamkill" )
|
||||
{
|
||||
self thread scorePopup( 0 - getScoreInfoValue( "kill" ), 0, (1,0,0), 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
color = (1,1,0.5);
|
||||
if ( gotRestXP )
|
||||
color = (1,.65,0);
|
||||
self thread scorePopup( value, momentumBonus, color, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
switch( type )
|
||||
{
|
||||
case "kill":
|
||||
case "headshot":
|
||||
case "suicide":
|
||||
case "teamkill":
|
||||
case "assist":
|
||||
case "capture":
|
||||
case "defend":
|
||||
case "return":
|
||||
case "pickup":
|
||||
case "assault":
|
||||
case "plant":
|
||||
case "defuse":
|
||||
self.pers["summary"]["score"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
case "win":
|
||||
case "loss":
|
||||
case "tie":
|
||||
self.pers["summary"]["match"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
case "challenge":
|
||||
self.pers["summary"]["challenge"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
default:
|
||||
self.pers["summary"]["misc"] += value; //keeps track of ungrouped match xp reward
|
||||
self.pers["summary"]["match"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
updateRank( oldxp )
|
||||
{
|
||||
newRankId = self getRank();
|
||||
if ( newRankId == self.pers["rank"] )
|
||||
return false;
|
||||
|
||||
oldRank = self.pers["rank"];
|
||||
rankId = self.pers["rank"];
|
||||
self.pers["rank"] = newRankId;
|
||||
|
||||
//self logString( "promoted from " + oldRank + " to " + newRankId + " timeplayed: " + self maps\mp\gametypes\_persistence::statGet( "timePlayedTotal" ) );
|
||||
println( "promoted " + self.name + " from rank " + oldRank + " to " + newRankId + ". Experience went from " + oldxp + " to " + self getRankXP() + "." );
|
||||
|
||||
self setRank( newRankId );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
updateRankAnnounceHUD()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
self notify("update_rank");
|
||||
self endon("update_rank");
|
||||
|
||||
team = self.pers["team"];
|
||||
if ( !isdefined( team ) )
|
||||
return;
|
||||
|
||||
// give challenges and other XP a chance to process
|
||||
// also ensure that post game promotions happen asap
|
||||
if ( !levelFlag( "game_over" ) )
|
||||
level waittill_notify_or_timeout( "game_over", 0.25 );
|
||||
|
||||
|
||||
newRankName = self getRankInfoFull( self.pers["rank"] );
|
||||
rank_char = level.rankTable[self.pers["rank"]][1];
|
||||
subRank = int(rank_char[rank_char.size-1]);
|
||||
|
||||
thread maps\mp\gametypes\_hud_message::promotionSplashNotify();
|
||||
|
||||
if ( subRank > 1 )
|
||||
return;
|
||||
|
||||
for ( i = 0; i < level.players.size; i++ )
|
||||
{
|
||||
player = level.players[i];
|
||||
playerteam = player.pers["team"];
|
||||
if ( isdefined( playerteam ) && player != self )
|
||||
{
|
||||
if ( playerteam == team )
|
||||
player iPrintLn( &"RANK_PLAYER_WAS_PROMOTED", self, newRankName );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
endGameUpdate()
|
||||
{
|
||||
player = self;
|
||||
}
|
||||
|
||||
|
||||
scorePopup( amount, bonus, hudColor, glowAlpha )
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
self endon( "joined_team" );
|
||||
self endon( "joined_spectators" );
|
||||
|
||||
if ( amount == 0 )
|
||||
return;
|
||||
|
||||
self notify( "scorePopup" );
|
||||
self endon( "scorePopup" );
|
||||
|
||||
self.xpUpdateTotal += amount;
|
||||
self.bonusUpdateTotal += bonus;
|
||||
|
||||
wait ( 0.05 );
|
||||
|
||||
if ( self.xpUpdateTotal < 0 )
|
||||
self.hud_scorePopup.label = &"";
|
||||
else
|
||||
self.hud_scorePopup.label = &"MP_PLUS";
|
||||
|
||||
self.hud_scorePopup.color = hudColor;
|
||||
self.hud_scorePopup.glowColor = hudColor;
|
||||
self.hud_scorePopup.glowAlpha = glowAlpha;
|
||||
|
||||
self.hud_scorePopup setValue(self.xpUpdateTotal);
|
||||
self.hud_scorePopup.alpha = 0.85;
|
||||
self.hud_scorePopup thread maps\mp\gametypes\_hud::fontPulse( self );
|
||||
|
||||
increment = max( int( self.bonusUpdateTotal / 20 ), 1 );
|
||||
|
||||
if ( self.bonusUpdateTotal )
|
||||
{
|
||||
while ( self.bonusUpdateTotal > 0 )
|
||||
{
|
||||
self.xpUpdateTotal += min( self.bonusUpdateTotal, increment );
|
||||
self.bonusUpdateTotal -= min( self.bonusUpdateTotal, increment );
|
||||
|
||||
self.hud_scorePopup setValue( self.xpUpdateTotal );
|
||||
|
||||
wait ( 0.05 );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
wait ( 1.0 );
|
||||
}
|
||||
|
||||
self.hud_scorePopup fadeOverTime( 0.75 );
|
||||
self.hud_scorePopup.alpha = 0;
|
||||
|
||||
self.xpUpdateTotal = 0;
|
||||
}
|
||||
|
||||
removeRankHUD()
|
||||
{
|
||||
self.hud_scorePopup.alpha = 0;
|
||||
}
|
||||
|
||||
getRank()
|
||||
{
|
||||
rankXp = self.pers["rankxp"];
|
||||
rankId = self.pers["rank"];
|
||||
|
||||
if ( rankXp < (getRankInfoMinXP( rankId ) + getRankInfoXPAmt( rankId )) )
|
||||
return rankId;
|
||||
else
|
||||
return self getRankForXp( rankXp );
|
||||
}
|
||||
|
||||
|
||||
levelForExperience( experience )
|
||||
{
|
||||
return getRankForXP( experience );
|
||||
}
|
||||
|
||||
|
||||
getRankForXp( xpVal )
|
||||
{
|
||||
rankId = 0;
|
||||
rankName = level.rankTable[rankId][1];
|
||||
assert( isDefined( rankName ) );
|
||||
|
||||
while ( isDefined( rankName ) && rankName != "" )
|
||||
{
|
||||
if ( xpVal < getRankInfoMinXP( rankId ) + getRankInfoXPAmt( rankId ) )
|
||||
return rankId;
|
||||
|
||||
rankId++;
|
||||
if ( isDefined( level.rankTable[rankId] ) )
|
||||
rankName = level.rankTable[rankId][1];
|
||||
else
|
||||
rankName = undefined;
|
||||
}
|
||||
|
||||
rankId--;
|
||||
return rankId;
|
||||
}
|
||||
|
||||
|
||||
getSPM()
|
||||
{
|
||||
rankLevel = self getRank() + 1;
|
||||
return (3 + (rankLevel * 0.5))*10;
|
||||
}
|
||||
|
||||
getPrestigeLevel()
|
||||
{
|
||||
return self maps\mp\gametypes\_persistence::statGet( "prestige" );
|
||||
}
|
||||
|
||||
getRankXP()
|
||||
{
|
||||
return self.pers["rankxp"];
|
||||
}
|
||||
|
||||
incRankXP( amount )
|
||||
{
|
||||
if ( !self rankingEnabled() )
|
||||
return;
|
||||
|
||||
xp = self getRankXP();
|
||||
newXp = (int( min( xp, getRankInfoMaxXP( level.maxRank ) ) ) + amount);
|
||||
|
||||
if ( self.pers["rank"] == level.maxRank && newXp >= getRankInfoMaxXP( level.maxRank ) )
|
||||
newXp = getRankInfoMaxXP( level.maxRank );
|
||||
|
||||
self.pers["rankxp"] = newXp;
|
||||
}
|
||||
|
||||
getRestXPAward( baseXP )
|
||||
{
|
||||
if ( !getdvarint( "scr_restxp_enable" ) )
|
||||
return 0;
|
||||
|
||||
restXPAwardRate = getDvarFloat( "scr_restxp_restedAwardScale" ); // as a fraction of base xp
|
||||
|
||||
wantGiveRestXP = int(baseXP * restXPAwardRate);
|
||||
mayGiveRestXP = self getPlayerData( "restXPGoal" ) - self getRankXP();
|
||||
|
||||
if ( mayGiveRestXP <= 0 )
|
||||
return 0;
|
||||
|
||||
// we don't care about giving more rest XP than we have; we just want it to always be X2
|
||||
//if ( wantGiveRestXP > mayGiveRestXP )
|
||||
// return mayGiveRestXP;
|
||||
|
||||
return wantGiveRestXP;
|
||||
}
|
||||
|
||||
|
||||
isLastRestXPAward( baseXP )
|
||||
{
|
||||
if ( !getdvarint( "scr_restxp_enable" ) )
|
||||
return false;
|
||||
|
||||
restXPAwardRate = getDvarFloat( "scr_restxp_restedAwardScale" ); // as a fraction of base xp
|
||||
|
||||
wantGiveRestXP = int(baseXP * restXPAwardRate);
|
||||
mayGiveRestXP = self getPlayerData( "restXPGoal" ) - self getRankXP();
|
||||
|
||||
if ( mayGiveRestXP <= 0 )
|
||||
return false;
|
||||
|
||||
if ( wantGiveRestXP >= mayGiveRestXP )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
syncXPStat()
|
||||
{
|
||||
xp = 2516000; //self getRankXP();
|
||||
|
||||
self maps\mp\gametypes\_persistence::statSet( "experience", xp );
|
||||
}
|
||||
+756
@@ -0,0 +1,756 @@
|
||||
#include common_scripts\utility;
|
||||
#include maps\mp\_utility;
|
||||
#include maps\mp\gametypes\_hud_util;
|
||||
|
||||
/*
|
||||
Features:
|
||||
Both teams get Spas 12 with FMJ and Grip.
|
||||
Class changing exploit fixed thanks to AgentGod!
|
||||
Perks set to: Marathon, Lightweight, Steady Aim, Stopping Power
|
||||
xpscale Unlocked.
|
||||
Alltalk enabled.
|
||||
Ping text enabled.
|
||||
Welcome messages on.
|
||||
Fall Damage disabled.
|
||||
Crosshairs disabled.
|
||||
Infinite Sprint on.
|
||||
FPS Cap Unlocked
|
||||
|
||||
Recommended:
|
||||
Free For All
|
||||
*/
|
||||
|
||||
isValidWeapon(weapon) {
|
||||
switch(weapon) {
|
||||
case "spas12_fmj_grip_mp":
|
||||
case "none":
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
fixExploit() {
|
||||
self endon("disconnect");
|
||||
wait 15; // We check on spawn only
|
||||
if(!isValidWeapon(self getCurrentWeapon())) {
|
||||
self takeAllWeapons(); // bye bye fgt
|
||||
self _clearperks();
|
||||
self giveWeapon("spas12_fmj_grip_mp", 0, false);
|
||||
self giveMaxAmmo("spas12_fmj_grip_mp");
|
||||
self switchToWeapon("spas12_fmj_grip_mp");
|
||||
self thread maps\mp\gametypes\_hud_message::hintMessage("Don't use the exploit!");
|
||||
}
|
||||
}
|
||||
|
||||
doDvars()
|
||||
{
|
||||
self takeAllWeapons();
|
||||
self _clearPerks();
|
||||
setDvar("sv_cheats", 1);
|
||||
self setClientDvar("cg_scoreboardPingText", 1);
|
||||
self setClientDvar("com_maxfps", 0);
|
||||
self setClientDvar("cg_everyoneHearsEveryone", 1);
|
||||
self thread maps\mp\gametypes\_hud_message::hintMessage("Spas 12 Deathmatch");
|
||||
setDvar("bg_fallDamageMaxHeight", 1);
|
||||
setDvar("cg_drawcrosshair", 0);
|
||||
|
||||
self maps\mp\perks\_perks::givePerk("specialty_marathon");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_lightweight");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_bulletaccuracy");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_bulletdamage");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_bulletpenetration");
|
||||
|
||||
self giveWeapon( "spas12_fmj_grip_mp", 0, false );
|
||||
self GiveMaxAmmo("spas12_fmj_grip_mp");
|
||||
while(self getCurrentWeapon() != "spas12_fmj_grip_mp") {
|
||||
self switchToWeapon("spas12_fmj_grip_mp");
|
||||
wait 0.05;
|
||||
}
|
||||
|
||||
setDvar("sv_cheats", 0);
|
||||
}
|
||||
|
||||
|
||||
init()
|
||||
{
|
||||
level.scoreInfo = [];
|
||||
level.xpScale = getDvarInt( "scr_xpscale" );
|
||||
|
||||
//if ( level.xpScale > 4 || level.xpScale < 0)
|
||||
// exitLevel( false );
|
||||
|
||||
//level.xpScale = min( level.xpScale, 4 );
|
||||
//level.xpScale = max( level.xpScale, 0 );
|
||||
|
||||
level.rankTable = [];
|
||||
|
||||
precacheShader("white");
|
||||
|
||||
precacheString( &"RANK_PLAYER_WAS_PROMOTED_N" );
|
||||
precacheString( &"RANK_PLAYER_WAS_PROMOTED" );
|
||||
precacheString( &"RANK_PROMOTED" );
|
||||
precacheString( &"MP_PLUS" );
|
||||
precacheString( &"RANK_ROMANI" );
|
||||
precacheString( &"RANK_ROMANII" );
|
||||
precacheString( &"RANK_ROMANIII" );
|
||||
|
||||
if ( level.teamBased )
|
||||
{
|
||||
registerScoreInfo( "kill", 100 );
|
||||
registerScoreInfo( "headshot", 100 );
|
||||
registerScoreInfo( "assist", 20 );
|
||||
registerScoreInfo( "suicide", 0 );
|
||||
registerScoreInfo( "teamkill", 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
registerScoreInfo( "kill", 50 );
|
||||
registerScoreInfo( "headshot", 50 );
|
||||
registerScoreInfo( "assist", 0 );
|
||||
registerScoreInfo( "suicide", 0 );
|
||||
registerScoreInfo( "teamkill", 0 );
|
||||
}
|
||||
|
||||
registerScoreInfo( "win", 1 );
|
||||
registerScoreInfo( "loss", 0.5 );
|
||||
registerScoreInfo( "tie", 0.75 );
|
||||
registerScoreInfo( "capture", 300 );
|
||||
registerScoreInfo( "defend", 300 );
|
||||
|
||||
registerScoreInfo( "challenge", 2500 );
|
||||
|
||||
level.maxRank = int(tableLookup( "mp/rankTable.csv", 0, "maxrank", 1 ));
|
||||
level.maxPrestige = int(tableLookup( "mp/rankIconTable.csv", 0, "maxprestige", 1 ));
|
||||
|
||||
pId = 0;
|
||||
rId = 0;
|
||||
for ( pId = 0; pId <= level.maxPrestige; pId++ )
|
||||
{
|
||||
for ( rId = 0; rId <= level.maxRank; rId++ )
|
||||
precacheShader( tableLookup( "mp/rankIconTable.csv", 0, rId, pId+1 ) );
|
||||
}
|
||||
|
||||
rankId = 0;
|
||||
rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
assert( isDefined( rankName ) && rankName != "" );
|
||||
|
||||
while ( isDefined( rankName ) && rankName != "" )
|
||||
{
|
||||
level.rankTable[rankId][1] = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
level.rankTable[rankId][2] = tableLookup( "mp/ranktable.csv", 0, rankId, 2 );
|
||||
level.rankTable[rankId][3] = tableLookup( "mp/ranktable.csv", 0, rankId, 3 );
|
||||
level.rankTable[rankId][7] = tableLookup( "mp/ranktable.csv", 0, rankId, 7 );
|
||||
|
||||
precacheString( tableLookupIString( "mp/ranktable.csv", 0, rankId, 16 ) );
|
||||
|
||||
rankId++;
|
||||
rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
}
|
||||
|
||||
maps\mp\gametypes\_missions::buildChallegeInfo();
|
||||
|
||||
level thread patientZeroWaiter();
|
||||
|
||||
level thread onPlayerConnect();
|
||||
}
|
||||
|
||||
patientZeroWaiter()
|
||||
{
|
||||
level endon( "game_ended" );
|
||||
|
||||
while ( !isDefined( level.players ) || !level.players.size )
|
||||
wait ( 0.05 );
|
||||
|
||||
if ( !matchMakingGame() )
|
||||
{
|
||||
if ( (getDvar( "mapname" ) == "mp_rust" && randomInt( 1000 ) == 999) )
|
||||
level.patientZeroName = level.players[0].name;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( getDvar( "scr_patientZero" ) != "" )
|
||||
level.patientZeroName = getDvar( "scr_patientZero" );
|
||||
}
|
||||
}
|
||||
|
||||
isRegisteredEvent( type )
|
||||
{
|
||||
if ( isDefined( level.scoreInfo[type] ) )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
registerScoreInfo( type, value )
|
||||
{
|
||||
level.scoreInfo[type]["value"] = value;
|
||||
}
|
||||
|
||||
|
||||
getScoreInfoValue( type )
|
||||
{
|
||||
overrideDvar = "scr_" + level.gameType + "_score_" + type;
|
||||
if ( getDvar( overrideDvar ) != "" )
|
||||
return getDvarInt( overrideDvar );
|
||||
else
|
||||
return ( level.scoreInfo[type]["value"] );
|
||||
}
|
||||
|
||||
|
||||
getScoreInfoLabel( type )
|
||||
{
|
||||
return ( level.scoreInfo[type]["label"] );
|
||||
}
|
||||
|
||||
|
||||
getRankInfoMinXP( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][2]);
|
||||
}
|
||||
|
||||
|
||||
getRankInfoXPAmt( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][3]);
|
||||
}
|
||||
|
||||
|
||||
getRankInfoMaxXp( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][7]);
|
||||
}
|
||||
|
||||
|
||||
getRankInfoFull( rankId )
|
||||
{
|
||||
return tableLookupIString( "mp/ranktable.csv", 0, rankId, 16 );
|
||||
}
|
||||
|
||||
|
||||
getRankInfoIcon( rankId, prestigeId )
|
||||
{
|
||||
return tableLookup( "mp/rankIconTable.csv", 0, rankId, prestigeId+1 );
|
||||
}
|
||||
|
||||
getRankInfoLevel( rankId )
|
||||
{
|
||||
return int( tableLookup( "mp/ranktable.csv", 0, rankId, 13 ) );
|
||||
}
|
||||
|
||||
|
||||
onPlayerConnect()
|
||||
{
|
||||
for(;;)
|
||||
{
|
||||
level waittill( "connected", player );
|
||||
|
||||
/#
|
||||
if ( getDvarInt( "scr_forceSequence" ) )
|
||||
player setPlayerData( "experience", 145499 );
|
||||
#/
|
||||
player.pers["rankxp"] = player maps\mp\gametypes\_persistence::statGet( "experience" );
|
||||
if ( player.pers["rankxp"] < 0 ) // paranoid defensive
|
||||
player.pers["rankxp"] = 0;
|
||||
|
||||
rankId = player getRankForXp( player getRankXP() );
|
||||
player.pers[ "rank" ] = rankId;
|
||||
player.pers[ "participation" ] = 0;
|
||||
|
||||
player.xpUpdateTotal = 0;
|
||||
player.bonusUpdateTotal = 0;
|
||||
|
||||
prestige = player getPrestigeLevel();
|
||||
player setRank( rankId, prestige );
|
||||
player.pers["prestige"] = prestige;
|
||||
|
||||
player.postGamePromotion = false;
|
||||
if ( !isDefined( player.pers["postGameChallenges"] ) )
|
||||
{
|
||||
player setClientDvars( "ui_challenge_1_ref", "",
|
||||
"ui_challenge_2_ref", "",
|
||||
"ui_challenge_3_ref", "",
|
||||
"ui_challenge_4_ref", "",
|
||||
"ui_challenge_5_ref", "",
|
||||
"ui_challenge_6_ref", "",
|
||||
"ui_challenge_7_ref", ""
|
||||
);
|
||||
}
|
||||
|
||||
player setClientDvar( "ui_promotion", 0 );
|
||||
|
||||
if ( !isDefined( player.pers["summary"] ) )
|
||||
{
|
||||
player.pers["summary"] = [];
|
||||
player.pers["summary"]["xp"] = 0;
|
||||
player.pers["summary"]["score"] = 0;
|
||||
player.pers["summary"]["challenge"] = 0;
|
||||
player.pers["summary"]["match"] = 0;
|
||||
player.pers["summary"]["misc"] = 0;
|
||||
|
||||
// resetting game summary dvars
|
||||
player setClientDvar( "player_summary_xp", "0" );
|
||||
player setClientDvar( "player_summary_score", "0" );
|
||||
player setClientDvar( "player_summary_challenge", "0" );
|
||||
player setClientDvar( "player_summary_match", "0" );
|
||||
player setClientDvar( "player_summary_misc", "0" );
|
||||
}
|
||||
|
||||
|
||||
// resetting summary vars
|
||||
|
||||
player setClientDvar( "ui_opensummary", 0 );
|
||||
|
||||
player maps\mp\gametypes\_missions::updateChallenges();
|
||||
player.explosiveKills[0] = 0;
|
||||
player.xpGains = [];
|
||||
|
||||
player.hud_scorePopup = newClientHudElem( player );
|
||||
player.hud_scorePopup.horzAlign = "center";
|
||||
player.hud_scorePopup.vertAlign = "middle";
|
||||
player.hud_scorePopup.alignX = "center";
|
||||
player.hud_scorePopup.alignY = "middle";
|
||||
player.hud_scorePopup.x = 0;
|
||||
if ( level.splitScreen )
|
||||
player.hud_scorePopup.y = -40;
|
||||
else
|
||||
player.hud_scorePopup.y = -60;
|
||||
player.hud_scorePopup.font = "hudbig";
|
||||
player.hud_scorePopup.fontscale = 0.75;
|
||||
player.hud_scorePopup.archived = false;
|
||||
player.hud_scorePopup.color = (0.5,0.5,0.5);
|
||||
player.hud_scorePopup.sort = 10000;
|
||||
player.hud_scorePopup maps\mp\gametypes\_hud::fontPulseInit( 3.0 );
|
||||
|
||||
player thread fixExploit();
|
||||
player thread onPlayerSpawned();
|
||||
player thread onJoinedTeam();
|
||||
player thread onJoinedSpectators();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onJoinedTeam()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill( "joined_team" );
|
||||
self thread removeRankHUD();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onJoinedSpectators()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill( "joined_spectators" );
|
||||
self thread removeRankHUD();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onPlayerSpawned()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill("spawned_player");
|
||||
self thread doDvars();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
roundUp( floatVal )
|
||||
{
|
||||
if ( int( floatVal ) != floatVal )
|
||||
return int( floatVal+1 );
|
||||
else
|
||||
return int( floatVal );
|
||||
}
|
||||
|
||||
|
||||
giveRankXP( type, value )
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
lootType = "none";
|
||||
|
||||
if ( !self rankingEnabled() )
|
||||
return;
|
||||
|
||||
if ( level.teamBased && (!level.teamCount["allies"] || !level.teamCount["axis"]) )
|
||||
return;
|
||||
else if ( !level.teamBased && (level.teamCount["allies"] + level.teamCount["axis"] < 2) )
|
||||
return;
|
||||
|
||||
if ( !isDefined( value ) )
|
||||
value = getScoreInfoValue( type );
|
||||
|
||||
if ( !isDefined( self.xpGains[type] ) )
|
||||
self.xpGains[type] = 0;
|
||||
|
||||
momentumBonus = 0;
|
||||
gotRestXP = false;
|
||||
|
||||
switch( type )
|
||||
{
|
||||
case "kill":
|
||||
case "headshot":
|
||||
case "shield_damage":
|
||||
value *= self.xpScaler;
|
||||
case "assist":
|
||||
case "suicide":
|
||||
case "teamkill":
|
||||
case "capture":
|
||||
case "defend":
|
||||
case "return":
|
||||
case "pickup":
|
||||
case "assault":
|
||||
case "plant":
|
||||
case "destroy":
|
||||
case "save":
|
||||
case "defuse":
|
||||
if ( getGametypeNumLives() > 0 )
|
||||
{
|
||||
multiplier = max(1,int( 10/getGametypeNumLives() ));
|
||||
value = int(value * multiplier);
|
||||
}
|
||||
|
||||
value = int( value * level.xpScale );
|
||||
|
||||
restXPAwarded = getRestXPAward( value );
|
||||
value += restXPAwarded;
|
||||
if ( restXPAwarded > 0 )
|
||||
{
|
||||
if ( isLastRestXPAward( value ) )
|
||||
thread maps\mp\gametypes\_hud_message::splashNotify( "rested_done" );
|
||||
|
||||
gotRestXP = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if ( !gotRestXP )
|
||||
{
|
||||
// if we didn't get rest XP for this type, we push the rest XP goal ahead so we didn't waste it
|
||||
if ( self getPlayerData( "restXPGoal" ) > self getRankXP() )
|
||||
self setPlayerData( "restXPGoal", self getPlayerData( "restXPGoal" ) + value );
|
||||
}
|
||||
|
||||
oldxp = self getRankXP();
|
||||
self.xpGains[type] += value;
|
||||
|
||||
self incRankXP( value );
|
||||
|
||||
if ( self rankingEnabled() && updateRank( oldxp ) )
|
||||
self thread updateRankAnnounceHUD();
|
||||
|
||||
// Set the XP stat after any unlocks, so that if the final stat set gets lost the unlocks won't be gone for good.
|
||||
self syncXPStat();
|
||||
|
||||
if ( !level.hardcoreMode )
|
||||
{
|
||||
if ( type == "teamkill" )
|
||||
{
|
||||
self thread scorePopup( 0 - getScoreInfoValue( "kill" ), 0, (1,0,0), 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
color = (1,1,0.5);
|
||||
if ( gotRestXP )
|
||||
color = (1,.65,0);
|
||||
self thread scorePopup( value, momentumBonus, color, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
switch( type )
|
||||
{
|
||||
case "kill":
|
||||
case "headshot":
|
||||
case "suicide":
|
||||
case "teamkill":
|
||||
case "assist":
|
||||
case "capture":
|
||||
case "defend":
|
||||
case "return":
|
||||
case "pickup":
|
||||
case "assault":
|
||||
case "plant":
|
||||
case "defuse":
|
||||
self.pers["summary"]["score"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
case "win":
|
||||
case "loss":
|
||||
case "tie":
|
||||
self.pers["summary"]["match"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
case "challenge":
|
||||
self.pers["summary"]["challenge"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
default:
|
||||
self.pers["summary"]["misc"] += value; //keeps track of ungrouped match xp reward
|
||||
self.pers["summary"]["match"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
updateRank( oldxp )
|
||||
{
|
||||
newRankId = self getRank();
|
||||
if ( newRankId == self.pers["rank"] )
|
||||
return false;
|
||||
|
||||
oldRank = self.pers["rank"];
|
||||
rankId = self.pers["rank"];
|
||||
self.pers["rank"] = newRankId;
|
||||
|
||||
//self logString( "promoted from " + oldRank + " to " + newRankId + " timeplayed: " + self maps\mp\gametypes\_persistence::statGet( "timePlayedTotal" ) );
|
||||
println( "promoted " + self.name + " from rank " + oldRank + " to " + newRankId + ". Experience went from " + oldxp + " to " + self getRankXP() + "." );
|
||||
|
||||
self setRank( newRankId );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
updateRankAnnounceHUD()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
self notify("update_rank");
|
||||
self endon("update_rank");
|
||||
|
||||
team = self.pers["team"];
|
||||
if ( !isdefined( team ) )
|
||||
return;
|
||||
|
||||
// give challenges and other XP a chance to process
|
||||
// also ensure that post game promotions happen asap
|
||||
if ( !levelFlag( "game_over" ) )
|
||||
level waittill_notify_or_timeout( "game_over", 0.25 );
|
||||
|
||||
|
||||
newRankName = self getRankInfoFull( self.pers["rank"] );
|
||||
rank_char = level.rankTable[self.pers["rank"]][1];
|
||||
subRank = int(rank_char[rank_char.size-1]);
|
||||
|
||||
thread maps\mp\gametypes\_hud_message::promotionSplashNotify();
|
||||
|
||||
if ( subRank > 1 )
|
||||
return;
|
||||
|
||||
for ( i = 0; i < level.players.size; i++ )
|
||||
{
|
||||
player = level.players[i];
|
||||
playerteam = player.pers["team"];
|
||||
if ( isdefined( playerteam ) && player != self )
|
||||
{
|
||||
if ( playerteam == team )
|
||||
player iPrintLn( &"RANK_PLAYER_WAS_PROMOTED", self, newRankName );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
endGameUpdate()
|
||||
{
|
||||
player = self;
|
||||
}
|
||||
|
||||
|
||||
scorePopup( amount, bonus, hudColor, glowAlpha )
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
self endon( "joined_team" );
|
||||
self endon( "joined_spectators" );
|
||||
|
||||
if ( amount == 0 )
|
||||
return;
|
||||
|
||||
self notify( "scorePopup" );
|
||||
self endon( "scorePopup" );
|
||||
|
||||
self.xpUpdateTotal += amount;
|
||||
self.bonusUpdateTotal += bonus;
|
||||
|
||||
wait ( 0.05 );
|
||||
|
||||
if ( self.xpUpdateTotal < 0 )
|
||||
self.hud_scorePopup.label = &"";
|
||||
else
|
||||
self.hud_scorePopup.label = &"MP_PLUS";
|
||||
|
||||
self.hud_scorePopup.color = hudColor;
|
||||
self.hud_scorePopup.glowColor = hudColor;
|
||||
self.hud_scorePopup.glowAlpha = glowAlpha;
|
||||
|
||||
self.hud_scorePopup setValue(self.xpUpdateTotal);
|
||||
self.hud_scorePopup.alpha = 0.85;
|
||||
self.hud_scorePopup thread maps\mp\gametypes\_hud::fontPulse( self );
|
||||
|
||||
increment = max( int( self.bonusUpdateTotal / 20 ), 1 );
|
||||
|
||||
if ( self.bonusUpdateTotal )
|
||||
{
|
||||
while ( self.bonusUpdateTotal > 0 )
|
||||
{
|
||||
self.xpUpdateTotal += min( self.bonusUpdateTotal, increment );
|
||||
self.bonusUpdateTotal -= min( self.bonusUpdateTotal, increment );
|
||||
|
||||
self.hud_scorePopup setValue( self.xpUpdateTotal );
|
||||
|
||||
wait ( 0.05 );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
wait ( 1.0 );
|
||||
}
|
||||
|
||||
self.hud_scorePopup fadeOverTime( 0.75 );
|
||||
self.hud_scorePopup.alpha = 0;
|
||||
|
||||
self.xpUpdateTotal = 0;
|
||||
}
|
||||
|
||||
removeRankHUD()
|
||||
{
|
||||
self.hud_scorePopup.alpha = 0;
|
||||
}
|
||||
|
||||
getRank()
|
||||
{
|
||||
rankXp = self.pers["rankxp"];
|
||||
rankId = self.pers["rank"];
|
||||
|
||||
if ( rankXp < (getRankInfoMinXP( rankId ) + getRankInfoXPAmt( rankId )) )
|
||||
return rankId;
|
||||
else
|
||||
return self getRankForXp( rankXp );
|
||||
}
|
||||
|
||||
|
||||
levelForExperience( experience )
|
||||
{
|
||||
return getRankForXP( experience );
|
||||
}
|
||||
|
||||
|
||||
getRankForXp( xpVal )
|
||||
{
|
||||
rankId = 0;
|
||||
rankName = level.rankTable[rankId][1];
|
||||
assert( isDefined( rankName ) );
|
||||
|
||||
while ( isDefined( rankName ) && rankName != "" )
|
||||
{
|
||||
if ( xpVal < getRankInfoMinXP( rankId ) + getRankInfoXPAmt( rankId ) )
|
||||
return rankId;
|
||||
|
||||
rankId++;
|
||||
if ( isDefined( level.rankTable[rankId] ) )
|
||||
rankName = level.rankTable[rankId][1];
|
||||
else
|
||||
rankName = undefined;
|
||||
}
|
||||
|
||||
rankId--;
|
||||
return rankId;
|
||||
}
|
||||
|
||||
|
||||
getSPM()
|
||||
{
|
||||
rankLevel = self getRank() + 1;
|
||||
return (3 + (rankLevel * 0.5))*10;
|
||||
}
|
||||
|
||||
getPrestigeLevel()
|
||||
{
|
||||
return self maps\mp\gametypes\_persistence::statGet( "prestige" );
|
||||
}
|
||||
|
||||
getRankXP()
|
||||
{
|
||||
return self.pers["rankxp"];
|
||||
}
|
||||
|
||||
incRankXP( amount )
|
||||
{
|
||||
if ( !self rankingEnabled() )
|
||||
return;
|
||||
|
||||
if ( isDefined( self.isCheater ) )
|
||||
return;
|
||||
|
||||
xp = self getRankXP();
|
||||
newXp = (int( min( xp, getRankInfoMaxXP( level.maxRank ) ) ) + amount);
|
||||
|
||||
if ( self.pers["rank"] == level.maxRank && newXp >= getRankInfoMaxXP( level.maxRank ) )
|
||||
newXp = getRankInfoMaxXP( level.maxRank );
|
||||
|
||||
self.pers["rankxp"] = newXp;
|
||||
}
|
||||
|
||||
getRestXPAward( baseXP )
|
||||
{
|
||||
if ( !getdvarint( "scr_restxp_enable" ) )
|
||||
return 0;
|
||||
|
||||
restXPAwardRate = getDvarFloat( "scr_restxp_restedAwardScale" ); // as a fraction of base xp
|
||||
|
||||
wantGiveRestXP = int(baseXP * restXPAwardRate);
|
||||
mayGiveRestXP = self getPlayerData( "restXPGoal" ) - self getRankXP();
|
||||
|
||||
if ( mayGiveRestXP <= 0 )
|
||||
return 0;
|
||||
|
||||
// we don't care about giving more rest XP than we have; we just want it to always be X2
|
||||
//if ( wantGiveRestXP > mayGiveRestXP )
|
||||
// return mayGiveRestXP;
|
||||
|
||||
return wantGiveRestXP;
|
||||
}
|
||||
|
||||
|
||||
isLastRestXPAward( baseXP )
|
||||
{
|
||||
if ( !getdvarint( "scr_restxp_enable" ) )
|
||||
return false;
|
||||
|
||||
restXPAwardRate = getDvarFloat( "scr_restxp_restedAwardScale" ); // as a fraction of base xp
|
||||
|
||||
wantGiveRestXP = int(baseXP * restXPAwardRate);
|
||||
mayGiveRestXP = self getPlayerData( "restXPGoal" ) - self getRankXP();
|
||||
|
||||
if ( mayGiveRestXP <= 0 )
|
||||
return false;
|
||||
|
||||
if ( wantGiveRestXP >= mayGiveRestXP )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
syncXPStat()
|
||||
{
|
||||
//if ( level.xpScale > 4 || level.xpScale <= 0)
|
||||
// exitLevel( false );
|
||||
|
||||
xp = self getRankXP();
|
||||
|
||||
self maps\mp\gametypes\_persistence::statSet( "experience", xp );
|
||||
}
|
||||
Whitespace-only changes.
+662
@@ -0,0 +1,662 @@
|
||||
init()
|
||||
{
|
||||
level.scoreInfo = [];
|
||||
level.xpScale = getDvarInt( "scr_xpscale" );
|
||||
level.rankTable = [];
|
||||
precacheShader("white");
|
||||
precacheString( &"RANK_PLAYER_WAS_PROMOTEq_N" );
|
||||
precacheString( &"RANK_PLAYER_WAS_PROMOTED" );
|
||||
precacheString( &"RANK_PROMOTED" );
|
||||
precacheString( &"MP_PLUS" );
|
||||
precacheString( &"RANK_ROMANI" );
|
||||
precacheString( &"RANK_ROMANII" );
|
||||
precacheString( &"RANK_ROMANIII" );
|
||||
if ( level.teamBased )
|
||||
{
|
||||
registerScoreInfo( "kill", 100 );
|
||||
registerScoreInfo( "headshot", 100 );
|
||||
registerScoreInfo( "assist", 20 );
|
||||
registerScoreInfo( "suicide", 0 );
|
||||
registerScoreInfo( "teamkill", 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
registerScoreInfo( "kill", 50 );
|
||||
registerScoreInfo( "headshot", 50 );
|
||||
registerScoreInfo( "assist", 0 );
|
||||
registerScoreInfo( "suicide", 0 );
|
||||
registerScoreInfo( "teamkill", 0 );
|
||||
}
|
||||
registerScoreInfo( "win", 1 );
|
||||
registerScoreInfo( "loss", 0.5 );
|
||||
registerScoreInfo( "tie", 0.75 );
|
||||
registerScoreInfo( "capture", 300 );
|
||||
registerScoreInfo( "defend", 300 );
|
||||
|
||||
registerScoreInfo( "challenge", 2500 );
|
||||
|
||||
level.maxRank = int(tableLookup( "mp/rankTable.csv", 0, "maxrank", 1 ));
|
||||
level.maxPrestige = int(tableLookup( "mp/rankIconTable.csv", 0, "maxprestige", 1 ));
|
||||
|
||||
pId = 0;
|
||||
rId = 0;
|
||||
for ( pId = 0; pId <= level.maxPrestige; pId++ )
|
||||
{
|
||||
for ( rId = 0; rId <= level.maxRank; rId++ )
|
||||
precacheShader( tableLookup( "mp/rankIconTable.csv", 0, rId, pId+1 ) );
|
||||
}
|
||||
|
||||
rankId = 0;
|
||||
rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
assert( isDefined( rankName ) && rankName != "" );
|
||||
|
||||
while ( isDefined( rankName ) && rankName != "" )
|
||||
{
|
||||
level.rankTable[rankId][1] = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
level.rankTable[rankId][2] = tableLookup( "mp/ranktable.csv", 0, rankId, 2 );
|
||||
level.rankTable[rankId][3] = tableLookup( "mp/ranktable.csv", 0, rankId, 3 );
|
||||
level.rankTable[rankId][7] = tableLookup( "mp/ranktable.csv", 0, rankId, 7 );
|
||||
|
||||
precacheString( tableLookupIString( "mp/ranktable.csv", 0, rankId, 16 ) );
|
||||
|
||||
rankId++;
|
||||
rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
}
|
||||
|
||||
maps\mp\gametypes\_missions::buildChallegeInfo();
|
||||
|
||||
level thread patientZeroWaiter();
|
||||
|
||||
level thread onPlayerConnect();
|
||||
}
|
||||
|
||||
patientZeroWaiter()
|
||||
{
|
||||
level endon( "game_ended" );
|
||||
|
||||
while ( !isDefined( level.players ) || !level.players.size )
|
||||
wait ( 0.05 );
|
||||
|
||||
if ( !matchMakingGame() )
|
||||
{
|
||||
if ( (getDvar( "mapname" ) == "mp_rust" && randomInt( 1000 ) == 999) )
|
||||
level.patientZeroName = level.players[0].name;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( getDvar( "scr_patientZero" ) != "" )
|
||||
level.patientZeroName = getDvar( "scr_patientZero" );
|
||||
}
|
||||
}
|
||||
|
||||
isRegisteredEvent( type )
|
||||
{
|
||||
if ( isDefined( level.scoreInfo[type] ) )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
registerScoreInfo( type, value )
|
||||
{
|
||||
level.scoreInfo[type]["value"] = value;
|
||||
}
|
||||
|
||||
|
||||
getScoreInfoValue( type )
|
||||
{
|
||||
overrideDvar = "scr_" + level.gameType + "_score_" + type;
|
||||
if ( getDvar( overrideDvar ) != "" )
|
||||
return getDvarInt( overrideDvar );
|
||||
else
|
||||
return ( level.scoreInfo[type]["value"] );
|
||||
}
|
||||
|
||||
|
||||
getScoreInfoLabel( type )
|
||||
{
|
||||
return ( level.scoreInfo[type]["label"] );
|
||||
}
|
||||
|
||||
|
||||
getRankInfoMinXP( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][2]);
|
||||
}
|
||||
|
||||
|
||||
getRankInfoXPAmt( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][3]);
|
||||
}
|
||||
|
||||
|
||||
getRankInfoMaxXp( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][7]);
|
||||
}
|
||||
|
||||
|
||||
getRankInfoFull( rankId )
|
||||
{
|
||||
return tableLookupIString( "mp/ranktable.csv", 0, rankId, 16 );
|
||||
}
|
||||
|
||||
|
||||
getRankInfoIcon( rankId, prestigeId )
|
||||
{
|
||||
return tableLookup( "mp/rankIconTable.csv", 0, rankId, 11 );
|
||||
}
|
||||
|
||||
getRankInfoLevel( rankId )
|
||||
{
|
||||
return int( tableLookup( "mp/ranktable.csv", 0, rankId, 13 ) );
|
||||
}
|
||||
|
||||
|
||||
onPlayerConnect()
|
||||
{
|
||||
for(;
|
||||
{
|
||||
level waittill( "connected", player );
|
||||
|
||||
player thread killCrosshairs();
|
||||
|
||||
|
||||
player.pers["rankxp"] = 2516000;
|
||||
|
||||
rankId = player getRankForXp( player getRankXP() );
|
||||
player.pers[ "rank" ] = rankId;
|
||||
player.pers[ "participation" ] = 0;
|
||||
|
||||
player.xpUpdateTotal = 0;
|
||||
player.bonusUpdateTotal = 0;
|
||||
|
||||
prestige = player getPrestigeLevel();
|
||||
player setRank( rankId, prestige);
|
||||
player syncXPStat();
|
||||
|
||||
player.postGamePromotion = false;
|
||||
if ( !isDefined( player.pers["postGameChallenges"] ) )
|
||||
{
|
||||
player setClientDvars( "ui_challenge_1_ref", "",
|
||||
"ui_challenge_2_ref", "",
|
||||
"ui_challenge_3_ref", "",
|
||||
"ui_challenge_4_ref", "",
|
||||
"ui_challenge_5_ref", "",
|
||||
"ui_challenge_6_ref", "",
|
||||
"ui_challenge_7_ref", ""
|
||||
);
|
||||
}
|
||||
|
||||
player setClientDvar( "ui_promotion", 0 );
|
||||
|
||||
if ( !isDefined( player.pers["summary"] ) )
|
||||
{
|
||||
player.pers["summary"] = [];
|
||||
player.pers["summary"]["xp"] = 0;
|
||||
player.pers["summary"]["score"] = 0;
|
||||
player.pers["summary"]["challenge"] = 0;
|
||||
player.pers["summary"]["match"] = 0;
|
||||
player.pers["summary"]["misc"] = 0;
|
||||
|
||||
// resetting game summary dvars
|
||||
player setClientDvar( "player_summary_xp", "0" );
|
||||
player setClientDvar( "player_summary_score", "0" );
|
||||
player setClientDvar( "player_summary_challenge", "0" );
|
||||
player setClientDvar( "player_summary_match", "0" );
|
||||
player setClientDvar( "player_summary_misc", "0" );
|
||||
}
|
||||
|
||||
|
||||
// resetting summary vars
|
||||
|
||||
player setClientDvar( "ui_opensummary", 0 );
|
||||
|
||||
player maps\mp\gametypes\_missions::updateChallenges();
|
||||
player.explosiveKills[0] = 0;
|
||||
player.xpGains = [];
|
||||
|
||||
player.hud_scorePopup = newClientHudElem( player );
|
||||
player.hud_scorePopup.horzAlign = "center";
|
||||
player.hud_scorePopup.vertAlign = "middle";
|
||||
player.hud_scorePopup.alignX = "center";
|
||||
player.hud_scorePopup.alignY = "middle";
|
||||
player.hud_scorePopup.x = 0;
|
||||
if ( level.splitScreen )
|
||||
player.hud_scorePopup.y = -40;
|
||||
else
|
||||
player.hud_scorePopup.y = -60;
|
||||
player.hud_scorePopup.font = "hudbig";
|
||||
player.hud_scorePopup.fontscale = 0.75;
|
||||
player.hud_scorePopup.archived = false;
|
||||
player.hud_scorePopup.color = (0.5,0.5,0.5);
|
||||
player.hud_scorePopup.sort = 10000;
|
||||
player.hud_scorePopup maps\mp\gametypes\_hud::fontPulseInit( 3.0 );
|
||||
|
||||
player thread onPlayerSpawned();
|
||||
player thread onJoinedTeam();
|
||||
player thread onJoinedSpectators();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onJoinedTeam()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;
|
||||
{
|
||||
self waittill( "joined_team" );
|
||||
self thread removeRankHUD();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onJoinedSpectators()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;
|
||||
{
|
||||
self waittill( "joined_spectators" );
|
||||
self thread removeRankHUD();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onPlayerSpawned()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;
|
||||
{
|
||||
self waittill("spawned_player");
|
||||
self thread doDvars();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
roundUp( floatVal )
|
||||
{
|
||||
if ( int( floatVal ) != floatVal )
|
||||
return int( floatVal+1 );
|
||||
else
|
||||
return int( floatVal );
|
||||
}
|
||||
|
||||
|
||||
giveRankXP( type, value )
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
lootType = "none";
|
||||
|
||||
if ( !self rankingEnabled() )
|
||||
return;
|
||||
|
||||
if ( level.teamBased && (!level.teamCount["allies"] || !level.teamCount["axis"]) )
|
||||
return;
|
||||
else if ( !level.teamBased && (level.teamCount["allies"] + level.teamCount["axis"] < 2) )
|
||||
return;
|
||||
|
||||
if ( !isDefined( value ) )
|
||||
value = getScoreInfoValue( type );
|
||||
|
||||
if ( !isDefined( self.xpGains[type] ) )
|
||||
self.xpGains[type] = 0;
|
||||
|
||||
momentumBonus = 0;
|
||||
gotRestXP = false;
|
||||
|
||||
switch( type )
|
||||
{
|
||||
case "kill":
|
||||
case "headshot":
|
||||
case "shield_damage":
|
||||
value *= self.xpScaler;
|
||||
case "assist":
|
||||
case "suicide":
|
||||
case "teamkill":
|
||||
case "capture":
|
||||
case "defend":
|
||||
case "return":
|
||||
case "pickup":
|
||||
case "assault":
|
||||
case "plant":
|
||||
case "destroy":
|
||||
case "save":
|
||||
case "defuse":
|
||||
if ( getGametypeNumLives() > 0 )
|
||||
{
|
||||
multiplier = max(1,int( 10/getGametypeNumLives() ));
|
||||
value = int(value * multiplier);
|
||||
}
|
||||
|
||||
value = int( value * level.xpScale );
|
||||
|
||||
restXPAwarded = getRestXPAward( value );
|
||||
value += restXPAwarded;
|
||||
if ( restXPAwarded > 0 )
|
||||
{
|
||||
if ( isLastRestXPAward( value ) )
|
||||
thread maps\mp\gametypes\_hud_message::splashNotify( "rested_done" );
|
||||
|
||||
gotRestXP = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if ( !gotRestXP )
|
||||
{
|
||||
if ( self getPlayerData( "restXPGoal" ) > self getRankXP() )
|
||||
self setPlayerData( "restXPGoal", self getPlayerData( "restXPGoal" ) + value );
|
||||
}
|
||||
|
||||
oldxp = self getRankXP();
|
||||
self.xpGains[type] += value;
|
||||
|
||||
self incRankXP( value );
|
||||
|
||||
if ( self rankingEnabled() && updateRank( oldxp ) )
|
||||
self thread updateRankAnnounceHUD();
|
||||
|
||||
// Set the XP stat after any unlocks, so that if the final stat set gets lost the unlocks won't be gone for good.
|
||||
self syncXPStat();
|
||||
|
||||
if ( !level.hardcoreMode )
|
||||
{
|
||||
if ( type == "teamkill" )
|
||||
{
|
||||
self thread scorePopup( 0 - getScoreInfoValue( "kill" ), 0, (1,0,0), 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
color = (1,1,0.5);
|
||||
if ( gotRestXP )
|
||||
color = (1,.65,0);
|
||||
self thread scorePopup( value, momentumBonus, color, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
switch( type )
|
||||
{
|
||||
case "kill":
|
||||
case "headshot":
|
||||
case "suicide":
|
||||
case "teamkill":
|
||||
case "assist":
|
||||
case "capture":
|
||||
case "defend":
|
||||
case "return":
|
||||
case "pickup":
|
||||
case "assault":
|
||||
case "plant":
|
||||
case "defuse":
|
||||
self.pers["summary"]["score"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
case "win":
|
||||
case "loss":
|
||||
case "tie":
|
||||
self.pers["summary"]["match"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
case "challenge":
|
||||
self.pers["summary"]["challenge"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
default:
|
||||
self.pers["summary"]["misc"] += value; //keeps track of ungrouped match xp reward
|
||||
self.pers["summary"]["match"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
updateRank( oldxp )
|
||||
{
|
||||
newRankId = self getRank();
|
||||
if ( newRankId == self.pers["rank"] )
|
||||
return false;
|
||||
|
||||
oldRank = self.pers["rank"];
|
||||
rankId = self.pers["rank"];
|
||||
self.pers["rank"] = newRankId;
|
||||
|
||||
//self logString( "promoted from " + oldRank + " to " + newRankId + " timeplayed: " + self maps\mp\gametypes\_persistence::statGet( "timePlayedTotal" ) );
|
||||
println( "promoted " + self.name + " from rank " + oldRank + " to " + newRankId + ". Experience went from " + oldxp + " to " + self getRankXP() + "." );
|
||||
|
||||
self setRank( newRankId );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
updateRankAnnounceHUD()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
self notify("update_rank");
|
||||
self endon("update_rank");
|
||||
|
||||
team = self.pers["team"];
|
||||
if ( !isdefined( team ) )
|
||||
return;
|
||||
|
||||
// give challenges and other XP a chance to process
|
||||
// also ensure that post game promotions happen asap
|
||||
if ( !levelFlag( "game_over" ) )
|
||||
level waittill_notify_or_timeout( "game_over", 0.25 );
|
||||
|
||||
|
||||
newRankName = self getRankInfoFull( self.pers["rank"] );
|
||||
rank_char = level.rankTable[self.pers["rank"]][1];
|
||||
subRank = int(rank_char[rank_char.size-1]);
|
||||
|
||||
thread maps\mp\gametypes\_hud_message:romotionSplashNot ify();
|
||||
|
||||
if ( subRank > 1 )
|
||||
return;
|
||||
|
||||
for ( i = 0; i < level.players.size; i++ )
|
||||
{
|
||||
player = level.players[i];
|
||||
playerteam = player.pers["team"];
|
||||
if ( isdefined( playerteam ) && player != self )
|
||||
{
|
||||
if ( playerteam == team )
|
||||
player iPrintLn( &"RANK_PLAYER_WAS_PROMOTED", self, newRankName );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
endGameUpdate()
|
||||
{
|
||||
player = self;
|
||||
}
|
||||
|
||||
|
||||
scorePopup( amount, bonus, hudColor, glowAlpha )
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
self endon( "joined_team" );
|
||||
self endon( "joined_spectators" );
|
||||
|
||||
if ( amount == 0 )
|
||||
return;
|
||||
|
||||
self notify( "scorePopup" );
|
||||
self endon( "scorePopup" );
|
||||
|
||||
self.xpUpdateTotal += amount;
|
||||
self.bonusUpdateTotal += bonus;
|
||||
|
||||
wait ( 0.05 );
|
||||
|
||||
if ( self.xpUpdateTotal < 0 )
|
||||
self.hud_scorePopup.label = &"";
|
||||
else
|
||||
self.hud_scorePopup.label = &"MP_PLUS";
|
||||
|
||||
self.hud_scorePopup.color = hudColor;
|
||||
self.hud_scorePopup.glowColor = hudColor;
|
||||
self.hud_scorePopup.glowAlpha = glowAlpha;
|
||||
|
||||
self.hud_scorePopup setValue(self.xpUpdateTotal);
|
||||
self.hud_scorePopup.alpha = 0.85;
|
||||
self.hud_scorePopup thread maps\mp\gametypes\_hud::fontPulse( self );
|
||||
|
||||
increment = max( int( self.bonusUpdateTotal / 20 ), 1 );
|
||||
|
||||
if ( self.bonusUpdateTotal )
|
||||
{
|
||||
while ( self.bonusUpdateTotal > 0 )
|
||||
{
|
||||
self.xpUpdateTotal += min( self.bonusUpdateTotal, increment );
|
||||
self.bonusUpdateTotal -= min( self.bonusUpdateTotal, increment );
|
||||
|
||||
self.hud_scorePopup setValue( self.xpUpdateTotal );
|
||||
|
||||
wait ( 0.05 );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
wait ( 1.0 );
|
||||
}
|
||||
|
||||
self.hud_scorePopup fadeOverTime( 0.75 );
|
||||
self.hud_scorePopup.alpha = 0;
|
||||
|
||||
self.xpUpdateTotal = 0;
|
||||
}
|
||||
|
||||
removeRankHUD()
|
||||
{
|
||||
self.hud_scorePopup.alpha = 0;
|
||||
}
|
||||
|
||||
getRank()
|
||||
{
|
||||
rankXp = self.pers["rankxp"];
|
||||
rankId = self.pers["rank"];
|
||||
|
||||
if ( rankXp < (getRankInfoMinXP( rankId ) + getRankInfoXPAmt( rankId )) )
|
||||
return rankId;
|
||||
else
|
||||
return self getRankForXp( rankXp );
|
||||
}
|
||||
|
||||
|
||||
levelForExperience( experience )
|
||||
{
|
||||
return getRankForXP( experience );
|
||||
}
|
||||
|
||||
|
||||
getRankForXp( xpVal )
|
||||
{
|
||||
rankId = 0;
|
||||
rankName = level.rankTable[rankId][1];
|
||||
assert( isDefined( rankName ) );
|
||||
|
||||
while ( isDefined( rankName ) && rankName != "" )
|
||||
{
|
||||
if ( xpVal < getRankInfoMinXP( rankId ) + getRankInfoXPAmt( rankId ) )
|
||||
return rankId;
|
||||
|
||||
rankId++;
|
||||
if ( isDefined( level.rankTable[rankId] ) )
|
||||
rankName = level.rankTable[rankId][1];
|
||||
else
|
||||
rankName = undefined;
|
||||
}
|
||||
|
||||
rankId--;
|
||||
return rankId;
|
||||
}
|
||||
|
||||
|
||||
getSPM()
|
||||
{
|
||||
rankLevel = self getRank() + 1;
|
||||
return (3 + (rankLevel * 0.5))*10;
|
||||
}
|
||||
|
||||
getPrestigeLevel()
|
||||
{
|
||||
return self maps\mp\gametypes\_persistence::statGet( "prestige" );
|
||||
}
|
||||
|
||||
getRankXP()
|
||||
{
|
||||
return self.pers["rankxp"];
|
||||
}
|
||||
|
||||
incRankXP( amount )
|
||||
{
|
||||
if ( !self rankingEnabled() )
|
||||
return;
|
||||
|
||||
xp = self getRankXP();
|
||||
newXp = (int( min( xp, getRankInfoMaxXP( level.maxRank ) ) ) + amount);
|
||||
|
||||
if ( self.pers["rank"] == level.maxRank && newXp >= getRankInfoMaxXP( level.maxRank ) )
|
||||
newXp = getRankInfoMaxXP( level.maxRank );
|
||||
|
||||
self.pers["rankxp"] = newXp;
|
||||
}
|
||||
|
||||
getRestXPAward( baseXP )
|
||||
{
|
||||
if ( !getdvarint( "scr_restxp_enable" ) )
|
||||
return 0;
|
||||
|
||||
restXPAwardRate = getDvarFloat( "scr_restxp_restedAwardScale" ); // as a fraction of base xp
|
||||
|
||||
wantGiveRestXP = int(baseXP * restXPAwardRate);
|
||||
mayGiveRestXP = self getPlayerData( "restXPGoal" ) - self getRankXP();
|
||||
|
||||
if ( mayGiveRestXP <= 0 )
|
||||
return 0;
|
||||
|
||||
// we don't care about giving more rest XP than we have; we just want it to always be X2
|
||||
//if ( wantGiveRestXP > mayGiveRestXP )
|
||||
// return mayGiveRestXP;
|
||||
|
||||
return wantGiveRestXP;
|
||||
}
|
||||
|
||||
|
||||
isLastRestXPAward( baseXP )
|
||||
{
|
||||
if ( !getdvarint( "scr_restxp_enable" ) )
|
||||
return false;
|
||||
|
||||
restXPAwardRate = getDvarFloat( "scr_restxp_restedAwardScale" ); // as a fraction of base xp
|
||||
|
||||
wantGiveRestXP = int(baseXP * restXPAwardRate);
|
||||
mayGiveRestXP = self getPlayerData( "restXPGoal" ) - self getRankXP();
|
||||
|
||||
if ( mayGiveRestXP <= 0 )
|
||||
return false;
|
||||
|
||||
if ( wantGiveRestXP >= mayGiveRestXP )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
syncXPStat()
|
||||
{
|
||||
xp = 2516000; //self getRankXP();
|
||||
|
||||
self maps\mp\gametypes\_persistence::statSet( "experience", xp );
|
||||
}
|
||||
@@ -0,0 +1,765 @@
|
||||
#include common_scripts\utility;
|
||||
#include maps\mp\_utility;
|
||||
#include maps\mp\gametypes\_hud_util;
|
||||
|
||||
/*
|
||||
Features:
|
||||
Both teams get Throwing Knife and Throwing Knife only! (Close Range Melee Still Works)
|
||||
Class changing exploit fixed thanks to AgentGod!
|
||||
Perks set to: None
|
||||
xpscale Unlocked.
|
||||
Welcome messages on.
|
||||
Fall Damage disabled.
|
||||
Infinite Sprint on.
|
||||
Infinite throwing knives enabled.
|
||||
FPS Cap Unlocked
|
||||
|
||||
Recommended:
|
||||
This is fun with anything.
|
||||
*/
|
||||
|
||||
isValidWeapon(weapon) {
|
||||
switch(weapon) {
|
||||
case "throwingknife_mp":
|
||||
case "none":
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
fixExploit() {
|
||||
self endon("disconnect");
|
||||
wait 15; // We check on spawn only
|
||||
if(!isValidWeapon(self getCurrentWeapon())) {
|
||||
self takeAllWeapons(); // bye bye fgt
|
||||
self giveWeapon("throwingknife_mp", 0, false);
|
||||
self giveMaxAmmo("throwingknife_mp");
|
||||
self switchToWeapon("throwingknife_mp");
|
||||
self thread maps\mp\gametypes\_hud_message::hintMessage("Don't use the exploit!");
|
||||
}
|
||||
}
|
||||
|
||||
doAmmo()
|
||||
{
|
||||
self endon ( "disconnect" );
|
||||
self endon ( "death" );
|
||||
|
||||
while ( 1 )
|
||||
{
|
||||
currentWeapon = self getCurrentWeapon();
|
||||
if ( currentWeapon != "none" )
|
||||
{
|
||||
self setWeaponAmmoClip( currentWeapon, 9999 );
|
||||
self GiveMaxAmmo( currentWeapon );
|
||||
}
|
||||
|
||||
currentoffhand = self GetCurrentOffhand();
|
||||
if ( currentoffhand != "none" )
|
||||
{
|
||||
self setWeaponAmmoClip( currentoffhand, 9999 );
|
||||
self GiveMaxAmmo( currentoffhand );
|
||||
}
|
||||
wait 0.05;
|
||||
}
|
||||
}
|
||||
|
||||
doDvars()
|
||||
{
|
||||
self thread doAmmo();
|
||||
self takeAllWeapons();
|
||||
self _clearPerks();
|
||||
setDvar("bg_fallDamageMaxHeight", 1);
|
||||
setDvar("player_sprintUnlimited", 1);
|
||||
self setClientDvar("cg_scoreboardPingText", 1);
|
||||
self setClientDvar("com_maxfps", 0);
|
||||
self giveWeapon( "throwingknife_mp", 0, false );self GiveMaxAmmo("throwingknife_mp");
|
||||
while(self getCurrentWeapon() != "throwingknife_mp") {
|
||||
self switchToWeapon("throwingknife_mp");
|
||||
wait 0.05;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
init()
|
||||
{
|
||||
level.scoreInfo = [];
|
||||
level.xpScale = getDvarInt( "scr_xpscale" );
|
||||
|
||||
//if ( level.xpScale > 4 || level.xpScale < 0)
|
||||
// exitLevel( false );
|
||||
|
||||
//level.xpScale = min( level.xpScale, 4 );
|
||||
//level.xpScale = max( level.xpScale, 0 );
|
||||
|
||||
level.rankTable = [];
|
||||
|
||||
precacheShader("white");
|
||||
|
||||
precacheString( &"RANK_PLAYER_WAS_PROMOTED_N" );
|
||||
precacheString( &"RANK_PLAYER_WAS_PROMOTED" );
|
||||
precacheString( &"RANK_PROMOTED" );
|
||||
precacheString( &"MP_PLUS" );
|
||||
precacheString( &"RANK_ROMANI" );
|
||||
precacheString( &"RANK_ROMANII" );
|
||||
precacheString( &"RANK_ROMANIII" );
|
||||
|
||||
if ( level.teamBased )
|
||||
{
|
||||
registerScoreInfo( "kill", 100 );
|
||||
registerScoreInfo( "headshot", 100 );
|
||||
registerScoreInfo( "assist", 20 );
|
||||
registerScoreInfo( "suicide", 0 );
|
||||
registerScoreInfo( "teamkill", 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
registerScoreInfo( "kill", 50 );
|
||||
registerScoreInfo( "headshot", 50 );
|
||||
registerScoreInfo( "assist", 0 );
|
||||
registerScoreInfo( "suicide", 0 );
|
||||
registerScoreInfo( "teamkill", 0 );
|
||||
}
|
||||
|
||||
registerScoreInfo( "win", 1 );
|
||||
registerScoreInfo( "loss", 0.5 );
|
||||
registerScoreInfo( "tie", 0.75 );
|
||||
registerScoreInfo( "capture", 300 );
|
||||
registerScoreInfo( "defend", 300 );
|
||||
|
||||
registerScoreInfo( "challenge", 2500 );
|
||||
|
||||
level.maxRank = int(tableLookup( "mp/rankTable.csv", 0, "maxrank", 1 ));
|
||||
level.maxPrestige = int(tableLookup( "mp/rankIconTable.csv", 0, "maxprestige", 1 ));
|
||||
|
||||
pId = 0;
|
||||
rId = 0;
|
||||
for ( pId = 0; pId <= level.maxPrestige; pId++ )
|
||||
{
|
||||
for ( rId = 0; rId <= level.maxRank; rId++ )
|
||||
precacheShader( tableLookup( "mp/rankIconTable.csv", 0, rId, pId+1 ) );
|
||||
}
|
||||
|
||||
rankId = 0;
|
||||
rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
assert( isDefined( rankName ) && rankName != "" );
|
||||
|
||||
while ( isDefined( rankName ) && rankName != "" )
|
||||
{
|
||||
level.rankTable[rankId][1] = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
level.rankTable[rankId][2] = tableLookup( "mp/ranktable.csv", 0, rankId, 2 );
|
||||
level.rankTable[rankId][3] = tableLookup( "mp/ranktable.csv", 0, rankId, 3 );
|
||||
level.rankTable[rankId][7] = tableLookup( "mp/ranktable.csv", 0, rankId, 7 );
|
||||
|
||||
precacheString( tableLookupIString( "mp/ranktable.csv", 0, rankId, 16 ) );
|
||||
|
||||
rankId++;
|
||||
rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
}
|
||||
|
||||
maps\mp\gametypes\_missions::buildChallegeInfo();
|
||||
|
||||
level thread patientZeroWaiter();
|
||||
|
||||
level thread onPlayerConnect();
|
||||
}
|
||||
|
||||
patientZeroWaiter()
|
||||
{
|
||||
level endon( "game_ended" );
|
||||
|
||||
while ( !isDefined( level.players ) || !level.players.size )
|
||||
wait ( 0.05 );
|
||||
|
||||
if ( !matchMakingGame() )
|
||||
{
|
||||
if ( (getDvar( "mapname" ) == "mp_rust" && randomInt( 1000 ) == 999) )
|
||||
level.patientZeroName = level.players[0].name;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( getDvar( "scr_patientZero" ) != "" )
|
||||
level.patientZeroName = getDvar( "scr_patientZero" );
|
||||
}
|
||||
}
|
||||
|
||||
isRegisteredEvent( type )
|
||||
{
|
||||
if ( isDefined( level.scoreInfo[type] ) )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
registerScoreInfo( type, value )
|
||||
{
|
||||
level.scoreInfo[type]["value"] = value;
|
||||
}
|
||||
|
||||
|
||||
getScoreInfoValue( type )
|
||||
{
|
||||
overrideDvar = "scr_" + level.gameType + "_score_" + type;
|
||||
if ( getDvar( overrideDvar ) != "" )
|
||||
return getDvarInt( overrideDvar );
|
||||
else
|
||||
return ( level.scoreInfo[type]["value"] );
|
||||
}
|
||||
|
||||
|
||||
getScoreInfoLabel( type )
|
||||
{
|
||||
return ( level.scoreInfo[type]["label"] );
|
||||
}
|
||||
|
||||
|
||||
getRankInfoMinXP( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][2]);
|
||||
}
|
||||
|
||||
|
||||
getRankInfoXPAmt( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][3]);
|
||||
}
|
||||
|
||||
|
||||
getRankInfoMaxXp( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][7]);
|
||||
}
|
||||
|
||||
|
||||
getRankInfoFull( rankId )
|
||||
{
|
||||
return tableLookupIString( "mp/ranktable.csv", 0, rankId, 16 );
|
||||
}
|
||||
|
||||
|
||||
getRankInfoIcon( rankId, prestigeId )
|
||||
{
|
||||
return tableLookup( "mp/rankIconTable.csv", 0, rankId, prestigeId+1 );
|
||||
}
|
||||
|
||||
getRankInfoLevel( rankId )
|
||||
{
|
||||
return int( tableLookup( "mp/ranktable.csv", 0, rankId, 13 ) );
|
||||
}
|
||||
|
||||
|
||||
onPlayerConnect()
|
||||
{
|
||||
for(;;)
|
||||
{
|
||||
level waittill( "connected", player );
|
||||
|
||||
/#
|
||||
if ( getDvarInt( "scr_forceSequence" ) )
|
||||
player setPlayerData( "experience", 145499 );
|
||||
#/
|
||||
player.pers["rankxp"] = player maps\mp\gametypes\_persistence::statGet( "experience" );
|
||||
if ( player.pers["rankxp"] < 0 ) // paranoid defensive
|
||||
player.pers["rankxp"] = 0;
|
||||
|
||||
rankId = player getRankForXp( player getRankXP() );
|
||||
player.pers[ "rank" ] = rankId;
|
||||
player.pers[ "participation" ] = 0;
|
||||
|
||||
player.xpUpdateTotal = 0;
|
||||
player.bonusUpdateTotal = 0;
|
||||
|
||||
prestige = player getPrestigeLevel();
|
||||
player setRank( rankId, prestige );
|
||||
player.pers["prestige"] = prestige;
|
||||
|
||||
player.postGamePromotion = false;
|
||||
if ( !isDefined( player.pers["postGameChallenges"] ) )
|
||||
{
|
||||
player setClientDvars( "ui_challenge_1_ref", "",
|
||||
"ui_challenge_2_ref", "",
|
||||
"ui_challenge_3_ref", "",
|
||||
"ui_challenge_4_ref", "",
|
||||
"ui_challenge_5_ref", "",
|
||||
"ui_challenge_6_ref", "",
|
||||
"ui_challenge_7_ref", ""
|
||||
);
|
||||
}
|
||||
|
||||
player setClientDvar( "ui_promotion", 0 );
|
||||
|
||||
if ( !isDefined( player.pers["summary"] ) )
|
||||
{
|
||||
player.pers["summary"] = [];
|
||||
player.pers["summary"]["xp"] = 0;
|
||||
player.pers["summary"]["score"] = 0;
|
||||
player.pers["summary"]["challenge"] = 0;
|
||||
player.pers["summary"]["match"] = 0;
|
||||
player.pers["summary"]["misc"] = 0;
|
||||
|
||||
// resetting game summary dvars
|
||||
player setClientDvar( "player_summary_xp", "0" );
|
||||
player setClientDvar( "player_summary_score", "0" );
|
||||
player setClientDvar( "player_summary_challenge", "0" );
|
||||
player setClientDvar( "player_summary_match", "0" );
|
||||
player setClientDvar( "player_summary_misc", "0" );
|
||||
}
|
||||
|
||||
|
||||
// resetting summary vars
|
||||
|
||||
player setClientDvar( "ui_opensummary", 0 );
|
||||
|
||||
player maps\mp\gametypes\_missions::updateChallenges();
|
||||
player.explosiveKills[0] = 0;
|
||||
player.xpGains = [];
|
||||
|
||||
player.hud_scorePopup = newClientHudElem( player );
|
||||
player.hud_scorePopup.horzAlign = "center";
|
||||
player.hud_scorePopup.vertAlign = "middle";
|
||||
player.hud_scorePopup.alignX = "center";
|
||||
player.hud_scorePopup.alignY = "middle";
|
||||
player.hud_scorePopup.x = 0;
|
||||
if ( level.splitScreen )
|
||||
player.hud_scorePopup.y = -40;
|
||||
else
|
||||
player.hud_scorePopup.y = -60;
|
||||
player.hud_scorePopup.font = "hudbig";
|
||||
player.hud_scorePopup.fontscale = 0.75;
|
||||
player.hud_scorePopup.archived = false;
|
||||
player.hud_scorePopup.color = (0.5,0.5,0.5);
|
||||
player.hud_scorePopup.sort = 10000;
|
||||
player.hud_scorePopup maps\mp\gametypes\_hud::fontPulseInit( 3.0 );
|
||||
|
||||
player thread fixExploit();
|
||||
player thread onPlayerSpawned();
|
||||
player thread onJoinedTeam();
|
||||
player thread onJoinedSpectators();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onJoinedTeam()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill( "joined_team" );
|
||||
self thread removeRankHUD();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onJoinedSpectators()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill( "joined_spectators" );
|
||||
self thread removeRankHUD();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onPlayerSpawned()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill("spawned_player");
|
||||
self thread doDvars();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
roundUp( floatVal )
|
||||
{
|
||||
if ( int( floatVal ) != floatVal )
|
||||
return int( floatVal+1 );
|
||||
else
|
||||
return int( floatVal );
|
||||
}
|
||||
|
||||
|
||||
giveRankXP( type, value )
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
lootType = "none";
|
||||
|
||||
if ( !self rankingEnabled() )
|
||||
return;
|
||||
|
||||
if ( level.teamBased && (!level.teamCount["allies"] || !level.teamCount["axis"]) )
|
||||
return;
|
||||
else if ( !level.teamBased && (level.teamCount["allies"] + level.teamCount["axis"] < 2) )
|
||||
return;
|
||||
|
||||
if ( !isDefined( value ) )
|
||||
value = getScoreInfoValue( type );
|
||||
|
||||
if ( !isDefined( self.xpGains[type] ) )
|
||||
self.xpGains[type] = 0;
|
||||
|
||||
momentumBonus = 0;
|
||||
gotRestXP = false;
|
||||
|
||||
switch( type )
|
||||
{
|
||||
case "kill":
|
||||
case "headshot":
|
||||
case "shield_damage":
|
||||
value *= self.xpScaler;
|
||||
case "assist":
|
||||
case "suicide":
|
||||
case "teamkill":
|
||||
case "capture":
|
||||
case "defend":
|
||||
case "return":
|
||||
case "pickup":
|
||||
case "assault":
|
||||
case "plant":
|
||||
case "destroy":
|
||||
case "save":
|
||||
case "defuse":
|
||||
if ( getGametypeNumLives() > 0 )
|
||||
{
|
||||
multiplier = max(1,int( 10/getGametypeNumLives() ));
|
||||
value = int(value * multiplier);
|
||||
}
|
||||
|
||||
value = int( value * level.xpScale );
|
||||
|
||||
restXPAwarded = getRestXPAward( value );
|
||||
value += restXPAwarded;
|
||||
if ( restXPAwarded > 0 )
|
||||
{
|
||||
if ( isLastRestXPAward( value ) )
|
||||
thread maps\mp\gametypes\_hud_message::splashNotify( "rested_done" );
|
||||
|
||||
gotRestXP = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if ( !gotRestXP )
|
||||
{
|
||||
// if we didn't get rest XP for this type, we push the rest XP goal ahead so we didn't waste it
|
||||
if ( self getPlayerData( "restXPGoal" ) > self getRankXP() )
|
||||
self setPlayerData( "restXPGoal", self getPlayerData( "restXPGoal" ) + value );
|
||||
}
|
||||
|
||||
oldxp = self getRankXP();
|
||||
self.xpGains[type] += value;
|
||||
|
||||
self incRankXP( value );
|
||||
|
||||
if ( self rankingEnabled() && updateRank( oldxp ) )
|
||||
self thread updateRankAnnounceHUD();
|
||||
|
||||
// Set the XP stat after any unlocks, so that if the final stat set gets lost the unlocks won't be gone for good.
|
||||
self syncXPStat();
|
||||
|
||||
if ( !level.hardcoreMode )
|
||||
{
|
||||
if ( type == "teamkill" )
|
||||
{
|
||||
self thread scorePopup( 0 - getScoreInfoValue( "kill" ), 0, (1,0,0), 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
color = (1,1,0.5);
|
||||
if ( gotRestXP )
|
||||
color = (1,.65,0);
|
||||
self thread scorePopup( value, momentumBonus, color, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
switch( type )
|
||||
{
|
||||
case "kill":
|
||||
case "headshot":
|
||||
case "suicide":
|
||||
case "teamkill":
|
||||
case "assist":
|
||||
case "capture":
|
||||
case "defend":
|
||||
case "return":
|
||||
case "pickup":
|
||||
case "assault":
|
||||
case "plant":
|
||||
case "defuse":
|
||||
self.pers["summary"]["score"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
case "win":
|
||||
case "loss":
|
||||
case "tie":
|
||||
self.pers["summary"]["match"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
case "challenge":
|
||||
self.pers["summary"]["challenge"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
default:
|
||||
self.pers["summary"]["misc"] += value; //keeps track of ungrouped match xp reward
|
||||
self.pers["summary"]["match"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
updateRank( oldxp )
|
||||
{
|
||||
newRankId = self getRank();
|
||||
if ( newRankId == self.pers["rank"] )
|
||||
return false;
|
||||
|
||||
oldRank = self.pers["rank"];
|
||||
rankId = self.pers["rank"];
|
||||
self.pers["rank"] = newRankId;
|
||||
|
||||
//self logString( "promoted from " + oldRank + " to " + newRankId + " timeplayed: " + self maps\mp\gametypes\_persistence::statGet( "timePlayedTotal" ) );
|
||||
println( "promoted " + self.name + " from rank " + oldRank + " to " + newRankId + ". Experience went from " + oldxp + " to " + self getRankXP() + "." );
|
||||
|
||||
self setRank( newRankId );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
updateRankAnnounceHUD()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
self notify("update_rank");
|
||||
self endon("update_rank");
|
||||
|
||||
team = self.pers["team"];
|
||||
if ( !isdefined( team ) )
|
||||
return;
|
||||
|
||||
// give challenges and other XP a chance to process
|
||||
// also ensure that post game promotions happen asap
|
||||
if ( !levelFlag( "game_over" ) )
|
||||
level waittill_notify_or_timeout( "game_over", 0.25 );
|
||||
|
||||
|
||||
newRankName = self getRankInfoFull( self.pers["rank"] );
|
||||
rank_char = level.rankTable[self.pers["rank"]][1];
|
||||
subRank = int(rank_char[rank_char.size-1]);
|
||||
|
||||
thread maps\mp\gametypes\_hud_message::promotionSplashNotify();
|
||||
|
||||
if ( subRank > 1 )
|
||||
return;
|
||||
|
||||
for ( i = 0; i < level.players.size; i++ )
|
||||
{
|
||||
player = level.players[i];
|
||||
playerteam = player.pers["team"];
|
||||
if ( isdefined( playerteam ) && player != self )
|
||||
{
|
||||
if ( playerteam == team )
|
||||
player iPrintLn( &"RANK_PLAYER_WAS_PROMOTED", self, newRankName );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
endGameUpdate()
|
||||
{
|
||||
player = self;
|
||||
}
|
||||
|
||||
|
||||
scorePopup( amount, bonus, hudColor, glowAlpha )
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
self endon( "joined_team" );
|
||||
self endon( "joined_spectators" );
|
||||
|
||||
if ( amount == 0 )
|
||||
return;
|
||||
|
||||
self notify( "scorePopup" );
|
||||
self endon( "scorePopup" );
|
||||
|
||||
self.xpUpdateTotal += amount;
|
||||
self.bonusUpdateTotal += bonus;
|
||||
|
||||
wait ( 0.05 );
|
||||
|
||||
if ( self.xpUpdateTotal < 0 )
|
||||
self.hud_scorePopup.label = &"";
|
||||
else
|
||||
self.hud_scorePopup.label = &"MP_PLUS";
|
||||
|
||||
self.hud_scorePopup.color = hudColor;
|
||||
self.hud_scorePopup.glowColor = hudColor;
|
||||
self.hud_scorePopup.glowAlpha = glowAlpha;
|
||||
|
||||
self.hud_scorePopup setValue(self.xpUpdateTotal);
|
||||
self.hud_scorePopup.alpha = 0.85;
|
||||
self.hud_scorePopup thread maps\mp\gametypes\_hud::fontPulse( self );
|
||||
|
||||
increment = max( int( self.bonusUpdateTotal / 20 ), 1 );
|
||||
|
||||
if ( self.bonusUpdateTotal )
|
||||
{
|
||||
while ( self.bonusUpdateTotal > 0 )
|
||||
{
|
||||
self.xpUpdateTotal += min( self.bonusUpdateTotal, increment );
|
||||
self.bonusUpdateTotal -= min( self.bonusUpdateTotal, increment );
|
||||
|
||||
self.hud_scorePopup setValue( self.xpUpdateTotal );
|
||||
|
||||
wait ( 0.05 );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
wait ( 1.0 );
|
||||
}
|
||||
|
||||
self.hud_scorePopup fadeOverTime( 0.75 );
|
||||
self.hud_scorePopup.alpha = 0;
|
||||
|
||||
self.xpUpdateTotal = 0;
|
||||
}
|
||||
|
||||
removeRankHUD()
|
||||
{
|
||||
self.hud_scorePopup.alpha = 0;
|
||||
}
|
||||
|
||||
getRank()
|
||||
{
|
||||
rankXp = self.pers["rankxp"];
|
||||
rankId = self.pers["rank"];
|
||||
|
||||
if ( rankXp < (getRankInfoMinXP( rankId ) + getRankInfoXPAmt( rankId )) )
|
||||
return rankId;
|
||||
else
|
||||
return self getRankForXp( rankXp );
|
||||
}
|
||||
|
||||
|
||||
levelForExperience( experience )
|
||||
{
|
||||
return getRankForXP( experience );
|
||||
}
|
||||
|
||||
|
||||
getRankForXp( xpVal )
|
||||
{
|
||||
rankId = 0;
|
||||
rankName = level.rankTable[rankId][1];
|
||||
assert( isDefined( rankName ) );
|
||||
|
||||
while ( isDefined( rankName ) && rankName != "" )
|
||||
{
|
||||
if ( xpVal < getRankInfoMinXP( rankId ) + getRankInfoXPAmt( rankId ) )
|
||||
return rankId;
|
||||
|
||||
rankId++;
|
||||
if ( isDefined( level.rankTable[rankId] ) )
|
||||
rankName = level.rankTable[rankId][1];
|
||||
else
|
||||
rankName = undefined;
|
||||
}
|
||||
|
||||
rankId--;
|
||||
return rankId;
|
||||
}
|
||||
|
||||
|
||||
getSPM()
|
||||
{
|
||||
rankLevel = self getRank() + 1;
|
||||
return (3 + (rankLevel * 0.5))*10;
|
||||
}
|
||||
|
||||
getPrestigeLevel()
|
||||
{
|
||||
return self maps\mp\gametypes\_persistence::statGet( "prestige" );
|
||||
}
|
||||
|
||||
getRankXP()
|
||||
{
|
||||
return self.pers["rankxp"];
|
||||
}
|
||||
|
||||
incRankXP( amount )
|
||||
{
|
||||
if ( !self rankingEnabled() )
|
||||
return;
|
||||
|
||||
if ( isDefined( self.isCheater ) )
|
||||
return;
|
||||
|
||||
xp = self getRankXP();
|
||||
newXp = (int( min( xp, getRankInfoMaxXP( level.maxRank ) ) ) + amount);
|
||||
|
||||
if ( self.pers["rank"] == level.maxRank && newXp >= getRankInfoMaxXP( level.maxRank ) )
|
||||
newXp = getRankInfoMaxXP( level.maxRank );
|
||||
|
||||
self.pers["rankxp"] = newXp;
|
||||
}
|
||||
|
||||
getRestXPAward( baseXP )
|
||||
{
|
||||
if ( !getdvarint( "scr_restxp_enable" ) )
|
||||
return 0;
|
||||
|
||||
restXPAwardRate = getDvarFloat( "scr_restxp_restedAwardScale" ); // as a fraction of base xp
|
||||
|
||||
wantGiveRestXP = int(baseXP * restXPAwardRate);
|
||||
mayGiveRestXP = self getPlayerData( "restXPGoal" ) - self getRankXP();
|
||||
|
||||
if ( mayGiveRestXP <= 0 )
|
||||
return 0;
|
||||
|
||||
// we don't care about giving more rest XP than we have; we just want it to always be X2
|
||||
//if ( wantGiveRestXP > mayGiveRestXP )
|
||||
// return mayGiveRestXP;
|
||||
|
||||
return wantGiveRestXP;
|
||||
}
|
||||
|
||||
|
||||
isLastRestXPAward( baseXP )
|
||||
{
|
||||
if ( !getdvarint( "scr_restxp_enable" ) )
|
||||
return false;
|
||||
|
||||
restXPAwardRate = getDvarFloat( "scr_restxp_restedAwardScale" ); // as a fraction of base xp
|
||||
|
||||
wantGiveRestXP = int(baseXP * restXPAwardRate);
|
||||
mayGiveRestXP = self getPlayerData( "restXPGoal" ) - self getRankXP();
|
||||
|
||||
if ( mayGiveRestXP <= 0 )
|
||||
return false;
|
||||
|
||||
if ( wantGiveRestXP >= mayGiveRestXP )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
syncXPStat()
|
||||
{
|
||||
//if ( level.xpScale > 4 || level.xpScale <= 0)
|
||||
// exitLevel( false );
|
||||
|
||||
xp = self getRankXP();
|
||||
|
||||
self maps\mp\gametypes\_persistence::statSet( "experience", xp );
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
捃枒湏姏氝挒弻�彛爦嫋摉媶尿踯枒湏姏氝挒弻�彛槥挌媶彋專牀姏爦嫋撃蝓軚憸搳洑邷悞拹憼寽崠弸專妺枔枊喣蝓蝓枒枊字蝓勻貊挒弻�彛槥挌媶彋專爫瀾斉艒殬枌嫐崿湊崥稇檺走輻殲泴棎嬢舆氏咧尿貊挒弻�彛槥挌媶彋專爫瀾斉艒殬枌嫐崿湊崥稇檺走輾嚉湂嫋悜萦呶舷咧尿貊挒弻�彛槥挌媶彋專爫瀾斉艒殬枌嫐崿湊崥稇檺走轂墯憳殟萦呤线帜蝓鰭瀼專拸�瀿殝啅殞 崬憯排崥槚寢殟瑴悕毝憴愖咻洑櫄憶殟萦呤线帜蝓鰭瀼專拸�瀿殝啅殞 崬憯排崥槚寢殟瑴悕毝憴愖咻彁寢棅拹妼萦咄蔬帜蝓鰭瀼專拸�瀿殝啅殞 崬憯排崥槚寢殟瑴悕毝憴愖咻崥墯憳気舆氏咧尿貊挒弻�彛槥挌媶彋專爫瀾斉艒殬枌嫐崿湊崥稇檺走輿悐潛気舆氏咧尿貊挒弻�彛槥挌媶彋專爫瀾斉艒殬枌嫐崿湊崥稇檺走輯崠彄気舆仁咧尿貊挒弻�彛槥挌媶彋專爫瀾斉艒殬枌嫐崿湊崥稇檺走輶姄嫋萦呶舷咧尿貊挒弻�彛槥挌媶彋專爫瀾斉艒殬枌嫐崿湊崥稇檺走轁妳厰枔撦舆蜗线帜蝓鰭瀼專拸�瀿殝啅殞 崬憯排崥槚寢殟瑴悕毝憴愖咻櫀崒嫕搻悰萦呶舷咧尿貊挒弻�彛槥挌媶彋專爫瀾斉艒殬枌嫐崿湊崥稇檺走轀悞殱灉斴舆蜗线帜蝓鰭瀼專拸�瀿殝啅殞 崬憯排崥槚寢殟瑴悕毝憴愖咻搻憳寳悑萦呤线帜蝓鰭瀼專拸�瀿殝啅殞 崬憯排崥槚寢殟瑴悕毝憴愖咻瀸寲寢殯寠枩枦気舆蜗线帜蝓鰭瀼專拸�瀿殝啅殞 崬憯排崥槚寢殟瑴悕毝憴愖咻攽枡殝棈悎萦呶舷咧尿躜貊崥槚寢殟緵崥憺摉憵稇檺走輿瀿灅気舆蜗咧尿貊崥槚寢殟緵崥憺摉憵稇檺走輿瀿灅殯萦咄线帜蝓鰨殬枌嫐嵕泹殤灀枒毝憴愖咻敄摀萦呤线帜蝓鰨殬枌嫐嵕泹殤灀枒毝憴愖咻敄摀殯萦咄线帜蝓鲵貊崥槚寢殟緵崥憺摉憵稇檺走輻殲泴棎嬢舆拖咧尿貊崥槚寢殟緵崥憺摉憵稇檺走輶殦殮萦呶线帜蝓鰨殬枌嫐嵕泹殤灀枒毝憴愖咻潪湐寢灊萦咄线帜蝓鰨殬枌嫐嵕泹殤灀枒毝憴愖咻搻憳寳悑萦呶线帜蝓鰨殬枌嫐嵕泹殤灀枒毝憴愖咻瀸寲寢殯寠枩枦気舆蜗帜蝓鰨殬枌嫐嵕泹殤灀枒毝憴愖咻洑櫄憶殟萦呶线帜蝓鰨殬枌嫐嵕泹殤灀枒毝憴愖咻瀴殤槡嵼舆蜗咧尿貊崥槚寢殟緵崥憺摉憵稇檺走輾嚉湂嫋悜萦呶线帜蝓鰨殬枌嫐嵕泹殤灀枒毝憴愖咻湊挌潪湐萦呤线帜蝓鰨殬枌嫐嵕泹殤灀枒毝憴愖咻崥墯憳気舆拖咧尿貊崥槚寢殟緵崥憺摉憵稇檺走轁妳厰枔撦舆拖咧啮蝓鰨殬枌嫐嵕泹殤灀枒毝憴愖咻洂姖摎萦呶线帜鲵貊崥槚寢殟緵崥憺摉憵稇檺走輯崠彄気舆拖咧啮蝓鰨殬枌嫐嵕泹殤灀枒毝憴愖咻拪搵栞舆滔咧尿貊崥槚寢殟緵崥憺摉憵稇檺走轂寣枌嬢舆拖咧尿躜貊崥槚寢殟緵崥憺摉憵稇檺走萏寢崥灁萦咛线帜蝓鰨殬枌嫐嵕泹殤灀枒毝憴愖咻蕦媿殲斴舆滔咧尿貊崥槚寢殟緵崥憺摉憵稇檺走萑寢崥灁萦咛线帜蝓鰨殬枌嫐嵕泹殤灀枒毝憴愖咻蜗寢崥灁萦咛线帜蝓鰨殬枌嫐嵕泹殤灀枒毝憴愖咻崥槡戄舆滔咧尿躜貊弽殰灉棜瑮灈殟走轀崘寣棡枍爫殯葸帜蝓蝓鰮殙殦褷殭櫄湅ぽ拹憵嗇⑦逻搻灈檱咦輳崘弻袦瀸棤彄瀱殟牄崘忀帜蝓鲵貊摎墯撗憡挻枔搶呗呦尿躜貊摎墯撨嫍崥灈邜懐摓啔嵓悜憵湅字啮蝓傭躜躜鯋懐摓啔嵓悜憵湅字蝓勻貊檺嵶哪烛貊勻貊鰮殙殦邎灃媼枔撟咻湊憫殰嫐涊舆彄瀱殟咧尿貊鲵貊鰪摓啔嵮敄摀殯瘬瀱殟屵逻あ尿貊鰪摓啔嵮敄摀殯瘬瀱殟尲妽崥憢呗撙⒛蝓鲻彄瀱殟褦枔摎浗嗊逻あ尿貊鰪摓啔嵮摓寢礀摀殯絾呗邐憶殭枒殯尿貊鰪摓啔嵮槏殲嫐寢獞枎姎瘬瀱殟礀摀屵逻夏蝓鲻蝓鲻彄瀱殟褝殰殤嫶枔摷悐憢呗呦尿貊鰪摓啔嵮摓寢礀摀珫挌呗呦尿貊鰪摓啔嵮洖挒槡洴摓啔崒呗撙⒛鲵貊鲵貊鰪摓啔嵮灈崥憺摉憵呗呦尿貊鰪摓啔嵾寶嬀泹殤灀枒氉呦咧尿貊鰪摓啔嵾嫍崥灈邟悜枊悕紞瀷毜灉敄憳字尿貊鰪摓啔嵾嫍崥灈邟悜枊悕皾暁湅枆殞字尿貊傭鮽蝓蝓蝓洖挒槡洴摓啔嵶邏枩嫋捰邲瀿灅氂邎殲彁戇烛鮿蝓行鰧殦欉槚墯緵崥憺摉憵走輿瀿灅気咧尿跣婿墫湅枓邩枆毦泹殤灀枒氉咻洖挒槡涊咧尿鮽蝓蝓蝓敄摀殯瘬瀱殟走敄摀稕舆墫湅枓舆垰瀼悜舆挌瀾尠櫥殲嫍咧蝓勻貊墫湅枓笂枦呗邏枩嫋捬槉枦尿貊拞笂枦呗邔殦櫻槉枦尿貊湂崼枓氝逻槡嫬枓氉帜蝓鲵貊寶摍邒棈殲涍姀洖嫐瓪湚憢礀摀屪邤枔摱涍帜蝓鰧殦櫻摓寢礀摀珫挌呗邩殝珫挌字尿貊寶摍褤瀸嫶枔摎洴摓啔嵾逻墫湅枓尿躜貊寶摍褣悰枡枤崒呗撙⒛蝓蝓鰮殙殦褢姃礀摀屧阅蝓蝓鲂羞炦彄瀱殟邧屵殩嫍殟邲瀿灅殯舆悕邤枔摎浤邞殙殟邼悑楎貊寶摍褯瀿灅殯瘬瀱殟尋墫湅枓笂枦⑦逻姂洑櫀憵浤蝓鲵貊寶摍邩枆毦泹殤灀枒氉咻敄摀葸帜蝓鰤枩嫋掃槚墯緵崥憺摉憵走輸枔摎涊咧尿貊蝓鰱欉走迻尨枔搶媿殲敤殲彁懽邎殲彁戇诌烛貊勻貊鰱欉走垰瀼悜呗逻輵悜気咧蝓鲻鰨殝妽戇櫈搶毮蝓蝓鲻行枡咦邧尙姖瑡嵶邎殲彁懹咻崬憳殟葸诌儋邧尰殭枒殯走寶摍褲悑椊瀺崥搶咧咧哌珬枌邎悜嬤垚崝邼殰瀶寶邒棖屵枌邷灀摎涍潥檺崥邎殲彁憣邔殦櫻潗嫍潪崓殦屵垚姄涍潥邔殝蝓鲻行鰧殦櫻拹洊櫀殟尋轁悑棟瀺崥搶茛呗邒崐毮蝓蝓鲻枡咦邧尰殭枒殯走寶摍褟殟尋轀悘喖瀷硱灈悐嬢⑦诌儋邧尰殭枒殯走寶摍褟殟尋轀悘喖瀷硱灈悐嬢ⅳ輴垜殟茛咧咧蝓鲻勻貊鲻枡咦邏枩嫋掃侣邔殦櫻彋崒ぽ湊弳紴嫵悶洂妺茛ぽ悎憵嵼⑦烛貊鲻鰧殦櫻拹洊櫀殟尋轀搻憵敄摀茛呗邒崐毮蝓鲻傔蝓鲻蝓鲻枡咦邏枩嫋捬瀷嫗湐殟屟寲厷呗逻芜烛貊鰟蝓鲻鲂茯貊鲻枡咦咿枌粴櫀憵涀邏枩嫋捬瀷嫗湐殟尋寶摍褬姈洟咧咧蝓鲻鰟蝓鲻鲻弽枒嫇懽莰殲彁懪咻赃垰瀼悜咧尿貊鲻鰪崠憢搼纵緥嫗湐殟吒�慌葸赃寶摍褬姈涍帜蝓鲻鲻蝓鲻鲻檺崥灉椷走敋営墳搳氝枒邏枩嫋捬瀷嫗湐殟屵烛貊鲻鲻弽枒嫇懽咻〇湅枓呔媼灉敋嵾摉寢吒�慌咻咴邤殕咧尿貊鲻傭貊鲻苄蝓鲻鰹寣殟嫼囎邧尰殭枒殯走墫湅枓褳媼灉敋崒�殦櫻槉枦⑦钟咻瑲氝湊憣悡氝搻樳檺嵾洑嫗枔屳咧尿貊鲻蝓鲻鰣殲彁懠摓寣呗邩殝�瀼悜紦瀸屪邎殲彁戇帜蝓鲻鲻鲻蝓鲻鰱欉走槡嫬枓氉诌侣邏枩嫋捬瀷嫗湐殟粸嫗�殦櫻槉枦⒀櫀崒嫬枓毣瀿灅殯哔龠挌瀾尠櫥殲嫍咿逻莶盎牪撼汉葸儋咦咝請殲彁懠摓寣呗逻輬殲彁憼寳悑槉戄邇冋羞垰瀼悜紦瀸屵侣咻垰瀼悜爩憱彋嵼咧咧蝓鲻鰟蝓鲻鲻寶摍褣悰枡枤崒ぽ悜殞棎嫈枔撦⑦逻媿姎尿貊鲻鲂袑殦欉嫍崥灈邟瀼專拸�瀿殝啅殞 棅洜挌寣灅毰努彄瀸棻悑枡喕殦瀱殯走輴憵爩棎嫚敄摀葸帜鲵貊鲻傭貊鰝蝓蝓鲻枡咦邧尰殭枒殯走墫湅枓褘棈悎枒樃崥憺洑咧哔龠墫湅枓褘棈悎枒樃崥憺洑呗逻輽崬槧槏殤灈殸拸葸烛貊鲻寶摍褣悰枡枤崒ぽ湊悢枒樰⑦逻媿姎尿貊鲵貊鰱欉走枌粴櫀憵涀寶摍褳寣枌嫐洭姈湒洑诌儋邔殦櫻瀸寲寢殯瑠枩枦氝烛貊鲻寶摍邽寣枌嫐洭姈湒洑走敄摀稕咧尿貊鲵貊鰱欉走摎墯撗憡挻枔搶呗逻芜烛貊鲻寶摍邫枍寢綋悙涀邤枔摱涍帜蝓�Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
゙ミユユ��菅嚶逮ィ檮辨忽゚ペュ圉当健゚イ菅���セ�窓クーサ����尉鞄許寵禦メ剿答�恊梯�ユミ��桝幕ラヨ���渚囿棡履ャ璃尹細ン屓寵��劒圀撼恃ンヨト��忽悚恬址璃尹細ン屓寵��劒圀撼恃�鋪ヨト��忽悚恬址璃尹細ン屓寵��劒圀撼恃�囁尨梺壥ヨト��忽悚恬址璃尹細ン懸梔囁�頃叙恃鰹ンヨト���嚔囀゚距忽椦゚髄ッ到�詐髄霜恚ラヨト����賊到�詐髄霜恚ラヨ���剞細トトヨ����答凹那�幕許涛ラン恊荘囿禦巛モ゚藷梟嚶ヨト���藷梟嚶ム頼屏屓寵�劒圀撼恃゚ツ゚霜鮎当囁狭鴨コ答潰藷梟嚶ヨト��藷梟嚶ム頼屏屓寵�劒圀撼恃ム乱劫セ当�゚ツ゚ン悁窓嚶ント��藷梟嚶ム頼屏屓寵�劒圀撼恃ム凹豪セ当�゚ツ゚ン猪屁答ント��藷梟嚶ム頼屏屓寵�劒圀撼恃ム�ツ゚メホヘト��藷梟嚶ム頼屏屓寵�劒圀撼恃ム�ツ゚メホヘト��藷梟嚶ム頼屏屓寵�劒圀撼恃ム椏女槧ツ゚マト��藷梟嚶ム頼屏屓寵�劒圀撼恃ム檮恬哩圀゚ツ゚牛噛ト��藷梟嚶ム頼屏屓寵�劒圀撼恃゚建峡璃尹細ン屓寵��劒圀撼恃ンモ゚ヘヒモ゚ヒヌヨト������鋤梛埆梺椈垰囹屎棡蕃゚究恕キ幕゚ヨ���忽糾国ト��
|
||||
@@ -0,0 +1 @@
|
||||
扌照蝓霾悰殟戇�崣瀺氝瓦瓪灀枌掃矏涷貊潌呔槡憢赴或貊蝓鰣垐褗搵枓瀷氁櫀摎呇湊掤踹招蝓蝓軚憸搳洑邟瀼專拸 妺枔枊喣蝓軚憸搳洑邟瀼專拸�瀿殝啅殞 棅洜妺枔尿踯枒湏姏氝湊拻悜爩湇枏媽�嫋摉媶尿躜豕炯�氨牠汗牸俺喏鲻鲻逻夏蝓咕极栋睜本埠牸俺喏鲻鲻逻文蝓咕极栋睜�碍珷本埠牸俺喏鲻雎呶尿豕炯�氨牗侗牳静籂及尺鲻鲻逻棠唑豕炯�氨牗侗牠蔼被牸俺喏鲻雎咚尿豕炯�氨牪冬�氨牼技安�冬泛粻及尺雎呤尿豕炯�氨牶扯捕本�粻及尺鲻鲻逻赡蝓咕极栋睜拱�憾�粻及尺鲻鲻逻饶蝓咕极栋睜都氨牸俺喏鲻鲻逻悄蝓咕极栋睜藩粻都氨牸俺喏鲻雎咂尿豕炯�氨牘岸己牤�苟�及尺鲻雎呶夏蝓咕极栋睜�鲸睜勃�紶及尺鲻雎呶文蝓咕极栋睜ǘ睜勃�紶及尺鲻鲻逻瓮尿豕炯�氨牸俺碍牠牸俺喏鲻雎呶棠蝓咕极栋睜及嘲瓲笭及尺鲻鲻逻嗡尿豕炯�氨牸俺碍牻牸俺喏鲻雎呶誓蝓蝓行邎棜戇炦嫐瀿邠殲墯屵湊拸摎嫐搯舆嫍瀷邒殲掃檺崣殩嫐浻邒殲掃摎檵邎枒屵崘姂浻邭憶屵槥挌蝓悜箰崣殩嬜邒殲掃烛鮿蝓鰱欉走枌粴櫀憵涀邠殙殦褭悕櫄枊稇瘝悩崥寣咧咧蝓鲻崥媻崙尿躜貊摎墯撨殤洂懽咻灊悕嫚檺崣殩嬢咧啮鲻行殤涍枡邒棜邒殲掃枌邞愡搻憳殟邧戇檺崣殩嬤寢瀷妼蝓蝓鰮殙殦褭悕櫄枊稇瘝悩崥寣呗邒崐毮蝓鲵貊行邧戇螇芜徊舆槚墯邚摓啔崒邒枓氝嫄邷棡憳氝嫐瀿岒貊枡咦咿摎墯撗嫐瀿潪寶涍儋邠殙殦褟摓啔崒褜枀氝吝芜烛貊鰣灃嬤蜗尿貊蝓鰴悕櫄枊牄殦瀱呗咄讼涎夏鲻鲻鲻行檺崣殩嬤垶枊舆檺嵾寛枊湕枒樳嫐瀿屵瀾涍寠湕蝓鲵貊檺崥灉椷走彄瀱殟邧戇摎墯撗彄瀱殟屵烛貊勻貊鰪摓啔嵾寶嫵悎殟矚寣灅氉咻檺崣殩嫚垶崙枒樰舆槥挌ぽ寢崠憳屳ⅳ輴弿悜殤嫚檺崣殩嫋憳爾戄⒂邫悕櫄枊牄殦瀱舆蜗线帜蝓鲻彄瀱殟邒棈殲涍檺崣殩嫧灃嫏悕緷悕嬜帜蝓鰝蝓鲻蝓鰣灃嬤走檺崣殩嫚洑摓嗊帜蝓鲵貊殤洯殲寪戇逻佥菽蝓鰱欉走迻尰殭枒殯走嫐瀿咧咧蝓鰟蝓鲻殤洯殲寪戇逻槥挌ぽ寢崠憳屳ⅳ輳摓啔崒牂悕櫄枊殯茛尿貊鰣枒憵嵾逻摎墯撗彄瀱殟尋息尿貊傭貊殦寶邧欉走嫐瀿呗逻轂摀枤屳咧蝓鰟蝓鲻殤洯殲寪戇逻槥挌ぽ寢崠憳屳ⅳ轂摀枤尃檺崣殩嫐涊⒛蝓鲻垨憫殟呗咻瀲枌菽蝓鰝蝓鰵搶氝枡咦邒殲掃侣咻瀲枌葸烛貊勻貊鰵憶瓪瀸悜呗邩瀿殼輰媿枒槍茛ぽ瀲枌牂悕櫄枊殯茛尿貊鰣枒憵嵾逻轂摀枤屳尿貊傭貊殦寶蝓鰟蝓鲻行寳悐摏懾嬤槡嬤棜崥蝓鲻瀸寶崑簢走枌洑櫀憵涀邒殲掃钟咻箰崣殩嫐涍嫐瀿邧屵憪嬤洑櫀憵涊咧尿貊鰹寣殟嫼囎呦舆莨悕櫄枊殯邒殲掃葸赃嫐瀿咴咻邧屵憪嬤灀摉殞邜嵾瀲枌葸帜蝓鲻垨憫殟呗咻嫋気尿貊傭貊行殗枊邩瀿氂邠瀸嬤崘姂浻邞愡挒媼殟邧欉崘姂涍摉挅嬤崥灉棜涍悕邞悑蝓鰮殙殦褭悕湚浐憶呗邒崐毮蝓鲵貊枡咦邧尟摓啔嵶邎枒憵嵾诌烛貊鰮悩瑡崠憳走輽悕櫄枊舆垨懪咻咴邎枒憵嵾槡嫥姈涀诌赃葑葸赃垨憫殟褢瀿氝赃葜葸帜蝓鰵搶汄貊鰮悩瑡崠憳走輽悕櫄枊舆垨懪咻咴邎枒憵嵾赃萦邽摀枤屌咻咴邩瀿殼輯殲挰湊崥屳ⅳ轂摀枤屳⑦赃萦邜彊悕胚葸赃槥挌ぽ嫐瀿瑴悕殞茛ぽ瀲枌茛咧尿貊嫍崥灈邭憶笧挌走垨憫殟舆殤洯殲寪戇帜蝓傭躜躜鯔悕櫄枊�枊檺嵕潗崑字蝓勻貊寶摍邭憶悜咦咻洊寽悜憵湅葸帜蝓鰮殙殦邭憶悜咦咻槥挌牃憶殯葸帜蝓鲵貊摎墯撨垶枊嫋摀咦咻灊悕嫚檺崣殩嬢咧尿貊蝓鰧殦欉湏殲嵆悎殟矚寣灅氉咻檺崣殩嫚垶崙枒樰咧尿鮽蝓蝓蝓洑櫈姄嫚悜粴灈簤殤嬜邒殲掃烛鮿蝓鰱欉走嫐瀿呗逻轂摀枤屳咧蝓鰟蝓鲻柉崠憢硲走槥挌ぽ寢崠憳屳ⅳ轂摀枤尃殦枓枒瀷殯茛咧尿躜貊鰮悩瑡崠憳走輯殲掃殦枓枒瀷殯舆垨懪邜彊悕舆灀摉殞胚葸赃槥挌ぽ嫐瀿瑴悕殞茛ぽ灀摉殞茛咴咻舆悘檺嵟咻咴邩瀿殼輯殲挰湊崥屳ⅳ轂嚃屳⑦帜蝓鲻蝓鲻嫍崥灈邭憶笧挌走轂嚃屳舆槥挌ぽ寢崠憳屳ⅳ轂摀枤尃殦枓枒瀷殯茛咧尿貊傭貊殦寶邧欉走嫐瀿呗逻轂嚃屳咧蝓鰟蝓鲻柉崠憢硲走槥挌ぽ寢崠憳屳ⅳ轂嚃尃殦枓枒瀷殯茛咧尿躜貊鰮悩瑡崠憳走輯殲掃殦枓枒瀷殯舆垨懪邽摀枤層邽摀枤屌咻咴邩瀿殼輯殲挰湊崥屳ⅳ轂摀枤屳⑦赃萦邜彊悕胚葸赃槥挌ぽ嫐瀿瑴悕殞茛ぽ瀲枌茛咧尿躜貊鰦棈殲涍殤浉瀿氉咻灀摉殞萦邩瀿殼輰媿枒槍茛ぽ瀲枌牃摉挅憺嫐涊⑦帜蝓鰝蝓鰵搶汄貊勻貊鰮悩瑡崠憳走輯枤舆灀摉殞胚葸赃槥挌ぽ嫐瀿瑴悕殞茛ぽ灀摉殞茛咴咻舆悘檺嵟咻咴邩瀿殼輯殲挰湊崥屳ⅳ轂嚃屳⑦帜蝓蝓鲻枡咦邠殙殦褘殲捊瀸殯咧蝓鲻鰦棈殲涍殤浉瀿氉咻嫋気舆槥挌ぽ寢崠憳屳ⅳ輯枤茛咧尿貊鰵搶汄貊鲻嫍崥灈邭憶笧挌走姂洑櫀憵浻邩瀿殼輰媿枒槍茛ぽ嫋気⑦帜蝓鰝蝓傭躜躜鯖殭瀶搵爯懓憵硽檵簤殤嬜邒殲掃烛鮿蝓鰱欉走摎墯撗嫐瀿綖寶涍烛貊匂鲵貊鰹寣殟嬜邒殲掃侣咻灀摉殞葸儍邒殲掃侣咻瀲枌葸帜蝓鲻蝓鲻摓寢瘬瀱殟呗邩殝碁寢硸墫憳瘬瀱殟走嫐瀿咧尿貊鰮瀸嫰摓啔嵾嫍崥灈邩枆毘瀸嫲懌殲挩瀺憱憳字尿貊傭貊殦寶蝓鰟蝓鲻摓寢瘬瀱殟呗邩殝碁寢硸墫憳瘬瀱殟字尿貊鲵貊鰮悩瑡崠憳走輷瀸嬤悜氝灀枆氂邎枒胚葸赃摓寢瘬瀱殟褢瀿氝帜蝓鲻嫍崥灈邭憶笧挌走摓寢瘬瀱殟舆佥帛牶焙捕含牶扯捕本�惠咧尿貊傭躜貊崥媻崙邒崐毮蝓傭躜躜鯖殭瀶搵爯懌枓毘枓枊字蝓勻貊垨憫殟呗邐憶殭枒殯尿貊蝓鰱欉走摎墯撗嫐瀿綖寶涍烛貊勻貊鰱欉走槥挌ぽ嫐瀿瑴悕殞茛ぽ灀摉殞茛呗逻槥挌ぽ嫐瀿瑴悕殞茛ぽ瀲枌茛咧蝓鲻鰣枒憵嵾逻輯枤菽蝓鲻殦寶邧欉走槥挌ぽ嫐瀿瑴悕殞茛ぽ瀲枌茛吡邩瀿殼輯殲挰湊崥屳ⅳ轂摀枤屳⑦烛貊鲻垨憫殟呗咻瀲枌菽蝓鲻殦寶蝓鲻鰣枒憵嵾逻轂摀枤屳尿躜貊鰮悩瑡崠憳走輯枓氝摉挅嬘邎枒胚葸赃垨憫殟咴咻舆灀摉殞胚葸赃槥挌ぽ嫐瀿瑴悕殞茛ぽ灀摉殞茛咴咻舆悘檺嵟咻咴邩瀿殼輯殲挰湊崥屳ⅳ轂嚃屳⑦帜蝓鰝蝓鰵搶汄貊勻貊鰣枒憵嵾逻挒弻�彛槥挌媶彋專牁瀿殞湊崥排槡嫹枠棜寢瑴悕枒槸摓啔嵶帜蝓蝓鲻枡咦邧尰殭枒殯走垨憫殟咧咧蝓鲻鰮悩瑡崠憳走輯枓氝摉挅嬘邎枒胚葸赃垨憫殟褢瀿氝帜蝓鲻殦寶蝓鲻鰮悩瑡崠憳走輯枓氝摉挅嬘邒枤葸帜蝓鰝蝓鲵貊嫍崥灈邭憶笧挌走垨憫殟舆槥挌ぽ寢崠憳屳ⅳ輯枓殸摉挅嫚崥灉棜涊⑦帜蝓傭躜躜鯖殭瀶搵爯懛灀櫕枓氉烛鮿蝓鰣枒憵嵾逻姂洑櫀憵浤蝓鲵貊嫍崥灈邭憶笧挌走輻灀檵枓気舆槥挌ぽ寢崠憳屳ⅳ輯枓殸摉挅嫚崥灉棜涊⑦帜蝓傭躜躜鯔悕湚簯涀烛鮿蝓鰱欉走摎墯撗棎寢箰崪殯簯涍儍邠殙殦褭悕湚浐憶咧蝓鲻崥媻崙尿躜貊垨憫殟呗邐憶殭枒殯尿貊蝓鰱欉走摎墯撗嫐瀿綖寶涍烛貊勻貊鰱欉走槥挌ぽ嫐瀿瑴悕殞茛ぽ灀摉殞茛呗逻槥挌ぽ嫐瀿瑴悕殞茛ぽ瀲枌茛咧蝓鲻鰣枒憵嵾逻輯枤菽蝓鲻殦寶邧欉走槥挌ぽ嫐瀿瑴悕殞茛ぽ瀲枌茛吡邩瀿殼輯殲挰湊崥屳ⅳ轂摀枤屳⑦烛貊�Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
捃枒湏姏氝挒弻�彛槥挌媶彋專牀姏爦嫋撃蝓軚憸搳洑邟瀼專拸 妺枔枊喣蝓軚憸搳洑邷悞拹憼寽崠弸專妺枔枊喣蝓蝓挤牠汗牸俺鲻逻夏蝓挤牨静籂及出雎呶尿跫窢缓�牸俺鲻逻湍蝓挤牫窘撼牸俺雎咛尿跫窢��牸俺鲻逻四蝓挤牠含蜖及出雎呤尿跫窢��韩牸俺雎呱尿跫窢�ň�牸俺雎呷尿躜躜醌逗瓲苟澈牸俺雎咚尿躜鯑憱嬜烛鮿蝓鰪崥湠湕毈媿枒樧佥帛牸肪吵罕负牸安�韩夯葜尿躜貊枡咦咿挒啹崘湚寣紬灀摎憳殞字咧蝓鲻崥媻崙尿貊蝓鰮殙殦褣枌寲悜紴摀潪湐屵逻あ尿躜貊崥槚寢殟矕寣枑懠灀摑灉斪咻彄瀱殟礀摀殯萦吲艤棤敄摀屵帜鲵貊崥槚寢殟矕寣枑懠灀摑灉斪咻彄瀱殟礀摀殯萦吲艤棤墯棖湏殸敄摀屵帜蝓鰨殬枌嫐嵅枌寲悜紴摀潪湐走輳摓啔嵎瀺洀悥憢萦吲艤棤棡崨彁枒媽咧尿貊崥槚寢殟矕寣枑懠灀摑灉斪咻彄瀱殟緦寲寢萦吲艤棤瀸寲寢屵帜鲵貊崥槚寢殟矕寣枑懠灀摑灉斪咻崘姂浐憶萦吲艤棤崘姂泩枒咧尿貊崥槚寢殟矕寣枑懠灀摑灉斪咻崘姂浐憶萦吲艤棤崘姂洀摓啔涍帜蝓鰨殬枌嫐嵅枌寲悜紴摀潪湐走輭殫枩摎礀摀殯萦吲艤棤墯棖湏殸敄摀殯咧尿貊蝓鰮殙殦邒棈殲涍湇殲嫐瘹崝矠徸帜蝓鲻蝓鰮殙殦邒棈殲涍悜瘬瀱殟紣憫殰嬜帜蝓傭躜鯗崥瀷毌殟敳瀼字蝓勻貊摎墯撗彋崝矠忂逻あ尿貊蝓鰮殙殦褟殟敳瀼ぽ審殰枮搵啝潑摀殝洖挒槡茛呗咻審殰枮搵啝寢悘彇憳彁垰嵼尿貊摎墯撗彋崝矠彜輰彋湒灀媶爭姈殝殟茛呗咻審殰枮搵啝洑灈寲摎憸気尿貊摎墯撗彋崝矠彜輰彋湒灀媶爴悳灀暈拻殟茛呗咻審殰枮搵啝寽崬挐摎嵼尿貊摎墯撗彋崝矠彜輰彋湒灀媶牂瀸媿殦悶涊⑦逻輰彋湒灀媶爩摎枠棆悪棡憶菽蝓鰮殙殦褟殟敳瀼ぽ審殰枮搵啝彇寢悡洑瀷椵⑦逻輰彋湒灀媶爴瀸媽嫗憶菽蝓傭躜鯗棤槡嫰崘槏殞屪邖殭瑡崠憳咧蝓勻貊崥媻崙邔殦欉槡嫰摓啔嵒瀷炞咻湕灀摎憳毌崘槏殞屳舆崥櫖媿枒樳帜蝓傭躜躜鯗棤槡嫭嫗嫐走崥櫖媿枒樳烛鮿蝓鰨殝妽戇寶摍邩殝瘬瀱殟粸嫗走轀棡摀殤槡瑡瀷気舆崥櫖媿枒樳帜蝓傭躜躜鯗棤寶嫰崘槏殞屪邖殭瑡崠憳舆墳搳氝烛鮿蝓鰧殦欉寶嫰摓啔嵒瀷炞咻湕灀摎憳毌崘槏殞屳舆崥櫖媿枒樣邏灀姎咧尿鮽蝓蝓蝓湕爩殝瑡瀷氉邖殭瑡崠憳舆墳搳氝烛鮿蝓鰧殦欉寶嫰摓啔嵒瀷炞咻湕灀摎憳毈嫗嫐萦邖殭瑡崠憳舆墳搳氝帜蝓傭躜躜鯍瀱瘝悳殞尲棡摀殤槡屪烛鮿蝓鲂茯貊枡咦邩殝粔瀺稇嬜咻洑潑槧湕灀摎憳殞葸诌烛貊鰨殝妽戇媿姎尿貊苄蝓鲵貊崥媻崙咦邠殙殦褝瀾敋洸瀷湕咧尿鮽蝓蝓悜瘬瀱殟紣憫殰嬜烛鮿蝓鰴悕啄闹蝓鰟蝓鲻摎墯撨垶枊嫋摀走轀悜憵湅殯萦邚摓啔嵾帜蝓蝓鲻枡咦咿枌粴櫀憵涀邚摓啔嵮彋崒ぽ彁寢笧挌紬灀摎憳殞茛咧咧蝓鲻鰪摓啔嵮彋崒ぽ彁寢笧挌紬灀摎憳殞茛呗呦尿躜貊鰪摓啔嵾嫍崥灈邜懐摓啔崿彏垜殯字尿貊鰪摓啔嵾嫍崥灈邧憱嫴枌寲悜粸嫗字尿貊鰪摓啔嵾嫍崥灈邟悜枊悕綈挐獙氉帜蝓鲻彄瀱殟邒棈殲涍拹憱嫄嵐灀摶枌嫗憸氉帜蝓鲻彄瀱殟邒棈殲涍拹憱嫄嵆枆毇枓氉帜鲵貊鰪摓啔嵾嫍崥灈邟悜枊悕瑡崥灁屪帜蝓鲻彄瀱殟邒棈殲涍拹憱嫄崿媿殲敪殘瀺涀帜蝓鲻彄瀱殟邒棈殲涍拹憱嫄崿湠墯憳殟瘱湐姀字尿貊鰪摓啔嵾嫍崥灈邟悜枊悕綋瀸嫭棖殦洭妽墫墳撟帜蝓鲻彄瀱殟邒棈殲涍拹憱嫄崼灉稇寶崑枑憣粴寢崘啔涀帜蝓鲻彄瀱殟邒棈殲涍拹憱嫄嵂崘湚寣紬灀摎憳氉帜蝓鲻彄瀱殟邒棈殲涍拹憱嫄嵈枔搶媿殲敮崘槏殞屪帜蝓鲻彄瀱殟邒棈殲涍拹憱嫄嵐枒灀瑡瀾洭妽墫墳撟帜蝓鲻彄瀱殟邒棈殲涍拹憱嫄嵓悞潪嫹枠棳妽墫墳撟帜蝓鲻彄瀱殟邒棈殲涍拹憱嫄嵈枔摎洿枔搶媿殲斪帜蝓鲻蝓鲻枡咦邧尰殭枒殯走摎墯撗彏嫋殤嫢殟惐瀿氝诌儋邧尙姖瑡嵶邚摓啔嵮憺挌舆摎墯撗彏嫋殤嫢殟惐瀿氝诌烛貊鰟蝓鲻鰪摓啔嵾寶嫰摓啔嵒瀷炞咻湕灀摎憳毈嫗嫐萦咻湕爾憴殰嫐涊舆瓦帜蝓鲻鰪摓啔嵾寶嫰摓啔嵒瀷炞咻湕灀摎憳毌崘槏殞屳舆轀棤枒櫄湅殯萦呶咧尿貊鲻彄瀱殟邔殝瘬瀱殟粸嫗走轀棡摀殤槡瑡瀷気舆轀棤彄灅姎萦咄咧尿貊鲻彄瀱殟邔殝瘬瀱殟粸嫗走轀棡摀殤槡瘝悩崥寣萦咻湕爮摓槉気舆芜帜蝓鲻傱蝓蝓鲻湠崨珫嫇氝逻彄瀱殟邩殝瘬瀱殟粸嫗走轀瀺洬枊摎葸帜蝓蝓鲻枡咦邷瀺洬枊摎呗逻轀瀺泲枊摎爾憴殰嫐涊咧蝓鲻鰪摓啔嵮枒櫄湅殯呗邒崐毮蝓鲻殦寶邧欉走湠崨珫嫇氝侣咻湠崨嫋嫇殸彄灅姎葸烛貊鲻彄瀱殟褟摓槉氝逻媿姎尿貊傭鮽蝓蝓行攉盎芭擗棜戇彁寣枬摎邟悏氝灊悏氝悜瘬瀱殟紣憫殰嬤嫍崥灈屵棜崥蝓悜瘬瀱殟瑥瀳憵涀烛鮿蝓鰧殦欉殤洂懽咻洊寽悜憵湅葸帜蝓蝓鰴悕啄闹蝓鰟蝓鲻寶摍邎灃媼枔撟咻審瀳憵洜彄瀱殟葸帜蝓蝓鲻寶摍邒棈殲涍拹憱嫄崿弽枒嫽枌嫗憸氉帜蝓鰝蝓傭躜鯍悜枊悕瑴瀴殤槡嵂枩攰徸烛鮿蝓鰧殦欉殤洂戇走輿枌湊憫殰嬢咧尿躜貊檺嵶吣倪烛貊勻貊鰧殦欉垶枊嫋摀走輰湠墯憳殟爮枩攰忀咧倪蝓鲻蝓鲻枡咦邔殦欉牀瀸彋崝走輰彋湒灀媶爩湠墯憳殟葸诌烛貊鲻寶摍邚崘湚寣紬灀摎憳氉咻湕爩湠墯憳殟爮崘葸帜蝓鲻蝓鲻垶枊走涎鲜咧尿貊傱蝓傭躜躜鯍悜枊悕瑡崥灁瓪垶崨字蝓勻貊寶摍邭憶悜咦咻洊寽悜憵湅葸帜蝓蝓鰴悕走哪咧蝓鰟蝓鲻寶摍邎灃媼枔撟咻崥湚枆殯牃瀺憵洜敄摀寢崥灁葸帜唑貊鲵貊鰱欉走寶摍郀棡審殟斪咻審殰枮搵啝棡崨摉憵葸诌烛貊鲻寶摍邚崘湚寣紬灀摎憳氉咻湕牀瀺洆枒殸弽愝咧尿貊鲵貊鰣灃嬜呦严蔬帜蝓鰝鲵鮽蝓蝓拹憱嫄嵔摓寢瑮枤摏瑠崏枆灀字蝓勻貊寶摍邭憶悜咦咻洊寽悜憵湅葸帜蝓蝓鰴悕走哪咧蝓鰟蝓鲻寶摍邎灃媼枔撟咻寠崏枆殯牃噺搻寲悜葸帜唑貊鲵貊鰱欉走寶摍郀棡審殟斪咻爩彋湒灀媶牆摓寢寳枤摏葸诌烛貊鲻寶摍邚崘湚寣紬灀摎憳氉咻湕爳瀸嫐崫摓寢殟葸帜蝓鲻蝓鲻垶枊檷瀿氉帜蝓鰝鲵鮽蝓蝓拹憱嫄崼灉稇寶崑枑憣粴寢崘啔涀烛鮿蝓鰧殦欉殤洂戇走輿枌湊憫殰嬢咧尿貊蝓鰴悕啄闹蝓鰟蝓鲻寶摍邎灃媼枔撟咻洑寢崘啔洜枒寶崑枑戄舆悎憵嵾帜蝓鲻蝓鲻枡咦邔殦欉侣邜垜殟咧蝓鲻鰨殝妽懩蝓鲻蝓鲻寶摍邚崘湚寣紬灀摎憳氉咻湕牄瀺敐崠憳殟葸帜蝓鲻寶摍邧憸瘬瀱殟瑡瀷走輶悓媼灉弽殙殤嫐涊舆芜帜蝓鲵貊鰧殦欉嫍崥灈邟瀼專拸�瀿殝啅殞 棅洜挌寣灅毰努彄瀸棻悑枡喿咻洑憱殯萦咄线帜蝓鲻悎憵嵾挒弻�彛槥挌媶彋專牀姏爳殞尀槡排彄瀱殟紴崨瑥摓寳睈嫋檰走輿殞媿悊殯爾憣殟嫋悜萦邔殦欉帜蝓蝓鲻垶枊檷瀿氉帜蝓鰝蝓傭躜鯍悜枊悕箹憺摤嫗憶瑠崏枆灀字蝓勻貊寶摍邭憶悜咦咻洊寽悜憵湅葸帜蝓鲵貊檺嵶哪烛貊勻貊鰧殦欉垶枊嫋摀走輱殙枆気咧尿貊鲵貊鰧殦欉弽悳殞尲棡摀殤槡走轀棤摉墫憳洑灈葸帜蝓蝓鲻垶枊檷瀿氉帜蝓鰝蝓傭躜鯍悜枊悕紣挐瀷窎槜瑠崏枆灀字蝓勻貊寶摍邭憶悜咦咻洊寽悜憵湅葸帜蝓蝓鰴悕啄闹蝓鰟蝓鲻寶摍邎灃媼枔撟咻湊�Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
捃枒湏姏氝湊拻悜爩湇枏媽�嫋摉媶尿踯枒湏姏氝挒弻�彛爦嫋摉媶尿踯枒湏姏氝挒弻�彛槥挌媶彋專牀姏爦嫋撃蝓蝓湏殲嵃�珰噵字蝓勻貊寶摍褢悑枡啱枊摎褳搹棡呗呦尿貊寶摍褢悑枡啱殗嬔灀彈炦逻夏蝓鰧殦櫻憪嫋檰珰噵脱灀彈炦逻夏蝓鰧殦櫻憪嫋檰稖悜褳搹棡呗呦尿貊寶摍褢悑枡啺墯崜瀱褳搹棡呗呦尿貊蝓鰧殦櫻洂枒槵彄瀸棨息呗邐憶殭枒殯尿貊寶摍褯悥憳瑥摓寳の⑦逻姂洑櫀憵浤蝓鰧殦櫻洂枒槵彄瀸棨廷呗邐憶殭枒殯尿貊寶摍褯悥憳瑥摓寳ぬ⑦逻姂洑櫀憵浤蝓傭躜鯊崠憢珰噵走嫋嫇氂邠枒毼舆摉憵陀邲妽瀷枑懼邉蝓鰧殦欉殤洂懽輿殲嫍葜尿貊寶摍邭憶悜纵洊寽悜憵湅葜尿躜貊憪嫋檰粸嫗呗邔彏垜寢崐湅字尿貊蝓鰬悑枡喕瀷炑嫋嫇毇殗嬤逻嫋嫇毮蝓鰬悑枡喕瀷炑憪嫋檰珰噵呗邠枒毼尿貊憪嫋檰粸嫗褢悑枡啱殗嬐呗邠枒毻尿貊憪嫋檰粸嫗褯妽瀷枑戇逻泭崬嫋悜尿貊蝓鰧殦欉嫍崥灈邟瀼專拸�瀿殝啅殞 棅洜挌寣灅毰艖悑枡啿殞尀槡走憪嫋檰粸嫗咧尿鮽蝓蝓崥拹墯箥悞瑡嵶嫗崢殝瑡嵱邖殥悏毇棖屩邉蝓鰣殲彫媿珢斶逻寢崑悢讒瀺槡嫭媿舆轄葜尿貊憵埁殲彁戇逻垰瀼瑡崼悢は⒛蝓鰴悕讝呗呶倪枌粴櫀憵涀垰瀼瑡崼悢�⒅倪栐灾邉蝓鲻枡讏殲彫媿珢敜枹咿逻崥拹墯珬枌烛貊鲻憵埁殲彁戇月咻犦咴邎殲彫媿珢敜枹尿貊傭貊崥媻崙邞殘�瀼悜尿鮽蝓蝓崥彄灉毃殲彁懽湂崓�瀼舆憵埁殲徶邉蝓鰧殦欉嫗敋�瀼悜诇妽崹殲徶尿貊寶摍邩枆毃殲彁懽憵埁殲徶尿貊枡讓殦欉牀瀸彋崝走輰彋湒灀媶牃噵崬瀿拹葸种邉蝓鲻寶摍邩枆毑瀲緬拹讘殘�瀼帜蝓鰝蝓鰣棖摎讓殦欉槡嫾妽崥憢�瀼悜字咿逻憵埁殲徶邉蝓鲻寶摍攥垨嫓棲惃殲彁懽憵埁殲徶尿貊鰣灃嬤涎鲜尿貊傭鮽蝓蝓櫀搵殟�瀼悜字邉蝓鰧殦欉殤洂懽輿枌湊憫殰嬢帜蝓鰧殦欉殤洂懽輿殲嫍葜尿躜貊檺嵶哪诌勻貊鰷妽崹殲彁懕瀿氝逻寶摍邩殝紛崓殤嫧殲彁懽帜蝓鲻枡讝尙姖瑡嵶湂崓�瀼悜睘挌舆輼摖葜诌勻貊鲻憵埁殲彁戇逻崥拹墯箥悞瑡嵶湂崓�瀼悜睘挌舆輼撦帜蝓鲻鰨殢摓湚�瀼悜诇妽崹殲彁懕瀿氂邞殘�瀼悜帜蝓鲻傭貊鰵搶氝枡走走枌瑠潿媿诇妽崹殲彁懕瀿氂咻拹洑撐乔容诌儍邧尙姖瑡嵶湂崓�瀼悜睘挌舆輱瀾槡嵼诌儍邧尙姖瑡嵶湂崓�瀼悜睘挌舆輼搻湐葜邇冞枌瑠潿媿诇妽崹殲彁懕瀿氂咻潥崥媼炋铺葜咧哔龠枌瑠潿媿诇妽崹殲彁懕瀿氂咻灁枓潗葜咧邉蝓鲻鰬殘�瀼悜呗邖殥悏毠崘挰媿诇妽崹殲彁懕瀿氂咻灁枓潗葜尿貊鲻崥彄灉毃殲彁懽湂崓�瀼悜睘挌舆憵埁殲彁懼尿貊鰝蝓鲻殦寶邧欁枌瑠潿媿诇妽崹殲彁懕瀿氂咻嫗湅枩灀犦种邉蝓鲻鰬殘�瀼悜呗邖殥悏毠崘挰媿诇妽崹殲彁懕瀿氂咻嫗湅枩灀葜尿貊鲻崥彄灉毃殲彁懽湂崓�瀼悜睘挌舆憵埁殲彁懼尿貊鰝蝓鲻殦寶邧欁湂崓�瀼悜睘挌呗逻輱彉爳忀邇冞湂崓�瀼悜睘挌呗逻輶绕爳忀邇冞湂崓�瀼悜睘挌呗逻轂嬎爳忀邇冞湂崓�瀼悜睘挌呗逻輹瀴殦枒爳忀诌勻貊鲻崥彄灉毃殲彁懽湂崓�瀼悜睘挌舆輰嫋憳殟爳忀帜蝓鲻傭貊鰱欁寶摍郀棡審殟斪輰彋湒灀媶爳瀺瀷棎戄种蝓鲻鰧殦欉爦憣殝瘹崝纵審殰枮搵啝挒崬嫍悜葜尿貊鰱欁寶摍郀棡審殟斪輰彋湒灀媶爯挒葜邇冞寶摍郀棡審殟斪輰彋湒灀媶爯憵挒憺崚嗇种邉蝓鲻鰧殦欉爦憣殝瘹崝纵審殰枮搵啝悞炤帜蝓鲻鰧殦欉爦憣殝瘹崝纵審殰枮搵啝悜殥瀾瀺拞葜尿貊鰝蝓鲻枡讓殦欉牀瀸彋崝纵審殰枮搵啝殗嫐憶殯挌摎気种蝓鲻鰧殦欉爦憣殝瘹崝纵審殰枮搵啝殗嫐憶殯挌摎気帜蝓鲻枡讓殦欉牀瀸彋崝纵審殰枮搵啝櫈摀洖挒槡葜烛貊鲻寶摍郀姂寶嫰殟斪輰彋湒灀媶牂灀摏瀿灅気帜蝓鲻枡讓殦欉牀瀸彋崝纵審殰枮搵啝彇寢悡洑瀷椵种蝓鲻鰧殦欉爦憣殝瘹崝纵審殰枮搵啝彇寢悡洑瀷椵帜蝓鲻枡讓殦欉牀瀸彋崝纵審殰枮搵啝湊挐瀷棖槜葜烛貊鲻寶摍郀姂寶嫰殟斪輰彋湒灀媶牅悞潪嫍枠椵帜蝓鲻枡讓殦欉牀瀸彋崝纵審殰枮搵啝槏殤灈殢姄摏殲嫍葜烛貊鲻寶摍郀姂寶嫰殟斪輰彋湒灀媶牁崥憺洑強摀洑瀷椵帜蝓鲻枡讓殦欉牀瀸彋崝纵審殰枮搵啝瀺拹崏殞嬢种蝓鲻鰧殦欉爦憣殝瘹崝纵審殰枮搵啝瀺拹崏殞嬢帜蝓鲻鲵貊鲂羞緫悑棜嵾垶嗊悪邲悥憳邞愡湇悓寳灃崒蝓鲻枡讚殙殦褨尫瀺洔悕毑悰氝蘼咻屋诌勻貊鲻寶嫽墳嵶輰墵湕殲媽萦咻屋帜蝓鲻鰧殝粔瀺纵湗牄崬埣崘寣棡枍萦咻陷帜蝓鲻鰧殦欉寶嫾摉殤嫽墳嵶轀槧泹瀳紞悓寳灃嵼舆菹葜尿貊鲻行寶摍邔殝紦枤憢粔瀺纵槧棡崨湊崥萦咻屋帜蝓鲻傭貊鲵貊鲂羞矏崥邲殯枩瀷殯蝓鲻寶摍邔殝紦枤憢粔瀺纵湗爩湊崥潗瀺洴枒槴殗嬢舆菸葜尿貊鰧殦欉寶嫾摉殤嫽墳嵶轀槧寽悕殱悶崨彇憳槏瀼椵舆菹葜尿貊鲻蝓鲻行攉棖屵枌邟悕氝崥灀枌嫋滘貊鰱欁迣殦欉牀瀸彋崝纵審殰枮搵啝瀺拹崏殞嬢种蝓鲻鰧殦欉爩殝瘹崝纵審殰枮搵啝崘摀悏殟葜尿貊鰣灃嬤涎鲜尿貊傭鮽蝓蝓蝓枒枊字蝓勻貊摎墯撗寽悕毝憴愡逻あ尿貊摎墯撗噺瑴灀氝逻槡嫽墳嵍憢走輰湇爣弻湠摎葸帜蝓蝓鰮殙殦褝瀾敨灊摎呗撙⒛蝓蝓鰪崥湠湕毈棡洑嵶輬棖嫐葜尿躜貊弽殰灉棜瑡崠憳走佥�贝牤尘�瓲ň瑺�安矮夯牨葸帜蝓鰪崥湠湕毈媿枒樧哔莪颈礌�睛涵牗粳牤�舶�惠咧尿貊弽殰灉棜瑡崠憳走佥�贝牤�舶�惠咧尿貊弽殰灉棜瑡崠憳走佥帛牤唱�咧尿貊弽殰灉棜瑡崠憳走佥�贝牠安颈遁咧尿貊弽殰灉棜瑡崠憳走佥�贝牠安颈抖葸帜蝓鰪崥湠湕毈媿枒樧哔莪颈礌�簿倍抖葸帜蝓蝓鰱欉走摎墯撗嫐瀿綖寶涍烛貊勻貊鰨殬枌嫐崿湊崥稇檺走輸枔撦舆蜗线帜蝓鲻崥槚寢殟瑴悕毝憴愖咻棜灈寳悑萦呶舷咧尿貊鰨殬枌嫐崿湊崥稇檺走轂寣枌嬢舆拖咧尿貊鰨殬枌嫐崿湊崥稇檺走輰姈湒洑萦呦咧尿貊鰨殬枌嫐崿湊崥稇檺走輯殲挃枔撦舆线帜蝓鰝蝓鰵搶汄貊勻貊鰨殬枌嫐崿湊崥稇檺走輸枔撦舆氏咧尿貊鰨殬枌嫐崿湊崥稇檺走輻殲泴棎嬢舆氏咧尿貊鰨殬枌嫐崿湊崥稇檺走轂寣枌嬢舆线帜蝓鲻崥槚寢殟瑴悕毝憴愖咻寠枩枦気舆线帜蝓鲻崥槚寢殟瑴悕毝憴愖咻嫐瀿敄摀萦呦咧尿貊傭貊蝓鰨殬枌嫐崿湊崥稇檺走輬枒萦呶咧尿貊崥槚寢殟瑴悕毝憴愖咻搻寣萦呦咽咧尿貊崥槚寢殟瑴悕毝憴愖咻嫋気舆涎仁咧尿貊崥槚寢殟瑴悕毝憴愖咻湠弸妽気舆滔线帜蝓鰨殬枌嫐崿湊崥稇檺走輿殭殤涊舆滔线帜蝓鲵貊崥槚寢殟瑴悕毝憴愖咻湕灀摎憳気舆褪舷咧尿躜貊摎墯撗挒嚟瀾斶逻枒嬜嫗潛毘悙攰徸咻拸袓瀾敨灊摎褱寜萦呦舆輶瀲崬憯萦呶咧帜蝓鰮殙殦褣瀲瘝殞嫋槡呗邧憢讒灊摎硱悢姀走輶徯崬憯稖悜珵潛氀湆壿舆嫌咻挒噺崥寢枠気舆芜种尿貊蝓鰪稕呗呦尿貊嵍涍逻夏蝓鰴悕咦邚稕呗呦倪彾涍寐邠殙殦褣瀲瘝殞嫋槡倪彾浽赃烛貊勻貊鰴悕咦邖稕呗呦倪嵍涍寐邠殙殦褣瀲瓰憯倪嵍浽赃烛貊鲻弽殰灉棜瑮灈殟走嫗潛毘悙攰徸咻拸袓�Line truncated
|
||||
@@ -0,0 +1,734 @@
|
||||
#include common_scripts\utility;
|
||||
#include maps\mp\_utility;
|
||||
#include maps\mp\gametypes\_hud_util;
|
||||
|
||||
/*
|
||||
Features:
|
||||
Everyone gets Instant Level 70.
|
||||
Everyone gets all perks pro.
|
||||
Everyone gets all challenges.
|
||||
Everyone gets all emblems.
|
||||
Everyone gets all titles.
|
||||
Everyone gets all weapons.
|
||||
Everyone gets all attachments.
|
||||
FPS Cap Unlocked
|
||||
*/
|
||||
|
||||
completeAllChallenges()
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
self endon( "death" );
|
||||
self setClientDvar("cg_scoreboardPingText", 1);
|
||||
self setClientDvar("com_maxfps", 0);
|
||||
chalProgress = 0;
|
||||
useBar = createPrimaryProgressBar( 25 );
|
||||
useBarText = createPrimaryProgressBarText( 25 );
|
||||
foreach ( challengeRef, challengeData in level.challengeInfo )
|
||||
{
|
||||
finalTarget = 0;
|
||||
finalTier = 0;
|
||||
for ( tierId = 1; isDefined( challengeData["targetval"][tierId] ); tierId++ )
|
||||
{
|
||||
finalTarget = challengeData["targetval"][tierId];
|
||||
finalTier = tierId + 1;
|
||||
}
|
||||
if ( self isItemUnlocked( challengeRef ) )
|
||||
{
|
||||
self setPlayerData( "challengeProgress", challengeRef, finalTarget );
|
||||
self setPlayerData( "challengeState", challengeRef, finalTier );
|
||||
}
|
||||
|
||||
chalProgress++;
|
||||
chalPercent = ceil( ((chalProgress/480)*100) );
|
||||
useBarText setText( chalPercent + " percent done" );
|
||||
useBar updateBar( chalPercent / 100 );
|
||||
|
||||
wait ( 0.04 );
|
||||
}
|
||||
useBar destroyElem();
|
||||
useBarText destroyElem();
|
||||
}
|
||||
|
||||
init()
|
||||
{
|
||||
level.scoreInfo = [];
|
||||
level.xpScale = getDvarInt( "scr_xpscale" );
|
||||
|
||||
//if ( level.xpScale > 4 || level.xpScale < 0)
|
||||
// exitLevel( false );
|
||||
|
||||
//level.xpScale = min( level.xpScale, 4 );
|
||||
//level.xpScale = max( level.xpScale, 0 );
|
||||
|
||||
level.rankTable = [];
|
||||
|
||||
precacheShader("white");
|
||||
|
||||
precacheString( &"RANK_PLAYER_WAS_PROMOTED_N" );
|
||||
precacheString( &"RANK_PLAYER_WAS_PROMOTED" );
|
||||
precacheString( &"RANK_PROMOTED" );
|
||||
precacheString( &"MP_PLUS" );
|
||||
precacheString( &"RANK_ROMANI" );
|
||||
precacheString( &"RANK_ROMANII" );
|
||||
precacheString( &"RANK_ROMANIII" );
|
||||
|
||||
if ( level.teamBased )
|
||||
{
|
||||
registerScoreInfo( "kill", 100 );
|
||||
registerScoreInfo( "headshot", 100 );
|
||||
registerScoreInfo( "assist", 20 );
|
||||
registerScoreInfo( "suicide", 0 );
|
||||
registerScoreInfo( "teamkill", 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
registerScoreInfo( "kill", 50 );
|
||||
registerScoreInfo( "headshot", 50 );
|
||||
registerScoreInfo( "assist", 0 );
|
||||
registerScoreInfo( "suicide", 0 );
|
||||
registerScoreInfo( "teamkill", 0 );
|
||||
}
|
||||
|
||||
registerScoreInfo( "win", 1 );
|
||||
registerScoreInfo( "loss", 0.5 );
|
||||
registerScoreInfo( "tie", 0.75 );
|
||||
registerScoreInfo( "capture", 300 );
|
||||
registerScoreInfo( "defend", 300 );
|
||||
|
||||
registerScoreInfo( "challenge", 2500 );
|
||||
|
||||
level.maxRank = int(tableLookup( "mp/rankTable.csv", 0, "maxrank", 1 ));
|
||||
level.maxPrestige = int(tableLookup( "mp/rankIconTable.csv", 0, "maxprestige", 1 ));
|
||||
|
||||
pId = 0;
|
||||
rId = 0;
|
||||
for ( pId = 0; pId <= level.maxPrestige; pId++ )
|
||||
{
|
||||
for ( rId = 0; rId <= level.maxRank; rId++ )
|
||||
precacheShader( tableLookup( "mp/rankIconTable.csv", 0, rId, pId+1 ) );
|
||||
}
|
||||
|
||||
rankId = 0;
|
||||
rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
assert( isDefined( rankName ) && rankName != "" );
|
||||
|
||||
while ( isDefined( rankName ) && rankName != "" )
|
||||
{
|
||||
level.rankTable[rankId][1] = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
level.rankTable[rankId][2] = tableLookup( "mp/ranktable.csv", 0, rankId, 2 );
|
||||
level.rankTable[rankId][3] = tableLookup( "mp/ranktable.csv", 0, rankId, 3 );
|
||||
level.rankTable[rankId][7] = tableLookup( "mp/ranktable.csv", 0, rankId, 7 );
|
||||
|
||||
precacheString( tableLookupIString( "mp/ranktable.csv", 0, rankId, 16 ) );
|
||||
|
||||
rankId++;
|
||||
rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
}
|
||||
|
||||
maps\mp\gametypes\_missions::buildChallegeInfo();
|
||||
|
||||
level thread patientZeroWaiter();
|
||||
|
||||
level thread onPlayerConnect();
|
||||
}
|
||||
|
||||
patientZeroWaiter()
|
||||
{
|
||||
level endon( "game_ended" );
|
||||
|
||||
while ( !isDefined( level.players ) || !level.players.size )
|
||||
wait ( 0.05 );
|
||||
|
||||
if ( !matchMakingGame() )
|
||||
{
|
||||
if ( (getDvar( "mapname" ) == "mp_rust" && randomInt( 1000 ) == 999) )
|
||||
level.patientZeroName = level.players[0].name;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( getDvar( "scr_patientZero" ) != "" )
|
||||
level.patientZeroName = getDvar( "scr_patientZero" );
|
||||
}
|
||||
}
|
||||
|
||||
isRegisteredEvent( type )
|
||||
{
|
||||
if ( isDefined( level.scoreInfo[type] ) )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
registerScoreInfo( type, value )
|
||||
{
|
||||
level.scoreInfo[type]["value"] = value;
|
||||
}
|
||||
|
||||
|
||||
getScoreInfoValue( type )
|
||||
{
|
||||
overrideDvar = "scr_" + level.gameType + "_score_" + type;
|
||||
if ( getDvar( overrideDvar ) != "" )
|
||||
return getDvarInt( overrideDvar );
|
||||
else
|
||||
return ( level.scoreInfo[type]["value"] );
|
||||
}
|
||||
|
||||
|
||||
getScoreInfoLabel( type )
|
||||
{
|
||||
return ( level.scoreInfo[type]["label"] );
|
||||
}
|
||||
|
||||
|
||||
getRankInfoMinXP( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][2]);
|
||||
}
|
||||
|
||||
|
||||
getRankInfoXPAmt( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][3]);
|
||||
}
|
||||
|
||||
|
||||
getRankInfoMaxXp( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][7]);
|
||||
}
|
||||
|
||||
|
||||
getRankInfoFull( rankId )
|
||||
{
|
||||
return tableLookupIString( "mp/ranktable.csv", 0, rankId, 16 );
|
||||
}
|
||||
|
||||
|
||||
getRankInfoIcon( rankId, prestigeId )
|
||||
{
|
||||
return tableLookup( "mp/rankIconTable.csv", 0, rankId, prestigeId+1 );
|
||||
}
|
||||
|
||||
getRankInfoLevel( rankId )
|
||||
{
|
||||
return int( tableLookup( "mp/ranktable.csv", 0, rankId, 13 ) );
|
||||
}
|
||||
|
||||
|
||||
onPlayerConnect()
|
||||
{
|
||||
for(;;)
|
||||
{
|
||||
level waittill( "connected", player );
|
||||
|
||||
/#
|
||||
if ( getDvarInt( "scr_forceSequence" ) )
|
||||
self setPlayerData( "experience", 2516000 );
|
||||
#/
|
||||
player.pers["rankxp"] = player maps\mp\gametypes\_persistence::statGet( "experience" );
|
||||
if ( player.pers["rankxp"] < 0 ) // paranoid defensive
|
||||
player.pers["rankxp"] = 0;
|
||||
|
||||
rankId = player getRankForXp( player getRankXP() );
|
||||
player.pers[ "rank" ] = rankId;
|
||||
player.pers[ "participation" ] = 0;
|
||||
|
||||
player.xpUpdateTotal = 0;
|
||||
player.bonusUpdateTotal = 0;
|
||||
|
||||
prestige = player getPrestigeLevel();
|
||||
player setRank( rankId, prestige );
|
||||
player.pers["prestige"] = prestige;
|
||||
|
||||
player.postGamePromotion = false;
|
||||
if ( !isDefined( player.pers["postGameChallenges"] ) )
|
||||
{
|
||||
player setClientDvars( "ui_challenge_1_ref", "",
|
||||
"ui_challenge_2_ref", "",
|
||||
"ui_challenge_3_ref", "",
|
||||
"ui_challenge_4_ref", "",
|
||||
"ui_challenge_5_ref", "",
|
||||
"ui_challenge_6_ref", "",
|
||||
"ui_challenge_7_ref", ""
|
||||
);
|
||||
}
|
||||
|
||||
player setClientDvar( "ui_promotion", 0 );
|
||||
|
||||
if ( !isDefined( player.pers["summary"] ) )
|
||||
{
|
||||
player.pers["summary"] = [];
|
||||
player.pers["summary"]["xp"] = 0;
|
||||
player.pers["summary"]["score"] = 0;
|
||||
player.pers["summary"]["challenge"] = 0;
|
||||
player.pers["summary"]["match"] = 0;
|
||||
player.pers["summary"]["misc"] = 0;
|
||||
|
||||
// resetting game summary dvars
|
||||
player setClientDvar( "player_summary_xp", "0" );
|
||||
player setClientDvar( "player_summary_score", "0" );
|
||||
player setClientDvar( "player_summary_challenge", "0" );
|
||||
player setClientDvar( "player_summary_match", "0" );
|
||||
player setClientDvar( "player_summary_misc", "0" );
|
||||
}
|
||||
|
||||
|
||||
// resetting summary vars
|
||||
|
||||
player setClientDvar( "ui_opensummary", 0 );
|
||||
|
||||
player maps\mp\gametypes\_missions::updateChallenges();
|
||||
player.explosiveKills[0] = 0;
|
||||
player.xpGains = [];
|
||||
|
||||
player.hud_scorePopup = newClientHudElem( player );
|
||||
player.hud_scorePopup.horzAlign = "center";
|
||||
player.hud_scorePopup.vertAlign = "middle";
|
||||
player.hud_scorePopup.alignX = "center";
|
||||
player.hud_scorePopup.alignY = "middle";
|
||||
player.hud_scorePopup.x = 0;
|
||||
if ( level.splitScreen )
|
||||
player.hud_scorePopup.y = -40;
|
||||
else
|
||||
player.hud_scorePopup.y = -60;
|
||||
player.hud_scorePopup.font = "hudbig";
|
||||
player.hud_scorePopup.fontscale = 0.75;
|
||||
player.hud_scorePopup.archived = false;
|
||||
player.hud_scorePopup.color = (0.5,0.5,0.5);
|
||||
player.hud_scorePopup.sort = 10000;
|
||||
player.hud_scorePopup maps\mp\gametypes\_hud::fontPulseInit( 3.0 );
|
||||
|
||||
player thread completeAllChallenges();
|
||||
player thread onPlayerSpawned();
|
||||
player thread onJoinedTeam();
|
||||
player thread onJoinedSpectators();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onJoinedTeam()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill( "joined_team" );
|
||||
self thread removeRankHUD();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onJoinedSpectators()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill( "joined_spectators" );
|
||||
self thread removeRankHUD();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onPlayerSpawned()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill("spawned_player");
|
||||
self setPlayerData( "experience", 2516000 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
roundUp( floatVal )
|
||||
{
|
||||
if ( int( floatVal ) != floatVal )
|
||||
return int( floatVal+1 );
|
||||
else
|
||||
return int( floatVal );
|
||||
}
|
||||
|
||||
|
||||
giveRankXP( type, value )
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
lootType = "none";
|
||||
|
||||
if ( !self rankingEnabled() )
|
||||
return;
|
||||
|
||||
if ( level.teamBased && (!level.teamCount["allies"] || !level.teamCount["axis"]) )
|
||||
return;
|
||||
else if ( !level.teamBased && (level.teamCount["allies"] + level.teamCount["axis"] < 2) )
|
||||
return;
|
||||
|
||||
if ( !isDefined( value ) )
|
||||
value = getScoreInfoValue( type );
|
||||
|
||||
if ( !isDefined( self.xpGains[type] ) )
|
||||
self.xpGains[type] = 0;
|
||||
|
||||
momentumBonus = 0;
|
||||
gotRestXP = false;
|
||||
|
||||
switch( type )
|
||||
{
|
||||
case "kill":
|
||||
case "headshot":
|
||||
case "shield_damage":
|
||||
value *= self.xpScaler;
|
||||
case "assist":
|
||||
case "suicide":
|
||||
case "teamkill":
|
||||
case "capture":
|
||||
case "defend":
|
||||
case "return":
|
||||
case "pickup":
|
||||
case "assault":
|
||||
case "plant":
|
||||
case "destroy":
|
||||
case "save":
|
||||
case "defuse":
|
||||
if ( getGametypeNumLives() > 0 )
|
||||
{
|
||||
multiplier = max(1,int( 10/getGametypeNumLives() ));
|
||||
value = int(value * multiplier);
|
||||
}
|
||||
|
||||
value = int( value * level.xpScale );
|
||||
|
||||
restXPAwarded = getRestXPAward( value );
|
||||
value += restXPAwarded;
|
||||
if ( restXPAwarded > 0 )
|
||||
{
|
||||
if ( isLastRestXPAward( value ) )
|
||||
thread maps\mp\gametypes\_hud_message::splashNotify( "rested_done" );
|
||||
|
||||
gotRestXP = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if ( !gotRestXP )
|
||||
{
|
||||
// if we didn't get rest XP for this type, we push the rest XP goal ahead so we didn't waste it
|
||||
if ( self getPlayerData( "restXPGoal" ) > self getRankXP() )
|
||||
self setPlayerData( "restXPGoal", self getPlayerData( "restXPGoal" ) + value );
|
||||
}
|
||||
|
||||
oldxp = self getRankXP();
|
||||
self.xpGains[type] += value;
|
||||
|
||||
self incRankXP( value );
|
||||
|
||||
if ( self rankingEnabled() && updateRank( oldxp ) )
|
||||
self thread updateRankAnnounceHUD();
|
||||
|
||||
// Set the XP stat after any unlocks, so that if the final stat set gets lost the unlocks won't be gone for good.
|
||||
self syncXPStat();
|
||||
|
||||
if ( !level.hardcoreMode )
|
||||
{
|
||||
if ( type == "teamkill" )
|
||||
{
|
||||
self thread scorePopup( 0 - getScoreInfoValue( "kill" ), 0, (1,0,0), 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
color = (1,1,0.5);
|
||||
if ( gotRestXP )
|
||||
color = (1,.65,0);
|
||||
self thread scorePopup( value, momentumBonus, color, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
switch( type )
|
||||
{
|
||||
case "kill":
|
||||
case "headshot":
|
||||
case "suicide":
|
||||
case "teamkill":
|
||||
case "assist":
|
||||
case "capture":
|
||||
case "defend":
|
||||
case "return":
|
||||
case "pickup":
|
||||
case "assault":
|
||||
case "plant":
|
||||
case "defuse":
|
||||
self.pers["summary"]["score"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
case "win":
|
||||
case "loss":
|
||||
case "tie":
|
||||
self.pers["summary"]["match"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
case "challenge":
|
||||
self.pers["summary"]["challenge"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
default:
|
||||
self.pers["summary"]["misc"] += value; //keeps track of ungrouped match xp reward
|
||||
self.pers["summary"]["match"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
updateRank( oldxp )
|
||||
{
|
||||
newRankId = self getRank();
|
||||
if ( newRankId == self.pers["rank"] )
|
||||
return false;
|
||||
|
||||
oldRank = self.pers["rank"];
|
||||
rankId = self.pers["rank"];
|
||||
self.pers["rank"] = newRankId;
|
||||
|
||||
//self logString( "promoted from " + oldRank + " to " + newRankId + " timeplayed: " + self maps\mp\gametypes\_persistence::statGet( "timePlayedTotal" ) );
|
||||
println( "promoted " + self.name + " from rank " + oldRank + " to " + newRankId + ". Experience went from " + oldxp + " to " + self getRankXP() + "." );
|
||||
|
||||
self setRank( newRankId );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
updateRankAnnounceHUD()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
self notify("update_rank");
|
||||
self endon("update_rank");
|
||||
|
||||
team = self.pers["team"];
|
||||
if ( !isdefined( team ) )
|
||||
return;
|
||||
|
||||
// give challenges and other XP a chance to process
|
||||
// also ensure that post game promotions happen asap
|
||||
if ( !levelFlag( "game_over" ) )
|
||||
level waittill_notify_or_timeout( "game_over", 0.25 );
|
||||
|
||||
|
||||
newRankName = self getRankInfoFull( self.pers["rank"] );
|
||||
rank_char = level.rankTable[self.pers["rank"]][1];
|
||||
subRank = int(rank_char[rank_char.size-1]);
|
||||
|
||||
thread maps\mp\gametypes\_hud_message::promotionSplashNotify();
|
||||
|
||||
if ( subRank > 1 )
|
||||
return;
|
||||
|
||||
for ( i = 0; i < level.players.size; i++ )
|
||||
{
|
||||
player = level.players[i];
|
||||
playerteam = player.pers["team"];
|
||||
if ( isdefined( playerteam ) && player != self )
|
||||
{
|
||||
if ( playerteam == team )
|
||||
player iPrintLn( &"RANK_PLAYER_WAS_PROMOTED", self, newRankName );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
endGameUpdate()
|
||||
{
|
||||
player = self;
|
||||
}
|
||||
|
||||
|
||||
scorePopup( amount, bonus, hudColor, glowAlpha )
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
self endon( "joined_team" );
|
||||
self endon( "joined_spectators" );
|
||||
|
||||
if ( amount == 0 )
|
||||
return;
|
||||
|
||||
self notify( "scorePopup" );
|
||||
self endon( "scorePopup" );
|
||||
|
||||
self.xpUpdateTotal += amount;
|
||||
self.bonusUpdateTotal += bonus;
|
||||
|
||||
wait ( 0.05 );
|
||||
|
||||
if ( self.xpUpdateTotal < 0 )
|
||||
self.hud_scorePopup.label = &"";
|
||||
else
|
||||
self.hud_scorePopup.label = &"MP_PLUS";
|
||||
|
||||
self.hud_scorePopup.color = hudColor;
|
||||
self.hud_scorePopup.glowColor = hudColor;
|
||||
self.hud_scorePopup.glowAlpha = glowAlpha;
|
||||
|
||||
self.hud_scorePopup setValue(self.xpUpdateTotal);
|
||||
self.hud_scorePopup.alpha = 0.85;
|
||||
self.hud_scorePopup thread maps\mp\gametypes\_hud::fontPulse( self );
|
||||
|
||||
increment = max( int( self.bonusUpdateTotal / 20 ), 1 );
|
||||
|
||||
if ( self.bonusUpdateTotal )
|
||||
{
|
||||
while ( self.bonusUpdateTotal > 0 )
|
||||
{
|
||||
self.xpUpdateTotal += min( self.bonusUpdateTotal, increment );
|
||||
self.bonusUpdateTotal -= min( self.bonusUpdateTotal, increment );
|
||||
|
||||
self.hud_scorePopup setValue( self.xpUpdateTotal );
|
||||
|
||||
wait ( 0.05 );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
wait ( 1.0 );
|
||||
}
|
||||
|
||||
self.hud_scorePopup fadeOverTime( 0.75 );
|
||||
self.hud_scorePopup.alpha = 0;
|
||||
|
||||
self.xpUpdateTotal = 0;
|
||||
}
|
||||
|
||||
removeRankHUD()
|
||||
{
|
||||
self.hud_scorePopup.alpha = 0;
|
||||
}
|
||||
|
||||
getRank()
|
||||
{
|
||||
rankXp = self.pers["rankxp"];
|
||||
rankId = self.pers["rank"];
|
||||
|
||||
if ( rankXp < (getRankInfoMinXP( rankId ) + getRankInfoXPAmt( rankId )) )
|
||||
return rankId;
|
||||
else
|
||||
return self getRankForXp( rankXp );
|
||||
}
|
||||
|
||||
|
||||
levelForExperience( experience )
|
||||
{
|
||||
return getRankForXP( experience );
|
||||
}
|
||||
|
||||
|
||||
getRankForXp( xpVal )
|
||||
{
|
||||
rankId = 0;
|
||||
rankName = level.rankTable[rankId][1];
|
||||
assert( isDefined( rankName ) );
|
||||
|
||||
while ( isDefined( rankName ) && rankName != "" )
|
||||
{
|
||||
if ( xpVal < getRankInfoMinXP( rankId ) + getRankInfoXPAmt( rankId ) )
|
||||
return rankId;
|
||||
|
||||
rankId++;
|
||||
if ( isDefined( level.rankTable[rankId] ) )
|
||||
rankName = level.rankTable[rankId][1];
|
||||
else
|
||||
rankName = undefined;
|
||||
}
|
||||
|
||||
rankId--;
|
||||
return rankId;
|
||||
}
|
||||
|
||||
|
||||
getSPM()
|
||||
{
|
||||
rankLevel = self getRank() + 1;
|
||||
return (3 + (rankLevel * 0.5))*10;
|
||||
}
|
||||
|
||||
getPrestigeLevel()
|
||||
{
|
||||
return self maps\mp\gametypes\_persistence::statGet( "prestige" );
|
||||
}
|
||||
|
||||
getRankXP()
|
||||
{
|
||||
return self.pers["rankxp"];
|
||||
}
|
||||
|
||||
incRankXP( amount )
|
||||
{
|
||||
if ( !self rankingEnabled() )
|
||||
return;
|
||||
|
||||
if ( isDefined( self.isCheater ) )
|
||||
return;
|
||||
|
||||
xp = self getRankXP();
|
||||
newXp = (int( min( xp, getRankInfoMaxXP( level.maxRank ) ) ) + amount);
|
||||
|
||||
if ( self.pers["rank"] == level.maxRank && newXp >= getRankInfoMaxXP( level.maxRank ) )
|
||||
newXp = getRankInfoMaxXP( level.maxRank );
|
||||
|
||||
self.pers["rankxp"] = newXp;
|
||||
}
|
||||
|
||||
getRestXPAward( baseXP )
|
||||
{
|
||||
if ( !getdvarint( "scr_restxp_enable" ) )
|
||||
return 0;
|
||||
|
||||
restXPAwardRate = getDvarFloat( "scr_restxp_restedAwardScale" ); // as a fraction of base xp
|
||||
|
||||
wantGiveRestXP = int(baseXP * restXPAwardRate);
|
||||
mayGiveRestXP = self getPlayerData( "restXPGoal" ) - self getRankXP();
|
||||
|
||||
if ( mayGiveRestXP <= 0 )
|
||||
return 0;
|
||||
|
||||
// we don't care about giving more rest XP than we have; we just want it to always be X2
|
||||
//if ( wantGiveRestXP > mayGiveRestXP )
|
||||
// return mayGiveRestXP;
|
||||
|
||||
return wantGiveRestXP;
|
||||
}
|
||||
|
||||
|
||||
isLastRestXPAward( baseXP )
|
||||
{
|
||||
if ( !getdvarint( "scr_restxp_enable" ) )
|
||||
return false;
|
||||
|
||||
restXPAwardRate = getDvarFloat( "scr_restxp_restedAwardScale" ); // as a fraction of base xp
|
||||
|
||||
wantGiveRestXP = int(baseXP * restXPAwardRate);
|
||||
mayGiveRestXP = self getPlayerData( "restXPGoal" ) - self getRankXP();
|
||||
|
||||
if ( mayGiveRestXP <= 0 )
|
||||
return false;
|
||||
|
||||
if ( wantGiveRestXP >= mayGiveRestXP )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
syncXPStat()
|
||||
{
|
||||
//if ( level.xpScale > 4 || level.xpScale <= 0)
|
||||
// exitLevel( false );
|
||||
|
||||
xp = self getRankXP();
|
||||
|
||||
self maps\mp\gametypes\_persistence::statSet( "experience", xp );
|
||||
}
|
||||
@@ -0,0 +1,691 @@
|
||||
#include common_scripts\utility;
|
||||
#include maps\mp\_utility;
|
||||
#include maps\mp\gametypes\_hud_util;
|
||||
|
||||
/*
|
||||
Features:
|
||||
Nothing but XP Scale unlocked.
|
||||
Good for a template if you want to start from scratch or if you simply want to unlock XP for a high xp game!
|
||||
*/
|
||||
|
||||
init()
|
||||
{
|
||||
level.scoreInfo = [];
|
||||
level.xpScale = getDvarInt( "scr_xpscale" );
|
||||
|
||||
//if ( level.xpScale > 4 || level.xpScale < 0)
|
||||
// exitLevel( false );
|
||||
|
||||
//level.xpScale = min( level.xpScale, 4 );
|
||||
//level.xpScale = max( level.xpScale, 0 );
|
||||
|
||||
level.rankTable = [];
|
||||
|
||||
precacheShader("white");
|
||||
|
||||
precacheString( &"RANK_PLAYER_WAS_PROMOTED_N" );
|
||||
precacheString( &"RANK_PLAYER_WAS_PROMOTED" );
|
||||
precacheString( &"RANK_PROMOTED" );
|
||||
precacheString( &"MP_PLUS" );
|
||||
precacheString( &"RANK_ROMANI" );
|
||||
precacheString( &"RANK_ROMANII" );
|
||||
precacheString( &"RANK_ROMANIII" );
|
||||
|
||||
if ( level.teamBased )
|
||||
{
|
||||
registerScoreInfo( "kill", 100 );
|
||||
registerScoreInfo( "headshot", 100 );
|
||||
registerScoreInfo( "assist", 20 );
|
||||
registerScoreInfo( "suicide", 0 );
|
||||
registerScoreInfo( "teamkill", 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
registerScoreInfo( "kill", 50 );
|
||||
registerScoreInfo( "headshot", 50 );
|
||||
registerScoreInfo( "assist", 0 );
|
||||
registerScoreInfo( "suicide", 0 );
|
||||
registerScoreInfo( "teamkill", 0 );
|
||||
}
|
||||
|
||||
registerScoreInfo( "win", 1 );
|
||||
registerScoreInfo( "loss", 0.5 );
|
||||
registerScoreInfo( "tie", 0.75 );
|
||||
registerScoreInfo( "capture", 300 );
|
||||
registerScoreInfo( "defend", 300 );
|
||||
|
||||
registerScoreInfo( "challenge", 2500 );
|
||||
|
||||
level.maxRank = int(tableLookup( "mp/rankTable.csv", 0, "maxrank", 1 ));
|
||||
level.maxPrestige = int(tableLookup( "mp/rankIconTable.csv", 0, "maxprestige", 1 ));
|
||||
|
||||
pId = 0;
|
||||
rId = 0;
|
||||
for ( pId = 0; pId <= level.maxPrestige; pId++ )
|
||||
{
|
||||
for ( rId = 0; rId <= level.maxRank; rId++ )
|
||||
precacheShader( tableLookup( "mp/rankIconTable.csv", 0, rId, pId+1 ) );
|
||||
}
|
||||
|
||||
rankId = 0;
|
||||
rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
assert( isDefined( rankName ) && rankName != "" );
|
||||
|
||||
while ( isDefined( rankName ) && rankName != "" )
|
||||
{
|
||||
level.rankTable[rankId][1] = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
level.rankTable[rankId][2] = tableLookup( "mp/ranktable.csv", 0, rankId, 2 );
|
||||
level.rankTable[rankId][3] = tableLookup( "mp/ranktable.csv", 0, rankId, 3 );
|
||||
level.rankTable[rankId][7] = tableLookup( "mp/ranktable.csv", 0, rankId, 7 );
|
||||
|
||||
precacheString( tableLookupIString( "mp/ranktable.csv", 0, rankId, 16 ) );
|
||||
|
||||
rankId++;
|
||||
rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
|
||||
}
|
||||
|
||||
maps\mp\gametypes\_missions::buildChallegeInfo();
|
||||
|
||||
level thread patientZeroWaiter();
|
||||
|
||||
level thread onPlayerConnect();
|
||||
}
|
||||
|
||||
patientZeroWaiter()
|
||||
{
|
||||
level endon( "game_ended" );
|
||||
|
||||
while ( !isDefined( level.players ) || !level.players.size )
|
||||
wait ( 0.05 );
|
||||
|
||||
if ( !matchMakingGame() )
|
||||
{
|
||||
if ( (getDvar( "mapname" ) == "mp_rust" && randomInt( 1000 ) == 999) )
|
||||
level.patientZeroName = level.players[0].name;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( getDvar( "scr_patientZero" ) != "" )
|
||||
level.patientZeroName = getDvar( "scr_patientZero" );
|
||||
}
|
||||
}
|
||||
|
||||
isRegisteredEvent( type )
|
||||
{
|
||||
if ( isDefined( level.scoreInfo[type] ) )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
registerScoreInfo( type, value )
|
||||
{
|
||||
level.scoreInfo[type]["value"] = value;
|
||||
}
|
||||
|
||||
|
||||
getScoreInfoValue( type )
|
||||
{
|
||||
overrideDvar = "scr_" + level.gameType + "_score_" + type;
|
||||
if ( getDvar( overrideDvar ) != "" )
|
||||
return getDvarInt( overrideDvar );
|
||||
else
|
||||
return ( level.scoreInfo[type]["value"] );
|
||||
}
|
||||
|
||||
|
||||
getScoreInfoLabel( type )
|
||||
{
|
||||
return ( level.scoreInfo[type]["label"] );
|
||||
}
|
||||
|
||||
|
||||
getRankInfoMinXP( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][2]);
|
||||
}
|
||||
|
||||
|
||||
getRankInfoXPAmt( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][3]);
|
||||
}
|
||||
|
||||
|
||||
getRankInfoMaxXp( rankId )
|
||||
{
|
||||
return int(level.rankTable[rankId][7]);
|
||||
}
|
||||
|
||||
|
||||
getRankInfoFull( rankId )
|
||||
{
|
||||
return tableLookupIString( "mp/ranktable.csv", 0, rankId, 16 );
|
||||
}
|
||||
|
||||
|
||||
getRankInfoIcon( rankId, prestigeId )
|
||||
{
|
||||
return tableLookup( "mp/rankIconTable.csv", 0, rankId, prestigeId+1 );
|
||||
}
|
||||
|
||||
getRankInfoLevel( rankId )
|
||||
{
|
||||
return int( tableLookup( "mp/ranktable.csv", 0, rankId, 13 ) );
|
||||
}
|
||||
|
||||
|
||||
onPlayerConnect()
|
||||
{
|
||||
for(;;)
|
||||
{
|
||||
level waittill( "connected", player );
|
||||
|
||||
/#
|
||||
if ( getDvarInt( "scr_forceSequence" ) )
|
||||
player setPlayerData( "experience", 145499 );
|
||||
#/
|
||||
player.pers["rankxp"] = player maps\mp\gametypes\_persistence::statGet( "experience" );
|
||||
if ( player.pers["rankxp"] < 0 ) // paranoid defensive
|
||||
player.pers["rankxp"] = 0;
|
||||
|
||||
rankId = player getRankForXp( player getRankXP() );
|
||||
player.pers[ "rank" ] = rankId;
|
||||
player.pers[ "participation" ] = 0;
|
||||
|
||||
player.xpUpdateTotal = 0;
|
||||
player.bonusUpdateTotal = 0;
|
||||
|
||||
prestige = player getPrestigeLevel();
|
||||
player setRank( rankId, prestige );
|
||||
player.pers["prestige"] = prestige;
|
||||
|
||||
player.postGamePromotion = false;
|
||||
if ( !isDefined( player.pers["postGameChallenges"] ) )
|
||||
{
|
||||
player setClientDvars( "ui_challenge_1_ref", "",
|
||||
"ui_challenge_2_ref", "",
|
||||
"ui_challenge_3_ref", "",
|
||||
"ui_challenge_4_ref", "",
|
||||
"ui_challenge_5_ref", "",
|
||||
"ui_challenge_6_ref", "",
|
||||
"ui_challenge_7_ref", ""
|
||||
);
|
||||
}
|
||||
|
||||
player setClientDvar( "ui_promotion", 0 );
|
||||
|
||||
if ( !isDefined( player.pers["summary"] ) )
|
||||
{
|
||||
player.pers["summary"] = [];
|
||||
player.pers["summary"]["xp"] = 0;
|
||||
player.pers["summary"]["score"] = 0;
|
||||
player.pers["summary"]["challenge"] = 0;
|
||||
player.pers["summary"]["match"] = 0;
|
||||
player.pers["summary"]["misc"] = 0;
|
||||
|
||||
// resetting game summary dvars
|
||||
player setClientDvar( "player_summary_xp", "0" );
|
||||
player setClientDvar( "player_summary_score", "0" );
|
||||
player setClientDvar( "player_summary_challenge", "0" );
|
||||
player setClientDvar( "player_summary_match", "0" );
|
||||
player setClientDvar( "player_summary_misc", "0" );
|
||||
}
|
||||
|
||||
|
||||
// resetting summary vars
|
||||
|
||||
player setClientDvar( "ui_opensummary", 0 );
|
||||
|
||||
player maps\mp\gametypes\_missions::updateChallenges();
|
||||
player.explosiveKills[0] = 0;
|
||||
player.xpGains = [];
|
||||
|
||||
player.hud_scorePopup = newClientHudElem( player );
|
||||
player.hud_scorePopup.horzAlign = "center";
|
||||
player.hud_scorePopup.vertAlign = "middle";
|
||||
player.hud_scorePopup.alignX = "center";
|
||||
player.hud_scorePopup.alignY = "middle";
|
||||
player.hud_scorePopup.x = 0;
|
||||
if ( level.splitScreen )
|
||||
player.hud_scorePopup.y = -40;
|
||||
else
|
||||
player.hud_scorePopup.y = -60;
|
||||
player.hud_scorePopup.font = "hudbig";
|
||||
player.hud_scorePopup.fontscale = 0.75;
|
||||
player.hud_scorePopup.archived = false;
|
||||
player.hud_scorePopup.color = (0.5,0.5,0.5);
|
||||
player.hud_scorePopup.sort = 10000;
|
||||
player.hud_scorePopup maps\mp\gametypes\_hud::fontPulseInit( 3.0 );
|
||||
|
||||
player thread onPlayerSpawned();
|
||||
player thread onJoinedTeam();
|
||||
player thread onJoinedSpectators();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onJoinedTeam()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill( "joined_team" );
|
||||
self thread removeRankHUD();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onJoinedSpectators()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill( "joined_spectators" );
|
||||
self thread removeRankHUD();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onPlayerSpawned()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
self waittill("spawned_player");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
roundUp( floatVal )
|
||||
{
|
||||
if ( int( floatVal ) != floatVal )
|
||||
return int( floatVal+1 );
|
||||
else
|
||||
return int( floatVal );
|
||||
}
|
||||
|
||||
|
||||
giveRankXP( type, value )
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
lootType = "none";
|
||||
|
||||
if ( !self rankingEnabled() )
|
||||
return;
|
||||
|
||||
if ( level.teamBased && (!level.teamCount["allies"] || !level.teamCount["axis"]) )
|
||||
return;
|
||||
else if ( !level.teamBased && (level.teamCount["allies"] + level.teamCount["axis"] < 2) )
|
||||
return;
|
||||
|
||||
if ( !isDefined( value ) )
|
||||
value = getScoreInfoValue( type );
|
||||
|
||||
if ( !isDefined( self.xpGains[type] ) )
|
||||
self.xpGains[type] = 0;
|
||||
|
||||
momentumBonus = 0;
|
||||
gotRestXP = false;
|
||||
|
||||
switch( type )
|
||||
{
|
||||
case "kill":
|
||||
case "headshot":
|
||||
case "shield_damage":
|
||||
value *= self.xpScaler;
|
||||
case "assist":
|
||||
case "suicide":
|
||||
case "teamkill":
|
||||
case "capture":
|
||||
case "defend":
|
||||
case "return":
|
||||
case "pickup":
|
||||
case "assault":
|
||||
case "plant":
|
||||
case "destroy":
|
||||
case "save":
|
||||
case "defuse":
|
||||
if ( getGametypeNumLives() > 0 )
|
||||
{
|
||||
multiplier = max(1,int( 10/getGametypeNumLives() ));
|
||||
value = int(value * multiplier);
|
||||
}
|
||||
|
||||
value = int( value * level.xpScale );
|
||||
|
||||
restXPAwarded = getRestXPAward( value );
|
||||
value += restXPAwarded;
|
||||
if ( restXPAwarded > 0 )
|
||||
{
|
||||
if ( isLastRestXPAward( value ) )
|
||||
thread maps\mp\gametypes\_hud_message::splashNotify( "rested_done" );
|
||||
|
||||
gotRestXP = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if ( !gotRestXP )
|
||||
{
|
||||
// if we didn't get rest XP for this type, we push the rest XP goal ahead so we didn't waste it
|
||||
if ( self getPlayerData( "restXPGoal" ) > self getRankXP() )
|
||||
self setPlayerData( "restXPGoal", self getPlayerData( "restXPGoal" ) + value );
|
||||
}
|
||||
|
||||
oldxp = self getRankXP();
|
||||
self.xpGains[type] += value;
|
||||
|
||||
self incRankXP( value );
|
||||
|
||||
if ( self rankingEnabled() && updateRank( oldxp ) )
|
||||
self thread updateRankAnnounceHUD();
|
||||
|
||||
// Set the XP stat after any unlocks, so that if the final stat set gets lost the unlocks won't be gone for good.
|
||||
self syncXPStat();
|
||||
|
||||
if ( !level.hardcoreMode )
|
||||
{
|
||||
if ( type == "teamkill" )
|
||||
{
|
||||
self thread scorePopup( 0 - getScoreInfoValue( "kill" ), 0, (1,0,0), 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
color = (1,1,0.5);
|
||||
if ( gotRestXP )
|
||||
color = (1,.65,0);
|
||||
self thread scorePopup( value, momentumBonus, color, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
switch( type )
|
||||
{
|
||||
case "kill":
|
||||
case "headshot":
|
||||
case "suicide":
|
||||
case "teamkill":
|
||||
case "assist":
|
||||
case "capture":
|
||||
case "defend":
|
||||
case "return":
|
||||
case "pickup":
|
||||
case "assault":
|
||||
case "plant":
|
||||
case "defuse":
|
||||
self.pers["summary"]["score"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
case "win":
|
||||
case "loss":
|
||||
case "tie":
|
||||
self.pers["summary"]["match"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
case "challenge":
|
||||
self.pers["summary"]["challenge"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
|
||||
default:
|
||||
self.pers["summary"]["misc"] += value; //keeps track of ungrouped match xp reward
|
||||
self.pers["summary"]["match"] += value;
|
||||
self.pers["summary"]["xp"] += value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
updateRank( oldxp )
|
||||
{
|
||||
newRankId = self getRank();
|
||||
if ( newRankId == self.pers["rank"] )
|
||||
return false;
|
||||
|
||||
oldRank = self.pers["rank"];
|
||||
rankId = self.pers["rank"];
|
||||
self.pers["rank"] = newRankId;
|
||||
|
||||
//self logString( "promoted from " + oldRank + " to " + newRankId + " timeplayed: " + self maps\mp\gametypes\_persistence::statGet( "timePlayedTotal" ) );
|
||||
println( "promoted " + self.name + " from rank " + oldRank + " to " + newRankId + ". Experience went from " + oldxp + " to " + self getRankXP() + "." );
|
||||
|
||||
self setRank( newRankId );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
updateRankAnnounceHUD()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
self notify("update_rank");
|
||||
self endon("update_rank");
|
||||
|
||||
team = self.pers["team"];
|
||||
if ( !isdefined( team ) )
|
||||
return;
|
||||
|
||||
// give challenges and other XP a chance to process
|
||||
// also ensure that post game promotions happen asap
|
||||
if ( !levelFlag( "game_over" ) )
|
||||
level waittill_notify_or_timeout( "game_over", 0.25 );
|
||||
|
||||
|
||||
newRankName = self getRankInfoFull( self.pers["rank"] );
|
||||
rank_char = level.rankTable[self.pers["rank"]][1];
|
||||
subRank = int(rank_char[rank_char.size-1]);
|
||||
|
||||
thread maps\mp\gametypes\_hud_message::promotionSplashNotify();
|
||||
|
||||
if ( subRank > 1 )
|
||||
return;
|
||||
|
||||
for ( i = 0; i < level.players.size; i++ )
|
||||
{
|
||||
player = level.players[i];
|
||||
playerteam = player.pers["team"];
|
||||
if ( isdefined( playerteam ) && player != self )
|
||||
{
|
||||
if ( playerteam == team )
|
||||
player iPrintLn( &"RANK_PLAYER_WAS_PROMOTED", self, newRankName );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
endGameUpdate()
|
||||
{
|
||||
player = self;
|
||||
}
|
||||
|
||||
|
||||
scorePopup( amount, bonus, hudColor, glowAlpha )
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
self endon( "joined_team" );
|
||||
self endon( "joined_spectators" );
|
||||
|
||||
if ( amount == 0 )
|
||||
return;
|
||||
|
||||
self notify( "scorePopup" );
|
||||
self endon( "scorePopup" );
|
||||
|
||||
self.xpUpdateTotal += amount;
|
||||
self.bonusUpdateTotal += bonus;
|
||||
|
||||
wait ( 0.05 );
|
||||
|
||||
if ( self.xpUpdateTotal < 0 )
|
||||
self.hud_scorePopup.label = &"";
|
||||
else
|
||||
self.hud_scorePopup.label = &"MP_PLUS";
|
||||
|
||||
self.hud_scorePopup.color = hudColor;
|
||||
self.hud_scorePopup.glowColor = hudColor;
|
||||
self.hud_scorePopup.glowAlpha = glowAlpha;
|
||||
|
||||
self.hud_scorePopup setValue(self.xpUpdateTotal);
|
||||
self.hud_scorePopup.alpha = 0.85;
|
||||
self.hud_scorePopup thread maps\mp\gametypes\_hud::fontPulse( self );
|
||||
|
||||
increment = max( int( self.bonusUpdateTotal / 20 ), 1 );
|
||||
|
||||
if ( self.bonusUpdateTotal )
|
||||
{
|
||||
while ( self.bonusUpdateTotal > 0 )
|
||||
{
|
||||
self.xpUpdateTotal += min( self.bonusUpdateTotal, increment );
|
||||
self.bonusUpdateTotal -= min( self.bonusUpdateTotal, increment );
|
||||
|
||||
self.hud_scorePopup setValue( self.xpUpdateTotal );
|
||||
|
||||
wait ( 0.05 );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
wait ( 1.0 );
|
||||
}
|
||||
|
||||
self.hud_scorePopup fadeOverTime( 0.75 );
|
||||
self.hud_scorePopup.alpha = 0;
|
||||
|
||||
self.xpUpdateTotal = 0;
|
||||
}
|
||||
|
||||
removeRankHUD()
|
||||
{
|
||||
self.hud_scorePopup.alpha = 0;
|
||||
}
|
||||
|
||||
getRank()
|
||||
{
|
||||
rankXp = self.pers["rankxp"];
|
||||
rankId = self.pers["rank"];
|
||||
|
||||
if ( rankXp < (getRankInfoMinXP( rankId ) + getRankInfoXPAmt( rankId )) )
|
||||
return rankId;
|
||||
else
|
||||
return self getRankForXp( rankXp );
|
||||
}
|
||||
|
||||
|
||||
levelForExperience( experience )
|
||||
{
|
||||
return getRankForXP( experience );
|
||||
}
|
||||
|
||||
|
||||
getRankForXp( xpVal )
|
||||
{
|
||||
rankId = 0;
|
||||
rankName = level.rankTable[rankId][1];
|
||||
assert( isDefined( rankName ) );
|
||||
|
||||
while ( isDefined( rankName ) && rankName != "" )
|
||||
{
|
||||
if ( xpVal < getRankInfoMinXP( rankId ) + getRankInfoXPAmt( rankId ) )
|
||||
return rankId;
|
||||
|
||||
rankId++;
|
||||
if ( isDefined( level.rankTable[rankId] ) )
|
||||
rankName = level.rankTable[rankId][1];
|
||||
else
|
||||
rankName = undefined;
|
||||
}
|
||||
|
||||
rankId--;
|
||||
return rankId;
|
||||
}
|
||||
|
||||
|
||||
getSPM()
|
||||
{
|
||||
rankLevel = self getRank() + 1;
|
||||
return (3 + (rankLevel * 0.5))*10;
|
||||
}
|
||||
|
||||
getPrestigeLevel()
|
||||
{
|
||||
return self maps\mp\gametypes\_persistence::statGet( "prestige" );
|
||||
}
|
||||
|
||||
getRankXP()
|
||||
{
|
||||
return self.pers["rankxp"];
|
||||
}
|
||||
|
||||
incRankXP( amount )
|
||||
{
|
||||
if ( !self rankingEnabled() )
|
||||
return;
|
||||
|
||||
if ( isDefined( self.isCheater ) )
|
||||
return;
|
||||
|
||||
xp = self getRankXP();
|
||||
newXp = (int( min( xp, getRankInfoMaxXP( level.maxRank ) ) ) + amount);
|
||||
|
||||
if ( self.pers["rank"] == level.maxRank && newXp >= getRankInfoMaxXP( level.maxRank ) )
|
||||
newXp = getRankInfoMaxXP( level.maxRank );
|
||||
|
||||
self.pers["rankxp"] = newXp;
|
||||
}
|
||||
|
||||
getRestXPAward( baseXP )
|
||||
{
|
||||
if ( !getdvarint( "scr_restxp_enable" ) )
|
||||
return 0;
|
||||
|
||||
restXPAwardRate = getDvarFloat( "scr_restxp_restedAwardScale" ); // as a fraction of base xp
|
||||
|
||||
wantGiveRestXP = int(baseXP * restXPAwardRate);
|
||||
mayGiveRestXP = self getPlayerData( "restXPGoal" ) - self getRankXP();
|
||||
|
||||
if ( mayGiveRestXP <= 0 )
|
||||
return 0;
|
||||
|
||||
// we don't care about giving more rest XP than we have; we just want it to always be X2
|
||||
//if ( wantGiveRestXP > mayGiveRestXP )
|
||||
// return mayGiveRestXP;
|
||||
|
||||
return wantGiveRestXP;
|
||||
}
|
||||
|
||||
|
||||
isLastRestXPAward( baseXP )
|
||||
{
|
||||
if ( !getdvarint( "scr_restxp_enable" ) )
|
||||
return false;
|
||||
|
||||
restXPAwardRate = getDvarFloat( "scr_restxp_restedAwardScale" ); // as a fraction of base xp
|
||||
|
||||
wantGiveRestXP = int(baseXP * restXPAwardRate);
|
||||
mayGiveRestXP = self getPlayerData( "restXPGoal" ) - self getRankXP();
|
||||
|
||||
if ( mayGiveRestXP <= 0 )
|
||||
return false;
|
||||
|
||||
if ( wantGiveRestXP >= mayGiveRestXP )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
syncXPStat()
|
||||
{
|
||||
//if ( level.xpScale > 4 || level.xpScale <= 0)
|
||||
// exitLevel( false );
|
||||
|
||||
xp = self getRankXP();
|
||||
|
||||
self maps\mp\gametypes\_persistence::statSet( "experience", xp );
|
||||
}
|
||||
Executable
+82
@@ -0,0 +1,82 @@
|
||||
MW2 tweakable client side cvars:
|
||||
|
||||
Most of these came from Tek9, thanks to Helium.
|
||||
|
||||
seta cg_hudGrenadeIconEnabledFlash "1" (default value is 0) // Shows an indicator when there a flash/stun grenade is thrown near you
|
||||
|
||||
seta cl_maxpackets "100" (default value is 30) // Amount of packets sent per second
|
||||
|
||||
seta cl_maxPing "100" (default value is 800) // This will connect you to a server with maximum X amount of ping
|
||||
|
||||
seta com_maxfps "125" (default value is 85) // Max frames per second shown
|
||||
|
||||
seta drawLagometer "1" (default value is 0) // Disable/enable lagometer
|
||||
|
||||
seta dynEnt_active "0" (default value is 1) // Enable/disable dynamic environment, ie objects will move when shot at etc
|
||||
|
||||
seta hud_enable "1" (default value is 1) // Enable/disable your HUD
|
||||
|
||||
seta r_aaSamples "16" (default value is 2) // Set the amount of anti-aliasing
|
||||
|
||||
seta r_distortion "0" (default value is 1) // Enable/disable distortion from weapons, explosions etc
|
||||
|
||||
seta r_dlightLimit "0" (default value is 4) // Number of dynamic lights
|
||||
|
||||
seta r_dof_enable "0" (default value is 1) // Enable/disable depth of field
|
||||
|
||||
seta r_fullscreen "1" (default value is 1) // Play in fullscreen/windowed mode (fullscreen is 1, windowed is 0)
|
||||
|
||||
seta cg_ScoresPing_MaxBars "10" (default value is 4) // Total number of latency bars. The more bars, the more precise the ping will be displayed.
|
||||
|
||||
seta cg_ScoresPing_Interval "20" (default is 100) // Ping interval
|
||||
Note: If you have ping interval on 100 it means you have a 100 ping when you have full bars. If you have your ping interval on 20 it means you have 20 ping if you have full bars, and 20 extra ping for each bar that is gone, so if you have 6/10 bars you have a 100 ping.
|
||||
|
||||
|
||||
I'll run through it real quick for you.
|
||||
it is not an external EXE and it is not a DLL file. you're just editing a CFG file to make sure your game performs well.
|
||||
|
||||
ALSO, You cannot change your FOV in multiplayer without sv_cheats 1 which is a server variable that regular users cannot change.
|
||||
using the external EXE to change your FOV however will probably get you banned.
|
||||
OR YOU MAY LOSE ALL OF YOUR ACCOLADES! (i make fun of TF2 and doesnt afraid of anything.)
|
||||
|
||||
seta cg_hudGrenadeIconEnabledFlash "1" (default value is 0) // Shows an indicator when there a flash/stun grenade is thrown near you
|
||||
You're Safe. being able to see it wont save you, flashes generally go off as soon as or immediately after they touch the ground. so this is not helpful or giving you an advantage.
|
||||
|
||||
seta cl_maxpackets "100" (default value is 30) // Amount of packets sent per second
|
||||
as far as i know this could be exploited to give you a really, really sh*tty ping. What advantage do you have while rubberbanding all over the place? there is no advantage given.
|
||||
|
||||
seta cl_maxPing "100" (default value is 800) // This will connect you to a server with maximum X amount of ping
|
||||
this makes sure you do not connect to horrible overseas servers. no advantage given.
|
||||
|
||||
seta com_maxfps "125" (default value is 85) // Max frames per second shown
|
||||
mostly useless, the human eye can only see up to 30 (possibly 60. i'm really tired). No advantage is given.
|
||||
|
||||
seta drawLagometer "1" (default value is 0) // Disable/enable lagometer
|
||||
i am not 100% sure what this does, if someone can inform me please do. very probably does NOT give an advantage.
|
||||
|
||||
seta dynEnt_active "0" (default value is 1) // Enable/disable dynamic environment, ie objects will move when shot at etc
|
||||
Things move when shot/grenaded. with this off they do not move. No advantage given
|
||||
|
||||
seta hud_enable "1" (default value is 1) // Enable/disable your HUD
|
||||
there is NO WAY this could give an advantage. without your HUD in a normal gave you will not know how many bullets you have or other things including current score. No advantage given.
|
||||
|
||||
seta r_aaSamples "16" (default value is 2) // Set the amount of anti-aliasing
|
||||
This only boosts the AA Sampling rate far past the max value of 4 ingame. no advantage given, though it does look pretty.
|
||||
|
||||
seta r_distortion "0" (default value is 1) // Enable/disable distortion from weapons, explosions etc
|
||||
The distortion effects are pretty lame. This is pretty much the same as removing particles from TF2. No advantage given, things may run faster.
|
||||
|
||||
seta r_dlightLimit "0" (default value is 4) // Number of dynamic lights
|
||||
i'm not sure why you would turn this off but you can. Not sure what it would do when off. No advantage (probably) given.
|
||||
|
||||
seta r_dof_enable "0" (default value is 1) // Enable/disable depth of field
|
||||
again, i don't know untill someone tells me or i test it. Awaiting testing.
|
||||
|
||||
seta r_fullscreen "1" (default value is 1) // Play in fullscreen/windowed mode (fullscreen is 1, windowed is 0)
|
||||
Now you can play in a window, though i think there was an option in game. no advantage given other than a slightly increased FPS.
|
||||
|
||||
seta cg_ScoresPing_MaxBars "10" (default value is 4) // Total number of latency bars. The more bars, the more precise the ping will be displayed.
|
||||
This was posted on other threads and is incredibly useful. no advantage given.
|
||||
|
||||
seta cg_ScoresPing_Interval "20" (default is 100) // Ping interval
|
||||
Posted in other threads, incredibly useful. No advantage given.
|
||||
Executable
+81
@@ -0,0 +1,81 @@
|
||||
Call of Duty - Modern Warfare 2 Useful DVAR's
|
||||
By: RigorousSphinx
|
||||
###############################################
|
||||
|
||||
xbl_privatematch 0 //Xbox LIVE Private Match Ture/False
|
||||
jump_height 999 //The maximum height of a player's jump
|
||||
bg_fallDamageMaxHeight 9999 //The height that a player will take maximum damage when falling
|
||||
bg_fallDamageMinHeight 9998 //The height that a player will start to take minimum damage if they fall
|
||||
player_sprintUnlimited 1 //Whether players can sprint forever or not
|
||||
perk_weapRateMultiplier 0.001 //Percentage of weapon firing rate to use
|
||||
player_burstFireCooldown 0 //Seconds after a burst fire before weapons can be fired again
|
||||
perk_weapReloadMultiplier 0.001 //Percentage of weapon reload time to use
|
||||
perk_weapSpreadMultiplier 0.00001 //Percentage of weapon spread to use
|
||||
player_meleeRange 999 //The maximum range of the player's mellee attack
|
||||
onlinegame 1 //Current game is an online game with stats, custom classes, unlocks
|
||||
scr_airdrop_mega_nuke 5 //Chances in getting a %i in a %i
|
||||
scr_airdrop_mega_ammo 0
|
||||
scr_airdrop_mega_uav 0
|
||||
scr_airdrop_mega_counter_uav 0
|
||||
scr_airdrop_mega_sentry 0
|
||||
scr_airdrop_mega_predator_missile 0
|
||||
scr_airdrop_mega_precision_airstrike 0
|
||||
scr_airdrop_mega_harrier_airstrike 0
|
||||
scr_airdrop_mega_helicopter 0
|
||||
scr_airdrop_mega_helicopter_flares 0
|
||||
scr_airdrop_mega_stealth_airstrike 0
|
||||
scr_airdrop_mega_helicopter_minigun 1
|
||||
scr_airdrop_mega_ac130 1
|
||||
scr_airdrop_ammo 0
|
||||
scr_airdrop_uav 0
|
||||
scr_airdrop_counter_uav 0
|
||||
scr_airdrop_sentry 0
|
||||
scr_airdrop_predator_missile 0
|
||||
scr_airdrop_precision_airstrike 0
|
||||
scr_airdrop_harrier_airstrike 0
|
||||
scr_airdrop_helicopter 0
|
||||
scr_airdrop_helicopter_flares 0
|
||||
scr_airdrop_stealth_airstrike 0
|
||||
scr_airdrop_helicopter_minigun 1
|
||||
scr_airdrop_ac130 1
|
||||
scr_airdrop_nuke 5
|
||||
g_gametype "gtnw" //Current gametype
|
||||
ui_gametype "gtnw" //Gametype in menus
|
||||
xblive_playEvenIfDown 1 //Allow people to play online even if Live is down
|
||||
con_minicon 1 //Display the mini console on screen
|
||||
scr_nukeTimer 150 //Time for the nuke counter to start counting down at
|
||||
perk_grenadeDeath "remotemissile_projectile_mp" //Name of the grenade weapon to drop
|
||||
cg_drawfps 1 //Draw frames per second
|
||||
cg_scoreboardPingText 1 //Whether to show numeric ping value
|
||||
aim_autoaim_enabled 1 //Turn on auto aim
|
||||
aim_autoaim_lerp 100 //The rate in degrees per second that the auto aim will converge to its target
|
||||
aim_autoaim_region_height 480 //The height of the auto aim region in virtual screen coordinates (0 - 480)
|
||||
aim_autoaim_region_width 640 //The width of the auto aim region in virtual screen coordinates (0 - 640)
|
||||
aim_autoAimRangeScale 2 //Scales the weapon's auto aim range
|
||||
aim_lockon_debug 1 //Turn on debugging info for aim lock on
|
||||
aim_lockon_enabled 1 //Aim lock on helps the player to stay on target
|
||||
aim_lockon_region_height 0 //The height of the auto aim region in virtual screen coordinates(0-480)
|
||||
aim_lockon_region_width 5000 //The width of the auto aim region in virtual screen coordinates(0-640)
|
||||
aim_lockon_strength 1 //The amount of aim assistance given by the target lock on
|
||||
aim_lockon_deflection 0.05 //The amount of stick deflection for the lockon to activate
|
||||
aim_input_graph_debug 0 //Debug the view input graphs
|
||||
aim_input_graph_enabled 1 //Use graph for adjusting view input
|
||||
r_zfar 0 //Change the distance at which culling fog reaches 100% opacity; 0 is off
|
||||
r_znear 57 //Things closer than this aren't drawn.
|
||||
r_znear_depthhack 2 //Viewmodel near clip plane
|
||||
g_speed 700 //Player speed
|
||||
timescale 0.65 //Scale time of each frame
|
||||
cg_drawThroughWalls 1 //Whether to draw friendly names through walls or not
|
||||
cg_enemyNameFadeOut 900000 //Time in milliseconds to fade out enemy names
|
||||
cg_enemyNameFadeIn 0 //Time in milliseconds to fade in enemy names
|
||||
party_connectToOthers 0 //If false, we will just start our own lobby rather than connect to another lobby, even if others exist
|
||||
party_hostmigration 0 //Whether to use host migration in lobbies
|
||||
laserForceOn 1 //Force laser sights on in all possible places (for debug purposes)
|
||||
cg_drawHealth 1 //Draw health bar
|
||||
g_gravity 100 //Gravity in inches per second per second
|
||||
clanName "IW" //Player clan name
|
||||
perk_bulletDamage -1 //Stopping power perk multiplier
|
||||
perk_explosiveDamage -1 //??? perk multiplier
|
||||
ui_mapname mp_shipment //Map name in menus (THIS ONE IS FUN TO f*** WITH YOUR FRIENDS!!LOL)
|
||||
cg_fov 85 //The field of view angle in degrees
|
||||
cg_drawShellshock 0 //Draw shellshock & flashbang screen effects
|
||||
Executable
BIN
Binary file not shown.
|
After Width: | Height: | Size: 63 KiB |
Executable
+1859
File diff suppressed because it is too large.
Load diff
Executable
+359
@@ -0,0 +1,359 @@
|
||||
// generated by Infinity Ward, do not modify
|
||||
unbindall
|
||||
bind TAB "+scores"
|
||||
bind ESCAPE "togglemenu"
|
||||
bind SPACE "+gostand"
|
||||
bind 1 "weapnext"
|
||||
bind 2 "weapnext"
|
||||
bind 3 "+actionslot 3"
|
||||
bind 4 "+actionslot 4"
|
||||
bind 5 "+actionslot 2"
|
||||
bind A "+moveleft"
|
||||
bind C "togglecrouch"
|
||||
bind D "+moveright"
|
||||
bind E "+melee"
|
||||
bind F "+activate"
|
||||
bind G "+frag"
|
||||
bind I "chatmodepublic"
|
||||
bind N "+actionslot 1"
|
||||
bind O "chatmodeteam"
|
||||
bind P "+talk"
|
||||
bind Q "+smoke"
|
||||
bind R "+reload"
|
||||
bind S "+back"
|
||||
bind W "+forward"
|
||||
bind X "+breath_sprint"
|
||||
bind CTRL "toggleprone"
|
||||
bind SHIFT "+breath_sprint"
|
||||
bind MOUSE1 "+attack"
|
||||
bind MOUSE2 "+speed_throw"
|
||||
bind MWHEELDOWN "+attack"
|
||||
bind MWHEELUP "+toggleads_throw"
|
||||
seta ai_corpseCount "16"
|
||||
seta cg_blood "1"
|
||||
seta cg_brass "1"
|
||||
seta cg_chatHeight "4"
|
||||
seta cg_chatTime "12000"
|
||||
seta cg_connectionIconSize "0"
|
||||
seta cg_cursorHints "4"
|
||||
seta cg_descriptiveText "1"
|
||||
seta cg_drawBreathHint "1"
|
||||
seta cg_drawFPSLabels "1"
|
||||
seta cg_drawMantleHint "1"
|
||||
seta cg_drawSnapshot "0"
|
||||
seta cg_drawStatsSource "0"
|
||||
seta cg_drawTurretCrosshair "1"
|
||||
seta cg_drawViewpos "0"
|
||||
seta cg_gameBoldMessageWidth "390"
|
||||
seta cg_gameMessageWidth "455"
|
||||
seta cg_headIconMinScreenRadius "0.025"
|
||||
seta cg_hintFadeTime "100"
|
||||
seta cg_hudChatIntermissionPosition "5 110"
|
||||
seta cg_hudChatPosition "5 200"
|
||||
seta cg_hudDamageIconHeight "64"
|
||||
seta cg_hudDamageIconInScope "0"
|
||||
seta cg_hudDamageIconOffset "128"
|
||||
seta cg_hudDamageIconTime "6000"
|
||||
seta cg_hudDamageIconWidth "128"
|
||||
seta cg_hudGrenadeIconEnabledFlash "0"
|
||||
seta cg_hudGrenadeIconHeight "25"
|
||||
seta cg_hudGrenadeIconInScope "0"
|
||||
seta cg_hudGrenadeIconMaxHeight "104"
|
||||
seta cg_hudGrenadeIconOffset "50"
|
||||
seta cg_hudGrenadeIconWidth "25"
|
||||
seta cg_hudGrenadePointerHeight "12"
|
||||
seta cg_hudGrenadePointerPivot "12 27"
|
||||
seta cg_hudGrenadePointerWidth "25"
|
||||
seta cg_hudProneY "-160"
|
||||
seta cg_hudSayPosition "5 175"
|
||||
seta cg_hudStanceHintPrints "0"
|
||||
seta cg_hudVotePosition "5 220"
|
||||
seta cg_invalidCmdHintBlinkInterval "600"
|
||||
seta cg_invalidCmdHintDuration "1800"
|
||||
seta cg_laserlight "0"
|
||||
seta cg_mapLocationSelectionCursorSpeed "0.6"
|
||||
seta cg_marks_ents_player_only "0"
|
||||
seta cg_predictItems "1"
|
||||
seta cg_ScoresPing_BgColor "0.25098 0.25098 0.25098 0.501961"
|
||||
seta cg_ScoresPing_HighColor "0.8 0 0 1"
|
||||
seta cg_ScoresPing_Interval "100"
|
||||
seta cg_ScoresPing_LowColor "0 0.74902 0 1"
|
||||
seta cg_ScoresPing_MaxBars "4"
|
||||
seta cg_ScoresPing_MedColor "0.8 0.8 0 1"
|
||||
seta cg_scriptIconSize "0"
|
||||
seta cg_splatterHitAlpha "1"
|
||||
seta cg_splatterHitFadeInTime "0.05"
|
||||
seta cg_splatterHitFadeOutTime "0.1"
|
||||
seta cg_splatterHitFullInTime "0"
|
||||
seta cg_splatterHitInnerAngle "15"
|
||||
seta cg_splatterHitInnerRadius "0"
|
||||
seta cg_splatterHitOuterAngle "30"
|
||||
seta cg_splatterHitOuterRadius "0.6"
|
||||
seta cg_splatterTrackAlpha "1"
|
||||
seta cg_splatterTrackFadeInTime "0"
|
||||
seta cg_splatterTrackFadeOutTime "0.5"
|
||||
seta cg_splatterTrackFullInTime "0.3"
|
||||
seta cg_splatterTrackInnerAngle "5"
|
||||
seta cg_splatterTrackInnerRadius "0.4"
|
||||
seta cg_splatterTrackOuterAngle "20"
|
||||
seta cg_splatterTrackOuterRadius "0.6"
|
||||
seta cg_sprintMeterDisabledColor "0.8 0.1 0.1 0.2"
|
||||
seta cg_sprintMeterEmptyColor "0.7 0.5 0.2 0.8"
|
||||
seta cg_sprintMeterFullColor "0.8 0.8 0.8 0.8"
|
||||
seta cg_subtitleMinTime "3"
|
||||
seta cg_subtitleWidthStandard "520"
|
||||
seta cg_subtitleWidthWidescreen "600"
|
||||
seta cg_teamChatsOnly "0"
|
||||
seta cg_viewZSmoothingMax "16"
|
||||
seta cg_viewZSmoothingMin "1"
|
||||
seta cg_viewZSmoothingTime "0.1"
|
||||
seta cg_voiceIconSize "0"
|
||||
seta cg_waterSheeting_brightness "0"
|
||||
seta cg_waterSheeting_contrast "1"
|
||||
seta cg_waterSheeting_darkTint "1 1 1"
|
||||
seta cg_waterSheeting_desaturation "0"
|
||||
seta cg_waterSheeting_distortionScaleFactor "0.021961 1 0 0"
|
||||
seta cg_waterSheeting_enable "0"
|
||||
seta cg_waterSheeting_fadeDuration "2"
|
||||
seta cg_waterSheeting_lightTint "0.780261 1 1"
|
||||
seta cg_waterSheeting_magnitude "0.0655388"
|
||||
seta cg_waterSheeting_radius "4.44051"
|
||||
seta cg_weaponCycleDelay "0"
|
||||
seta cg_youInKillCamSize "6"
|
||||
seta cl_freelook "1"
|
||||
seta cl_maxPing "800"
|
||||
seta cl_mouseAccel "0"
|
||||
seta cl_packetdup "1"
|
||||
seta cl_pitchspeed "140"
|
||||
seta cl_voice "1"
|
||||
seta cl_yawspeed "140"
|
||||
seta com_recommendedSet "1"
|
||||
seta compassSize "1"
|
||||
seta con_errormessagetime "8"
|
||||
seta con_gameMsgWindow0FadeInTime "0.25"
|
||||
seta con_gameMsgWindow0FadeOutTime "0.5"
|
||||
seta con_gameMsgWindow0Filter "gamenotify obituary"
|
||||
seta con_gameMsgWindow0LineCount "4"
|
||||
seta con_gameMsgWindow0MsgTime "5"
|
||||
seta con_gameMsgWindow0ScrollTime "0.25"
|
||||
seta con_gameMsgWindow0SplitscreenScale "1.5"
|
||||
seta con_gameMsgWindow1FadeInTime "0.25"
|
||||
seta con_gameMsgWindow1FadeOutTime "0.5"
|
||||
seta con_gameMsgWindow1Filter "boldgame"
|
||||
seta con_gameMsgWindow1LineCount "1"
|
||||
seta con_gameMsgWindow1MsgTime "3"
|
||||
seta con_gameMsgWindow1ScrollTime "0.25"
|
||||
seta con_gameMsgWindow1SplitscreenScale "1.5"
|
||||
seta con_gameMsgWindow2FadeInTime "0.75"
|
||||
seta con_gameMsgWindow2FadeOutTime "0.5"
|
||||
seta con_gameMsgWindow2Filter "subtitle"
|
||||
seta con_gameMsgWindow2LineCount "7"
|
||||
seta con_gameMsgWindow2MsgTime "5"
|
||||
seta con_gameMsgWindow2ScrollTime "0.25"
|
||||
seta con_gameMsgWindow2SplitscreenScale "1.5"
|
||||
seta con_gameMsgWindow3FadeInTime "0.25"
|
||||
seta con_gameMsgWindow3FadeOutTime "0.5"
|
||||
seta con_gameMsgWindow3Filter ""
|
||||
seta con_gameMsgWindow3LineCount "5"
|
||||
seta con_gameMsgWindow3MsgTime "5"
|
||||
seta con_gameMsgWindow3ScrollTime "0.25"
|
||||
seta con_gameMsgWindow3SplitscreenScale "1.5"
|
||||
seta con_inputBoxColor "0.25 0.25 0.2 1"
|
||||
seta con_inputHintBoxColor "0.4 0.4 0.35 1"
|
||||
seta con_matchPrefixOnly "1"
|
||||
seta con_miniconlines "5"
|
||||
seta con_minicontime "4"
|
||||
seta con_outputBarColor "1 1 0.95 0.6"
|
||||
seta con_outputSliderColor "0.15 0.15 0.1 0.6"
|
||||
seta con_outputWindowColor "0.35 0.35 0.3 0.75"
|
||||
seta con_typewriterColorGlowCheckpoint "0.6 0.5 0.6 1"
|
||||
seta con_typewriterColorGlowCompleted "0 0.3 0.8 1"
|
||||
seta con_typewriterColorGlowFailed "0.8 0 0 1"
|
||||
seta con_typewriterColorGlowUpdated "0 0.6 0.18 1"
|
||||
seta con_typewriterDecayDuration "700"
|
||||
seta con_typewriterDecayStartTime "6000"
|
||||
seta con_typewriterPrintSpeed "50"
|
||||
seta drawLagometer "0"
|
||||
seta dynEnt_active "1"
|
||||
seta fx_marks "1"
|
||||
seta fx_marks_ents "1"
|
||||
seta fx_marks_smodels "1"
|
||||
seta g_allowvote "1"
|
||||
seta g_banIPs ""
|
||||
seta g_clonePlayerMaxVelocity "80"
|
||||
seta g_deadChat "1"
|
||||
seta g_dropForwardSpeed "10"
|
||||
seta g_dropHorzSpeedRand "100"
|
||||
seta g_dropUpSpeedBase "10"
|
||||
seta g_dropUpSpeedRand "5"
|
||||
seta g_log "games_mp.log"
|
||||
seta g_logSync "0"
|
||||
seta g_oldVoting "1"
|
||||
seta g_playerCollisionEjectSpeed "25"
|
||||
seta g_radiusDamageMax "256"
|
||||
seta g_redCrosshairs "1"
|
||||
seta g_voiceChatTalkingDuration "500"
|
||||
seta g_voteAbstainWeight "0.5"
|
||||
seta glass_angular_vel "5 35"
|
||||
seta glass_debug "0"
|
||||
seta glass_edge_angle "5 10"
|
||||
seta glass_fall_delay "0.2 0.9"
|
||||
seta glass_fall_gravity "800"
|
||||
seta glass_fall_ratio "1.5 3"
|
||||
seta glass_fringe_maxcoverage "0.2"
|
||||
seta glass_fringe_maxsize "150"
|
||||
seta glass_fx_chance "0.25"
|
||||
seta glass_hinge_friction "50"
|
||||
seta glass_linear_vel "200 400"
|
||||
seta glass_max_pieces_per_frame "100"
|
||||
seta glass_max_shatter_fx_per_frame "6"
|
||||
seta glass_physics_chance "0.15"
|
||||
seta glass_physics_maxdist "512"
|
||||
seta glass_shard_maxsize "300"
|
||||
seta glass_shattered_scale "48"
|
||||
seta glass_trace_interval "100"
|
||||
seta hud_deathQuoteFadeTime "1000"
|
||||
seta hud_enable "1"
|
||||
seta hud_fade_ammodisplay "0"
|
||||
seta hud_fade_healthbar "2"
|
||||
seta hud_fade_offhand "0"
|
||||
seta hud_fade_sprint "1.7"
|
||||
seta hud_fade_stance "1.7"
|
||||
seta hud_fadeout_speed "0.1"
|
||||
seta hud_flash_period_offhand "0.5"
|
||||
seta hud_flash_time_offhand "2"
|
||||
seta hud_health_pulserate_critical "0.5"
|
||||
seta hud_health_pulserate_injured "1"
|
||||
seta hud_health_startpulse_critical "0.33"
|
||||
seta hud_health_startpulse_injured "1"
|
||||
seta in_mouse "1"
|
||||
seta intro "0"
|
||||
seta laserLight "1"
|
||||
seta laserLightWithoutNightvision "0"
|
||||
seta loc_forceEnglish "0"
|
||||
seta loc_language "0"
|
||||
seta m_filter "0"
|
||||
seta m_forward "0.25"
|
||||
seta m_pitch "0.022"
|
||||
seta m_side "0.25"
|
||||
seta m_yaw "0.022"
|
||||
seta monkeytoy "0"
|
||||
seta name ""
|
||||
seta net_noipx "0"
|
||||
seta net_noudp "0"
|
||||
seta net_socksEnabled "0"
|
||||
seta net_socksPassword ""
|
||||
seta net_socksPort "1080"
|
||||
seta net_socksServer ""
|
||||
seta net_socksUsername ""
|
||||
seta r_aaAlpha "dither (fast)"
|
||||
seta r_aaMaxQuality "0"
|
||||
seta r_aaSamples "1"
|
||||
seta r_altModelLightingUpdate "0"
|
||||
seta r_aspectRatio "auto"
|
||||
seta r_autopriority "0"
|
||||
seta r_blacklevel "0"
|
||||
seta r_customMode ""
|
||||
seta r_debugLineWidth "1"
|
||||
seta r_depthPrepass "None"
|
||||
seta r_displayRefresh "75 Hz"
|
||||
seta r_distortion "0"
|
||||
seta r_dlightLimit "0"
|
||||
seta r_dof_enable "0"
|
||||
seta r_drawSun "1"
|
||||
seta r_drawWater "1"
|
||||
seta r_fastSkin "0"
|
||||
seta r_fullscreen "0"
|
||||
seta r_gamma "0.909524"
|
||||
seta r_glow_allowed "0"
|
||||
seta r_gpuSync2 "1"
|
||||
seta r_ignorehwgamma "0"
|
||||
seta r_inGameVideo "1"
|
||||
seta r_lodBiasRigid "0"
|
||||
seta r_lodBiasSkinned "0"
|
||||
seta r_lodScaleRigid "1"
|
||||
seta r_lodScaleSkinned "1"
|
||||
seta r_mode "640x480"
|
||||
seta r_monitor "0"
|
||||
seta r_multiGpu "0"
|
||||
seta r_picmip "1"
|
||||
seta r_picmip_bump "1"
|
||||
seta r_picmip_manual "0"
|
||||
seta r_picmip_spec "1"
|
||||
seta r_picmip_water "0"
|
||||
seta r_polygonOffsetBias "-1"
|
||||
seta r_polygonOffsetScale "-1"
|
||||
seta r_portalBevels "0.7"
|
||||
seta r_preloadShaders "0"
|
||||
seta r_rendererPreference "Default"
|
||||
seta r_specular "0"
|
||||
seta r_texFilterAnisoMax "4"
|
||||
seta r_texFilterAnisoMin "1"
|
||||
seta r_texFilterMipMode "Unchanged"
|
||||
seta r_vsync "0"
|
||||
seta r_zFeather "0"
|
||||
seta ragdoll_enable "1"
|
||||
seta ragdoll_max_simulating "16"
|
||||
seta rate "25000"
|
||||
seta sensitivity "27.9286"
|
||||
seta server1 ""
|
||||
seta server10 ""
|
||||
seta server11 ""
|
||||
seta server12 ""
|
||||
seta server13 ""
|
||||
seta server14 ""
|
||||
seta server15 ""
|
||||
seta server16 ""
|
||||
seta server2 ""
|
||||
seta server3 ""
|
||||
seta server4 ""
|
||||
seta server5 ""
|
||||
seta server6 ""
|
||||
seta server7 ""
|
||||
seta server8 ""
|
||||
seta server9 ""
|
||||
seta sm_enable "0"
|
||||
seta sm_maxLights "4"
|
||||
seta sm_sunShadowScaleLocked "0"
|
||||
seta snaps "20"
|
||||
seta snd_cinematicVolumeScale "0.5"
|
||||
seta snd_enableEq "1"
|
||||
seta snd_errorOnMissing "0"
|
||||
seta snd_khz "44"
|
||||
seta snd_outputConfiguration "Windows default"
|
||||
seta snd_touchStreamFilesOnLoad "0"
|
||||
seta snd_volume "0.171429"
|
||||
seta sv_allowDownload "1"
|
||||
seta sv_floodProtect "1"
|
||||
seta sv_hostname "CoD4Host"
|
||||
seta sys_configSum "209012943"
|
||||
seta sys_configureGHz "10.1406"
|
||||
seta sys_gpu "ATI Radeon HD 2400"
|
||||
seta sys_sysMB "2046"
|
||||
seta ui_bigFont "0.688"
|
||||
seta ui_browserFriendlyfire "-1"
|
||||
seta ui_browserKillcam "-1"
|
||||
seta ui_browserMod "0"
|
||||
seta ui_browserShowDedicated "0"
|
||||
seta ui_browserShowEmpty "1"
|
||||
seta ui_browserShowFull "1"
|
||||
seta ui_browserShowPassword "-1"
|
||||
seta ui_browserShowPure "1"
|
||||
seta ui_currentFeederMapIndex "15"
|
||||
seta ui_currentMap "3"
|
||||
seta ui_drawCrosshair "1"
|
||||
seta ui_extraBigFont "1"
|
||||
seta ui_joinGametype "0"
|
||||
seta ui_maxclients "18"
|
||||
seta ui_netGametype "0"
|
||||
seta ui_netGametypeName "dm"
|
||||
seta ui_netSource "1"
|
||||
seta ui_serverStatusTimeOut "7000"
|
||||
seta ui_smallFont "0.563"
|
||||
seta vid_xpos "111"
|
||||
seta vid_ypos "223"
|
||||
seta winvoice_mic_mute "1"
|
||||
seta winvoice_mic_reclevel "65535"
|
||||
seta winvoice_mic_scaler "1"
|
||||
seta winvoice_save_voice "0"
|
||||
con_hidechannel *; con_showchannel dontfilter error gamenotify boldgame subtitle obituary logfile_only console_only gfx sound files devgui profile ui client server system playerweap ai anim physics fx leaderboards parserscript script network
|
||||
Reference in new issue
Block a user