//=============================================================================
// Male2.
//=============================================================================
class RPGNinjaTrial 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.bNinja)
	{
		Player.ReceiveMessage("NINJA MASTER: I am Hung Lo, master of Long Wang.");
		talked = 0;
		Player.bInConv = False;
		return;
	}

	if (!Player.bNinja)
	{
		if(!Player.bWaitNinja)
		{
			Player.ReceiveMessage(""$Player.PlayerReplicationInfo.PlayerName$": How can I become a Ninja?");
			talked = 1;
			SetTimer(2.4,False);
			return;
		}
		if(Player.bWaitNinja)
		{
			Player.ReceiveMessage("NINJA MASTER: Go to the door at the South-West corner of the compound.");
			talked = 0;
			Player.bInConv = False;
			return;
		}
	}
}

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

	Cred = talkto.CreditCard;


	if (talked == 1)
	{
		talkto.ReceiveMessage("NINJA MASTER: You must first prove that you are worthy.");
		talked = 2;
		SetTimer(2.9,False);
		return;
	}

	else if (talked == 2)
	{
		talkto.ReceiveMessage("NINJA MASTER: True ninjas must be strong in mind and body.");
		talked = 3;
		SetTimer(3.5,False);
		return;
	}

	else if (talked == 3)
	{
		talkto.ReceiveMessage("NINJA MASTER: Go to the South-West corner of the compound,");
		talked = 4;
		SetTimer(3.0,False);
		return;
	}
	else if (talked == 4)
	{
		talkto.ReceiveMessage("NINJA MASTER: And to prove yourself, go through the door there.");
		talked = 5;
		SetTimer(2.9,False);
		return;
	}
	else if (talked == 5)
	{
		talkto.ReceiveMessage(""$talkto.PlayerReplicationInfo.PlayerName$": Thank you.");
		talkto.bWaitNinja = True;
		talked = 0;
		talkto.bInConv = False;
		return;
	}
}


defaultproperties
{
     talked=0
     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.LowerClassMale2Carcass'
     WalkingSpeed=0.213333
     walkAnimMult=0.750000
     GroundSpeed=180.000000
     Mesh=LodMesh'DeusExCharacters.GM_Suit'
     MultiSkins(0)=Texture'DeusExCharacters.Skins.LowerClassMale2Tex0'
     MultiSkins(1)=Texture'DeusExCharacters.Skins.LowerClassMale2Tex2'
     MultiSkins(2)=Texture'DeusExCharacters.Skins.LowerClassMale2Tex0'
     MultiSkins(3)=Texture'DeusExCharacters.Skins.LowerClassMale2Tex1'
     MultiSkins(4)=Texture'DeusExCharacters.Skins.LowerClassMale2Tex1'
     MultiSkins(5)=Texture'DeusExItems.Skins.GrayMaskTex'
     MultiSkins(6)=Texture'DeusExItems.Skins.BlackMaskTex'
     MultiSkins(7)=Texture'DeusExItems.Skins.PinkMaskTex'
     CollisionRadius=20.000000
     CollisionHeight=47.500000
     BindName="n1nj0r"
     FamiliarName="Ninja Master"
     UnfamiliarName="Ninja Master"
}
