//=============================================================================
// Bartender.
//=============================================================================
class RPGArenaBum extends HumanCivilian;

var _MMRPGPlayer talkto;
var int talked;

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

function Frob(Actor Frobber, Inventory frobWith)
{
	local NailageColaBlue Inv;
	local MMRPGCreditCard Cred;
	local _MMRPGPlayer Player;

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

	Player = _MMRPGPlayer(Frobber);
	talkto = Player;


	Player.bInConv = True;
		LookAtActor(Frobber, True, True, False);

	if (Player.arenamission == 1)
	{
		Player.ReceiveMessage(""$Player.PlayerReplicationInfo.PlayerName$": What's going on inside the closed metro?");
		talked = 1;
		SetTimer(3.1,False);
		return;
	}
	
	if ( (Player.arenamission == 2)||(Player.arenamission == 3) )
	{
		Player.ReceiveMessage(""$Player.PlayerReplicationInfo.PlayerName$": What do I have to do again?");
		talked = 4;
		SetTimer(3.9,False);
		return;
	}

	if (Player.arenamission == 4)
	{
		Player.ReceiveMessage(""$Player.PlayerReplicationInfo.PlayerName$": I passed the trial!");
		talked = 5;
		SetTimer(3.0,False);
		return;
	}

}

function Timer()
{
	local vector loc;
	local Medpack SpawnObject;
	local MMRPGCreditCard Cred;
	local ArenaTrial D;

	if (talked == 1)
	{
		talkto.ReceiveMessage("BUM: Well since it closed last year, some gangs have taken it over and are running a fighting arena inside.");
		talked = 2;
		SetTimer(4.3,False);
		return;
	}

	if (talked == 2)
	{
		talkto.ReceiveMessage(""$talkto.PlayerReplicationInfo.PlayerName$": Sounds interesting... any way for me to get in?");
		talked = 3;
		SetTimer(3.9,False);
		return;
	}

	if (talked == 3)
	{
		talkto.ReceiveMessage("BUM: Actually, now you mention it, there's a guy in the alley behind Stretto's recruiting people for the arena.");
		talkto.ArenaMission = 2;
		talkto.ClientMessage("Goal Received (Press F2 for details)");
		talkto.bInConv = False;
		talked = 0;
		return;
	}

	if (talked == 4)
	{
		talkto.ReceiveMessage("BUM: Go behind Stretto's and look for a guy recruiting for the arena.");
		talkto.bInConv = False;
		talked = 0;
		return;
	}

	if (talked == 5)
	{
		talkto.ReceiveMessage("BUM: You actually got in? Wow, I'm impressed - at first you seemed kinda weak.");
		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.BumMaleCarcass'
     WalkingSpeed=0.213333
     BaseAssHeight=-23.000000
     GroundSpeed=180.000000
     Mesh=LodMesh'DeusExCharacters.GM_Trench'
     MultiSkins(0)=Texture'DeusExCharacters.Skins.BumMaleTex0'
     MultiSkins(1)=Texture'DeusExCharacters.Skins.BumMaleTex2'
     MultiSkins(2)=Texture'DeusExCharacters.Skins.PantsTex4'
     MultiSkins(3)=Texture'DeusExCharacters.Skins.BumMaleTex0'
     MultiSkins(4)=Texture'DeusExCharacters.Skins.TrenchShirtTex1'
     MultiSkins(5)=Texture'DeusExCharacters.Skins.BumMaleTex2'
     MultiSkins(6)=Texture'DeusExItems.Skins.GrayMaskTex'
     MultiSkins(7)=Texture'DeusExItems.Skins.BlackMaskTex'
     CollisionRadius=20.000000
     CollisionHeight=47.500000
     BindName="Man"
     FamiliarName="Man"
     UnfamiliarName="Man"
}
