``` unit Q2; interface uses Classes, SysUtils, DateUtils, JSON; procedure Main(Npc: TNormNpc; Player: TPlayObject; Args: TArgs); implementation procedure Main(Npc: TNormNpc; Player: TPlayObject; Args: TArgs); var AList: TActorList; AActor: TActor; I: Integer; begin AList := Player.Map.GetActorListInRange(Player.MapX, Player.MapY, 3); //将人物坐标3格范围内的全部对象取出来 try for I := 0 to AList.Count - 1 do begin AActor := AList[I]; try if (AActor <> nil) and not AActor.Death and not AActor.ISNPC and not AActor.ISMonNPC and not AActor.ISPlayer then //如果对象存在 且没有死亡 且不是NPC 且不是怪物NPC 且不是玩家 AActor.Name := '我们都是地球怪'; //将怪物改名 except end; end; finally AList.Free; //释放列表 end; end; end. ```