``` unit Q2; interface uses Classes, SysUtils; procedure Main(Npc: TNormNpc; Player: TPlayObject; Args: TArgs); implementation procedure Main(Npc: TNormNpc; Player: TPlayObject; Args: TArgs); var ACount: Integer; begin ACount := Player.Map.GetMonCountInRange(Player.MapX, Player.MapY, 3, '白野猪'); //取得玩家当前坐标3格范围内的全部白野猪数量 ACount := Player.Map.GetMonCountInRange(Player.MapX, Player.MapY, 3); //取得玩家当前坐标3格范围内的全部怪物数量 end; end. ```