RPG maker VX


Unirse al foro, es rápido y fácil

RPG maker VX
RPG maker VX
¿Quieres reaccionar a este mensaje? Regístrate en el foro con unos pocos clics o inicia sesión para continuar.
Últimos temas
» Script de menu
por maxi Jue 04 Dic 2014, 1:44 pm

» Ayuda intro animado!!!
por maxi Miér 03 Dic 2014, 9:41 pm

» ayuda con este engin
por maxi Miér 03 Dic 2014, 8:42 am

» Hud de Vida 100% Personalizable - Engine Sencillo! Sin Scripts :)
por davidaikago Jue 20 Nov 2014, 10:58 am

» Ultimate parallax control by:GDS [ace]
por arellano Miér 08 Oct 2014, 8:28 pm

» Script Touhou (animated) Map name (v1.4)
por davidaikago Miér 08 Oct 2014, 2:09 pm

» tutorial puerta nueva
por davidaikago Miér 08 Oct 2014, 9:08 am

» cámara de fotos
por davidaikago Miér 08 Oct 2014, 9:05 am

» Imperial Action System II Demo
por davidaikago Miér 08 Oct 2014, 8:47 am

» VE Batalla animada [ACE]
por FhierusIV Jue 18 Sep 2014, 10:57 am

» Nuevo Reglamento del Foro [Vigente desde Septiembre 2014]
por maxi Miér 17 Sep 2014, 8:37 am

» MOG|Animated Title
por Souta21 Mar 09 Sep 2014, 7:24 pm

» Tutorial Engine - Cambiar Character al Equipar Objeto
por maxi Lun 21 Jul 2014, 10:19 am

» Script de climas
por gambasoxd Sáb 19 Jul 2014, 8:58 am

» Script de contraseña(codigo) para abrir un cofre
por rpgame Jue 03 Jul 2014, 6:03 pm

¿Quién está en línea?
En total hay 2 usuarios en línea: 0 Registrados, 0 Ocultos y 2 Invitados

Ninguno

[ Ver toda la lista ]


El record de usuarios en línea fue de 117 durante el Mar 09 Ago 2011, 3:39 pm

[Aporte] Scrip Combinaciones Alquimicas

4 participantes

Ir abajo

[Aporte] Scrip Combinaciones Alquimicas Empty [Aporte] Scrip Combinaciones Alquimicas

Mensaje por Azura Frozenheart Lun 18 Mar 2013, 8:52 pm

Buenos días, tardes, noches, depende de la hora, a todos...


Hoy les traigo un script que les puede ser muy útil, lo encontré mientras vagaba por la red, y trata de lo siguiente:

[Tienes que estar registrado y conectado para ver esa imagen]

El script básicamente hace que podamos combinar objetos para crear uno nuevo, por ejemplo...
Planta verde + planta verde = Poción
Bueno básicamente es eso, es de gran utilidad y les puede servir de gran medida para hacer sus juegos más amenos y más llamativos.

El Scrip es para el VX hasta ahora no e tenido problemas de compatibilidad, y lo único que se necesita para que funcione es: configurar tus combinaciones, y llamar al script, con algún comando de evento común. o dependiendo de en que momento desean que se active el menú.

El Script es el siguiente:


Código:
 #==============================================================================
# ** TDS Alchemy
# Version: 1.5
#------------------------------------------------------------------------------
# This script allows for the creation of objects trough a menu using other
# objects and alchemic methods as the base for their creation.
#==============================================================================
# WARNING:
#
# Do not release, distribute or change my work without my expressed written
# consent, doing so violates the terms of use of this work.
#
# * Not Knowing English or understanding these terms will not excuse you in any
#  way from the consequenses.
#
# * This applies to all of my work whether they have thiss notice or not.
#
# Contact Email: [Tienes que estar registrado y conectado para ver este vínculo]
#==============================================================================

  #--------------------------------------------------------------------------
  # * Constants
  #--------------------------------------------------------------------------
 
  #-------------------------------------------------------------------------- 
  # ALCHEMY_METHODS = [
  # ["Formula alquímica", [ID de los objetos necesarios], [Cantidad de objetos necesarios],
  # [Tipo de los objetos necesarios], flag de activación, tipo de recompensa de ítem,
  # ID del objeto recompensa, cantidad de objetos a recibir],
  #
  # [...]
  #
  # ]
  #
  # la flag de acticacion es la que indica si la formula se sabe desde el comineso
  # si es True, se sabra desde el principio si es False tendra que aprenderse
  #
  #
  # Tipos de Items:
  #  "Item" = Items
  #  "Arma" = Weapons
  #  "Armadura" = Armor
  #--------------------------------------------------------------------------
  ALCHEMY_METHODS = [
  ["Pequeña Poción Roja",[1,3],[2,1],["Item","Item"],true,"Item",4,1],
 
  ]
 
  #--------------------------------------------------------------------------
  # Esto funciona para que se nesesite pagar algo de dinero al usar una formula
  # 
  # ALCHEMY_METHODS_PRICES = {
  # "Nombre de la formula" => Precio,
  #  "..." => ...,
  #
  # }
  #-------------------------------------------------------------------------- 
  ALCHEMY_METHODS_PRICES = {
 
 
  }

#==============================================================================
# ** Scene_File
#------------------------------------------------------------------------------
#  This class performs the save and load screen processing.
#==============================================================================

class Scene_File < Scene_Base
  #--------------------------------------------------------------------------
  # * Read Save Data
  #    file : file object for reading (opened)
  #--------------------------------------------------------------------------
  alias tds_alchemy_read_save_data read_save_data
  def read_save_data(file)
    tds_alchemy_read_save_data(file)   
    # Set alchemy values
    $game_system.set_alchemy_values   
  end
end

#==============================================================================
# ** Game_System
#------------------------------------------------------------------------------
#  This class handles system-related data. Also manages vehicles and BGM, etc.
# The instance of this class is referenced by $game_system.
#==============================================================================

class Game_System
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :alchemy_method_activated        # Methods activated flag
  attr_accessor :alchemy_method_requirements      # Methods requirement data
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  alias tds_alchemy_game_system_initialize initialize
  def initialize
    @alchemy_method_activated = {}
    @alchemy_method_requirements  = {}   
    # Set first alchemy values
    set_alchemy_values
    tds_alchemy_game_system_initialize   
  end
  #--------------------------------------------------------------------------
  # * Set Alchemy Values
  #--------------------------------------------------------------------------
  def set_alchemy_values   
  for i in 0...ALCHEMY_METHODS.size   
    next if @alchemy_method_activated.has_key?(ALCHEMY_METHODS[i][0].to_s)         
    @alchemy_method_activated.update({ALCHEMY_METHODS[i][0].to_s => ALCHEMY_METHODS[i][4]})
  end 
  for i in 0...ALCHEMY_METHODS.size   
    next if @alchemy_method_requirements.has_key?(ALCHEMY_METHODS[i][0].to_s)             
    @alchemy_method_requirements.update({ALCHEMY_METHODS[i][0].to_s => ALCHEMY_METHODS[i][1..7] })
    end 
  end
  #--------------------------------------------------------------------------
  # * Learn Alchemic Method
  #--------------------------------------------------------------------------
  def learn_alchemy_method(method)
    @alchemy_method_activated[method] = true
  end 
  #--------------------------------------------------------------------------
  # * Forget Alchemic Method
  #--------------------------------------------------------------------------
  def forget_alchemy_method(method)
    @alchemy_method_activated[method] = false
  end 
end


#==============================================================================
# ** Scene_Alchemy
#------------------------------------------------------------------------------
#  This class performs the alchemy menu screen processing.
#==============================================================================

class Scene_Alchemy < Scene_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #    from_map    : flag verifying where the script was called
  #    return_index : return_index if returning to the main menu
  #--------------------------------------------------------------------------
  def initialize(from_map=true, return_index = 0)
    @from_map = from_map
    @return_index = return_index
    @old_index = -1
    @disable_index = []
    @type = "Requerimientos"
    @creation_phase = nil
  end
  #--------------------------------------------------------------------------
  # * Start processing
  #--------------------------------------------------------------------------
  def start
    super
    create_menu_background   
    create_command_windows
    # Create help window
    @help_window = Window_Help.new   
    @help_window.set_text("Escoge algún método de alquimia", 1)
    # Create Recipe Header Window
    @recipe_title_window = Window_Base.new(0, 56, 210, 58)
    @recipe_title_window.contents = Bitmap.new(210-32,56-32)
    @recipe_title_window.contents.font.color = @recipe_title_window.text_color(16)
    @recipe_title_window.contents.draw_text(0,0,210-32,56-32, "Formulas alquímicas",1)
    # Creates Recipe status window
    @recipe_status_window = Window_Result_Item_Status.new
    @recipe_status_window.refresh(@alchemy_methods[@recipe_command_window.index], @type)         
    # Creates window status requirements
    @window_status_requirements = Window_Item_Status_Requirements.new
    @window_status_requirements.refresh(@alchemy_methods[@recipe_command_window.index], @type)                 
    # Creates Item Header Window
    @item_name_header = Window_Base.new(210, 146, 334, 56)           
    @item_name_header.contents = Bitmap.new(334-32,56-32)
    @item_name_header.contents.font.color = @item_name_header.text_color(16)
    header = "Objetos Necesarios" + "        " + "Tienes" + "    " + "Necesitas"
    @item_name_header.contents.draw_text(0,0,334-32,56-32, header,2)       
  end
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  def terminate
    super
    dispose_menu_background   
    @recipe_command_window.dispose
    @recipe_title_window.dispose
    @help_window.dispose
    @recipe_status_window.dummy_dispose
    @recipe_status_window.dispose
    @window_status_requirements.dispose
    @item_name_header.dispose   
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
    @recipe_command_window.update
    @yes_no_command_window.update   
    if @old_index != @recipe_command_window.index
      if @yes_no_command_window.active == false
        @recipe_status_window.refresh(@alchemy_methods[@recipe_command_window.index], @type)     
      end   
      set_windows_text                                   
      @window_status_requirements.refresh(@alchemy_methods[@recipe_command_window.index], @type)                   
      @old_index = @recipe_command_window.index
      @old_index %= @alchemy_methods.size     
    end             
   
    if Input.trigger?(Input::CTRL)
      @old_index = -1
      if @type == "Requerimientos"   
        @type = "Status"     
      elsif @type == "Status"     
        @type = "Requerimientos"   
      end
    end       
    if @creation_phase != nil
      case @creation_phase
      when 1
        update_object_creation 
      end
    end   
    if @recipe_command_window.active
      update_command_selection
    end
  end
  #--------------------------------------------------------------------------
  # * Update Object Creation
  #--------------------------------------------------------------------------
  def update_object_creation
    if Input.trigger?(Input::B)
      Sound.play_cancel
      @creation_phase = nil
      @recipe_status_window.width = 334
      @recipe_status_window.contents = Bitmap.new(334-32, 90-32)       
      @recipe_status_window.refresh(@alchemy_methods[@recipe_command_window.index], @type,nil)             
      @recipe_status_window.active = false   
      close_yes_no_command_window       
      @yes_no_command_window.active = false
      @recipe_command_window.active = true     
      # Input update
      Input.update
      @old_index -= 1     
      @old_index %= @alchemy_methods.size             
      return     
    end           
    if Input.trigger?(Input::C)
      case @yes_no_command_window.index
      when 0
        Audio.se_play("Audio/SE/Up", 100, 100)   
        alchemic_creation_process(@alchemy_methods[@recipe_command_window.index])       
        @creation_phase = nil
        @recipe_status_window.width = 334
        @recipe_status_window.contents = Bitmap.new(334-32, 90-32)       
        @recipe_status_window.refresh(@alchemy_methods[@recipe_command_window.index], @type,nil)             
        @recipe_status_window.active = false   
        close_yes_no_command_window       
        @yes_no_command_window.active = false               
        @recipe_command_window.active = true               
        for i in [Tienes que estar registrado y conectado para ver este vínculo]
          @disable_index.uniq!
          @disable_index.sort!
          if can_perform_alchemy(@alchemy_methods[i]) == false
            @recipe_command_window.draw_item(i, false)
            @disable_index << i
          else
            @disable_index.delete(i)
          end     
        end   
        # Input update
        Input.update
        object_type = $game_system.alchemy_method_requirements[@alchemy_methods[@recipe_command_window.index]]
        case object_type[4]
        when "Item"
          alchemic_object = $data_items[object_type[5]]     
        when "Weapon"     
          alchemic_object = $data_weapons[object_type[5]]
        when "Armor"             
          alchemic_object = $data_armors[object_type[5]]     
        end                               
        @help_window.set_text(alchemic_object.name.to_s + " Created", 1)       
        @recipe_status_window.refresh(@alchemy_methods[@recipe_command_window.index], @type)     
        @window_status_requirements.refresh(@alchemy_methods[@recipe_command_window.index], @type)                   
        return             
      when 1
        Sound.play_cancel
        @creation_phase = nil
        @recipe_status_window.width = 334
        @recipe_status_window.contents = Bitmap.new(334-32, 90-32)       
        @recipe_status_window.refresh(@alchemy_methods[@recipe_command_window.index], @type,nil)             
        @recipe_status_window.active = false   
        close_yes_no_command_window       
        @yes_no_command_window.active = false       
        @recipe_command_window.active = true     
        # Input update
        Input.update
        @old_index -= 1
        @old_index %= @alchemy_methods.size               
        return             
      end     
    end   
  end                 
  end 
  #--------------------------------------------------------------------------
  # * Open YES/NO Command Window
  #--------------------------------------------------------------------------
  def open_yes_no_command_window
    @yes_no_command_window.open
    begin
      @yes_no_command_window.update
      Graphics.update
    end until @yes_no_command_window.openness == 255
  end
  #--------------------------------------------------------------------------
  # * Close YES/NO Command Window
  #--------------------------------------------------------------------------
  def close_yes_no_command_window
    @yes_no_command_window.close
    begin
      @yes_no_command_window.update
      Graphics.update             
    end until @yes_no_command_window.openness == 0
  end 
  #--------------------------------------------------------------------------
  # * Set Windows Text
  #--------------------------------------------------------------------------
  def set_windows_text
    @item_name_header.contents.clear     
    object_type = $game_system.alchemy_method_requirements[@alchemy_methods[@recipe_command_window.index]]
    case object_type[4]
    when "Item"
      alchemic_object = $data_items[object_type[5]]     
    when "Weapon"     
      alchemic_object = $data_weapons[object_type[5]]
    when "Armor"             
      alchemic_object = $data_armors[object_type[5]]     
    end             
    if @type == "Requerimientos"
      header = "Objetos Necesarios" + "        " + "Tienes" + "  " + "Necesitas"
      @item_name_header.contents.draw_text(0,0,334-32,56-32, header,2)     
      if @yes_no_command_window.active == false
        @help_window.set_text("Escoge alguna formula de alquimia", 1)                       
      end   
    else
      if @yes_no_command_window.active == false     
        @help_window.set_text(alchemic_object.description.capitalize.to_s, 1)                     
      end     
      header = "Object information"
      @item_name_header.contents.draw_text(0,0,334-32,56-32, header,1)                     
    end           
  end
  #--------------------------------------------------------------------------
  # * Create Command Windows
  #--------------------------------------------------------------------------
  def create_command_windows   
    # Array to hold the command names
    @alchemy_methods = []
    for i in 0...ALCHEMY_METHODS.size
      next if $game_system.alchemy_method_activated[ALCHEMY_METHODS[i][0].to_s] == false 
      @alchemy_methods.push(ALCHEMY_METHODS[i][0])
    end     
    # Creates recipes command window
    @recipe_command_window = Window_Command.new(210, @alchemy_methods)   
    @recipe_command_window.y = 114
    @recipe_command_window.height = 302# 304   
    # Creates YES/NO window
    @yes_no_command_window = Window_Command.new(72, ["Yes", "No"])       
    @yes_no_command_window.height += 10
    @yes_no_command_window.y = 56   
    @yes_no_command_window.x = 472
    @yes_no_command_window.openness = 0
    @yes_no_command_window.active = false   
    @yes_no_command_window.index = 1
    for i in [Tienes que estar registrado y conectado para ver este vínculo]
      if can_perform_alchemy(@alchemy_methods[i]) == false
        @recipe_command_window.draw_item(i, false)
        @disable_index << i
      end     
    end   
  end 
  #--------------------------------------------------------------------------
  # * Alchemic Creation Process
  #    method : Name of alchemic method to be processed
  #--------------------------------------------------------------------------
  def alchemic_creation_process(method = nil)
    alchemy_result = $game_system.alchemy_method_requirements[method]
    object_ids = []
    for i in 0...alchemy_result[0].size
      next if alchemy_result[0][i] == nil     
      case alchemy_result[2][i]
      when "Item" 
        object_ids.push($data_items[alchemy_result[0][i]])
      when "Weapon"         
        object_ids.push($data_weapons[alchemy_result[0][i]])     
      when "Armor"             
        object_ids.push($data_armors[alchemy_result[0][i]])           
      end
    end   
    for i in 0...object_ids.size   
      $game_party.lose_item(object_ids[i], alchemy_result[1][i])
    end       
    if ALCHEMY_METHODS_PRICES[method] != nil
      $game_party.lose_gold(ALCHEMY_METHODS_PRICES[method])
    end 
    case alchemy_result[4]
    when "Item"       
      $game_party.gain_item($data_items[alchemy_result[5]], alchemy_result[6])
    when "Weapon"         
      $game_party.gain_item($data_weapons[alchemy_result[5]], alchemy_result[6])
    when "Armor"             
      $game_party.gain_item($data_armors[alchemy_result[5]], alchemy_result[6])     
    end   
  end 
  #--------------------------------------------------------------------------
  # * Can Perform Alchemy
  #    method : Name of alchemic method to be verified 
  #--------------------------------------------------------------------------
  def can_perform_alchemy(method = nil)
    alchemy_result = $game_system.alchemy_method_requirements[method]
    object_ids = []
    for i in 0...alchemy_result[0].size
      next if alchemy_result[0][i] == nil     
      case alchemy_result[2][i]
      when "Item" 
        object_ids.push($data_items[alchemy_result[0][i]])
        object_quantity = $data_items[alchemy_result[5]]       
      when "Weapon"         
        object_ids.push($data_weapons[alchemy_result[0][i]]) 
        object_quantity = $data_weapons[alchemy_result[5]]               
      when "Armor"             
        object_ids.push($data_armors[alchemy_result[0][i]])           
        object_quantity = $data_armors[alchemy_result[5]]                       
      end
    end
    if $game_party.item_number(object_quantity) >= 99
      return false
    break 
    end
    if ALCHEMY_METHODS_PRICES[method] != nil
      if $game_party.gold < ALCHEMY_METHODS_PRICES[method]
        return false
      break         
      end     
    end   
    for i in 0...object_ids.size   
      if $game_party.item_number(object_ids[i]) < alchemy_result[1][i]
        return false
        break         
      end     
      if !$game_party.has_item?(object_ids[i])
        return false
      break 
      end
    end 
  end 
  #--------------------------------------------------------------------------
  # * Update Command Selection
  #--------------------------------------------------------------------------
  def update_command_selection   
    if Input.repeat?(Input::B)
      Sound.play_cancel
      if @from_map
        $scene = Scene_Map.new
      else
        $scene = Scene_Menu.new(@return_index)                       
      end     
    end   
    if Input.trigger?(Input::C)
      if @disable_index.include?(@recipe_command_window.index)
        Sound.play_buzzer
      return
    end         
    Sound.play_decision   
    @creation_phase = 1
    @recipe_status_window.width = 262
    @recipe_status_window.contents = Bitmap.new(262-32, 90-32)       
    @recipe_status_window.refresh(@alchemy_methods[@recipe_command_window.index], @type,true)             
    @help_window.set_text("¿Quieres crear este objeto?", 1)   
    @yes_no_command_window.index = 1   
    open_yes_no_command_window
    @yes_no_command_window.active = true
    @recipe_command_window.active = false   
    return
  end     
end


#==============================================================================
# ** Window_Result_Item_Status
#------------------------------------------------------------------------------
#  This window displays information about the alchemic method.
#==============================================================================

class Window_Result_Item_Status < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(210, 56, 334, 90)
    @dummy_square_window = Window_Base.new(self.x + 12, self.y + 12, 36, 36)       
    @dummy_square_window.back_opacity = 0
    refresh
  end
  #--------------------------------------------------------------------------
  # * Dummy Dispose
  #--------------------------------------------------------------------------
  def dummy_dispose
    @dummy_square_window.dispose       
  end 
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh(alchemic_result = nil, type = nil, object_creation = nil)
    self.contents.clear
    return if $game_system.alchemy_method_requirements[alchemic_result] == nil
    @alchemy_result = $game_system.alchemy_method_requirements[alchemic_result]       
    case @alchemy_result[4]
    when "Item"
      alchemic_object = $data_items[@alchemy_result[5]]     
    when "Weapon"     
      alchemic_object = $data_weapons[@alchemy_result[5]]
    when "Armor"             
      alchemic_object = $data_armors[@alchemy_result[5]]     
    end
    draw_icon(alchemic_object.icon_index, 3, 2, enabled = true)
    self.contents.draw_text(40, -3, 190, 32, alchemic_object.name.to_s)   
    self.contents.draw_text(280, -3, 200, 32, @alchemy_result[6].to_s)     
    if object_creation != true
    self.contents.font.color = system_color
    self.contents.draw_text(230, -3, 200, 32, "Qty:")       
    if type == "Requerimientos"
      self.contents.draw_text(0, 30, 318, 32, "Presiona Ctrl para detalles")         
    else
      self.contents.draw_text(0, 30, 318, 32, "Presiona Ctrl para requisitos")             
    end
  else
    if ALCHEMY_METHODS_PRICES[alchemic_result] != nil
      self.contents.draw_text(0, 30, 318, 32, "Creation Price: " +
      ALCHEMY_METHODS_PRICES[alchemic_result].to_s + Vocab::gold.to_s)         
    else
      self.contents.draw_text(0, 30, 235, 32, "¿Creas " + alchemic_object.name.to_s + "?")                 
    end 
  end 
  self.contents.font.color = normal_color
  end 
end



#==============================================================================
# ** Window_Item_Status_Requirements
#------------------------------------------------------------------------------
#  This window displays the requirements for alchemic methods
#==============================================================================

class Window_Item_Status_Requirements < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(210, 202, 334, 214)
    self.opacity = 0
    self.z += 200
    @dummy_window_full_back = Window_Base.new(210, 202, 334, 214)
    @dummy_window_required_names = Window_Base.new(210, 202, 200, 214)
    @dummy_window_required_have = Window_Base.new(410, 202, 67, 214)   
    @dummy_window_required_need = Window_Base.new(477, 202, 67, 214)       
    @dummy_window_required_names.visible = false
    @dummy_window_required_have.visible = false   
    @dummy_window_required_need.visible = false       
    refresh
  end
  #--------------------------------------------------------------------------
  # * Dispose
  #--------------------------------------------------------------------------
  def dispose
    self.contents.dispose
    @dummy_window_full_back.dispose   
    @dummy_window_required_names.dispose   
    @dummy_window_required_have.dispose       
    @dummy_window_required_need.dispose   
  end 
  #--------------------------------------------------------------------------
  # * Refresh
  #    alchemic_result : Alchemic method name
  #    type            : type of display "Status" or others
  #--------------------------------------------------------------------------
  def refresh(alchemic_result = nil, type = nil)
    self.contents.clear   
    return if $game_system.alchemy_method_requirements[alchemic_result] == nil   
    # Value for alchemy items
    alchemy_result = $game_system.alchemy_method_requirements[alchemic_result]
    if type == "Status"
      @dummy_window_full_back.visible = true     
      @dummy_window_required_names.visible = false
      @dummy_window_required_have.visible = false   
      @dummy_window_required_need.visible = false         
    case alchemy_result[4]
    when "Item"
      alchemic_object = $data_items[alchemy_result[5]]     
      self.contents.font.color = system_color
      self.contents.draw_text(0, 0, 200, 32, "Tienes:") 
      self.contents.draw_text(0, 28, 200, 32, "Propiedades curativas:")   
      self.contents.draw_text(10, 51, 200, 32, "Rango de Pv:"  )         
      self.contents.draw_text(10, 71, 200, 32, "Recupera Pv:"  )           
      self.contents.draw_text(10, 91, 200, 32, "Rango de Pm:"  )         
      self.contents.draw_text(10, 111, 200, 32, "Recupera Pm:"  )                     
      self.contents.draw_text(0, 133, 200, 32, "Efectos dañinos:")         
      self.contents.draw_text(0, 156, 200, 32, "Daño base:")           
      self.contents.font.color = normal_color
      self.contents.draw_text(135, 0, 200, 32, $game_party.item_number(alchemic_object).to_s) 
      self.contents.draw_text(135, 51, 200, 32, alchemic_object.hp_recovery_rate.to_s + "%")           
      self.contents.draw_text(135, 71, 200, 32, alchemic_object.hp_recovery.to_s)                 
      self.contents.draw_text(135, 91, 200, 32, alchemic_object.mp_recovery_rate.to_s + "%")           
      self.contents.draw_text(135, 111, 200, 32, alchemic_object.mp_recovery.to_s)                     
      self.contents.draw_text(135, 156, 200, 32,  alchemic_object.base_damage.to_s)                     
    when "Weapon"     
      alchemic_object = $data_weapons[alchemy_result[5]]
      self.contents.font.color = system_color     
      self.contents.draw_text(0, 0, 300, 32, "Tienes:")
      self.contents.draw_text(0, 28, 300, 32, "Cambios en estadísticas:")                 
      self.contents.draw_text(10, 56, 200, 32, "Ataque:"  )         
      self.contents.draw_text(10, 76, 200, 32, "Defenza:"  )           
      self.contents.draw_text(10, 96, 200, 32, "Inteligencia:"  )         
      self.contents.draw_text(10, 116, 200, 32, "Agilidad:"  )                 
      self.contents.draw_text(0, 148, 200, 32, "Precisión:")                     
      self.contents.font.color = normal_color     
      self.contents.draw_text(70, 0, 200, 32, $game_party.item_number(alchemic_object).to_s)       
      self.contents.draw_text(95, 56, 200, 32, alchemic_object.atk.to_s)         
      self.contents.draw_text(95, 76, 200, 32, alchemic_object.def.to_s)           
      self.contents.draw_text(95, 96, 200, 32, alchemic_object.spi.to_s  )         
      self.contents.draw_text(95, 116, 200, 32, alchemic_object.agi.to_s  )                 
      self.contents.draw_text(95, 148, 200, 32, alchemic_object.hit.to_s + "%")               
    when "Armor"             
      alchemic_object = $data_armors[alchemy_result[5]]     
      self.contents.font.color = system_color     
      self.contents.draw_text(0, 0, 300, 32, "Tienes:")
      self.contents.draw_text(0, 28, 300, 32, "Cambios en estadísticas:")                 
      self.contents.draw_text(10, 56, 200, 32, "Ataque:"  )         
      self.contents.draw_text(10, 76, 200, 32, "Defenza:"  )           
      self.contents.draw_text(10, 96, 200, 32, "Inteligencia:"  )         
      self.contents.draw_text(10, 116, 200, 32, "Agilidad:"  )                 
      self.contents.draw_text(0, 148, 200, 32, "Evacion:")                     
      self.contents.font.color = normal_color     
      self.contents.draw_text(70, 0, 200, 32, $game_party.item_number(alchemic_object).to_s)       
      self.contents.draw_text(95, 56, 200, 32, alchemic_object.atk.to_s)         
      self.contents.draw_text(95, 76, 200, 32, alchemic_object.def.to_s)           
      self.contents.draw_text(95, 96, 200, 32, alchemic_object.spi.to_s  )         
      self.contents.draw_text(95, 116, 200, 32, alchemic_object.agi.to_s  )                       
      self.contents.draw_text(95, 148, 200, 32, alchemic_object.eva.to_s + "%")               
    end
  else
    # Make dummy windows visible for this display
    @dummy_window_full_back.visible = false   
    @dummy_window_required_names.visible = true
    @dummy_window_required_have.visible = true   
    @dummy_window_required_need.visible = true       
    # Objects IDs array
    object_ids = []
    for i in 0...alchemy_result[0].size
      next if alchemy_result[0][i] == nil     
    case alchemy_result[2][i]
    when "Item" 
      object_ids.push($data_items[alchemy_result[0][i]])
    when "Weapon"         
      object_ids.push($data_weapons[alchemy_result[0][i]])     
    when "Armor"             
      object_ids.push($data_armors[alchemy_result[0][i]])           
    end
  end
  for i in 0...object_ids.size   
    self.contents.font.color.alpha = 255         
    numerical_value = i + 1
    self.contents.draw_text(0, 0 + i * 26, 200, 32, numerical_value.to_s + ".")             
    if $game_party.has_item?(object_ids[i])
      self.contents.font.color.alpha = 255     
      draw_icon(object_ids[i].icon_index, 18, 0 + i * 26, enabled = true)   
    else
      self.contents.font.color.alpha = 128     
      draw_icon(object_ids[i].icon_index, 18, 0 + i * 26, enabled = false)   
    end   
    self.contents.draw_text(42, 0 + i * 26, 138, 32, object_ids[i].name.to_s)         
    if contents.text_size(alchemy_result[1][i]).width <= 11
      self.contents.font.color.alpha = 255           
      self.contents.draw_text(93, 0 + i * 26, 200, 32, alchemy_result[1][i].to_s,2)                   
    else
      self.contents.font.color.alpha = 255           
      self.contents.draw_text(98, 0 + i * 26, 200, 32, alchemy_result[1][i].to_s,2)                   
    end       
    if $game_party.item_number(object_ids[i]) < alchemy_result[1][i]
      self.contents.font.color.alpha = 128     
    else
      self.contents.font.color.alpha = 255
    end       
    if contents.text_size($game_party.item_number(object_ids[i])).width <= 11   
      self.contents.draw_text(22, 0 + i * 26, 200, 32, $game_party.item_number(object_ids[i]).to_s,2)             
    else
      self.contents.draw_text(27, 0 + i * 26, 200, 32, $game_party.item_number(object_ids[i]).to_s,2)                   
    end
    end
  end
  end
end

Ok, he puesto una descripción básica de como se maneja en el mismo script.

y las descripciones que no puse son las siguientes:

Ahora para llamar la ventana de alquimia se le debe de llamar con algún evento con el comando llamar a Script de la siguiente manera:

Código:
$scene = Scene_Alchemy.new

Para aprender alguna formula es:

Código:

s = "Name of Alchemic Method"
$game_system.learn_alchemy_method(s)

Ejemplo:

s = "Pocion"
$game_system.learn_alchemy_method(s)

Para olvidar alguna:
[/color]
Código:
s = "Name of alchemic Method"
$game_system.forget_alchemy_method(s)


Los créditos son para Sephirothtds del foro [Tienes que estar registrado y conectado para ver este vínculo]
yo solo traduje parte de su trabajo(y no muy bien que digamos), si tienen que agradecerle a alguien denle las gracias a el.


Prox... Demo...
Azura Frozenheart
Azura Frozenheart
0
0

Masculino

Edad 31

Cantidad de envíos 4

Maker Cash 10

Reputación 3


Volver arriba Ir abajo

[Aporte] Scrip Combinaciones Alquimicas Empty Re: [Aporte] Scrip Combinaciones Alquimicas

Mensaje por Turbiosoft.acho Mar 19 Mar 2013, 6:10 am

Buenísimo aporte, precisamente ayer estuve batallando con él (no me iba porque soy lerder juash). No hace falta decir que tienes un +1 de mi parte.

¡Gracias!
Turbiosoft.acho
Turbiosoft.acho
220
220

Femenino

Edad 35

Cantidad de envíos 233

Maker Cash 1356

Reputación 47


Volver arriba Ir abajo

[Aporte] Scrip Combinaciones Alquimicas Empty Re: [Aporte] Scrip Combinaciones Alquimicas

Mensaje por RML22 Mar 19 Mar 2013, 8:59 am

Genial forma de personalizar objetos y crear items. Gracias por el aporte. Espero el demo para aprender mas de él.
RML22
RML22
50
50

Masculino

Edad 35

Cantidad de envíos 54

Maker Cash 72

Reputación 9


Volver arriba Ir abajo

[Aporte] Scrip Combinaciones Alquimicas Empty Re: [Aporte] Scrip Combinaciones Alquimicas

Mensaje por Hero Zx Mar 26 Mar 2013, 1:03 am

wow, excelente aporte, espero con ansias el demo :3
Hero Zx
Hero Zx
50
50

Masculino

Edad 30

Cantidad de envíos 70

Maker Cash 605

Reputación 1


Extras
Sobre mí:: http://gametev.wix.com/gametv

Volver arriba Ir abajo

[Aporte] Scrip Combinaciones Alquimicas Empty Re: [Aporte] Scrip Combinaciones Alquimicas

Mensaje por Contenido patrocinado


Contenido patrocinado


Volver arriba Ir abajo

Volver arriba

- Temas similares

 
Permisos de este foro:
No puedes responder a temas en este foro.