can any one tell me how to instal this on my script
Code:
#==============================================================================# Kingdom Hearts Battle System#--------------------------------------------------------------------------# Orginal Battle System Created By Near Fantastica. Give Him most of the credit. My job was easy# Created By SephirothSpawn (11.30.05)# Last Updated: 11.30.05# Updated: Eliminated Lag!# Updated: Fixed Defeated Event Bug# Updated: Added Multiple Command Feature#--------------------------------------------------------------------------# Instructions:# ~ Insert Below Nears ABS.# ~ Delete Scene Battle In Near's Code# ~ In Scene Map, find the lines and delete them:# # If B button was pressed# if Input.trigger?(Input::# # If event is running, or menu is not forbidden# unless $game_system.map_interpreter.running? or# $game_system.menu_disabled# # Set menu calling flag or beep flag# $game_temp.menu_calling = true# $game_temp.menu_beep = true# end# end#==============================================================================#==============================================================================# ** Class Window_Base#==============================================================================class Window_Base #-------------------------------------------------------------------------- # Draw Inverted Bar # Credit Near Fantastica for Orginal Script #-------------------------------------------------------------------------- def draw_invert_bar(x, y, min, max, width = 152, height = 20, bar_color = Color.new(0, 0, 200, 255)) w = width * min / max for i in 0..height r = bar_color.red * (height -i)/height + 0 * i/height g = bar_color.green * (height -i)/height + 0 * i/height b = bar_color.blue * (height -i)/height + 0 * i/height a = bar_color.alpha * (height -i)/height + 255 * i/height self.contents.fill_rect(x - w, y+i, w , 1, Color.new(r, g, b, a)) end end #-------------------------------------------------------------------------- # * Draw Face # actor : actor's face #-------------------------------------------------------------------------- def draw_face(x, y, actor, border = true) if border bitmap = RPG::Cache.character("Faces/Background", 0) src_rect = Rect.new(0, 0, bitmap.width, bitmap.height) self.contents.blt(x, y, bitmap, src_rect) end bitmap = RPG::Cache.character("Faces/#{actor.character_name}", actor.character_hue) src_rect = Rect.new(0, 0, bitmap.width, bitmap.height) self.contents.blt(x, y, bitmap, src_rect) if border bitmap = RPG::Cache.character("Faces/Border", 0) src_rect = Rect.new(0, 0, bitmap.width, bitmap.height) self.contents.blt(x - 6, y - 6, bitmap, src_rect) end endend #==============================================================================# â– Window_Selectable#==============================================================================class Window_Selectable < Window_Base # Changes Index to an Accessor, for refreshing attr_accessor :indexend#==============================================================================# ** Window_Command#==============================================================================class Window_Command < Window_Selectable # Changes Commands to an Accessor, for refreshing attr_accessor :commandsend#==============================================================================# ** Window_ABS_Skill#==============================================================================class Window_ABS_Skill < Window_Selectable # Commands Into An Accessor attr_accessor :commands #-------------------------------------------------------------------------- # * Object Initialization # actor : actor #-------------------------------------------------------------------------- def initialize super(4, 316, 240, 160) self.opacity = 175 refresh self.index = 0 end #-------------------------------------------------------------------------- # * Acquiring Skill #-------------------------------------------------------------------------- def skill return @commands[self.index] end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh(actor= $game_party.actors[0]) @actor = actor if self.contents != nil self.contents.dispose self.contents = nil end @commands = [] for i in 0...@actor.skills.size skill = $data_skills[@actor.skills[i]] if skill != nil @commands.push(skill) end end # If item count is not 0, make a bit map and draw all items @item_max = @commands.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) skill = @commands[index] self.contents.font.name = $defaultfonttype self.contents.font.color = check_skill(skill) ? normal_color : disabled_color x = 4 y = index * 32 rect = Rect.new(x, y, self.width - 32, 32) self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) bitmap = RPG::Cache.icon(skill.icon_name) opacity = self.contents.font.color == normal_color ? 255 : 128 self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity) self.contents.draw_text(x + 28, y, contents.width - 28, 32, skill.name) self.contents.draw_text(-x, y, contents.width, 32, skill.sp_cost.to_s, 2) end #-------------------------------------------------------------------------- # * Check Skill #-------------------------------------------------------------------------- def check_skill(skill) actor = $game_party.actors[0] if skill == nil or not actor.skills.include?(skill.id) or actor.sp < skill.sp_cost return false else return true end end #-------------------------------------------------------------------------- # * Help Text Update #-------------------------------------------------------------------------- def update_help @help_window.set_text(self.skill == nil ? "" : self.skill.description) endend#==============================================================================# ** Window_ABS_Item#==============================================================================class Window_ABS_Item < Window_Selectable # Commands Into An Accessor attr_accessor :commands #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super(4, 316, 240, 160) self.opacity = 175 refresh self.index = 0 end #-------------------------------------------------------------------------- # * Get Item #-------------------------------------------------------------------------- def item return @commands[self.index] end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh if self.contents != nil self.contents.dispose self.contents = nil end @commands = [] # Add item for i in 1...$data_items.size if $game_party.item_number(i) > 0 @commands.push($data_items[i]) end end # If item count is not 0, make a bit map and draw all items @item_max = @commands.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) item = @commands[index] number = $game_party.item_number(item.id) self.contents.font.name = $defaultfonttype self.contents.font.color = $game_party.item_can_use?(item.id) ? normal_color : disabled_color x = 4 y = index * 32 rect = Rect.new(x, y, self.width - 32, 32) self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) bitmap = RPG::Cache.icon(item.icon_name) opacity = self.contents.font.color == normal_color ? 255 : 128 self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity) self.contents.draw_text(x + 28, y, 212, 32, item.name, 0) self.contents.draw_text(-x - 28, y, contents.width, 32, ":", 2) self.contents.draw_text(-x, y, contents.width, 32, number.to_s, 2) end #-------------------------------------------------------------------------- # * Help Text Update #-------------------------------------------------------------------------- def update_help @help_window.set_text(self.item == nil ? "" : self.item.description) endend#==============================================================================# ** Window_HotKeys#==============================================================================class Window_HotKeys < Window_Base #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super(200, 160, 240, 160) self.opacity = 178 self.visible = false self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.name = $defaultfonttype refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear # Hot Key 1 unless $ABS.skill_key[1] == 0 skill = $data_skills[$ABS.skill_key[1]] self.contents.font.color = check_skill(skill) ? normal_color : disabled_color self.contents.draw_text(4, 0, contents.width, 32, " (H) #{skill.name}") else self.contents.font.color = check_skill(skill) ? normal_color : disabled_color self.contents.draw_text(4, 0, contents.width, 32, " (H) Unassigned Skill") end # Hot Key 2 unless $ABS.skill_key[2] == 0 skill = $data_skills[$ABS.skill_key[2]] self.contents.font.color = check_skill(skill) ? normal_color : disabled_color self.contents.draw_text(4, 32, contents.width, 32, " (J) #{skill.name}") else self.contents.font.color = check_skill(skill) ? normal_color : disabled_color self.contents.draw_text(4, 32, contents.width, 32, " (J) Unassigned Skill") end # Hot Key 3 unless $ABS.skill_key[3] == 0 skill = $data_skills[$ABS.skill_key[3]] self.contents.font.color = check_skill(skill) ? normal_color : disabled_color self.contents.draw_text(4, 64, contents.width, 32, " (K) #{skill.name}") else self.contents.font.color = check_skill(skill) ? normal_color : disabled_color self.contents.draw_text(4, 64, contents.width, 32, " (K) Unassigned Skill") end # Hot Key 4 unless $ABS.skill_key[4] == 0 skill = $data_skills[$ABS.skill_key[4]] self.contents.font.color = check_skill(skill) ? normal_color : disabled_color self.contents.draw_text(4, 96, contents.width, 32, " (L) #{skill.name}") else self.contents.font.color = check_skill(skill) ? normal_color : disabled_color self.contents.draw_text(4, 96, contents.width, 32, " (L) Unassigned Skill") end end #-------------------------------------------------------------------------- # * Check Skill #-------------------------------------------------------------------------- def check_skill(skill) actor = $game_party.actors[0] if skill == nil or not actor.skills.include?(skill.id) or actor.sp < skill.sp_cost return false else return true end endend#==============================================================================# ** Window_ABS_Controls#==============================================================================class Window_ABS_Controls < Window_Base #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super(160, 30, 320, 416) self.opacity = 175 self.z = 1000 self.visible = false self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.name = $defaultfonttype refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear contents.font.color = system_color contents.draw_text(0, 0, contents.width, 24, "Kingdom Hearts Controls", 1) contents.font.color = normal_color keys = ["F", "G", "H", "J", "K", "L", "I", "O", "E", "R", "T", "Y", "U", "N", "M"] controls = ["Melee Attack", "Range Attack", "Skill Key 1", "Skill Key 2", "Skill Key 3", "Skill Key 4", "Dash", "Sneak", "Change Lead Forward", "Change Lead Backwards", "Waits Leader", "Waits Allies", "Gathers Allies", "Wide Follow", "Close Follow"] for i in 0...keys.size self.contents.draw_text(4, (i + 1) * 24, contents.width, 24, "(#{keys[i]})") self.contents.draw_text(40, (i + 1) * 24, contents.width, 24, controls[i]) end endend#==============================================================================# ** Window_KH_Controls#==============================================================================class Window_KH_Controls < Window_Base #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super(140, 92, 360, 296) self.opacity = 175 self.z = 1000 self.visible = false self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.name = $defaultfonttype refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear contents.font.color = system_color contents.draw_text(0, 0, contents.width, 24, "Kingdom Hearts Controls", 1) contents.font.color = normal_color keys = ["Enter", "Esc", "Shift", "Shift", "P", "[", "]", "Q", "W", "A"] controls = ["Actions From Command", "Returns Previous Menu", "Moves Index Up", "Moves Index Down", "Toggles Player HUD", "Toggles Ally HUD", "Toggles Help Window", "Shows ABS Keys", "Shows KH Keys", "Shows Hot Keys"] for i in 0...keys.size self.contents.draw_text(4, (i + 1) * 24, contents.width, 24, "(#{keys[i]})") self.contents.draw_text(80, (i + 1) * 24, contents.width, 24, controls[i]) end endend#==============================================================================# ** Window_KH_PlayerHUD#==============================================================================class Window_KH_PlayerHUD < Window_Base #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super(28, 320, 640, 172) self.opacity = 0 self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.name = $defaultfonttype update end #-------------------------------------------------------------------------- # * Update #-------------------------------------------------------------------------- def update super self.contents.clear actor = $game_party.actors[0] # Draw HP Bar draw_invert_bar(458, 0, actor.hp, actor.maxhp, actor.maxhp / 25, 34, bar_color = Color.new(0, 255, 0, 255)) # Draw SP Bar draw_invert_bar(458, 35, actor.sp, actor.maxsp, actor.maxsp / 25, 34, bar_color = Color.new(0, 0, 255, 255)) # Draw Dash Bar case $ABS.dash_level when 0 .. 1 ;bar_color = Color.new(255, 255, 0, 255) when 2 .. 3 ;bar_color = Color.new(255, 150, 0, 255) else ;bar_color = Color.new(255, 0, 0, 255) end draw_invert_bar(458, 70, $ABS.dash_level, 5, 75, 34, bar_color) # Draw Sneak Bar case $ABS.sneak_level when 0 .. 1 ;bar_color = Color.new(255, 255, 0, 255) when 2 .. 3 ;bar_color = Color.new(255, 150, 0, 255) else ;bar_color = Color.new(255, 0, 0, 255) end draw_invert_bar(458, 105, $ABS.sneak_level, 5, 50, 34, bar_color) # Draws Face draw_face(460, 6, actor) endend#==============================================================================# ** Window_KH_PlayerHUD#==============================================================================class Window_KH_AlliesHUD < Window_Base #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super(158, 0, 482, 80) self.opacity = 0 self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.name = $defaultfonttype update end #-------------------------------------------------------------------------- # * Update #-------------------------------------------------------------------------- def update self.contents.clear for i in 1...$game_party.actors.size x = i * 150 - 16 actor = $game_party.actors[i] draw_actor_graphic(actor, x, 48) draw_invert_bar(x - 24, 3, actor.hp, actor.maxhp, 100, 18, bar_color = Color.new(0, 255, 0, 255)) draw_invert_bar(x - 24, 27, actor.sp, actor.maxsp, 100, 18, bar_color = Color.new(0, 0, 255, 255)) end endend#======================================# ** Action_Battle_System#======================================class Action_Battle_System alias kh_hit_actor hit_actor #-------------------------------------------------------------------------- def update_dash if Kboard.keyb($R_Key_I) == 1 if $game_player.moving? @dashing = true $game_player.move_speed = 5 for ally in $game_allies.values ally.move_speed = 5 end @dash_restore = false if @dash_reduce == false @dash_timer = 50 # Initial time off set @dash_reduce = true else @dash_timer-= 1 end @dash_sec = (@dash_timer / Graphics.frame_rate)%60 if @dash_sec == 0 if @dash_level != 0 @dash_level -= 1 @dash_timer = 50 # Timer Count unless $player_hud == nil $player_hud.update if $player_hud.visible end end end if @dash_level == 0 @dashing = false $game_player.move_speed = 4 for ally in $game_allies.values ally.move_speed = 4 end end end else @dashing = false $game_player.move_speed = 4 for ally in $game_allies.values ally.move_speed = 4 end @dash_reduce = false if @dash_restore == false @dash_timer = 80 # Initial time off set @dash_restore = true else @dash_timer-= 1 end @dash_sec = (@dash_timer / Graphics.frame_rate)%60 if @dash_sec == 0 if @dash_level != 5 @dash_level+= 1 @dash_timer = 60 unless $player_hud == nil $player_hud.update if $player_hud.visible end end end end end #-------------------------------------------------------------------------- def update_sneak if Kboard.keyb($R_Key_O) == 1 if $game_player.moving? @sneaking = true $game_player.move_speed = 3 for ally in $game_allies.values ally.move_speed = 3 end @sneak_restore = false if @sneak_reduce == false @sneak_timer = 50 # Initial time off set @sneak_reduce = true else @sneak_timer-= 1 end @sneak_sec = (@sneak_timer / Graphics.frame_rate)%60 if @sneak_sec == 0 if @sneak_level != 0 @sneak_level -= 1 @sneak_timer = 100 # Timer Count unless $player_hud == nil $player_hud.update if $player_hud.visible end end end if @sneak_level == 0 @sneaking = false $game_player.move_speed = 4 for ally in $game_allies.values ally.move_speed = 4 end end end else @sneaking = false $game_player.move_speed = 4 for ally in $game_allies.values ally.move_speed = 4 end @sneak_reduce = false if @sneak_restore == false @sneak_timer = 80 # Initial time off set @sneak_restore = true else @sneak_timer-= 1 end @sneak_sec = (@sneak_timer / Graphics.frame_rate)%60 if @sneak_sec == 0 if @sneak_level != 5 @sneak_level+= 1 @sneak_timer = 60 # Timer Count unless $player_hud == nil $player_hud.update if $player_hud.visible end end end end end #-------------------------------------------------------------------------- def hit_actor(object, enemy) kh_hit_actor(object, enemy) unless $player_hud == nil $player_hud.update if $player_hud.visible end unless $allies_hud == nil $allies_hud.update if $allies_hud.visible end end #-------------------------------------------------------------------------- def ally_heal?(ally) lowest_actor = $game_party.actors[0] for actor in $game_party.actors if lowest_actor.hp > actor.hp and actor.hp != actor.maxhp and actor.dead? == false lowest_actor = actor end end return false if lowest_actor.hp == lowest_actor.maxhp and !lowest_actor.dead? ally_actor = $game_party.actors[ally.actor_id] for id in ally_actor.skills skill = $data_skills[id] next if skill.scope != 3 next if skill.element_set.include?($RANGE_ELEMENT_ID) == true next if skill.sp_cost > ally_actor.sp next if skill.power >= 0 next if (lowest_actor.hp/2) > skill.power.abs lowest_actor.effect_skill(ally_actor, skill) ally_actor.sp -= skill.sp_cost index = $game_party.actors.index(lowest_actor) if index == 0 $game_player.animation_id = skill.animation2_id else $game_allies[index].animation_id = skill.animation2_id end unless $player_hud == nil $player_hud.update if $player_hud.visible end unless $allies_hud == nil $allies_hud.update if $allies_hud.visible end return true end return false end #-------------------------------------------------------------------------- def ally_cure?(ally) lowest_actor = $game_party.actors[0] for actor in $game_party.actors if lowest_actor.states.size > actor.states.size and actor.dead? == false lowest_actor = actor end end return false if lowest_actor.states.size == 0 ally_actor = $game_party.actors[ally.actor_id] for id in ally_actor.skills skill = $data_skills[id] next if skill.scope != 3 next if skill.element_set.include?($RANGE_ELEMENT_ID) == true next if skill.sp_cost > ally_actor.sp next if skill.minus_state_set == [] next if skill.plus_state_set != [] lowest_actor.effect_skill(ally_actor, skill) ally_actor.sp -= skill.sp_cost index = $game_party.actors.index(lowest_actor) if index == 0 $game_player.animation_id = skill.animation2_id else $game_allies[index].animation_id = skill.animation2_id end unless $player_hud == nil $player_hud.update if $player_hud.visible end unless $allies_hud == nil $allies_hud.update if $allies_hud.visible end return true end return false end #--------------------------------------------------------------------------end#======================================# ** Scene Map#======================================class Scene_Map #-------------------------------------------------------------------------- alias abs_scene_map_main main alias abs_scene_map_update update alias abs_scene_map_transfer_player transfer_player #-------------------------------------------------------------------------- attr_accessor :spriteset #-------------------------------------------------------------------------- def main # Help Window @help_window = Window_Help.new @help_window.z = 100 @help_window.opacity = 150 @help_window.visible = false # Command Window commands = ["Melee Attack", "Ranged Attack", "Skill", "Item"] @command_window = Window_Command.new(160, commands) @command_window.x = 4 @command_window.y = 316 @command_window.opacity = 175 @command_window.update # Skills Window @skills_window = Window_ABS_Skill.new @skills_window.active = @skills_window.visible = false @skills_window.update # Items Window @items_window = Window_ABS_Item.new @items_window.active = @items_window.visible = false @items_window.update # Actors Window commands = [] for actor in $game_party.actors commands.push(actor.name) end @actors_window = Window_Command.new(160, commands) @actors_window.x = 4 @actors_window.y = 316 @actors_window.opacity = 175 @actors_window.active = @actors_window.visible = false @actors_window.update # Hot Keys Window @hot_keys_window = Window_HotKeys.new # ABS Controls Window @abs_controls_window = Window_ABS_Controls.new # Window_KH_Controls @kh_controls_window = Window_KH_Controls.new # Player HUD $player_hud = Window_KH_PlayerHUD.new # Allies HUD $allies_hud = Window_KH_AlliesHUD.new # Stores ABS Window Objects @objects = [@help_window, @command_window, @skills_window, @items_window, @actors_window, @hot_keys_window, @abs_controls_window, @kh_controls_window, $player_hud, $allies_hud] # Default Main Method abs_scene_map_main # Disposes ABS Obejcts @objects.each {|x| x.dispose} end #-------------------------------------------------------------------------- def update # Changes Main Option to Talk if game Event switch = false for event in $game_map.events.values unless $ABS.enemies.include?(event.id) || event.is_a?(Game_Ally) || event.character_name == "" if $ABS.in_range?(event, $game_player, 1) switch = true command = "Talk" for i in 0...event.list.size if event.list[i].code == 108 && event.list[i].parameters[0].include?('(KH)') command = event.list[i].parameters[0].dup.delete!('(KH)') end end end end end if switch unless @command_window.commands[0] == command @command_window.commands[0] = command @command_window.refresh end else unless @command_window.commands == "Melee Attack" @command_window.commands[0] = "Melee Attack" @command_window.refresh end end # Update Help Window if @help_window.visible if @command_window.active case @command_window.index when 0 ;text = "Melee Attack an Enemy with a basic Attack" when 1 ;text = "Attack Enemy with a ranged Attack" when 2 ;text = "Select a Skill to use against your enemies" when 3 ;text = "Use an Item to Support the Battle" end @help_window.set_text(text) elsif @skills_window.active @skills_window.help_window = @help_window elsif @items_window.active @items_window.help_window = @help_window else @help_window.set_text("Select Member to Use Item on") end end # Returns to Previous Menu, or Main Menu if Input.trigger?(Input:: if @command_window.active unless $game_system.map_interpreter.running? or $game_system.menu_disabled $game_temp.menu_calling = true $game_temp.menu_beep = true end elsif @skills_window.active @skills_window.active = @skills_window.visible = false @command_window.active = @command_window.visible = true elsif @items_window.active @items_window.active = @items_window.visible = false @command_window.active = @command_window.visible = true else @actors_window.active = @actors_window.visible = false @items_window.active = @items_window.visible = true end end # Performs Action from Command Window, Skill Window or Item Window if Input.trigger?(Input::C) # Command Window if @command_window.active case @command_window.index when 0 # Attack $ABS.player_attack when # Ranged Attack $ABS.player_ranged when 2 # Open Skills Menu @command_window.active = @command_window.visible = false @skills_window.refresh @skills_window.active = @skills_window.visible = true when 3 # Open Items Menu @command_window.active = @command_window.visible = false @items_window.refresh @items_window.active = @items_window.visible = true end # Skill Window elsif @skills_window.active temp = $ABS.skill_key[1] $ABS.skill_key[1] = $game_party.actors[0].skills[@skills_window.index] $ABS.player_skill(1) $ABS.skill_key[1] = temp @skills_window.refresh # Item Window elsif @items_window.active @item = @items_window.item unless @item.is_a?(RPG::Item) or $game_party.item_can_use?(@item.id) $game_system.se_play($data_system.buzzer_se) return end $game_system.se_play($data_system.decision_se) if @item.scope >= 3 @items_window.active = @items_window.visible = false @actors_window.active = @actors_window.visible = true else if @item.common_event_id > 0 $game_temp.common_event_id = @item.common_event_id $game_system.se_play(@item.menu_se) if @item.consumable $game_party.lose_item(@item.id, 1) @item_window.draw_item(@item_window.index) end end end else target = $game_party.actors[@actors_window.index] used = target.item_effect(@item) if used $game_system.se_play(@item.menu_se) if @item.consumable $game_party.lose_item(@item.id, 1) end @actors_window.active = @actors_window.visible = false @command_window.active = @command_window.visible = true end unless used $game_system.se_play($data_system.buzzer_se) end end end # Toggle HUD Window if Kboard.keyboard($R_Key_P) $player_hud.visible = $player_hud.visible ? false : true end # Toggle Ally Window if Kboard.keyboard(0xDB) $allies_hud.visible = $allies_hud.visible ? false : true end # Toggle Help Window if Kboard.keyboard(0xDD) @help_window.visible = @help_window.visible ? false : true end # Toggles Hot Keys if Input.press?(Input::X) @hot_keys_window.visible = true else @hot_keys_window.visible = false end # Toggles ABS Controls Window if Input.press?(Input::L) @abs_controls_window.visible = true else @abs_controls_window.visible = false end # Toggles KH Controls Window if Input.press?(Input::R) @kh_controls_window.visible = true else @kh_controls_window.visible = false end # Moves Cursor Down if Input.trigger?(Input::CTRL) if @command_window.active if @command_window.index == @command_window.commands.size - 1 @command_window.index = 0 else @command_window.index += 1 end @command_window.update elsif @skills_window.active if @skills_window.index == @skills_window.commands.size - 1 @skills_window.index = 0 else @skills_window.index += 1 end @skills_window.update elsif @items_window.active if @items_window.index == @skills_window.commands.size - 1 @items_window.index = 0 else @items_window.index += 1 end @items_window.update elsif @actors_window.active if @actors_window.index == @skills_window.commands.size - 1 @actors_window.index = 0 else @actors_window.index += 1 end @actors_window.update end end # Moves Cursor UP if Input.trigger?(Input::A) if @command_window.active if @command_window.index == 0 @command_window.index = @command_window.commands.size - 1 else @command_window.index -= 1 end @command_window.update elsif @skills_window.active if @skills_window.index == 0 @skills_window.index = @skills_window.commands.size - 1 else @skills_window.index -= 1 end @skills_window.update elsif @items_window.active if @items_window.index == 0 @items_window.index = @skills_window.commands.size - 1 else @items_window.index -= 1 end @items_window.update elsif @actors_window.active if @actors_window.index == 0 @actors_window.index = @skills_window.commands.size - 1 else @actors_window.index -= 1 end @actors_window.update end end # F â— Melee Attack if Kboard.keyboard($R_Key_F) $ABS.player_attack end # G â— Range Attack if Kboard.keyboard($R_Key_G) $ABS.player_ranged end # H â— Skill Key 1 if Kboard.keyboard($R_Key_H) $ABS.player_skill(1) end # J â— Skill Key 2 if Kboard.keyboard($R_Key_J) $ABS.player_skill(2) end # K â— Skill Key 3 if Kboard.keyboard($R_Key_K) $ABS.player_skill(3) end # L â— Skill Key 4 if Kboard.keyboard($R_Key_L) $ABS.player_skill(4) end # E â— Change Lead Forward if Kboard.keyboard($R_Key_E) $game_party.shift_forward end # R â— Change Lead Backwards if Kboard.keyboard($R_Key_R) $game_party.shift_backward end # T â— Waits Leader if Kboard.keyboard($R_Key_T) $game_player.wait_command = true $game_party.shift_forward end # Y â— Waits Allies if Kboard.keyboard($R_Key_Y) for ally in $game_allies.values if ally.map_id == $game_map.map_id ally.wait_command = true end end end # U â— Gathers Allies if Kboard.keyboard($R_Key_U) $ABS.player_engaged = false for ally in $game_allies.values if ally.map_id == $game_map.map_id ally.wait_command = false ally.under_attack = false ally.refresh end end end # N â— Wide Follow if Kboard.keyboard($R_Key_N) $ABS.close_follow = true end # M â— Close Follow if Kboard.keyboard($R_Key_M) $ABS.close_follow = false end for key in $game_allies.keys $game_allies[key].update end $ABS.update if $ABS.transer_player == true transfer end abs_scene_map_update end #-------------------------------------------------------------------------- def transfer $ABS.transer_player = false $game_map.update @spriteset.dispose @spriteset = Spriteset_Map.new if $game_temp.transition_processing $game_temp.transition_processing = false Graphics.transition(20) end $game_map.autoplay Graphics.frame_reset Input.update end #-------------------------------------------------------------------------- def transfer_player for ally in $game_allies.values if ally.wait_command == false and ally.dead == false ally.moveto($game_temp.player_new_x, $game_temp.player_new_y) ally.map_id = $game_temp.player_new_map_id end end $game_player.map_id = $game_temp.player_new_map_id abs_scene_map_transfer_player endend