And then it gets more complex and we get as far as rewriting GS2 in GS2?
An eval with some restrictions (
like Ruby's $SAFE variable) would be a possible replacement maybe. For example, let's call the imaginary function seval and expect a security level and the code that should be evaled. Security level 1 could mean "don't allow triggeractions", 2 could mean "don't allow player warping", or even "variables are read only" and so on.
I am not sure whether that's possible for GS2, depends on the way it has been designed, but certainly it'd be better than putnpc2.