//=============================================================================
//my first attempt at making a "conversation" (without conedit)
//=============================================================================
class RPGBoy 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;
		}
	}

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

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

	if (Player.Colamission == 1)
	{
		Player.ReceiveMessage(""$Player.PlayerReplicationInfo.PlayerName$": Sup dawg");
		talkto = Player;
		talked = 1;
		SetTimer(2.0,False);
		return;
	}

	if ( (Player.Colamission == 2) || (Player.Colamission == 3) )
	{
		Player.ReceiveMessage("KID: Get me that BlueCola and then we'll talk.");
		Player.bInConv = False;
		Player.ReducedDamageType = '';
	}
		
	if (Player.Colamission == 4)
	{
		Inv=None;
		foreach AllActors(class'NailageColaBlue', Inv)
		{
			if (Inv.Owner == Player)
			{
				if (Inv != None)
				{
					Inv.Destroy();
					talkto = Player;
					Player.ReceiveMessage(""$Player.PlayerReplicationInfo.PlayerName$": Here's your cola, now you better tell me how to get in.");
					talked = 9;
					SetTimer(2.8,False);
					return;
				}
			}
		}

		if (Inv == None)
		{
			Player.ReceiveMessage("KID: Get me that BlueCola and then we'll talk.");
			Player.bInConv = False;
			Player.ReducedDamageType = '';
		}
	}

	if (Player.Colamission == 5)
	{
		talked = 1;
		Player.ReceiveMessage("KID: Remember, 7-1-6-2, the keypad's behind the counter.");
		Player.bInConv = False;
		Player.ReducedDamageType = '';
		talked = 0;
		return;
	}
}

function Timer()
{
	if (talked == 9)
	{
		talkto.ReceiveMessage("KID: OK chill, you need to type 7-1-6-2 into the keypad behind the counter.");
		talkto.ColaMission = 5;
		talkto.SkillPointsAdd(2100);
		talkto.ClientMessage("|p2Goal Completed! 2100 Skill Points awarded!");
		talkto.bInConv = False;
		talkto.ReducedDamageType = '';
		talked = 0;
		return;
	}

	else if (talked == 1)
	{
		talkto.ReceiveMessage("KID: Hey, wanna know a secret?");
		talked = 2;
		SetTimer(2.7,False);
		return;
	}

	else if (talked == 2)
	{
		talkto.ReceiveMessage(""$talkto.PlayerReplicationInfo.PlayerName$": Yeah alright.");
		talked = 3;
		SetTimer(2.7,False);
		return;
	}

	else if (talked == 3)
	{
		talkto.ReceiveMessage("KID: I can tell you how to get into the NSF base.");
		talked = 4;
		SetTimer(2.8,False);
		return;
	}

	else if (talked == 4)
	{
		talkto.ReceiveMessage(""$talkto.PlayerReplicationInfo.PlayerName$": What's the catch?");
		talked = 5;
		SetTimer(2.8,False);
		return;
	}

	else if (talked == 5)
	{
		talkto.ReceiveMessage("KID: Get me some BlueCola first - the new energy drink thats coming out next year.");
		talkto.Colamission = 2;
		talkto.ClientMessage("Goal Received (Press F2 for details)");
		talkto.bInConv = False;
		talkto.ReducedDamageType = '';
		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.ChildMaleCarcass'
     WalkingSpeed=0.256000
     walkAnimMult=1.150000
     GroundSpeed=150.000000
     BaseEyeHeight=26.000000
     HealthHead=50
     HealthTorso=50
     HealthLegLeft=50
     HealthLegRight=50
     HealthArmLeft=50
     HealthArmRight=50
     Mesh=LodMesh'DeusExCharacters.GMK_DressShirt'
     MultiSkins(0)=Texture'DeusExCharacters.Skins.ChildMaleTex0'
     MultiSkins(1)=Texture'DeusExCharacters.Skins.ChildMaleTex1'
     MultiSkins(2)=Texture'DeusExCharacters.Skins.PantsTex3'
     MultiSkins(3)=Texture'DeusExCharacters.Skins.ChildMaleTex0'
     MultiSkins(4)=Texture'DeusExItems.Skins.PinkMaskTex'
     MultiSkins(5)=Texture'DeusExCharacters.Skins.ChildMaleTex1'
     MultiSkins(6)=Texture'DeusExItems.Skins.GrayMaskTex'
     MultiSkins(7)=Texture'DeusExItems.Skins.BlackMaskTex'
     CollisionRadius=17.000000
     CollisionHeight=32.500000
     Mass=80.000000
     Buoyancy=85.000000
     BindName="Kid"
     FamiliarName="Kid"
     UnfamiliarName="Kid"
}
