Okay, but why changing default behaviour?
What happens now if you forgot to set lockMap or just warped to a location with no route to your lockMap?
Auto vending on multiple maps sounds like it already requires some scripting (or at least doCommands), why not change lockMap (free walking logic to a new location) or manually open the shop with it? Do you have any example where new code is really easier or more useful?
It may be a good idea to have a configurable control over this, but in that certain case (lockMap, shopAuto_open, openshop) it's not really understandable for me.
Also consistent naming (with inLockOnly, attackAuto_inLockOnly, avoidList_inLockOnly) isn't cool. Consistent lowercase-after-underscore theme neither.
That was already pointed on somewhere: that kind of check should be done inside cartActive().if (!$cart{exists} && !$char->cartActive) {