赞 | 1 |
VIP | 16 |
好人卡 | 23 |
积分 | 0 |
经验 | 49509 |
最后登录 | 2016-1-9 |
在线时间 | 2459 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 48
- 在线时间
- 2459 小时
- 注册时间
- 2011-12-18
- 帖子
- 1484
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
原帖地址 http://rmrk.net/index.php/topic,42340.0.html
=begin Equipment Sets Bonus Version 1.0 By Welfare-Daddy Pacman (based on a script by Lettuce) Description: The maker can create similar items of equipment in the database, and can choose to give the player a bonus for collecting them. This script allows you to decide which of these items give the player a stats boost, which stat it boosts and by how much. A special thing about these sets is that the sets add up, meaning that if you equip 2 peices from set 1 and 3 pieces from set 2, you get both of the boosts for the sets. Instructions: Configuration with instructions begins at line 25, and ends at line 104. Support: Just find me on RMRK.net, I'm on pretty much every night. =end #================================================================== #这里设置套装的基本套件 #================================================================== Sets = { 1 => [12,44,152,153,154,], #第一个是武器ID,后四个是防具ID 2 => [], 3 => [] } #------------------------------------------------------------------------------- # EDITING SECTION B - EQUIPMENT SETS BONUS LIST #------------------------------------------------------------------------------- Set_Bonus = { 1 => [ [1,5], #装备上面设置好的套装一种的场合,攻击上升5% [2,20], #装备上面设置好的套装两种的场合,攻击上升5%,防御上升20% [5,100], #以上的基础上,MAXHP增加100% [6,20],#…………第一位数字对应:1:攻击,2:防御,3:精神力,4:敏捷 [7,30] #5:最大HP,6:最大MP,7:暴击率,8:闪避。 ], 2 => [ [], [3,1000], [2,2000], [5,1000], [6,2000] ], 3 => [ [1,5], [2,20], [5,100], [7,2000], [8,50] ] , 4 => [ [], [], [], [], [] ] } #------------------------------------------------------------------------------- # EDITING SECTION C - EQUIPMENT SET NAMES #------------------------------------------------------------------------------- Set_Names = { 1 => "冼灵套件",#套装名称,多了由自己添加 2 => "Basic set", 3 => "Ultimate set" } #------------------------------------------------------------------------------- # END EDITING SECTION - DO NOT TOUCH UNLESS YOU ARE A SCRIPTER # AND EVEN THEN IT'S NOT THAT COOL. #------------------------------------------------------------------------------- class Game_Actor < Game_Battler attr_accessor :bonus_set attr_accessor :bonus_set_pieces alias pacman_eq_bonus_setup setup def setup(actor_id) pacman_eq_bonus_setup(actor_id) @bonus_set = [] for i in 1..Sets.size weapons = [nil,Sets[i][0]] armors = [Sets[i][1],Sets[i][2],Sets[i][3],Sets[i][4],Sets[i][5],Sets[i][6],Sets[i][7],Sets[i][8],Sets[i][9]] if Sets[i].include?(@weapon_id) @bonus_set.push(i) if !@bonus_set.include?(i) end if Sets[i].include?(@armor4_id) @bonus_set.push(i) if !@bonus_set.include?(i) end if Sets[i].include?(@armor3_id) @bonus_set.push(i) if !@bonus_set.include?(i) end if Sets[i].include?(@armor2_id) @bonus_set.push(i) if !@bonus_set.include?(i) end if Sets[i].include?(@armor1_id) @bonus_set.push(i) if !@bonus_set.include?(i) end end @bonus_set_pieces = [] for i in [email]0...@bonus_set.size[/email] @bonus_set_pieces.push(0) end if !@bonus_set.empty? for i in [email]0...@bonus_set.size[/email] weapons = [nil,Sets[@bonus_set[i]][0]] armors = [Sets[@bonus_set[i]][1],Sets[@bonus_set[i]][2], Sets[@bonus_set[i]][3],Sets[@bonus_set[i]][4]], @bonus_set_pieces[i] += weapons.include?(@weapon_id) ? 1 : 0 @bonus_set_pieces[i] += armors.include?(@armor1_id) ? 1 : 0 @bonus_set_pieces[i] += armors.include?(@armor2_id) ? 1 : 0 @bonus_set_pieces[i] += armors.include?(@armor3_id) ? 1 : 0 @bonus_set_pieces[i] += armors.include?(@armor4_id) ? 1 : 0 end end end alias pacman_eq_bonus_atk atk alias pacman_eq_bonus_def def alias pacman_eq_bonus_spi spi alias pacman_eq_bonus_agi agi alias pacman_eq_bonus_maxhp maxhp alias pacman_eq_bonus_maxmp maxmp alias pacman_eq_bonus_cri cri alias pacman_eq_bonus_eva eva def atk default_val = pacman_eq_bonus_atk final_val = default_val n = 100 if !@bonus_set.empty? for j in [email]0...@bonus_set.size[/email] for i in 0...@bonus_set_pieces[j] if Set_Bonus[@bonus_set[j]][i] != nil if Set_Bonus[@bonus_set[j]][i][0] == 1 n +=Set_Bonus[@bonus_set[j]][i][1] end end end end final_val *= n final_val /= 100 else final_val = default_val end return final_val end def def default_val = pacman_eq_bonus_def final_val = default_val n = 100 if !@bonus_set.empty? for j in [email]0...@bonus_set.size[/email] for i in 0...@bonus_set_pieces[j] if Set_Bonus[@bonus_set[j]][i] != nil if Set_Bonus[@bonus_set[j]][i][0] == 2 n +=Set_Bonus[@bonus_set[j]][i][1] end end end end final_val *= n final_val /= 100 else final_val = default_val end return final_val end def spi default_val = pacman_eq_bonus_spi final_val = default_val n = 100 if !@bonus_set.empty? for j in [email]0...@bonus_set.size[/email] for i in 0...@bonus_set_pieces[j] if Set_Bonus[@bonus_set[j]][i] != nil if Set_Bonus[@bonus_set[j]][i][0] == 3 n +=Set_Bonus[@bonus_set[j]][i][1] end end end end final_val *= n final_val /= 100 else final_val = default_val end return final_val end def agi default_val = pacman_eq_bonus_agi final_val = default_val n = 100 if !@bonus_set.empty? for j in [email]0...@bonus_set.size[/email] for i in 0...@bonus_set_pieces[j] if Set_Bonus[@bonus_set[j]][i] != nil if Set_Bonus[@bonus_set[j]][i][0] == 4 n +=Set_Bonus[@bonus_set[j]][i][1] end end end end final_val *= n final_val /= 100 else final_val = default_val end return final_val end def maxhp default_val = pacman_eq_bonus_maxhp final_val = default_val n = 100 if @bonus_set if !@bonus_set.empty? for j in [email]0...@bonus_set.size[/email] for i in 0...@bonus_set_pieces[j] if Set_Bonus[@bonus_set[j]][i] != nil if Set_Bonus[@bonus_set[j]][i][0] == 5 n += Set_Bonus[@bonus_set[j]][i][1] end end end end final_val *= n final_val /= 100 else final_val = default_val end end return final_val end def maxmp default_val = pacman_eq_bonus_maxmp final_val = default_val n = 100 if @bonus_set if !@bonus_set.empty? for j in [email]0...@bonus_set.size[/email] for i in 0...@bonus_set_pieces[j] if Set_Bonus[@bonus_set[j]][i] != nil if Set_Bonus[@bonus_set[j]][i][0] == 6 n +=Set_Bonus[@bonus_set[j]][i][1] end end end end final_val *= n final_val /= 100 else final_val = default_val end end return final_val end def cri default_val = pacman_eq_bonus_cri final_val = default_val n = 100 if !@bonus_set.empty? for j in [email]0...@bonus_set.size[/email] for i in 0...@bonus_set_pieces[j] if Set_Bonus[@bonus_set[j]][i] != nil if Set_Bonus[@bonus_set[j]][i][0] == 7 n +=Set_Bonus[@bonus_set[j]][i][1] end end end end final_val *= n final_val /= 100 else final_val = default_val end return final_val end def eva default_val = pacman_eq_bonus_eva final_val = default_val n = 100 if !@bonus_set.empty? for j in [email]0...@bonus_set.size[/email] for i in 0...@bonus_set_pieces[j] if Set_Bonus[@bonus_set[j]][i] != nil if Set_Bonus[@bonus_set[j]][i][0] == 8 n +=Set_Bonus[@bonus_set[j]][i][1] end end end end final_val *= n final_val /= 100 else final_val = default_val end return final_val end def change_equip(equip_type, item, test = false) last_item = equips[equip_type] unless test return if $game_party.item_number(item) == 0 if item != nil $game_party.gain_item(last_item, 1) $game_party.lose_item(item, 1) end item_id = item == nil ? 0 : item.id case equip_type when 0 # Weapon @weapon_id = item_id unless two_hands_legal? # If two hands is not allowed change_equip(1, nil, test) # Unequip from other hand end when 1 # Shield @armor1_id = item_id unless two_hands_legal? # If two hands is not allowed change_equip(0, nil, test) # Unequip from other hand end when 2 # Head @armor2_id = item_id when 3 # Body @armor3_id = item_id when 4 # Accessory @armor4_id = item_id when 5 # Accessory @armor5_id = item_id when 6 # Accessory @armor6_id = item_id when 7 # Accessory @armor7_id = item_id when 8 # Accessory @armor8_id = item_id when 9 # Accessory @armor9_id = item_id end @bonus_set = [] for i in 1..Sets.size weapons = [nil,Sets[i][0]] armors = [Sets[i][1],Sets[i][2],Sets[i][3],Sets[i][4],Sets[i][5],Sets[i][6],Sets[i][7],Sets[i][8],Sets[i][9]] if Sets[i].include?(@weapon_id) @bonus_set.push(i) if !@bonus_set.include?(i) end if Sets[i].include?(@armor4_id) @bonus_set.push(i) if !@bonus_set.include?(i) end if Sets[i].include?(@armor3_id) @bonus_set.push(i) if !@bonus_set.include?(i) end if Sets[i].include?(@armor2_id) @bonus_set.push(i) if !@bonus_set.include?(i) end if Sets[i].include?(@armor1_id) @bonus_set.push(i) if !@bonus_set.include?(i) end end @bonus_set_pieces = [] for i in [email]0...@bonus_set.size[/email] @bonus_set_pieces.push(0) end if !@bonus_set.empty? for i in [email]0...@bonus_set.size[/email] weapons = [nil,Sets[@bonus_set[i]][0]] armors = [Sets[@bonus_set[i]][1],Sets[@bonus_set[i]][2], Sets[@bonus_set[i]][3],Sets[@bonus_set[i]][4]] @bonus_set_pieces[i] += weapons.include?(@weapon_id) ? 1 : 0 @bonus_set_pieces[i] += armors.include?(@armor1_id) ? 1 : 0 @bonus_set_pieces[i] += armors.include?(@armor2_id) ? 1 : 0 @bonus_set_pieces[i] += armors.include?(@armor3_id) ? 1 : 0 @bonus_set_pieces[i] += armors.include?(@armor4_id) ? 1 : 0 end end end end class Window_Base < Window def draw_item_name(item, x, y, enabled = true) if item != nil is_set = false set_no = 0 if item.is_a?(RPG::Weapon) for i in 1..Sets.size weapons = [] weapons.push(Sets[i][0]) if weapons.include?(item.id) is_set = true set_no = i end end end if item.is_a?(RPG::Armor) for i in 1..Sets.size armors = [] armors.push(Sets[i][1]) armors.push(Sets[i][2]) armors.push(Sets[i][3]) armors.push(Sets[i][4]) if armors.include?(item.id) is_set = true set_no = i end end end draw_icon(item.icon_index, x, y, enabled) self.contents.font.color = normal_color self.contents.font.color.alpha = enabled ? 255 : 128 set_word = "" if is_set then set_word = "[" + Set_Names[set_no] + "]" end self.contents.font.size = Font.default_size self.contents.draw_text(x + 24, y, 172, WLH, item.name) self.contents.font.color = crisis_color self.contents.font.size = 12 self.contents.draw_text(x + 28, y+12, 172, WLH, set_word) self.contents.font.color = normal_color self.contents.font.size = Font.default_size end end end
=begin
Equipment Sets Bonus
Version 1.0
By Welfare-Daddy Pacman (based on a script by Lettuce)
Description: The maker can create similar items of equipment in the database,
and can choose to give the player a bonus for collecting them. This script
allows you to decide which of these items give the player a stats boost, which
stat it boosts and by how much.
A special thing about these sets is that the sets add up, meaning that if you
equip 2 peices from set 1 and 3 pieces from set 2, you get both of the boosts
for the sets.
Instructions: Configuration with instructions begins at line 25, and ends at
line 104.
Support: Just find me on RMRK.net, I'm on pretty much every night.
=end
#==================================================================
#这里设置套装的基本套件
#==================================================================
Sets = {
1 => [12,44,152,153,154,], #第一个是武器ID,后四个是防具ID
2 => [],
3 => []
}
#-------------------------------------------------------------------------------
# EDITING SECTION B - EQUIPMENT SETS BONUS LIST
#-------------------------------------------------------------------------------
Set_Bonus = {
1 => [ [1,5], #装备上面设置好的套装一种的场合,攻击上升5%
[2,20], #装备上面设置好的套装两种的场合,攻击上升5%,防御上升20%
[5,100], #以上的基础上,MAXHP增加100%
[6,20],#…………第一位数字对应:1:攻击,2:防御,3:精神力,4:敏捷
[7,30] #5:最大HP,6:最大MP,7:暴击率,8:闪避。
],
2 => [ [],
[3,1000],
[2,2000],
[5,1000],
[6,2000]
],
3 => [ [1,5],
[2,20],
[5,100],
[7,2000],
[8,50]
] ,
4 => [ [],
[],
[],
[],
[]
]
}
#-------------------------------------------------------------------------------
# EDITING SECTION C - EQUIPMENT SET NAMES
#-------------------------------------------------------------------------------
Set_Names = {
1 => "冼灵套件",#套装名称,多了由自己添加
2 => "Basic set",
3 => "Ultimate set"
}
#-------------------------------------------------------------------------------
# END EDITING SECTION - DO NOT TOUCH UNLESS YOU ARE A SCRIPTER
# AND EVEN THEN IT'S NOT THAT COOL.
#-------------------------------------------------------------------------------
class Game_Actor < Game_Battler
attr_accessor :bonus_set
attr_accessor :bonus_set_pieces
alias pacman_eq_bonus_setup setup
def setup(actor_id)
pacman_eq_bonus_setup(actor_id)
@bonus_set = []
for i in 1..Sets.size
weapons = [nil,Sets[i][0]]
armors = [Sets[i][1],Sets[i][2],Sets[i][3],Sets[i][4],Sets[i][5],Sets[i][6],Sets[i][7],Sets[i][8],Sets[i][9]]
if Sets[i].include?(@weapon_id)
@bonus_set.push(i) if !@bonus_set.include?(i)
end
if Sets[i].include?(@armor4_id)
@bonus_set.push(i) if !@bonus_set.include?(i)
end
if Sets[i].include?(@armor3_id)
@bonus_set.push(i) if !@bonus_set.include?(i)
end
if Sets[i].include?(@armor2_id)
@bonus_set.push(i) if !@bonus_set.include?(i)
end
if Sets[i].include?(@armor1_id)
@bonus_set.push(i) if !@bonus_set.include?(i)
end
end
@bonus_set_pieces = []
for i in [email]0...@bonus_set.size[/email]
@bonus_set_pieces.push(0)
end
if !@bonus_set.empty?
for i in [email]0...@bonus_set.size[/email]
weapons = [nil,Sets[@bonus_set[i]][0]]
armors = [Sets[@bonus_set[i]][1],Sets[@bonus_set[i]][2],
Sets[@bonus_set[i]][3],Sets[@bonus_set[i]][4]],
@bonus_set_pieces[i] += weapons.include?(@weapon_id) ? 1 : 0
@bonus_set_pieces[i] += armors.include?(@armor1_id) ? 1 : 0
@bonus_set_pieces[i] += armors.include?(@armor2_id) ? 1 : 0
@bonus_set_pieces[i] += armors.include?(@armor3_id) ? 1 : 0
@bonus_set_pieces[i] += armors.include?(@armor4_id) ? 1 : 0
end
end
end
alias pacman_eq_bonus_atk atk
alias pacman_eq_bonus_def def
alias pacman_eq_bonus_spi spi
alias pacman_eq_bonus_agi agi
alias pacman_eq_bonus_maxhp maxhp
alias pacman_eq_bonus_maxmp maxmp
alias pacman_eq_bonus_cri cri
alias pacman_eq_bonus_eva eva
def atk
default_val = pacman_eq_bonus_atk
final_val = default_val
n = 100
if !@bonus_set.empty?
for j in [email]0...@bonus_set.size[/email]
for i in 0...@bonus_set_pieces[j]
if Set_Bonus[@bonus_set[j]][i] != nil
if Set_Bonus[@bonus_set[j]][i][0] == 1
n +=Set_Bonus[@bonus_set[j]][i][1]
end
end
end
end
final_val *= n
final_val /= 100
else
final_val = default_val
end
return final_val
end
def def
default_val = pacman_eq_bonus_def
final_val = default_val
n = 100
if !@bonus_set.empty?
for j in [email]0...@bonus_set.size[/email]
for i in 0...@bonus_set_pieces[j]
if Set_Bonus[@bonus_set[j]][i] != nil
if Set_Bonus[@bonus_set[j]][i][0] == 2
n +=Set_Bonus[@bonus_set[j]][i][1]
end
end
end
end
final_val *= n
final_val /= 100
else
final_val = default_val
end
return final_val
end
def spi
default_val = pacman_eq_bonus_spi
final_val = default_val
n = 100
if !@bonus_set.empty?
for j in [email]0...@bonus_set.size[/email]
for i in 0...@bonus_set_pieces[j]
if Set_Bonus[@bonus_set[j]][i] != nil
if Set_Bonus[@bonus_set[j]][i][0] == 3
n +=Set_Bonus[@bonus_set[j]][i][1]
end
end
end
end
final_val *= n
final_val /= 100
else
final_val = default_val
end
return final_val
end
def agi
default_val = pacman_eq_bonus_agi
final_val = default_val
n = 100
if !@bonus_set.empty?
for j in [email]0...@bonus_set.size[/email]
for i in 0...@bonus_set_pieces[j]
if Set_Bonus[@bonus_set[j]][i] != nil
if Set_Bonus[@bonus_set[j]][i][0] == 4
n +=Set_Bonus[@bonus_set[j]][i][1]
end
end
end
end
final_val *= n
final_val /= 100
else
final_val = default_val
end
return final_val
end
def maxhp
default_val = pacman_eq_bonus_maxhp
final_val = default_val
n = 100
if @bonus_set
if !@bonus_set.empty?
for j in [email]0...@bonus_set.size[/email]
for i in 0...@bonus_set_pieces[j]
if Set_Bonus[@bonus_set[j]][i] != nil
if Set_Bonus[@bonus_set[j]][i][0] == 5
n += Set_Bonus[@bonus_set[j]][i][1]
end
end
end
end
final_val *= n
final_val /= 100
else
final_val = default_val
end
end
return final_val
end
def maxmp
default_val = pacman_eq_bonus_maxmp
final_val = default_val
n = 100
if @bonus_set
if !@bonus_set.empty?
for j in [email]0...@bonus_set.size[/email]
for i in 0...@bonus_set_pieces[j]
if Set_Bonus[@bonus_set[j]][i] != nil
if Set_Bonus[@bonus_set[j]][i][0] == 6
n +=Set_Bonus[@bonus_set[j]][i][1]
end
end
end
end
final_val *= n
final_val /= 100
else
final_val = default_val
end
end
return final_val
end
def cri
default_val = pacman_eq_bonus_cri
final_val = default_val
n = 100
if !@bonus_set.empty?
for j in [email]0...@bonus_set.size[/email]
for i in 0...@bonus_set_pieces[j]
if Set_Bonus[@bonus_set[j]][i] != nil
if Set_Bonus[@bonus_set[j]][i][0] == 7
n +=Set_Bonus[@bonus_set[j]][i][1]
end
end
end
end
final_val *= n
final_val /= 100
else
final_val = default_val
end
return final_val
end
def eva
default_val = pacman_eq_bonus_eva
final_val = default_val
n = 100
if !@bonus_set.empty?
for j in [email]0...@bonus_set.size[/email]
for i in 0...@bonus_set_pieces[j]
if Set_Bonus[@bonus_set[j]][i] != nil
if Set_Bonus[@bonus_set[j]][i][0] == 8
n +=Set_Bonus[@bonus_set[j]][i][1]
end
end
end
end
final_val *= n
final_val /= 100
else
final_val = default_val
end
return final_val
end
def change_equip(equip_type, item, test = false)
last_item = equips[equip_type]
unless test
return if $game_party.item_number(item) == 0 if item != nil
$game_party.gain_item(last_item, 1)
$game_party.lose_item(item, 1)
end
item_id = item == nil ? 0 : item.id
case equip_type
when 0 # Weapon
@weapon_id = item_id
unless two_hands_legal? # If two hands is not allowed
change_equip(1, nil, test) # Unequip from other hand
end
when 1 # Shield
@armor1_id = item_id
unless two_hands_legal? # If two hands is not allowed
change_equip(0, nil, test) # Unequip from other hand
end
when 2 # Head
@armor2_id = item_id
when 3 # Body
@armor3_id = item_id
when 4 # Accessory
@armor4_id = item_id
when 5 # Accessory
@armor5_id = item_id
when 6 # Accessory
@armor6_id = item_id
when 7 # Accessory
@armor7_id = item_id
when 8 # Accessory
@armor8_id = item_id
when 9 # Accessory
@armor9_id = item_id
end
@bonus_set = []
for i in 1..Sets.size
weapons = [nil,Sets[i][0]]
armors = [Sets[i][1],Sets[i][2],Sets[i][3],Sets[i][4],Sets[i][5],Sets[i][6],Sets[i][7],Sets[i][8],Sets[i][9]]
if Sets[i].include?(@weapon_id)
@bonus_set.push(i) if !@bonus_set.include?(i)
end
if Sets[i].include?(@armor4_id)
@bonus_set.push(i) if !@bonus_set.include?(i)
end
if Sets[i].include?(@armor3_id)
@bonus_set.push(i) if !@bonus_set.include?(i)
end
if Sets[i].include?(@armor2_id)
@bonus_set.push(i) if !@bonus_set.include?(i)
end
if Sets[i].include?(@armor1_id)
@bonus_set.push(i) if !@bonus_set.include?(i)
end
end
@bonus_set_pieces = []
for i in [email]0...@bonus_set.size[/email]
@bonus_set_pieces.push(0)
end
if !@bonus_set.empty?
for i in [email]0...@bonus_set.size[/email]
weapons = [nil,Sets[@bonus_set[i]][0]]
armors = [Sets[@bonus_set[i]][1],Sets[@bonus_set[i]][2],
Sets[@bonus_set[i]][3],Sets[@bonus_set[i]][4]]
@bonus_set_pieces[i] += weapons.include?(@weapon_id) ? 1 : 0
@bonus_set_pieces[i] += armors.include?(@armor1_id) ? 1 : 0
@bonus_set_pieces[i] += armors.include?(@armor2_id) ? 1 : 0
@bonus_set_pieces[i] += armors.include?(@armor3_id) ? 1 : 0
@bonus_set_pieces[i] += armors.include?(@armor4_id) ? 1 : 0
end
end
end
end
class Window_Base < Window
def draw_item_name(item, x, y, enabled = true)
if item != nil
is_set = false
set_no = 0
if item.is_a?(RPG::Weapon)
for i in 1..Sets.size
weapons = []
weapons.push(Sets[i][0])
if weapons.include?(item.id)
is_set = true
set_no = i
end
end
end
if item.is_a?(RPG::Armor)
for i in 1..Sets.size
armors = []
armors.push(Sets[i][1])
armors.push(Sets[i][2])
armors.push(Sets[i][3])
armors.push(Sets[i][4])
if armors.include?(item.id)
is_set = true
set_no = i
end
end
end
draw_icon(item.icon_index, x, y, enabled)
self.contents.font.color = normal_color
self.contents.font.color.alpha = enabled ? 255 : 128
set_word = ""
if is_set then set_word = "[" + Set_Names[set_no] + "]" end
self.contents.font.size = Font.default_size
self.contents.draw_text(x + 24, y, 172, WLH, item.name)
self.contents.font.color = crisis_color
self.contents.font.size = 12
self.contents.draw_text(x + 28, y+12, 172, WLH, set_word)
self.contents.font.color = normal_color
self.contents.font.size = Font.default_size
end
end
end
@bonus_set = [] for i in 1..Sets.size weapons = [nil,Sets[i][0]] armors = [Sets[i][1],Sets[i][2],Sets[i][3],Sets[i][4], Sets[i][5],Sets[i][6],Sets[i][7],Sets[i][8],Sets[i][9]], if Sets[i].include?(@weapon_id) @bonus_set.push(i) if !@bonus_set.include?(i) end if Sets[i].include?(@armor4_id) @bonus_set.push(i) if !@bonus_set.include?(i) end if Sets[i].include?(@armor3_id) @bonus_set.push(i) if !@bonus_set.include?(i) end if Sets[i].include?(@armor2_id) @bonus_set.push(i) if !@bonus_set.include?(i) end if Sets[i].include?(@armor1_id) @bonus_set.push(i) if !@bonus_set.include?(i) end end @bonus_set_pieces = [] for i in [email]0...@bonus_set.size[/email] @bonus_set_pieces.push(0) end if !@bonus_set.empty? for i in [email]0...@bonus_set.size[/email] weapons = [nil,Sets[@bonus_set[i]][0]] armors = [Sets[@bonus_set[i]][1],Sets[@bonus_set[i]][2], Sets[@bonus_set[i]][3],Sets[@bonus_set[i]][4]] @bonus_set_pieces[i] += weapons.include?(@weapon_id) ? 1 : 0 @bonus_set_pieces[i] += armors.include?(@armor1_id) ? 1 : 0 @bonus_set_pieces[i] += armors.include?(@armor2_id) ? 1 : 0 @bonus_set_pieces[i] += armors.include?(@armor3_id) ? 1 : 0 @bonus_set_pieces[i] += armors.include?(@armor4_id) ? 1 : 0 end end
@bonus_set = []
for i in 1..Sets.size
weapons = [nil,Sets[i][0]]
armors = [Sets[i][1],Sets[i][2],Sets[i][3],Sets[i][4],
Sets[i][5],Sets[i][6],Sets[i][7],Sets[i][8],Sets[i][9]],
if Sets[i].include?(@weapon_id)
@bonus_set.push(i) if !@bonus_set.include?(i)
end
if Sets[i].include?(@armor4_id)
@bonus_set.push(i) if !@bonus_set.include?(i)
end
if Sets[i].include?(@armor3_id)
@bonus_set.push(i) if !@bonus_set.include?(i)
end
if Sets[i].include?(@armor2_id)
@bonus_set.push(i) if !@bonus_set.include?(i)
end
if Sets[i].include?(@armor1_id)
@bonus_set.push(i) if !@bonus_set.include?(i)
end
end
@bonus_set_pieces = []
for i in [email]0...@bonus_set.size[/email]
@bonus_set_pieces.push(0)
end
if !@bonus_set.empty?
for i in [email]0...@bonus_set.size[/email]
weapons = [nil,Sets[@bonus_set[i]][0]]
armors = [Sets[@bonus_set[i]][1],Sets[@bonus_set[i]][2],
Sets[@bonus_set[i]][3],Sets[@bonus_set[i]][4]]
@bonus_set_pieces[i] += weapons.include?(@weapon_id) ? 1 : 0
@bonus_set_pieces[i] += armors.include?(@armor1_id) ? 1 : 0
@bonus_set_pieces[i] += armors.include?(@armor2_id) ? 1 : 0
@bonus_set_pieces[i] += armors.include?(@armor3_id) ? 1 : 0
@bonus_set_pieces[i] += armors.include?(@armor4_id) ? 1 : 0
end
end
注意:此脚本貌似不能跟装备扩展共用,反正就不能超过5件装备。各位自己看着办。如果有高手能整合一下就好了 |
评分
-
查看全部评分
|