Anyone know how to use these scripts?

These are two ruby scripts. Number 1 is for disabling menu cursor blinking. The second is for disabling the menu fading in animation. I have tried to use both of them and they both made errors. I am new to ruby programming so I would appreciate some help.

1: class Window_Base < Window # If the method deactivate does not exist, define it unless method_defined?🙂deactivate) def deactivate # Placeholder method to prevent errors end end # If the method activate does not exist, define it unless method_defined?🙂activate) def activate # Placeholder method to prevent errors end end #-------------------------------------------------------------------------- # * Deactivate Window #-------------------------------------------------------------------------- alias t01_win_base_deact deactivate def deactivate @t01_active_state = 0 t01_win_base_deact end #-------------------------------------------------------------------------- # * Activate Window #-------------------------------------------------------------------------- alias t01_win_base_act activate def activate @t01_active_state = 1 t01_win_base_act endend

2:
class Window_Base < Window

def update_open
self.openness += 255
@opening = false if open?
end

def update_close
self.openness -= 255
@closing = false if close?
end
end

class Scene_Map < Scene_Base
def perform_transition
if Graphics.brightness == 0
Graphics.transition(0)
fadein(fadein_speed)
else
super
end
end
end

class Scene_Menu < Scene_MenuBase
def transition_speed
return 0
end

def terminate
super
Graphics.transition(0)
end
end


Both make errors about Scene_Base and honestly I have no idea what's going on.
It works better if you use a code tag to paste code.
1723489580696.png


The first one is completely messed up.
The second one looks like it should be fine.

If you are using these for XP then someone that can program in XP can help you, but they look like they are designed for VX Ace.
The two programs use different versions of ruby, and have different RGSS structures.

Where did you get these little scripts from?

Spoiler: 1
Ruby:
class Window_Base < Window
  # If the method deactivate does not exist, define it
  unless method_defined?(:deactivate)
    def deactivate
      # Placeholder method to prevent errors
    end
  end
  # If the method activate does not exist, define it
  unless method_defined?(:activate)
    def activate
      # Placeholder method to prevent errors
    end
  end
  #--------------------------------------------------------------------------
  # * Deactivate Window
  #--------------------------------------------------------------------------
  alias t01_win_base_deact deactivate
  def deactivate
    @t01_active_state = 0
    t01_win_base_deact
  end
  #--------------------------------------------------------------------------
  # * Activate Window
  #--------------------------------------------------------------------------
  alias t01_win_base_act activate
  def activate
    @t01_active_state = 1
    t01_win_base_act
  end
end
Spoiler: 2
Ruby:
class Window_Base < Window

  def update_open
    self.openness += 255
    @opening = false if open?
  end

  def update_close
    self.openness -= 255
    @closing = false if close?
  end
end

class Scene_Map < Scene_Base
  def perform_transition
    if Graphics.brightness == 0
      Graphics.transition(0)
      fadein(fadein_speed)
    else
      super
    end
  end
end

class Scene_Menu < Scene_MenuBase
  def transition_speed
    return 0
  end

  def terminate
    super
    Graphics.transition(0)
  end
end

Original thread: https://forums.rpgmakerweb.com/threads/anyone-know-how-to-use-these-scripts.171040/