Shop System

EIS Shop System

Introduction:

This plugin handles managing shops in the game giving you more shop features.

Version: 1.00

Features:

  • Randomized Shops
  • Adjusting Shop sell prices
  • Shops with item stock
  • restocking item shops
  • Adjusting randomized item prices

Instructions:

  1. Install the script with the same name: EISShopSystem.js
  2. Add the buttons via script call either through common event or by an event on the map.
  3. Have fun!
/* Helpers
* Manager Helpers
* KR.ShopManager.createSellShop()
* -Creates a shop you can only sell items to.
*
* KR.ShopManager.adjustSellPrice(sellPoint);
* - This adjusts the sellprice for the shop by a percentage amount.
* Example: KR.ShopManager.adjustSellPrice(2.0)
* The above doubles the amount items sell for in game based off their original buy price.
* Note: setting it to 0.0 will default to the game's original setting of half the buy price.
* 
* KR.ShopManager.createRandomizedPriceShop(buyMin, buyMax, sellMin, sellMax)
* -This shop sets a shop with randomized item prices. Everytime you enter the shop
* the price changes for both buy and sell based on the above parameters.
* Example: KR.ShopManager.createRandomizedPriceShop(0, 999, 200, 300);
*
* KR.ShopManager.customizeItemBuyPrice(itemInformation)
* -This changes the item buy price based on it's position in the list. This also overrides
* the regular shops buying prices for that item.
* Example: KR.ShopManager.customizeItemBuyPrice([2,'random', 50, 100],[1, 'random', 35, 75]);
*
* KR.ShopManager.createStockableShop(shopId, itemInformation,);
* This creates a shop with stock for a specific item with that id.
* Example: KR.ShopManager.createStockableShop(1, ['item', 1, 3])
* This would set the stock for an 'item' type item with the id 1 to 3.
* Note: You can have items with no stock alongside items with stock.
* 
* KR.ShopManager.restockShop(shopId, itemInformation)
* This restocks an item at the shop with that specified ID.
* Example: KR.ShopManager.restockShop(1, ['item',1, 20], ['item', 6, 20]);
* The above would add 20 to the current stock of shop 1 with the item id of 1.
* Note: Items sold to a stock shop, update the shops current stock for that item
* if it is in the buy window.
*
* Extra Notes: You can combine some of these directives together when creating your shop.
*/

 

Please download the attached file to use the plugin.

Download “EIS Shop System” EISShopSystem.js – Downloaded 433 times –


Credits:

Free for both commercial and non-commercial use.
Credit with the name Kino or EIS.

Thanks:
Thank you to anyone who decides to use this script; I appreciate it!

Enjoy ~

 

17 thoughts on “Shop System

  1. not working for me it keeps saying infinite posession i have no idea on how to make it work…

    should i open a shop window or should i only call the script?? bc script isnt working…

    1. I might be over stepping here. But could you show a screenshot of the event you’ve got laid out? I had it working on a project, but it can be tricky.

      1. Thanks for the fast reply.
        I am really noobish so sorry if I am just completely oblivious to what you’re trying to tell me.

        If I do just a regular Shop Processing event it brings up a shop with whatever item I set the shop processing to but it shows infinite stock. I am trying to call a stock-able shop is there a specific script call I should use to specify that shop id?

        What I have sort of looks like this in the event:
        Script: KR.ShopManager.createStockableShop(1, [‘item’, 4, 1])
        Shop Processing: Stimulant

        1. Alright TJ, I’ll take a closer look. This plugin needs to be updated though or rewritten so stay tuned for something more workable.

          1. Kino… I think I figured out my problem it looks like I have gotten it to work the way you said… I apparently still had an old plug in running that was trying to muscle in on the shop processing. Thanks again! And great plugin…

  2. Hi, Kino! I’m really loving this plugin so far! 🙂 But I may have found 2 weird bugs…

    (1) Whenever I go to sell an item that has limited stock, it will act funny and try to only select the amount that the shop has in stock. For example: my shop has 3 potions in stock and I buy 2 of them. When I go to sell it back, the shop only wants to buy 1 at a time. If I buy all 3 potions, pressing any of the arrow keys to increase/decrease the quantity of what I’m selling brings it to 0.

    Here’s a screenshot:
    http://i.imgur.com/ekxVpC2.png?1

    (2) It seems like the plugin doesn’t clear the shop data whenever a new game is created. For example: I buy all 3 potions, “Exit Game” from the menu, then immediately select “New Game”. The potions will still be gone when the new game starts. 🙁

    Thank you again for writing this plugin! It’s really come in handy so far! 🙂

    1. THe shop system took a while, but I fixed issue number one for you and also added safe guards for buying items too ~

  3. First of all, I do not speak English well….. Sorry about that!
    I like this plugin! But even without money, it is possible to buy the item! I’m not sure this is a bug?
    I don’t know how to do.
    I wait for your answer.
    Thank you very much!!:)

    1. If you could send me a screenshot, I may be able to help you out with that. I’ll be updating the shop system pretty soon.

Leave a Reply

Your email address will not be published.