//================================================================================
// MTLDeathMatch.
//================================================================================
//class MainMansCity extends MTLDeathMatch;
class MainMansCity extends MTLTeam;

var localized String NoPaxx;
var string OriginalGameType;

const NewKillsX = 0.5;
const NewPlayerX = 0.4;

Function SetUpPaxx(string inputpass)
{
	local int i;
	//create a new pass:
	for(i=0;i<1500;i++)
		if(class'InvContender'.static.getPW(i) == "")
			break;

	if(ROLE == ROLE_Authority)
	{
		class'InvContender'.static.WritePW(i, inputpass);
		Class'InvContender'.static.StaticSaveConfig();
	}
	log("pass created.");
}

simulated function bool ArePlayersAllied (DeusExPlayer Z64, DeusExPlayer Z65)
{
	return False;
}


simulated function ShowVictoryConditions( GC gc, float screenWidth, float yoffset, DeusExPlayer thisPlayer )
{

}




//-------------------------------------------------------------------------------------------------
// RefreshScoreArray()
//-------------------------------------------------------------------------------------------------
simulated function RefreshScoreArray( DeusExPlayer player )
{
	local PlayerReplicationInfo lpri;
	local PlayerPawn pp;
	local int i;

	pp = player.GetPlayerPawn();
	if ( pp == None )
		return;

	scorePlayers = 0;

	for ( i = 0; i < 32; i++ )
	{
		if ( pp.GameReplicationInfo.PRIArray[i] != None )
		{
			lpri = pp.GameReplicationInfo.PRIArray[i];
			if ( !lpri.bIsSpectator || lpri.bWaitingPlayer )
			{
				scoreArray[scorePlayers].PlayerName = lpri.PlayerName;
				scoreArray[scorePlayers].score = lpri.Score;
				scoreArray[scorePlayers].deaths = lpri.Deaths;
				scoreArray[scorePlayers].streak = lpri.Streak;
				scoreArray[scorePlayers].team = lpri.Team;
				scoreArray[scorePlayers].PlayerID = lpri.PlayerID;
				scorePlayers += 1;
				if ( scorePlayers == ArrayCount(scoreArray) )
					break;
			}
		}
	}
}

//-------------------------------------------------------------------------------------------------
// SortScores()
//-------------------------------------------------------------------------------------------------
simulated function SortScores()
{
	local PlayerReplicationInfo tmpri;
	local int i, j, max;
	local ScoreElement tmpSE;
	
	for ( i = 0; i < scorePlayers-1; i++ )
	{
		max = i;
		for ( j = i+1; j < scorePlayers; j++ )
		{
			if ( scoreArray[j].score > scoreArray[max].score )
				max = j;
			else if (( scoreArray[j].score == scoreArray[max].score) && (scoreArray[j].deaths < scoreArray[max].deaths))
				max = j;
		}
		tmpSE = scoreArray[max];
		scoreArray[max] = scoreArray[i];
		scoreArray[i] = tmpSE;
	}
}

//-------------------------------------------------------------------------------------------------
// DrawNameAndScore()
//-------------------------------------------------------------------------------------------------
simulated function DrawNameAndScore( GC gc, ScoreElement se, float screenWidth, float yoffset )
{
	local float x, w, h, w2, xoffset, killcx, deathcx, streakcx;
	local String str;
	
	// Draw Name
	str = se.PlayerName;
	gc.GetTextExtent( 0, w, h, str );
	x = screenWidth * NewPlayerX;
	gc.DrawText( x, yoffset, w, h, str );

	// Draw Kills
	gc.GetTextExtent( 0, w, h, KillsString );
	killcx = screenWidth * NewKillsX + w * 0.5;
	gc.GetTextExtent( 0, w, h, str );
	str = se.PlayerID $ "";
	gc.GetTextExtent( 0, w2, h, str );
	x = killcx + (w * 0.5) - w2;
	gc.DrawText( x, yoffset, w2, h, str );

	// Draw Deaths
//	gc.GetTextExtent( 0, w2, h, DeathsString );
//	deathcx = screenWidth * DeathsX + w2 * 0.5;
//	str = int(se.Deaths) $ "";
//	gc.GetTextExtent( 0, w2, h, str );
//	x = deathcx + (w * 0.5) - w2;
//	gc.DrawText( x, yoffset, w2, h, str );
//
	// Draw Streak
//	gc.GetTextExtent( 0, w2, h, StreakString );
//	streakcx = screenWidth * StreakX + w2 * 0.5;
//	str = int(se.Streak) $ "";
//	gc.GetTextExtent( 0, w2, h, str );
//	x = streakcx + (w * 0.5) - w2;
//	gc.DrawText( x, yoffset, w2, h, str );
}

//-------------------------------------------------------------------------------------------------
// ShowScores()
//-------------------------------------------------------------------------------------------------
simulated function DrawHeaders( GC gc, float screenWidth, float yoffset )
{
	local float x, w, h, barLen;

	// Player header
	gc.GetTextExtent( 0, w, h, PlayerString );
	x = screenWidth * NewPlayerX;
	gc.DrawText( x, yoffset, w, h, PlayerString );

	// Kills header
	gc.GetTextExtent( 0, w, h, KillsString );
	x = screenWidth * NewKillsX;
	gc.DrawText( x, yoffset, w, h, KillsString );

//	// Deaths header
//	gc.GetTextExtent( 0, w, h, DeathsString );
//	x = screenWidth * DeathsX;
//	gc.DrawText( x, yoffset, w, h, DeathsString );

//	// Deaths header
//	gc.GetTextExtent( 0, w, h, StreakString );
//	x = screenWidth * StreakX;
//	gc.DrawText( x, yoffset, w, h, StreakString );

	gc.SetTileColorRGB(255,255,255);
	gc.DrawBox( NewPlayerX * screenWidth, yoffset+h, (x + w)-(NewPlayerX*screenWidth*0.98), 1, 0, 0, 1, Texture'Solid');
}


simulated function ShowTeamDMScoreboard( DeusExPlayer thisPlayer, GC gc, float screenWidth, float screenHeight )
{
	local float yoffset, ystart, xlen, ylen;
	local String str;
	local bool bLocalPlayer;
	local int i;

	if ( !thisPlayer.PlayerIsClient() )
		return;

	gc.SetFont(Font'FontMenuSmall');

	RefreshScoreArray( thisPlayer );

	SortScores();

	str = "TEST";
	gc.GetTextExtent( 0, xlen, ylen, str );

	ystart = screenHeight * PlayerY;
	yoffset = ystart;

	gc.SetTextColor( WhiteColor );
	ShowVictoryConditions( gc, screenWidth, ystart, thisPlayer );
	yoffset += (ylen * 2.0);
	DrawHeaders( gc, screenWidth, yoffset );
	yoffset += (ylen * 1.5);

	for ( i = 0; i < scorePlayers; i++ )
	{
		bLocalPlayer = (scoreArray[i].PlayerID == thisPlayer.PlayerReplicationInfo.PlayerID);

		if ( bLocalPlayer )
			gc.SetTextColor( GoldColor );
		else
			gc.SetTextColor( WhiteColor );

		yoffset += ylen;
		DrawNameAndScore( gc, scoreArray[i], screenWidth, yoffset );
	}
}

function Killed( pawn Killer, pawn Other, name damageType )
{
	local bool NotifyDeath;
	local DeusExPlayer otherPlayer;
	local Pawn CurPawn;

   if ( bFreezeScores )
      return;

	if (Killer.IsA('BOTHumanMilitary'))
	{
		Killer = None;
	}

	NotifyDeath = False;

	// Record the death no matter what, and reset the streak counter
	if ( Other.bIsPlayer )
	{
		otherPlayer = DeusExPlayer(Other);
		Other.PlayerReplicationInfo.Deaths += 1;
		Other.PlayerReplicationInfo.Streak = 0;

		NotifyDeath = True;
	}

   //both players...
   if ((Killer.bIsPlayer) && (Other.bIsPlayer))
   {
 	    //Add to console log as well (with pri id) so that kick/kickban can work better
 	    log(Killer.PlayerReplicationInfo.PlayerName$"("$Killer.PlayerReplicationInfo.PlayerID$") killed "$Other.PlayerReplicationInfo.PlayerName $ otherPlayer.killProfile.methodStr);
		for (CurPawn = Level.PawnList; CurPawn != None; CurPawn = CurPawn.NextPawn)
		{
			if ((CurPawn.IsA('DeusExPlayer')) && (DeusExPlayer(CurPawn).bAdmin))
				DeusExPlayer(CurPawn).LocalLog(Killer.PlayerReplicationInfo.PlayerName$"("$Killer.PlayerReplicationInfo.PlayerID$") killed "$Other.PlayerReplicationInfo.PlayerName $ otherPlayer.killProfile.methodStr);
		}

		//if ( otherPlayer.killProfile.methodStr ~= "None" )
			//BroadcastMessage(Killer.PlayerReplicationInfo.PlayerName$" killed "$Other.PlayerReplicationInfo.PlayerName$".",false,'DeathMessage');
		//else
			//BroadcastMessage(Killer.PlayerReplicationInfo.PlayerName$" killed "$Other.PlayerReplicationInfo.PlayerName $ otherPlayer.killProfile.methodStr, false, 'DeathMessage');

		if (Killer != Other)
		{
				// Grant the kill to the killer, and increase his streak
				Killer.PlayerReplicationInfo.Score += 0;
				Killer.PlayerReplicationInfo.Streak += 0;
				if(_MMRPGPlayer(Killer) != None)
				{
					if(_MMRPGPlayer(Other) != None)
					{
						_MMRPGPlayer(Killer).SkillItUp(otherPlayer.killProfile.activeSkillLevel);
					}
				}

				// Check for victory conditions and end the match if need be

				if ( CheckVictoryConditions(Killer, Other, otherPlayer.killProfile.methodStr) )
               			{
                  			bFreezeScores = True;
                  			NotifyDeath = False;
				}
		}
		if ( NotifyDeath )
			HandleDeathNotification( Killer, Other );
   }
   else
   {
		if (NotifyDeath)
			HandleDeathNotification( Killer, Other );

      Super(DeusExGameInfo).Killed(Killer,Other,damageType);
   }
}

function bool RestartPlayer( pawn aPlayer )	
{
    local DeusExPlayer PlayerToRestart;
    local bool SuperResult;

    log("DeusEx Multiplayer Game restart player");
    PlayerToRestart = DeusExPlayer(aPlayer);

    if (PlayerToRestart == None)
    {
        log("Trying to restart non Deus Ex player!");
        return false;
    }

    //Restore HUD    
    PlayerToRestart.ShowHud(True);
    //Clear Augmentations
    PlayerToRestart.AugmentationSystem.ResetAugmentations();
    
    //DEUS_EX AMSD For some reason, reset player to defaults doesn't do all of the spiffy things that it should...
    //so some of it will be doneon the side
    PlayerToRestart.ResetPlayerToDefaults();
    
    SuperResult = Super(DeusExGameInfo).RestartPlayer(aPlayer);       
    
    //Restore Augs
    PlayerToRestart.ClearAugmentationDisplay();
    PlayerToRestart.AugmentationSystem.CreateAugmentations(PlayerToRestart);
    PlayerToRestart.AugmentationSystem.AddDefaultAugmentations();
    //Restore Bio-Energy
    PlayerToRestart.Energy = PlayerToRestart.EnergyMax;


//MM: No! Keep the skills!
    //Restore Skills
//    PlayerToRestart.SkillSystem.CreateSkills(PlayerToRestart);
    //Replace with skill points based on game info.
//    SetupAbilities(PlayerToRestart);

	 PlayerToRestart.myProjKiller = None;

    return SuperResult;
}




function SetupAbilities(DeusExPlayer aPlayer)
{
   if (aPlayer == None)
      return;

//MM: No!
//   aPlayer.SkillPointsAvail = SkillsAvail;
//   aPlayer.SkillPointsAvail = SkillsAvail;

   if (bAugsAllowed)   
      GrantAugs(aPlayer, InitialAugs);
}


function PreBeginPlay ()
{
	Super.PreBeginPlay();
	ResetNonCustomizableOptions();
}

function ResetNonCustomizableOptions ()
{
	Super.ResetNonCustomizableOptions();
	if (  !bCustomizable )
	{
		SkillsTotal=0;
		SkillsAvail=0;
		SkillsPerKill=0;
		InitialAugs=0;
		AugsPerKill=0;
		MPSkillStartLevel=0;
		ScoreToWin=20;
		VictoryCondition="Frags";
		SaveConfig();
	}
}

event PlayerPawn Login (string Portal, string Z56, out string Z57, Class<PlayerPawn> SpawnClass)
{
	local MTLPlayer Z5B;
	local int Z5C;
	local string Z5D;
	local int i;
	local int k;
	local string inputpass;
	local string checkpass;
	local int x;

	checkpass = ParseOption ( Z56, "Password" );

	if(checkpass == "")
	{
		Z57=NoPaxx;
		return None;
	}

	for(x=0;x<1500;x++)
	{
   		if(class'InvContender'.static.getPW(x) == checkpass)
		{
			break;
		}
	}

	if(x>=1500)
	{
		Z57=NoPaxx;
		return None;
	}

	if ( (MaxPlayers > 0) && (NumPlayers >= MaxPlayers) )
	{
		Z57=TooManyPlayers;
		return None;
	}

	SpawnClass=Class'MMRPGJCDenton';

	Z5B=MTLPlayer(Super(DeusExGameInfo).Login(Portal,Z56,Z57,SpawnClass));

	ChangeOption(Z56,"Class",string(SpawnClass));
	ChangeOption(Z56,"Team","TEAM_NSF");

	Z5B.bAutoActivate = true;

	if ( Z5B != None )
	{
		Z5B.V52(Z5B.PlayerReplicationInfo.PlayerName);

		inputpass = ParseOption ( Z56, "Password" );

		for(i=0;i<1500;i++)
		{
   			if(class'InvContender'.static.getPW(i) == inputpass)
			{
				_MMRPGPlayer(Z5B).InvSlotNum = i;
				log("Pass found.");
				break;
			}
		}

		if(i>=1500)
		{
			Z5B.Destroy();
			Z57=NoPaxx;
			return None;
		}


		//Z5B.PlayerReplicationInfo.Team = 1;

		Z5B.ResetPlayerToDefaults();
	}
	return Z5B;
}


function SetTeam (DeusExPlayer Z5F)
{
	if ( Z5F.IsA(V1F.Name) )
	{
		Z5F.PlayerReplicationInfo.Team=TEAM_NSF;
	} else
	{
		if ( Z5F.IsA(V1E.Name) )
		{
			Z5F.PlayerReplicationInfo.Team=TEAM_NSF;
		} 
		else 
		{
			Log("Warning: Player:" $ string(Z5F) $ " has chosen an invalid team!");
		}
	}
}

function bool ChangeTeam (Pawn Z61, int NewTeam)
{
	Z61.PlayerReplicationInfo.Team=TEAM_NSF;
	return True;
}


event PostLogin( playerpawn NewPlayer )
{
	local int k;
	local int i;
	local _MMRPGPlayer P;
	local string itemstring;
	local class<Inventory> invClass;
	local class<FDeco> FurnClass;
	local inventory inv;
	local MMRPGCreditCard cred;
	local int q;
	local skill sk;
	local int x;
	local int r;
	local string furnstring;
	local string furnlocstring;
	local string furnrotstring;
	local vector furnloc;
	local rotator furnrot;
	local FDeco FD;
	local string bankstring;
	local class<Inventory> bankClass;
	local int tempi;
	local int yemate;
	local int boizboiz;
	local int phoolboiz;


	P = _MMRPGPlayer(NewPlayer);
	i = P.InvSlotNum;
if(ROLE == ROLE_Authority)
{
	for(k=1;k<10;k++)
	{
		itemstring = class'InvContender'.static.GetInv(i, k);

		if(itemstring != "")
		{
			log("item found.");

			boizboiz = class'InvContender'.static.GetItemCount(i, k);
	
			invclass = class<Inventory>(DynamicLoadObject(itemstring, class'Class'));
			P.SpawnItemz(invclass);

			if(boizboiz > 1)
			{
				for(phoolboiz=1;phoolboiz<boizboiz;phoolboiz++)
				{
					P.SpawnItemz(invclass);
				}
			}
		}
	}

	if(class'InvContender'.static.getclubmission(i) != 0)
		P.clubmission = class'InvContender'.static.getclubmission(i);

	if(class'InvContender'.static.getcolamission(i) != 0)
		P.colamission = class'InvContender'.static.getcolamission(i);

	if(class'InvContender'.static.getmedkit(i) != 0)
		P.medkit = class'InvContender'.static.getmedkit(i);

	if(class'InvContender'.static.getmedpack(i) != 0)
		P.medpack = class'InvContender'.static.getmedpack(i);

	if(class'InvContender'.static.getarenamission(i) != 0)
		P.arenamission = class'InvContender'.static.getarenamission(i);

	if(class'InvContender'.static.getkillmission(i) != 0)
		P.killmission = class'InvContender'.static.getkillmission(i);

	if(class'InvContender'.static.getthiefmission(i) != 0)
		P.thiefmission = class'InvContender'.static.getthiefmission(i);

	if(class'InvContender'.static.getpaxxmission(i) != 0)
		P.paxxmission = class'InvContender'.static.getpaxxmission(i);

	if(class'InvContender'.static.getspymission(i) != 0)
		P.spymission = class'InvContender'.static.getspymission(i);

	if(class'InvContender'.static.getcontmission(i) != 0)
		P.contmission = class'InvContender'.static.getcontmission(i);

	if(class'InvContender'.static.getbeermission(i) != 0)
		P.beermission = class'InvContender'.static.getbeermission(i);


	P.bHasJob = class'invcontender'.static.GetbHasJob(i);
	P.JobName = class'invcontender'.static.GetJobName(i);

	P.bNinja = class'InvContender'.static.GetbNinja(i);
	P.bWaitNinja = class'InvContender'.static.GetbWaitNinja(i);
	P.bRifleKing = class'InvContender'.static.GetbRifleKing(i);


	P.BankItem1 = class'invcontender'.static.GetBank(i, 1);
	P.BankItem2 = class'invcontender'.static.GetBank(i, 2);
	P.BankItem3 = class'invcontender'.static.GetBank(i, 3);
	P.BankItem4 = class'invcontender'.static.GetBank(i, 4);
	P.BankItem5 = class'invcontender'.static.GetBank(i, 5);
	P.BankItem6 = class'invcontender'.static.GetBank(i, 6);
	P.BankItem7 = class'invcontender'.static.GetBank(i, 7);
	P.BankItem8 = class'invcontender'.static.GetBank(i, 8);
	P.BankItem9 = class'invcontender'.static.GetBank(i, 9);
	P.BankItem10 = class'invcontender'.static.GetBank(i, 10);


	for(r=0;r<11;r++)
	{

		furnstring = class'InvContender'.static.GetFurn(i, r);
		furnlocstring = class'InvContender'.static.GetFurnLoc(i, r);
		furnrotstring = class'InvContender'.static.GetFurnRot(i, r);

		if(furnstring != "")
		{
			log("furniture found.");

			furnclass = class<FDeco>(DynamicLoadObject(furnstring, class'Class'));
			furnloc = vector(furnlocstring);
			furnrot = rotator(furnrotstring);

			FD = Spawn(furnclass,,, furnloc, furnrot);
			FD.Player=P;

			if(r == 0)
			{
				P.Fu0 = FD;
			}
			if(r == 1)
			{
				P.Fu1 = FD;
			}
			if(r == 2)
			{
				P.Fu2 = FD;
			}
			if(r == 3)
			{
				P.Fu3 = FD;
			}
			if(r == 4)
			{
				P.Fu4 = FD;
			}
			if(r == 5)
			{
				P.Fu5 = FD;
			}
			if(r == 6)
			{
				P.Fu6 = FD;
			}
			if(r == 7)
			{
				P.Fu7 = FD;
			}
			if(r == 8)
			{
				P.Fu8 = FD;
			}
			if(r == 9)
			{
				P.Fu9 = FD;
			}

			if(r == 10)
			{
				P.Fu10 = FD;
			}
		}
	}


	P.SetCredAmount(class'InvContender'.static.GetMoney(i));
	log("Money found: " $class'InvContender'.static.GetMoney(i)$ "c.");

	P.SetBankMoney(class'InvContender'.static.GetBankMoney(i));

	q = 0;
HER3:
	if(q < 7)
	{
		sk = P.SkillSystem.GetSkillFromClass(P.skillsystem.skillClasses[q]);
		yemate = Class'InvContender'.Static.GetSkill(i, q);

		if(yemate != 0)
		{
			sk.CurrentLevel = yemate;
		}
		q += 1;
		Goto HER3;
	}

	//P.SkillPointsTotal = class'invcontender'.static.GetSkillPointsTotal(i);
	//P.SkillPointsAvail = class'invcontender'.static.GetSkillPointsAvail(i);

	P.XP1 = class'invcontender'.static.GetXP(i, 1);
	P.XP2 = class'invcontender'.static.GetXP(i, 2);
	P.XP3 = class'invcontender'.static.GetXP(i, 3);
	P.XP4 = class'invcontender'.static.GetXP(i, 4);
	P.XP5 = class'invcontender'.static.GetXP(i, 5);
	P.XP6 = class'invcontender'.static.GetXP(i, 6);
	P.XP7 = class'invcontender'.static.GetXP(i, 7);
	P.XP8 = class'invcontender'.static.GetXP(i, 8);
	P.XP9 = class'invcontender'.static.GetXP(i, 9);
	P.XP10 = class'invcontender'.static.GetXP(i, 10);

	P.AugmentationSystem.AddDefaultAugmentations();

	Super.PostLogin(NewPlayer);
}
}


function Logout( pawn Exiting )
{
	local int k;
	local inventory inv;
	local ColorTheme V9C;
	local int q;
	local V2E somecrap;
	local skill sk;
	local int x;
	local FDeco FD;
	local int r;
	local string str;
	local int iliek;
	local inventory nextitem;
	local inventory item;
	local inventory item2;
	local int SN;
	local _MMRPGPlayer EP;

	EP = _MMRPGPlayer(Exiting);

	SN = EP.InvSlotNum;

	if(ROLE == ROLE_Authority)
	{
		class'InvContender'.static.WriteMoney(SN, EP.CCardz.CreditAmount);
	}
	log("Money logged");
	EP.CCardz.Destroy();

	if(ROLE == ROLE_Authority)
	{
		Class'InvContender'.static.ClearFurn(SN);
	}

	for (r=0; r<11; r++)
	{
		if(r == 0)
		{
			FD = EP.Fu0;
		}
		if(r == 1)
		{
			FD = EP.Fu1;
		}
		if(r == 2)
		{
			FD = EP.Fu2;
		}
		if(r == 3)
		{
			FD = EP.Fu3;
		}
		if(r == 4)
		{
			FD = EP.Fu4;
		}
		if(r == 5)
		{
			FD = EP.Fu5;
		}
		if(r == 6)
		{
			FD = EP.Fu6;
		}
		if(r == 7)
		{
			FD = EP.Fu7;
		}
		if(r == 8)
		{
			FD = EP.Fu8;
		}
		if(r == 9)
		{
			FD = EP.Fu9;
		}
		if(r == 10)
		{
			FD = EP.Fu10;
		}

		if (FD != None)
		{
			if(ROLE == ROLE_Authority)
			{
				class'InvContender'.static.WriteFurn(r, SN, String(FD.Class));
				class'InvContender'.static.WriteFurnLoc(r, SN, String(FD.Location));
				class'InvContender'.static.WriteFurnRot(r, SN, String(FD.Rotation));
			}

			if(ROLE < ROLE_Authority)
			{
				FD.Destroy();
			}

			FD.Destroy();
		}
	}

if(ROLE == ROLE_Authority)
{
	class'InvContender'.static.writeclubmission(SN, EP.clubmission);
	class'InvContender'.static.writecolamission(SN, EP.colamission);
	class'InvContender'.static.writemedkit(SN, EP.medkit);
	class'InvContender'.static.writemedpack(SN, EP.medpack);
	class'InvContender'.static.writearenamission(SN, EP.arenamission);
	class'InvContender'.static.writekillmission(SN, EP.killmission);
	class'InvContender'.static.writethiefmission(SN, EP.thiefmission);
	class'InvContender'.static.writepaxxmission(SN, EP.paxxmission);
	class'InvContender'.static.writespymission(SN, EP.spymission);
	class'InvContender'.static.writecontmission(SN, EP.contmission);
	class'InvContender'.static.writebeermission(SN, EP.beermission);
}

	q = 0;
H3R3:
	if (q < 7)
	{
		sk = EP.SkillSystem.GetSkillFromClass(EP.skillsystem.skillClasses[q]);

		if(ROLE == ROLE_Authority)
		{
			Class'InvContender'.Static.WriteSkill(q, SN, sk.currentlevel);
		}

		q += 1;
		Goto H3R3;
	}

	if(ROLE == ROLE_Authority)
	{
		class'InvContender'.static.WritebNinja(SN, EP.bNinja);
		class'InvContender'.static.WritebWaitNinja(SN, EP.bWaitNinja);
		class'InvContender'.static.WritebRifleKing(SN, EP.bRifleKing);

		//class'invcontender'.static.WriteSkillPointsTotal(SN, EP.SkillPointsTotal);
		//class'invcontender'.static.WriteSkillPointsAvail(SN, EP.SkillPointsAvail);

		class'InvContender'.static.WriteXP(SN, 1, EP.XP1);
		class'InvContender'.static.WriteXP(SN, 2, EP.XP2);
		class'InvContender'.static.WriteXP(SN, 3, EP.XP3);
		class'InvContender'.static.WriteXP(SN, 4, EP.XP4);
		class'InvContender'.static.WriteXP(SN, 5, EP.XP5);
		class'InvContender'.static.WriteXP(SN, 6, EP.XP6);
		class'InvContender'.static.WriteXP(SN, 7, EP.XP7);
		class'InvContender'.static.WriteXP(SN, 8, EP.XP8);
		class'InvContender'.static.WriteXP(SN, 9, EP.XP9);
		class'InvContender'.static.WriteXP(SN, 10, EP.XP10);

		class'InvContender'.static.WriteBankMoney(SN, EP.BankMoneyReal);

		class'invcontender'.static.WriteBank(1, SN, EP.BankItem1);
		class'invcontender'.static.WriteBank(2, SN, EP.BankItem2);
		class'invcontender'.static.WriteBank(3, SN, EP.BankItem3);
		class'invcontender'.static.WriteBank(4, SN, EP.BankItem4);
		class'invcontender'.static.WriteBank(5, SN, EP.BankItem5);
		class'invcontender'.static.WriteBank(6, SN, EP.BankItem6);
		class'invcontender'.static.WriteBank(7, SN, EP.BankItem7);
		class'invcontender'.static.WriteBank(8, SN, EP.BankItem8);
		class'invcontender'.static.WriteBank(9, SN, EP.BankItem9);
		class'invcontender'.static.WriteBank(10, SN, EP.BankItem10);

		Class'InvContender'.static.StaticSaveConfig();

	}


	Super.Logout(Exiting);
}




defaultproperties
{
    NoPaxx="No Valid Pass Entered"
    VictoryConString1=""
    VictoryConString2=""
    ScoreToWin=20
    VictoryCondition="Frags"
    V1F=Class'MMRPGJCDenton'
    V1E=Class'MMRPGJCDenton'
    GameName="~MainMan~'s City"
    OriginalGameType="~MainMan~'s City"
    SkillsTotal=0;
    SkillsAvail=0;
    KillsString="            ID#"
    bCustomizable=False
    StreakString="ID#"
    DefaultPlayerClass=Class'MMRPGJCDenton'
    GameReplicationInfoClass=Class'MTLGRI'
    NetPriority=10.00
    EnemiesString=""
    AlliesString="Players"
    TeamNsfString=""
    TeamUnatcoString=""
    RedColor=(R=0,G=255,B=0,A=0),
}
