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.
Multiple Weapon Set Script

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 84
Multiple Weapon Sets
Version: 1.0
Author: TheMrMystery
Date: Feb, 09 2009

Planned Future Versions

  • Version 1.1: Armor sets

Demo

http://themrmystery.com/RMXP/WeaponSetDemo.rar

Script


Code: [Select]
#===============================================================================
#  Multi-Weapon Sets, by TheMrMystery
#  v. 1.0
#----------------------------------------------------------------------
#  Instructions:  Put below all other scripts and above Main.
#                 Look for the Configuration section, near the top.

#  Features:  Allows actors that know specific skills, to use the weapons of
#             another class.
#   
#             Creates the ability to make weapon proficiencies as such;
#             - allowing a Wizard to become a Spell Sword, by letting him
#               take the skill "Use Swords" and unlocking all weapons listed
#               in the "Use Sword" class.
#
#  Why was this script made?
#        For creation of a Dungeons & Dragons style weapon proficiency.
#
#  Compatability:
#    There are no known clashes with other scripts.
#
#  Notes:
#    This script aliases the stats in Game_Actor, and rewrites the refresh
#    method in Window_EquipItem.
#
#  Special Thanks:
#    Modern Algebra: rmrk.net (My "mentor" in writing my first script: this one)
#
#  Legal:
#    This script is not to be used for commercial use without express permission
#    by myself (TheMrMystery, copywrite@themrmystery.com)
#
#    This script may editted to suit your needs, however, please first suggest
#    any additions to me via, forum @ rmrk.net
#
#    If you use this script, please provide some credit to myself (TheMrMystery)
#    somewhere in your game.
#===============================================================================

#===============================================================================
#  Start Code
#===============================================================================

class Game_Actor

  alias mystery_multi_item_sets equippable?

  def equippable?(item)

    #---- Start Configuration ----
    # Enter the skill_id of the skill required to unlock the weapon list
    # Enter the class_id of the class that has the weapons wanted
    # Example: skill_id = 28 is Weapon Mastery: Whip
    #          class_id = 13 is Whip Master (class); which contains all whips
    #                                                in his class weapon list
skill_id_array = [28, 10]
class_id_array = [13, 11] 
    #---- End Configuration ------
   
     eqp_check = mystery_multi_item_sets (item)
     return true if eqp_check
     if item.is_a?(RPG::Weapon)
      real_class = @class_id
      # If weapon proficiency learned
      for i in 0...skill_id_array.size
        if skill_learn? (skill_id_array[i])
          @class_id = class_id_array[i]
          eqp_check |= mystery_multi_item_sets (item)
          @class_id = real_class
        end
      end
    end
    return eqp_check
  end
end


class Window_EquipItem
 
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @data = []
    # Add equippable weapons
    if @equip_type == 0
      for i in 1...$data_weapons.size
        if $game_party.weapon_number(i) > 0 && @actor.equippable? ($data_weapons[i])
          @data.push($data_weapons[i])
        end
      end
    end
    # Add equippable armor
    if @equip_type != 0
      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)
          if $data_armors[i].kind == @equip_type-1
            @data.push($data_armors[i])
          end
        end
      end
    end
    # Add blank page
    @data.push(nil)
    # Make a bit map and draw all items
    @item_max = @data.size
    self.contents = Bitmap.new(width - 32, row_max * 32)
    for i in 0...@item_max-1
      draw_item(i)
    end
  end
end
#===============================================================================
#  End Code
#===============================================================================

Credit


  • TheMrMystery

Thanks

  • Modern Algebra

Support


rmxp@themrmystery.com

Known Compatibility Issues
None known


Author's Notes

My first script

Restrictions
For non-commercial use.
Must credit TheMrMystery.

see comments in code for more restrictions.
« Last Edit: February 15, 2009, 10:57:25 PM by themrmystery »

****
Rep:
Level 87
Code Geass = Best show EVER XD
Project of the Month winner for May 2008
this is really good and simple! I like it :D

a very nice feature.

**
Rep: +0/-0Level 84
Quick, simple demo added, includes Blizzards RO Job Skills script for demonstration purposes