``` unit Q2; interface uses Classes, SysUtils; procedure Main(Npc: TNormNpc; Player: TPlayObject; Args: TArgs); implementation procedure Main(Npc: TNormNpc; Player: TPlayObject; Args: TArgs); begin Player.CloseWindow('Npc大窗口'); //执行CloseWindow后,如果客户端开启了UI里面的"Npc大窗口"则会关闭该窗口 //UI设计里设置窗口为手动关闭后,配合此函数可以达到按照特定的条件显示和关闭一个自定义窗口 end; end. ```