(max) event script typing magic