Jump to content
Rpg²S Forum

mikb89

Utenti
  • Posts

    655
  • Joined

  • Last visited

Posts posted by mikb89

  1. io parto da quello che mi da l'idea di continuare a creare, puo' essere un pezzo di storia, un qualcosa di divertente, una lista di immagini, uno script trovato che mi piace (per esempio ho fatto un gioco quando ho trovato lo script tattico), ma la maggior parte delle volte, dopo una delle cose sopra citate, e' la storia che porto avanti, anche perche' e' la cosa che richiede meno tempo :P
  2. credo che dovrebbe funzionare anche col bs standard. Purtroppo ora non posso provarlo che non sono al pc. E forse ho intravisto anche un paio di errori ma non ne sono sicuro, ad esempio io vedo il simbolo del copyright, se lo vedete anche voi va sostituito con © e lo stesso per quello con la r. Per inserire uno script vai nello script editor (un icona nella barra superiore), e scorri l'elenco fino a trovarne uno che si chiama Main, selezionalo col tasto destro e clicca nella voce per inserire (a seconda della lingua insert, inserisci). Fallo un'altra volta in questo caso. Poi torni qui, selezioni tutto il primo script e lo incolli in uno di quelli vuoti che hai creato e lo stesso fai con l'altro. Per cambiargli il nome lo selezioni e lo scrivi di sotto
  3.  

    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 @combo_window != nil
      @combo_window.dispose
    end
    if @item_window != nil
      @item_window.dispose
    end
    if @result_window != nil
      @result_window.dispose
    end
    @spriteset.dispose
    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 update_phase3
    if @enemy_arrow != nil
      update_phase3_enemy_select
    elsif @actor_arrow != nil
      update_phase3_actor_select
    elsif @skill_window != nil
      update_phase3_skill_select
    elsif @combo_window != nil
      update_phase3_combo_select
    elsif @item_window != nil
      update_phase3_item_select
    elsif @actor_command_window.active
      update_phase3_basic_command
    end
     end
     
     alias update_phase3_skill_select_combo update_phase3_skill_select
     def update_phase3_skill_select
    update_phase3_skill_select_combo
    if Input.trigger?(TASTO_CAMBIO_SKILL_E_COMBO)
    	$game_system.se_play($data_system.decision_se)
    	@active_battler.current_action.kind = 1
    	end_skill_select
    	start_combo_select
      return
    end
     end
    
     def update_phase3_combo_select
    @combo_window.visible = true
    @combo_window.update
    for i in 0...$combo_skill.size
      if $combo_skill[i] == @combo_window.skill.id
    	n = i
      end
    end
    if n != nil
      for h in 0...$combo_hero[n].size
    	if $game_party.actors.include?($game_actors[$combo_hero[n][h]])
    	  $game_actors[$combo_hero[n][h]].blink = true
    	end
      end
    end
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      end_combo_select
      return
    end
    if Input.trigger?(Input::C)
      @skill = @combo_window.skill
      if n == nil
    	$game_system.se_play($data_system.buzzer_se)
    	return
      end
      v = 0
      for h in 0...$combo_hero[n].size
    	if $game_actors[$combo_hero[n][h]].combo_can_use?(@skill.id)
    	  v += 1
    	end
      end
      if @skill == nil or not v == $combo_hero[n].size
    	$game_system.se_play($data_system.buzzer_se)
    	return
      end
      $game_system.se_play($data_system.decision_se)
      @active_battler.current_action.skill_id = @skill.id
      @combo_window.visible = false
      if @skill.scope == 1
    	start_enemy_select
      elsif @skill.scope == 3 or @skill.scope == 5
    	start_actor_select
      else
    	end_combo_select
    	phase3_next_actor
      end
      return
    end
    if Input.trigger?(TASTO_CAMBIO_SKILL_E_COMBO)
    	$game_system.se_play($data_system.decision_se)
    	@active_battler.current_action.kind = 1
    	end_combo_select
    	start_skill_select
      return
    end	
     end
    
     def update_phase3_enemy_select
    @enemy_arrow.update
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      end_enemy_select
      return
    end
    if Input.trigger?(Input::C)
      $game_system.se_play($data_system.decision_se)
      @active_battler.current_action.target_index = @enemy_arrow.index
      end_enemy_select
      if @skill_window != nil
    	end_skill_select
      end
      if @combo_window != nil
    	end_combo_select
      end
      if @item_window != nil
    	end_item_select
      end
      phase3_next_actor
    end
     end
    
     def update_phase3_actor_select
    @actor_arrow.update
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      end_actor_select
      return
    end
    if Input.trigger?(Input::C)
      $game_system.se_play($data_system.decision_se)
      @active_battler.current_action.target_index = @actor_arrow.index
      end_actor_select
      if @skill_window != nil
    	end_skill_select
      end
      if @combo_window != nil
    	end_combo_select
      end
      if @item_window != nil
    	end_item_select
      end
      phase3_next_actor
    end
     end
    
     def start_combo_select
    @combo_window = Window_Combo.new(@active_battler)
    @combo_window.help_window = @help_window
    @actor_command_window.active = false
    @actor_command_window.visible = false
     end
     
     def end_combo_select
    for b in 0...$game_party.actors.size
      $game_party.actors[b].blink = false
    end
    @active_battler.blink = true
    @combo_window.dispose
    @combo_window = nil
    @help_window.visible = false
    @actor_command_window.active = true
    @actor_command_window.visible = true
     end
     
     def make_skill_action_result
    @animate = nil
    @skill = $data_skills[@active_battler.current_action.skill_id]
    for i in 0...$combo_skill.size
      if $combo_skill[i] == @skill.id
    	n = i
      end
    end
    if not $combo_skill.include?(@skill.id)
      unless @active_battler.current_action.forcing
    	unless @active_battler.skill_can_use?(@skill.id)
    	  $game_temp.forcing_battler = nil
    	  @phase4_step = 1
    	  return
    	end
      end
      @active_battler.sp -= @skill.sp_cost
      @status_window.refresh
      @help_window.set_text(@skill.name, 1)
      @animation1_id = @skill.animation1_id
      @animation2_id = @skill.animation2_id
      @common_event_id = @skill.common_event_id
      set_target_battlers(@skill.scope)
      for target in @target_battlers
    	if target.is_a?(Game_Enemy)
    	  $eventually_robbed = 0, 0, 100
    	  $eventually_robbed[0] = target.item_id
    	  if $eventually_robbed[0] == 0
    		$eventually_robbed[0] = target.weapon_id
    		if $eventually_robbed[0] == 0
    		  $eventually_robbed[0] = target.armor_id
    		  if $eventually_robbed[0] == 0
    			$eventually_robbed[1] = 0
    		  else
    			$eventually_robbed[1] = 3
    			if target.treasure_prob == 0
    			  $eventually_robbed[2] = 100
    			else
    			  $eventually_robbed[2] = target.treasure_prob
    			end	
    		  end
    		else
    		  $eventually_robbed[1] = 2
    		  if target.treasure_prob == 0
    			$eventually_robbed[2] = 100
    		  else
    			$eventually_robbed[2] = target.treasure_prob
    		  end	
    		end
    	  else
    		$eventually_robbed[1] = 1
    		if target.treasure_prob == 0
    		  $eventually_robbed[2] = 100
    		else
    		  $eventually_robbed[2] = target.treasure_prob
    		end	
    	  end
    	end
    	target.skill_effect(@active_battler, @skill)
      end
    else
      unless @active_battler.current_action.forcing
    	if n != nil
    	  v = 0
    	  for h in 0...$combo_hero[n].size
    		if $game_actors[$combo_hero[n][h]].combo_can_use?(@skill.id)
    		  v +=1
    		end
    	  end
    	end
    	unless v == $combo_hero[n].size
    	  $game_temp.forcing_battler = nil
    	  @phase4_step = 1
    	  return
    	end
      end
      if n != nil
    	for h in 0...$combo_hero[n].size
    	  $game_actors[$combo_hero[n][h]].sp -= $combo_point[n][h]
    	  @animate = $combo_hero[n]
    	end
      end
      @status_window.refresh
      @help_window.set_text(@skill.name, 1)
      @animation1_id = @skill.animation1_id
      @animation2_id = @skill.animation2_id
      @common_event_id = @skill.common_event_id
      set_target_battlers(@skill.scope)
      for target in @target_battlers
    	if target.is_a?(Game_Enemy)
    	  $eventually_robbed = 0, 0, 100
    	  $eventually_robbed[0] = target.item_id
    	  if $eventually_robbed[0] == 0
    		$eventually_robbed[0] = target.weapon_id
    		if $eventually_robbed[0] == 0
    		  $eventually_robbed[0] = target.armor_id
    		  if $eventually_robbed[0] == 0
    			$eventually_robbed[1] = 0
    		  else
    			$eventually_robbed[1] = 3
    			if target.treasure_prob == 0
    			  $eventually_robbed[2] = 100
    			else
    			  $eventually_robbed[2] = target.treasure_prob
    			end	
    		  end
    		else
    		  $eventually_robbed[1] = 2
    		  if target.treasure_prob == 0
    			$eventually_robbed[2] = 100
    		  else
    			$eventually_robbed[2] = target.treasure_prob
    		  end	
    		end
    	  else
    		$eventually_robbed[1] = 1
    		if target.treasure_prob == 0
    		  $eventually_robbed[2] = 100
    		else
    		  $eventually_robbed[2] = target.treasure_prob
    		end	
    	  end
    	end
    	target.skill_effect(@active_battler, @skill)
      end
    end
     end
     
     def update_phase4_step3
    if @animate == nil
      if @animation1_id == 0
    	@active_battler.white_flash = true
      else
    	@active_battler.animation_id = @animation1_id
    	@active_battler.animation_hit = true
      end
      @phase4_step = 4
    else
      if @animation1_id == 0
    	for b in 0...@animate.size
    	  $game_actors[@animate[b]].white_flash = true
    	end
      else
    	for b in 0...@animate.size
    	  $game_actors[@animate[b]].animation_id = @animation1_id
    	  $game_actors[@animate[b]].animation_hit = true
    	end
      end
      @animate = nil
      @phase4_step = 4
    end
     end
    end

     

    questo è il secondo. Comunque c'è un errore nel primo, come posso lo correggo, nel frattempo scrivete qualsiasi cosa così non faccio triplo post XD

  4. ok allora gli script da inserire sopra main sono 2. Il primo contiene anche le istruzioni come usarlo ed è questo

    #==============================================================================
    # â–  Scene_Combo
    #------------------------------------------------------------------------------
    # Ispirato al combo di Chrono Trigger
    #==============================================================================
    # Impostare sotto ciò che viene richiesto u.u
    
    TASTO_CAMBIO_SKILL_E_COMBO = Input::A
    # Input::A equivale a SHIFT
    # Input::CTRL equivale a CONTROL
    # Input::L e Input::R equivalgono a PageUp e PageDown
    # e ce ne sono altri, l'importante è che c'è Input:: prima
    
    $combo_skill = [6, 101]
    # Contiene gli id delle skill che sono combo
    
    $combo_hero = [[6, 1, 8], [2, 3]]
    # Contiene gli id degli eroi che usano le combo (per ogni combo sono tra parentesi quadra)
    
    $combo_point = [[10, 5, 78], [8, 5]]
    # Contiene i punti necessari per eseguire la combo per ogni eroe
    
    class Game_Actor < Game_Battler
     def combo_can_use?(skill_id)
    #CTRL lascia libero l'uso se si è in modalità debug
    if $DEBUG and Input.press?(Input::CTRL)
     return true
    end	
    #Fine di questa sparata
    for i in 0...$combo_skill.size
      if $combo_skill[i] == skill_id
    	n = i
      end
    end
    for i in 0...$combo_hero[n].size
      if not $game_actors[$combo_hero[n][i]].skills.include?(skill_id)
    	return false
      end
    end
    @acc = 0
    @times = 0
    for a in $data_skills[skill_id].element_set
      @times +=1
      if ($combo_hero[n][0] != nil and $data_weapons[$game_actors[$combo_hero[n][0]].weapon_id] != nil and $data_weapons[$game_actors[$combo_hero[n][0]].weapon_id].element_set.include?(a)) or
    	($combo_hero[n][1] != nil and $data_weapons[$game_actors[$combo_hero[n][1]].weapon_id] != nil and $data_weapons[$game_actors[$combo_hero[n][1]].weapon_id].element_set.include?(a)) or
    	($combo_hero[n][2] != nil and $data_weapons[$game_actors[$combo_hero[n][2]].weapon_id] != nil and $data_weapons[$game_actors[$combo_hero[n][2]].weapon_id].element_set.include?(a)) or
    	($combo_hero[n][3] != nil and $data_weapons[$game_actors[$combo_hero[n][3]].weapon_id] != nil and $data_weapons[$game_actors[$combo_hero[n][3]].weapon_id].element_set.include?(a))
    	@acc += 1
      else
    	if ($combo_hero[n][0] != nil and $data_armors[$game_actors[$combo_hero[n][0]].armor1_id] != nil and $data_armors[$game_actors[$combo_hero[n][0]].armor1_id].guard_element_set.include?(a)) or
    	  ($combo_hero[n][1] != nil and $data_armors[$game_actors[$combo_hero[n][1]].armor1_id] != nil and $data_armors[$game_actors[$combo_hero[n][1]].armor1_id].guard_element_set.include?(a)) or
    	  ($combo_hero[n][2] != nil and $data_armors[$game_actors[$combo_hero[n][2]].armor1_id] != nil and $data_armors[$game_actors[$combo_hero[n][2]].armor1_id].guard_element_set.include?(a)) or
    	  ($combo_hero[n][3] != nil and $data_armors[$game_actors[$combo_hero[n][3]].armor1_id] != nil and $data_armors[$game_actors[$combo_hero[n][3]].armor1_id].guard_element_set.include?(a))
    	  @acc += 1
    	else
    	  if ($combo_hero[n][0] != nil and $data_armors[$game_actors[$combo_hero[n][0]].armor2_id] != nil and $data_armors[$game_actors[$combo_hero[n][0]].armor2_id].guard_element_set.include?(a)) or
    		($combo_hero[n][1] != nil and $data_armors[$game_actors[$combo_hero[n][1]].armor2_id] != nil and $data_armors[$game_actors[$combo_hero[n][1]].armor2_id].guard_element_set.include?(a)) or
    		($combo_hero[n][2] != nil and $data_armors[$game_actors[$combo_hero[n][2]].armor2_id] != nil and $data_armors[$game_actors[$combo_hero[n][2]].armor2_id].guard_element_set.include?(a)) or
    		($combo_hero[n][3] != nil and $data_armors[$game_actors[$combo_hero[n][3]].armor2_id] != nil and $data_armors[$game_actors[$combo_hero[n][3]].armor2_id].guard_element_set.include?(a))
    		@acc += 1
    	  else
    		if ($combo_hero[n][0] != nil and $data_armors[$game_actors[$combo_hero[n][0]].armor3_id] != nil and $data_armors[$game_actors[$combo_hero[n][0]].armor3_id].guard_element_set.include?(a)) or
    		  ($combo_hero[n][1] != nil and $data_armors[$game_actors[$combo_hero[n][1]].armor3_id] != nil and $data_armors[$game_actors[$combo_hero[n][1]].armor3_id].guard_element_set.include?(a)) or
    		  ($combo_hero[n][2] != nil and $data_armors[$game_actors[$combo_hero[n][2]].armor3_id] != nil and $data_armors[$game_actors[$combo_hero[n][2]].armor3_id].guard_element_set.include?(a)) or
    		  ($combo_hero[n][3] != nil and $data_armors[$game_actors[$combo_hero[n][3]].armor3_id] != nil and $data_armors[$game_actors[$combo_hero[n][3]].armor3_id].guard_element_set.include?(a))
    		  @acc += 1
    		else
    		  if ($combo_hero[n][0] != nil and $data_armors[$game_actors[$combo_hero[n][0]].armor4_id] != nil and $data_armors[$game_actors[$combo_hero[n][0]].armor4_id].guard_element_set.include?(a)) or
    			($combo_hero[n][1] != nil and $data_armors[$game_actors[$combo_hero[n][1]].armor4_id] != nil and $data_armors[$game_actors[$combo_hero[n][1]].armor4_id].guard_element_set.include?(a)) or
    			($combo_hero[n][2] != nil and $data_armors[$game_actors[$combo_hero[n][2]].armor4_id] != nil and $data_armors[$game_actors[$combo_hero[n][2]].armor4_id].guard_element_set.include?(a)) or
    			($combo_hero[n][3] != nil and $data_armors[$game_actors[$combo_hero[n][3]].armor4_id] != nil and $data_armors[$game_actors[$combo_hero[n][3]].armor4_id].guard_element_set.include?(a))
    			@acc += 1
    		  else
    			return false
    		  end
    		end
    	  end
    	end
      end
    end
    if @times == @acc
      return super
    else
      return false
    end
     end
    end
    
    class Game_Battler
     def combo_can_use?(skill_id)
    for i in 0...$combo_skill.size
      if $combo_skill[i] == skill_id
    	n = i
      end
    end
    for i in 0...$combo_hero[n].size
      if $combo_point[n][i] > $game_actors[$combo_hero[n][i]].sp
    	return false
      end
    end
    for i in 0...$combo_hero[n].size
      if $game_actors[$combo_hero[n][i]].hp == 0 and not $game_actors[$combo_hero[n][i]].immortal
    	return false
      end
    end
    for i in 0...$combo_hero[n].size
      if $data_skills[skill_id].atk_f == 0 and $game_actors[$combo_hero[n][i]].restriction == 1
    	return false
      end
    end
    occasion = $data_skills[skill_id].occasion
    pl = 0
    if $game_temp.in_battle
      for i in 0...$combo_hero[n].size
    	if $game_party.actors.include?($game_actors[$combo_hero[n][i]])
    	  pl += 1
    	end
      end
      if pl == $combo_hero[n].size
    	return (occasion == 0 or occasion == 1)
      else
    	return false
      end
    else
      for i in 0...$combo_hero[n].size
    	if $game_switches[$combo_hero[n][i] + 9] == true
    	  pl += 1
    	end
      end
      if pl == $combo_hero[n].size
    	return (occasion == 0 or occasion == 2)
      else
    	return false
      end
    end
     end
    end
    
    class Scene_Skill
     alias update_skill_combo update_skill
     def update_skill
    update_skill_combo
    if Input.trigger?(TASTO_CAMBIO_SKILL_E_COMBO)
      $game_system.se_play($data_system.decision_se)
      $scene = Scene_Combo.new(@actor_index)
      return
    end
     end
    end
    
    class Window_Combo < Window_Selectable
     #--------------------------------------------------------------------------
     # â— Inizializzazione
     #--------------------------------------------------------------------------
     def initialize(actor)
    super(0, 320, 640, 160)
    @actor = actor
    @column_max = 1
    refresh
    self.index = 0
    if $game_temp.in_battle
      self.y = 64
      self.height = 256
      self.back_opacity = 160
    end
     end
     #--------------------------------------------------------------------------
     # â— Riporta la combo selezionata
     #--------------------------------------------------------------------------
     def skill
    return @data[self.index]
     end
     #--------------------------------------------------------------------------
     # â— Conteggia i combo da disegnare
     #--------------------------------------------------------------------------
     def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @data = []
    for i in 0...@actor.skills.size
      skill = $data_skills[@actor.skills[i]]
      if skill != nil and $combo_skill.include?(skill.id)
    	@data.push(skill)
      end
    end
    @item_max = @data.size
    if @item_max > 0
      self.contents = Bitmap.new(width - 32, row_max * 32)
      self.contents.font.name = $fontface
      self.contents.font.size = $fontsize
      for i in 0...@item_max
    	draw_item(i)
      end
    end
     end
     #--------------------------------------------------------------------------
     # â— Disegna la combo
     #--------------------------------------------------------------------------
     def draw_item(index)
    skill = @data[index]
    for i in 0...$combo_skill.size
      if $combo_skill[i] == skill.id
    	n = i
      end
    end
    v = 0
    for h in 0...$combo_hero[n].size
      if $game_actors[$combo_hero[n][h]].combo_can_use?(skill.id)
    	v += 1
      end
    end
    if v == $combo_hero[n].size
      self.contents.font.color = normal_color
    else
      self.contents.font.color = disabled_color
    end
    x = 4
    y = index * 32
    rect = Rect.new(x, y, self.width - 32, 64)
    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/2, 204, 32, skill.name, 0)
    if not $game_temp.in_battle
      self.contents.draw_text(x + 232, y/2, 48, 32, $combo_point[n][0].to_s, 2)
      self.contents.draw_text(x + 288, y/2, 48, 32, $combo_point[n][1].to_s, 2) rescue nil
      self.contents.draw_text(x + 344, y/2, 48, 32, $combo_point[n][2].to_s, 2) rescue nil
      self.contents.draw_text(x + 400, y/2, 48, 32, $combo_point[n][3].to_s, 2) rescue nil
    else
      po = []
      for i in 0...$game_party.actors.size
    	if $combo_hero[n].include?($game_party.actors[i].id)
    	  po.push $game_party.actors[i].id
    	end
      end
      ex = po.size
      for r in 0...$combo_hero[n].size
    	if not po.include?($combo_hero[n][r])
    	  po.push $combo_hero[n][r]
    	end
      end
      for ach in 0...po.size
    	if ach == ex
    	  self.contents.font.color = self.contents.font.color == normal_color ? knockout_color : Color.new(255, 64, 0, 128)
    	end
    	for h in 0...$combo_hero[n].size
    	  if $combo_hero[n][h] == po[ach]
    		punti = $combo_point[n][h]
    	  end
    	end
    	self.contents.draw_text(x + 232 + (ach * 56), y/2, 48, 32, punti.to_s, 2)
      end
    end
     end
     #--------------------------------------------------------------------------
     # â— Finestra con descrizione combo
     #--------------------------------------------------------------------------
     def update_help
    @help_window.set_text(self.skill == nil ? "" : self.skill.description)
     end
    end
    
    class Window_ComboStatus < Window_Base
     #--------------------------------------------------------------------------
     # â— Inizializzazione
     #--------------------------------------------------------------------------
     def initialize(actor, n)
    super(0, 64*n, 640, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $fontface
    self.contents.font.size = $fontsize
    @actor = actor
    refresh
     end
     #--------------------------------------------------------------------------
     # â— Disegna i valori
     #--------------------------------------------------------------------------
     def refresh
    self.contents.clear
    if @actor != nil
      draw_actor_name(@actor, 4, 0)
      draw_actor_state(@actor, 140, 0)
      draw_actor_hp(@actor, 284, 0)
      draw_actor_sp(@actor, 460, 0)
    end
     end
     #--------------------------------------------------------------------------
     # â— Imposta il personaggio
     #--------------------------------------------------------------------------
     def actor=(actor)
    @actor = actor
    refresh
     end
    end
    
    class Scene_Combo
     #--------------------------------------------------------------------------
     # â— Inizializzazione
     #--------------------------------------------------------------------------
     def initialize(actor_index = 0, equip_index = 0)
    @actor_index = actor_index
     end
     #--------------------------------------------------------------------------
     # â— Ciclo principale
     #--------------------------------------------------------------------------
     def main
    @actor = $game_party.actors[@actor_index]
    @help_window = Window_Help.new
    @status_window = Window_ComboStatus.new(@actor, 1)
    @status_window2 = Window_ComboStatus.new(nil, 2)
    @status_window3 = Window_ComboStatus.new(nil, 3)
    @status_window4 = Window_ComboStatus.new(nil, 4)
    @skill_window = Window_Combo.new(@actor)
    @skill_window.help_window = @help_window
    @target_window = Window_Target.new
    @target_window.visible = false
    @target_window.active = false
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
    	break
      end
    end
    Graphics.freeze
    @help_window.dispose
    @status_window.dispose
    @status_window2.dispose
    @status_window3.dispose
    @status_window4.dispose
    @skill_window.dispose
    @target_window.dispose
     end
     #--------------------------------------------------------------------------
     # â— Aggiornamento
     #--------------------------------------------------------------------------
     def update
    @help_window.update
    @status_window.update
    @status_window2.update
    @status_window3.update
    @status_window4.update
    @skill_window.update
    @target_window.update
    if @skill_window.active
      update_skill
      return
    end
    if @target_window.active
      update_target
      return
    end
     end
     #--------------------------------------------------------------------------
     # â— Gestione combo
     #--------------------------------------------------------------------------
     def update_skill
    for i in 0...$combo_skill.size
      if $combo_skill[i] == @skill_window.skill.id
    	n = i
      end
    end
    if n != nil
      v = 0
      for h in 0...$combo_hero[n].size
    	if $game_actors[$combo_hero[n][h]].combo_can_use?(@skill_window.skill.id)
    	  v += 1
    	end
      end
    end
    @status_window.actor = $game_actors[$combo_hero[n][0]] rescue @status_window.actor = @actor
    @status_window2.actor = $game_actors[$combo_hero[n][1]] rescue @status_window2.actor = nil
    @status_window3.actor = $game_actors[$combo_hero[n][2]] rescue @status_window3.actor = nil
    @status_window4.actor = $game_actors[$combo_hero[n][3]] rescue @status_window4.actor = nil
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Menu.new(1)
      return
    end
    if Input.trigger?(Input::C)
      @skill = @skill_window.skill
      if @skill == nil or not v == $combo_hero[n].size
    	$game_system.se_play($data_system.buzzer_se)
    	return
      end
      $game_system.se_play($data_system.decision_se)
      if @skill.scope >= 3
    	@skill_window.active = false
    	@target_window.x = (@skill_window.index + 1) % 2 * 304
    	@target_window.visible = true
    	@target_window.active = true
    	if @skill.scope == 4 || @skill.scope == 6
    	  @target_window.index = -1
    	elsif @skill.scope == 7
    	  @target_window.index = @actor_index - 10
    	else
    	  @target_window.index = 0
    	end
      else
    	if @skill.common_event_id > 0
    	  $game_temp.common_event_id = @skill.common_event_id
    	  $game_system.se_play(@skill.menu_se)
    	  for s in 0...$combo_hero[n].size
    		$game_actors[$combo_hero[n][s]].sp -= $combo_point[n][s]
    	  end
    	  @status_window.refresh
    	  @status_window2.refresh
    	  @status_window3.refresh
    	  @status_window4.refresh
    	  @skill_window.refresh
    	  @target_window.refresh
    	  $scene = Scene_Map.new
    	  return
    	end
      end
      return
    end
    if Input.trigger?(Input::R)
      $game_system.se_play($data_system.cursor_se)
      @actor_index += 1
      @actor_index %= $game_party.actors.size
      $scene = Scene_Combo.new(@actor_index)
      return
    end
    if Input.trigger?(Input::L)
      $game_system.se_play($data_system.cursor_se)
      @actor_index += $game_party.actors.size - 1
      @actor_index %= $game_party.actors.size
      $scene = Scene_Combo.new(@actor_index)
      return
    end
    if Input.trigger?(TASTO_CAMBIO_SKILL_E_COMBO)
      $game_system.se_play($data_system.decision_se)
      $scene = Scene_Skill.new(@actor_index)
      return
    end
     end
     #--------------------------------------------------------------------------
     # â— Scelta personaggio per utilizzare combo di cura
     #--------------------------------------------------------------------------
     def update_target
    for i in 0...$combo_skill.size
      if $combo_skill[i] == @skill_window.skill.id
    	n = i
      end
    end
    @status_window.actor = $game_actors[$combo_hero[n][0]] rescue @status_window.actor = @actor
    @status_window2.actor = $game_actors[$combo_hero[n][1]] rescue @status_window2.actor = nil
    @status_window3.actor = $game_actors[$combo_hero[n][2]] rescue @status_window3.actor = nil
    @status_window4.actor = $game_actors[$combo_hero[n][3]] rescue @status_window4.actor = nil
    v = 0
    for h in 0...$combo_hero[n].size
      if $game_actors[$combo_hero[n][h]].combo_can_use?(@skill_window.skill.id)
    	v += 1
      end
    end
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @skill_window.active = true
      @target_window.visible = false
      @target_window.active = false
      return
    end
    if Input.trigger?(Input::C)
      unless v == $combo_hero[n].size
    	$game_system.se_play($data_system.buzzer_se)
    	return
      end
      if @target_window.index == -1
    	used = false
    	for i in $game_party.actors
    	  used |= i.skill_effect(@actor, @skill)
    	end
      end
      if @target_window.index <= -2
    	target = $game_party.actors[@target_window.index + 10]
    	used = target.skill_effect(@actor, @skill)
      end
      if @target_window.index >= 0
    	target = $game_party.actors[@target_window.index]
    	used = target.skill_effect(@actor, @skill)
      end
      if used
    	$game_system.se_play(@skill.menu_se)
    	for s in 0...$combo_hero[n].size
    	  $game_actors[$combo_hero[n][s]].sp -= $combo_point[n][s]
    	end
    	@status_window.refresh
    	@status_window2.refresh
    	@status_window3.refresh
    	@status_window4.refresh
    	@skill_window.refresh
    	@target_window.refresh
    	if $game_party.all_dead?
    	  $scene = Scene_Gameover.new
    	  return
    	end
    	if @skill.common_event_id > 0
    	  $game_temp.common_event_id = @skill.common_event_id
    	  $scene = Scene_Map.new
    	  return
    	end
      end
      unless used
    	$game_system.se_play($data_system.buzzer_se)
      end
      return
    end
     end
    end

     

    il secondo ora lo vado a copiare e lo aggiungo

  5. guarda e' lo stesso problema che ho anch'io... anche se faccio le case tutte diverse usando diversi tile, o gli stessi colorati o disposti in modi diversi, poi sembra che stoni troppo e quindi finisco per fare una casa e tanti copia e incolla XD
  6. i leccac**o ci sono comunque anche perche' ci sono quelli che se lo lasciano leccare u.u... Per il fatto del dare 100 solo a chi lo merita... credo che finiti gli esami saro' d'accordo anch'io :P
  7. e' una che ne sa' u.u cioe' ma io quando ho giocato a chrono trigger non ho capito niente? In che senso chrono non parla? Per il bs... In effetti quello originale è bello, se vogliamo cercare di farlo, io ho gia' pronto il sistema delle combo, pero' per le tante animazioni ci vorrebbe un grafico, no?
  8. XD la divina commedia... A scuola mi sembra che la facciamo... Chissa' che qualche volta non decida di aprire il libro/leggerla/studiarla XDD no comunque all'inizio dell'anno gli ho parafrasato il primo canto del paradiso... magari prima della fine ne faccio un altro
  9. XD no, non e' inutile, anzi e' una delle parti piu' importanti e ci vuole abilita' per farlo. Vedi come son brutte le mappe dei miei giochi ad esempio, non e' che non abbia provato a farle decenti XD
×
×
  • Create New...