#===============================================================# ? [VX] ? Item Price Changer ? ?# * Change item/weapon/armor's price in-game *#--------------------------------------------------------------# ? by Woratana [woratana@hotmail.com]# ? Thaiware RPG Maker Community# ? Released on: 26/06/2008# ? Version: 1.0#--------------------------------------------------------------#==================================================================# ** HOW TO USE **#-----------------------------------------------------------------# ** To change item's price, call script:# Price_Edit.item(id, price)## * id: ID of item you want to change price# * price: New price## ** To change weapon's price, call script:# Price_Edit.weapon(id, price)## ** To change armor's price, call script:# Price_Edit.armor(id, price)## ** You can leave the price blank to reset item's price:# Price_Edit.item(id)# Price_Edit.weapon(id)# Price_Edit.armor(id)# * This will use default price you set in database.#===============================================================module Price_Edit def self.item(id, price = nil) price ||= $data_items[id].real_price $game_system.new_price['item'][id] = price end def self.weapon(id, price = nil) price ||= $data_weapons[id].real_price $game_system.new_price['weapon'][id] = price end def self.armor(id, price = nil) price ||= $data_armors[id].real_price $game_system.new_price['armor'][id] = price endendclass Game_System def new_price if @new_price.nil? @new_price = {} @new_price['item'] = [] @new_price['weapon'] = [] @new_price['armor'] = [] end return @new_price endendmodule RPG class BaseItem def real_price return @price end end class Item def price return $game_system.new_price['item'][@id].nil? ? @price : $game_system.new_price['item'][@id] end end class Weapon def price return $game_system.new_price['weapon'][@id].nil? ? @price : $game_system.new_price['weapon'][@id] end end class Armor def price return $game_system.new_price['armor'][@id].nil? ? @price : $game_system.new_price['armor'][@id] end endend
#==================================================================# ** HOW TO USE **#-----------------------------------------------------------------# ** To change item's price, call script:# Price_Edit.item(id, price)## * id: ID of item you want to change price# * price: New price## ** To change weapon's price, call script:# Price_Edit.weapon(id, price)## ** To change armor's price, call script:# Price_Edit.armor(id, price)## ** You can leave the price blank to reset item's price:# Price_Edit.item(id)# Price_Edit.weapon(id)# Price_Edit.armor(id)# * This will use default price you set in database.#===============================================================
- What is it says in error window?- When is it get error? (Right after run game, when you choose something, etc.)- Do you have any other scripts running in your game that may crash with this script?