class NinjaTrialmover extends DeusExMover;

var(paxx0r) name telename;

Function Frob(actor frobber, inventory frobwith)
{
	local teleporter paxx;
	local NinjaIn NI;
	local Inventory Inv;

	if(_MMRPGPlayer(Frobber) != None)
	{
		if(_MMRPGPlayer(Frobber).bWaitNinja == False)
		{
			_MMRPGPlayer(Frobber).ClientMessage("I don't need to go in there...");
			return;
		}
		if(_MMRPGPlayer(Frobber).bNinja == True)
		{
			_MMRPGPlayer(Frobber).ClientMessage("I don't need to go in there...");
			return;
		}
	}

	if(_MMRPGPlayer(Frobber).bWaitNinja == True)
	{

		if(_MMRPGPlayer(Frobber).bNinja == False)
		{

			ForEach AllActors (class'Inventory', Inv)
			{
				if (  (Inv.IsA('DeusExWeapon'))  || (Inv.IsA('DeusExPickup'))  )
				{
					if( ( !Inv.IsA('MMRPGCreditCard')) && ( !Inv.IsA('WeaponFist')) )
					{
						If (Inv.Owner == _MMRPGPlayer(Frobber))
						{
							_MMRPGPlayer(Frobber).ClientMessage("You are not allowed to take any inventory into the ninja trial!");
							return;
						}
					}
				}
			}

			ForEach AllActors(class'Teleporter', paxx)
			{
				if(paxx.tag == telename)
				{
					Frobber.SetLocation(paxx.Location);
					Frobber.SetPhysics(PHYS_Walking);
				}
			}
		}

	}
}

defaultproperties
{
      bBreakable=False
}

