мЭkяΘÐ ツMar Ago 21, 2012 1:18 am
Usuario Nv10
basicamente lo que hace este script es que necesites un cierto nivel para usar o equipar una arma , a mi se me hace bastante util xd
- Código:
class Window_EquipItem < Window_Selectable
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
#ADDED
weapon_req = [
{'WEAPON'=>1,'LEVEL'=>1,'STR'=>60,'DEX'=>0,'INT'=>0,'AGL'=>0},
{'WEAPON'=>2,'LEVEL'=>6,'STR'=>90,'DEX'=>0,'INT'=>0,'AGL'=>0},
{'WEAPON'=>3,'LEVEL'=>11,'STR'=>120,'DEX'=>0,'INT'=>0,'AGL'=>0},
{'WEAPON'=>4,'LEVEL'=>16,'STR'=>150,'DEX'=>0,'INT'=>0,'AGL'=>0}
]
armour_req = [
{'ARMOUR'=>1,'LEVEL'=>1,'STR'=>0,'DEX'=>0,'INT'=>0,'AGL'=>0},
{'ARMOUR'=>2,'LEVEL'=>6,'STR'=>0,'DEX'=>0,'INT'=>0,'AGL'=>0},
{'ARMOUR'=>3,'LEVEL'=>11,'STR'=>0,'DEX'=>0,'INT'=>0,'AGL'=>0},
{'ARMOUR'=>4,'LEVEL'=>16,'STR'=>0,'DEX'=>0,'INT'=>0,'AGL'=>0}
]
#END OF ADDED
# Add equippable weapons
if @equip_type == 0
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)
#MODIFICATION
level_needed = 1
str_needed = 0
dex_needed = 0
int_needed = 0
agi_needed = 0
weapon_req.each do |weap_req|
if weap_req['WEAPON'] == i
level_needed = weap_req['LEVEL']
str_needed = weap_req['STR']
dex_needed = weap_req['DEX']
int_needed = weap_req['INT']
agi_needed = weap_req['AGL']
end
end
if (@actor.level >= level_needed) and ((@actor.str >= str_needed and @actor.dex >= dex_needed) and (@actor.int >= int_needed and @actor.agi >= agi_needed))
@data.push($data_weapons[i])
end
#END OF MODIFICATION
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
#MODIFICATION
level_needed = 1
str_needed = 0
dex_needed = 0
int_needed = 0
agi_needed = 0
armour_req.each do |arm_req|
if arm_req['ARMOUR'] == i
level_needed = arm_req['LEVEL']
str_needed = arm_req['STR']
dex_needed = arm_req['DEX']
int_needed = arm_req['INT']
agi_needed = arm_req['AGL']
end
end
if (@actor.level >= level_needed) and ((@actor.str >= str_needed and @actor.dex >= dex_needed) and (@actor.int >= int_needed and @actor.agi >= agi_needed))
@data.push($data_armors[i])
end
#END OF MODIFICATION
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