Save-Point

Full Version: Save-Point
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Board Message
Sorry, you do not have permission to access this resource.
Save-Point - More than 3 slots in Moghunter's Menu Systems: Scene File Ayumi

Save-Point

Full Version: More than 3 slots in Moghunter's Menu Systems: Scene File Ayumi
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi folks, I want to use MOG Hunders Menu Systems, Scene File for the XP
But it does allow you to create only 3 slots, but I want to use more than 3 slots, like 9 or something like that.
Is there anyone willing to help me by editing the script which can be found here?

http://save-point.org/thread-2523-post-4...l#pid42618
CHANGED FROM ORIGINAL POST.... Clunkiness fixed. This should do the trick by posting below Ayumi and following the inststructions. Adaptions to Title and Load screens may require some direct edits.

Code:
#==============================================================================
# ** MOG Scene File Ayumi / RPG Advocate Unlimited Saves Patch
#  Version 1.2
#  by DerVVulfman
#------------------------------------------------------------------------------
#
#  Paste below Scene File Ayumi and set how many saves you want to be available
#  by setting the SAVEFILE_MAX.
#
#------------------------------------------------------------------------------
#
#  Does not effectively change the manner the title system detects save files.
#  As such, if the player saves a game in 'slot' 5, it will not highlight the
#  CONTINUE option.  Changes must be made to make it detect additional saves.
#  
#  **  Changes to enable the Continue option will be listed below.
#
#  
#  Save game menu highlights the very 1st savegame slot by default to prevent
#  errors that result from not reading save games beyond 3 within either the
#  load or title systems.  
#
#  **  Changes to permit savegames beyond slot 3 will be listed below
#
#------------------------------------------------------------------------------
#
#  CHANGES:
#
#  This handles the two main changes you may make to the default scripts.
#  Replacement scripts for these will not be available as Title Screen or
#  optional load scripts may be added by the end-user which could conflict.
#
#       -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
#
#  To enable the CONTINUE menu option in the title screen, go into Scene_Title
#  and search for line #48.  The entire block of code should read thus:
#
#    for i in 0..3
#      if FileTest.exist?("Save#{i+1}.rxdata")
#        @continue_enabled = true
#      end
#    end
#
#  Line 48 is the statement of 'for i in 0..3' which limits the system's file
#  test routine to just four files to detect.  Change that line to this:
#
#    for i in 0..SAVEFILE_MAX - 1
#  
#  With that, it will now cycle through all savefiles possible in the system.
#
#       -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
#
#  To permit the system to access the last save-file, go into the Scene_Load
#  class and search for line #17.  The start of that block of code should be:
#
#    for i in 0..3
#      filename = make_filename(i)
#      if FileTest.exist?(filename)
#        file = File.open(filename, "r")
#
#  Line 48 is the statement of 'for i in 0..3' which limits the system's file
#  test routine to just four files to detect.  Change that line to this:
#
#    for i in 0..SAVEFILE_MAX - 1
#  
#  But you are NOT done yet.  This script blocks the use of the last file
#  method and has to be changed.
#
#  Go to line #171 of this script and replace the line of:
#    @file_index = 0
#  with the line of:
#    @file_index = $game_temp.last_file_index
#  And that should be it.
#
#  With that, the Scene_Load system will cycle through your files to retrieve
#  the last save, and this script will accept the actual last saved game as
#  the one to highlight.
#  
#
#==============================================================================



SAVEFILE_MAX = 98



#==============================================================================
# ** Window_SaveFile
#------------------------------------------------------------------------------
#  This window displays save files on the save and load screens.
#==============================================================================

class Window_SaveFile < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     file_index : save file index (0-3)
  #     filename   : file name
  #--------------------------------------------------------------------------  
  def initialize(file_index, filename, position)
    y = 40 + position * 100
    super(0, y, 640, 240)
    self.contents = Bitmap.new(width - 32, height - 32)  
    self.opacity  = 0
    @file_index   = file_index
    @filename     = "Save#{@file_index + 1}.rxdata"
    @time_stamp   = Time.at(0)
    @file_exist   = FileTest.exist?(@filename)
    if @file_exist
      file = File.open(@filename, "r")
      @time_stamp     = file.mtime
      @characters     = Marshal.load(file)
      @frame_count    = Marshal.load(file)
      @game_system    = Marshal.load(file)
      @game_switches  = Marshal.load(file)
      @game_variables = Marshal.load(file)
      @game_self_switches = Marshal.load(file)
      @game_screen    = Marshal.load(file)
      @game_actors    = Marshal.load(file)
      @game_party     = Marshal.load(file)
      @game_troop     = Marshal.load(file)
      @game_map       = Marshal.load(file)
      @total_sec      = @frame_count / Graphics.frame_rate
      file.close
    end
    @wiref = 0
    refresh
    @selected = false
  end  
end




#==============================================================================
# ** Scene_File
#------------------------------------------------------------------------------
#  This is a superclass for the save screen and load screen.
#==============================================================================

class Scene_File
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------  
  def main
    if $mog_scene_filesave_flag != 1
      @mnback = Plane.new
      @mnback.bitmap = RPG::Cache.picture(MOG::FILE_BACKGROUND)
      @mnback.z = 1      
    else
      if MOG::FILE_FX == 0
        @mnback = Plane.new
        @mnback.bitmap = RPG::Cache.picture(MOG::FILE_BACKGROUND)
        @mnback.z = 1
      elsif MOG::FILE_FX == 1
        @mnback = Plane.new
        @mnback.bitmap = RPG::Cache.picture(MOG::FILE_BACKGROUND)
        @mnback.z = 1
      else
        @spriteset = Spriteset_Map.new
      end
    end
    @mnlay = Sprite.new
    @mnlay.bitmap = RPG::Cache.picture(MOG::FILE_LAYOUT)
    @mnlay.z = 2
    @help_window = Window_Help.new
    @help_window.set_text(@help_text)
    @help_window.opacity  = 0
    @savefile_windows     = []
    @cursor_displace      = 0
    @file_index = 0
    # Get save-file range start and Cursur Deplacement
    if @file_index == SAVEFILE_MAX-1
      searchstart = @file_index-2
      @cursor_displace = 2
    elsif @file_index == SAVEFILE_MAX-2
      searchstart = @file_index-1
      @cursor_displace = 1
    else
      searchstart = @file_index
      @cursor_displace = 0
    end
    for i in searchstart..searchstart + 2
      @savefile_windows.push(Window_SaveFile.new(i, make_filename(i), i))
    end
    @savefile_windows[0]
    @savefile_windows[@cursor_displace].selected = true
    @savefile_windows[0].y  = 40    
    @savefile_windows[1].y  = 140
    @savefile_windows[2].y  = 240    
    @win_move_time          = 0
    @win_move               = 0
    @win_dire               = 0
    @win_opac               = 255
    @win1_y                 = 0
    @win2_y                 = 0
    @win3_y                 = 0
    unless MOG::FILE_FX == 2
      Graphics.transition(MOG::FILE_TRAN_TIME, "Graphics/Transitions/" +
        MOG::FILE_TRAN_TYPE)
    else
      Graphics.transition
    end
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    for i in 0..50
      @mnback.ox += 1 if MOG::FILE_FX == 0
      @savefile_windows[0].x += 10    
      @savefile_windows[1].x -= 10
      @savefile_windows[2].x += 10
      for i in @savefile_windows
        i.contents_opacity -= 5
      end  
      Graphics.update  
    end      
    Graphics.freeze
    @help_window.dispose
    @mnback.dispose if MOG::FILE_FX == 0
    @mnback.dispose if MOG::FILE_FX == 1
    @mnback.dispose if MOG::FILE_FX == 2 && $mog_scene_filesave_flag != 1
    @spriteset.dispose if MOG::FILE_FX == 2 && $mog_scene_filesave_flag == 1
    $mog_scene_filesave_flag = 0
    @mnlay.dispose
    for i in @savefile_windows ; i.dispose ; end
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------    
  def update
    @mnback.ox += 1 if MOG::FILE_FX == 0
    if MOG::FILE_OPACITY_FX
      @win_opac += 3
      @win_opac = 150 if @win_opac > 254
    else
      @win_opac = 255
    end
    @win_move_time += 1    
    if @win_move_time > 60
      @win_dire += 1
      @win_move_time = 0    
    end
    @win_dire = 0 if @win_dire > 1
    if @win_dire == 0
       @win_move += 1
    else  
       @win_move -= 1
    end        
    # Update File Windows
    update_window_z
    update_moving_window if MOG::FILE_MOVE_FX
    update_window_opacity
    @help_window.update    
    for i in @savefile_windows ; i.update ; end
    # If C button was pressed
    if Input.trigger?(Input::C)
      # Call method: on_decision (defined by the subclasses)
      on_decision(make_filename(@file_index))
      $game_temp.last_file_index = @file_index
      return
    end
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Call method: on_cancel (defined by the subclasses)
      on_cancel
      return
    end
    # If the down directional button was pressed
    if Input.repeat?(Input::DOWN)
      # If the down directional button pressed down is not a repeat,
      # or cursor position is more than the max size
      if Input.trigger?(Input::DOWN) or @file_index < SAVEFILE_MAX - 1
        if @file_index == SAVEFILE_MAX - 1
          # Play buzzer SE
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        @cursor_displace += 1
        if @cursor_displace == 3
          @cursor_displace = 2
          for i in @savefile_windows
            i.dispose
          end
          @savefile_windows = []
          for i in 0..2
            f = i - 1 + @file_index
            name = make_filename(f)
            @savefile_windows.push(Window_SaveFile.new(f, name, i))
            @savefile_windows[i].selected = false
          end
        end
        # Play cursor SE
        $game_system.se_play($data_system.cursor_se)
        # Move cursor down
        @file_index = (@file_index + 1)
        if @file_index == SAVEFILE_MAX
          @file_index = SAVEFILE_MAX - 1
        end
        for i in 0..2
          @savefile_windows[i].selected = false
        end
        @savefile_windows[@cursor_displace].selected = true
        return
      end
    end
    # If the up directional button was pressed    
    if Input.repeat?(Input::UP)
      # If the up directional button pressed down is not a repeat、
      # or cursor position is more in back than 0      
      if Input.trigger?(Input::UP) or @file_index > 0
        if @file_index == 0
          # Play buzzer SE
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        @cursor_displace -= 1
        if @cursor_displace == -1
          @cursor_displace = 0
          for i in @savefile_windows
            i.dispose
          end
          @savefile_windows = []
          for i in 0..2
            f = i - 1 + @file_index
            name = make_filename(f)
            @savefile_windows.push(Window_SaveFile.new(f, name, i))
            @savefile_windows[i].selected = false
          end
        end
        # Play cursor SE
        $game_system.se_play($data_system.cursor_se)
        # Move cursor up
        @file_index = (@file_index - 1)
        if @file_index == -1
          @file_index = 0
        end
        for i in 0..2
          @savefile_windows[i].selected = false
        end
        @savefile_windows[@cursor_displace].selected = true
        return
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (Reposition File Window)
  #--------------------------------------------------------------------------
  def update_window_z
    if @cursor_displace == 0
      @savefile_windows[0].z  = 2  
      @savefile_windows[1].z  = 1
      @savefile_windows[2].z  = 0        
    elsif @cursor_displace == 1
      @savefile_windows[0].z  = 1  
      @savefile_windows[1].z  = 2
      @savefile_windows[2].z  = 1        
    else
      @savefile_windows[0].z  = 0  
      @savefile_windows[1].z  = 1
      @savefile_windows[2].z  = 2        
    end      
  end  
  #--------------------------------------------------------------------------
  # * Frame Update (Moving File Window)
  #--------------------------------------------------------------------------
  def update_moving_window
    if @cursor_displace == 0
      @savefile_windows[0].x  = @win_move
      @savefile_windows[1].x  = 0
      @savefile_windows[2].x  = 0    
    elsif @cursor_displace == 1
      @savefile_windows[0].x  = 0
      @savefile_windows[1].x  = @win_move
      @savefile_windows[2].x  = 0    
    else
      @savefile_windows[0].x  = 0
      @savefile_windows[1].x  = 0
      @savefile_windows[2].x  = @win_move  
    end      
  end
  #--------------------------------------------------------------------------
  # * Frame Update (File Window Opacity)
  #--------------------------------------------------------------------------  
  def update_window_opacity
    if @cursor_displace == 0
      @savefile_windows[0].contents_opacity   = @win_opac
      @savefile_windows[1].contents_opacity   = 130
      @savefile_windows[2].contents_opacity   = 130    
    elsif @cursor_displace == 1
      @savefile_windows[0].contents_opacity   = 130
      @savefile_windows[1].contents_opacity   = @win_opac
      @savefile_windows[2].contents_opacity   = 130
    else
      @savefile_windows[0].contents_opacity   = 130
      @savefile_windows[1].contents_opacity   = 130
      @savefile_windows[2].contents_opacity   = @win_opac    
    end    
  end
end
Thanks for the fast reply, it works, yes, you are right about the issues you mentioned? I hope they will get fixed soon.
The problem I have is also that the load system doesnt check for the latest saved file and starts from 1 again and again. I wish it would load from the last file I saved.
Also, when you save on file 4-99 and load them and go up and down the select system doesnt seem to update. Or is it just me noticing it?
I mean sometimes under fille 3+ sometimes I have to press two times up so that a new file appears.

I hope thats not the final solution.

Thank you really much at this point!
The 4-99 is part of the klunkiness. Oh, it's still there, and it seems to have a 2-file delay when scrolling up. *shrugs*

Yeah, the 'last_load' is set to the 1st file. It's part of RPG Advocate's original code. Still trying to work out how to make it load the latest save as it was his way to prevent a 'selected file' error.
I changed the code post above with a NEW VERSION!!!!!!

The revised script includes instructions how to make your title screen show the CONTINUE menu option properly, and how to have the last save-game properly highlighted. I did not include rewrites to the Title or Load screens themselves (other than the instructions) in case you are using other scripts that change load options or beautifies your title screen.
Thanks for the fast reply.
I've a question.
Which line should I change into @file_index = $game_temp.last_file_index  because you said change line 22 in the MOG Scene File Ayumi / RPG Advocate Unli
but there isnt a line 22 in the script. Its just a # code. ? 


I changed Scene_title line 48
  for i in 0..3
      if FileTest.exist?("Save#{i+1}.rxdata")
        @continue_enabled = true
      end
    end

to 
for i in 0..SAVEFILE_MAX - 1

      if FileTest.exist?("Save#{i+1}.rxdata")
        @continue_enabled = true
      end
    end

then I went to
Scene_load and changed line 17

for i in 0..3

      filename = make_filename(i)
      if FileTest.exist?(filename)
        file = File.open(filename, "r")

to

for i in 0..SAVEFILE_MAX - 1

      filename = make_filename(i)
      if FileTest.exist?(filename)
        file = File.open(filename, "r")


On MOG Scene File Ayumi / RPG Advocate Unli
I changed line 329
@file_index = 0
to
@file_index = $game_temp.last_file_index 


But whenever I try to continue I get en error on line 176. it says undefined method for selected.
Dammit. Dammit. Dammit. Dammit. Dammit!

Yeah, version 1.2 is now up. And I got the wrong line number listed in the script. Change line 171 in the patch, not line 22 (that was a placeholder).

The new version accounts for a revised set of savefiles I forgot to account for.
Thanks. Hm. circling works fine now. When I save on file 16 or any other files, it still starts on file 1 when loading and not on the latest file.

It only starts at the latest file when I want to save. 


BIG edit: I know where my problem lies. Your script works fine, its super duper good. my project has some complications.  I've tried your new script with a completly new project and it worked smoothly! but as I tried to implement your script/system into my very project the loading did not select the latest saved file.
So what I did was the following, I've removed all the scripts I had after another to see where the problem is.
It looks like my problem is in the following two scripts:
One of them is defining the load class new. 



Quote:#===============================================================================

# ** Module UCoders - Contains Methods used by Unknown Coders' scripts
#
#    Visit Us:
#    www.unknowncoders.com
#
#-------------------------------------------------------------------------------
# Authors   Mr.Mo "Muhammet Sivri" | Trebor777
# Version   1.2
# Date      11/24/07 (m/d/y)
#===============================================================================
module UCoders
  #--------------------------------------------------------------------------
  # * Constants
  #--------------------------------------------------------------------------
  Object = {}
  Scripts = {}
  #--------------------------------------------------------------------------
  # * Include Script
  #--------------------------------------------------------------------------
  def UCoders.include(name,args) 
    Scripts[name] = args
  end
  #--------------------------------------------------------------------------
  # * Include Script
  #--------------------------------------------------------------------------
  def UCoders.has?(name)
    return !Scripts[name].nil?
  end
  #--------------------------------------------------------------------------
  # * Returns a list of parameters from an event's comments
  #--------------------------------------------------------------------------
  def UCoders.event_comment_input(*args)
    parameters = []; list = *args[0].list; lines = *args[1]; trigger = *args[2]
    return nil if list.nil? || !list.is_a?(Array)
    list.each { |o|
      next if o.code != 108 || !(o.parameters[0].to_s).include?(trigger)
      start = list.index(o)
      finish = start + lines
      for id in start...finish
        next if !list[id];  parameters.push(list[id].parameters[0])
      end
      return parameters 
    }
    return nil
  end
  #--------------------------------------------------------------------------
  # * Returns the event comment with the needed key
  #--------------------------------------------------------------------------
  def UCoders.event_comment(*args)
    parameters = []; list = *args[0].list; trigger = *args[1]
    return nil if list.nil? || !list.is_a?(Array)
    list.each { |o|  next if o.code != 108 || !(o.parameters[0].to_s).include?(trigger)
      parameters.push(o.parameters)
    }
    return parameters unless parameters.empty?
    return nil
  end
  #--------------------------------------------------------------------------
  # * Log Error - Records and Saves all errors.
  #--------------------------------------------------------------------------
  def UCoders.log_error
    # Record Error 
    k = 0
    time = Time.now.strftime("%a %d %b %Y, %X")
    log = File.open("ErrorLog.rxdata","a+")
    log.write("[ #{time} ]\n")
    # Write Message and Type
    log.write("'#{$!.message}' Type #{$!.class}\n")
    for i in 0..$!.backtrace.size
      e = $!.backtrace[i]
      /Section(.*):(.*):in (.*)/.match(e)
      space = " "*(i*2)
      log.write(space+"  <>Script '#{$RGSS_SCRIPTS[$1.to_i][1]}' | Line #{$2} | Method #{$3}\n")
      # Don't list more then 4 backtraces to make it simpler, can be changed! 
      break if i >= 4
      next if k == 1
      # Get the first trace
      script = "#{$RGSS_SCRIPTS[$1.to_i][1]}"
      line = $2
      method = $3
      k = 1
    end
    log.write("\n")
    log.close
    # Make some sense
    if $DEBUG
      print "#{$!.message} \nScript '#{script}' \nLine '#{line}' \nMethod '#{method}' \nType '#{$!.class}'"
    else
      print "Unexpected Error! The ErrorLog is in folder:\n #{File.expand_path('.')}"
    end
  end
  #--------------------------------------------------------------------------
  # * Checks the object range
  #--------------------------------------------------------------------------
  def UCoders.in_screen?(object)
    scene_x = $game_map.display_x - 256
    scene_y = $game_map.display_y - 256
    scene_width = $game_map.display_x + 2816
    scene_height = $game_map.display_y + 2176
    return (object.real_x.between?(scene_x, scene_width) and object.real_y.between?(scene_y,scene_height))
  end
  #--------------------------------------------------------------------------
  # * Get Events In (range of element)
  #--------------------------------------------------------------------------
  def UCoders.get_events_in(range,element)
    objects = []
    $game_map.events.each_value { |e| objects.push(e) if UCoders.in_range?(element, e, range) }
    return objects
  end
  #--------------------------------------------------------------------------
  # * Get Range(Element, Object)
  #--------------------------------------------------------------------------
  def UCoders.get_range(element, object)
    x = (element.x - object.x)**2
    y = (element.y - object.y)**2
    r = x + y
    return Math.sqrt®.to_i
  end
  #--------------------------------------------------------------------------
  # * In Range?(Element, Object, Range)
  #--------------------------------------------------------------------------
  def UCoders.in_range?(element, object, range)
    x = (element.x - object.x)**2
    y = (element.y - object.y)**2
    return x + y <= (range * range)
  end
  #--------------------------------------------------------------------------
  # * In Direction?(Element, Object)
  #--------------------------------------------------------------------------
  def UCoders.in_direction?(event,object)
    return true if event.direction == 2 && object.y >= event.y && object.x == event.x
    return true if event.direction == 4 && object.x <= event.x && object.y == event.y
    return true if event.direction == 6 && object.x >= event.x && object.y == event.y
    return true if event.direction == 8 && object.y <= event.y && object.x == event.x
    return false
  end
end
#==============================================================================
# ** Multi-Dimensional Array
#    Creates a MultiD array. When value not specified, returns nil. 
#==============================================================================
class MultiArray
  #--------------------------------------------------------------------------
  # * Initialize
  #   d : number of dimensions(x,y,z) 
  #--------------------------------------------------------------------------
   def initialize(*dimensions)
      @dimensions=Array.new(dimensions.size)
      @factors=Array.new(dimensions.size)
      product=1
      i=dimensions.size-1
      while i >= 0
         @dimensions[i]=dimensions[i]
         @factors[i]=product
         product*=@dimensions[i]
         i-=1
      end
      @data=Array.new(product)
   end
  #--------------------------------------------------------------------------
  # * X Size
  #--------------------------------------------------------------------------
   def xsize
      return @dimensions[0]
   end
  #--------------------------------------------------------------------------
  # * Y Size
  #--------------------------------------------------------------------------
   def ysize
      return 1 if @dimensions.size<2
      return @dimensions[1]
   end
  #--------------------------------------------------------------------------
  # * Z Size
  #--------------------------------------------------------------------------
   def zsize
      return 1 if @dimensions.size<3
      return @dimensions[2]
   end
  #--------------------------------------------------------------------------
  # * NSize
  #--------------------------------------------------------------------------
   def nsize(n)
      raise IndexError if @dimensions.size<n
      return @dimensions[n-1]
   end
  #--------------------------------------------------------------------------
  # * Get ID
  #--------------------------------------------------------------------------
   def get_id(indices)
      raise IndexError if indices.size != @dimensions.size
      offset=0
      for i in 0 ... @dimensions.size
         raise IndexError if indices[i] < 0 or indices[i]>=@dimensions[i]
         offset += @factors[i]*indices[i]
      end
      return offset
   end
  #--------------------------------------------------------------------------
  # * Get []
  #--------------------------------------------------------------------------
   def [](*indices)
      @data[self.get_id(indices)]
   end
  #--------------------------------------------------------------------------
  # * Set []=
  #--------------------------------------------------------------------------
   def []=(*indicesAndValue)
      value = indicesAndValue.pop
      @data[self.get_id(indicesAndValue)]=value
   end
end
#==============================================================================
# ** 2-Dimensional Array
#    Creates a 2D array. When value not specified, returns 0. 
#==============================================================================
class Array2D
  #--------------------------------------------------------------------------
  # * Initialize
  #--------------------------------------------------------------------------
  def initialize
    # Create Data Array
    @data = {}
  end
  #--------------------------------------------------------------------------
  # * Get
  #--------------------------------------------------------------------------
  def [](i,j)
    @data[i] = {} if @data[i].nil?
    @data[i][j] = 0 if @data[i][j].nil?
    return @data[i][j]
  end
  #--------------------------------------------------------------------------
  # * Set
  #--------------------------------------------------------------------------
  def []=(i,j,v)
    @data[i] = {} if @data[i].nil?
    @data[i][j] = v
    return v
  end
end
#==============================================================================
# ** RPG::Event::Page::Condition
#==============================================================================

class RPG::Event::Page::Condition
  #--------------------------------------------------------------------------
  # * Conditions Met?
  #--------------------------------------------------------------------------
  def conditions_met?(map_id, event_id)
    # Switch 1 condition confirmation
    if @switch1_valid && $game_switches[@switch1_id] == false
      return false
    end
    # Switch 2 condition confirmation
    if @switch2_valid && $game_switches[@switch2_id] == false
      return false
    end
    # Variable condition confirmation
    if @variable_valid && $game_variables[@variable_id] < @variable_value
      return false
    end
    # Self switch condition confirmation
    if @self_switch_valid
      key = [map_id, event_id, @self_switch_ch]
      if $game_self_switches[key] == false
        return false
      end
    end
    # Returns True
    return true
  end
end

#==============================================================================
# ** Game_Event
#==============================================================================
class Game_Event < Game_Character
  attr_reader :real_x, :real_y, :event
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    new_page = refresh_new_page               # Get New Page
    return if refresh_page_change?(new_page)  # Return if No Page Change
    clear_starting                            # Clear starting flag
    return if refresh_page_reset?             # Return if Nil Page Reset
    refresh_set_page                          # Set page variables
    refresh_check_process                     # Check parallel processing
    check_event_trigger_auto                  # Auto event start determinant
  end
  #--------------------------------------------------------------------------
  # * Refresh : New Page
  #--------------------------------------------------------------------------
  def refresh_new_page
    return @erased ? nil : refresh_trigger_conditions
  end
  #--------------------------------------------------------------------------
  # * Refresh Trigger Conditions
  #--------------------------------------------------------------------------
  def refresh_trigger_conditions
    # Check in order of large event pages
    for page in @event.pages.reverse
      # Skips If Page Conditions Not Met
      next unless page.condition.conditions_met?(@map_id, @id)
      # Set local variable: new_page
      new_page = page
      # Remove loop
      break
    end
    # Return new page
    return new_page
  end
  #--------------------------------------------------------------------------
  # * Refresh : Page Change
  #--------------------------------------------------------------------------
  def refresh_page_change?(new_page)
    # If event page is the same as last time
    if new_page == @page
      # End method
      return true
    end
    # Set @page as current event page
    @page = new_page
    return false
  end
  #--------------------------------------------------------------------------
  # * Refresh : Page Reset
  #--------------------------------------------------------------------------
  def refresh_page_reset?
    # If no page fulfills conditions
    if @page == nil
      # Reset values
      refresh_reset
      # End method
      return true
    end
    return false
  end
  #--------------------------------------------------------------------------
  # * Refresh Reset
  #--------------------------------------------------------------------------
  def refresh_reset
    # Set each instance variable
    @tile_id = 0
    @character_name = ""
    @character_hue = 0
    @move_type = 0
    @through = true
    @trigger = nil
    @list = nil
    @interpreter = nil
  end
  #--------------------------------------------------------------------------
  # * Refresh Set Page
  #--------------------------------------------------------------------------
  def refresh_set_page
    # Set each instance variable
    @tile_id = @page.graphic.tile_id
    @character_name = @page.graphic.character_name
    @character_hue = @page.graphic.character_hue
    if @original_direction != @page.graphic.direction
      @direction = @page.graphic.direction
      @original_direction = @direction
      @prelock_direction = 0
    end
    if @original_pattern != @page.graphic.pattern
      @pattern = @page.graphic.pattern
      @original_pattern = @pattern
    end
    @opacity = @page.graphic.opacity
    @blend_type = @page.graphic.blend_type
    @move_type = @page.move_type
    @move_speed = @page.move_speed
    @move_frequency = @page.move_frequency
    @move_route = @page.move_route
    @move_route_index = 0
    @move_route_forcing = false
    @walk_anime = @page.walk_anime
    @step_anime = @page.step_anime
    @direction_fix = @page.direction_fix
    @through = @page.through
    @always_on_top = @page.always_on_top
    @trigger = @page.trigger
    @list = @page.list
    @interpreter = nil
  end
  #--------------------------------------------------------------------------
  # * Refresh Check Process
  #--------------------------------------------------------------------------
  def refresh_check_process
    # If trigger is [parallel process]
    if @trigger == 4
      # Create parallel process interpreter
      @interpreter = Interpreter.new
    end
  end
end

class Interpreter
  #--------------------------------------------------------------------------
  # * Script
  #--------------------------------------------------------------------------
  def command_355
    # Set first line to script
    script = @list[@index].parameters[0] + "\n"
    # Loop
    loop do
      # If next event command is second line of script || after
      if @list[@index+1].code == 655
        # Add second line || after to script
        script += @list[@index+1].parameters[0] + "\n"
      # If event command is not second line || after
      else
        # Abort loop
        break
      end
      # Advance index
      @index += 1
    end
    # Evaluation
    result = eval(script)
    # Continue
    return true
  end
  #--------------------------------------------------------------------------
  # * In Range?(Element, Object, Range)
  #--------------------------------------------------------------------------
  def in_range?(element, object, range)
    x = (element.x - object.x)**2
    y = (element.y - object.y)**2
    return x + y <= (range * range)
  end
end

#==============================================================================
# ** Scene_Load
#------------------------------------------------------------------------------
#  This class performs load screen processing.
#==============================================================================

class Scene_Load < Scene_File
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    # Remake temporary object
    $game_temp = Game_Temp.new
    # Timestamp selects new file
    $game_temp.last_file_index = 0
    latest_time = Time.at(0)
    for i in 0..3
      filename = make_filename(i)
      if FileTest.exist?(filename)
        file = File.open(filename, "r")
        if file.mtime > latest_time
          latest_time = file.mtime
          $game_temp.last_file_index = i
        end
        file.close
      end
    end
    super("Which file would you like to load?")
  end
  #--------------------------------------------------------------------------
  # * Decision Processing
  #--------------------------------------------------------------------------
  def on_decision(filename)
    # If file doesn't exist
    unless FileTest.exist?(filename)
      # Play buzzer SE
      $game_system.se_play($data_system.buzzer_se)
      return
    end
    # Play load SE
    $game_system.se_play($data_system.load_se)
    # Read save data
    file = File.open(filename, "rb")
    read_save_data(file)
    file.close
    # Restore BGM and BGS
    $game_system.bgm_play($game_system.playing_bgm)
    $game_system.bgs_play($game_system.playing_bgs)
    # Update map (run parallel process event)
    $game_map.update
    # Switch to map screen
    $scene = Scene_Map.new
  end
  #--------------------------------------------------------------------------
  # * Cancel Processing
  #--------------------------------------------------------------------------
  def on_cancel
    # Play cancel SE
    $game_system.se_play($data_system.cancel_se)
    # Switch to title screen
    $scene = Scene_Title.new
  end
  #--------------------------------------------------------------------------
  # * Read Save Data
  #     file : file object for reading (opened)
  #--------------------------------------------------------------------------
  def read_save_data(file)
    read_characters(file)
    read_frame(file)
    read_data(file)
    read_edit
    read_refresh
  end
  #--------------------------------------------------------------------------
  # * Read Character Data
  #--------------------------------------------------------------------------
  def read_characters(file)
    # Read character data for drawing save file
    characters = Marshal.load(file)
  end
  #--------------------------------------------------------------------------
  # * Read Frame Count
  #--------------------------------------------------------------------------
  def read_frame(file)
    # Read frame count for measuring play time
    Graphics.frame_count = Marshal.load(file)
  end
  #--------------------------------------------------------------------------
  # * Read Data
  #--------------------------------------------------------------------------
  def read_data(file)
    # Read each type of game object
    $game_system        = Marshal.load(file)
    $game_switches      = Marshal.load(file)
    $game_variables     = Marshal.load(file)
    $game_self_switches = Marshal.load(file)
    $game_screen        = Marshal.load(file)
    $game_actors        = Marshal.load(file)
    $game_party         = Marshal.load(file)
    $game_troop         = Marshal.load(file)
    $game_map           = Marshal.load(file)
    $game_player        = Marshal.load(file)
  end
  #--------------------------------------------------------------------------
  # * Read Edit
  #--------------------------------------------------------------------------
  def read_edit
    # If magic number is different from when saving
    # (if editing was added with editor)
    if $game_system.magic_number != $data_system.magic_number
      # Load map
      $game_map.setup($game_map.map_id)
      $game_player.center($game_player.x, $game_player.y)
    end
  end
  #--------------------------------------------------------------------------
  # * Refresh Game Party
  #--------------------------------------------------------------------------
  def read_refresh
    # Refresh party members
    $game_party.refresh
  end
end

#==============================================================================
# ** Game_Character (part 1)
#------------------------------------------------------------------------------
#  This class deals with characters. It's used as a superclass for the
#  Game_Player && Game_Event classes.
#==============================================================================
class Game_Character
  #--------------------------------------------------------------------------
  # * Follow_Path
  #--------------------------------------------------------------------------
  def follow_path(x,y,&block)
    node = Node.new(x, y)
    path = A_Star_Pathfinder.new(node, self)
    path.reach_method = block
  end
  #--------------------------------------------------------------------------
  # * Turn Towards B
  #--------------------------------------------------------------------------
  def turn_to(b)
    # Get difference in player coordinates
    sx = @x - b.x
    sy = @y - b.y
    # If coordinates are equal
    if sx == 0 && sy == 0
      return
    end
    # If horizontal distance is longer
    if sx.abs > sy.abs
      # Turn to the right || left towards player
      sx > 0 ? turn_left : turn_right
    # If vertical distance is longer
    else
      # Turn up || down towards player
      sy > 0 ? turn_up : turn_down
    end
  end
  #--------------------------------------------------------------------------
  # * Move toward B
  #--------------------------------------------------------------------------
  def move_towards(b,ran=true)
    return if in_range2?(b,1) || !@a_star_path.nil?
    # Get difference in player coordinates
    sx = @x - b.x
    sy = @y - b.y
    @target = b
    # If coordinates are equal
    return if sx == 0 && sy == 0
    # Get absolute value of difference
    abs_sx = sx.abs
    abs_sy = sy.abs
    # If horizontal && vertical distances are equal
    if abs_sx == abs_sy
      # Increase one of them randomly by 1
      rand(2) == 0 ? abs_sx += 1 : abs_sy += 1
    end
    # If horizontal distance is longer
    if abs_sx > abs_sy
      # Move towards player, prioritize left && right directions
      if sx > 0 
        return move_left if passable?(@x, @y, 4)
      else
        return move_right if passable?(@x, @y, 6)
      end
      if not moving? && sy != 0
        if sy > 0 
          return move_up if passable?(@x, @y, 8)
        else
          return move_down if passable?(@x, @y, 2)
        end
      end
    # If vertical distance is longer
    else
      # Move towards player, prioritize up && down directions
      if sy > 0 
        return move_up if passable?(@x, @y, 8) 
      else 
        return move_down if passable?(@x, @y, 2)
      end
      if not moving? && sx != 0
        if sx > 0 
          return move_left if passable?(@x, @y, 4)
        else
          return move_right if passable?(@x, @y, 6)
        end
      end
    end
=begin
    # Can't find the path, Try pathfidning
    if self.respond_to?(:a_star_path) && @a_star_path.nil?
      # Get X,Y
      x,y=b.x,b.y
      # Follow Path
      nx = x + (passable?(x-1,y,0) ? -1 : passable?(x+1,y,0) ? 1 : 0)
      ny = y + (passable?(x,y-1,0) ? -1 : passable?(x,y+1,0) ? 1 : 0)  
      self.follow_path(nx,ny)
      # Return if Path success
      return if !@a_star_path.nil? && @a_star_path.found
    end
=end
    if ran
      move_random
      turn_to(b)
    end
  end
  #--------------------------------------------------------------------------
  # * Move toward Pos XY
  #--------------------------------------------------------------------------
  def move_towards_pos(x,y,ran=true)
    # Get difference in player coordinates
    sx = @x - x
    sy = @y - y
    # If coordinates are equal
    return if sx == 0 && sy == 0
    # Get absolute value of difference
    abs_sx = sx.abs
    abs_sy = sy.abs
    # If horizontal && vertical distances are equal
    if abs_sx == abs_sy
      # Increase one of them randomly by 1
      rand(2) == 0 ? abs_sx += 1 : abs_sy += 1
    end
    # If horizontal distance is longer
    if abs_sx > abs_sy
      # Move towards player, prioritize left && right directions
      if sx > 0 
        return move_left if passable?(@x, @y, 4)
      else
        return move_right if passable?(@x, @y, 6)
      end
      if not moving? && sy != 0
        if sy > 0 
          return move_up if passable?(@x, @y, 8)
        else
          return move_down if passable?(@x, @y, 2)
        end
      end
    # If vertical distance is longer
    else
      # Move towards player, prioritize up && down directions
      if sy > 0 
        return move_up if passable?(@x, @y, 8) 
      else 
        return move_down if passable?(@x, @y, 2)
      end
      if not moving? && sx != 0
        if sx > 0 
          return move_left if passable?(@x, @y, 4)
        else
          return move_right if passable?(@x, @y, 6)
        end
      end
    end
    if ran
      move_random
    end
  end
  #--------------------------------------------------------------------------
# * Determine if Passable
# x : x-coordinate
# y : y-coordinate
# d : direction (0,2,4,6,8)
# * 0 = Determines if all directions are impassable (for jumping)
#--------------------------------------------------------------------------
def passable?(x, y, d)
# Get new coordinates
new_x = x + (d == 6 ? 1 : d == 4 ? -1 : 0)
new_y = y + (d == 2 ? 1 : d == 8 ? -1 : 0)
return false if !check_map_pass(new_x,x,new_y,y,d)
return true if @through # Ich bin eine neue Zeile, ich repariere diese Methode
return false if !check_event_pass(new_x,new_y,d)
return false if !check_player_pass(new_x,new_y,d)
# passable
return true
end
  #--------------------------------------------------------------------------
  # * Check Map Pass
  #--------------------------------------------------------------------------
  def check_map_pass(new_x,x,new_y,y,d)
    # If coordinates are outside of map
    unless $game_map.valid?(new_x, new_y)
      # impassable
      return false
    end
    # If through is ON
    if @through
      # passable
      return true
    end
    # If unable to leave first move tile in designated direction
    unless $game_map.passable?(x, y, d, self)
      # impassable
      return false
    end
    # If unable to enter move tile in designated direction
    unless $game_map.passable?(new_x, new_y, 10 - d)
      # impassable
      return false
    end
    return true
  end
  #--------------------------------------------------------------------------
  # * Check Event Pass
  #--------------------------------------------------------------------------
  def check_event_pass(new_x,new_y,d)
    return true  if @through
    # Loop all events
    for event in $game_map.events.values
      # If event coordinates are consistent with move destination
      if event.x == new_x and event.y == new_y
        # If through is OFF
        unless event.through
          # If self is event
          if self_condition_player
            # impassable
            return false
          end
          # With self as the player and partner graphic as character
          if event.character_name != ""
            # impassable
            return false
          end
        end
      end
    end
    return true
  end
  #--------------------------------------------------------------------------
  # * Self Condition Player
  #--------------------------------------------------------------------------
  def self_condition_player
    bool = (self != $game_player)
    return bool
  end
  #--------------------------------------------------------------------------
  # * Check Player Pass
  #--------------------------------------------------------------------------
  def check_player_pass(new_x,new_y,d)
    # If player coordinates are consistent with move destination
    if $game_player.x == new_x and $game_player.y == new_y
      # If through is OFF
      unless $game_player.through
        # If your own graphic is the character
        if @character_name != ""
          # impassable
          return false
        end
      end
    end
    return true
  end
end

#==============================================================================
# ** Game_Map
#==============================================================================
class Game_Map
  def map; return @map; end
  #--------------------------------------------------------------------------
  # * Determine if Passable
  #     x          : x-coordinate
  #     y          : y-coordinate
  #     d          : direction (0,2,4,6,8,10)
  #                  *  0,10 = determine if all directions are impassable
  #     self_event : Self (If event is determined passable)
  #--------------------------------------------------------------------------
  def passable?(x, y, d, self_event = nil)
    # If coordinates given are outside of the map
    unless valid?(x, y)
      # impassable
      return false
    end
    # Change direction (0,2,4,6,8,10) to obstacle bit (0,1,2,4,8,0)
    bit = (1 << (d / 2 - 1)) & 0x0f
    # Pass Events
    pe = pass_events(bit,x,y,self_event)
    return pe unless pe.nil? 
    # Loop searches in order from top of layer
    for i in [2, 1, 0]
      # Get tile ID
      tile_id = data[x, y, i]
      # Tile ID acquistion failure
      if tile_id == nil
        # impassable
        return false
      # If obstacle bit is set
      elsif @passages[tile_id] & bit != 0
        # impassable
        return false
      # If obstacle bit is set in all directions
      elsif @passages[tile_id] & 0x0f == 0x0f
        # impassable
        return false
      # If priorities other than that are 0
      elsif @priorities[tile_id] == 0
        # passable
        return true
      end
    end
    # passable
    return true
  end
  #--------------------------------------------------------------------------
  # * Events
  #--------------------------------------------------------------------------
  def pass_events(bit,x,y,self_event)
    # Loop in all events
    for event in events.values
      # If tiles other than self are consistent with coordinates
      if event.tile_id >= 0 and event != self_event and
         event.x == x and event.y == y and not event.through
        # If obstacle bit is set
        if @passages[event.tile_id] & bit != 0
          # impassable
          return false
        # If obstacle bit is set in all directions
        elsif @passages[event.tile_id] & 0x0f == 0x0f
          # impassable
          return false
        # If priorities other than that are 0
        elsif @priorities[event.tile_id] == 0
          # passable
          return true
        end
      end
    end
    return nil
  end
end
 
Quote:#===============================================================================

# ** Icon Display 1.0 - www.unknowncoders.com
#-------------------------------------------------------------------------------
# Author    Mr.Mo "Muhammet Sivri"
# Version   1.0
# Date      12/04/07 (m/d/y)
#===============================================================================
#  Introduction
#===============================================================================
# Displays an icon over events or the player. You can choose for how long.
# You can also display without triggering the event by using comments on events.
#
# To display over an event, call this script:
#
#   $game_map.events[EVENT_ID].display_icon("icon_name")
#
#   EVENT_ID = the ID of the event, can be found on the left top corner of the
#              event editor. Make sure to remove any 0 that are up front.
#              For exmple: 001 = 1 or 010 = 10
#
# To display over an event without triggers using comments:
#
# IconD icon_name frames
#
# You do not need frames if you want to display non-stop. Examples:
#
#  IconD 049-Skill06
#  IconD 049-Skill06 30
#
#  The first one displays forever, the second displays for 3 seconds.
#
# To display over a player, call this script:
#
#  $game_player.display_icon("icon_name")
#
# NOTE: You can also add how long it should be shown, default is until map change.
#       To add the lenght of display do this:
#
#  .display_icon("icon_name",FRAMES)
#
#  FRAMES  = number of frames(10=1) that the icon will be displayed.
#
# Exmaples:
#
#  $game_map.events[EVENT_ID].display_icon("icon_name",100) > 10 seconds
#  $game_player.display_icon("icon_name",40) > 4 seconds
#===============================================================================
UCoders.include('Icon Display', ['Mr.Mo','1.0'])
class Game_Character
  attr_accessor :icon, :icon_frames, :displaying_icon, :current_icon
  #--------------------------------------------------------------------------
  alias mrmo_icond_game_character_initialize initialize
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    @icon = @displaying_icon = @current_icon = ""
    @icon_frames = 0
    mrmo_icond_game_character_initialize
  end
  #--------------------------------------------------------------------------
  # * Display Icon
  #--------------------------------------------------------------------------
  def display_icon(icon,frames=0)
    @icon = icon
    @icon_frames = frames
  end  
  #--------------------------------------------------------------------------
  # * Setup Icon
  #--------------------------------------------------------------------------
  def setup_icond(event,list)
     parameters = UCoders.event_comment_input(event,1,"IconD"); return false if parameters.nil?
     # Get Icon
     @icon = parameters[0].split[1].to_s
     @icon_frames = (parameters[0].split[2].to_i)
  end
end
#==============================================================================
# ** Sprite_Character
#------------------------------------------------------------------------------
#  This sprite is used to display the character.It observes the Game_Character
#  class and automatically changes sprite conditions.
#==============================================================================
class Sprite_Character < RPG::Sprite
  alias mrmo_icond_sprite_character_int initialize
  alias mrmo_icond_sprite_character_update update
  #--------------------------------------------------------------------------
  # * Initialize
  #--------------------------------------------------------------------------
  def initialize(viewport, character = nil)
    mrmo_icond_sprite_character_int(viewport, character)
    show_icon unless (@character.icon=@character.current_icon).empty?
    #@character.displaying_icon = ""
  end
  #--------------------------------------------------------------------------
  # * Dispose
  #--------------------------------------------------------------------------
  def dispose
    super
    @icon_sprite.dispose if !@icon_sprite.nil? && !@icon_sprite.disposed?
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    mrmo_icond_sprite_character_update
    # Check if an icon needs to be displayed
    if @character.icon == "r"
      @icon_sprite.dispose unless @icon_sprite.nil?
      @icon_sprite = nil
      @character.icon = @character.current_icon = @character.displaying_icon = ""
    end
    if !@character.icon.empty?
      show_icon
      @character.icon = ""
    end
    if !@icon_sprite.nil?
      @icon_sprite.x = self.x-(@icon_sprite.bitmap.width/2)
      @icon_sprite.y = (self.y-@icon_sprite.bitmap.height)-self.bitmap.height/4 + 4
      @character.icon_frames -= 1 if @character.icon_frames > 1
      if @character.icon_frames == 1
        @icon_sprite.dispose
        @icon_sprite = nil
        @character.current_icon = @character.displaying_icon = ""
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Show Icon
  #--------------------------------------------------------------------------
  def show_icon
    @character.current_icon = @character.displaying_icon = @icon = @character.icon
    # Create Sprite
    @icon_sprite = Sprite.new if @icon_sprite.nil?
    @icon_sprite.bitmap = RPG::Cache.icon("#{@icon}")
  end
end

#============================================================================
# *  Game Event 
#============================================================================
class Game_Event < Game_Character
  #--------------------------------------------------------------------------
  alias mrmo_icon_game_event_refresh refresh
  #--------------------------------------------------------------------------
  # * Refreshes Page
  #--------------------------------------------------------------------------
  def refresh
    mrmo_icon_game_event_refresh
    setup_icond(self,@list)
  end
end

I've found the load class but im too nooby and too  shy to give it a try on my own.
To be honest, I even forgot what the main purpose of the first script is. (((
Oh, btw. the script itself seems to be very buggy anyway because its not the first time the script made problems.
30 SECONDS! HAH! And hey, looks like I tinker with more of MrMo's stuff again!!!!


Line 453 in THIS version's Scene_Load. Once again, change the for i in 0..3 line to
for i in 0..SAVEFILE_MAX - 1

It was just a simple case of doing a search for Scene_Load and then the for...end block of code. Winking LIKEWISE, you can do the same thing in any newly added Scene_Title script.
I LOVE YOU!
WORKS PERFECT!!!!!!

PS: MR MOS scripts sucks, but dont tell him.