Lmao, so now what your trying to make us do is prevent people from buying items that we have preset into the shop? Nice choice!
|
|

*Sorry, forgot a big part in this! Ill repost once I finish!
Lmao, so now what your trying to make us do is prevent people from buying items that we have preset into the shop? Nice choice!

This doesn't prevent buying from any shop. This prevents selling items that are already in the shop. In this case, when you sell the item into the General Store, it doesn't appear, since thier is a dupe involving the general store, but give you the money from the item sold. When the item is sold in the general store, it doesn't appear.
I did something like this:
Code:if (shop.hasItem((stackableItem ? itemId : item))) { for (ShopItem shopItem : shop.getItems()) { if (shopItem != null) { if (shopItem.getId() == (stackableItem ? itemId : item)) { if (!shopItem.isShopItem()) { shopItem.setPlacedInShop(System.currentTimeMillis()); } shopItem.setActualAmount(shopItem.getActualAmount() + amount); break; } } } } else { if (shop.isGeneralStore()) { ShopItem newItem = new ShopItem((stackableItem ? itemId : item), amount); int freeSlot = shop.getFreeSlot(); if (freeSlot != -1) { shop.getItems()[freeSlot] = newItem; } else { return; } } else { return; } }
| « [PI] Crystal Chest and Key with Rewards | [PI]Fix protect item curse prayer!![PI] » |
| Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |