Jump to content

Search the Community

Showing results for tags 'partially'.



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 3 results

  1. [CODE]package org.elixrr.game.player.content.loyalty; import java.io.Serializable; import java.util.ArrayList; import java.util.HashMap; import java.util.Map.Entry; import org.elixrr.cache.loaders.ItemDefinitions; import org.elixrr.game.item.Item; import org.elixrr.game.player.Player; import org.elixrr.utils.Utils; /** * @author Taylor Moon * * @version Elixrr 2 | update 3 */ public class LoyaltyProgramme implements Serializable { /** * The list of loyalty items */ private static final HashMap<Integer, LoyaltyItem> ITEMS = new HashMap<Integer, LoyaltyItem>(); /** * An array of available loyalty shop categories */ public static final String[] CATEGORIES = { "auras", "emotes", "outfits", "titles", "special-offers", "limmited-edition", "recolor", "effects" }; /** * The serial UID */ private static final long serialVersionUID = -111881367666488484L; /** * The loyalty shop interface */ public static final int INTERFACE_ID = 1143; /** * The tab switch config */ public static final int TAB_CONFIG = 2226; /** * The current tab */ private int currentTab; /** * The player using the programme */ private Player player; /** * Initiates the loyalty programme */ public LoyaltyProgramme() { ITEMS.put(0, new LoyaltyItem(2000, 0, 20957, "auras")); ITEMS.put(1, new LoyaltyItem(2750, 1, 20958, "auras")); } /** * Resets the loyalty shop * * @param boughtItems * True if reset this * @param favoritedItems * True if reset this * @param pointsDisplay * True if reset this */ public void reset(boolean boughtItems, boolean favoritedItems, boolean pointsDisplay) { if (boughtItems) { for (int i = 2229; i == 2232; i++) player.getPackets().sendConfig(i, -1); } if (favoritedItems) { for (int i = 2391; i == 2394; i++) player.getPackets().sendConfig(i, -1); } if (pointsDisplay) { player.getPackets().sendIComponentText(INTERFACE_ID, 127, "" + Utils.formatTypicalInteger(player.getLoyaltyPoints())); } } /** * Opens the loyalty shop interface */ public void openShop() { player.getInterfaceManager().sendScreenInterface(INTERFACE_ID, INTERFACE_ID); player.getPackets().sendConfig(TAB_CONFIG, -1); currentTab = -1; player.getPackets().sendIComponentText(INTERFACE_ID, 127, "" + Utils.formatTypicalInteger(player.getLoyaltyPoints())); for (int i = 0; i < 500; i++) player.getPackets().sendIComponentSettings(INTERFACE_ID, i, 0, 300, 2150); } /** * Opens a tab on the loyalty interface * * @param tab * The tab to open */ public void openTab(String tab) { switch (tab.toLowerCase()) { case "home": player.getPackets().sendConfig(TAB_CONFIG, -1); currentTab = -1; break; case "auras": player.getPackets().sendConfig(TAB_CONFIG, 1); currentTab = 1; break; case "emotes": player.getPackets().sendConfig(TAB_CONFIG, 2); currentTab = 2; break; case "outfits": player.getPackets().sendConfig(TAB_CONFIG, 3); currentTab = 3; break; case "titles": player.getPackets().sendConfig(TAB_CONFIG, 4); currentTab = 4; break; case "recolor": player.getPackets().sendConfig(TAB_CONFIG, 5); currentTab = 5; break; case "special-offers": player.getPackets().sendConfig(TAB_CONFIG, 6); currentTab = 6; break; case "limmited-edition": player.getPackets().sendConfig(TAB_CONFIG, 7); currentTab = 7; break; case "favorites": player.getPackets().sendConfig(TAB_CONFIG, 8); currentTab = 8; break; case "effects": player.getPackets().sendConfig(TAB_CONFIG, 9); currentTab = 9; break; default: player.getPackets().sendGameMessage( "This tab is currently un-available" + (player.getRights() >= 2 ? ": " + "\"" + tab + "\"" : ".")); } } /** * Handles any button clicks * * @param componentId * The clicked component * @param slotId * The clicked slot * @param slotId2 * The clicked slot (2) * @param packetId * The packet ID */ public void handleButtons(int componentId, int slotId, int slotId2, int packetId) { switch (componentId) { case 103: player.getInterfaceManager().closeScreenInterface(); player.closeInterfaces(); player.getPackets().closeInterface(INTERFACE_ID); break; case 3: openTab("favorites"); break; case 1: openTab("home"); break; case 7: openTab("auras"); break; case 8: openTab("effects"); break; case 9: openTab("emotes"); break; case 10: openTab("outfits"); break; case 11: openTab("titles"); break; case 12: openTab("recolor"); break; case 13: openTab("special-offers"); break; case 66: case 67: case 68: case 69: case 70: case 71: openConfirmPurchaseInterface(slotId); break; case 59: resetOverlayBox(true); break; case 169:// Buy //buyItem(slotId, "auras"); openPurchaseResultsInterface("auras", slotId);// will use attributes. break; } } /** * Favorites an item * * @param value * The item to favorite */ public void favorite(int value) { player.getPackets().sendConfig(2391, value); } /** * Opens the comfirm purchase hidden component * * @param slotId * The slot id */ public void openConfirmPurchaseInterface(int slotId) { //final int itemId = ITEMS.get(slotId).id; final String price = Utils .formatTypicalInteger(ITEMS.get(slotId).price); String loyaltyPoints = Utils.formatTypicalInteger(player .getLoyaltyPoints()); player.getPackets().sendHideIComponent(INTERFACE_ID, 16, false); player.getPackets().sendHideIComponent(INTERFACE_ID, 56, false); player.getPackets().sendIComponentText(INTERFACE_ID, 45, "My Points: " + loyaltyPoints); player.getPackets().sendIComponentText(INTERFACE_ID, 47, "Item Cost: " + price); player.getPackets().sendIComponentText(INTERFACE_ID, 48, ""); // player.getPackets().sendItemOnIComponent(INTERFACE_ID, 48, itemId, // 1); // player.getPackets().sendItemOnIComponent(INTERFACE_ID, 49, itemId, // 1); } /** * Opens the "join loyalty programme" hidden component */ public void openJoinLoyaltyProgrammeInterface() { player.getPackets().sendHideIComponent(INTERFACE_ID, 16, false); player.getPackets().sendHideIComponent(INTERFACE_ID, 57, false); } /** * Opens the "Error occured while purchasing" hidden component */ public void openErrorOccuredInterface() { player.getPackets().sendHideIComponent(INTERFACE_ID, 16, false); player.getPackets().sendHideIComponent(INTERFACE_ID, 58, false); } /** * Opens the purchase result interface * * @param category * The item category * @param slot * The slot */ public void openPurchaseResultsInterface(String category, int slotId) { try { player.getPackets().sendHideIComponent(INTERFACE_ID, 16, false); player.getPackets().sendHideIComponent(INTERFACE_ID, 58, false); player.getPackets().sendIComponentText(INTERFACE_ID, 161, "Your purchase was successful!"); switch (category) { case "emotes": player.getPackets().sendIComponentText(INTERFACE_ID, 162, "Xuan teaches you the emote: (emoteNameHere)"); break; case "outfits": player.getPackets().sendIComponentText(INTERFACE_ID, 162, "Xuan hands you the costume you purchased."); break; case "auras": player.getPackets().sendIComponentText( INTERFACE_ID, 162, "You recieved the aura: " + ItemDefinitions.getItemDefinitions( ITEMS.get(slotId).id).getName()); break; case "titles": player.getPackets().sendIComponentText(INTERFACE_ID, 162, "You have unlocked the title: (titleNameHere)"); break; } player.getPackets().sendIComponentText(INTERFACE_ID, 162, "\n \n Click 'Ok' to return to the shop."); } catch (Exception e) { openErrorOccuredInterface(); } } /** * Resets the loyalty programme overlay component * * @param close * If the component should be closed */ public void resetOverlayBox(boolean close) { if (close) player.getPackets().sendHideIComponent(INTERFACE_ID, 16, true); player.getPackets().sendHideIComponent(INTERFACE_ID, 56, true); player.getPackets().sendHideIComponent(INTERFACE_ID, 57, true); player.getPackets().sendHideIComponent(INTERFACE_ID, 58, true); } /** * Claims an item * * @param value * The item to claim */ public void claim(int value, String category) { player.purchaseLoyaltyItem(value, category); updateInterfaceSettings(category);// 33 34 } /** * Buys a loyalty item * * @param slot * The slot being clicked on * @param category * The category for this item */ public void buyItem(int slot, String category) { for (Entry<Integer, LoyaltyItem> stock : ITEMS.entrySet()) { if (stock.getKey() != slot) continue; if (player.getLoyaltyPoints() < stock.getValue().price) { player.getPackets().sendGameMessage( "You cannot afford this loyalty item."); return; } if (category != "auras" && player.getPurchasedLoyaltyItems(category)[slot] || category == "auras" && player.getPurchasedLoyaltyAuras().contains(slot)) return; player.decreaseLoyaltyPoints(stock.getValue().price); claim(slot, category); switch (category) { case "titles": player.getAppearence().setTitle(slot); player.getAppearence().generateAppearenceData(); break; case "auras": if (!player.getInventory().addItem(stock.getValue().id, 1)) player.getBank().addItem(stock.getValue().id, 1, true); break; case "outfits": for (Item item : getOutfit(slot)) { if (!player.getInventory().addItem(item)) player.getBank().addItem(item.getId(), 1, true); } break; case "emotes": break; } } } /** * Returns an outfit corresponding to the slot id * * @param slot * The slot ID of the outfit * @return The outfit items for the slot ID */ private Item[] getOutfit(int slot) { return null; } /** * Updates the loyalty interface settings * * @param category * The category to update */ public void updateInterfaceSettings(String category) { int hash = 0; int power = 2; boolean[] items = null; if (category != "auras") items = new boolean[player.getPurchasedLoyaltyItems(category).length]; final ArrayList<Integer> auras = player.getPurchasedLoyaltyAuras(); if (category != "auras") { for (int i = 1; i < items.length; i++) { if (items[i]) { hash += power; } power *= 2; } if (items[0]) hash += 1; player.getPackets().sendConfig(2232, hash); } else { hash = 0; if (auras.contains(0)) hash += 1; player.getPackets().sendConfig(getBuyConfig(category), hash); player.getPackets().sendConfig(TAB_CONFIG, currentTab); } player.getPackets().sendIComponentText(INTERFACE_ID, 127, "" + Utils.formatTypicalInteger(player.getLoyaltyPoints())); player.getPackets().sendConfig(TAB_CONFIG, currentTab); } /** * Returns the buy config for a specific category * * @param category * The category to get the buy config for * @return The config ID */ public int getBuyConfig(String category) { return (category == "titles" ? 2232 : category == "emotes" ? 2230 : category == "outfits" ? 2231 : category == "auras" ? 2229 : -1); } /** * Sets the player * * @param player * The player to set */ public void setPlayer(Player player) { this.player = player; for (int i = 0; i < CATEGORIES.length; i++) { if (CATEGORIES[i] != "special-offers" && CATEGORIES[i] != "limmited-edition" && CATEGORIES[i] != "recolor" && CATEGORIES[i] != "effects") { updateInterfaceSettings(CATEGORIES[i]); } } } } [/CODE] [CODE]package org.elixrr.game.player.content.loyalty; /** * @author Taylor Moon * * @version Elixrr 2 | update 3 */ public class LoyaltyItem { /** The price */ public int price; /** Favorited or not */ public boolean favorited; /** Bought or not */ public boolean bought; /** Slot id */ public int slot; /** Regular ID */ public int id; /** Hash ID */ public int hash; /** Category */ public String category; /** * Constructs a new loyalty item * * @param price * The price * @param slot * The slot */ public LoyaltyItem(int price, int slot, int id, String category) { this.price = price; this.slot = slot; this.category = category; this.id = id; } } [/CODE] [B][COLOR="#FF0000"]Lacks:[/COLOR][/B] [LIST] [*]All the implemented items [*][I]Working[/I] buy config system [*]Needs buttons implemented (Methods are there, just not applied to the button handler) [*]Favoriting [/LIST]
  2. There are 18 classes renamed and 25 packets identified. If I find a new packet, I'll just post it in my packets thread and you can change the name. [url=http://www.mediafire.com/?m2t3e0z2f46zgyn]742 Loader - 1.zip[/url] If the client stops connecting, tell me and I'll get new params to allow the client to connect.
  3. I have server files, client files, and cache files. My client seems to download the zip folder, but only certain files appear in the cache folder. It only downloads the idx and dat files. It ignores all the folders and one idx and one date file. Is there a reason why? I zip the contents of the cache folder, not including the cache folder.
×