Sign in to follow this  
Followers 0
evil_goku

Combo hit

11 posts in this topic

esto es para cuando ataques al enemigo de dos veces consecutivas para alla aparesca un hit encima de el ejemplo : si lo atacas dos veces seguidas encima aparese hit 2


aqui el codigo ya saben encima de main y llamenla como quieran

CODE

class Scene_Battle
def main
$game_temp.in_battle = true
$game_temp.battle_turn = 0
$game_temp.battle_event_flags.clear
$game_temp.battle_abort = false
$game_temp.battle_main_phase = false
$game_temp.battleback_name = $game_map.battleback_name
$game_temp.forcing_battler = nil
$game_system.battle_interpreter.setup(nil, 0)
@troop_id = $game_temp.battle_troop_id
$game_troop.setup(@troop_id)
s1 = $data_system.words.attack
s2 = $data_system.words.skill
s3 = $data_system.words.guard
s4 = $data_system.words.item
@actor_command_window = Window_Command.new(160, [s1, s2, s3, s4])
@actor_command_window.y = 160
@actor_command_window.back_opacity = 160
@actor_command_window.active = false
@actor_command_window.visible = false
@party_command_window = Window_PartyCommand.new
@help_window = Window_Help.new
@help_window.back_opacity = 160
@help_window.visible = false
@status_window = Window_BattleStatus.new
@message_window = Window_Message.new
@spriteset = Spriteset_Battle.new
@wait_count = 0
if $data_system.battle_transition == ""
Graphics.transition(20)
else
Graphics.transition(40, "Graphics/Transitions/" +
$data_system.battle_transition)
end
start_phase1
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
$game_map.refresh
Graphics.freeze
@actor_command_window.dispose
@party_command_window.dispose
@help_window.dispose
@status_window.dispose
@message_window.dispose
if @skill_window != nil
@skill_window.dispose
end
if @item_window != nil
@item_window.dispose
end
if @result_window != nil
@result_window.dispose
end
@spriteset.dispose
### Début de l'ajout par Krazplay pour sa nouvelle fenêtre d'exp ###
if @levelup != nil #Correction du bug de fuite
@fond = Window_Base.new(0,0,640,480)
coordx = [5,320, 5,320]
coordy = [12, 12, 248, 248]
@window = []
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
@window[i] = Window_Result.new(coordx[i], coordy[i])
@window[i].refresh(actor,0)
if @levelup[i] != nil #correction d'un bug, n'oubliez pas le end plus bas
if @levelup[i] > 0
@window[i].refresh(actor, @levelup[i])
@window[i].showlvlup(actor)
end
end #voila le end qui va avec la correction
end
if $data_system.battle_transition == ""
Graphics.transition(20)
else
Graphics.transition(20, "Graphics/Transitions/" + $data_system.battle_transition)
end
loop do
Graphics.update
Input.update
if Input.trigger?(Input::C)
break
end
end
for i in 0...$game_party.actors.size
@window[i].dispose
end
@fond.dispose
end # end de la correction du bug de fuite
### Fin de l'ajout par Krazplay pour sa nouvelle fenêtre d'exp ###
if $scene.is_a?(Scene_Title)
Graphics.transition
Graphics.freeze
end
if $BTEST and not $scene.is_a?(Scene_Gameover)
$scene = nil
end
end

def start_phase5
@phase = 5
$game_system.me_play($game_system.battle_end_me)
$game_system.bgm_play($game_temp.map_bgm)
exp = 0
gold = 0
treasures = []
for enemy in $game_troop.enemies
unless enemy.hidden
exp += enemy.exp
gold += enemy.gold
if rand(100) < enemy.treasure_prob
if enemy.item_id > 0
treasures.push($data_items[enemy.item_id])
end
if enemy.weapon_id > 0
treasures.push($data_weapons[enemy.weapon_id])
end
if enemy.armor_id > 0
treasures.push($data_armors[enemy.armor_id])
end
end
end
end
treasures = treasures[0..5]
@levelup = [] # Cette ligne-là est à ajouter si vous ne voullez pas copier
# tout le scrîpt
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
if actor.cant_get_exp? == false
last_level = actor.level
actor.exp += exp
@levelup[i] = actor.level - last_level # Cette ligne-là aussi #
if actor.level > last_level
@status_window.level_up(i)
end
end
end
$game_party.gain_gold(gold)
for item in treasures
case item
when RPG::Item
$game_party.gain_item(item.id, 1)
when RPG::Weapon
$game_party.gain_weapon(item.id, 1)
when RPG::Armor
$game_party.gain_armor(item.id, 1)
end
end
@result_window = Window_BattleResult.new(exp, gold, treasures)
@phase5_wait_count = 100
end
end

#========================
# Créer un nouveau scrîpt au-dessus de main et copier celui-là dedans.
# Tout ce qui est sous la définition refresh est ce qui apparait tout le temps
# Tout ce qui est sous la définition showlvlup est ce qui n'apparait qu'en
# cas de level up
#========================

class Window_Result < Window_Base
def initialize(x,y)
super(x, y, 315, 220)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
self.back_opacity = 255
end

def refresh(actor,levelenmoins)
self.contents.clear
self.contents.font.color = Color.new(255, 50, 50, 255)
self.contents.font.size = 24
draw_actor_battler(actor,50,90,30)
draw_actor_battler(actor,110,90,60)
draw_actor_battler(actor,170,90,90)
if levelenmoins == 0
draw_actor_battler(actor,230,90,250)
end
largeur_nom = contents.text_size(actor.name).width
self.contents.draw_text(width/2 - largeur_nom/2 -16, 0, 99, 24, actor.name)
self.contents.font.color = Color.new(100, 255, 100, 255)
self.contents.font.size = 19
self.contents.draw_text(0,25, 99, 24, "Level")
self.contents.font.color = normal_color
self.contents.draw_text(10, 45, 99, 24, "PV")
self.contents.draw_text(10, 63, 99, 24, "PM")
self.contents.font.size = 18
self.contents.draw_text(0, 83, 99, 24, "Fuerza")
self.contents.draw_text(0, 103, 99, 24, "Destreza")
self.contents.draw_text(0, 123, 99, 24, "Agilidad")
self.contents.draw_text(0, 143, 99, 24, "Inteligencia")
self.contents.font.color = Color.new(125, 255, 125, 255)
self.contents.draw_text(60, 170, 99, 24, "Siguiente nivel")
@levelenmoins = levelenmoins
@lvl = actor.level-levelenmoins
self.contents.font.color = normal_color
self.contents.draw_text(80, 25, 30, 24, @lvl.to_s,2)
self.contents.draw_text(60, 45, 50, 24, $data_actors[actor.id].parameters[0, @lvl].to_s,2)
self.contents.draw_text(60, 63, 50, 24, $data_actors[actor.id].parameters[1, @lvl].to_s,2)
self.contents.draw_text(80, 83, 30, 24, $data_actors[actor.id].parameters[2, @lvl].to_s,2)
self.contents.draw_text(80, 103, 30, 24, $data_actors[actor.id].parameters[3, @lvl].to_s,2)
self.contents.draw_text(80, 123, 30, 24, $data_actors[actor.id].parameters[4, @lvl].to_s,2)
self.contents.draw_text(80, 143, 30, 24, $data_actors[actor.id].parameters[5, @lvl].to_s,2)
self.contents.draw_text(140, 170, 70, 24, actor.next_rest_exp_s.to_s,1)
end

def showlvlup(actor)
hpgagne = $data_actors[actor.id].parameters[0, actor.level] - $data_actors[actor.id].parameters[0, @lvl]
mpgagne = $data_actors[actor.id].parameters[1, actor.level] - $data_actors[actor.id].parameters[1, @lvl]
forcegagne = $data_actors[actor.id].parameters[2, actor.level] - $data_actors[actor.id].parameters[2, @lvl]
dexgagne = $data_actors[actor.id].parameters[3, actor.level] - $data_actors[actor.id].parameters[3, @lvl]
agigagne = $data_actors[actor.id].parameters[4, actor.level] - $data_actors[actor.id].parameters[4, @lvl]
intgagne = $data_actors[actor.id].parameters[5, actor.level] - $data_actors[actor.id].parameters[5, @lvl]
self.contents.font.color = Color.new(100, 255, 100, 255)
self.contents.font.size = 19
self.contents.draw_text(50, 25, 99, 24, "UP !")
self.contents.font.color = Color.new(20, 255, 20, 255)
self.contents.font.size = 18
self.contents.draw_text(210, 25, 99, 24, actor.level.to_s)
self.contents.draw_text(190, 45, 40, 24, $data_actors[actor.id].parameters[0, actor.level].to_s,2)
self.contents.draw_text(190, 63, 40, 24, $data_actors[actor.id].parameters[1, actor.level].to_s,2)
self.contents.draw_text(200, 83, 30, 24, $data_actors[actor.id].parameters[2, actor.level].to_s,2)
self.contents.draw_text(200, 103, 30, 24, $data_actors[actor.id].parameters[3, actor.level].to_s,2)
self.contents.draw_text(200, 123, 30, 24, $data_actors[actor.id].parameters[4, actor.level].to_s,2)
self.contents.draw_text(200, 143, 30, 24, $data_actors[actor.id].parameters[5, actor.level].to_s,2)
self.contents.font.color = Color.new(100, 255, 255, 255)
self.contents.draw_text(140, 25, 20, 24, @levelenmoins.to_s,2)
self.contents.draw_text(130, 45, 40, 24, hpgagne.to_s,2)
self.contents.draw_text(130, 63, 40, 24, mpgagne.to_s,2)
self.contents.draw_text(140, 83, 30, 24, forcegagne.to_s,2)
self.contents.draw_text(140, 103, 30, 24, dexgagne.to_s,2)
self.contents.draw_text(140, 123, 30, 24, agigagne.to_s,2)
self.contents.draw_text(140, 143, 30, 24, intgagne.to_s,2)
self.contents.font.color = Color.new(255, 100, 100, 255)
h = [25,45,63,83,103,123,143]
for i in 0...7
self.contents.draw_text(120, h[i], 20, 24, "+")
end
for i in 0...7
self.contents.draw_text(180, h[i], 20, 24, "=")
end
end

def draw_actor_battler(actor, x, y, transparence=255)
bitmap = RPG::Cache.battler(actor.battler_name, actor.battler_hue)
cw = bitmap.width
ch = bitmap.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x - cw / 2, y - ch / 2, bitmap, src_rect, transparence)
end
end


Edit de Fegarur: Tienes problemillas con los Codes. xD Edited by Fegarur
0

Share this post


Link to post
Share on other sites
pero no es el que hce que ataques dos veces o hacer todos los golpes que quieras en un solo trno o si?
0

Share this post


Link to post
Share on other sites
no, como dije arriba esto se trata que por ejemplo ataques con un personaje tuyo a un
montruo y despues ataques con otro personaje de los tuyos a otro monstruos esto sera un hit o combo ¿ entiendes ? happy.gif
0

Share this post


Link to post
Share on other sites
aaaa si... entonces creo que por el momento no me late llorar.gif
0

Share this post


Link to post
Share on other sites
???... EN REALIDAD NO ENTIENDO QUE ES LO QUE DICES...??? blink.gif

es que no te funciona o que Edited by evil_goku
0

Share this post


Link to post
Share on other sites
has de cuenta que seria como el lionheart de squall en FF8, que da un monton de golpes en su limit break y cada golpe le esta restando vida...
0

Share this post


Link to post
Share on other sites
ahi un script para eso, si no esta en la recopilacion de script lo posteare mas adelante. cool.gif
0

Share this post


Link to post
Share on other sites
por favor! yo tambien conosco uno que estaba en un demo, pero no era compatble con el CBS que estoy usando.
0

Share this post


Link to post
Share on other sites
De todos modos, podrias postear el del summun evil_goku?? ese script me interesa bastante
0

Share this post


Link to post
Share on other sites
Aqui esta, a peticion de Midi_Master y Zenón, con este script podran equiparle dos armas a tu personaje.


Intruciones


Pongan este script arriba de main y llamenlo double weapon test,
para que funcione tienes que hacer el evento siguiente :

cambiar armamento : [iron sword] + 1

cambiar armamento : [steel sword] + 1

cambiar armamento : [iron shield] +1


cambiar armamento : [steel shield] + 1

Control interructor local : A = ON


casi se me olvida el script, aqui va
CODE

#=================================
# Double Weapons Script by makeamidget
#=================================
# credit to Clock, who found an error, go Clock
#=================================
#=================================
# changes to class Game_Actor
# i'll try to expain the changes when i make them
#=================================

class Game_Actor < Game_Battler

 def animation3_id
   weapon = $data_weapons[@armor1_id]
   return weapon != nil ? weapon.animation1_id : 0
 end
 #--------------------------------------------------------------------------
 # ● 通常攻撃 対象側アニメーション ID の取得
 #--------------------------------------------------------------------------
 def animation4_id
   weapon = $data_weapons[@armor1_id]
   return (weapon != nil ? weapon.animation2_id : 0)
 end
 
 
 def base_str
   #took out the armor1 addition to the base_str
   n = $data_actors[@actor_id].parameters[2, @level]
   weapon = $data_weapons[@weapon_id]
   armor2 = $data_armors[@armor2_id]
   armor3 = $data_armors[@armor3_id]
   armor4 = $data_armors[@armor4_id]
   n += weapon != nil ? weapon.str_plus : 0
   n += armor2 != nil ? armor2.str_plus : 0
   n += armor3 != nil ? armor3.str_plus : 0
   n += armor4 != nil ? armor4.str_plus : 0
   return [[n, 1].max, 999].min
 end

 #--------------------------------------------------------------------------
 # ● 基本攻撃力の取得
 #--------------------------------------------------------------------------
 def base_atk
   #now instead of adding to the strength, the strength stat of armor1
   #add to the base_atk(attack power)
   armor1 = $data_armors[@armor1_id]
   weapon = $data_weapons[@weapon_id]
   atk1 = armor1 != nil ? armor1.str_plus : 0
   atk2 = weapon !=nil ? weapon.atk : 0
   return atk1 + atk2
 end


 #this is to hard for me to explain, but it works as far as i can see
 def equip(equip_type, id, sechand = "none")
   @sechand = sechand
   case equip_type
   when 0  # 武器
     if id == 0 or $game_party.weapon_number(id) > 0
       $game_party.gain_weapon(@weapon_id, 1)
       @weapon_id = id
       $game_party.lose_weapon(id, 1)
     end
   when 1  # 盾
    #beginning of crap i added
    case @sechand
    when true
      if @armor1_id == 0 and ($data_armors[id].guard_state_set[0].id == 35)
       $two_weapons[@actor_id] = true
       $game_party.gain_weapon(@armor1_id, 1)
       @armor1_id = id
       $game_party.lose_weapon(id, 1)
       return
     end
      if ($data_armors[@armor1_id].guard_state_set[0].id == 35) and ($data_armors[id].guard_state_set[0].id == 35)
       $two_weapons[@actor_id] = true
       $game_party.gain_weapon(@armor1_id, 1)
       @armor1_id = id
       $game_party.lose_weapon(id, 1)
       return
     elsif ($data_armors[@armor1_id].guard_state_set[0].id != 35) and ($data_armors[id].guard_state_set[0].id == 35)
       $two_weapons[@actor_id] = true
       $game_party.gain_armor(@armor1_id, 1)
       @armor1_id = id
       $game_party.lose_weapon(id, 1)
       return
       end
     when false
     if @armor1_id == 0 and id == 0
       return
     end  
     if @armor1_id == 0 and ($data_armors[id].guard_state_set[0].id != 35)
       $two_weapons[@actor_id] = false
       $game_party.gain_armor(@armor1_id, 1)
       @armor1_id = id
       $game_party.lose_armor(id, 1)
       return
     end
     if ($data_armors[@armor1_id].guard_state_set[0].id == 35) and (id == 0)
        $two_weapons[@actor_id] = false
        $game_party.gain_weapon(@armor1_id, 1)
        @armor1_id = id
        $game_party.lose_armor(id, 1)
        return
      end
       if ($data_armors[@armor1_id].guard_state_set[0].id == 35) and ($data_armors[id].guard_state_set[0].id != 35)
       $two_weapons[@actor_id] = false
       $game_party.gain_weapon(@armor1_id, 1)
       @armor1_id = id
       $game_party.lose_armor(id, 1)
       return
     elsif id == 0
       $two_weapons[@actor_id] = false        
       update_auto_state($data_armors[@armor1_id], $data_armors[id])
       $game_party.gain_armor(@armor1_id, 1)
       @armor1_id = id
       $game_party.lose_armor(id, 1)
       return
     else
       $two_weapons[@actor_id] = false        
       update_auto_state($data_armors[@armor1_id], $data_armors[id])
       $game_party.gain_armor(@armor1_id, 1)
       @armor1_id = id
       $game_party.lose_armor(id, 1)
       return
       end


     end#end case
     #end of crap i added
   when 2  # 頭
     if id == 0 or $game_party.armor_number(id) > 0
       update_auto_state($data_armors[@armor2_id], $data_armors[id])
       $game_party.gain_armor(@armor2_id, 1)
       @armor2_id = id
       $game_party.lose_armor(id, 1)
     end
   when 3  # 身体
     if id == 0 or $game_party.armor_number(id) > 0
       update_auto_state($data_armors[@armor3_id], $data_armors[id])
       $game_party.gain_armor(@armor3_id, 1)
       @armor3_id = id
       $game_party.lose_armor(id, 1)
     end
   when 4  # 装飾品
     if id == 0 or $game_party.armor_number(id) > 0
       update_auto_state($data_armors[@armor4_id], $data_armors[id])
       $game_party.gain_armor(@armor4_id, 1)
       @armor4_id = id
       $game_party.lose_armor(id, 1)
     end
   end
 end

end
#=================================
# end of class Game_Actor changes
#=================================
#=================================
# changes to Window_EquipItem, displays the weapons
# in the shield selection
#=================================

class Window_EquipItem < Window_Selectable
 #--------------------------------------------------------------------------
 # ● オブジェクト初期化
 #     actor      : アクター
 #     equip_type : 装備部位 (0~3)
 #--------------------------------------------------------------------------
 def initialize(actor, equip_type)
   super(0, 256, 640, 224)
   @actor = actor
   @equip_type = equip_type
   @column_max = 2
   refresh
   self.active = false
   self.index = -1
 end
 #--------------------------------------------------------------------------
 # ● アイテムの取得
 #--------------------------------------------------------------------------
 def item
   return @data[self.index]
 end
 #--------------------------------------------------------------------------
 # ● リフレッシュ
 #--------------------------------------------------------------------------
 def refresh
   if self.contents != nil
     self.contents.dispose
     self.contents = nil
   end
   @data = []
   # 装備可能な武器を追加
   if @equip_type == 0
     weapon_set = $data_classes[@actor.class_id].weapon_set
     for i in 1...$data_weapons.size
       if $game_party.weapon_number(i) > 0 and weapon_set.include?(i)
         @data.push($data_weapons[i])
       end
     end
   end
   # 装備可能な防具を追加
   if @equip_type != 0
    armor_set = $data_classes[@actor.class_id].armor_set
     
    #this is to display the weapons in the shield equip
    weapon_set = $data_classes[@actor.class_id].weapon_set
     if @equip_type == 1
     for i in 1...$data_weapons.size
       if $game_party.weapon_number(i) > 0 and weapon_set.include?(i)
         @data.push($data_armors[i])
       end
     end
   end
    #end of weapon display
     
     for i in 1...$data_armors.size
       if $game_party.armor_number(i) > 0 and armor_set.include?(i)
         if $data_armors[i].kind == @equip_type-1
           @data.push($data_armors[i])
         end
       end
     end
   end
   # 空白を追加
   @data.push(nil)
   # ビットマップを作成し、全項目を描画
   @item_max = @data.size
   self.contents = Bitmap.new(width - 32, row_max * 32)
   self.contents.font.name = $defaultfonttype  # "Equip" bottom (Item List) window font
   self.contents.font.size = $defaultfontsize
   for i in 0...@item_max-1
     draw_item(i)
   end
 end
 #--------------------------------------------------------------------------
 # ● 項目の描画
 #     index : 項目番号
 #--------------------------------------------------------------------------
 def draw_item(index)
   item = @data[index]
   x = 4 + index % 2 * (288 + 32)
   y = index / 2 * 32
   case item
   when RPG::Weapon
     number = $game_party.weapon_number(item.id)
   when RPG::Armor
     #so you get the number of weapons for the left hand
     if  item.guard_state_set[0].id == 35
     number = $game_party.weapon_number(item.id)
     #end of weapon number
     else
     number = $game_party.armor_number(item.id)
    end
   end
   bitmap = RPG::Cache.icon(item.icon_name)
   self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
   self.contents.font.color = normal_color
   self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
   self.contents.draw_text(x + 240, y, 16, 32, ":", 1)
   self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2)
 end

end
#=================================
# end of changes to Window_EquipItem
#=================================
#=================================
# Changes to Scene_Equip
#=================================

class Scene_Equip

 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 item2.type == RPG::Armor

       if item2.guard_state_set[0].id == 35
       @actor.equip (@right_window.index,item2 == nil ? 0 : item2.id, true)
     else
       @actor.equip(@right_window.index, item2 == nil ? 0 : item2.id, false)
       end
     elsif @right_window.index == 1 and item2 == nil
       @actor.equip(@right_window.index, item2 == nil ? 0 : item2.id, false)
     else
       @actor.equip(@right_window.index, item2 == nil ? 0 : item2.id, "none")
     end

     # 装備変更後のパラメータを取得
     new_atk = @actor.atk
     new_pdef = @actor.pdef
     new_mdef = @actor.mdef
     # 装備を戻す
     if item1.type == RPG::Armor

       if item1.guard_state_set[0].id == 35
       @actor.equip (@right_window.index,item1 == nil ? 0 : item1.id, true)
     else
       @actor.equip(@right_window.index, item1 == nil ? 0 : item1.id, false)
       end
     elsif @right_window.index == 1 and item1 == nil
       @actor.equip(@right_window.index, item1 == nil ? 0 : item1.id, false)
     else
       @actor.equip(@right_window.index, item1 == nil ? 0 : item1.id, "none")
     end
     @actor.hp = last_hp
     @actor.sp = last_sp
     # レフトウィンドウに描画
     @left_window.set_new_parameters(new_atk, new_pdef, new_mdef)
   end
 end

 def update_item
   # B ボタンが押された場合
   if Input.trigger?(Input::B)
     # キャンセル SE を演奏
     $game_system.se_play($data_system.cancel_se)
     # ライトウィンドウをアクティブ化
     @right_window.active = true
     @item_window.active = false
     @item_window.index = -1
     return
   end
   # C ボタンが押された場合
   if Input.trigger?(Input::C)
     # 装備 SE を演奏
     $game_system.se_play($data_system.equip_se)
     # アイテムウィンドウで現在選択されているデータを取得
     item = @item_window.item
     if item.type == RPG::Armor

       if item.guard_state_set[0].id == 35
       @actor.equip (@right_window.index,item == nil ? 0 : item.id, true)
     else
       @actor.equip(@right_window.index, item == nil ? 0 : item.id, false)
       end
     elsif @right_window.index == 1 and item == nil
       @actor.equip(@right_window.index, item == nil ? 0 : item.id, false)
     else
       @actor.equip(@right_window.index, item == nil ? 0 : item.id, "none")
     end
     # ライトウィンドウをアクティブ化
     @right_window.active = true
     @item_window.active = false
     @item_window.index = -1
     # ライトウィンドウ、アイテムウィンドウの内容を再作成
     @right_window.refresh
     @item_window2.refresh
     @item_window1.refresh
     @item_window.refresh
     return
   end
 end
end
#=================================
# end of changes to Scene_Equip
#=================================
#=================================
# Changes to Window_EquipRight
#=================================
class Window_EquipRight < Window_Selectable

 def refresh
   self.contents.clear
   @data = []
   @data.push($data_weapons[@actor.weapon_id])
   @data.push($data_armors[@actor.armor1_id])
   @data.push($data_armors[@actor.armor2_id])
   @data.push($data_armors[@actor.armor3_id])
   @data.push($data_armors[@actor.armor4_id])
   @item_max = @data.size
   self.contents.font.color = system_color
   #makes it say right hand, left hand, instead of weapon, shield
   self.contents.draw_text(4, 32 * 0, 92, 32, "Right Hand")
   self.contents.draw_text(4, 32 * 1, 92, 32, "Left Hand")
   #end of above
   self.contents.draw_text(4, 32 * 2, 92, 32, $data_system.words.armor2)
   self.contents.draw_text(4, 32 * 3, 92, 32, $data_system.words.armor3)
   self.contents.draw_text(5, 32 * 4, 92, 32, $data_system.words.armor4)
   draw_item_name(@data[0], 92, 32 * 0)
   draw_item_name(@data[1], 92, 32 * 1)
   draw_item_name(@data[2], 92, 32 * 2)
   draw_item_name(@data[3], 92, 32 * 3)
   draw_item_name(@data[4], 92, 32 * 4)
 end
end
#=================================
# end of changes to Window_EquipRight
#=================================
#=================================
# Changes to Scene_Battle
#=================================
class Scene_Battle  

 def update_phase3_basic_command
   # B ボタンが押された場合
   if Input.trigger?(Input::B)
     # キャンセル SE を演奏
     $game_system.se_play($data_system.cancel_se)
     # 前のアクターのコマンド入力へ
     phase3_prior_actor
     return
   end
   # C ボタンが押された場合
   if Input.trigger?(Input::C)
     # アクターコマンドウィンドウのカーソル位置で分岐
     case @actor_command_window.index
     when 0  # 攻撃
       if $two_weapons[@active_battler.id] == true
       $game_system.se_play($data_system.decision_se)
       @active_battler.current_action.kind = 0
       @active_battler.current_action.basic = 4  
       start_enemy_select
       else
       # 決定 SE を演奏
       $game_system.se_play($data_system.decision_se)
       # アクションを設定
       @active_battler.current_action.kind = 0
       @active_battler.current_action.basic = 0
       # エネミーの選択を開始
       start_enemy_select
      end
     when 1  # スキル
       # 決定 SE を演奏
       $game_system.se_play($data_system.decision_se)
       # アクションを設定
       @active_battler.current_action.kind = 1
       # スキルの選択を開始
       start_skill_select
     when 2  # 防御
       # 決定 SE を演奏
       $game_system.se_play($data_system.decision_se)
       # アクションを設定
       @active_battler.current_action.kind = 0
       @active_battler.current_action.basic = 1
       # 次のアクターのコマンド入力へ
       phase3_next_actor
     when 3  # アイテム
       # 決定 SE を演奏
       $game_system.se_play($data_system.decision_se)
       # アクションを設定
       @active_battler.current_action.kind = 2
       # アイテムの選択を開始
       start_item_select
     end
     return
   end
 end  
 
 def make_basic_action_result
   # 攻撃の場合
   if @active_battler.current_action.basic == 0
     # アニメーション ID を設定
     @animation1_id = @active_battler.animation1_id
     @animation2_id = @active_battler.animation2_id
     # 行動側バトラーがエネミーの場合
     if @active_battler.is_a?(Game_Enemy)
       if @active_battler.restriction == 3
         target = $game_troop.random_target_enemy
       elsif @active_battler.restriction == 2
         target = $game_party.random_target_actor
       else
         index = @active_battler.current_action.target_index
         target = $game_party.smooth_target_actor(index)
       end
     end
     # 行動側バトラーがアクターの場合
     if @active_battler.is_a?(Game_Actor)
       if @active_battler.restriction == 3
         target = $game_party.random_target_actor
       elsif @active_battler.restriction == 2
         target = $game_troop.random_target_enemy
       else
         index = @active_battler.current_action.target_index
         target = $game_troop.smooth_target_enemy(index)
       end
     end
     # 対象側バトラーの配列を設定
     @target_battlers = [target]
     # 通常攻撃の効果を適用
     for target in @target_battlers
       target.attack_effect(@active_battler)
     end
     return
   end
   # 防御の場合
   if @active_battler.current_action.basic == 1
     # ヘルプウィンドウに "防御" を表示
     @help_window.set_text($data_system.words.guard, 1)
     return
   end
   # 逃げるの場合
   if @active_battler.is_a?(Game_Enemy) and
      @active_battler.current_action.basic == 2
     # ヘルプウィンドウに "逃げる" を表示
     @help_window.set_text("逃げる", 1)
     # 逃げる
     @active_battler.escape
     return
   end
   # 何もしないの場合
   if @active_battler.current_action.basic == 3
     # アクション強制対象のバトラーをクリア
     $game_temp.forcing_battler = nil
     # ステップ 1 に移行
     @phase4_step = 1
     return
   end
#add
   if @active_battler.current_action.basic == 4
     @new = nil
     @sec_attack = nil
     @animation1_id = @active_battler.animation1_id
     @animation2_id = @active_battler.animation2_id
     @animation3_id = @active_battler.animation3_id
     @animation4_id = @active_battler.animation4_id
     if @active_battler.is_a?(Game_Actor)
       if @active_battler.restriction == 3
         target = $game_party.random_target_actor
       elsif @active_battler.restriction == 2
         target = $game_troop.random_target_enemy
       else
         index = @active_battler.current_action.target_index
         target = $game_troop.smooth_target_enemy(index)
       end
     end
     # 対象側バトラーの配列を設定
     @target_battlers = [target]
     # 通常攻撃の効果を適用
     for target in @target_battlers
       target.attack_effect(@active_battler)
     end
     return
   end      
   #end add      
 end  
 
 def update_phase4_step4
   # 対象側アニメーション
   #add    
   if @active_battler.is_a?(Game_Actor)    
   if $two_weapons[@active_battler.id] == true && @new != nil && @sec_attack == 0
   for target in @target_battlers
     target.animation_id = @animation4_id
     target.animation_hit = (target.damage != "Miss")
   @phase4_step = 5
     return
   end
   end
   end
#end add
   for target in @target_battlers
     target.animation_id = @animation2_id
     target.animation_hit = (target.damage != "Miss")
   end

   # アニメーションの長さにかかわらず、最低 8 フレーム待つ
   @wait_count = 8
   # ステップ 5 に移行
   @phase4_step = 5
 end  

 def update_phase4_step5
   # ヘルプウィンドウを隠す
   @help_window.visible = false
   # ステータスウィンドウをリフレッシュ
   @status_window.refresh
   # ダメージ表示
#add    
   if @active_battler.is_a?(Game_Actor)    
   if $two_weapons[@active_battler.id] == true && @sec_attack == nil
     @sec_attack = 0
     @new = 1
     @phase4_step = 3
     return
   end
   end
#end add
   for target in @target_battlers
     if target.damage != nil
       target.damage_pop = true
     end
   end
   # ステップ 6 に移行
   @phase4_step = 6
 end
end

#=================================
# end of changes to Scene_Battle
#=================================
#=================================
# Changes to Scene_Title
#=================================
class Scene_Title

alias two_weapons_start command_new_game

def command_new_game
  two_weapons_start
   $two_weapons = []
   for i in 1...$data_actors.size
     $two_weapons[i] = false
   end
 end
end
#=================================
# end of changes to Scene_Title
#=================================
#=================================
# Changes to Scene_Save
#=================================
class Scene_Save
 
alias two_weapons_write_save_data write_save_data

def write_save_data(file)
   two_weapons_write_save_data(file)
   Marshal.dump($two_weapons, file)
 end
end
#=================================
# end of changes to Scene_Save
#=================================
#=================================
# Changes to Scene_Load
#=================================
class Scene_Load < Scene_File

 alias two_weapons_read_save_data read_save_data

 def read_save_data(file)
  two_weapons_read_save_data(file)
  $two_weapons     = Marshal.load(file)
end

end
#==================================
# end of changes to Scene_Load
#==================================

Y LISTO YA, AHORA SOLO TIENES QUE EQUIPAR LAS DOS ARMAS Y ATACARAS DOS VECES EN BATALLA.
cool.gif Edited by evil_goku
0

Share this post


Link to post
Share on other sites
Hay alguna forma de hacer que el script del combo funcione en un action-RPG?
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