The RPG Maker Resource Kit

RMRK RPG Maker Creation => VX => VX Scripts Database => Topic started by: Yanfly on May 31, 2009, 09:50:03 PM

Title: [YERD] Common Event Shop
Post by: Yanfly on May 31, 2009, 09:50:03 PM
Common Event Shop
Last Update: 2009.05.31
By: Yanfly Engine ReDux
 
Introduction
I thought I've uploaded this script to Pockethouse, but apparently, I haven't so here it is!

Sometimes the lack of things you can do with money can become a little boring since it's only ever used for buying items and equipment and that's it. Well, now your players can expend their funds on common events (that you can decide what will happen). They can purchase common events that may unlock extras, recruit characters, teleport to unique places, anything your eventing ability allows you to do.

Screenshots
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fwww.pockethouse.com%2Frpgvx%2Fcommoneventshop.jpg&hash=934de2a03775f757b2c1db0cb6660859b06de3fb)
 
Script
Click here to view the main script. (http://www.pockethouse.com/rpgvx/scripts/commoneventshop.txt)

Instructions
First, bind the CE_SHOP_VARIABLE to a variable you wish to dedicate towards the common event shops. Whenever you send the player to a shop and the common event variable's value is above 0, the player will be taken to the common event shop instead. Remember to set the variable back to 0 when you want to issue a normal shop.

———

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fwww.pockethouse.com%2Frpgvx%2Fcommoneventshop1.jpg&hash=c7e57a5b0523d7eb5119713cce07e0cbe96c0f03)

Adjust your shop's contents with the CE_SHOP_LIST. Make sure everything is filled out properly or else you'll experience a ton of errors. Here, you set the currency used, the buy text, the leave text, the welcome text, and which common events can be sold in that shop. If the currency ID is 0, gold will be used for the shop's currency.

———

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fwww.pockethouse.com%2Frpgvx%2Fcommoneventshop2.jpg&hash=25874c944602a72d76fe8ea5f2e8c5b583f01002)

Common Events can't all be free. However, you can't adjust the common event prices from the database editor so you'll have to do it here in the COMMON_EVENT_ITEM_HASH. Give your common events a cost, an icon, the number of times it can be bought (period), and whether or not you would like to make the player leave the shop upon purchasing the event. The cost will always be the same regardless of the currency you've chosen for the shop.

———

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fwww.pockethouse.com%2Frpgvx%2Fcommoneventshop3.jpg&hash=07f62fdc8b0920e4c9adf11d6a8bda09b84e7efc)

And finally, if you do decide to use different currencies, you can adjust the names used to sell them here in the CURRENCY_VARIABLE_MATCH hash. If a currency ID is left out of the list, then the UNDEFINED_CURRENCY will be used in its place.

———
IF YOU ARE HAVING PROBLEMS WITH THESE SCRIPTS, REVIEW THE TROUBLESHOOTING PAGE FIRST! (http://pockethouse.wordpress.com/vx/toubleshooting/)

Compatibility
- I'm pretty sure there won't be any incompatibility problems.
Please report any compatibility issues and I'll try my best to fix them.

Terms and Conditions
Just give credit where due.
 
Credits and Thanks
- This was more or less an old idea. (???)
 
Originally Found Here: Here (http://pockethouse.wordpress.com/vx/common-event-shop/)
Title: Re: [YERD] Common Event Shop
Post by: Sophist on May 31, 2009, 10:10:20 PM
Very interesting.
Title: Re: [YERD] Common Event Shop
Post by: modern algebra on May 31, 2009, 10:17:32 PM
That is a cool idea. Nice one, Yanfly!
Title: Re: [YERD] Common Event Shop
Post by: Grafikal on May 31, 2009, 10:26:00 PM
Whaaaaaat?! This is awesome. I'm so using this. :)
Title: Re: [YERD] Common Event Shop
Post by: Sebastian Cool ^-^ on November 10, 2009, 11:10:50 AM
You are advanced girl!! I like you!!  :blizj:

Look at this!!
I'm an idiot!!!!