Kingdom Ablaze
Sponsor
k, so im used xp, and i was wondering is it possilbe to make it so i can have more then 99 of each item, in fact it is quite critical that i can, so is there any chance anyone can help me?
class Game_Party
MAX_ITEMS = 99 # Just change this number
def gain_item(item_id, n)
if item_id > 0
@items[item_id] = [[item_number(item_id) + n, 0].max, MAX_ITEMS].min
end
end
def gain_weapon(weapon_id, n)
if weapon_id > 0
@weapons[weapon_id] = [[weapon_number(weapon_id) + n, 0].max, MAX_ITEMS].min
end
end
def gain_armor(armor_id, n)
if armor_id > 0
@armors[armor_id] = [[armor_number(armor_id) + n, 0].max, MAX_ITEMS].min
end
end
end
#===============================================================================
# ** Party Maximum Item Quantities
#-------------------------------------------------------------------------------
# This script allows you to set maximum quantites you can gain of individual
# (or all) items, weapons and armors.
#===============================================================================
#-------------------------------------------------------------------------------
# * SDK Log
#-------------------------------------------------------------------------------
if Object.const_defined?(:SDK)
SDK.log('Party.MaxItemQuantities', 'Kain Nobel', 2.0, '04.20.2008')
SDK.log_overwrite(:Game_Party, :gain_item)
SDK.log_overwrite(:Game_Party, :gain_weapon)
SDK.log_overwrite(:Game_Party, :gain_armor)
end
#===============================================================================
# ** Game_Party
#-------------------------------------------------------------------------------
# This class has been enhanced to customize item gain maximums.
#===============================================================================
class Game_Party
#-----------------------------------------------------------------------------
# * Cant Gain Items
#-----------------------------------------------------------------------------
Cant_Gain_Items = []
#-----------------------------------------------------------------------------
# * Cant Gain Weapons
#-----------------------------------------------------------------------------
Cant_Gain_Weapons = []
#-----------------------------------------------------------------------------
# * Cant Gain Armors
#-----------------------------------------------------------------------------
Cant_Gain_Armors = []
#-----------------------------------------------------------------------------
# * Maximum Items = {item_id => max_quantity}
#-----------------------------------------------------------------------------
Max_Items = {
1 => 100
}
Max_Items.default = 999
#-----------------------------------------------------------------------------
# * Maximum Weapons = {item_id => max_quantity}
#-----------------------------------------------------------------------------
Max_Weapons = {
1 => 9999999
}
Max_Weapons.default = 999
#-----------------------------------------------------------------------------
# * Maximum Armors = {item_id => max_quantity
#-----------------------------------------------------------------------------
Max_Armors = {}
Max_Armors.default = 999
#-----------------------------------------------------------------------------
# * Gain Item
#-----------------------------------------------------------------------------
def gain_item(id, n)
if id > 0
@items[id] = [[item_number(id) + n, 0].max, Max_Items[id]].min
end
@items[id] = 0 if Cant_Gain_Items.include?(id)
end
#-----------------------------------------------------------------------------
# * Gain Armor
#-----------------------------------------------------------------------------
def gain_armor(id, n)
if id > 0
@armors[id] = [[armor_number(id) + n, 0].max, Max_Armors[id]].min
end
@armors[id] = 0 if Cant_Gain_Armors.include?(id)
end
#-----------------------------------------------------------------------------
# * Gain Weapon
#-----------------------------------------------------------------------------
def gain_weapon(id, n)
if id > 0
@weapons[id] = [[weapon_number(id) + n, 0].max, Max_Weapons[id]].min
end
@weapons[id] = 0 if Cant_Gain_Weapons.include?(id)
end
end