Thread: [RUSE] Player Owned Shops.

Page 1 of 3 123 LastLast
Results 1 to 10 of 21
  1. #1 [RUSE] Player Owned Shops. 
    Death Is Imminent.

    Murder's Avatar
    Join Date
    Nov 2013
    Posts
    666
    Thanks given
    44
    Thanks received
    54
    Rep Power
    153
    [Only registered and activated users can see links. ]



    RSInterface:
    Code:
    public static void playerOwnedShopInterface(TextDrawingArea[] tda) {
    		RSInterface tab = addInterface(32600);
    		RSInterface tab2 = addInterface(32620);
    		RSInterface tab3 = addInterface(32622);
    		String dir = "ok/ok";
    		addSprite(32601, 0, dir);
    		addConfigButton(32602, 32603, 3, 4, dir, 164, 22, "Search", 1, 4, 968);
    		addConfigButton(32604, 32605, 5, 6, dir, 164, 22, "Search for players", 1, 4, 969);
    		addHoverButton(32606, dir, 1, 16, 16, "Close Window", 250, 32607, 3);
    		addHoveredButton(32607, dir, 2, 16, 16, 32608);
    		addText(32610, "Player Owned Shops", tda, 2, 0xff7000, true, true);
    		addText(32611, "Search", tda, 1, 0xff7000, false, true);
    		addText(32612, "Search a player", tda, 1, 0xff7000, false, true);
    		int x = 10, y = 10;
    		tab.totalChildren(8);
    		tab.child(0, 32601, 0+x, 0+y);
    		tab.child(1, 32602, 87+x, 273+y);
    		//tab.child(2, 32604, 360+x, 273+y);
    		tab.child(2, 32606, 463+x, 4+y);
    		tab.child(3, 32607, 463+x, 4+y);
    		tab.child(4, 32611, 90+x, 276+y);
    		//tab.child(6, 32612, 363+x, 276+y);
    		tab.child(5, 32620, 9+x, 22+y);
    		tab.child(6, 32622, 350+x, 22+y);
    		tab.child(7, 32610, 242+x, 5+y);
    		tab2.width = 317;
    		tab2.height = 246;
    		tab2.scrollMax = 400;
    		itemGroup(32621, 7, 8, 10, 10);
    		tab2.totalChildren(1);
    		tab2.child(0, 32621, 14, 14);
    		for (int i = 0; i < 100; i++) {
    			addClickableText(32623 + i, "Player online " + i, "Select", tda, 0, 0xeb981f, false, true, 632);
    		}
    		tab3.width = 110;
    		tab3.height = 246;
    		tab3.scrollMax = 10 + (100 * 14);
    		tab3.totalChildren(100);
    		for (int i = 0; i < 100; i++) {
    			tab3.child(i, 32623 + i, 10, 10 + (i * 14));
    		}
    	}
    	public static void itemGroup(int id, int w, int h, int x, int y) {
    		RSInterface rsi = addInterface(id);
    		rsi.width = w;
    		rsi.height = h;
    		rsi.inv = new int[w * h];
    		rsi.invStackSizes = new int[w * h];
    		rsi.usableItemInterface = false;
    		rsi.isInventoryInterface = false;
    		rsi.invSpritePadX = x;
    		rsi.invSpritePadY = y;
    		rsi.spritesX = new int[20];
    		rsi.spritesY = new int[20];
    		rsi.sprites = new Sprite[20];
    		rsi.type = 2;
    	}
    	public static void addToItemGroup(int id, int w, int h, int x, int y, boolean actions, String action1, String action2, String action3) {
    		RSInterface rsi = addInterface(id);
    		rsi.width = w;
    		rsi.height = h;
    		rsi.inv = new int[w * h];
    		rsi.invStackSizes = new int[w * h];
    		rsi.usableItemInterface = false;
    		rsi.isInventoryInterface = false;
    		rsi.interfaceShown = false;
    		rsi.invSpritePadX = x;
    		rsi.invSpritePadY = y;
    		rsi.spritesX = new int[20];
    		rsi.spritesY = new int[20];
    		rsi.sprites = new Sprite[20];
    		rsi.actions = new String[5];
    		if (actions) {
    			rsi.actions[0] = action1;
    			rsi.actions[1] = action2;
    			rsi.actions[2] = action3;
    		}
    		rsi.type = 2;
    	}
    	
    	static void playerOwnedShopInterface3(TextDrawingArea[] tda) {
            RSInterface rsi = addInterface(37000);
            addSprite(37001, 0, "Interfaces/ResourceBag/SPRITE");
            addSprite(37002, 1, "Interfaces/ResourceBag/SPRITE");
            for (int i = 0; i < 28; i++)
                addToItemGroup(37003 + i, 1, 1, 0, 0, true, new String[] { "Withdraw 1", "Withdraw 5", "Withdraw 10", "Withdraw all", "Withdraw all to bank" });
            setChildren(30, rsi);
            setBounds(37001, 147, 38, 0, rsi);
            setBounds(37002, 140, 31, 1, rsi);
            int x = 0;
            int y = 0;
            int counter = 0;
            for (int i = 0; i < 28; i++) {
                setBounds(37003 + i, 162 + x, 46 + y, 2 + i, rsi);
                x += 42;
                counter++;
                if (counter == 4) {
                    x = 0;
                    y += 34;
                    counter = 0;
                }
            }
            RSInterface tab = addTabInterface(37053);
            addInventoryItemGroup2(37054, 7, 4);
            setChildren(1, tab);
            setBounds(37054, 0, 0, 0, tab);
        }
    	
    	public static void addToItemGroup(int id, int w, int h, int x, int y, boolean hasActions, String[] actions) {
    		RSInterface rsi = addInterface(id);
    		rsi.width = w;
    		rsi.height = h;
    		rsi.inv = new int[w * h];
    		rsi.invStackSizes = new int[w * h];
    		rsi.usableItemInterface = false;
    		rsi.isInventoryInterface = false;
    		rsi.interfaceShown = false;
    		rsi.invSpritePadX = x;
    		rsi.invSpritePadY = y;
    		rsi.spritesX = new int[20];
    		rsi.spritesY = new int[20];
    		rsi.sprites = new Sprite[20];
    		if (hasActions)
    			rsi.actions = actions;
    		rsi.type = 2;
    	}
    
    	public static void addClickText(final int interfaceID, final String line,
    			final int color, final boolean center, final boolean shadow,
    			final int hover, final TextDrawingArea[] typeFace,
    			final int textType, final String tooltip) {
    		final RSInterface text = addInterface(interfaceID);
    		text.id = interfaceID;
    		text.parentID = interfaceID;
    		text.type = 4;
    		text.atActionType = 4;
    		text.contentType = 0;
    		text.width = /* typeFace[textType].getTextWidth(line) */130;
    		text.height = /* typeFace[textType].getTextHeight(line) */textType == 0 ? 14
    				: 21;
    		text.hoverType = hover;
    		text.centerText = center;
    		text.shadowed = shadow;
    		text.textDrawingAreas = typeFace[textType];
    		text.message = line;
    		text.enabledColor = color;
    		text.tooltip = tooltip;
    	}
    	public static void playerOwnedShopInterface2(TextDrawingArea[] tda) {
    	    RSInterface localRSInterface1 = addInterface(33600);
    	    RSInterface localRSInterface2 = addInterface(33620);
    	    addSpriteLoader(33601, 581);
    	    addHoveredImageWSpriteLoader(33606, 581, 164, 22, 33607);
    	    addHoverSpriteLoaderButton(33607, 737, 16, 16, "Close", -1, 32608, 1);
    	    addText(33610, "Your Player Owned Shop", tda, 2, 0xff7000, true, true);
    	    localRSInterface1.totalChildren(5);
    	    localRSInterface1.child(0, 33601, 10, 10);
    	    localRSInterface1.child(1, 33606, 473, 14);
    	    localRSInterface1.child(2, 33607, 473, 14);
    	    localRSInterface1.child(3, 33620, 19, 32);
    	    localRSInterface1.child(4, 33610, 252, 15);
    	    localRSInterface2.width = 455;
    	    localRSInterface2.height = 276;
    	    localRSInterface2.scrollMax = 400;
    	    itemGroup(33621, 10, 8, 10, 10);
    	    localRSInterface2.totalChildren(1);
    	    localRSInterface2.child(0, 33621, 20, 14);
    	  }
    	
    	
    	//addText(33610, "Your Player Owned Shop", tda, 2, 0xff7000, true, true);
    	private static void addButton(int ID, int type, int hoverID, int dS,
    			int eS, String NAME, int W, int H, String text, int configFrame,
    			int configId) {
    		RSInterface rsinterface = addInterface(ID);
    		rsinterface.id = ID;
    		rsinterface.parentID = ID;
    		rsinterface.type = 5;
    		rsinterface.atActionType = type;
    		rsinterface.opacity = 0;
    		rsinterface.hoverType = hoverID;
    		rsinterface.enabledSprite = imageLoader(dS, NAME);
    		rsinterface.disabledSprite = imageLoader(eS, NAME);
    		rsinterface.width = W;
    		rsinterface.height = H;
    		rsinterface.tooltip = text;
    		rsinterface.valueCompareType = new int[1];
    		rsinterface.requiredValues = new int[1];
    		rsinterface.valueCompareType[0] = 1;
    		rsinterface.requiredValues[0] = configId;
    		rsinterface.valueIndexArray = new int[1][3];
    		rsinterface.valueIndexArray[0][0] = 5;
    		rsinterface.valueIndexArray[0][1] = configFrame;
    		rsinterface.valueIndexArray[0][2] = 0;
    	}
    Client.java:

    Find:
    Code:
    if(child.parentID == 3822 && openInterfaceID == 3824) {
    												menuActionName[menuActionRow] = "Sell All @[email protected]" + itemDef.name;
    												menuActionID[menuActionRow] = 1126;
    												menuActionCmd1[menuActionRow] = itemDef.id;
    												menuActionCmd2[menuActionRow] = ptr;
    												menuActionCmd3[menuActionRow] = child.id;
    												menuActionRow++;
    under it:

    Code:
    										if (child.id == 32621) {
    										    menuActionName[menuActionRow] = "Buy X @[email protected]" + itemDef.name + "";
    										    menuActionID[menuActionRow] = 431;
    										    menuActionCmd1[menuActionRow] = itemDef.id;
    										    menuActionCmd2[menuActionRow] = ptr;
    										    menuActionCmd3[menuActionRow] = child.id;
    										    menuActionRow++;
    										    menuActionName[menuActionRow] = "Buy 10 @[email protected]" + itemDef.name + "";
    										    menuActionID[menuActionRow] = 300;
    										    menuActionCmd1[menuActionRow] = itemDef.id;
    										    menuActionCmd2[menuActionRow] = ptr;
    										    menuActionCmd3[menuActionRow] = child.id;
    										    menuActionRow++;
    										    menuActionName[menuActionRow] = "Buy 5 @[email protected]" + itemDef.name + "";
    										    menuActionID[menuActionRow] = 291;
    										    menuActionCmd1[menuActionRow] = itemDef.id;
    										    menuActionCmd2[menuActionRow] = ptr;
    										    menuActionCmd3[menuActionRow] = child.id;
    										    menuActionRow++;
    										    menuActionName[menuActionRow] = "Buy 1 @[email protected]" + itemDef.name + "";
    										    menuActionID[menuActionRow] = 867;
    										    menuActionCmd1[menuActionRow] = itemDef.id;
    										    menuActionCmd2[menuActionRow] = ptr;
    										    menuActionCmd3[menuActionRow] = child.id;
    										    menuActionRow++;
    										    menuActionName[menuActionRow] = "Value @[email protected]" + itemDef.name + "";
    										    menuActionID[menuActionRow] = 632;
    										    menuActionCmd1[menuActionRow] = itemDef.id;
    										    menuActionCmd2[menuActionRow] = ptr;
    										    menuActionCmd3[menuActionRow] = child.id;
    										    menuActionRow++;
    										}
    										
    										if (child.id == 33621) {
    											menuActionName[menuActionRow] = "Set price @[email protected]" + itemDef.name + "";
    										    menuActionID[menuActionRow] = 78;
    										    menuActionCmd1[menuActionRow] = itemDef.id;
    										    menuActionCmd2[menuActionRow] = ptr;
    										    menuActionCmd3[menuActionRow] = child.id;
    										    menuActionRow++;
    										    menuActionName[menuActionRow] = "Withdraw X @[email protected]" + itemDef.name + "";
    										    menuActionID[menuActionRow] = 431;
    										    menuActionCmd1[menuActionRow] = itemDef.id;
    										    menuActionCmd2[menuActionRow] = ptr;
    										    menuActionCmd3[menuActionRow] = child.id;
    										    menuActionRow++;
    										    menuActionName[menuActionRow] = "Withdraw 10 @[email protected]" + itemDef.name + "";
    										    menuActionID[menuActionRow] = 300;
    										    menuActionCmd1[menuActionRow] = itemDef.id;
    										    menuActionCmd2[menuActionRow] = ptr;
    										    menuActionCmd3[menuActionRow] = child.id;
    										    menuActionRow++;
    										    menuActionName[menuActionRow] = "Withdraw 5 @[email protected]" + itemDef.name + "";
    										    menuActionID[menuActionRow] = 291;
    										    menuActionCmd1[menuActionRow] = itemDef.id;
    										    menuActionCmd2[menuActionRow] = ptr;
    										    menuActionCmd3[menuActionRow] = child.id;
    										    menuActionRow++;
    										    menuActionName[menuActionRow] = "Withdraw 1 @[email protected]" + itemDef.name + "";
    										    menuActionID[menuActionRow] = 867;
    										    menuActionCmd1[menuActionRow] = itemDef.id;
    										    menuActionCmd2[menuActionRow] = ptr;
    										    menuActionCmd3[menuActionRow] = child.id;
    										    menuActionRow++;
    										    menuActionName[menuActionRow] = "Value @[email protected]" + itemDef.name + "";
    										    menuActionID[menuActionRow] = 632;
    										    menuActionCmd1[menuActionRow] = itemDef.id;
    										    menuActionCmd2[menuActionRow] = ptr;
    										    menuActionCmd3[menuActionRow] = child.id;
    										    menuActionRow++;
    										}
    
    										if (child.id == 41710) {
    											menuActionName[menuActionRow] = "Withdraw all @[email protected]" + itemDef.name + "";
    											menuActionID[menuActionRow] = 431;
    											menuActionCmd1[menuActionRow] = itemDef.id;
    											menuActionCmd2[menuActionRow] = ptr;
    											menuActionCmd3[menuActionRow] = child.id;
    											menuActionRow++;
    											menuActionName[menuActionRow] = "Withdraw X @[email protected]" + itemDef.name + "";
    											menuActionID[menuActionRow] = 300;
    											menuActionCmd1[menuActionRow] = itemDef.id;
    											menuActionCmd2[menuActionRow] = ptr;
    											menuActionCmd3[menuActionRow] = child.id;
    											menuActionRow++;
    											menuActionName[menuActionRow] = "Withdraw 10 @[email protected]" + itemDef.name + "";
    											menuActionID[menuActionRow] = 867;
    											menuActionCmd1[menuActionRow] = itemDef.id;
    											menuActionCmd2[menuActionRow] = ptr;
    											menuActionCmd3[menuActionRow] = child.id;
    											menuActionRow++;
    											menuActionName[menuActionRow] = "Withdraw 1 @[email protected]" + itemDef.name + "";
    											menuActionID[menuActionRow] = 632;
    											menuActionCmd1[menuActionRow] = itemDef.id;
    											menuActionCmd2[menuActionRow] = ptr;
    											menuActionCmd3[menuActionRow] = child.id;
    											menuActionRow++;
    										}
    									}


    Server:

    Create PlayerOwnedShop.java:

    Code:
    package com.ruseps.world.content.pos;
    
    import java.io.BufferedWriter;
    import java.io.File;
    import java.io.IOException;
    import java.nio.charset.StandardCharsets;
    import java.nio.file.Files;
    import java.nio.file.Path;
    import java.nio.file.Paths;
    import java.util.ArrayList;
    import java.util.List;
    
    import com.ruseps.model.definitions.ItemDefinition;
    import com.ruseps.net.packet.PacketBuilder;
    import com.ruseps.net.packet.Packet.PacketType;
    import com.ruseps.util.Misc;
    import com.ruseps.util.NameUtils;
    import com.ruseps.world.World;
    import com.ruseps.world.entity.impl.player.Player;
    import com.ruseps.world.entity.impl.player.PlayerLoading;
    import com.ruseps.world.entity.impl.player.PlayerSaving;
    
    /**
     * A class representing a single player owned shop. In this
     * we hold and manage all the items that are added or sold
     * using an instance of this class. A single instance of this
     * class shows a single player owned shop in the manager class.
     * 
     * 
     *
     */
    public class PlayerOwnedShop {
    
    	/**
    	 * The total capacity of items a shop can contain.
    	 */
    	public static final int SHOP_CAPACITY = 32;
    	
    	/**
    	 * A collection of all the items in this player owned
    	 * shop. If an item slot is empty this is represented as
    	 * {@code null}, else as an {@link Item} instance.
    	 */
    	private Item[] items = new Item[SHOP_CAPACITY];
    	
    	/**
    	 * A reference to the player owning this shop. We use this
    	 * reference to notify the shop owner of certain events.
    	 */
    	private Player owner;
    	
    	/**
    	 * The name of the player owning this player owned shop.
    	 */
    	private String username;
    	
    	public void open(Player player) {
    		player.getPacketSender().sendString(32610, "Player Owned Shop - "+ownerName());
    		player.getPacketSender().sendString(32611, "Search");
    		player.getPlayerOwnedShopManager().updateFilter("");
    		resetItems(player);
    		refresh(player, false);
    	}
    	
    	public void refresh(Player player, boolean myShop) {
    		
    		for(int i = 0; i < items.length; i++) {
    			
    			Item item = items[i];
    			
    			PacketBuilder out = new PacketBuilder(34, PacketType.SHORT);
    			
    			out.putShort(myShop ? 33621 : 32621);
    			out.put(i);
    			out.putShort(item == null ? 0 : item.getId() + 1);
    			
    			if(item != null && item.getAmount() > 254) {
    				out.put(255);
    				out.putInt(item.getAmount());
    			} else {
    				out.put(item == null ? 0 : item.getAmount());
    			}
    			
    			player.getSession().queueMessage(out);
    			
    		}
    		
    	}
    	
    	public void add(int id, int amount) {
    		
    		ItemDefinition definition = ItemDefinition.forId(id);
    		int price = 0;
    		
    		if(definition != null) {
    			price = definition.getValue();
    		}
    		
    		add(id, amount, price);
    		
    	}
    	
    	public void add(int id, int amount, int price) {
    		add(new Item(id, amount, price));
    		refreshAll();
    		save();
    	}
    	
    	public void add(Item item) {
    		
    		for(int i = 0; i < items.length; i++) {
    			if(items[i] != null && items[i].getId() == item.getId()) {
    				items[i].setAmount(items[i].getAmount() + item.getAmount());
    				return;
    			}
    		}
    		
    		int index = freeSlot();
    		
    		if(index != -1) {
    			if(items[index] == null) {
    				items[index] = item;
    			}
    		}
    		
    	}
    	
    	public int remove(int slot, int amount) {
    		
    		Item item = getItem(slot);
    		int removed = -1;
    		
    		if(item != null) {
    			if(amount >= item.getAmount()) {
    				items[slot] = null;
    				shift();
    				removed = item.getAmount();
    			} else {
    				item.setAmount(item.getAmount() - amount);
    				removed = amount;
    			}
    			save();
    			refreshAll();
    		}
    		
    		return removed;
    		
    	}
    	
    	public void shift() {
    		
    		List<Item> temp = new ArrayList<>();
    		
    		for(Item item : items) {
    			if(item != null) {
    				temp.add(item);
    			}
    		}
    		
    		items = temp.toArray(new Item[SHOP_CAPACITY]);
    		
    	}
    	
    	public int freeSlot() {
    		for(int i = 0; i < items.length; i++){
    			if(items[i] == null) {
    				return i;
    			}
    		}
    		return -1;
    	}
    	
    	public Item getItem(int slot) {
    		return items[slot];
    	}
    	
    	public int getAmount(int id) {
    		for(int i = 0; i < items.length; i++){
    			if(items[i] != null && items[i].getId() == id) {
    				return items[i].getAmount();
    			}
    		}
    		return 0;
    	}
    	
    	public boolean contains(int id) {
    		for(int i = 0; i < items.length; i++){
    			if(items[i] != null && items[i].getId() == id) {
    				return true;
    			}
    		}
    		return false;
    	}
    	
    	public boolean contains(String name) {
    		
    		if(name == null) {
    			return false;
    		}
    		
    		for(int i = 0; i < items.length; i++){
    			if(items[i] != null && items[i].getDefinition() != null && items[i].getDefinition().getName() != null && items[i].getDefinition().getName().toLowerCase().contains(name.toLowerCase())) {
    				return true;
    			}
    		}
    		return false;
    		
    	}
    	
    	public int size() {
    		int size = 0;
    		for(int i = 0; i < items.length; i++){
    			if(items[i] != null) {
    				size++;
    			}
    		}
    		return size;
    	}
    	
    	public void refreshAll() {
    		for(Player player : World.getPlayers()) {
    			if(player != null && player.getPlayerOwnedShopManager().getCurrent() == this) {
    				refresh(player, player.getPlayerOwnedShopManager().getMyShop() == this);
    			}
    		}
    	}
    	
    	public static void resetItems(Player player) {
    		
    		for(int i = 0; i < SHOP_CAPACITY; i++) {
    			
    			PacketBuilder out = new PacketBuilder(34, PacketType.SHORT);
    			
    			out.putShort(32621);
    			out.put(i);
    			out.putShort(0);
    			out.put(0);
    			
    			player.getSession().queueMessage(out);
    			
    		}
    		
    	}
    	
    	/**
    	 * Access the online or offline player instance of the
    	 * owner of this player owned shop. If the owner is indeed
    	 * offline his/her details will be loaded from the saved
    	 * serialized character file and reinterpreted to actual
    	 * OOP objects to access the instance within the JVM.
    	 * @param force If the instance is forced to be online.
    	 * @return The player instance to the owner.
    	 */
    	public Player accessOwner(boolean force) {
    		
    		if(owner == null && !force) {
    			
    			owner = World.getPlayerByName(username);
    			
    			Path path = Paths.get("./data/saves/characters/", username + ".json");
    			File file = path.toFile();
    			
    			if(owner == null && file.exists()) {
    				
    				Player player = new Player(null);
    				
    				player.setUsername(username);
    				player.setLongUsername(NameUtils.stringToLong(username));
    				
    				PlayerLoading.getResult(player, true);
    				
    				return player;
    				
    			}
    			
    		}
    		
    		return owner;
    		
    	}
    	
    	/**
    	 * 
    	 * @return
    	 */
    	public String ownerName() {
    		
    		Player owner = accessOwner(false);
    		
    		if(owner != null) {
    			return owner.getUsername();
    		}
    		
    		return username;
    		
    	}
    	
    	/**
    	 * 
    	 * @param amount
    	 * @param item
    	 */
    	public void addMoney(int amount, Item item) {
    		
    		Player owner = accessOwner(false);
    		
    		if(owner != null) {
    			
    			owner.getPlayerOwnedShopManager().addEarnings(amount);
    			
    			if(!owner.isActive()) {
    				owner.setShopUpdated(true);
    			} else {
    				String formatPrice = Misc.sendCashToString(amount);
    				owner.sendMessage("<col=FF0000>You have earned "+formatPrice+" coins from your shop.</col>");
    				owner.getPacketSender().sendString(32610, ":notification:"+item.getAmount()+" "+item.getDefinition().getName().toLowerCase()+" has been bought from your POS for "+formatPrice+" coins.");
    			}
    			
    			PlayerSaving.save(owner);
    			
    		}
    		
    	}
    	
    	public void save() {
    		
    		Path path = Paths.get(PlayerOwnedShopManager.DIRECTORY + File.separator, getUsername() + ".txt");
    		
    		if (Files.notExists(path)) {
    			try {
    				Files.createDirectories(path.getParent());
    			} catch (IOException e) {
    				e.printStackTrace();
    			}
    		}
    
    		try (BufferedWriter writer = Files.newBufferedWriter(path, StandardCharsets.UTF_8)) {
    			for(Item item : getItems()) {
    				if(item != null) {
    					writer.write(item.getId()+" - "+item.getAmount()+" - "+item.getPrice());
    					writer.newLine();
    				}
    			}
    		} catch (IOException e) {
    			e.printStackTrace();
    		}
    		
    	}
    
    	/**
    	 * Get a reference to a collection of all the items in
    	 * this player owned shop. If an item slot is empty it
    	 * will be shown as {@code null}, else as a {@link Item}
    	 * instance.
    	 * @return The array of items in this player owned shop.
    	 */
    	public Item[] getItems() {
    		return items;
    	}
    
    	/**
    	 * Set a new array of items to represent the collection
    	 * of all items in this player owned shop. If an item
    	 * slot is empty it must be shown as {@code null}, else
    	 * as a {@link Item} instance.
    	 * @param items The new array of items for this shop.
    	 */
    	public void setItems(Item[] items) {
    		this.items = items;
    	}
    
    	/**
    	 * Get the reference to the player instance of the owner
    	 * of this shop. It is important to notice that with this
    	 * reference the player instance can refer to an offline
    	 * player. If you would like to gain access to the player
    	 * owning this shop while this player is online or offline
    	 * use the {@link #accessOwner(boolean)} method instead.
    	 * @return A reference to the player owning this shop.
    	 */
    	public Player getOwner() {
    		return owner;
    	}
    
    	/**
    	 * 
    	 * @param owner
    	 */
    	public void setOwner(Player owner) {
    		this.owner = owner;
    	}
    	
    	public String getUsername() {
    		return username;
    	}
    
    	public void setUsername(String username) {
    		this.username = username;
    	}
    
    	public static class Item {
    		
    		private int id;
    		
    		private int amount;
    		
    		private int price;
    
    		public Item(int id) {
    			this(id, 1);
    		}
    		
    		public Item(int id, int amount) {
    			this.id = id;
    			this.amount = amount;
    		}
    		
    		public Item(int id, int amount, int price) {
    			this(id, amount);
    			this.price = price;
    		}
    
    		public int getPrice() {
    			return price;
    		}
    
    		public void setPrice(int price) {
    			this.price = price;
    		}
    
    		public int getId() {
    			return id;
    		}
    
    		public void setId(int id) {
    			this.id = id;
    		}
    
    		public int getAmount() {
    			return amount;
    		}
    
    		public void setAmount(int amount) {
    			this.amount = amount;
    		}
    		
    		public ItemDefinition getDefinition() {
    			return ItemDefinition.forId(id);
    		}
    
    	}
    
    	
    }
    Create PlayerOwnedShopManager.java:
    Code:
    package com.ruseps.world.content.pos;
    
    import java.io.BufferedReader;
    import java.io.File;
    import java.io.IOException;
    import java.nio.charset.StandardCharsets;
    import java.nio.file.Files;
    import java.nio.file.Path;
    import java.nio.file.Paths;
    import java.util.ArrayList;
    import java.util.Arrays;
    import java.util.List;
    
    import com.ruseps.GameSettings;
    import com.ruseps.model.definitions.ItemDefinition;
    import com.ruseps.model.input.Input;
    import com.ruseps.net.packet.PacketBuilder;
    import com.ruseps.net.packet.ValueType;
    import com.ruseps.util.Misc;
    import com.ruseps.world.content.PlayerLogs;
    import com.ruseps.world.content.dialogue.Dialogue;
    import com.ruseps.world.content.dialogue.DialogueExpression;
    import com.ruseps.world.content.dialogue.DialogueManager;
    import com.ruseps.world.content.dialogue.DialogueType;
    import com.ruseps.world.content.pos.PlayerOwnedShop.Item;
    import com.ruseps.world.entity.impl.player.Player;
    
    /**
     * A management class for all player owned shops and information
     * related to a player owned shop on player instance basis.
     * 
     * 
     *
     */
    public class PlayerOwnedShopManager {
    	
    	/**
    	 * A collection of all player owned shops ever created.
    	 */
    	public static final List<PlayerOwnedShop> SHOPS = new ArrayList<>();
    	
    	/**
    	 * The directory for the player owned shops
    	 */
    	public static final File DIRECTORY = new File("./data/shops/");
    	
    	/**
    	 * A reference to the player instance.
    	 */
    	private Player player;
    
    	/**
    	 * The current player owned shop being visited by the player.
    	 */
    	private PlayerOwnedShop current;
    	
    	/**
    	 * The player owned shop owned by the player relative to the
    	 * current {@link PlayerOwnedShopManager} instance.
    	 */
    	private PlayerOwnedShop myShop;
    	
    	/**
    	 * A collection of the shops filtered for this player's instance.
    	 */
    	private List<PlayerOwnedShop> filtered = new ArrayList<>();
    	
    	/**
    	 * The string we are using to filter through all of the player
    	 * owned shops.
    	 */
    	private String filterString = "";
    	
    	/**
    	 * The available earnings the player has made from his shop.
    	 */
    	private long earnings = 0;
    	
    	/**
    	 * Construct a new {@code PlayerOwnedShopManager} {@code Object}.
    	 * @param player The reference to the player owning this instance.
    	 */
    	public PlayerOwnedShopManager(Player player) {
    		this.player = player;
    	}
    
    	/**
    	 * Open the player owned shop management interface.
    	 */
    	public void open() {
    		
    		player.getPacketSender().sendString(32610, "Player Owned Shops");
    		
    		int i = 0;
    		filtered.clear();
    		
    		for(PlayerOwnedShop shop : SHOPS) {
    			
    			if(shop != null && shop.size() > 0) {
    				player.getPacketSender().sendString(32623 + (i++), shop.ownerName());
    				filtered.add(shop);
    			}
    			
    		}
    		
    		for(; i < 100; i++){
    			player.getPacketSender().sendString(32623 + i, "");
    		}
    		
    		PlayerOwnedShop.resetItems(player);
    		player.getPacketSender().sendInterface(32600);
    		
    	}
    	
    	public void options() {
    		
    		DialogueManager.start(player, new Dialogue() {
    
    			@Override
    			public DialogueType type() {
    				return DialogueType.OPTION;
    			}
    
    			@Override
    			public DialogueExpression animation() {
    				return null;
    			}
    
    			@Override
    			public String[] dialogue() {
    				return new String[] { "Visit somebody elses shop", "Manage my own shop", "Claim earnings", "Cancel" };
    			}
    			
    			@Override
    			public void specialAction() {
    				player.setDialogueActionId(101);
    			}
    			
    		});
    		
    	}
    	
    	/**
    	 * Open the interface to edit your own shop.
    	 */
    	public void openEditor() {
    		
    		if(myShop == null) {
    			newShop(myShop = new PlayerOwnedShop());
    		}
    		
    		(current = myShop).refresh(player, true);
    		refreshInventory();
    		
    	}
    	
    	/**
    	 * Create a new player owned shop and assign the current
    	 * player as owner of this shop.
    	 * @param shop A reference to the player owned shop.
    	 */
    	public void newShop(PlayerOwnedShop shop) {
    		shop.setUsername(player.getUsername());
    		SHOPS.add(shop);
    	}
    	
    	/**
    	 * Refresh the inventory of the player owning this player
    	 * owned shop management instance.
    	 */
    	public void refreshInventory() {
    		
    		for(int i = 0; i < player.getInventory().getItems().length; i++) {
    			
    			int id = player.getInventory().getItems()[i].getId(),
    				amount = player.getInventory().getItems()[i].getAmount();
    			
    			if(id <= 0 && amount <= 0) {
    				player.getPacketSender().sendItemOnInterface(37003 + i, -1, 0, 0);
    			} else {
    				player.getPacketSender().sendItemOnInterface(37003 + i, id, 0, amount);
    			}
    			
    		}
    		
    		player.getPacketSender().sendItemContainer(player.getInventory(), 37054);
    		
    		if(player.getSession().getChannel().isOpen() && player != null) {
    			PacketBuilder out = new PacketBuilder(248);
    			out.putShort(33600, ValueType.A);
    			out.putShort(37053);
    			player.getSession().queueMessage(out);
    		}
    		
    	}
    	
    	/**
    	 * Handle a button on the management interface for this player.
    	 * @param buttonId The button component id.
    	 */
    	public void handleButton(int buttonId) {
    		
    		buttonId -= 32623;
    		
    		boolean f = filtered.size() > 0;
    		
    		if(buttonId >= (f ? filtered : SHOPS).size()) {
    			return;
    		}
    		
    		PlayerOwnedShop shop = (f ? filtered : SHOPS).get(buttonId);
    		
    		if(shop != null) {
    			(current = shop).open(player);
    		} else {
    			PlayerOwnedShop.resetItems(player);
    		}
    		
    	}
    	
    	/**
    	 * Handle the action to buy an item from a player owned shop for
    	 * the player this management instance is relative to.
    	 * @param slot The item slot.
    	 * @param id The item id.
    	 * @param amount The amount he/she would like to buy of this item.
    	 */
    	public void handleBuy(int slot, int id, int amount) {
    		
    		if(current == null) {
    			return;
    		}
    		
    		Item item = current.getItem(slot);
    		
    		if(item == null) {
    			return;
    		}
    		
    		ItemDefinition definiton = item.getDefinition();
    		
    		if(amount == -1) {
    			if(definiton != null) {
    				String formatPrice = Misc.sendCashToString(item.getPrice());
    				player.sendMessage("<col=FF0000>"+definiton.getName()+"</col> costs "+formatPrice+" each <col=FF0000>"+current.ownerName()+"</col>'s shop.");
    			}
    			return;
    		}
    		
    		if(current == myShop) {
    			player.sendMessage("You cannot buy items from your own shop.");
    			return;
    		}
    		
    		if(Arrays.stream(GameSettings.UNSELLABLE_ITEMS).anyMatch(i -> i == item.getId())) {
    			player.sendMessage("You cannot buy "+definiton.getName()+" from this shop.");
    			return;
    		}
    		
    		/*if (player.getAchievements().isAchievementItem(id)) {
    			player.sendMessage("You cannot buy an achievement reward item!");
    			return;
    		}*/
    		
    		for (int i : GameSettings.UNTRADEABLE_ITEMS) {
    			if (i == id) {
    				player.sendMessage("You can't trade this item.");
    				return;
    			}
    		}
    		
    		if(item.getDefinition().getId() == 13280 || item.getDefinition().getId() == 13329 || item.getDefinition().getId() == 13337) {
    			return;
    		}
    		
    		/*if(ClueDifficulty.isClue(id)) {
    			player.sendMessage("You cannot purchase clue scrolls!");
    			return;
    		}*/
    		
    		long coins = player.getInventory().getAmount(995) + player.getMoneyInPouch();
    		
    		if(((long) amount * item.getPrice()) > coins) {
    			
    			amount = (int) Math.round((double) (((double) coins / item.getPrice()) - 0.3));
    			
    			//System.out.println("new amount: "+amount);
    			
    			if(amount < 0) {
    				amount = 0;
    			}
    			
    		}
    		
    		if(amount == 0) {
    			player.sendMessage("You do not have enough coins in your inventory.");
    		} else {
    			
    			if(amount >= item.getAmount()) {
    				amount = item.getAmount();
    			}
    			
    			if(!item.getDefinition().isStackable() || (item.getDefinition().isStackable() && !player.getInventory().contains(item.getId()))) {
    				if(player.getInventory().getFreeSlots() == 0) {
    					player.sendMessage("Not enough inventory space.");
    					return;
    				} else if(player.getInventory().getFreeSlots() < amount) {
    					amount = item.getDefinition().isStackable() ? amount : player.getInventory().getFreeSlots();
    				}
    			} else {
    				
    				int inventoryAmount = player.getInventory().getAmount(id);
    				
    				if((long) (amount + inventoryAmount) > Integer.MAX_VALUE) {
    					amount = (int) (Integer.MAX_VALUE - inventoryAmount);
    					PlayerLogs.log(player.getUsername(), "Purchasing item from POS: "+ItemDefinition.forId(id)+", amount: "+item.getAmount());
    				}
    				
    			}
    			
    			coins = player.getInventory().getAmount(995) + player.getMoneyInPouch();
    			long total = (long) item.getPrice() * amount;
    			
    			if(coins >= total) {
    			
    				int removed = current.remove(slot, amount);
    				int inventory = player.getInventory().getAmount(995);
    				
    				if(inventory > total) {
    					inventory = (int) total;
    				}
    				
    				player.getInventory().delete(995, inventory);
    				
    				total -= inventory;
    				
    				if(total > 0) {
    					player.setMoneyInPouch(player.getMoneyInPouch() - total);
    					player.getPacketSender().sendString(8135, ""+player.getMoneyInPouch());
    				}
    				
    				player.getInventory().add(item.getId(), removed);
    				current.addMoney(item.getPrice() * removed, item);
    			
    			}
    			
    		}
    		
    	}
    	
    	/**
    	 * Handle the withdraw action for this player's own shop. 
    	 * @param slot The item slot.
    	 * @param id The item id.
    	 * @param amount The amount the player would like to withdraw.
    	 */
    	public void handleWithdraw(int slot, int id, int amount) {
    		
    		if(current != myShop) {
    			return;
    		}
    		
    		Item item = current.getItem(slot);
    		ItemDefinition definiton = item.getDefinition();
    		
    		if(amount == -1) {
    			if(definiton != null) {
    				String formatPrice = Misc.sendCashToString(item.getPrice());
    				player.sendMessage("<col=FF0000>"+definiton.getName()+"</col> is set to cost "+formatPrice+" coins in your shop.");
    			}
    			return;
    		}
    		
    		if(amount >= item.getAmount()) {
    			amount = item.getAmount();
    		}
    		
    		if(!item.getDefinition().isStackable() || (item.getDefinition().isStackable() && !player.getInventory().contains(item.getId()))) {
    			if(player.getInventory().getFreeSlots() == 0) {
    				player.sendMessage("Not enough inventory space.");
    				return;
    			} else if(player.getInventory().getFreeSlots() < amount) {
    				amount = item.getDefinition().isStackable() ? amount : player.getInventory().getFreeSlots();
    			}
    		} else {
    			
    			int inventoryAmount = player.getInventory().getAmount(id);
    			
    			if((long) (amount + inventoryAmount) > Integer.MAX_VALUE) {
    				amount = (int) (Integer.MAX_VALUE - inventoryAmount);
    			}
    			
    		}
    		
    		if(amount == 0) {
    			player.sendMessage("Not enough inventory space.");
    			return;
    		}
    		
    		int removed = current.remove(slot, amount);
    		
    		player.getInventory().add(item.getId(), removed);
    		myShop.refresh(player, true);
    		refreshInventory();
    		
    	}
    	
    	public void handleStore(int slot, int id, int amount) {
    		handleStore(slot, id, amount, -1);
    	}
    	
    	public void handleStore(int slot, int id, int amount, int price) {
    		
    		if(player.getInventory().get(slot) == null) {
    			return;
    		}
    		
    		int itemId = player.getInventory().get(slot).getId();
    		int itemAmount = player.getInventory().getAmount(itemId);
    		
    		if(itemId == id) {
    			
    			if(id == 995) {
    				player.sendMessage("You cannot store money in your shop.");
    				return;
    			}
    			
    			ItemDefinition definition = ItemDefinition.forId(itemId);
    			
    			if(Arrays.stream(GameSettings.UNSELLABLE_ITEMS).anyMatch(i -> i == itemId)) {
    				if(definition != null) {
    					player.sendMessage("You cannot sell "+definition.getName()+" in your shop.");
    				}
    				return;
    			}
    			
    			for(int i : GameSettings.UNTRADEABLE_ITEMS) {
    				if(i == id) {
    					player.sendMessage("You can't trade this item.");
    					return;
    				}
    			}
    			
    			/*if (Pet.get(id) != null) {
    				player.sendMessage("You cannot sell a pet item!");
    				return;
    			}
    			
    			if (player.getAchievements().isAchievementItem(id)) {
    				player.sendMessage("You cannot trade an achievement reward item!");
    				return;
    			}
    			
    			if (ClueDifficulty.isClue(id)) {
    				player.sendMessage("You cannot trade clue scrolls!");
    				return;
    			}*/
    			
    			if(amount >= itemAmount) {
    				amount = itemAmount;
    			}
    			
    			int currentAmount = myShop.getAmount(id);
    			
    			if(currentAmount == 0 && price == -1) {
    				
    				final int amount2 = amount;
    
    				player.setInputHandling(new Input() {
    					
    					@Override
    					public void handleAmount(Player player, int value) {
    						handleStore(slot, id, amount2, value);
    					}
    					
    				});
    				player.getPacketSender().sendEnterAmountPrompt("Enter the price for this item:");
    				
    				return;
    				
    			}
    			
    			if(myShop.size() >= 32) {
    				player.sendMessage("Your shop cannot contain any more items.");
    				return;
    			}
    			
    			if(currentAmount == Integer.MAX_VALUE) {
    				player.sendMessage("You cannot store any more of this item in your shop.");
    				return;
    			}
    			
    			long total = ((long) currentAmount + (long) amount);
    			
    			if(total > Integer.MAX_VALUE) {
    				amount = (int) (Integer.MAX_VALUE - currentAmount);
    			}
    			
    			if(price == -1) {
    				myShop.add(id, amount);
    			} else {
    				myShop.add(id, amount, price);
    			}
    			
    			if(amount != 0) {
    				if(amount == 1) {
    					player.getInventory().delete(id, amount, slot);
    				} else {
    					player.getInventory().delete(id, amount);
    				}
    			}
    			
    			refreshInventory();
    			
    		}
    		
    	}
    	
    	public void setCustomPrice(int slot, int id, int price) {
    		
    		if(current != myShop) {
    			return;
    		}
    		
    		Item item = current.getItem(slot);
    		
    		if(item == null) {
    			return;
    		}
    		
    		ItemDefinition definiton = item.getDefinition();
    		
    		if(price > 0 && price <= Integer.MAX_VALUE) {
    			item.setPrice(price);
    			String formatPrice = Misc.sendCashToString(price);
    			player.sendMessage("You have set <col=FF0000>"+definiton.getName().toLowerCase()+"</col> to cost <col=FF0000>"+formatPrice+"</col> coins in your shop.");
    			myShop.save();
    		}
    		
    	}
    	
    	public void hookShop() {
    		for(PlayerOwnedShop shop : SHOPS) {
    			if(shop == null) {
    				continue;
    			}
    			if(shop.getUsername().equalsIgnoreCase(player.getUsername())) {
    				myShop = shop;
    				shop.setOwner(player);
    				break;
    			}
    		}
    	}
    	
    	public void unhookShop() {
    		
    		if(myShop == null) {
    			hookShop();
    		}
    		
    		if(myShop != null) {
    			myShop.setOwner(null);
    		}
    		
    	}
    	
    	public void updateFilter(String string) {
    		
    		filtered.clear();
    		
    		player.getPacketSender().sendString(32610, string.length() == 0 ? "Player Owned Shops" : "Player Owned Shops - Searching: "+(setFilterString(string)));
    		boolean l = string.length() == 0;
    		int i = 0;
    		
    		for(PlayerOwnedShop shop : SHOPS) {
    			
    			if(shop != null && shop.size() > 0 && (l || shop.contains(string) || shop.getUsername().toLowerCase().contains(string.toLowerCase()))) {
    				player.getPacketSender().sendString(32623 + (i++), shop.ownerName());
    				filtered.add(shop);
    			}
    			
    		}
    		
    		for(; i < 100; i++){
    			player.getPacketSender().sendString(32623 + i, "");
    		}
    		
    	}
    	
    	private void statement(Player player, String... messages) {
    		
    		DialogueManager.start(player, new Dialogue() {
    
    			@Override
    			public DialogueType type() {
    				return DialogueType.STATEMENT;
    			}
    
    			@Override
    			public DialogueExpression animation() {
    				return null;
    			}
    
    			@Override
    			public String[] dialogue() {
    				return messages;
    			}
    			
    		});
    		
    	}
    	
    	public void claimEarnings() {
    		
    		if(earnings <= 0) {
    			statement(player, "You do not currently have any available earnings.");
    			return;
    		}
    		
    		int coins = player.getInventory().getAmount(995);
    		long available = earnings;
    		
    		if((long) (earnings + coins) > Integer.MAX_VALUE) {
    			available = (int) (Integer.MAX_VALUE - coins);
    		}
    		
    		if(available <= 0 || coins == 0 && player.getInventory().getFreeSlots() == 0) {
    			statement(player, "There is no available inventory space.");
    			return;
    		}
    		
    		earnings -= available;
    		
    		String formatPrice1 = Misc.sendCashToString(available);
    		String formatPrice2 = Misc.sendCashToString(earnings);
    		
    		player.getInventory().add(995, (int) available);
    		statement(player, "You have claimed "+formatPrice1+" coins. This leaves "+formatPrice2+" coins", "left to claim from your shop earnings depository.");
    		PlayerLogs.log(player.getUsername(), "Claiming POS Coins, Amount: "+formatPrice1+" Amount left: "+formatPrice2+" coins");
    	}
    	
    	public static void loadShops() {
    		
    		File[] files = DIRECTORY.listFiles();
    		
    		for(File file : files) {
    			
    			Path path = Paths.get(DIRECTORY + File.separator, file.getName());
    			PlayerOwnedShop shop = new PlayerOwnedShop();
    			
    			shop.setUsername(file.getName().replaceAll(".txt", ""));
    			
    			try (BufferedReader reader = Files.newBufferedReader(path, StandardCharsets.UTF_8)) {
    				
    				String line;
    				int offset = 0;
    				
    				while((line = reader.readLine()) != null) {
    					
    					String[] split = line.split(" - ");
    					
    					if(split.length == 3) {
    						
    						int id = Integer.parseInt(split[0]);
    						int amount = Integer.parseInt(split[1]);
    						int price = Integer.parseInt(split[2]);
    						
    						shop.getItems()[offset++] = new Item(id, amount, price);
    						
    					}
    					
    				}
    				
    			} catch (IOException e) {
    				e.printStackTrace();
    			}
    			
    			SHOPS.add(shop);
    			
    		}
    		
    	}
    	
    	public static void saveShops() {
    		for(PlayerOwnedShop shop : SHOPS) {
    			shop.save();
    		}
    	}
    	
    	public PlayerOwnedShop getCurrent() {
    		return current;
    	}
    
    	public void setCurrent(PlayerOwnedShop current) {
    		this.current = current;
    	}
    	
    	public PlayerOwnedShop getMyShop() {
    		return myShop;
    	}
    
    	public void setMyShop(PlayerOwnedShop myShop) {
    		this.myShop = myShop;
    	}
    
    	public List<PlayerOwnedShop> getFiltered() {
    		return filtered;
    	}
    
    	public void setFiltered(List<PlayerOwnedShop> filtered) {
    		this.filtered = filtered;
    	}
    
    	public String getFilterString() {
    		return filterString;
    	}
    
    	public String setFilterString(String filterString) {
    		this.filterString = filterString;
    		return filterString;
    	}
    
    	public long getEarnings() {
    		return earnings;
    	}
    
    	public void setEarnings(long earnings) {
    		this.earnings = earnings;
    	}
    	
    	public void addEarnings(int amount) {
    		earnings += amount;
    	}
    
    	
    }
    Player.java at the top:

    Ints etc:
    Code:
    private Shop shop;
    private boolean shopping;
    Code:
    private final PlayerOwnedShopManager playerOwnedShopManager = new PlayerOwnedShopManager(this);
    	
    	private boolean active;
    	
    	private boolean shopUpdated;
    	
    	private String email;
    	
    	public PlayerOwnedShopManager getPlayerOwnedShopManager() {
    		return playerOwnedShopManager;
    	}
    	public Player(PlayerSession playerIO) {
    		super(GameSettings.DEFAULT_POSITION.copy());
    		this.session = playerIO;
    	}
    Under SwitchMode Void:
    Code:
    	public boolean isShopping() {
    		return shopping;
    	}
    
    	public void setShopping(boolean shopping) {
    		this.shopping = shopping;
    	}
    
    	public Shop getShop() {
    		return shop;
    	}
    
    	public Player setShop(Shop shop) {
    		this.shop = shop;
    		return this;
    	}
    At the bottom under SetActive:
    Code:
    	public boolean isShopUpdated() {
    		return shopUpdated;
    	}
    
    	public void setShopUpdated(boolean shopUpdated) {
    		this.shopUpdated = shopUpdated;
    	}
    PlayerHandler.java:

    Directly under PlayerHandler Void:
    Code:
    player.getPlayerOwnedShopManager().hookShop();
    PlayerLoading.java:

    Code:
    if(reader.has("shop-updated")) {
    				player.setShopUpdated(reader.get("shop-updated").getAsBoolean());
    			}
    			
    			if(reader.has("shop-earnings")) {
    				player.getPlayerOwnedShopManager().setEarnings(reader.get("shop-earnings").getAsLong());
    			}
    PlayerSaving:

    Code:
    object.addProperty("shop-updated", new Boolean(player.isShopUpdated()));
    object.addProperty("shop-earnings", new Long(player.getPlayerOwnedShopManager().getEarnings()));
    Download and add this folder to your cache. "ok"

    [Only registered and activated users can see links. ]


    Quote Originally Posted by apachenick View Post
    I don't give a shit who released what. It's not yours nor Sohaib's, its mine. Add my author tag back.


    Pretty sure I got it all, going to double check in a bit on a bare ruse source.

    Enjoy.
    Reply With Quote  
     

  2. #2  
    Elkoy

    Join Date
    Oct 2010
    Posts
    2,736
    Thanks given
    1,137
    Thanks received
    1,396
    Rep Power
    5000
    Pretty sure this is Apache's system. Why isn't it using the abstract item container btw? Thanks though.
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    May 2016
    Age
    20
    Posts
    234
    Thanks given
    125
    Thanks received
    39
    Rep Power
    17
    Str8 outta runevision lol
    As far as I can remember there are quite the bugs that come with this.
    Need RSPS Website related services? Look no further.
    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  4. #4  
    Death Is Imminent.

    Murder's Avatar
    Join Date
    Nov 2013
    Posts
    666
    Thanks given
    44
    Thanks received
    54
    Rep Power
    153
    Quote Originally Posted by Brandito View Post
    Str8 outta runevision lol
    As far as I can remember there are quite the bugs that come with this.
    Yep Sohaib sold it to me and then released his whole server.

    As far as bugs I've had them for a few months and haven't experienced anything drastic?
    Reply With Quote  
     

  5. #5  
    uwu

    Teemo.'s Avatar
    Join Date
    Oct 2014
    Age
    14
    Posts
    338
    Thanks given
    18
    Thanks received
    73
    Rep Power
    85
    Pretty sad that people know this from all the shit ruse servers, dr aka divine-reality was the one's that had it first.
    B E G O N E T H O T
    Reply With Quote  
     

  6. #6  
    Registered Member

    Join Date
    Jan 2016
    Posts
    53
    Thanks given
    6
    Thanks received
    187
    Rep Power
    786
    Quote Originally Posted by Temperature View Post
    Yep Sohaib sold it to me and then released his whole server.

    As far as bugs I've had them for a few months and haven't experienced anything drastic?
    I don't give a shit who released what. It's not yours nor Sohaib's, its mine. Add my author tag back.
    Reply With Quote  
     

  7. Thankful users:


  8. #7  
    I'll be coming...

    Gryffin's Avatar
    Join Date
    May 2015
    Posts
    992
    Thanks given
    132
    Thanks received
    161
    Rep Power
    153
    Nice, sure someone will use.
    Reply With Quote  
     

  9. #8  
    omw 2 steal yo gurl


    Join Date
    Aug 2016
    Posts
    541
    Thanks given
    89
    Thanks received
    75
    Rep Power
    185
    Thanks for the contribution. I paid $60
    Reply With Quote  
     

  10. #9  
    Registered Member Versatile's Avatar
    Join Date
    Dec 2014
    Age
    21
    Posts
    429
    Thanks given
    238
    Thanks received
    9
    Rep Power
    9
    Quote Originally Posted by Temperature View Post
    Yep Sohaib sold it to me and then released his whole server.

    As far as bugs I've had them for a few months and haven't experienced anything drastic?
    I got this when opening my shop from an npc. Searching through stores is fine though.

    When I type ::interface 37000 it looks fine as well and no errors.

    Code:
    Error: T2 - 34,34,34 - 6,3087,3495 - -112,-117,0,45,120,1,
    Error: T2 - 34,34,34 - 6,3087,3495 - -112,-116,0,24,-82,1,
    Error: T2 - 34,34,34 - 6,3087,3495 - -112,-115,0,4,-12,1,
    Error: T2 - 34,34,34 - 6,3087,3495 - -112,-114,0,16,58,1,
    Error: T2 - 34,34,34 - 6,3087,3495 - -112,-113,0,5,70,1,
    Error: T2 - 34,34,34 - 6,3087,3495 - -112,-112,0,3,-16,1,
    Error: T2 - 34,34,34 - 6,3087,3495 - -112,-111,0,5,26,1,
    Error: T2 - 34,34,34 - 6,3087,3495 - -112,-110,0,22,67,1,
    Error: T2 - 34,34,34 - 6,3087,3495 - -112,-109,0,0,-55,1,
    Error: T2 - 34,34,34 - 6,3087,3495 - -112,-108,0,58,-19,1,
    Error: T2 - 34,34,34 - 6,3087,3495 - -112,-107,0,12,34,1,
    Error: T2 - 34,34,34 - 6,3087,3495 - -112,-106,0,0,0,0,
    Error: T2 - 34,34,34 - 6,3087,3495 - -112,-105,0,4,-126,1,
    Error: T2 - 34,34,34 - 6,3087,3495 - -112,-104,0,4,44,1,
    Error: T2 - 34,34,34 - 6,3087,3495 - -112,-103,0,4,92,1,
    Error: T2 - 34,34,34 - 6,3087,3495 - -112,-102,0,0,0,0,
    Error: T2 - 34,34,34 - 6,3087,3495 - -112,-101,0,0,0,0,
    Error: T2 - 34,34,34 - 6,3087,3495 - -112,-100,0,0,0,0,
    Error: T2 - 34,34,34 - 6,3087,3495 - -112,-99,0,0,0,0,
    Error: T2 - 34,34,34 - 6,3087,3495 - -112,-98,0,0,0,0,
    Error: T2 - 34,34,34 - 6,3087,3495 - -112,-97,0,16,56,1,
    Error: T2 - 34,34,34 - 6,3087,3495 - -112,-96,0,45,-81,1,
    Error: T2 - 34,34,34 - 6,3087,3495 - -112,-95,0,0,0,0,
    Error: T2 - 34,34,34 - 6,3087,3495 - -112,-94,0,0,0,0,
    Error: T2 - 34,34,34 - 6,3087,3495 - -112,-93,0,0,0,0,
    Error: T2 - 34,34,34 - 6,3087,3495 - -112,-92,0,0,0,0,
    Error: T2 - 34,34,34 - 6,3087,3495 - -112,-91,0,0,0,0,
    Error: T2 - 34,34,34 - 6,3087,3495 - -112,-90,0,0,0,0,
    Spoiler for Don't be a deadfool:
    Reply With Quote  
     

  11. #10  
    Registered Member
    Join Date
    Jan 2017
    Posts
    65
    Thanks given
    32
    Thanks received
    15
    Rep Power
    12
    make this for pi please

    Reply With Quote  
     

Page 1 of 3 123 LastLast

Thread Information
Users Browsing this Thread

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

Similar Threads

  1. Player Owned Shops [Ruse]
    By CapitalCoding in forum Snippets
    Replies: 10
    Last Post: 04-21-2018, 11:10 PM
  2. Replies: 60
    Last Post: 08-12-2017, 03:20 AM
  3. [Ruse] Player owned shops
    By ccccccccccw in forum Help
    Replies: 3
    Last Post: 11-16-2016, 04:26 PM
  4. Replies: 16
    Last Post: 04-27-2011, 05:07 PM
  5. [PI] PLayer Owned Shops [PI]
    By vader rd in forum Help
    Replies: 6
    Last Post: 12-18-2010, 01:05 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •