Make more use of DefineConsoleMethod

Resubmission of #887 with some fixes.
Yeah, i think is better use old declaration and remove this type on complication on a future revision of script API :(