Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

problem with my cms

I'd like to but in Seph's Adv. Limit Breaks in my game, but can't seem to get the command window to work. here's my cms:

Code:
#Custom Menu Script written by Shinami
#To change the icons used by the CMS, change the code below
#to the name of the icons you want displayed. 
#-Shinami

#rename the purple text inside the " " marks to change the icons in your command window
$item_icon = "034-Item03" #Be sure to use the graphics FULL item name
$skill_icon = "050-Skill07"
$equip_icon = "013-Body01"
$status_icon = "033-Item02"
$load_icon = "037-Item06"
$end_icon = "046-Skill03"

#Only change these if the width of the icons you specify are bigger than 24x24
#Default settings are 24 width and 24 height.
$icon_width = 24
$icon_height = 24

#==============================================================================
# ** Bitmap class
#==============================================================================
#Taken from Tsunokiette's post on the crankeye forums. - Shinami
class Bitmap
	def grade(x,y,width,height,start,finish)
		for i in 0..width
			r = start.red * (width - i) / width + finish.red * i / width
			g = start.green * (width - i) / width + finish.green * i / width
			b = start.blue * (width - i) / width + finish.blue * i / width
			a = start.alpha * (width - i) / width + finish.alpha * i / width
			fill_rect(x + i,y,1,height,Color.new(r, g, b, a))
		end
	end
	def draw_gradient(x,y,width,height,colors)
		gradient_width = ((width * 1.0) / (colors.size - 1))
   		if colors.size == 1
        grade(x,y,width,height,colors[0],colors[0])
        return
      end
		for i in 0..(colors.size - 2)
			x_var = (x + (i * gradient_width))
			grade(x_var,y,gradient_width,height,colors[i],colors[i + 1])
		end
	end
end

#==============================================================================
# ** Game_Map class
#==============================================================================
class Game_Map 
  
  def name #adding the method name
    $map_infos[@map_id] #stores the maps name. info is called with $game_map.name
  end 
end
#==============================================================================
# ** Scene_Title class
#==============================================================================
#I used Constance's 2 person script as a reference on this. - Shinami
class Scene_Title
  $map_infos = load_data("Data/MapInfos.rxdata")#This recalls the map names for use when the game starts
  for key in $map_infos.keys
    $map_infos[key] = $map_infos[key].name
  end
end

#==============================================================================
# ** Dummy_Load
#==============================================================================
#A window class created by copying the Scene_Load script but modifying it to take you back to the menu - Shinami
class Dummy_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_Menu.new(4)
  end
  #--------------------------------------------------------------------------
  # * Read Save Data
  #     file : file object for reading (opened)
  #--------------------------------------------------------------------------
  def read_save_data(file)
    # Read character data for drawing save file
    characters = Marshal.load(file)
    # Read frame count for measuring play time
    Graphics.frame_count = Marshal.load(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)
    # 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
    # Refresh party members
    $game_party.refresh
  end
end
#==============================================================================
# ** Dummy_Command
#==============================================================================
#Another custom made Window class for diplaying icons across from the menu commands.
#It took a bit of time to line them up properly. - Shinami
class Dummy_Command < Window_Base
  def initialize 
   super(0, 0, 160, 225) 
   self.contents = Bitmap.new(width - 32, height - 32) 
   self.contents.font.name = "Tahoma" 
   self.contents.font.size = 24 
   refresh
end 
#-------------------------------------------------------------------------- 
# Draws info on the screen 
#-------------------------------------------------------------------------- 
def refresh
    self.contents.clear
    bitmap = RPG::Cache.icon($item_icon) 
self.contents.blt(100, 4, bitmap, Rect.new(0, 0, $icon_width, $icon_height)) 

bitmap = RPG::Cache.icon($skill_icon) 
self.contents.blt(100, 35, bitmap, Rect.new(0, 0, $icon_width, $icon_height))

bitmap = RPG::Cache.icon($equip_icon) 
self.contents.blt(100, 70, bitmap, Rect.new(0, 0, $icon_width, $icon_height))

bitmap = RPG::Cache.icon($status_icon) 
self.contents.blt(100, 100, bitmap, Rect.new(0, 0, $icon_width, $icon_height))

bitmap = RPG::Cache.icon($load_icon) 
self.contents.blt(100, 133, bitmap, Rect.new(0, 0, $icon_width, $icon_height))

bitmap = RPG::Cache.icon($end_icon) 
self.contents.blt(100, 164, bitmap, Rect.new(0, 0, $icon_width, $icon_height))

  end
end
#==============================================================================
# ** Window_Location
#==============================================================================
#While I don't remember where I got this since I pulled the info from another CMS request I did
#I think it came from the 2 person CMS written by Constance. I say that because of how this code was lined out... 
#It definately has Constance's touch to it. - Shinami
class Window_Location < Window_Base 

def initialize 
super(0, 0, 260, 100)
self.contents = Bitmap.new(width - 32, height - 32) 
refresh 
end 

def refresh 
self.contents.clear 

# Map Name 
map = $game_map.name 
self.contents.font.color = system_color 
self.contents.draw_text(4, 0, 220, 32, "Location") 
self.contents.font.color = normal_color 
cx = contents.text_size(map).width
cy = contents.text_size(map).height
self.contents.draw_text(4, 25, cx, cy, map) #280 width
end 
end
#==============================================================================
# ** Window_Gold
#==============================================================================
class Window_Gold2 < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 222, 100)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = normal_color
    cx = contents.text_size($game_party.gold.to_s).width
    self.contents.draw_text(5, 30, cx, 32, $game_party.gold.to_s)
    self.contents.font.color = system_color
    cx = contents.text_size($data_system.words.gold).width
    self.contents.draw_text(30, 5, cx, 32, $data_system.words.gold)
    bitmap = RPG::Cache.icon("032-Item01") 
    self.contents.blt(0, 5, bitmap, Rect.new(0, 0, 32, 32)) 
  end
end
#==============================================================================
# ** Game_Actor
#==============================================================================
#Added a few methods...some of them feel redundant but I don't feel like fixing it...
#I used Constance's 2 person script as a reference on this. 
#Some methods here were pulled from the script mentioned above too.- Shinami
class Game_Actor < Game_Battler 
  
  def exp_now
    return @exp - @exp_list[@level] 
  end 
  
  def exp_next
    return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
  end
  
  def exp_lvl
    return exp_next - exp_now
  end
  
#Past here in this class is my own work. - Shinami  
  def exp #exp that the hero has.
    return @exp_list[@level+1] > 0 ? @exp : 0
  end
  
  def next_exp #amount of exp until next level. unaltered formula.
    return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
  end
  
  def next_rest_exp #amount of exp until next level. displays formula of xp til lvl up minus exp gained.
    return @exp_list[@level+1] > 0 ? (@exp_list[@level+1]- @exp) : 0
  end
end
#==============================================================================
# ** Window_Base class
#==============================================================================
#Just a "few" methods added. The method "draw_actor_exp" was pulled from the 2 person CMS by Constance.
class Window_Base < Window
  
  def draw_actor_exp(actor, x, y)
    self.contents.font.color = system_color
    cx = contents.text_size("Next").width
    self.contents.draw_text(x, y, cx, 32, "Next")
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 40, y, 84, 32, actor.exp_lvl.to_s)
  end
  
  def draw_hp_bar(actor,x,y,width = 140)
    hp = actor.hp
    max_hp = actor.maxhp
    percentage = ((hp * 1.0) / max_hp)
    bar_width = (percentage * width)
    empty_width = (width - bar_width)
    gray = Color.new(50,50,50,255)
    hp1 = Color.new(248,45,30,255)
    hp2 = Color.new(248,116,30,255)
    hp3 = Color.new(247,154,30,255)
    hp4 = Color.new(245,203,30,255)
    hp5 = Color.new(247,231,30,255)
    hp6 = Color.new(243,247,30,255)
    hp7 = Color.new(199,247,30,255)
    hp8 = Color.new(138,247,30,255)
    hp9 = Color.new(111,247,30,255)
    hp10 = Color.new(79,247,30,255)
    hp11 = Color.new(51,247,30,255)
    #draw empty if any
    self.contents.draw_gradient(x + bar_width,y,empty_width - 1,10,[gray])
    #draw gradient
    self.contents.draw_gradient(x,y,bar_width,10,[hp1,hp2,hp3,hp4,hp5,hp6,hp7,hp8,hp9,hp10,hp11])
    #draw border
    self.contents.fill_rect(x,y,width,1,Color.new(0,0,0,255))
    self.contents.fill_rect(x,y,1,10,Color.new(0,0,0,255))
    self.contents.fill_rect(x + width,y,1,10,Color.new(0,0,0,255))
    self.contents.fill_rect(x,y + 9,width,1,Color.new(0,0,0,255))
  end
  
  def draw_sp_bar(actor,x,y,width = 140)
    sp = actor.sp
    max_sp = actor.maxsp
    percentage = ((sp * 1.0) / max_sp)
    bar_width = (percentage * width)
    empty_width = (width - bar_width)
    gray = Color.new(50,50,50,255)
    hp1 = Color.new(0,67,154,255) #Color variables go like so....red, green, blue, saturation.
    hp2 = Color.new(7,77,164,255)#No idea what saturation does >.>; yet that is...
    hp3 = Color.new(11,87,174,255)#I used Paint to produce the numbers for the pretty colors.
    hp4 = Color.new(11,97,184,255)
    hp5 = Color.new(11,107,194,255)
    hp6 = Color.new(11,117,204,255)
    hp7 = Color.new(11,127,214,255)
    hp8 = Color.new(11,137,224,255)
    hp9 = Color.new(11,147,234,255)
    hp10 = Color.new(11,157,244,255)
    hp11 = Color.new(11,167,255,255)
    #draw empty if any
    self.contents.draw_gradient(x + bar_width,y,empty_width - 1,10,[gray])
    #draw gradient
    self.contents.draw_gradient(x,y,bar_width,10,[hp1,hp2,hp3,hp4,hp5,hp6,hp7,hp8,hp9,hp10,hp11])
    #draw border
    self.contents.fill_rect(x,y,width,1,Color.new(0,0,0,255))
    self.contents.fill_rect(x,y,1,10,Color.new(0,0,0,255))
    self.contents.fill_rect(x + width,y,1,10,Color.new(0,0,0,255))
    self.contents.fill_rect(x,y + 9,width,1,Color.new(0,0,0,255))
  end
  
  def draw_xp_bar(actor,x,y,width = 140)
    xp = actor.next_rest_exp
    xp_tg = actor.next_exp
    percentage = (((100 * 1.0) / 100) - ((xp * 1.0) / xp_tg))#100 percent - (percentage of exp to lvl gained)
    bar_width = (percentage * width)
    empty_width = (width - bar_width)
    gray = Color.new(50,50,50,255)
    hp1 = Color.new(0,0,0,255)
    hp2 = Color.new(13,13,13,255)
    hp3 = Color.new(26,26,26,255)
    hp4 = Color.new(39,39,39,255)
    hp5 = Color.new(52,52,52,255)
    hp6 = Color.new(65,65,65,255)
    hp7 = Color.new(78,78,78,255)
    hp8 = Color.new(91,91,91,255)
    hp9 = Color.new(104,104,104,255)
    hp10 = Color.new(117,117,117,255)
    hp11 = Color.new(130,130,130,255)
    #draw empty if any
    self.contents.draw_gradient(x + bar_width,y,empty_width - 1,10,[gray])
    #draw gradient
    self.contents.draw_gradient(x,y,bar_width,10,[hp1,hp2,hp3,hp4,hp5,hp6,hp7,hp8,hp9,hp10,hp11])
    #draw border
    self.contents.fill_rect(x,y,width,1,Color.new(0,0,0,255))
    self.contents.fill_rect(x,y,1,10,Color.new(0,0,0,255))
    self.contents.fill_rect(x + width,y,1,10,Color.new(0,0,0,255))
    self.contents.fill_rect(x,y + 9,width,1,Color.new(0,0,0,255))
  end
end
#==============================================================================
# ** Window_Char classes
#==============================================================================
#The idea of splitting the characters up into their own windows came from Constance's 2 person CMS.
#I still don't think this was the most effective way to set up the menu but it still looks nice. - Shinami
class Window_Char1 < Window_Selectable
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 242, 191)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
    self.active = false
    self.index = -1
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @item_max = 1
    x = 5
    y = 0
    actor = $game_party.actors[0]
    draw_actor_name(actor, x, y - 10)
    draw_actor_class(actor, x + 135, y - 10)
    draw_actor_level(actor, x, y + 10)
    draw_actor_state(actor, x + 130, y + 10, width = 120)
    draw_actor_graphic(actor, x + 180, y + 110)
    draw_actor_exp(actor, x, y + 107)
    draw_xp_bar(actor, x, y + 135, width = 140)
    draw_actor_hp(actor, x, y + 32)
    draw_hp_bar(actor, x, y + 62, width = 140)
    draw_actor_sp(actor, x, y + 70)
    draw_sp_bar(actor, x, y + 100, width = 140)
  end
  #--------------------------------------------------------------------------
  # * Cursor Rectangle Update
  #--------------------------------------------------------------------------
  def update_cursor_rect
    if @index < 0
      self.cursor_rect.empty
    else
      self.cursor_rect.set(0, 0, self.width - 32, self.height - 32)
    end
  end
end
#==============================================================================
# ** Window_Char classes
#==============================================================================
#Read the notes in Window_Char1...
class Window_Char2 < Window_Selectable
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 240, 191)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
    self.active = false
    self.index = -1
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @item_max = 1
    x = 5
    y = 0
    if $game_party.actors.size < 2
      self.contents.draw_text(80, 80, 50, 32, "EMPTY")
    else
      actor = $game_party.actors[1]
      draw_actor_name(actor, x, y - 10)
      draw_actor_class(actor, x + 135, y - 10)
      draw_actor_level(actor, x, y + 10)
      draw_actor_state(actor, x + 130, y + 10, width = 120)
      draw_actor_graphic(actor, x + 180, y + 110)
      draw_actor_exp(actor, x, y + 107)
      draw_xp_bar(actor, x, y + 135, width = 140)
      draw_actor_hp(actor, x, y + 32)
      draw_hp_bar(actor, x, y + 62, width = 140)
      draw_actor_sp(actor, x, y + 70)
      draw_sp_bar(actor, x, y + 100, width = 140)
    end
  end
  #--------------------------------------------------------------------------
  # * Cursor Rectangle Update
  #--------------------------------------------------------------------------
  def update_cursor_rect
    if @index < 0
      self.cursor_rect.empty
    else
      self.cursor_rect.set(0, 0, self.width - 32, self.height - 32)
    end
  end
end
#==============================================================================
# ** Window_Char classes
#==============================================================================
#Read the notes in Window_Char1...
class Window_Char3 < Window_Selectable
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 242, 191)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
    self.active = false
    self.index = -1
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @item_max = 1
    x = 5
    y = 0
    if $game_party.actors.size < 3
      self.contents.draw_text(80, 80, 50, 32, "EMPTY")
    else
      actor = $game_party.actors[2]
      draw_actor_name(actor, x, y - 10)
      draw_actor_class(actor, x + 135, y - 10)
      draw_actor_level(actor, x, y + 10)
      draw_actor_state(actor, x + 130, y + 10, width = 120)
      draw_actor_graphic(actor, x + 180, y + 110)
      draw_actor_exp(actor, x, y + 107)
      draw_xp_bar(actor, x, y + 135, width = 140)
      draw_actor_hp(actor, x, y + 32)
      draw_hp_bar(actor, x, y + 62, width = 140)
      draw_actor_sp(actor, x, y + 70)
      draw_sp_bar(actor, x, y + 100, width = 140)
    end
  end
  #--------------------------------------------------------------------------
  # * Cursor Rectangle Update
  #--------------------------------------------------------------------------
  def update_cursor_rect
    if @index < 0
      self.cursor_rect.empty
    else
      self.cursor_rect.set(0, 0, self.width - 32, self.height - 32)
    end
  end
end
#==============================================================================
# ** Window_Char classes
#==============================================================================
#Read the notes in Window_Char1...
class Window_Char4 < Window_Selectable
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 241, 191)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
    self.active = false
    self.index = -1
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @item_max = 1
    x = 5
    y = 0
    if $game_party.actors.size < 4
      self.contents.draw_text(80, 80, 50, 32, "EMPTY")
    else
      actor = $game_party.actors[3]
      draw_actor_name(actor, x, y - 10)
      draw_actor_class(actor, x + 135, y - 10)
      draw_actor_level(actor, x, y + 10)
      draw_actor_state(actor, x + 130, y + 10, width = 120)
      draw_actor_graphic(actor, x + 180, y + 110)
      draw_actor_exp(actor, x, y + 107)
      draw_xp_bar(actor, x, y + 135, width = 140)
      draw_actor_hp(actor, x, y + 32)
      draw_hp_bar(actor, x, y + 62, width = 140)
      draw_actor_sp(actor, x, y + 70)
      draw_sp_bar(actor, x, y + 100, width = 140)
    end
  end
  #--------------------------------------------------------------------------
  # * Cursor Rectangle Update
  #--------------------------------------------------------------------------
  def update_cursor_rect
    if @index < 0
      self.cursor_rect.empty
    else
      self.cursor_rect.set(0, 0, self.width - 32, self.height - 32)
    end
  end
end
#===================================================
# - CLASS Your_Scene Begins
#===================================================
class Scene_Menu
  
#---------------------------------------------------------------------------------
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
#---------------------------------------------------------------------------------

def main
    @window1 = Window_PlayTime.new
    @window1.x =0
    @window1.y =0
    @window1.height = 100
    @window1.width = 160
    #@window1.z = 200	
   
    @window2 = Window_Location.new
    @window2.x =159
    @window2.y =0
    @window2.height = 100
    @window2.width = 260
    #@window2.z = 200	
   
    @window3 = Window_Gold2.new
    @window3.x =418
    @window3.y =0
    @window3.height = 100
    @window3.width = 222
    #@window3.z = 200	
   
    s1 = $data_system.words.item
    s2 = $data_system.words.skill
    s3 = $data_system.words.equip
    s4 = "Status"
    s5 = "Load"
    s6 = "End Game"
    @window4 = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
    @window4.index = @menu_index
    @window4.x =0
    @window4.y =99
    @window4.height = 240
    @window4.width = 160
    #@window4.z = 200
   
    @window4_2 = Dummy_Command.new
    @window4_2.x =0
    @window4_2.y =99
    @window4_2.height = 240
    @window4_2.width = 160
    
    @window5 = Window_Char1.new
    @window5.x =159
    @window5.y =99
    @window5.height = 191
    @window5.width = 242
    #@window5.z = 200	
   
    @window6 = Window_Char2.new
    @window6.x =400
    @window6.y =99
    @window6.height = 191
    @window6.width = 240
    #@window6.z = 200	
   
    @window7 = Window_Char3.new
    @window7.x =159
    @window7.y =289
    @window7.height = 191
    @window7.width = 242
    #@window7.z = 200	
   
    @window8 = Window_Char4.new
    @window8.x =400
    @window8.y =289
    @window8.height = 191
    @window8.width = 241
   #@window8.z = 200
   
   @window9 = Window_Steps.new
   @window9.x = 0
   @window9.y = 338
   @window9.height = 140
   @window9.width = 160
   
Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
     #update
      if $scene != self
        break
      end
    end

    Graphics.freeze
    @window1.dispose
    @window2.dispose
    @window3.dispose
    @window4.dispose
    @window4_2.dispose
    @window5.dispose    
    @window6.dispose   
    @window7.dispose  
    @window8.dispose 
    @window9.dispose
  end
#---------------------------------------------------------------------------------
  def update
    # Update windows
    @window1.update
    @window2.update
    @window3.update
    @window4.update
    @window4_2.update
    @window5.update
    @window6.update
    @window7.update
    @window8.update
    # If command window is active: call update_command
    if @window4.active
      update_command
      return
    end
    # If status window is active: call update_status
    if @window5.active or @window6.active or @window7.active or @window8.active
      update_status
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when command window is active)
  #--------------------------------------------------------------------------
  def update_command
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Switch to map screen
      $scene = Scene_Map.new
      return
    end
    # If C button was pressed
    if Input.trigger?(Input::C)
      # If command other than save or end game, and party members = 0
      if $game_party.actors.size == 0 and @command_window.index < 4
        # Play buzzer SE
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # Branch by command window cursor position
      case @window4.index
      when 0  # item
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to item screen
        $scene = Scene_Item.new
      when 1  # skill
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Make status window active
        @window4.active = false
        @window5.active = true
        @window5.index = 0
        @act_index = 0
      when 2  # equipment
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Make status window active
        @window4.active = false
        @window5.active = true
        @window5.index = 0
        @act_index = 0
      when 3  # status
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Make status window active
        @window4.active = false
        @window5.active = true
        @window5.index = 0
        @act_index = 0
      when 4  #load
        $game_system.se_play($data_system.decision_se)
        # Switch to save screen
        $scene = Dummy_Load.new
      when 5  # end game
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to end game screen
        $scene = Scene_End.new
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when status window is active)
  #--------------------------------------------------------------------------
  def update_status
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Make command window active
      @window4.active = true
      @window5.active = false
      @window5.index = -1
      @window6.active = false
      @window6.index = -1
      @window7.active = false
      @window7.index = -1
      @window8.active = false
      @window8.index = -1
      return
    end
    #This is what I added to Scene_Menu. It was the only thing I could think of... - Shinami
    #When the DOWN key is pushed...
    if Input.repeat?(Input::DOWN)
      if @window5.active
        unless $game_party.actors.size < 3
          $game_system.se_play($data_system.cursor_se)
          @window7.active = true
          @window7.index = 0
          @window5.active = false
          @window5.index = -1
          @act_index = 2
        end
      end
      if @window6.active
        unless $game_party.actors.size < 4
          $game_system.se_play($data_system.cursor_se)
          @window8.active = true
          @window8.index = 0
          @window6.active = false
          @window6.index = -1
          @act_index = 3
        end
      end
    end
    #When the UP key is pushed...
    if Input.repeat?(Input::UP)
      if @window7.active
        $game_system.se_play($data_system.cursor_se)
        @window5.active = true
        @window5.index = 0
        @window7.active = false
        @window7.index = -1
        @act_index = 0
      end
      if @window8.active
        $game_system.se_play($data_system.cursor_se)
        @window6.active = true
        @window6.index = 0
        @window8.active = false
        @window8.index = -1
        @act_index = 1
      end
    end
    #When the RIGHT key is pushed...
    if Input.repeat?(Input::RIGHT)
      if @window5.active
        unless $game_party.actors.size < 2
          $game_system.se_play($data_system.cursor_se)
          @window6.active = true
          @window6.index = 0
          @window5.active = false
          @window5.index = -1
          @act_index = 1
        end
      end
      if @window7.active
        unless $game_party.actors.size < 4
          $game_system.se_play($data_system.cursor_se)
          @window8.active = true
          @window8.index = 0
          @window7.active = false
          @window7.index = -1
          @act_index = 3
        end
      end
    end
    #When the LEFT key is pushed...
    if Input.repeat?(Input::LEFT)
      if @window6.active
        $game_system.se_play($data_system.cursor_se)
        @window5.active = true
        @window5.index = 0
        @window6.active = false
        @window6.index = -1
        @act_index = 0
      end
      if @window8.active
        $game_system.se_play($data_system.cursor_se)
        @window7.active = true
        @window7.index = 0
        @window8.active = false
        @window8.index = -1
        @act_index = 2
      end
    end
    #And this here is the end of my own custom, inefficient solution for 4 seperate windows...
    #Yes...I don't like the solution I used but hell...it got the job done. - Shinami
    # If C button was pressed
    if Input.trigger?(Input::C)
      # Branch by command window cursor position
      case @window4.index
      when 1  # skill
        # If this actor's action limit is 2 or more
        for i in 0...$game_party.actors.size
          if $game_party.actors[i].restriction >= 2
            # Play buzzer SE
            $game_system.se_play($data_system.buzzer_se)
            return
          end
        end
          # Play decision SE
          $game_system.se_play($data_system.decision_se)
          # Switch to skill screen
          $scene = Scene_Skill.new(@act_index)
      when 2  # equipment
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to equipment screen
        $scene = Scene_Equip.new(@act_index)
      when 3  # status
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to status screen
        $scene = Scene_Status.new(@act_index)
      end
      return
    end
  end
end
#===================================================
# - CLASS Your_Scene Ends
#===================================================

If someone could help me out, It sure would help.
 
Code:
#==============================================================================
# Advanced Limit Break Script
#==============================================================================
# SephirothSpawn
# Version 1
# 29.11.05
#==============================================================================

#------------------------------------------------------------------------------
# * SDK Log Script
#------------------------------------------------------------------------------
SDK.log("Advanced Limit Break", "SephirothSpawn", 1, "12.17.05")

#------------------------------------------------------------------------------
# * Begin SDK Enable Test
#------------------------------------------------------------------------------
if SDK.state("Advanced Limit Break") == true
  
  #==============================================================================
  # ** Game_Actor
  #==============================================================================
  class Game_Actor < Game_Battler
    #--------------------------------------------------------------------------
    # * Public Instance Variables
    #--------------------------------------------------------------------------
    attr_reader :limit
    attr_accessor :limit_type
    #------------------------------------------------------------------------------
    # * Alias Listings
    #------------------------------------------------------------------------------
    alias seph_limitbreak_gameactor_setup setup
    #--------------------------------------------------------------------------
    # * Object Initialization
    #--------------------------------------------------------------------------
    def setup(actor_id)
      seph_limitbreak_gameactor_setup(actor_id)
      @limit = 0
      @limit_type = 0
    end
    #--------------------------------------------------------------------------
    # * Set Limit
    #--------------------------------------------------------------------------
    def limit=(limit)
      @limit = limit
      @limit = 1000 if @limit > 1000
    end
  end

  #==============================================================================
  # ** Window_Base
  #==============================================================================
  class Window_Base < Window
    #--------------------------------------------------------------------------
    # Alias Listings
    #--------------------------------------------------------------------------
    alias seph_limitbreak_windowbase_drawactorname draw_actor_name
    #--------------------------------------------------------------------------
    # Draw Actor Name
    #--------------------------------------------------------------------------
    def draw_actor_name(actor, x, y)
      ox = $game_temp.in_battle ? 4 : 16
      draw_slant_bar(x + ox, y + 32, actor.limit, 1000.0, 120)
      seph_limitbreak_windowbase_drawactorname(actor, x, y)
    end
    #--------------------------------------------------------------------------
    # Draw Slant Bar
    #--------------------------------------------------------------------------
    def draw_slant_bar(x, y, min, max, width = 152, height = 6, bar_color = Color.new(150, 0, 0, 255))
      # Draw Border
      for i in 0..height
        self.contents.fill_rect(x + i, y + height - i, width + 1, 1, Color.new(50, 50, 50, 255))
      end
      # Draw Background
      for i in 1..(height - 1)
        r = 100 * (height - i) / height + 0 * i / height
        g = 100 * (height - i) / height + 0 * i / height
        b = 100 * (height - i) / height + 0 * i / height
        a = 255 * (height - i) / height + 255 * i / height
        self.contents.fill_rect(x + i, y + height - i, width, 1, Color.new(r, b, g, a))
      end
      # Color Values
      if min == max
        bar_color = Color.new(200, 0, 0, 255) 
      end
      # Draws Bar
      for i in 1..( (min / max) * width - 1)
        for j in 1..(height - 1)
          r = bar_color.red * (width - i) / width + 255 * i / width
          g = bar_color.green * (width - i) / width + 255 * i / width
          b = bar_color.blue * (width - i) / width + 60 * i / width
          a = bar_color.alpha * (width - i) / width + 255 * i / width
          self.contents.fill_rect(x + i + j, y + height - j, 1, 1, Color.new(r, g, b, a))
        end
      end
    end
  end
  
  #==============================================================================
  # Window Horizontal Command
  #==============================================================================
  class Window_HorizCommand < Window_Selectable
    #--------------------------------------------------------------------------
    # * Object Initialization
    #--------------------------------------------------------------------------
    def initialize(commands, width = 640, height = 64)
      super(0, 0, width, height)
      self.contents = Bitmap.new(width - 32, height - 32)
      @commands = commands
      @item_max = @commands.size
      @column_max = @commands.size
      refresh
      self.index = 0
    end
    #--------------------------------------------------------------------------
    # * Refresh
    #--------------------------------------------------------------------------
    def refresh
      self.contents.clear
      for i in 0...@item_max
        draw_item(i, normal_color)
      end
    end
    #--------------------------------------------------------------------------
    # * Draw Item
    #     index : item number
    #--------------------------------------------------------------------------
    def draw_item(index, color)
      self.contents.font.color = color
      x = width / @item_max * index
      off = width / @item_max - 32
      self.contents.draw_text(x, 0, off, 32, @commands[index], 1)
    end
    #--------------------------------------------------------------------------
    # * Disable Item
    #     index : item number
    #--------------------------------------------------------------------------
    def disable_item(index)
      draw_item(index, disabled_color)
    end
  end
  
  #==============================================================================
  # ** Window_Skill
  #==============================================================================
  class Window_Skill < Window_Selectable
    #--------------------------------------------------------------------------
    # * Refresh
    #--------------------------------------------------------------------------
    def refresh(seperation = true, overdrive_skills = false)
      if self.contents != nil
        self.contents.dispose
        self.contents = nil
      end
      @data = []
      unless @actor == nil
        for i in 0...@actor.skills.size
          skill = $data_skills[@actor.skills[i]]
          unless skill == nil
            if seperation
              if overdrive_skills
                @data.push(skill) if skill.element_set.include?(20)
              else
                @data.push(skill) unless skill.element_set.include?(20)
              end
            else
              @data.push(skill)
            end
          end
        end
      end
      # If item count is not 0, make a bit map and draw all items
      @item_max = @data.size
      if @item_max > 0
        self.contents = Bitmap.new(width - 32, row_max * 32)
        for i in 0...@item_max
          draw_item(i)
        end
      end
    end
    #--------------------------------------------------------------------------
    # * Check Data
    #--------------------------------------------------------------------------
    def data
      return @data
    end
  end
  
  #==============================================================================
  # ** Window_Limit_Types
  #==============================================================================
  class Window_Limit_Types < Window_Selectable
    #--------------------------------------------------------------------------
    # * Object Initialization
    #--------------------------------------------------------------------------
    def initialize
      super(0, 128, 640, 288)
      @column_max = 2
      refresh
      self.index = 0
    end
    #--------------------------------------------------------------------------
    # * Get Type
    #--------------------------------------------------------------------------
    def get_type
      return @data[self.index]
    end
    #--------------------------------------------------------------------------
    # * Help Text
    #--------------------------------------------------------------------------
    def help_text
      case index
      when 0    ; text = 'Warrior - Gains When Hero Damages Enemy'
      when 1    ; text = 'Stotic - Gains When Hero Recieves Damage'
      when 2    ; text = 'Healer - Gains When Hero uses Restoriative Magic'
      when 3    ; text = 'Comrade - Gains When Allies Hit'
      when 4    ; text = 'Slayer - Gains When Hero Kills Enemy'
      when 5    ; text = 'Victor - Gains When Party Wins Battle'
      when 6    ; text = 'Tactician - Gains When Hero Inflicts Status Effect on Enemy'
      when 7    ; text = 'Hero - Gains When Hero Destroys Enemy with more than 10,000 HP'
      when 8    ; text = "Ally - Gains When Hero's Turn Comes"
      when 9    ; text = "Daredevil - Gains When Hero's Turn Comes and in Critical Condition"
      when 10  ; text = 'Solo - Gains When Hero Is Only Member in Party'
      when 11  ; text = 'Coward - Gains When Hero Escapes Battle'
      when 12  ; text = 'Dancer - Gains When Hero Evades Enemy Attack'
      when 13  ; text = 'Rook - Gains When Hero Guards Enemy Elemental or Status Attack'
      when 14  ; text = 'Sufferer - Gains When Hero is Inflicted with Status Effect'
      when 15  ; text = "Victim - Gains When Hero's Turn comes, and is inflicted by Status"
      when 16  ; text = 'Avenger - Gains When Ally is Killed By Enemy'
      when 17  ; text = 'Defender - Gains When Hero Chooses to Guard'
      end
      return text
    end
    #--------------------------------------------------------------------------
    # * Refresh
    #--------------------------------------------------------------------------
    def refresh
      if self.contents != nil
        self.contents.dispose
        self.contents = nil
      end
      @data = ['Warrior', 'Stotic', 'Healer', 'Comrade', 'Slayer', 'Victor',
                     'Tactician', 'Hero', 'Ally', 'Daredevil', 'Solo', 'Coward', 'Dancer',
                     'Rook', 'Sufferer', 'Victim', 'Avenger', 'Defender']
      # If item count is not 0, make a bit map and draw all items
      @item_max = @data.size
      if @item_max > 0
        self.contents = Bitmap.new(width - 32, row_max * 32)
        for i in 0...@item_max
          draw_item(i)
        end
      end
    end
    #--------------------------------------------------------------------------
    # * Draw Item
    #     index : item number
    #--------------------------------------------------------------------------
    def draw_item(index)
      x = 4 + index % 2 * (288 + 32)
      y = index / 2 * 32
      self.contents.draw_text(x, y, contents.width / 2 - 32, 32, @data[index], 1)
    end
  end

  #==============================================================================
  # ** Scene_Menu
  #==============================================================================
  class Scene_Menu
    #------------------------------------------------------------------------------
    # * Alias Listings
    #------------------------------------------------------------------------------
    alias seph_limitbreak_scenemenu_init initialize
    alias seph_limitbreak_scenemenu_update_command_check update_command_check
    alias seph_limitbreak_scenemenu_update_status_check update_status_check
    #--------------------------------------------------------------------------
    # * Object Initialization
    #     menu_index : command cursor's initial position
    #--------------------------------------------------------------------------
    def initialize(menu_index = 0)
      seph_limitbreak_scenemenu_init(menu_index)
      # Inserts 'Limit Break' Below Skill
      @commands.insert(@commands.index($data_system.words.skill) + 1, 'Limit Break')
    end
    #--------------------------------------------------------------------------
    # * Update Command Check
    #--------------------------------------------------------------------------
    def update_command_check
      seph_limitbreak_scenemenu_update_command_check
      # Loads Command
      command = @commands[@command_window.index]
      # Check If Command is Limit Break
      if command == 'Limit Break'
        command_start_limit
      end
    end
    #--------------------------------------------------------------------------
    # * Update Status Check
    #--------------------------------------------------------------------------
    def update_status_check
      seph_limitbreak_scenemenu_update_status_check
      # Loads Command
      command = @commands[@command_window.index]
      # Check If Command is Limit Break
      if command == 'Limit Break'
        command_limit
      end
    end
    #--------------------------------------------------------------------------
    # * Command Start Limit
    #--------------------------------------------------------------------------
    def command_start_limit
      activate_status
    end
    #--------------------------------------------------------------------------
    # * Command Limit
    #--------------------------------------------------------------------------
    def command_limit
      # If this actor's action limit is 2 or more
      if $game_party.actors[@status_window.index].restriction >= 2
        # Play buzzer SE
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # Play decision SE
      $game_system.se_play($data_system.decision_se)
      # Switch to skill screen
      $scene = Scene_LimitBreak.new(@status_window.index)
    end
  end
  
  #==============================================================================
  # ** Scene_LimitBreak
  #==============================================================================
  class Scene_LimitBreak
    #--------------------------------------------------------------------------
    # * Object Initialization
    #     actor_index : actor index
    #--------------------------------------------------------------------------
    def initialize(actor_index = 0)
      @actor_index = actor_index
    end
    #--------------------------------------------------------------------------
    # * Main Processing
    #--------------------------------------------------------------------------
    def main
      # Get actor
      @actor = $game_party.actors[@actor_index]
      # Make Help Window
      @help_window = Window_Help.new
      # Command Window
      @command_window = Window_HorizCommand.new(['View Skills', 'Set Overdrive Type'])
        @command_window.y = 64
      # Skill Window
      @skill_window = Window_Skill.new(@actor)
        @skill_window.height = 288
        @skill_window.refresh(true, true)
        @skill_window.active = false
      # Skill Status Window
      @status_window = Window_SkillStatus.new(@actor)
        @status_window.y = 416
      # Limit Break Types Window
      @limit_break_type_window = Window_Limit_Types.new
        @limit_break_type_window.index = @actor.limit_type
        @limit_break_type_window.visible = @limit_break_type_window.active = false
      # Associate help window
      if @skill_window.help_window == nil
        @help_window.set_text('No Limit Breaks Available', 1)
      else
        @skill_window.help_window = @help_window
      end
      # Scene Objects
      @objects = [@help_window, @command_window, @skill_window, @limit_break_type_window, @status_window]
      # Execute transition
      Graphics.transition
      # Main loop
      loop do
        # Update game screen
        Graphics.update
        # Update input information
        Input.update
        # Objects Update
        @objects.each {|x| x.update}
        # Frame update
        update
        # Abort loop if screen is changed
        if $scene != self
          break
        end
      end
      # Prepare for transition
      Graphics.freeze
      # Dispose of Objects
      @objects.each {|x| x.dispose}
    end
    #--------------------------------------------------------------------------
    # * Frame Update
    #--------------------------------------------------------------------------
    def update
      # If Main Command Active : call update_main
      if @command_window.active
        update_main
        return
      end
      # If skill window is active: call update_skill
      if @skill_window.active
        update_skill
        return
      end
      # If Limit Type is active: call update_type
      if @limit_break_type_window.active
        update_type
        return
      end
    end
    #--------------------------------------------------------------------------
    # * Frame Update (if main window is active)
    #--------------------------------------------------------------------------
    def update_main
      # Toggles Windows Visiblity
      @skill_window.visible = @command_window.index == 0 ? true : false
      @limit_break_type_window.visible = @command_window.index == 1 ? true : false
      # If B button was pressed
      if Input.trigger?(Input::B)
        # Play cancel SE
        $game_system.se_play($data_system.cancel_se)
        # Switch to menu screen
        $scene = Scene_Menu.new(2)
        return
      end
      # If C button was pressed
      if Input.trigger?(Input::C)
        # Branch Point
        case @command_window.index
        when 0  # View Skills
          if @skill_window.data.size == 0
            $game_system.se_play($data_system.buzzer_se)
            @help_window.set_text('No Limit Breaks Available', 1)
          else
            $game_system.se_play($data_system.decision_se)
            @command_window.active = false
            @skill_window.active = true
          end
        when 1  # Set Limit Break Type
            $game_system.se_play($data_system.decision_se)
            @command_window.active = false
            @limit_break_type_window.active = true
            @help_window.set_text(@limit_break_type_window.help_text, 1)
        end
      end
      # If R button was pressed
      if Input.trigger?(Input::R)
        # Play cursor SE
        $game_system.se_play($data_system.cursor_se)
        # To next actor
        @actor_index += 1
        @actor_index %= $game_party.actors.size
        # Switch to different skill screen
        $scene = Scene_LimitBreak.new(@actor_index)
        return
      end
      # If L button was pressed
      if Input.trigger?(Input::L)
        # Play cursor SE
        $game_system.se_play($data_system.cursor_se)
        # To previous actor
        @actor_index += $game_party.actors.size - 1
        @actor_index %= $game_party.actors.size
        # Switch to different skill screen
        $scene = Scene_LimitBreak.new(@actor_index)
        return
      end
    end
    #--------------------------------------------------------------------------
    # * Frame Update (if main window is active)
    #--------------------------------------------------------------------------
    def update_skill
      # Refreshes Help Window Text
      @skill_window.help_window = @help_window
      # If B button was pressed
      if Input.trigger?(Input::B)
        # Play cancel SE
        $game_system.se_play($data_system.cancel_se)
        # Switch to main menu
        @command_window.active = true
        @skill_window.active = false
        return
      end
    end
    #--------------------------------------------------------------------------
    # * Frame Update (if main window is active)
    #--------------------------------------------------------------------------
    def update_type
      # Refreshes Help Window Text
      if Input.trigger?(Input::UP) || Input.trigger?(Input::DOWN) || Input.trigger?(Input::RIGHT) || Input.trigger?(Input::LEFT)
        @help_window.set_text(@limit_break_type_window.help_text, 1)
      end
      # If B button was pressed
      if Input.trigger?(Input::B)
        # Play cancel SE
        $game_system.se_play($data_system.cancel_se)
        # Switch to main menu
        @command_window.active = true
        @limit_break_type_window.active = false
        return
      end
      # If C button was pressed
      if Input.trigger?(Input::C)
        # Play cancel SE
        $game_system.se_play($data_system.decision_se)
        # Set Actor Limit Type
        @actor.limit_type = @limit_break_type_window.index
        @help_window.set_text("#{@actor.name}'s Limit Type is Now #{@limit_break_type_window.get_type}", 1)
        return
      end
    end
  end
  
  #==============================================================================
  # ** Scene_Battle
  #==============================================================================
  class Scene_Battle
    #------------------------------------------------------------------------------
    # * Alias Listings
    #------------------------------------------------------------------------------
    alias seph_limitbreak_scenebattle_battleend battle_end
    alias seph_limitbreak_scenebattle_updatephase1 update_phase1
    alias seph_limitbreak_scenebattle_makebasicactionguard make_basic_action_result_guard
    #------------------------------------------------------------------------------
    # * Battle End Result
    #------------------------------------------------------------------------------
    def battle_end(result)
      for actor in $game_party.actors
        # Victor
        if result == 0
          if actor.limit_type == 5
            actor.limit += 200
          end
        # Coward
        elsif result == 1
          if actor.limit_type == 11
            actor.limit += 100
          end
        end
      end
      seph_limitbreak_scenebattle_battleend(result)
    end
    #------------------------------------------------------------------------------
    # * Update Phase 1
    #------------------------------------------------------------------------------
    def update_phase1
      for actor in $game_party.actors
        # Ally
        if actor.limit_type == 8
          actor.limit += 40
        end
        # Daredevil
        if actor.limit_type == 9 && actor.hp.quo(actor.maxhp) < 0.5
          actor.limit += 160 
        end
        # Solo
        if actor.limit_type == 16 && $game_party.actors.size == 1
          actor.limit += 160
        end
        # Victim
        if actor.limit_type == 15 && actor.states.empty?
          actor.limit += 160
        end
      end
      seph_limitbreak_scenebattle_updatephase1
    end
    #--------------------------------------------------------------------------
    # * Make Basic Action Results - Guard
    #--------------------------------------------------------------------------
    def make_basic_action_result_guard
      # Defender
      if @active_battler.is_a?(Game_Actor)
        if @active_battler.limit_type == 17
          @active_battler.limit += 80
        end
      end
      seph_limitbreak_scenebattle_makebasicactionguard
    end
  end
  
  #==============================================================================
  # ** Game_Battler
  #==============================================================================
  class Game_Battler
    #--------------------------------------------------------------------------
    # * Applying Normal Attack Effects
    #     attacker : battler
    #--------------------------------------------------------------------------
    def attack_effect(attacker)
      # Clear critical flag
      self.critical = false
      # First hit detection
      hit_result = (rand(100) < attacker.hit)
      # If hit occurs
      if hit_result == true
        # Calculate basic damage
        atk = [attacker.atk - self.pdef / 2, 0].max
        self.damage = atk * (20 + attacker.str) / 20
        # Element correction
        self.damage *= elements_correct(attacker.element_set)
        self.damage /= 100
        # If damage value is strictly positive
        if self.damage > 0
          # Critical correction
          if rand(100) < 4 * attacker.dex / self.agi
            self.damage *= 2
            self.critical = true
          end
          # Guard correction
          if self.guarding?
            self.damage /= 2
          end
        end
        # Dispersion
        if self.damage.abs > 0
          amp = [self.damage.abs * 15 / 100, 1].max
          self.damage += rand(amp+1) + rand(amp+1) - amp
        end
        # Second hit detection
        eva = 8 * self.agi / attacker.dex + self.eva
        hit = self.damage < 0 ? 100 : 100 - eva
        hit = self.cant_evade? ? 100 : hit
        hit_result = (rand(100) < hit)
      end
      # If hit occurs
      if hit_result == true
        # State Removed by Shock
        remove_states_shock
        # Loads Current States
        current_states = self.states
        # Substract damage from HP
        self.hp -= self.damage
        # Slayer, Hero & Avenger
        if self.dead?
          if self.is_a?(Game_Actor)
            # Avenger
            for actor in $game_party.actors
              unless actor == self
                if actor.limit_type == 16
                  actor.limit += 300 unless actor.dead?
                end
              end
            end
          else
            # Hero
            if attacker.limit_type == 7 && self.maxhp >= 10000
              attacker.limit += 250 
            end
            # Slayer
            if attacker.limit_type == 4
              attacker.limit += 200 
            end
          end
        end
        # State change
        @state_changed = false
        states_plus(attacker.plus_state_set)
        states_minus(attacker.minus_state_set)
        # Sufferer
        if self.is_a?(Game_Actor)
          if states.size > current_states.size
            if self.limit_type == 14
              self.limit += 160 
            end
          end
        end
        # Warrior & Tactician
        unless self.is_a?(Game_Actor)
          # Warrior
          if attacker.limit_type == 0
            attacker.limit += [self.damage * 10, 160].min
          end
          # Tactician
          if attacker.limit_type == 6
            attacker.limit += 160 
          end
        end
        # Stotic
        if self.is_a?(Game_Actor)
          if self.limit_type == 1
            self.limit += self.damage * 100 / self.maxhp
          end
        end
        # Comrade
        if self.is_a?(Game_Actor)
          for actor in $game_party.actors
            unless actor == self
              if actor.limit_type == 3
                actor.limit += self.damage * 20 / self.maxhp
              end
            end
          end
        end
      # When missing
      else
        # Dancer & Rook
        if self.is_a?(Game_Actor)
          # Dancer
          if self.limit_type == 12
            self.limit += 160 
          end
          # Rook
          if self.limit_type == 13 && !attacker.plus_state_set.empty?
            self.limit += 100 
          end
        end
        # Set damage to "Miss"
        self.damage = "Miss"
        # Clear critical flag
        self.critical = false
      end
      # End Method
      return true
    end
    #--------------------------------------------------------------------------
    # * Apply Skill Effects
    #     user  : the one using skills (battler)
    #     skill : skill
    #--------------------------------------------------------------------------
    def skill_effect(user, skill)
      # Clear critical flag
      self.critical = false
      # If skill scope is for ally with 1 or more HP, and your own HP = 0,
      # or skill scope is for ally with 0, and your own HP = 1 or more
      if ((skill.scope == 3 or skill.scope == 4) and self.hp == 0) or
         ((skill.scope == 5 or skill.scope == 6) and self.hp >= 1)
        # End Method
        return false
      end
      # Clear effective flag
      effective = false
      # Set effective flag if common ID is effective
      effective |= skill.common_event_id > 0
      # First hit detection
      hit = skill.hit
      if skill.atk_f > 0
        hit *= user.hit / 100
      end
      hit_result = (rand(100) < hit)
      # Set effective flag if skill is uncertain
      effective |= hit < 100
      # If hit occurs
      if hit_result == true
        # Calculate power
        power = skill.power + user.atk * skill.atk_f / 100
        if power > 0
          power -= self.pdef * skill.pdef_f / 200
          power -= self.mdef * skill.mdef_f / 200
          power = [power, 0].max
        end
        # Calculate rate
        rate = 20
        rate += (user.str * skill.str_f / 100)
        rate += (user.dex * skill.dex_f / 100)
        rate += (user.agi * skill.agi_f / 100)
        rate += (user.int * skill.int_f / 100)
        # Calculate basic damage
        self.damage = power * rate / 20
        # Element correction
        self.damage *= elements_correct(skill.element_set)
        self.damage /= 100
        # If damage value is strictly positive
        if self.damage > 0
          # Guard correction
          if self.guarding?
            self.damage /= 2
          end
        end
        # Dispersion
        if skill.variance > 0 and self.damage.abs > 0
          amp = [self.damage.abs * skill.variance / 100, 1].max
          self.damage += rand(amp+1) + rand(amp+1) - amp
        end
        # Second hit detection
        eva = 8 * self.agi / user.dex + self.eva
        hit = self.damage < 0 ? 100 : 100 - eva * skill.eva_f / 100
        hit = self.cant_evade? ? 100 : hit
        hit_result = (rand(100) < hit)
        # Set effective flag if skill is uncertain
        effective |= hit < 100
      end
      # If hit occurs
      if hit_result == true
        # If physical attack has power other than 0
        if skill.power != 0 and skill.atk_f > 0
          # State Removed by Shock
          remove_states_shock
          # Set to effective flag
          effective = true
        end
        # Loads Current States
        current_states = self.states
        # Substract damage from HP
        last_hp = self.hp
        self.hp -= self.damage
        # Healer
        if self.damage < 0
          if user.is_a?(Game_Actor)
            if self.is_a?(Game_Actor) && self != user
              if user.limit_type == 2
                user.limit += 80
              end
            end
          end
        end
        effective |= self.hp != last_hp
        # Slayer, Hero & Avenger
        if self.dead?
          if self.is_a?(Game_Actor)
            # Avenger
            for actor in $game_party.actors
              unless actor == self
                if actor.limit_type == 16
                  actor.limit += 300 unless actor.dead?
                end
              end
            end
          else
            # Hero
            if user.limit_type == 7 && self.maxhp >= 10000
              user.limit += 250 
            end
            # Slayer
            if user.limit_type == 4
              user.limit += 200 
            end
          end
        end
        @state_changed = false
        effective |= states_plus(skill.plus_state_set)
        effective |= states_minus(skill.minus_state_set)
        # Sufferer
        if self.is_a?(Game_Actor)
          if states.size > current_states.size
            if self.limit_type == 14
              self.limit += 160 
            end
          end
        end
        # Warrior & Tactician
        if user.is_a?(Game_Actor)
          # Warrior
          if user.limit_type == 0
            user.limit += [self.damage * 10, 160].min
          end
          # Tactician
          if user.limit_type == 6
            user.limit += 160 
          end
        end
        # Stotic
        if self.is_a?(Game_Actor)
          if self.limit_type == 1
            self.limit += self.damage * 100 / self.maxhp
          end
        end
        # Comrade
        if self.is_a?(Game_Actor)
          for actor in $game_party.actors
            unless actor == self
              if actor.limit_type == 3
                actor.limit += self.damage * 20 / self.maxhp
              end
            end
          end
        end
        # If power is 0
        if skill.power == 0
          # Set damage to an empty string
          self.damage = ""
          # If state is unchanged
          unless @state_changed
            # Set damage to "Miss"
            self.damage = "Miss"
          end
        end
      # When missing
      else
        # Dancer & Rook
        if self.is_a?(Game_Actor)
          # Dancer
          if self.limit_type == 12
            self.limit += 160 
          end
          # Rook
          if self.limit_type == 13 && user.plus_state_set.empty?
            self.limit += 100 
          end
        end
        # Set damage to "Miss"
        self.damage = "Miss"
        # Clear critical flag
        self.critical = false
      end
      # If not in battle
      unless $game_temp.in_battle
        # Set damage to nil
        self.damage = nil
      end
      # End Method
      return effective
    end
  end  

  #==============================================================================
  # ** Scene_Battle
  #==============================================================================
  class Scene_Battle
    #--------------------------------------------------------------------------
    # * Alias Listings
    #--------------------------------------------------------------------------
    alias seph_limitbreak_scenebattle_commandsinit commands_init
    alias seph_limitbreak_scenebattle_updatephase3 update_phase3
    alias seph_limitbreak_scenebattle_checkcommands check_commands
    alias seph_limitbreak_scenebattle_endenemyselect end_enemy_select
    alias seph_limitbreak_scenebattle_endactorselect end_actor_select
    #--------------------------------------------------------------------------
    # * Set Commands
    #--------------------------------------------------------------------------
    def commands_init
      seph_limitbreak_scenebattle_commandsinit
      @commands.insert(@commands.index($data_system.words.skill) + 1, 'Limit Break')
    end
    #--------------------------------------------------------------------------
    # * Frame Update (actor command phase)
    #--------------------------------------------------------------------------
    def update_phase3
      seph_limitbreak_scenebattle_updatephase3
      # If limit skill is enabled
      if @limit_skill_window != nil
        update_phase3_limit_select
      end
    end
    #--------------------------------------------------------------------------
    # * Check Commands
    #--------------------------------------------------------------------------
    def check_commands
      seph_limitbreak_scenebattle_checkcommands
      # Loads Current Command
      command = @commands[@actor_command_window.index]
      if command == 'Limit Break'
        update_phase3_command_limit
      end
    end
    #--------------------------------------------------------------------------
    # * Command : Limit
    #--------------------------------------------------------------------------
    def update_phase3_command_limit
      # Play decision SE
      $game_system.se_play($data_system.decision_se)
      # Set action
      @active_battler.current_action.kind = 1
      # Start skill selection
      start_limit_select
    end
    #--------------------------------------------------------------------------
    # * Start Limit Selection
    #--------------------------------------------------------------------------
    def start_limit_select
      # Skill Window
      @limit_skill_window = Window_Skill.new(@active_battler)
        @limit_skill_window.refresh(true, true)
      # Associate help window
      @limit_skill_window.help_window = @help_window
      # Disable actor command window
      @actor_command_window.active = false
      @actor_command_window.visible = false
    end
    #--------------------------------------------------------------------------
    # * Frame Update (actor command phase : limit selection)
    #--------------------------------------------------------------------------
    def update_phase3_limit_select
      # Make skill window visible
      @limit_skill_window.visible = true
      # Update skill window
      @limit_skill_window.update
      # If B button was pressed
      if Input.trigger?(Input::B)
        # Play cancel SE
        $game_system.se_play($data_system.cancel_se)
        # End skill selection
        end_limit_select
        return
      end
      # If C button was pressed
      if Input.trigger?(Input::C)
        # Get currently selected data on the skill window
        @skill = @limit_skill_window.skill
        # If it can't be used
        if @skill == nil or not @active_battler.skill_can_use?(@skill.id)
          # Play buzzer SE
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        # Checks Overdrive
        if @active_battler.limit < 1000
          # Play buzzer SE
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Set action
        @active_battler.current_action.skill_id = @skill.id
        # Make skill window invisible
        @limit_skill_window.visible = false
        # If effect scope is single enemy
        if @skill.scope == 1
          # Start enemy selection
          start_enemy_select
        # If effect scope is single ally
        elsif @skill.scope == 3 or @skill.scope == 5
          # Start actor selection
          start_actor_select
        # If effect scope is not single
        else
          # End skill selection
          end_limit_select
          # Go to command input for next actor
          phase3_next_actor
        end
        # Resets Limit
        @active_battler.limit = 0
        return
      end
    end
    #--------------------------------------------------------------------------
    # * End Skill Selection
    #--------------------------------------------------------------------------
    def end_limit_select
      # Dispose of skill window
      @limit_skill_window.dispose
      @limit_skill_window = nil
      # Hide help window
      @help_window.visible = false
      # Enable actor command window
      @actor_command_window.active = true
      @actor_command_window.visible = true
    end
    #--------------------------------------------------------------------------
    # * End Enemy Selection
    #--------------------------------------------------------------------------
    def end_enemy_select
      seph_limitbreak_scenebattle_endenemyselect
      unless @limit_skill_window ==  nil
        end_limit_select
      end
    end
    #--------------------------------------------------------------------------
    # * End Actor Selection
    #--------------------------------------------------------------------------
    def end_actor_select
      seph_limitbreak_scenebattle_endactorselect
      unless @limit_skill_window ==  nil
        end_limit_select
      end
    end
  end
  
#--------------------------------------------------------------------------
# * End SDK Enable Test
#--------------------------------------------------------------------------
end
there'as Seph's Adv. Limit Break Script.
 
sorry for the double post but I figured it out. Im not very talented at scripting, but im learning!:)

here's what I was missing, It was in the frame_update:
Code:
        when 6  # limit break
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to end game screen
        $scene = Scene_LimitBreak.new
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top