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


var int talked;
var _MMRPGPlayer talkto;
var LionStatue stat;

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;
	local LionStatue LS;

	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.thiefmission == 1)
	{
		Player.ReceiveMessage(""$Player.PlayerReplicationInfo.PlayerName$": Alright there?");
		talked = 1;
		SetTimer(2.4,False);
		return;
	}

	else if (player.thiefmission == 2)
	{
		LS=None;
		ForEach AllActors (Class'LionStatue',LS)
		{
			If (LS.Owner == Player)
			{
				Player.ReceiveMessage(""$Player.PlayerReplicationInfo.PlayerName$": I've got the statue. Pay up.");
				stat = LS;
				talked = 10;
				SetTimer(2.1,False);
				return;
			}
		}

		Player.ReceiveMessage("MAN: I'm still waiting for that statue...");
		talked = 8;
		SetTimer(2.4,False);
		return;
	}
	else if (player.thiefmission == 3)
	{
		Player.ReceiveMessage("MAN: See you around...");
		talked = 0;
		Player.bInConv = False;
		return;
	}
}

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


	if (talked == 1)
	{
		talkto.ReceiveMessage("MAN: Hmm...");
		talked = 2;
		SetTimer(2.0,False);
		return;
	}

	else if (talked == 2)
	{
		talkto.ReceiveMessage("MAN: You look reasonably smart, wanna make some money?");
		talked = 3;
		SetTimer(3.1,False);
		return;
	}

	else if (talked == 3)
	{
		talkto.ReceiveMessage(""$talkto.PlayerReplicationInfo.PlayerName$": Who doesn't?");
		talked = 4;
		SetTimer(2.8,False);
		return;
	}
	else if (talked == 4)
	{
		talkto.ReceiveMessage("MAN: Well there's a guy who's out of town at the moment");
		talked = 5;
		SetTimer(3.4,False);
		return;
	}
	else if (talked == 5)
	{
		talkto.ReceiveMessage("MAN: And I need you to steal a gold statue from his apartment.");
		talked = 6;
		SetTimer(3.4,False);
		return;
	}
	else if (talked == 6)
	{
		talkto.ReceiveMessage(""$talkto.PlayerReplicationInfo.PlayerName$": Yeah okay I'm up for that... How do I get there?");
		talked = 7;
		SetTimer(3.4,False);
		return;
	}
	else if (talked == 7)
	{
		talkto.ReceiveMessage("MAN: He lives in one of the apartments in the Old Market Square on the west side of the city. ");
		talked = 0;
		talkto.bInConv = False;
		talkto.thiefmission = 2;
		talkto.ClientMessage("Goal Received (Press F2 for details)");
		return;
	}

//=======================

	else if (talked == 8)
	{
		talkto.ReceiveMessage(""$talkto.PlayerReplicationInfo.PlayerName$": How do I get there again?");
		talked = 7;
		SetTimer(3.4,False);
		return;
	}
	else if (talked == 9)
	{
		talkto.ReceiveMessage("MAN: His apartment is in the Old Market Square (West part of the city)");
		talked = 0;
		talkto.bInConv = False;
		return;
	}

//========================

	else if (talked == 10)
	{
		talkto.ReceiveMessage("MAN: How does 200c sound?");
		talked = 11;
		SetTimer(2.9,False);
		return;
	}
	else if (talked == 11)
	{
		talkto.ReceiveMessage(""$talkto.PlayerReplicationInfo.PlayerName$": 200 eh? Think we can scrape 300?");
		talked = 12;
		SetTimer(2.9,False);
		return;
	}
	else if (talked == 12)
	{
		talkto.ReceiveMessage("MAN: 250, and that's my last offer.");
		talked = 13;
		SetTimer(2.9,False);
		return;
	}
	else if (talked == 13)
	{
		talkto.ReceiveMessage(""$talkto.PlayerReplicationInfo.PlayerName$": Deal.");
		Cred = talkto.creditcard;
		Cred.CreditAmount +=250;
		talkto.thiefmission = 3;
		talkto.SkillPointsAdd(2000);
		talkto.ClientMessage("|p2Goal Completed! 2000 Skill Points and 250c awarded!");
		stat.Destroy();
		talkto.bInConv = False;
		talked = 0;
		return;
	}
}


defaultproperties
{
     bfearAlarm=False
     bFearCarcass=False
     bFearDistress=False
     bFearShot=False
     bFearIndirectInjury=False
     Orders=Sitting
     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.GM_Trench'
     MultiSkins(0)=Texture'DeusExCharacters.Skins.SkinTex3'
     MultiSkins(1)=Texture'ContenderStuff.Skins.BlueSuit'
     MultiSkins(2)=Texture'DeusExCharacters.Skins.PantsTex5'
     MultiSkins(3)=Texture'DeusExCharacters.Skins.SkinTex3'
     MultiSkins(4)=Texture'ContenderStuff.Skins.PinkShirtSmall'
     MultiSkins(5)=Texture'ContenderStuff.Skins.BlueSuit'
     MultiSkins(6)=Texture'DeusExItems.Skins.PinkMaskTex'
     MultiSkins(7)=Texture'DeusExItems.Skins.PinkMaskTex'
     CollisionRadius=20.000000
     CollisionHeight=47.500000
     BindName="Male2"
     FamiliarName="Male"
     UnfamiliarName="Male"
}
