Jump to content

Search the Community

Showing results for tags 'grand'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • RuneLocus
    • News & Announcements
    • Information Booth
    • Website Support
    • Introductions
    • Chat
    • Forum Games
  • RuneScape Development
    • RSPS General
    • RuneScape Private Server (RS2)
    • RuneScape Private Server (503+)
    • RuneScape Private Server (EoC 742+)
  • Other
    • Digital Art
    • Gaming
    • Webdevelopment
    • Computers
  • Marketplace
    • RuneScape Market
    • RSPS Market
    • Others Market
    • Freelance Middleman Services
  • Super Secret Club's Topics

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Found 69 results

  1. Slabagel

    Grand exchange

    Hello, I am trying to add GE and it has went good until I tried it in game and after you search an item and click on the item you want it doesnt put it in the buy screen. It just stays the same like nothing happened. Anyone know why this would be happening or how to fix it? I am not getting any errors
  2. [CENTER][URL="http://rune-inception.com"][IMG]http://i.imgur.com/ESVsXoU.jpg[/IMG][/URL] [B][SIZE=5][COLOR="#00FFFF"]VIDEO COMING SOON![/COLOR][/SIZE][/B] [URL="http://rune-inception.com"][IMG]http://i.imgur.com/Jg9c13b.jpg[/IMG][/URL] [SIZE=4][COLOR="#00FF00"]Just released! Be one of the first to join and play the amazing RsPs Adventure![/COLOR] [/SIZE] [IMG]http://i.imgur.com/PhGbGay.png[/IMG] [URL="http://rune-inception.com"][IMG]http://i.imgur.com/FSPIxYx.jpg[/IMG][/URL] [SIZE=1]Credits ~ Matrix Team (Core framework, was used for the beginning of the server) ~ bobismyname (for the source base) ~ If im missing you, please let me know[/SIZE][/CENTER]
  3. wtfkid

    Grand Exchange help

    how to add Grand Exchange with 317 i use Insanity any help please ?
  4. how do i get grand exchange working on chronicscape all the grandexchange.java files are there but no grand exchange clerks or that ?
  5. jens19963

    Grand Exchange

    when i try to buy stuffs nothing happends [url]http://prntscr.com/5y31c4[/url] and when i try to sell stuffs i get error and the item i try to sell does not appear in this box [url]http://prntscr.com/5y31pc[/url] error [CODE]ERROR! THREAD NAME: New I/O server worker #1-1 java.lang.NullPointerException at com.rs.content.exchange.ExchangeHandler.sendSellItem(ExchangeHandler. java:567) at com.rs.net.decoders.handlers.ButtonHandler.handleButtons(ButtonHandle r.java:2391) at com.rs.net.decoders.WorldPacketsDecoder.processPackets(WorldPacketsDe coder.java:1292) at com.rs.net.decoders.WorldPacketsDecoder.decode(WorldPacketsDecoder.ja va:298) at com.rs.net.ServerChannelHandler.messageReceived(ServerChannelHandler. java:98) at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleCha nnelHandler.java:100) at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultCh annelPipeline.java:564) at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultCh annelPipeline.java:559) at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:27 4) at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:26 1) at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:351) at org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioW orker.java:282) at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:202) at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnabl e.java:108) at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProof Worker.java:44) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor. java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor .java:615) at java.lang.Thread.run(Thread.java:744)[/CODE] exchangehandler.java [CODE]package com.rs.content.exchange; import java.io.IOException; import com.rs.cache.loaders.ItemDefinitions; import com.rs.utils.FileUtilities; import com.rs.content.exchange.ItemOffer.OfferType; import com.rs.utils.EconomyPrices; import com.rs.game.item.Item; import com.rs.game.player.Player; import com.rs.game.player.content.ItemConstants; import com.rs.utils.ItemExamines; import com.rs.utils.Utils; public class ExchangeHandler { public static boolean handleButtons(final Player player, final int interfaceId, final int buttonId) { final ItemOffer offer; switch(interfaceId) { case 105: switch(buttonId) { /* * Selling Button Ids */ case 32: case 48: case 64: case 83: case 102: case 121: player.offerType = OfferType.SELL; player.setGESlot(getSlot(buttonId)); resetInterfaceConfigs(player); player.getPackets().sendConfig(1113, 1); player.getInterfaceManager().sendInventoryInterface(107); final Object[] params = new Object[]{ "", "", "", "", "Offer", -1, 0, 7, 4, 93, 7012370 }; player.getPackets().sendRunScript(149, params); player.getPackets().sendItems(93, player.getInventory().getItems()); player.getPackets().sendHideIComponent(107, 0, false); player.getPackets().sendIComponentSettings(107, 18, 0, 27, 1026); int slot2 = getSlot(buttonId); player.getPackets().sendConfig(1112, slot2); player.getPackets().sendHideIComponent(105, 196, true); return true; /* * Buying Button Ids */ case 31: case 47: case 63: case 82: case 101: case 120: player.getTemporaryAttributtes().put("grand_exchange_buying", true); resetInterfaceConfigs(player); searchScript(player); player.offerType = OfferType.BUY; player.setGESlot(getSlot(buttonId)); return true; case 190: searchScript(player); return true; case 186: offer = player.getGeOffers()[player.getGESlot()]; try { for (String lines : FileUtilities.readFile("./data/items/grand_exchange/unbuyables.txt")) { String[] data = lines.split(" "); Item item = new Item(offer.getId()); if (item.getDefinitions().getName().toLowerCase().contains(Utils.getCompleted(data, 0))) { player.getDialogueManager().startDialogue("SimpleMessage", "You can only buy or sell " + item.getDefinitions().getName() + "s with other players."); return true; } } } catch (IOException e) { e.printStackTrace(); } if (offer.getPrice() * offer.getAmount() > Integer.MAX_VALUE || offer.getPrice() * offer.getAmount() == Integer.MAX_VALUE || offer.getPrice() * offer.getAmount() >= Integer.MAX_VALUE || offer.getPrice() * offer.getAmount() < 0) { player.getPackets().sendGameMessage("The price of the item is too high!"); return true; } if (offer.getPrice() == 400000000 || offer.getPrice() >= 100000000 && offer.getAmount() == 0) { player.finish(); player.getPackets().sendGameMessage("What are you trying to do?"); player.forceLogout(); } if (offer.getPrice() == 0 || offer.getAmount() == 0 || offer.getPrice() * offer.getAmount() == 0) { player.getPackets().sendGameMessage("Invalid amount."); return true; } int coins = player.getInventory().getItems().getNumberOf(995); if (coins < offer.getAmount() * offer.getPrice() && offer.getType() == OfferType.BUY) { player.getPackets().sendGameMessage("You do not have enough coins to purchase this item."); return true; } if (offer.getType() == OfferType.SELL && offer.getAmount() > player.getInventory().getItems().getNumberOf(offer.getId())) { player.getPackets().sendGameMessage("You do not have enough of that item to sell."); return true; } if (offer.getType() == OfferType.BUY) { player.getInventory().deleteItem(new Item(995, offer.getPrice() * offer.getAmount())); if (player.getInventory().getFreeSlots() < offer.getAmount() && ItemDefinitions.getItemDefinitions(offer.getId()).getCertId() != -1) { offer.setId(ItemDefinitions.getItemDefinitions(offer.getId()).getCertId()); } player.getInventory().addItem(offer.getId(), offer.getAmount()); } else { player.getInventory().deleteItem(new Item(offer.getId(), offer.getAmount())); player.getInventory().addItem(new Item(995, offer.getPrice() * offer.getAmount())); } mainInterface(player); if (!GrandExchange.getOffers().contains(offer)) GrandExchange.getOffers().add(offer); player.getPackets().sendGameMessage("One or more of your Grand Exchange offers have been completed."); return true; case 128: resetInterfaceConfigs(player); if (player.offerType.equals(OfferType.SELL)) player.getInterfaceManager().sendInventory(); else player.getPackets().sendRunScript(573); return true; case 157: case 160: offer = player.getGeOffers()[player.getGESlot()]; offer.increase(); player.getPackets().sendConfig(1110, offer.getAmount()); return true; case 155: offer = player.getGeOffers()[player.getGESlot()]; offer.decrease(); player.getPackets().sendConfig(1110, offer.getAmount()); return true; case 162: offer = player.getGeOffers()[player.getGESlot()]; offer.increase(10); player.getPackets().sendConfig(1110, offer.getAmount()); return true; case 164: offer = player.getGeOffers()[player.getGESlot()]; offer.increase(100); player.getPackets().sendConfig(1110, offer.getAmount()); return true; //case 166: //offer = player.getGeOffers()[player.getGESlot()]; //if (offer.getType() == OfferType.BUY) { // offer.increase(1000); //} else { // offer.setAmount(player.getInventory().getItems().getNumberOf(offer.getId())); //} //player.getPackets().sendConfig(1110, offer.getAmount()); //break; case 168: offer = player.getGeOffers()[player.getGESlot()]; player.getPackets().sendRunScript(108, new Object[] { "How many would you like to buy?" }); player.getTemporaryAttributtes().put("grand_exchange_offer", offer); return true; case 181: case 175: case 177: case 179: case 169: case 171: player.getPackets().sendGameMessage("You need not to change the price; you recieve the item all the time."); return true; default: System.err.println("UNHANDLED GE BUTTON - " + buttonId); } return true; } return false; } /** * Show the Main InterfacePacket. * * [MENTION=75098]Para[/MENTION]m player * The Owner. */ public static void mainInterface(Player player) { player.getPackets().sendConfig(563, 4194304); player.getPackets().sendConfig(1112, -1); player.getPackets().sendConfig(1113, -1); player.getPackets().sendConfig(1109, -1); player.getPackets().sendConfig(1110, 0); player.getInterfaceManager().sendInterface(105); } /** * Resets the Configurations of the InterfacePacket. * * [MENTION=75098]Para[/MENTION]m player * The Owner. */ private static void resetInterfaceConfigs(Player player) { player.getPackets().sendConfig2(1109, -1); player.getPackets().sendConfig2(1110, 0); player.getPackets().sendConfig2(1111, 0); player.getPackets().sendConfig2(1112, -1); player.getPackets().sendConfig2(1113, 0); } /** * Show the Search InterfacePacket. * * [MENTION=75098]Para[/MENTION]m player * The Owner. */ private static void searchScript(Player player) { player.getPackets().sendConfig(1109, -1); player.getPackets().sendConfig(1112, 0); player.getPackets().sendConfig(1113, 0); player.getPackets().sendConfig1(1241, 16750848); player.getPackets().sendConfig1(1242, 15439903); player.getPackets().sendConfig1(741, -1); player.getPackets().sendConfig1(743, -1); player.getPackets().sendConfig1(744, 0); player.getPackets().sendInterface(true, 752, 7, 389); player.getPackets().sendRunScript(570, new Object[] { "Grand Exchange Item Search" }); // player.getIOSession().write(new ConfigPacket(player, 1109, -1)); // player.getIOSession().write(new ConfigPacket(player, 1112, 0)); // player.getIOSession().write(new ConfigPacket(player, 1113, 0)); // player.getIOSession().write(new CS2Config(player, 1241, 16750848)); // player.getIOSession().write(new CS2Config(player, 1242, 15439903)); // player.getIOSession().write(new CS2Config(player, 741, -1)); // player.getIOSession().write(new CS2Config(player, 743, -1)); // player.getIOSession().write(new CS2Config(player, 744, 0)); // player.getIOSession().write(new InterfacePacket(player, 752, 7, 389, false)); // player.getIOSession().write(new CS2Script(player, 570, "s", new Object[] { "Grand Exchange Item Search" })); } /** * Gets the Box Slot id by switching the buttons,<br> * </br> Also helps you to figure the box slot configuration value. * * [MENTION=75098]Para[/MENTION]m buttonId * [MENTION=184045]return[/MENTION] Slot id. */ private static int getSlot(int buttonId) { switch (buttonId) { case 31: case 32: case 19: return 0; case 47: case 35: case 48: return 1; case 63: case 51: case 64: return 2; case 82: case 83: case 70: return 3; case 101: case 102: case 89: return 4; case 120: case 108: case 121: return 5; default: return -1; } } public void sendBuyItem(Player player, int id) { String name = ItemDefinitions.getItemDefinitions(id).getName() .toLowerCase(); if (name.contains("partyhat")|| name.contains("disk of") || name.equalsIgnoreCase("pumpkin") || name.contains("santa hat") || name.contains("easter egg") || name.contains("h'ween")|| name.contains("christmas cracker") || id == 995) { player.getDialogueManager().startDialogue("SimpleMessage","That item is not tradeable."); return; } ItemDefinitions def = ItemDefinitions.getItemDefinitions(id); if (def == null) { return; } player.getInterfaceManager().closeInventoryInterface(); player.getPackets().sendConfig(1111, EconomyPrices.getPrice(id)); player.getPackets().sendConfig(1115, EconomyPrices.getPrice(id)); player.getPackets().sendConfig(1114, EconomyPrices.getPrice(id)); player.getPackets().sendConfig(1116, EconomyPrices.getPrice(id)); player.getPackets().sendConfig(1109, def.id); player.getPackets().sendConfig(1110, 1); player.getPackets().sendConfig(1111, EconomyPrices.getPrice(id)); player.getGeOffers()[player.getGESlot()] = new ItemOffer(player, id, ItemOffer.OfferType.BUY, player.getGESlot()); } public static void sendSellItem(Player player, int itemId, int slot, int componentId) { switch(componentId) { case 18: if (player.getInventory().containsItem(itemId, 1)) { if (!ItemConstants.isTradeable(new Item(itemId)) || itemId == 995 || ItemDefinitions.getItemDefinitions(itemId).getGEPrice() == 0) { player.getPackets().sendGameMessage("You cannot sell this item to the grand exchange."); return; } final ItemOffer offer = new ItemOffer(player, itemId, player.offerType, (Integer) player.getGESlot()); offer.setPrice((int) (offer.getPrice() * 0.75)); player.getGeOffers()[offer.getSlot()] = offer; offer.getOwner().getPackets().sendConfig(1109, offer.getId()); offer.getOwner().getPackets().sendConfig(1110, 1); offer.getOwner().getPackets().sendConfig( 1114, offer.getPrice()); offer.getOwner().getPackets().sendConfig( 1115, offer.getDefinitions().getValue() / 3); offer.getOwner().getPackets().sendConfig(1116, offer.getDefinitions().getValue() / 4); offer.getOwner().getPackets().sendConfig(1111, offer.getPrice()); offer.getOwner().getPackets().sendIComponentText(105, 143, ItemExamines.getExamine(new Item(itemId))); } return; } } }[/CODE]
  6. [video=youtube;7oFmRN0oadI]https://www.youtube.com/watch?v=7oFmRN0oadI[/video] I think this will make GTA V a bit more unique.
  7. i open grand exchange and press sell item icon but when i try to sell anything nothing happends how can i fix this?
  8. [B]No one needed this so I removed it :) [/B][quote name='_Jordan']I'm not one to usually be very mean, but this is very very horrible code.[/QUOTE] [quote name='Hope']If you're going to release something (especially for new learners), you should do it the right way. This is one of the reasons the RSPS community has terrible programmers.[/QUOTE]
  9. This project is abandoned So yeah... I suppose this is to keep me busy while I wait on my laptop. A 'small' project. A legitimate economy. Framework: Independent because the Grand Exchange is in no way depending on RSPS code. Communication between Grand Exchange and the world(s) in question happens via a defined protocol socket Customizable behavior for the economy Integrated database (Apache Derby) Possibly JSON for website-related integration (I don't know about this yet, it'll be big enough as is) Side-note: Please inform me if using Derby is a good idea. Maybe [MENTION=1045]Emily[/MENTION] can tell me :)? Maybe you do not see the point of this, so here's a scenario. >> Consider an RSPS called economyscape; they have 10 worlds running on different servers and ofcourse have a global grand exchange. Now, you could run a central MySQL database and then seperate instances of Grand Exchanges in each local server OR you could make a central Grand Exchange that processes all transactions and maintains the economy for all these worlds simply with a few methods that communicate with the GE server with a custom defined protocol. << Ofcourse the GE server needs to be secure against false transactions (not issued by the world in question) but I am not going to focus on that for now. I have some things in mind but I first want to make sure I can actually make this. If someone feels like they can help with MySQL queries, feel free as I'm not a particular MySQL guru. I'm not considering this a serious project, it's more like a thing to do when I'm bored so don't be mad if I don't finish this. Anyways, I will post updates soon :} Changelog: (date = dd/mm) 24/08 - created database model (see reference #1) 23/08 - started project [/CODE]
  10. Having a problem when trying to open the grand exchange. I have tried adding it many times, but always end up with the same error when trying to open it. Error: Code: [code]ERROR! THREAD NAME: New I/O worker #1 java.lang.NullPointerException at com.rs.game.player.GrandExchangeManager.openGrandExchange(GrandExchangeManager.java:70) at com.rs.game.player.content.Commands.processAdminCommand(Commands.java:142) at com.rs.game.player.content.Commands.processCommand(Commands.java:76) at com.rs.net.decoders.WorldPacketsDecoder.processPackets(WorldPacketsDecoder.java:1505) at com.rs.net.decoders.WorldPacketsDecoder.decode(WorldPacketsDecoder.java:268) at com.rs.net.ServerChannelHandler.messageReceived(ServerChannelHandler.java:98) at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:95) at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:563) at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:558) at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268) at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255) at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:91) at org.jboss.netty.channel.socket.nio.AbstractNioWorker.processSelectedKeys(AbstractNioWorker.java:373) at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:247) at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:35) at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:102) at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)[/code] The opening method: Code: [code] public void openGrandExchange() { player.getInterfaceManager().sendInterface(105); player.getPackets().sendUnlockIComponentOptionSlots(105, 206, -1, 0, 0, 1); player.getPackets().sendUnlockIComponentOptionSlots(105, 208, -1, 0, 0, 1); cancelOffer(); player.setCloseInterfacesEvent(new Runnable() { @Override public void run() { if (getType() == 0) player.getPackets().sendRunScript(571); player.getInterfaceManager().removeInterface(752, 7); } }); }[/code] Need help asap.
  11. Wobblum

    Grand Exchange

    How do I add an item to the search list on the grand exchange? For example, when going to buy a Korasi at the GE it does not appear on the list of items when you search it. But it is defined both server and client sided. A reply is appreciated! You can also add me on Skype: whiteboy.kobe
  12. I need help with my GrandExchange, im using Eriwien 2 source, Whenever i want to buy a item, it doesnt load but.. when i sell a item thatt is the same as the buy item. I get the item aswell as the money from sell item. so its a economic system i guess, how can i delete tht so everyone can buy anything whenever they want? thx in advance. another little prob is character saving, i got both character and characterbackup folders, but il look later into tht.. want this prob solved ;/ [ATTACH]10357[/ATTACH] GE Files: [B]OFFER.JAVA[/B] [CODE]package com.ew.game.player.content.grandExchange; import com.ew.cache.loaders.ClientScriptMap; import com.ew.cache.loaders.ItemDefinitions; import com.ew.game.item.Item; import com.ew.game.item.ItemsContainer; import com.ew.game.player.Player; import com.ew.utils.EconomyPrices; import com.ew.utils.Utils; public class Offer extends Item { private static final long serialVersionUID = -4065899425889989474L; public static final String SELL = null; public Offer(int id, int ammount, int price, boolean buy) { super(id, ammount); this.price = price; buying = buy; receivedItems = new ItemsContainer<Item>(2, true); } private transient Player owner; private transient int slot; private int price; // price per item selling or buying private int totalPriceSoFar; // total profit received so far or spent private int totalAmmountSoFar; // amt of items sold or bought private ItemsContainer<Item> receivedItems; private boolean canceled; private boolean buying; [MENTION=19271]supp[/MENTION]ressWarnings("unused") private long data; public void link(int slot, Player owner) { this.slot = slot; this.owner = owner; this.data = Utils.currentTimeMillis(); } public void unlink() { owner = null; } public void update() { if (owner == null) return; owner.getPackets().sendGrandExchangeOffer(this); sendItems(); } public void sendItems() { if (owner == null) return; owner.getPackets().sendItems(ClientScriptMap.getMap(1079).getIntValue(slot), receivedItems); } public int getPrice() { return price; } public boolean forceRemove() { return isCompleted() && !hasItemsWaiting(); } protected boolean isCompleted() { return canceled || totalAmmountSoFar >= getAmount(); } public int getPercentage() { return totalAmmountSoFar * getAmount() / 100; } public int getTotalAmmountSoFar() { return totalAmmountSoFar; } public int getTotalPriceSoFar() { return totalPriceSoFar; } public int getSlot() { return slot; } public int getStage() { if (forceRemove()) return 0; if (isCompleted()) return buying ? 5 : 13; return buying ? 2 : 10; } public boolean isBuying() { return buying; } // TODO canceling message public boolean cancel() { if (isCompleted()) return false; canceled = true; if (buying) receivedItems.add(new Item(995, (getAmount() - totalAmmountSoFar) * price)); else receivedItems.add(new Item(getId(), getAmount() - totalAmmountSoFar)); update(); return true; } public void sendUpdateWarning() { if (owner == null) return; owner.getPackets().sendGameMessage("One or more of your Grand Exchange offers have been updated."); owner.getPackets().sendMusicEffect(284); update(); } public boolean isOfferTooHigh(Offer fromOffer) { int left = getAmount() - totalAmmountSoFar; int leftFrom = fromOffer.getAmount() - fromOffer.totalAmmountSoFar; int exchangeAmt = left > leftFrom ? leftFrom : left; int totalPrice = exchangeAmt * fromOffer.price; int amtCoins = receivedItems.getNumberOf(995); if (buying) { if (fromOffer.receivedItems.getNumberOf(995) + totalPrice <= 0) return true; int leftcoins = exchangeAmt * price - totalPrice; if (leftcoins > 0 && amtCoins + leftcoins <= 0) return true; } else { if (amtCoins + totalPrice <= 0) return true; } return false; } private int[] items = { 14484, 1048 }; public void updateOffer(Offer fromOffer) { int left = getAmount() - totalAmmountSoFar; int leftFrom = fromOffer.getAmount() - fromOffer.totalAmmountSoFar; int exchangeAmt = left > leftFrom ? leftFrom : left; int totalPrice = exchangeAmt * fromOffer.price; if (buying) { int leftcoins = exchangeAmt * price - totalPrice; if (leftcoins > 0) { receivedItems.add(new Item(995, leftcoins)); } for (int i : items) { if (totalPrice < EconomyPrices.getPrice(i)) { owner.getPackets().sendGameMessage("You can't buy default set items for lower than their origional value!"); return; } receivedItems.add(buying ? new Item(getId(), exchangeAmt) : new Item(getId(), exchangeAmt)); } receivedItems.add(buying ? new Item(getId(), exchangeAmt) : new Item(getId(), exchangeAmt)); fromOffer.receivedItems.add(new Item(995, totalPrice)); } else { fromOffer.receivedItems.add(new Item(getId(), exchangeAmt)); receivedItems.add(new Item(995, totalPrice)); } totalAmmountSoFar += exchangeAmt; fromOffer.totalAmmountSoFar += exchangeAmt; totalPriceSoFar += totalPrice; fromOffer.totalPriceSoFar += totalPrice; fromOffer.sendUpdateWarning(); } public boolean collectItems(int slot, int option) { if (owner == null) return false; int freeSlots = owner.getInventory().getFreeSlots(); if (freeSlots == 0) { owner.getPackets().sendGameMessage("Not enough space in your inventory."); return false; } Item item = receivedItems.get(slot); if (item == null) return false; ItemDefinitions defs = item.getDefinitions(); if (!defs.isStackable() && option == (item.getAmount() == 1 ? 0 : 1)) { Item add = new Item(item.getId(), item.getAmount() > freeSlots ? freeSlots : item.getAmount()); owner.getInventory().addItemMoneyPouch(add); receivedItems.remove(add); } else { owner.getInventory().addItemMoneyPouch(new Item(defs.certId != -1 ? defs.certId : item.getId(), item.getAmount())); receivedItems.remove(item); } update(); return true; } public boolean hasItemsWaiting() { return receivedItems.getFreeSlots() != 2; } public Object getType() { // TODO Auto-generated method stub return null; } public void increase(int i) { // TODO Auto-generated method stub } } [/CODE] [B]GRANDEXCHANGE.JAVA [/B] [CODE]package com.ew.game.player.content.grandExchange; import java.math.BigInteger; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import com.ew.cache.loaders.ItemDefinitions; import com.ew.game.player.Player; import com.ew.utils.EconomyPrices; import com.ew.utils.SerializableFilesManager; import com.ew.utils.Utils; public class GrandExchange { private static final Object LOCK = new Object(); // offer uid private static HashMap<Long, Offer> OFFERS; private static ArrayList<OfferHistory> OFFERS_TRACK; private static HashMap<Integer, Integer> PRICES; private static boolean edited; public static void init() { OFFERS = SerializableFilesManager.loadGEOffers(); OFFERS_TRACK = SerializableFilesManager.loadGEHistory(); PRICES = SerializableFilesManager.loadGEPrices(); } public static void reset(boolean track, boolean price) { if(track) OFFERS_TRACK.clear(); if(price) PRICES.clear(); recalcPrices(); } public static void recalcPrices() { ArrayList<OfferHistory> track = new ArrayList<OfferHistory>(OFFERS_TRACK); HashMap<Integer, BigInteger> averagePrice = new HashMap<Integer, BigInteger>(); HashMap<Integer, BigInteger> averageQuantity = new HashMap<Integer, BigInteger>(); for (OfferHistory o : track) { BigInteger price = averagePrice.get(o.getId()); if (price != null) { BigInteger quantity = averageQuantity.get(o.getId()); averagePrice.put(o.getId(), price.add(BigInteger.valueOf(o.getPrice()))); averageQuantity.put(o.getId(), quantity.add(BigInteger.valueOf(o.getQuantity()))); } else { averagePrice.put(o.getId(), BigInteger.valueOf(o.getPrice())); averageQuantity.put(o.getId(), BigInteger.valueOf(o.getQuantity())); } } for (int id : averagePrice.keySet()) { BigInteger price = averagePrice.get(id); BigInteger quantity = averageQuantity.get(id); long oldPrice = getPrice(id); long newPrice = price.divide(quantity).longValue(); long min = (long) ((double) oldPrice * 0.8D) - 100; long max = (long) ((double) oldPrice * 1.2D) + 100; if (newPrice < min) newPrice = min; else if (newPrice > max) newPrice = max; if (newPrice < 1) newPrice = 1; else if (newPrice > Integer.MAX_VALUE) newPrice = Integer.MAX_VALUE; PRICES.put(id, (int) newPrice); } savePrices(); } private static void savePrices() { SerializableFilesManager.saveGEPrices(PRICES); } public static final void save() { if (!edited) return; SerializableFilesManager.saveGEOffers(OFFERS); SerializableFilesManager.saveGEHistory(OFFERS_TRACK); edited = false; } public static void linkOffers(Player player) { boolean itemsWaiting = false; for (int slot = 0; slot < player.getGEManager().getOfferUIds().length; slot++) { Offer offer = getOffer(player, slot); if (offer == null) continue; offer.link(slot, player); offer.update(); if (!itemsWaiting && offer.hasItemsWaiting()) { itemsWaiting = true; player.getPackets().sendGameMessage("You have items from the Grand Exchange waiting in your collection box."); } } } public static Offer getOffer(Player player, int slot) { synchronized (LOCK) { long uid = player.getGEManager().getOfferUIds()[slot]; if (uid == 0) return null; Offer offer = OFFERS.get(uid); if (offer == null) { player.getGEManager().getOfferUIds()[slot] = 0; // offer // disapeared // within time return null; } return offer; } } public static void sendOffer(Player player, int slot, int itemId, int amount, int price, boolean buy) { synchronized (LOCK) { Offer offer = new Offer(itemId, amount, price, buy); player.getGEManager().getOfferUIds()[slot] = createOffer(offer); offer.link(slot, player); findBuyerSeller(offer); } } public static void abortOffer(Player player, int slot) { synchronized (LOCK) { Offer offer = getOffer(player, slot); if (offer == null) return; edited = true; if (offer.cancel() && offer.forceRemove()) deleteOffer(player, slot); // shouldnt here happen anyway } } public static void collectItems(Player player, int slot, int invSlot, int option) { synchronized (LOCK) { Offer offer = getOffer(player, slot); if (offer == null) return; edited = true; if (offer.collectItems(invSlot, option) && offer.forceRemove()) { deleteOffer(player, slot); // should happen after none left and // offer completed if (offer.getTotalAmmountSoFar() != 0) { OfferHistory o = new OfferHistory(offer.getId(), offer.getTotalAmmountSoFar(), offer.getTotalPriceSoFar(), offer.isBuying()); OFFERS_TRACK.add(o); player.getGEManager().addOfferHistory(o); } } } } private static void deleteOffer(Player player, int slot) { player.getGEManager().cancelOffer(); // sends back to original screen if // seeing an offer OFFERS.remove(player.getGEManager().getOfferUIds()[slot]); player.getGEManager().getOfferUIds()[slot] = 0; } private static void findBuyerSeller(Offer offer) { while (!offer.isCompleted()) { Offer bestOffer = null; for (Offer o : OFFERS.values()) { if (o.isBuying() == offer.isBuying() || o.getId() != offer.getId() || o.isCompleted() || (offer.isBuying() && o.getPrice() > offer.getPrice()) || (!offer.isBuying() && o.getPrice() < offer.getPrice()) || offer.isOfferTooHigh(o)) continue; if (bestOffer == null || (offer.isBuying() && o.getPrice() < bestOffer.getPrice()) || (!offer.isBuying() && o.getPrice() > bestOffer.getPrice())) bestOffer = o; } if (bestOffer == null) break; offer.updateOffer(bestOffer); } offer.update(); } private static long createOffer(Offer offer) { edited = true; long uid = getUId(); OFFERS.put(uid, offer); return uid; } private static long getUId() { while (true) { long uid = Utils.RANDOM.nextLong(); if (OFFERS.containsKey(uid)) continue; return uid; } } public static int getPrice(int itemId) { ItemDefinitions defs = ItemDefinitions.getItemDefinitions(itemId); if (defs.isNoted()) itemId = defs.getCertId(); else if (defs.isLended()) itemId = defs.getLendId(); Integer price = PRICES.get(itemId); return price != null && price != 0 ? price : EconomyPrices.getPrice(itemId); } // in order not to keep player saved on memory in offers after player leaves // <.< public static void unlinkOffers(Player player) { for (int slot = 0; slot < player.getGEManager().getOfferUIds().length; slot++) { Offer offer = getOffer(player, slot); if (offer == null) continue; offer.unlink(); } } public static List<OfferHistory> getHistory() { return OFFERS_TRACK; } public static void load() { // TODO Auto-generated method stub } } [/CODE] [B] HISTORY.JAVA [/B] [CODE]package com.ew.game.player.content.grandExchange; import java.io.Serializable; public class OfferHistory implements Serializable { private static final long serialVersionUID = 7322642705393018764L; private int id, quantity, price; private boolean bought; public OfferHistory(int id, int quantity, int price, boolean bought) { this.id = id; this.quantity = quantity; this.price = price; this.bought = bought; } public int getId() { return id; } public int getQuantity() { return quantity; } public int getPrice() { return price; } public boolean isBought() { return bought; } } [/CODE]
  13. Hello When i try to add my grandexchange then i compile and all is running good but when i login into game and Trying to selling Something On grand exchange then i click Confrim and is not works.. Thats what i see On my run Server.cmd after i click Confrim Pastebin link [url]http://pastebin.com/rzq6pLrV[/url] Selling Option Is work! Only the Buying one dosent work And here is the line 414 [url]http://pastebin.com/dVzSbgVW[/url]
  14. [B]Hello guys i am having a problem, i have Grand exchange into my server and when you buy an item you have to wait for someone to sell it for it to work. Here is what my selling says. [IMG]http://i.imgur.com/y4wQswg.png[/IMG] I have tried a lot of items in game and i just ran out of idea. I really need help thanks. I have another problem to, when you logout or restart the server the item you bought is gone in Grand Exchange and it takes the cash. Anyone have an answer for that? Thank you guys sooo much! Thanks, cya :D[/B]
  15. Selling 100% grand exchange, Contact me via skype: "zachpowney" Sincerely, Zach
  16. The dupe is when we press 100+ or 1000+ and accept it dupe.. Video: [url]http://www.youtube.com/watch?v=bukBFYbm6gc[/url] Tell me if you want my skype to help me !
  17. [video=youtube;5h8fQtVrRvo]http://www.youtube.com/watch?v=5h8fQtVrRvo&feature=youtu.be[/video] Let me know what you think, I don;t know of any servers with something like this.. Oh and for those of you that want to know how the prices work, it is through MySQL PHP Admin [IMG]http://gyazo.com/4c23fd4cfb73b677369f80322cd192f6.png[/IMG] Thanks :)
  18. fix it, some things in a method where in the wrong order
  19. I need 1 big help with this. When you go to sell something it equips the item and closes all of the screens. Look at my video Problem. [url]http://tinypic.com/player.php?v=1zwkco8&s=5[/url] [CODE] public void sellItems() { int x = selectedAmount; int y = firstItemStacked(selectedItemId); int z = secondItemStacked(selectedItemId); long l = firstItemStacked; long g = secondItemStacked; long o = l+g; if(removeGrandExchangeItems(x, y, z, firstItemStacked, secondItemStacked, o)) { final int s = selectedSlot; int b = selectedSlot; int i = newOffer("Sell", selectedItemId, selectedAmount, selectedAmount, selectedPrice, 0, c.playerName, false, b); c.getItems().deleteItem2(selectedItemId, selectedAmount); if(i == -1) { c.getItems().addItem(selectedItemId, selectedAmount); c.sendMessage("To many offers, please try again later."); return; } openGrandExchange(true); c.sendConfig(4, b, 1, -1); c.sendConfig(5, b, 1, -1); int k = b*2; k += 24565; c.getPA().sendFrame34(selectedItemId, 0, k, selectedAmount); sellItems(i, c.playerName); CycleEventHandler.getInstance().addEvent(c, new CycleEvent() { public void execute(CycleEventContainer container) { container.stop(); } @Override public void stop() { c.sendConfig(5, s, 3, -1); } }, 2); PlayerSave.saveGame(c); } }[/CODE]
  20. Never really showed this off since most people don't have player-player grand exchange. [IMG]http://i.imgur.com/zOAjLyn.png[/IMG] [IMG]http://i.imgur.com/hzVxmDu.png[/IMG] [IMG]http://i.imgur.com/PuCsfEY.png[/IMG] [IMG]http://i.imgur.com/1jV9wKQ.png[/IMG] [IMG]http://i.imgur.com/CRRBZtH.png[/IMG] [LIST] [*]Rune Knives are auto-buy items so they are not sold to the players. [*]Armadyl godswords aren't auto-buy items, so they are sold player-player. [/LIST] [IMG]http://i.imgur.com/UQ9nSCr.png[/IMG] [IMG]http://i.imgur.com/Pflbews.png[/IMG] [IMG]http://i.imgur.com/gig2WGS.png[/IMG] [IMG]http://i.imgur.com/fzBbpsc.png[/IMG] [IMG]http://i.imgur.com/7GvLtbK.png[/IMG] [IMG]http://i.imgur.com/xuR91q5.png[/IMG]
  21. hello I would like the grand exchange clerk talk make so as, for example, banker who says good day how may i help you then you have the options acess my banking account please and then he opens the bank what I want is at the grand exchange clerk good day how may i help you than options open my grand exchange collect my grand exchange I've been but just how can I get to Grandex interface grand ex to open you open grand exchange click he actually goes to Grandex screen sorry for my bad english I love to hear how it should
  22. Followed this tutorial: [url]http://www.runelocus.com/forums/showthread.php?91194-Grand-Exchange-Release-PI[/url] Error: src\com\exile\game\players\Player.java:912: error: cannot find symbol GE().sendUpdate(playerName); ^ symbol: method sendUpdate(String) location: class GrandExchange src\com\exile\GameEngine.java:74: error: constructor GrandExchange in class Gran dExchange cannot be applied to given types; public static GrandExchange GE = new GrandExchange(); ^ required: Player found: no arguments reason: actual and formal argument lists differ in length src\com\exile\GameEngine.java:158: error: cannot find symbol GE.loadSellers(); ^ symbol: method loadSellers() location: variable GE of type GrandExchange src\com\exile\GameEngine.java:159: error: cannot find symbol GE.loadBuyers(); ^ symbol: method loadBuyers() location: variable GE of type GrandExchange src\com\exile\game\players\packets\ClickingButtons.java:237: error: cannot find symbol p.GE().buttonClick(buttonId); ^ symbol: method buttonClick(int) location: class GrandExchange src\com\exile\game\players\commands\NormalPlayer.java:74: error: cannot find sym bol c.GE().updateGE(c.GE().selectedItemId, c.GE().se lectedPrice); ^ symbol: method updateGE(int,int) location: class GrandExchange src\com\exile\game\players\commands\NormalPlayer.java:86: error: cannot find sym bol c.GE().updateGE(c.GE().selectedItemId, c .GE().selectedPrice); ^ symbol: method updateGE(int,int) location: class GrandExchange src\com\exile\game\players\commands\NormalPlayer.java:100: error: cannot find sy mbol c.GE().updateGE(c.GE().selectedItemId, c .GE().selectedPrice); ^ symbol: method updateGE(int,int) location: class GrandExchange src\com\exile\game\players\commands\NormalPlayer.java:104: error: cannot find sy mbol c.GE().collectItem(1, "Sell"); ^ symbol: method collectItem(int,String) location: class GrandExchange src\com\exile\game\players\commands\NormalPlayer.java:107: error: cannot find sy mbol c.GE().collectItem(2, "Sell"); ^ symbol: method collectItem(int,String) location: class GrandExchange src\com\exile\game\players\commands\NormalPlayer.java:110: error: cannot find sy mbol c.GE().collectItem(1, "Buy"); ^ symbol: method collectItem(int,String) location: class GrandExchange src\com\exile\game\players\commands\NormalPlayer.java:113: error: cannot find sy mbol c.GE().collectItem(2, "Buy"); ^ symbol: method collectItem(int,String) location: class GrandExchange Note: src\com\exile\EconomyReset.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: src\com\exile\mananger\Manager.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 12 errors Press any key to continue . . .
  23. On RuneScape's download page they are dumping all there GE images. Enjoy here: [url]http://www.runescape.com/downloads.ws[/url]
  24. One lovely American got his hands on GTA and has been uploading small instagram and vines of the game and it looks great. [url]http://imjustchucky.com/gta.html[/url] (Free roam) [url]http://instagib.tv/oliverx22[/url] (Free roam) [url]http://www.racefansonlytv.com/[/url] - (Free roam) [url]http://instagib.tv/anthony2459[/url] (Free roam) [url]http://www.hashd.tv/johngaming2[/url] (Free roam) [url]http://www.youtube.com/watch?v=tZU3OClTU-s[/url] (Free roam) [url]http://www.youtube.com/watch?v=PzKQauJ5F-8[/url] (Missions) [url]http://www.ustream.tv/channel/hollymolly-s-stream[/url] (Missions) [url]http://www.dailymotion.com/video/x13h1d3_eclypsia-webtv-2370_videogames[/url] (Missions) [url]http://goodgame.ru/channel/BreadPit/[/url] (Missions) We've been discussing it on neogaf and one of the members in the thread just went and purchased a copy of the game so HD footage will be coming in a hour or so! [img]http://i.minus.com/iqwDWEQ3ff6YJ.gif[/img] [video=youtube;kof3q-_wc_I]http://www.youtube.com/watch?v=kof3q-_wc_I[/video]
  25. newboy

    Grand Exchange Dupe

    Easiest fix is to not have a Grand Exchange.
×