Sign in to follow this  
Followers 0
xXDarkDragonXx

KGC_EquipAlter

5 posts in this topic

.:KGC_EquipAlter:.
Por: KGC

Buscando en la página de KGC, no entendia tres carajos donde pinchaba yo. xD.png Me tope con este script y de milagro lo traduje. xD.png Lo que hace es que en el menú, al elejir Equipamento, salen tres opciones:

Equipar
Optimo
Quitar Todo

En Equipar elijes lo que quieres equiparte.
Optimo te pone automáticamente el mejor equipamento para ese personaje.
'Quitar todo'... no tiene explicación. xD.png

Bueno, creen clase nueva arriba de Main pero debajo del KGC_Module y peguen dentro esto:

Script:

[spoiler]
CODE
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#_/    ◆装備画面改造 - KGC_EquipAlter◆
#_/----------------------------------------------------------------------------
#_/  装備画面を改造し、[最強装備][全解除]機能を追加します。
#_/  [最強装備]は「武器・盾・頭・身体」のみ変更します(装飾品は無視)。
#_/============================================================================
#_/ ≪装備拡張[EquipExtension]≫より上
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

#==============================================================================
# ★ カスタマイズ項目 ★
#==============================================================================

module KGC
 # ◆操作ウィンドウの形状 [x, y, width]
 #  height は自動算出します。
 EA_COMMAND_SHAPE = [200, 176, 240]
 # ◆操作ウィンドウの行数
 EA_COMMAND_ROWS  = 3
 #  <旧式1>
 # EA_COMMAND_SHAPE = [0, 0, 640]
 # EA_COMMAND_ROWS  = 1
 #  <旧式2>
 # EA_COMMAND_SHAPE = [0, 64, 640]
 # EA_COMMAND_ROWS  = 1

 # ◆最強装備から除外する装備タイプ
 #  除外する装備タイプを格納。
 #  ≪装備拡張≫と併用した場合は≪装備拡張≫を優先。
 EA_IGNORE_STRONGEST_TYPE = [4]

 # ◆「装備変更」名称
 EA_STRING_EQUIP           = "Equipar"
 # ◆「最強装備」名称
 EA_STRING_STRONGEST_EQUIP = "Optimo"
 # ◆「全解除」名称
 EA_STRING_ALL_RELEASE     = "Quitar Todo"

 # ◆「装備変更」ヘルプ
 EA_HELP_EQUIP           = "Elijes que equipar"
 # ◆「最強装備」ヘルプ
 EA_HELP_STRONGEST_EQUIP = "Se equipa lo mejor"
 # ◆「全解除」ヘルプ
 EA_HELP_ALL_RELEASE     = "Deseuipa todo"
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

$imported = {} if $imported == nil
$imported["EquipAlter"] = true

if $game_special_elements == nil
 $game_special_elements = {}
 $data_system = load_data("Data/System.rxdata")
end
# 優先度設定用属性(未使用)
$game_special_elements["equip_prior"] = /最強優先度(\d+)/

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Module_Graphics
#==============================================================================

module Graphics
 unless defined?(transition_interrupt_KGC)
 #--------------------------------------------------------------------------
 # ● トランジション実行
 #--------------------------------------------------------------------------
 class << Graphics
   alias transition_interrupt_KGC transition
 end
 def self.transition(duration = 8, filename = "", vague = 40)
   if @_interrupt_transition
     @_transition_duration = duration
     @_transition_filename = filename.dup
     @_transition_vague = vague
     return
   end

   transition_interrupt_KGC(duration, filename, vague)
 end
 #--------------------------------------------------------------------------
 # ● トランジション割り込み開始
 #--------------------------------------------------------------------------
 def self.start_interrupt_transition
   @_interrupt_transition = true
 end
 #--------------------------------------------------------------------------
 # ● トランジション割り込み終了
 #--------------------------------------------------------------------------
 def self.end_interrupt_transition
   if @_interrupt_transition
     @_interrupt_transition = nil
     transition(@_transition_duration, @_transition_filename,
       @_transition_vague)
     @_transition_duration = @_transition_filename = @_transition_vague = nil
   end
 end
 end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Window_EquipControl
#------------------------------------------------------------------------------
#  装備画面で、操作を選択するウィンドウです。
#==============================================================================

class Window_EquipControl < Window_Selectable
 #--------------------------------------------------------------------------
 # ● オブジェクト初期化
 #--------------------------------------------------------------------------
 def initialize
   super(KGC::EA_COMMAND_SHAPE[0], KGC::EA_COMMAND_SHAPE[1],
     KGC::EA_COMMAND_SHAPE[2], 32)
   self.height = KGC::EA_COMMAND_ROWS * 32 + 32
   self.contents = Bitmap.new(width - 32, height - 32)
   @commands = [KGC::EA_STRING_EQUIP,
     KGC::EA_STRING_STRONGEST_EQUIP,
     KGC::EA_STRING_ALL_RELEASE]
   @item_max = @commands.size
   @column_max = 4 - KGC::EA_COMMAND_ROWS
   @item_width = (width - 32) / @column_max
   self.back_opacity = 160
   self.z = 1000
   self.index = 0
   refresh
 end
 #--------------------------------------------------------------------------
 # ● リフレッシュ
 #--------------------------------------------------------------------------
 def refresh
   rect = Rect.new(0, 0, @item_width, 32)
   for i in [email protected]
     rect.x = (i % @column_max) * @item_width
     rect.y = (i / @column_max) * 32
     self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
     self.contents.draw_text(rect, @commands[i], 1)
   end
 end
 #--------------------------------------------------------------------------
 # ● カーソルの矩形更新
 #--------------------------------------------------------------------------
 def update_cursor_rect
   if index != -1
     dx = (index % @column_max) * @item_width
     dy = (index / @column_max) * 32
     self.cursor_rect.set(dx, dy, @item_width, 32)
   end
 end
 #--------------------------------------------------------------------------
 # ● ヘルプテキスト更新
 #--------------------------------------------------------------------------
 def update_help
   case self.index
   when 0
     @help_window.set_text(KGC::EA_HELP_EQUIP)
   when 1
     @help_window.set_text(KGC::EA_HELP_STRONGEST_EQUIP)
   when 2
     @help_window.set_text(KGC::EA_HELP_ALL_RELEASE)
   end
 end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Window_EquipLeft
#==============================================================================

class Window_EquipLeft < Window_Base
 #--------------------------------------------------------------------------
 # ● 公開インスタンス変数
 #--------------------------------------------------------------------------
 attr_accessor :new_equip                # 選択中の装備品
 attr_accessor :last_str                 # 変更前の腕力
 attr_accessor :last_dex                 # 変更前の器用さ
 attr_accessor :last_agi                 # 変更前の素早さ
 attr_accessor :last_int                 # 変更前の魔力
 #--------------------------------------------------------------------------
 # ● オブジェクト初期化
 #--------------------------------------------------------------------------
 alias initialize_KGC_EquipAlter initialize
 def initialize(actor)
   # 元の処理を実行
   initialize_KGC_EquipAlter(actor)

   # 初期能力値を保存
   @new_equip, @last_equip = nil, nil
   @last_str = @actor.str
   @last_dex = @actor.dex
   @last_agi = @actor.agi
   @last_int = @actor.int
 end
 #--------------------------------------------------------------------------
 # ● リフレッシュ
 #--------------------------------------------------------------------------
 def refresh
   self.contents.clear
   draw_actor_name(@actor, 4, 0)
   draw_actor_level(@actor, 4, 32)
   if $imported["EquipExtension"] && KGC::EEX_USE_EP
     if KGC::EEX_DRAW_EP_MAX
       self.contents.font.color = system_color
       self.contents.draw_text(140, 0, 32, 32, KGC::EEX_EP_NAME)
       self.contents.font.color = @actor.ep == 0 ? knockout_color : normal_color
       self.contents.draw_text(172, 0, 24, 32, @actor.ep.to_s, 2)
       self.contents.font.color = normal_color
       self.contents.draw_text(196, 0, 16, 32, "/", 1)
       self.contents.draw_text(212, 0, 24, 32, @actor.max_ep.to_s, 2)
     else
       self.contents.font.color = system_color
       self.contents.draw_text(180, 0, 32, 32, KGC::EEX_EP_NAME)
       self.contents.font.color = @actor.ep == 0 ? knockout_color : normal_color
       self.contents.draw_text(212, 0, 24, 32, @actor.ep.to_s, 2)
     end
   end
   self.contents.font.color = system_color
   self.contents.draw_text(4, 64, 72, 32, $data_system.words.atk)
   self.contents.draw_text(4, 96, 72, 32, $data_system.words.pdef)
   self.contents.draw_text(4, 128, 72, 32, $data_system.words.mdef)
   self.contents.draw_text(120, 32, 72, 32, $data_system.words.str)
   self.contents.draw_text(120, 64, 72, 32, $data_system.words.dex)
   self.contents.draw_text(120, 96, 72, 32, $data_system.words.agi)
   self.contents.draw_text(120, 128, 72, 32, $data_system.words.int)

   if @new_atk != nil
     self.contents.font.color = @actor.atk > @new_atk ? text_color(2) :
       @actor.atk < @new_atk ? text_color(3) : normal_color
     self.contents.draw_text(80, 64, 36, 32, @new_atk.to_s, 2)
   else
     self.contents.font.color = normal_color
     self.contents.draw_text(80, 64, 36, 32, @actor.atk.to_s, 2)
   end
   if @new_pdef != nil
     self.contents.font.color = @actor.pdef > @new_pdef ? text_color(2) :
       @actor.pdef < @new_pdef ? text_color(3) : normal_color
     self.contents.draw_text(80, 96, 36, 32, @new_pdef.to_s, 2)
   else
     self.contents.font.color = normal_color
     self.contents.draw_text(80, 96, 36, 32, @actor.pdef.to_s, 2)
   end
   if @new_mdef != nil
     self.contents.font.color = @actor.mdef > @new_mdef ? text_color(2) :
       @actor.mdef < @new_mdef ? text_color(3) : normal_color
     self.contents.draw_text(80, 128, 36, 32, @new_mdef.to_s, 2)
   else
     self.contents.font.color = normal_color
     self.contents.draw_text(80, 128, 36, 32, @actor.mdef.to_s, 2)
   end
   if @new_str != nil
     self.contents.font.color = @last_str > @new_str ? text_color(2) :
       @last_str < @new_str ? text_color(3) : normal_color
     self.contents.draw_text(200, 32, 36, 32, @new_str.to_s, 2)
   else
     self.contents.font.color = normal_color
     self.contents.draw_text(200, 32, 36, 32, @actor.str.to_s, 2)
   end
   if @new_dex != nil
     self.contents.font.color = @last_dex > @new_dex ? text_color(2) :
       @last_dex < @new_dex ? text_color(3) : normal_color
     self.contents.draw_text(200, 64, 36, 32, @new_dex.to_s, 2)
   else
     self.contents.font.color = normal_color
     self.contents.draw_text(200, 64, 36, 32, @actor.dex.to_s, 2)
   end
   if @new_agi != nil
     self.contents.font.color = @last_agi > @new_agi ? text_color(2) :
       @last_agi < @new_agi ? text_color(3) : normal_color
     self.contents.draw_text(200, 96, 36, 32, @new_agi.to_s, 2)
   else
     self.contents.font.color = normal_color
     self.contents.draw_text(200, 96, 36, 32, @actor.agi.to_s, 2)
   end
   if @new_int != nil
     self.contents.font.color = @last_int > @new_int ? text_color(2) :
       @last_int < @new_int ? text_color(3) : normal_color
     self.contents.draw_text(200, 128, 36, 32, @new_int.to_s, 2)
   else
     self.contents.font.color = normal_color
     self.contents.draw_text(200, 128, 36, 32, @actor.int.to_s, 2)
   end
 end
 #--------------------------------------------------------------------------
 # ● 装備変更後のパラメータ設定
 #--------------------------------------------------------------------------
 def set_new_parameters(new_atk, new_pdef, new_mdef, new_st = [nil, nil, nil, nil])
   if @new_atk != new_atk || @new_pdef != new_pdef || @new_mdef != new_mdef ||
       @new_str != new_st[0] || @new_dex != new_st[1] ||
       @new_agi != new_st[2] || @new_int != new_st[3]
     @new_atk = new_atk
     @new_pdef = new_pdef
     @new_mdef = new_mdef
     @new_str = new_st[0]
     @new_dex = new_st[1]
     @new_agi = new_st[2]
     @new_int = new_st[3]
     @last_equip = @new_equip
     refresh
     return
   end
 end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Window_EquipRight
#==============================================================================

class Window_EquipRight < Window_Selectable
 #--------------------------------------------------------------------------
 # ● オブジェクト初期化
 #     actor : アクター
 #--------------------------------------------------------------------------
 alias initialize_KGC_EquipAlter initialize
 def initialize(actor)
   # 元の処理を実行
   initialize_KGC_EquipAlter(actor)

   self.active = false
 end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Scene_Equip
#==============================================================================

class Scene_Equip
 #--------------------------------------------------------------------------
 # ● オブジェクト初期化
 #     actor_index : アクターインデックス
 #     equip_index : 装備インデックス
 #--------------------------------------------------------------------------
 alias initialize_KGC_EquipAlter initialize
 def initialize(actor_index = 0, equip_index = 0)
   # 元の処理を実行
   initialize_KGC_EquipAlter(actor_index, equip_index)

   # 装備タイプを定義
   if $imported["EquipExtension"]
     actor = $game_party.actors[@actor_index]
     @equip_type = actor.equip_type.dup
     if actor.two_swords?
       for i in 1...actor.ts_number
         @equip_type[i] = 0
       end
     end
   else
     @equip_type = [0, 1, 2, 3, 4]
   end
 end
 #--------------------------------------------------------------------------
 # ● メイン処理
 #--------------------------------------------------------------------------
 alias main_KGC_EquipAlter main
 def main
   # 操作ウィンドウを作成
   @control_window = Window_EquipControl.new
   Graphics.start_interrupt_transition

   main_KGC_EquipAlter

   # ウィンドウを解放
   @control_window.dispose
 end
 #--------------------------------------------------------------------------
 # ● リフレッシュ
 #--------------------------------------------------------------------------
 unless $imported["EquipExtension"]
 def refresh
   # アイテムウィンドウの可視状態設定
   @item_window1.visible = (@right_window.index == 0)
   @item_window2.visible = (@right_window.index == 1)
   @item_window3.visible = (@right_window.index == 2)
   @item_window4.visible = (@right_window.index == 3)
   @item_window5.visible = (@right_window.index == 4)
   # 現在装備中のアイテムを取得
   item1 = @right_window.item
   # 現在のアイテムウィンドウを @item_window に設定
   case @right_window.index
   when 0
     @item_window = @item_window1
   when 1
     @item_window = @item_window2
   when 2
     @item_window = @item_window3
   when 3
     @item_window = @item_window4
   when 4
     @item_window = @item_window5
   end
   # ライトウィンドウがアクティブの場合
   if @right_window.active
     # 装備変更後のパラメータを消去
     @left_window.set_new_parameters(nil, nil, nil)
   end
   # アイテムウィンドウがアクティブの場合
   if @item_window.active
     # 現在選択中のアイテムを取得
     item2 = @item_window.item
     # 装備を変更
     last_hp = @actor.hp
     last_sp = @actor.sp
     if $imported["EquipDetailSetting"]
       @actor.equip(@right_window.index, item2 == nil ? 0 : item2.id, true)
     else
       @actor.equip(@right_window.index, item2 == nil ? 0 : item2.id)
     end
     # 装備変更後のパラメータを取得
     new_atk = @actor.atk
     new_pdef = @actor.pdef
     new_mdef = @actor.mdef
     new_st = [@actor.str, @actor.dex, @actor.agi, @actor.int]
     # 装備を戻す
     @actor.equip(@right_window.index, item1 == nil ? 0 : item1.id)
     @actor.hp = last_hp
     @actor.sp = last_sp
     # レフトウィンドウに描画
     @left_window.set_new_parameters(new_atk, new_pdef, new_mdef, new_st)
   end
 end
 end
 #--------------------------------------------------------------------------
 # ● フレーム更新
 #--------------------------------------------------------------------------
 def update
   if @control_window.help_window == nil
     @control_window.help_window = @help_window
     Graphics.end_interrupt_transition
   end
   # ウィンドウを更新
   @left_window.update
   @right_window.update
   @item_window.update
   @control_window.update
   refresh
   # ライトウィンドウがアクティブの場合: update_right を呼ぶ
   if @right_window.active
     update_right
     return
   end
   # アイテムウィンドウがアクティブの場合: update_item を呼ぶ
   if @item_window.active
     update_item
     return
   end
   # 操作ウィンドウがアクティブの場合: update_control を呼ぶ
   if @control_window.active
     update_control
     return
   end
 end
 #--------------------------------------------------------------------------
 # ● フレーム更新 (ライトウィンドウがアクティブの場合)
 #--------------------------------------------------------------------------
 def update_right
   # B ボタンが押された場合
   if Input.trigger?(Input::B)
     # キャンセル SE を演奏
     $game_system.se_play($data_system.cancel_se)
     # 操作ウィンドウに切り替え
     @right_window.active = false
     @control_window.active = true
     @control_window.visible = true
     # リフレッシュ
     refresh
     return
   end
   # C ボタンが押された場合
   if Input.trigger?(Input::C)
     # 装備固定の場合
     if @actor.equip_fix?(@right_window.index)
       # ブザー SE を演奏
       $game_system.se_play($data_system.buzzer_se)
       return
     end
     # 決定 SE を演奏
     $game_system.se_play($data_system.decision_se)
     # アイテムウィンドウをアクティブ化
     @right_window.active = false
     @item_window.active = true
     @item_window.index = 0
     return
   end
 end
 #--------------------------------------------------------------------------
 # ● フレーム更新 (操作ウィンドウがアクティブの場合)
 #--------------------------------------------------------------------------
 def update_control
   # B ボタンが押された場合
   if Input.trigger?(Input::B)
     # キャンセル SE を演奏
     $game_system.se_play($data_system.cancel_se)
     # メニュー画面に切り替え
     if $imported["MenuAlter"]
       index = KGC::MA_COMMANDS.index(2)
       if index != nil
         $scene = Scene_Menu.new(index)
       else
         $scene = Scene_Menu.new
       end
     else
       $scene = Scene_Menu.new(2)
     end
     return
   end
   # C ボタンが押された場合
   if Input.trigger?(Input::C)
     # カーソル位置で分岐
     case @control_window.index
     when 0  # 装備変更
       # 決定 SE を演奏
       $game_system.se_play($data_system.decision_se)
       # ライトウィンドウに切り替え
       @right_window.active = true
       @right_window.index = 0 if @right_window.index == -1
       @control_window.active = false
       @control_window.visible = false
     when 1  # 最強装備
       # 装備 SE を演奏
       $game_system.se_play($data_system.equip_se)
       # 装備最大数を取得
       if $imported["EquipExtension"]
         mx = @equip_type.size
       else
         mx = 5
       end
       for i in 0...mx
         # 装備固定の場合は次へ
         next if @actor.equip_fix?(i)
         # 装備の種類で分岐
         tw = $imported["EquipExtension"] && @actor.two_swords?
         case i
         when (tw ? [email protected]_number : 0)  # 武器
           # 最強武器装備
           equip_strongest_weapon(i)
         when (tw ? @actor.ts_number : 1)...mx  # 防具
           # 最強防具装備
           equip_strongest_armor(@equip_type[i], i)
         end
       end
       # 初期能力を更新
       @left_window.last_str = @actor.str
       @left_window.last_dex = @actor.dex
       @left_window.last_agi = @actor.agi
       @left_window.last_int = @actor.int
       # レフトウィンドウを初期化
       @left_window.set_new_parameters(nil, nil, nil)
       # ウィンドウをリフレッシュ
       @left_window.refresh
       @right_window.refresh
       @item_window1.refresh
       @item_window2.refresh
       @item_window3.refresh
       @item_window4.refresh
       @item_window5.refresh
       if $imported["EquipExtension"] && KGC::EEX_EQUIP_TYPE_EXT.size > 0
         for i in 0...KGC::EEX_EQUIP_TYPE_EXT.size
           eval("@item_window#{i + 6}.refresh")
         end
       end
     when 2  # 全解除
       # 装備 SE を演奏
       $game_system.se_play($data_system.equip_se)
       # 装備最大数を取得
       if $imported["EquipExtension"]
         mx = @equip_type.size
       else
         mx = 5
       end
       for i in 0...mx
         # 装備固定でない場合は解除
         @actor.equip(i, 0) unless @actor.equip_fix?(i)
       end
       # 初期能力を更新
       @left_window.last_str = @actor.str
       @left_window.last_dex = @actor.dex
       @left_window.last_agi = @actor.agi
       @left_window.last_int = @actor.int
       # レフトウィンドウを初期化
       @left_window.set_new_parameters(nil, nil, nil)
       # ウィンドウをリフレッシュ
       @left_window.refresh
       @right_window.refresh
       @item_window1.refresh
       @item_window2.refresh
       @item_window3.refresh
       @item_window4.refresh
       @item_window5.refresh
       if $imported["EquipExtension"] && KGC::EEX_EQUIP_TYPE_EXT.size > 0
         for i in 0...KGC::EEX_EQUIP_TYPE_EXT.size
           eval("@item_window#{i + 6}.refresh")
         end
       end
     end
     return
   end
   # R ボタンが押された場合
   if Input.trigger?(Input::R)
     # カーソル SE を演奏
     $game_system.se_play($data_system.cursor_se)
     # 次のアクターへ
     @actor_index += 1
     @actor_index %= $game_party.actors.size
     # 別の装備画面に切り替え
     $scene = Scene_Equip.new(@actor_index, @right_window.index)
     return
   end
   # L ボタンが押された場合
   if Input.trigger?(Input::L)
     # カーソル SE を演奏
     $game_system.se_play($data_system.cursor_se)
     # 前のアクターへ
     @actor_index += $game_party.actors.size - 1
     @actor_index %= $game_party.actors.size
     # 別の装備画面に切り替え
     $scene = Scene_Equip.new(@actor_index, @right_window.index)
     return
   end
 end
 #--------------------------------------------------------------------------
 # ● フレーム更新 (アイテムウィンドウがアクティブの場合)
 #--------------------------------------------------------------------------
 alias update_item_KGC_EquipAlter update_item
 def update_item
   # 選択中の装備品を更新
   @left_window.new_equip = @item_window.item
   # B ボタンが押された場合
   if Input.trigger?(Input::B)
     # キャンセル SE を演奏
     $game_system.se_play($data_system.cancel_se)
     # レフトウィンドウを初期化
     @left_window.new_equip = nil
     @left_window.set_new_parameters(nil, nil, nil)
     # ライトウィンドウをアクティブ化
     @right_window.active = true
     @item_window.active = false
     @item_window.index = -1
     return
   end
   # C ボタンが押された場合
   if Input.trigger?(Input::C)
     # アイテムウィンドウで現在選択されているデータを取得
     item = @item_window.item
     if $imported["EquipExtension"] && KGC::EEX_USE_EP
       # EP判定
       if item != nil && item.ep_cost > @actor.ep
         # ブザー SE を演奏
         $game_system.se_play($data_system.buzzer_se)
         return
       end
     end
     # 装備 SE を演奏
     $game_system.se_play($data_system.equip_se)
     # 装備を変更
     @actor.equip(@right_window.index, item == nil ? 0 : item.id)
     # オートステートを更新
     if $imported["EquipDetailSetting"]
       if $imported["EquipExtension"] && @actor.two_swords?
         @actor.update_auto_state(nil, $data_weapons[@actor.weapon_id(@right_window.index)], true)
       else
         @actor.update_auto_state(nil, $data_weapons[@actor.weapon_id], true)
       end
     end
     if $imported["EquipExtension"]
       for i in (@actor.two_swords? ? @actor.ts_number : 1)[email protected]_type.size
         @actor.update_auto_state(nil, $data_armors[@actor.armor_id[i]])
       end
     else
       for i in 1..4
         @actor.update_auto_state(nil, $data_armors[eval("@actor.armor#{i}_id")])
       end
     end
     # 初期能力を更新
     @left_window.last_str = @actor.str
     @left_window.last_dex = @actor.dex
     @left_window.last_agi = @actor.agi
     @left_window.last_int = @actor.int
     # ライトウィンドウをアクティブ化
     @right_window.active = true
     @item_window.active = false
     @item_window.index = -1
     # レフトウィンドウを初期化
     @left_window.new_equip = nil
     @left_window.set_new_parameters(nil, nil, nil)
     # ライトウィンドウ、アイテムウィンドウの内容を再作成
     @right_window.refresh
     @item_window1.refresh
     @item_window2.refresh
     @item_window3.refresh
     @item_window4.refresh
     @item_window5.refresh
     if $imported["EquipExtension"] && KGC::EEX_EQUIP_TYPE_EXT.size > 0
       for i in 0...KGC::EEX_EQUIP_TYPE_EXT.size
         eval("@item_window#{i + 6}.refresh")
       end
     end
     return
   end

   # 元の処理を実行
   update_item_KGC_EquipAlter
 end
 #--------------------------------------------------------------------------
 # ● 最強武器装備
 #--------------------------------------------------------------------------
 def equip_strongest_weapon(type)
   # 武器リストを初期化
   weapons = []
   # 装備可能な武器を追加
   weapon_set = $data_classes[@actor.class_id].weapon_set
   for i in 1...$data_weapons.size
     if $game_party.weapon_number(i) > 0 && weapon_set.include?(i)
       weapons.push($data_weapons[i])
     end
   end
   # 装備可能な武器が無い場合は戻る
   return if weapons == []
   # 武器リストを逆順(IDの大きい順)に並べ替え
   weapons = weapons.reverse
   # 最強武器を初期化
   strongest_weapon = weapons[0]
   # 最強武器を取得(攻撃力で判定)
   for weapon in weapons
     strongest_weapon = weapon if strongest_weapon.atk < weapon.atk
   end
   # 現在の装備を取得
   now_weapon = $data_weapons[$imported["EquipExtension"] &&
     @actor.two_swords? ? @actor.weapon_id(type) : @actor.weapon_id]
   # 何も装備していない場合
   if now_weapon == nil
     # 装備を変更
     @actor.equip(type, strongest_weapon.id)
   # 現在の装備より強い場合
   elsif strongest_weapon.atk > now_weapon.atk
     # 装備を変更
     @actor.equip(type, strongest_weapon.id)
   end
 end
 #--------------------------------------------------------------------------
 # ● 最強防具装備
 #     type  : 防具の種類
 #     index : 装備箇所
 #--------------------------------------------------------------------------
 def equip_strongest_armor(type, index)
   # 除外装備の場合は戻る
   if $imported["EquipExtension"]
     return if KGC::EEX_IGNORE_STRONGEST_TYPE.include?(type)
   else
     return if KGC::EA_IGNORE_STRONGEST_TYPE.include?(type)
   end
   # 防具リストを初期化
   armors = []
   # 装備可能な防具を追加
   armor_set = $data_classes[@actor.class_id].armor_set
   for i in 1...$data_armors.size
     if $game_party.armor_number(i) > 0 && armor_set.include?(i)
       if $data_armors[i].kind == type - 1
         armors.push($data_armors[i])
       end
     end
   end
   # 装備可能な防具が無い場合は戻る
   return if armors == []
   # 防具リストを逆順(IDの大きい順)に並べ替え
   armors = armors.reverse
   # 最強防具を初期化
   strongest_armor = armors[0]
   # 最強防具を取得(物理防御で判定)
   for armor in armors
     strongest_armor = armor if strongest_armor.pdef < armor.pdef
   end
   # 現在の装備を取得
   now_armor = $data_armors[$imported["EquipExtension"] ?
     @actor.armor_id[index] : eval("@actor.armor#{index}_id")]
   # 何も装備していない場合
   if now_armor == nil
     # 装備を変更
     @actor.equip(index, strongest_armor.id)
   # 現在の装備より強い場合
   elsif strongest_armor.pdef > now_armor.pdef
     # 装備を変更
     @actor.equip(index, strongest_armor.id)
   end
 end
end
[/spoiler]

OKs, ahora vayan a Base de Datos -> Sistema y en Atributos creen uno nuevo llama equip_prior. Se lo del atributo porque me dio con leer el script. Ahora no se que hace eso del Atributo pero funciona al 100% el script.

Compatibilidad:

KGC_Module

Comentario Final:

Disfrutenlo que más. xD.png Edited by xXDarkDragonXx
0

Share this post


Link to post
Share on other sites
Muy bueno, gracias, me sirve de mucho icon13.gif
0

Share this post


Link to post
Share on other sites
woooo justo lo que buscaba! y para llamar desde un evento para desequipar todo que codigo uso?
0

Share this post


Link to post
Share on other sites
Midi_Master, eso que dices se puede hacer sin script xD hay un comando para ello, se llama "Cambiar equipo" blink.gif y le dicesque lo cambie a Nada y ya esta
0

Share this post


Link to post
Share on other sites
ja, nunca lo habia vistoese comando... gracias jaajaja
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0