Jump to content

accerado

Member
  • Content count

    15
  • Joined

  • Last visited

  1. Hello there, I'm starting a new Project on [B]2 Septembe[/B]r with a high-budget campaign. I can't code everything myself and im not a expert. So that means i'm in search of a development team, i have a full list here to be done, i need a team that is expirienced with java coding and know what theyr doing/adding. Within that team i need 1 HTML/PHP/CSS expert. (for the web sided stuff, mySQL, autovote, autodonate, etc). My team so far: myself, a designer in search of a coder and websided stuff. I hope we can form a team tht respects people wishes and adding content as much as possible, how higher the playerbase and donations, the more you earn. So whats in for you? [LIST] [*]A montly payout depending on how you coded and how it worked out, and ofc playerbase. [*]Development status in the server aswell as forums. [*]I can only accept 2/3 coders or it goes over budget. [/LIST] The server goes in launch around mid/late September. I already got much costs on my head. It's a risk taking step because you don't know how much players are gona join or if it will lead into a failure or succes. but as i say "go big or go home" So far: $40 on forums, $20 on website, $20 VPS, $10 on webhosting, Development team to pay (cant promise much 1st month). All the plans are stipped out and payments are ready on 1st of september. So please, if you would like to join the team let me know on skype: armani-martinez and maybe i see you coding in the future of Valkyre 718 [ATTACH]10636[/ATTACH]
  2. Need this Bump
  3. bump. [COLOR="silver"]- - - Updated - - -[/COLOR] bump.
  4. [quote name='niklaslann']Check for the current Background the Cache is using, use the same filetype like .jpeg .png and the same resolution, go to the *.java file and change the File if it still doesent work [COLOR="silver"]- - - Updated - - -[/COLOR] Check for the current Background the Cache is using, use the same filetype like .jpeg .png and the same resolution, go to the *.java file and change the File if it still doesent work[/QUOTE] you cant check that, the background dimensions must be: 952, 503, be sure it doesnt reach high KB of the image, the image must be a .gif, jpeg, or a png file, after tht use the Runescape background utility u can find somewhere on the forums, cut it in 8 pieces and replace all the sprites, i cant remember the background id's, im sure you can find them. [COLOR="silver"]- - - Updated - - -[/COLOR] [quote name='niklaslann']Check for the current Background the Cache is using, use the same filetype like .jpeg .png and the same resolution, go to the *.java file and change the File if it still doesent work [COLOR="silver"]- - - Updated - - -[/COLOR] Check for the current Background the Cache is using, use the same filetype like .jpeg .png and the same resolution, go to the *.java file and change the File if it still doesent work[/QUOTE] you cant check that, the background dimensions must be: 952, 503, be sure it doesnt reach high KB of the image, the image must be a .gif, jpeg, or a png file, after tht use the Runescape background utility u can find somewhere on the forums, cut it in 8 pieces and replace all the sprites, i cant remember the background id's, im sure you can find them.
  5. perhaps try another cache [COLOR="silver"]- - - Updated - - -[/COLOR] perhaps try another cache
  6. 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]
  7. Can anyone help me out with a bit of coding, i cant figure out somethings. please add me on skype: armani-martinez thanks in advance
  8. i got a big problem in respawning in the source of Rune evo v3, if i kill a npc it respawns but when a player kills a npc it stops respawning, i tried everything in utils, unpackspawns, deleted packedspawns, i have no more clue, please help me my skype is: armani-martinez
  9. i have same problem i tried everything, and the wierd fact is when i kill it it respawns, when other ppl do, it doesn't
  10. Every time i change some files like example changing donor zone, i compile, start server. and i see that nothing changed, im using the rune evo v3 source. i changed the location in donatoractions, donator itself and at misc teleports. in al these files the location of donator places are located and ive changed them all, another example is changing the npc name to my rsps name, neither i dont see a change. my compiler doesnt give any error and my server neither. thanks in advance.
×