//=============================================================================
// Male2.
//=============================================================================
class RPGSpyMan extends HumanCivilian;



var int talked;
var _MMRPGPlayer talkto;

function TakeDamageBase(int Damage, Pawn instigatedBy, Vector hitlocation, Vector momentum, name damageType,
                        bool bPlayAnim)
{}

function Frob(Actor Frobber, Inventory frobWith)
{
	local _MMRPGPlayer Player;
	local Medkit med;

	If (Frobber.IsA('DeusExPlayer'))
	{
		If(talked != 0)
		{
			_MMRPGPlayer(Frobber).ReceiveMessage("Someone is already talking to this person!");
			return;
		}
	}

//	Super.Frob(Frobber, frobWith);
	Player = _MMRPGPlayer(Frobber);
	talkto = Player;

	Player.bInConv = True;
		LookAtActor(Frobber, True, True, False);
	
	if (player.spymission == 1)
	{
		Player.ReceiveMessage(""$Player.PlayerReplicationInfo.PlayerName$": What are you doing?");
		talked = 1;
		SetTimer(2.4,False);
		return;
	}

	else if (player.spymission == 2)
	{
		Player.ReceiveMessage("FEMALE: C'mon don't waste time.");
		talked = 0;
		Player.bInConv = False;
		return;
	}

	else if (player.spymission == 3)
	{
		Player.ReceiveMessage(""$Player.PlayerReplicationInfo.PlayerName$": I spied on them.");
		talked = 20;
		SetTimer(2.4,False);
		return;
	}

	else if (player.spymission == 4)
	{
		Player.ReceiveMessage("FEMALE: Uh huh.");
		talkto.bInConv = False;
		talked = 0;
		return;
	}
}

function Timer()
{
	local Medkit med;
	local MMRPGCreditCard Cred;

	Cred = talkto.CreditCard;


	if (talked == 1)
	{
		talkto.ReceiveMessage("FEMALE: Uh, n-nothing, why'd you ask?");
		talked = 2;
		SetTimer(2.7,False);
		return;
	}

	else if (talked == 2)
	{
		talkto.ReceiveMessage(""$talkto.PlayerReplicationInfo.PlayerName$": No reason, just you're acting slightly suspicious");
		talked = 3;
		SetTimer(3.3,False);
		return;
	}

	else if (talked == 3)
	{
		talkto.ReceiveMessage("FEMALE: W-what? N-no I'm not.");
		talked = 4;
		SetTimer(2.7,False);
		return;
	}
	else if (talked == 4)
	{
		talkto.ReceiveMessage(""$talkto.PlayerReplicationInfo.PlayerName$": How about you tell me, or I make you talk?");
		talked = 5;
		SetTimer(3.5,False);
		return;
	}
	else if (talked == 5)
	{
		talkto.ReceiveMessage("FEMALE: Okay okay, maybe you can help me out.");
		talked = 6;
		SetTimer(3.1,False);
		return;
	}
	else if (talked == 6)
	{
		talkto.ReceiveMessage("FEMALE: See the window on the top floor on the east side?");
		talked = 7;
		SetTimer(3.3,False);
		return;
	}
	else if (talked == 7)
	{
		talkto.ReceiveMessage("FEMALE: There are 2 businessmen in there, and I want you to spy on them.");
		talked = 8;
		SetTimer(3.3,False);
		return;
	}
	else if (talked == 8)
	{
		talkto.ReceiveMessage(""$talkto.PlayerReplicationInfo.PlayerName$": Okay I'll see what I can do.");
		talked = 0;
		talkto.bInConv = False;
		talkto.spymission = 2;
		talkto.ClientMessage("Goal Received (Press F2 for details)");
		return;
	}


	else if (talked == 20)
	{
		talkto.ReceiveMessage("FEMALE: Yeah? What did they say?");
		talked = 21;
		SetTimer(3.3,False);
		return;
	}
	else if (talked == 21)
	{
		talkto.ReceiveMessage(""$talkto.PlayerReplicationInfo.PlayerName$": They were discussing an 'agent X' and said that he would be terminated.");
		talked = 22;
		SetTimer(4.3,False);
		return;
	}
	else if (talked == 22)
	{
		talkto.spymission = 4;
		talkto.ReceiveMessage("FEMALE: Hmm, that's very interesting - thanks. Take this too (120c).");
		talkto.SkillPointsAdd(1500);
		Cred.CreditAmount +=120;
		talkto.ClientMessage("|p2Goal Completed! 1500 Skill Points and 120c awarded!");
		talkto.bInConv = False;
		talked = 0;
		return;
	}
}


defaultproperties
{
     bfearAlarm=False
     bFearCarcass=False
     bFearDistress=False
     bFearShot=False
     bFearIndirectInjury=False
     Orders=Standing
     bInvincible=True
     bHateShot=False
     bHateInjury=False
     bReactPresence=False
     bEmitDistress=False
     CarcassType=Class'DeusEx.Male2Carcass'
     WalkingSpeed=0.296000
     walkAnimMult=0.750000
     GroundSpeed=200.000000
     Mesh=LodMesh'DeusExCharacters.GFM_Dress'
     MultiSkins(0)=Texture'DeusExCharacters.Skins.NurseTex0'
     MultiSkins(1)=Texture'ContenderStuff.Skins.LegsMM3'
     MultiSkins(2)=Texture'ContenderStuff.Skins.SkirtMM2'
     MultiSkins(3)=Texture'ContenderStuff.Skins.MMTop2'
     MultiSkins(4)=Texture'ContenderStuff.Skins.SkirtMM2'
     MultiSkins(5)=Texture'DeusExCharacters.Skins.NurseTex0'
     MultiSkins(6)=Texture'DeusExCharacters.Skins.NurseTex0'
     MultiSkins(7)=Texture'DeusExCharacters.Skins.NurseTex0'
     CollisionRadius=20.000000
     CollisionHeight=43.000000
     BindName="Male2"
     FamiliarName="Female"
     UnfamiliarName="Female"
}
