Save-Point
Shop : Change Prices - Printable Version

+- Save-Point (https://www.save-point.org)
+-- Forum: Material Development (https://www.save-point.org/forum-8.html)
+--- Forum: Scripts Database (https://www.save-point.org/forum-39.html)
+--- Thread: Shop : Change Prices (/thread-8503.html)



Shop : Change Prices - Kain Nobel - 04-04-2022

Shop : Change Prices
Version: 3.5
Written by Kain Nobel

Introduction

This is a system which allows you to change shop prices.

Features
  • Change prices of items in your shops.
  • System automatically resets prices once the shop closes.

Script

Script

Instructions

Place below Main and anything that modifies Shops in any major way.

Compatibility

This script was written for RMXP.

This script overwrites the following...
  • RPG::Item#price=
  • RPG::Armor#price=
  • RPG::Weapon#price=

I do suppose these could be aliased. I forget if I had a good reason for an overwrite, this was written eons ago...

(NOTE: This script does call SDK.log_ovewrite if the SDK is in your project. It does not matter if you're using SDK or not, those lines shouldn't interfere with anything.)

Author's Notes

It may sound dangerous, but before you call your shop, you can simply do...

Code:
$data_items[id].price = 100
$data_armors[id].price = 4999
$data_weapons[id].price = 9999

Don't worry; once the shop closes, these prices are reverted back to their normal database values.

You can also do...

Code:
$game_system.item_price[id] = 100
$game_system.armor_price[id] = 4999
$game_system.weapon_price[id] = 9999

...which does the same exact thing. It's whatever you prefer.

Terms and Conditions

Free to use in commercial and non-commercial games. Credits optional, but I do like credits!  Grinning