on that note, am i transporting legally if i have a long arm in a case (not locked) with trigger lock installed and gun unloadeD?
In short, if it is a large capacity long gun, no you are not in accordance with the law unless it is in a locked trunk. If it is a non large capacity long gun, then yes you are in accordance with the law.
Take a close look at paragraphs b and c of mgl ch140 s131c:
(b) No person carrying a firearm under a Class B license issued under section 131 or 131F shall possess the same in a vehicle unless such weapon is unloaded and contained within the locked trunk of such vehicle or in a locked case or other secure container. Whoever violates the provisions of this subsection shall be punished by a fine of $500.
(c) No person possessing a large capacity rifle or shotgun under a Class A or Class B license issued under section 131 or 131F shall possess the same in a vehicle unless such weapon is unloaded and contained within the locked trunk of such vehicle or in a locked case or other secure container. Whoever violates the provisions of this subsection shall be punished by a fine of not less than $500 nor more than $5,000.
As you can see, your choices for a large capacity rifle or shotgun are a locked trunk, locked case, or "other secure container." It isn't clear to me what a "secure container" is, but a trigger lock is clearly neither a case nor a container.
Note that trigger locks are acceptable for storage under Ch140 s131L:
Section 131L. (a) It shall be unlawful to store or keep any firearm, rifle or shotgun including, but not limited to, large capacity weapons, or machine gun in any place unless such weapon is secured in a locked container or equipped with a tamper-resistant mechanical lock or other safety device,
So the bottom line is that trigger locks are acceptable for storage of all guns, but not for transport of handguns or large capacity long guns. If your long guns are large capacity, then they must be transported in a locked trunk, locked case, or "other secure container." I doubt that an unlocked case and a trigger lock meet the definition of an "other secure container."
Note also that non-large capacity long guns do not need to be locked up while be transported in a vehicle. That said, I suspect many police officers are not aware of that fine point of the law, and if they saw a non-large capacity long gun in your car that is not locked in a case or trunk, they might wrongfully arrest you. You would likely win the ensuing legal fight but it would ruin your whole day.
So my recommendation is that you put all long guns (whether large or non-large capacity) in your trunk or a locked case.
and one more... if the gun is unloaded, but ammo is in the case with the gun, is that a problem?
I'm not aware of anything in Massachusetts law that prevents you from having ammunition in the case with the gun. But the gun itself must be unloaded.
Once again, please be aware that I am not a lawyer and this isn't legal advice. I'm sure that Cross-X, Scrivener, or other competent attorneys could give you better information than I.