Makeamidgets Battle Warning script:
This script will put a sindow over your head that will have an encounter bar in it.  The size depends on the encounter rate and when the bar gets to the very end you will be attacked by monsters.  First go to 'Scene_Map' and add this under the 'main' command:
unless $game_system.encounter_disabled
@encounter = Encounter.new(0,0,($game_map.encounter_step + 30))
@encounter.x = ($game_player.real_x - $game_map.display_x) / 4 - 19
@encounter.y = ($game_player.real_y - $game_map.display_y) / 4 - 60
end
Now, make a new class above 'Main' and call it Encounter Bar and put this into it:
#=================================================
# The amazing Battle Warning thing by makeamidget
#=================================================

class Encounter < Window_Base
def initialize(x=0,y=0,width=200,height=45)
if width > 640
   width = 640
end 
super(x, y, width, height)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $defaultfonttype  # "Help" window font
self.contents.font.size = $defaultfontsize   
self.opacity = 0#change if you want to see the box
refresh
end

def refresh
self.contents.clear
draw_encounter(0,0)
end

def draw_encounter( x=200, y=200, width = $game_map.encounter_step, height=20)
self.contents.font.color = normal_color
self.contents.font.size = 17
self.contents.fill_rect(x-1, y+1, width+2,11, Color.new(0, 0, 0, 255))
w = width * $game_player.encounter_count / $game_map.encounter_step
self.contents.fill_rect(x, y+2, w,1, Color.new(0, 0, 100,255))
self.contents.fill_rect(x, y+3, w,1, Color.new(4, 4, 106, 255))
self.contents.fill_rect(x, y+4, w,1, Color.new(8, 8, 112, 255))
self.contents.fill_rect(x, y+5, w,1, Color.new(12, 12, 118, 255))
self.contents.fill_rect(x, y+6, w,1, Color.new(16, 16, 124, 255))
self.contents.fill_rect(x, y+7, w,1, Color.new(20, 20, 130, 255))
self.contents.fill_rect(x, y+8, w,1, Color.new(24, 24, 136, 255))
self.contents.fill_rect(x, y+9, w,1, Color.new(28, 28, 142, 255))
self.contents.fill_rect(x, y+10, w,1, Color.new(32, 32, 148, 255))
end
end
Hosted by www.Geocities.ws

1