RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
need help with multi slot script

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 87
its just a snowboarder. whats wrong with it?
Sthrattoff gave me a multi equip script compatible with blizzard's Metal Plate v4.4b CMS
Code: [Select]
#==============================================================================
# Ex Equip Mode by Blizzard
# Version    : 1.3b
# Date       : 16.2.2007
# Date v1.3b : 18.3.2007
#
# Compatibility:
# Not compatible with most CMS-es.
#
# Instructions:
# Include any weapon IDs that need two hands in TWO_HANDED.
#==============================================================================

TWO_HANDED = [1, 2, 3, 4, 5, 6]

#==============================================================================
# Game_Actor
#==============================================================================

class Game_Actor < Game_Battler
 
  attr_reader :weapon2_id
 
  alias init_2_handed_later initialize
  def initialize(actor_id)
    init_2_handed_later(actor_id)
    @weapon2_id = 0
  end
 
  def element_set
    weapon1 = $data_weapons[@weapon_id]
    weapon2 = $data_weapons[@weapon2_id]
    weapon1 = weapon1 != nil ? weapon1.element_set : []
    weapon2 = weapon2 != nil ? weapon2.element_set : []
    return (weapon1 | weapon2)
  end
 
  def plus_state_set
    weapon1 = $data_weapons[@weapon_id]
    weapon2 = $data_weapons[@weapon2_id]
    weapon1 = weapon1 != nil ? weapon1.plus_state_set : []
    weapon2 = weapon2 != nil ? weapon2.plus_state_set : []
    return (weapon1 | weapon2)
  end
 
  def minus_state_set
    weapon1 = $data_weapons[@weapon_id]
    weapon2 = $data_weapons[@weapon2_id]
    weapon1 = weapon1 != nil ? weapon1.minus_state_set : []
    weapon2 = weapon2 != nil ? weapon2.minus_state_set : []
    return (weapon1 | weapon2)
  end
 
  def base_str
    n = $data_actors[@actor_id].parameters[2, @level]
    weapon1 = $data_weapons[@weapon_id]
    weapon2 = $data_weapons[@weapon2_id]
    armor1 = $data_armors[@armor1_id]
    armor2 = $data_armors[@armor2_id]
    armor3 = $data_armors[@armor3_id]
    armor4 = $data_armors[@armor4_id]
    n += weapon1 != nil ? weapon1.str_plus : 0
    n += weapon2 != nil ? weapon2.str_plus : 0
    n += armor1 != nil ? armor1.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_dex
    n = $data_actors[@actor_id].parameters[3, @level]
    weapon1 = $data_weapons[@weapon_id]
    weapon2 = $data_weapons[@weapon2_id]
    armor1 = $data_armors[@armor1_id]
    armor2 = $data_armors[@armor2_id]
    armor3 = $data_armors[@armor3_id]
    armor4 = $data_armors[@armor4_id]
    n += weapon1 != nil ? weapon1.dex_plus : 0
    n += weapon2 != nil ? weapon2.dex_plus : 0
    n += armor1 != nil ? armor1.dex_plus : 0
    n += armor2 != nil ? armor2.dex_plus : 0
    n += armor3 != nil ? armor3.dex_plus : 0
    n += armor4 != nil ? armor4.dex_plus : 0
    return [[n, 1].max, 999].min
  end
 
  def base_agi
    n = $data_actors[@actor_id].parameters[4, @level]
    weapon1 = $data_weapons[@weapon_id]
    weapon2 = $data_weapons[@weapon2_id]
    armor1 = $data_armors[@armor1_id]
    armor2 = $data_armors[@armor2_id]
    armor3 = $data_armors[@armor3_id]
    armor4 = $data_armors[@armor4_id]
    n += weapon1 != nil ? weapon1.agi_plus : 0
    n += weapon2 != nil ? weapon2.agi_plus : 0
    n += armor1 != nil ? armor1.agi_plus : 0
    n += armor2 != nil ? armor2.agi_plus : 0
    n += armor3 != nil ? armor3.agi_plus : 0
    n += armor4 != nil ? armor4.agi_plus : 0
    return [[n, 1].max, 999].min
  end
 
  def base_int
    n = $data_actors[@actor_id].parameters[5, @level]
    weapon1 = $data_weapons[@weapon_id]
    weapon2 = $data_weapons[@weapon2_id]
    armor1 = $data_armors[@armor1_id]
    armor2 = $data_armors[@armor2_id]
    armor3 = $data_armors[@armor3_id]
    armor4 = $data_armors[@armor4_id]
    n += weapon1 != nil ? weapon1.int_plus : 0
    n += weapon2 != nil ? weapon2.int_plus : 0
    n += armor1 != nil ? armor1.int_plus : 0
    n += armor2 != nil ? armor2.int_plus : 0
    n += armor3 != nil ? armor3.int_plus : 0
    n += armor4 != nil ? armor4.int_plus : 0
    return [[n, 1].max, 999].min
  end
 
  def base_atk
    weapon1 = $data_weapons[@weapon_id]
    weapon2 = $data_weapons[@weapon2_id]
    weapon1 = weapon1 != nil ? weapon1.atk : 0
    weapon2 = weapon2 != nil ? weapon2.atk : 0
    return (weapon1 + weapon2)
  end
 
  def base_pdef
    weapon1 = $data_weapons[@weapon_id]
    weapon2 = $data_weapons[@weapon2_id]
    armor1 = $data_armors[@armor1_id]
    armor2 = $data_armors[@armor2_id]
    armor3 = $data_armors[@armor3_id]
    armor4 = $data_armors[@armor4_id]
    n = weapon1 != nil ? weapon1.pdef : 0
    n += weapon2 != nil ? weapon2.pdef : 0
    n += armor1 != nil ? armor1.pdef : 0
    n += armor2 != nil ? armor2.pdef : 0
    n += armor3 != nil ? armor3.pdef : 0
    n += armor4 != nil ? armor4.pdef : 0
    return n
  end
 
  def base_mdef
    weapon1 = $data_weapons[@weapon_id]
    weapon2 = $data_weapons[@weapon2_id]
    armor1 = $data_armors[@armor1_id]
    armor2 = $data_armors[@armor2_id]
    armor3 = $data_armors[@armor3_id]
    armor4 = $data_armors[@armor4_id]
    n = weapon1 != nil ? weapon1.mdef : 0
    n += weapon2 != nil ? weapon2.mdef : 0
    n += armor1 != nil ? armor1.mdef : 0
    n += armor2 != nil ? armor2.mdef : 0
    n += armor3 != nil ? armor3.mdef : 0
    n += armor4 != nil ? armor4.mdef : 0
    return n
  end
 
  def base_eva
    armor1 = $data_armors[@armor1_id]
    armor2 = $data_armors[@armor2_id]
    armor3 = $data_armors[@armor3_id]
    armor4 = $data_armors[@armor4_id]
    n = armor1 != nil ? armor1.eva : 0
    n += armor2 != nil ? armor2.eva : 0
    n += armor3 != nil ? armor3.eva : 0
    n += armor4 != nil ? armor4.eva : 0
    return n
  end
 
  alias equip_2_handed_later equip
  def equip(equip_type, id)
    if [0, 1, 5].include?(equip_type)
      if equip_type == 0
        if id == 0 or $game_party.weapon_number(id) > 0
          if TWO_HANDED.include?(id)
            $game_party.gain_weapon(@weapon_id, 1) if @weapon_id != 0
            $game_party.gain_weapon(@weapon2_id, 1) if @weapon2_id != 0
            $game_party.gain_armor(@armor1_id, 1) if @armor1_id != 0
            @weapon_id = id
            @weapon2_id = @armor1_id = 0
            $game_party.lose_weapon(id, 1)
          else
            $game_party.gain_weapon(@weapon_id, 1)
            @weapon_id = id
            $game_party.lose_weapon(id, 1)
          end
        end
      elsif equip_type == 1
        if id == 0 or $game_party.weapon_number(id) > 0
          if TWO_HANDED.include?(@weapon_id)
            $game_party.gain_weapon(@weapon_id, 1) if @weapon_id != 0
            @armor1_id = id
            @weapon_id = 0
            $game_party.lose_armor(id, 1)
          else
            $game_party.gain_weapon(@weapon2_id, 1)
            @armor1_id = id
            @weapon2_id = 0
            $game_party.lose_armor(id, 1)
          end
        end
      elsif equip_type == 5
        if id == 0 or $game_party.weapon_number(id) > 0
          if TWO_HANDED.include?(@weapon_id)
            $game_party.gain_weapon(@weapon_id, 1) if @weapon_id != 0
            $game_party.gain_armor(@armor1_id, 1) if @armor1_id != 0
            @weapon2_id = id
            @weapon_id = @armor1_id = 0
            $game_party.lose_weapon(id, 1)
          else
            $game_party.gain_weapon(@weapon2_id, 1)
            @weapon2_id = id
            $game_party.lose_weapon(id, 1)
          end
        end
      end
    else
      equip_2_handed_later(equip_type, id)
    end
  end
 
  def test_equip(equip_type, id)
    weapon = @weapon_id
    weapon2 = @weapon2_id
    armor1 = @armor1_id
    armor2 = @armor2_id
    armor3 = @armor3_id
    armor4 = @armor4_id
    case equip_type
    when 0
      @weapon_id = id
      if TWO_HANDED.include?(id)
        @armor1_id = 0
        @weapon2_id = 0
      end
    when 1
      @weapon_id = 0 if TWO_HANDED.include?(@weapon_id)
      @weapon2_id = 0 if TWO_HANDED.include?(@weapon2_id)
      @armor1_id = id
      if @weapon2_id != 0
        @weapon_id = @weapon2_id
        @weapon2_id = 0
      end
      @armor1_id = id
      update_auto_state($data_armors[armor1], $data_armors[id])
    when 2
      @armor2_id = id
      update_auto_state($data_armors[armor2], $data_armors[id])
    when 3
      @armor3_id = id
      update_auto_state($data_armors[armor3], $data_armors[id])
    when 4
      @armor4_id = id
      update_auto_state($data_armors[armor4], $data_armors[id])
    when 5
      if TWO_HANDED.include?(id)
        @weapon_id = id
        @weapon2_id = @armor1_id = 0
      else
        @weapon_id = 0 if TWO_HANDED.include?(@weapon_id)
        @weapon2_id = id
        @armor1_id = 0
      end
    end
    tested = []
    tested.push(self.atk)
    tested.push(self.pdef)
    tested.push(self.mdef)
    @weapon_id = weapon
    @weapon2_id = weapon2
    @armor1_id = armor1
    @armor2_id = armor2
    @armor3_id = armor3
    @armor4_id = armor4
    case equip_type
    when 1 then update_auto_state($data_armors[id], $data_armors[armor1])
    when 2 then update_auto_state($data_armors[id], $data_armors[armor2])
    when 3 then update_auto_state($data_armors[id], $data_armors[armor3])
    when 4 then update_auto_state($data_armors[id], $data_armors[armor4])
    end
    return tested
  end
 
end

#==============================================================================
# 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)
    eval("@item_window = @item_window#{@right_window.index+1}")
    if @right_window.active
      @left_window.set_new_parameters(nil, nil, nil)
    end
    if @item_window.active
      item = @item_window.item
      last_hp = @actor.hp
      last_sp = @actor.sp
      type = @right_window.index
      type = 5 if item.is_a?(RPG::Weapon) and @right_window.index == 1
      tested = @actor.test_equip(type, item == nil ? 0 : item.id)
      new_atk = tested[0]
      new_pdef = tested[1]
      new_mdef = tested[2]
      @actor.hp = last_hp
      @actor.sp = last_sp
      @left_window.set_new_parameters(new_atk, new_pdef, new_mdef)
    end
  end
 
  def update_item
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @right_window.active = true
      @item_window.active = false
      @item_window.index = -1
      return
    end
    if Input.trigger?(Input::C)
      $game_system.se_play($data_system.equip_se)
      item = @item_window.item
      type = @right_window.index
      type = 5 if item.is_a?(RPG::Weapon) and @right_window.index == 1
      @actor.equip(type, item == nil ? 0 : item.id)
      @right_window.active = true
      @item_window.active = false
      @item_window1.refresh
      @item_window2.refresh
      @item_window.index = -1
      @right_window.refresh
      @item_window.refresh
      return
    end
  end
 
end

#==============================================================================
# Window_NewEquipRight
#==============================================================================

class Window_EquipRight < Window_Selectable

  def refresh
    self.contents.clear
    @data = []
    @data.push($data_weapons[@actor.weapon_id])
    if @actor.weapon2_id != 0
      @data.push($data_weapons[@actor.weapon2_id])
    else
      @data.push($data_armors[@actor.armor1_id])
    end
    @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
    self.contents.draw_text(4, 32 * 0, 92, 32, $data_system.words.weapon)
    self.contents.draw_text(4, 32 * 1, 92, 32, $data_system.words.armor1)
    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(4, 32 * 4, 92, 32, $data_system.words.armor4)
    for i in 0...5
      draw_item_name(@data[i], 92, 32 * i)
    end
    if TWO_HANDED.include?(@actor.weapon_id)
      weapon = $data_weapons[@actor.weapon_id]
      bitmap = RPG::Cache.icon(weapon.icon_name)
      self.contents.blt(92, 36, bitmap, Rect.new(0, 0, 24, 24), 128)
      self.contents.font.color = disabled_color
      self.contents.draw_text(120, 32, 212, 32, weapon.name)
    end
  end

end

#==============================================================================
# Window_EquipItem
#==============================================================================

class Window_EquipItem < Window_Selectable
 
  alias refresh_2_handed_later refresh
  def refresh
    if @equip_type == 1
      if self.contents != nil
        self.contents.dispose
        self.contents = nil
      end
      @data = []
      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]) unless TWO_HANDED.include?(i)
        end
      end
      armor_set = $data_classes[@actor.class_id].armor_set
      for i in 1...$data_armors.size
        if $game_party.armor_number(i) > 0 and armor_set.include?(i)
          @data.push($data_armors[i]) if $data_armors[i].kind == 0
        end
      end
      @data.push(nil)
      @item_max = @data.size
      self.contents = Bitmap.new(width - 32, row_max * 32)
      for i in 0...@item_max-1
        draw_item(i)
      end
    else
      refresh_2_handed_later
    end
  end
 
end

#==============================================================================
# Window_Status
#==============================================================================

class Window_Status < Window_Base

  def refresh
    draw_actor_graphic(@actor, 40, 112)
    draw_actor_name(@actor, 4, 0)
    draw_actor_class(@actor, 4 + 144, 0)
    draw_actor_level(@actor, 96, 32)
    draw_actor_state(@actor, 96, 64)
    draw_actor_hp(@actor, 96, 112, 172)
    draw_actor_sp(@actor, 96, 144, 172)
    draw_actor_parameter(@actor, 96, 192, 0)
    draw_actor_parameter(@actor, 96, 224, 1)
    draw_actor_parameter(@actor, 96, 256, 2)
    draw_actor_parameter(@actor, 96, 304, 3)
    draw_actor_parameter(@actor, 96, 336, 4)
    draw_actor_parameter(@actor, 96, 368, 5)
    draw_actor_parameter(@actor, 96, 400, 6)
    self.contents.font.color = system_color
    self.contents.draw_text(320, 48, 80, 32, "EXP")
    self.contents.draw_text(320, 80, 80, 32, "NEXT")
    self.contents.font.color = normal_color
    self.contents.draw_text(320 + 80, 48, 84, 32, @actor.exp_s, 2)
    self.contents.draw_text(320 + 80, 80, 84, 32, @actor.next_rest_exp_s, 2)
    self.contents.font.color = system_color
    self.contents.draw_text(320, 160, 96, 32, "Equipment")
    draw_item_name($data_weapons[@actor.weapon_id], 320 + 16, 208)
    if TWO_HANDED.include?(@actor.weapon_id)
      weapon = $data_weapons[@actor.weapon_id]
      bitmap = RPG::Cache.icon(weapon.icon_name)
      self.contents.blt(336, 260, bitmap, Rect.new(0, 0, 24, 24), 128)
      self.contents.font.color = disabled_color
      self.contents.draw_text(364, 256, 212, 32, weapon.name)
      self.contents.font.color = normal_color
    elsif @actor.weapon2_id != 0
      draw_item_name($data_weapons[@actor.weapon2_id], 320 + 16, 256)
    else
      draw_item_name($data_armors[@actor.armor1_id], 320 + 16, 256)
    end
    draw_item_name($data_armors[@actor.armor2_id], 320 + 16, 304)
    draw_item_name($data_armors[@actor.armor3_id], 320 + 16, 352)
    draw_item_name($data_armors[@actor.armor4_id], 320 + 16, 400)
  end
 
end
however, this code only seems to be able to make 2-handed weapons. i would like it if someone could edit this script for me so that i can have three more armors - gloves, shoes, and amulets. when editing, make sure the script is fully (or almost 100%) compatible with Blizzard's Metal Plate v4.4b CMS.  :)

*******
Rep:
Level 90
Returned from the dead.
It isn't a multi equip script if it's only for 2-handed weapons :D
Try on www.hbgames.org/forums. Search for Multi-Equip Script or something similar ;)
You can find a better one on there ;)
Sincerely,
Your conscience.