So, if i dont factory restore on itunes, and i restore it through the iphone (settings>general>reset>erase all content and settings/reset all settings) will this keep my phone unlocked?
No, do not ever do that on a JB iphone.
It will put your iphone in a boot loop and only way to get it out is to restore with itunes.
What are you trying to accomplish, on what kind of iphone model, firmware and baseband?
Only way to restore now is to custom 4.2.1 ipsw created with pwnage tool or snowbreeze.
dammit.. what about unlocking? just get go to cydia and repo and unlock?
You can't restore with iTunes any more.
Find a tutorial and do the pwnage tool again.
You have to hold down option and click restore in iTunes and the select the custom Ipsw you made with pwnage.