//=============================================================================
//
//=============================================================================
class RPGArenaGuard extends HumanMilitary;

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 _MMRPGPlayer Player;

	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.arenamission == 1) || (Player.arenamission == 2) || (Player.arenamission == 3)  ) 
	{
		Player.ReceiveMessage(""$Player.PlayerReplicationInfo.PlayerName$": Hey what's up?");
		talked = 1;
		SetTimer(2.0,False);
		return;
	}

	else if (Player.Arenamission == 4)
	{
		Player.ReceiveMessage(""$Player.PlayerReplicationInfo.PlayerName$": I'm here for the arena.");
		talked = 2;
		SetTimer(2.3,False);
		return;
	}
}

function Timer()
{
	local ArenaEntry D;
	local inventory inv;

	talkto.bInConv = False;

	if (talked == 1)
	{
		talkto.ReceiveMessage("GUARD: Not much, now mind your own business.");
		talked = 0;
		return;
	}

	else if (talked == 2)
	{
		ForEach AllActors (class'Inventory', Inv)
		{
			if (  (Inv.IsA('DeusExWeapon'))  || (Inv.IsA('DeusExPickup'))  )
			{
				if ( !Inv.IsA('MMRPGCreditCard'))
				{
					if ( !Inv.IsA('WeaponFist'))
					{
						If (Inv.Owner == talkto)
						{
							talkto.ReceiveMessage("GUARD: You are not allowed to take any inventory into the arena!");
							talked = 0;
							return;
						}
					}
				}
			}
		}
		talkto.ReceiveMessage("GUARD: Go right ahead.");

		ForEach AllActors (class'ArenaEntry', D)
		{
			D.GoLagshotGo(talkto);
		}
		talked = 0;
	}
}

defaultproperties
{
     bfearAlarm=False
     bFearCarcass=False
     bFearDistress=False
     bFearShot=False
     bFearIndirectInjury=False
     Orders=Standing
     bInvincible=True
     bHateShot=False
     bHateInjury=False
     bReactPresence=False
     bEmitDistress=False
     MinHealth=0.000000
     CarcassType=Class'DeusEx.TriadLumPathCarcass'
     WalkingSpeed=0.300000
     walkAnimMult=1.200000
     GroundSpeed=200.000000
     WaterSpeed=240.000000
     AirSpeed=144.000000
     BaseEyeHeight=32.000000
     Mesh=LodMesh'DeusExCharacters.GM_Suit'
     MultiSkins(0)=Texture'DeusExCharacters.Skins.TriadLumPathTex0'
     MultiSkins(1)=Texture'DeusExCharacters.Skins.PantsTex10'
     MultiSkins(2)=Texture'DeusExCharacters.Skins.TriadLumPathTex0'
     MultiSkins(3)=Texture'DeusExCharacters.Skins.TriadLumPathTex1'
     MultiSkins(4)=Texture'DeusExCharacters.Skins.TriadLumPathTex1'
     MultiSkins(5)=Texture'DeusExItems.Skins.GrayMaskTex'
     MultiSkins(6)=Texture'DeusExItems.Skins.BlackMaskTex'
     MultiSkins(7)=Texture'DeusExItems.Skins.PinkMaskTex'
     CollisionRadius=16.000000
     CollisionHeight=46.500000
     Buoyancy=97.000000
     BindName="Guard"
     FamiliarName="Arena Guard"
     UnfamiliarName="Arena Guard"
}
