Thread: [PI/SS] General Store Cheap Fix [PI/SS]

Results 1 to 4 of 4
  1. #1 [PI/SS] General Store Cheap Fix [PI/SS] 
    Donator


    Join Date
    Mar 2011
    Posts
    2,362
    Thanks given
    1,193
    Thanks received
    824
    Rep Power
    856
    *Sorry, forgot a big part in this! Ill repost once I finish!
    Reply With Quote  
     

  2. #2  
    Registered Member
    Xynth's Avatar
    Join Date
    May 2009
    Posts
    2,222
    Thanks given
    226
    Thanks received
    259
    Rep Power
    1155
    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!
    Reply With Quote  
     

  3. #3  
    Donator


    Join Date
    Mar 2011
    Posts
    2,362
    Thanks given
    1,193
    Thanks received
    824
    Rep Power
    856
    Quote Originally Posted by Xynth View Post
    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.
    Reply With Quote  
     

  4. #4  
    Respected Member

    Join Date
    Jan 2009
    Posts
    5,682
    Thanks given
    1,093
    Thanks received
    3,494
    Discord
    View profile
    Rep Power
    5000
    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;
    			}
    		}
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. 562 General store?
    By owner jacob in forum Help
    Replies: 9
    Last Post: 02-11-2011, 08:06 PM
  2. [pi] general store
    By jessie thompson in forum Requests
    Replies: 6
    Last Post: 11-11-2010, 09:45 PM
  3. general store
    By Leanbow in forum Help
    Replies: 0
    Last Post: 03-06-2010, 05:58 PM
  4. General Store?
    By Xuzk in forum Help
    Replies: 8
    Last Post: 01-19-2010, 11:13 PM
  5. General Store?
    By Kduffy45 in forum Help
    Replies: 2
    Last Post: 01-03-2010, 06:01 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •