A example would be from Cthulu Saves the world (I have provided the pic)

#===============================================================================# Script: Map Encounter Limit# Author: Selchar#-------------------------------------------------------------------------------=beginThis script allows you to limit the number of random encounters you can... wellencounter!#-------------------------------------------------------------------------------# Map Note Tag#-------------------------------------------------------------------------------<encounter limit: x> -Where x is the limit for that particular map.<encounter refresh> -Allows the maps encounters to refresh when you leave/re-enter it.#-------------------------------------------------------------------------------# Scriptcall#-------------------------------------------------------------------------------$game_map.encounter_limit_refresh -Manually refreshes the encounters on the current map, even when the notetag <encounter refresh> isn't used for the map.=endmodule Selchar module Encounter_Limit #The default limit for all maps, keep under 1000 so that it can be displayed #with the default Menu Display Default = 999 Menu_Display = "Foes: " endend$imported = {} if $imported.nil?$imported[:Sel_Encounter_Limit] = trueclass RPG::Map def encounter_limit return $1.to_i if note =~ /<encounter[ -_?]limit:\s*(.*)>/i return Selchar::Encounter_Limit::Default end def encounter_refresh return true if note =~ /<encounter[ -_?]refresh>/i endendclass Game_System attr_accessor :map_encounter_limits alias :map_encounter_limits_init :initialize def initialize map_encounter_limits_init @map_encounter_limits = {} endendclass Game_Map attr_reader :map_id alias :encounter_limit_setup :setup def setup(map_id) encounter_limit_setup(map_id) setup_encounter_limit encounter_limit_refresh if @map.encounter_refresh end def encounter_limit_refresh $game_system.map_encounter_limits[map_id] = encounter_limit_max end def setup_encounter_limit $game_system.map_encounter_limits[map_id] = encounter_limit_max if $game_system.map_encounter_limits[map_id].nil? end def encounter_limit_max @map.encounter_limit endendclass Scene_Map < Scene_Base #Overwrite since alias won't work in this case def update_encounter return if $game_system.map_encounter_limits[$game_map.map_id] == 0 if $game_player.encounter $game_system.map_encounter_limits[$game_map.map_id] -= 1 SceneManager.call(Scene_Battle) end endend#===============================================================================# Menu Display#===============================================================================class Window_Encounter_Count < Window_Base def initialize super(0, 0, window_width, fitting_height(1)) refresh end def window_width return 160 end def refresh contents.clear draw_encounter_count end def draw_encounter_count text = Selchar::Encounter_Limit::Menu_Display text += "#{$game_system.map_encounter_limits[$game_map.map_id]}/#{$game_map.encounter_limit_max}" cx = text_size(text).width x =window_width-cx-16 draw_text(x, 0, cx, line_height, text) end def open refresh super endendclass Scene_Menu < Scene_MenuBase alias :start_encounter_count :start def start start_encounter_count create_encounter_window end def create_encounter_window @encounter_count_window = Window_Encounter_Count.new @encounter_count_window.x = 0 @encounter_count_window.y = @gold_window.y - @encounter_count_window.height endend#===============================================================================# Compatibility#===============================================================================if $imported[:Sel_Menu_Battle] class Window_MenuCommand < Window_Command alias :encounter_limit_enable :menu_battle_enable def menu_battle_enable return false if $game_system.map_encounter_limits[$game_map.map_id] == 0 return encounter_limit_enable end endend#===============================================================================# End of File#===============================================================================