(apply
'(lambda ( / n nn times pre)
    (setq n -1
          pre ""
          times 255
    )
    (repeat (1+ times)
       (setq n (1+ n)
             nn (itoa n)
       )
       (eval (read (strcat
                      "(defun c:"
                      (if (= 0 n) "0" nn)
                      "( / old_cmd x)(mai_start nil)(setq x (mai_select_first nil (strcat \"选择变颜色实体,颜色为 "
                      (if (= 0 n) "随层" nn)
                      ":<退出>\") \"没有选择物体.\"))(mai_chgcolor x "
                      nn
                      " nil)(mai_end))"
                   )
             )
       )
    )
)
nil
)
