Jump to content

dustey

Member
  • Content count

    53
  • Joined

  • Last visited

  1. For some reason I don't think you've been coding for 4 years, try c.addItem(getItem.randomPrize(), 1);
  2. If I'm wrong correct me but isn't InsidiaX a PI source? Almost all 317 clients that PI uses have JFrame.java. Remember this is client sided.
  3. Changing the name would be in JFrame.java search Insidiax then change the name To change the background [url]http://www.runelocus.com/forums/showthread.php?21340-TUT-PI-Changing-The-client-Background-picture-PI-TUT[/url] As for the bar that pops up I'm guessing search the text in client.java and it should be calling on something in RSInterface and delete them both
  4. Try this if your client doesn't already have this added [url]http://www.****************/runescape-development/rs2-client/snippets/506230-adding-models-clean-317-deob.html[/url] Hope I helped Just realized runelocus stars out the other site search Adding Models to a Clean - 317 Deob on google
  5. I cache packed 667 animations and 633 items and now whenever I sign into the server it looks like this [URL="http://gyazo.com/71b1af068575173457724b85d529b799"]http://gyazo.com/71b1af068575173457724b85d529b799[/URL] It doesn't throw an error in the CMD so I don't know where to begin.
  6. This is what I get when I use Galkon`s index repacking method, can anyone tell me what I did wrong the models will not pack. :S [CODE]Unable to locate index 8698. Unable to locate index 8699. Unable to locate index 8700. Unable to locate index 8701. Unable to locate index 8702. Unable to locate index 8703. Unable to locate index 8704. Unable to locate index 8705. Unable to locate index 8706. Unable to locate index 8707. Unable to locate index 8708. Unable to locate index 8709. Unable to locate index 8710. Unable to locate index 8711. Unable to locate index 8726. Unable to locate index 8727. Unable to locate index 8728. Unable to locate index 8729. Unable to locate index 8730. Unable to locate index 8731. Unable to locate index 8732. Unable to locate index 8733. Unable to locate index 8734. Unable to locate index 8735. Unable to locate index 8736. Unable to locate index 8737. Unable to locate index 8738. Unable to locate index 8739. Unable to locate index 8747. Unable to locate index 8748. Unable to locate index 8749. Unable to locate index 8750. Unable to locate index 8751. Unable to locate index 8752. Unable to locate index 8753. Unable to locate index 8754. Unable to locate index 8755. Unable to locate index 8756. Unable to locate index 8757. Unable to locate index 8758. Unable to locate index 8759. Unable to locate index 8760. Unable to locate index 8775. Unable to locate index 8776. Unable to locate index 8777. Unable to locate index 8778. Unable to locate index 8779. Unable to locate index 8780. Unable to locate index 8782. Unable to locate index 8783. Unable to locate index 8784. Unable to locate index 8785. Unable to locate index 8786. Unable to locate index 8803. Unable to locate index 8804. Unable to locate index 8806. Unable to locate index 8808. Unable to locate index 8809. Unable to locate index 8810. Unable to locate index 8811. Unable to locate index 8812. Unable to locate index 8813. Unable to locate index 8828. Unable to locate index 8829. Unable to locate index 8830. Unable to locate index 8831. Unable to locate index 8832. Unable to locate index 8833. Unable to locate index 8834. Unable to locate index 8835. Unable to locate index 8836. Unable to locate index 8837. Unable to locate index 8846. Unable to locate index 8847. Unable to locate index 8848. Unable to locate index 8849. Unable to locate index 8856. Unable to locate index 8857. Unable to locate index 8858. Unable to locate index 8859. Unable to locate index 8860. Unable to locate index 8861. Unable to locate index 8862. Unable to locate index 8863. Unable to locate index 8864. Unable to locate index 8865. Unable to locate index 8866. Unable to locate index 8868. Unable to locate index 8869. Unable to locate index 8870. Unable to locate index 8871. Unable to locate index 8872. Unable to locate index 8873. Unable to locate index 8874. Unable to locate index 8875. Unable to locate index 8876. Unable to locate index 8877. Unable to locate index 8878. Unable to locate index 8879. Unable to locate index 8880. Unable to locate index 8881. Unable to locate index 8915. Unable to locate index 8916. Unable to locate index 8917. Unable to locate index 8918. Unable to locate index 8919. Unable to locate index 8920. Unable to locate index 8921. Unable to locate index 8922. Unable to locate index 8923. Unable to locate index 8924. Unable to locate index 8925. Unable to locate index 8927. Unable to locate index 8928. Unable to locate index 8930. Unable to locate index 8931. Unable to locate index 8932. Unable to locate index 8933. Unable to locate index 8934. Unable to locate index 8935. Unable to locate index 8936. Unable to locate index 8937. Unable to locate index 8938. Unable to locate index 8939. Unable to locate index 8940. Unable to locate index 8942. Unable to locate index 8943. Unable to locate index 8946. Unable to locate index 8948. Unable to locate index 8968. Unable to locate index 8973. Unable to locate index 8974. Unable to locate index 8988. Unable to locate index 8989. Unable to locate index 8990. Unable to locate index 8991. Unable to locate index 8992. Unable to locate index 8993. Unable to locate index 8994. Unable to locate index 8995. Unable to locate index 8996. Unable to locate index 9018. Unable to locate index 9019. Unable to locate index 9021. Unable to locate index 9023. Unable to locate index 9024. Unable to locate index 9026. Unable to locate index 9027. Unable to locate index 9028. Unable to locate index 9029. Unable to locate index 9030. Unable to locate index 9031. Unable to locate index 9032. Unable to locate index 9033. Unable to locate index 9034. Unable to locate index 9035. Unable to locate index 9098. Unable to locate index 9099. Unable to locate index 9100. Unable to locate index 9101. Unable to locate index 9114. Unable to locate index 9115. Unable to locate index 9116. Unable to locate index 9117. Unable to locate index 9118. Unable to locate index 9119. Unable to locate index 9120. Unable to locate index 9121. Unable to locate index 9122. Unable to locate index 9123. Unable to locate index 9124. Unable to locate index 9125. Unable to locate index 9126. Unable to locate index 9127. Unable to locate index 9128. Unable to locate index 9225. Unable to locate index 9242. Unable to locate index 9243. Unable to locate index 9244. Unable to locate index 9245. Unable to locate index 9252. Unable to locate index 9253. Unable to locate index 9254. Unable to locate index 9255. Unable to locate index 9256. Unable to locate index 9257. Unable to locate index 9333. Unable to locate index 9343. Unable to locate index 9344. Unable to locate index 9345. Unable to locate index 9346. Unable to locate index 9347. Unable to locate index 9348. Unable to locate index 9349. Unable to locate index 9350. Unable to locate index 9351. Unable to locate index 9352. Unable to locate index 9353. Unable to locate index 9354. Unable to locate index 9355. Unable to locate index 9356. Unable to locate index 9368. Unable to locate index 9369. Unable to locate index 9370. Unable to locate index 9384. Unable to locate index 9385. Unable to locate index 9391. Unable to locate index 9430. Unable to locate index 9459. Unable to locate index 9606. Unable to locate index 9631. Unable to locate index 9632. Unable to locate index 9633. Unable to locate index 9634. Unable to locate index 9635. Unable to locate index 9638. Unable to locate index 9639. Unable to locate index 9640. Unable to locate index 9641. Unable to locate index 9642. Unable to locate index 9643. Unable to locate index 9644. Unable to locate index 9645. Unable to locate index 9652. Unable to locate index 9653. Unable to locate index 9654. Unable to locate index 9664. Unable to locate index 9666. Unable to locate index 9667. Unable to locate index 9668. Unable to locate index 9669. Unable to locate index 9760. Unable to locate index 9761. Unable to locate index 9762. Unable to locate index 9764. Unable to locate index 9765. Unable to locate index 9766. Unable to locate index 9767. Unable to locate index 9768. Unable to locate index 9802. Unable to locate index 9803. Unable to locate index 9804. Unable to locate index 9805. Unable to locate index 9806. Unable to locate index 9807. Unable to locate index 9811. Unable to locate index 9812. Unable to locate index 9813. Unable to locate index 9814. Unable to locate index 9815. Unable to locate index 9816. Unable to locate index 9817. Unable to locate index 9818. Unable to locate index 9819. Unable to locate index 9820. Unable to locate index 9825. Unable to locate index 9826. Unable to locate index 9827. Unable to locate index 9831. Unable to locate index 9834. Unable to locate index 9835. Unable to locate index 9854. Unable to locate index 9858. Unable to locate index 9863. Unable to locate index 9864. Unable to locate index 9899. Unable to locate index 9900. Unable to locate index 9901. Unable to locate index 9902. Unable to locate index 9903. Unable to locate index 9904. Unable to locate index 9905. Unable to locate index 9906. Unable to locate index 9907. Unable to locate index 9911. Unable to locate index 9912. Unable to locate index 9923. Unable to locate index 9928. Unable to locate index 9929. Unable to locate index 9930. Unable to locate index 9931. Unable to locate index 9932. Unable to locate index 9933. Unable to locate index 9955. Unable to locate index 9956. Unable to locate index 9957. Unable to locate index 9958. Unable to locate index 9959. Unable to locate index 9960. Unable to locate index 9961. Unable to locate index 9986. Unable to locate index 9988. Unable to locate index 9989. Unable to locate index 9991. Finished repacking 1. NPC.DAT : 1489108188 Called method225 NPC.IDX : 1489126980 Called method225 [/CODE] Heres the methods [CODE]public String indexLocation(int cacheIndex, int index) { return signlink.findcachedir() + "index" + cacheIndex + "/" + (index != -1 ? index + "gz" : ""); } public void repackCacheIndex(int cacheIndex) { System.out.println("Started repacking index " + cacheIndex + "."); int indexLength = new File(indexLocation(cacheIndex, -1)).listFiles().length; File[] file = new File(indexLocation(cacheIndex, -1)).listFiles(); try { for (int index = 0; index < indexLength; index++) { int fileIndex = Integer.parseInt(getFileNameWithoutExtension(file[index].toString())); byte[] data = fileToByteArray(cacheIndex, fileIndex); if(data != null && data.length > 0) { decompressors[cacheIndex].method234(data.length, data, fileIndex); System.out.println("Repacked " + fileIndex + "."); } else { System.out.println("Unable to locate index " + fileIndex + "."); } } } catch(Exception e) { System.out.println("Error packing cache index " + cacheIndex + "."); } System.out.println("Finished repacking " + cacheIndex + "."); }[/CODE] [CODE] private synchronized void seekTo(RandomAccessFile randomaccessfile, int j) throws IOException { try { /*if (j < 0 || j > 0x3c00000) { System.out.println("Badseek - pos:" + j + " len:" + randomaccessfile.length()); j = 0x3c00000; try { Thread.sleep(1000L); } catch (Exception _ex) { } }*/ randomaccessfile.seek(j); } catch(Exception e) { e.printStackTrace(); } }[/CODE] [CODE] public void run() { active = true; String s = findcachedir(); uid = getuid(s); try { cache_dat = new RandomAccessFile(s + "main_file_cache.dat", "rw"); for(int j = 0; j < 5; j++) { cache_idx[j] = new RandomAccessFile(s + "main_file_cache.idx" + j, "rw"); } } catch(Exception exception) { exception.printStackTrace(); } for(int i = threadliveid; threadliveid == i;) {[/CODE]
  7. dustey

    Cache Packing help

    I figured out the problem it is that the files i thought were .gz are .dat.gz so would making the get model .dat.gz work? Or is there a batch file i could use to take out .dat in them
  8. dustey

    Cache Packing help

    Alright I don't understand why my models are not packing Heres what I have in my startup method [CODE]//preloadModels(); Models();[/CODE] heres my getmodel method [CODE]public byte[] getModel(int Index) { try { File Model = new File("./Raw/"+Index+".gz"); byte[] aByte = new byte[(int)Model.length()]; FileInputStream fis = new FileInputStream(Model); fis.read(aByte); pushMessage("aByte = ["+aByte+"]!", 0, ""); fis.close(); return aByte; }[/CODE] I haave all the models gzipped and in the cache in a folder name "Raw" can anyone help
  9. dustey

    PI Pest Control

    Whenever I try to get a PC game started it will not start, you just sit in the boat and does not bring you to the island. Heres my pest control and yes it is imported in client.java [CODE]package server.model.minigames; import server.model.players.Client; import server.model.players.PlayerHandler; import server.Server; import java.util.HashMap; import java.util.Iterator; import server.util.Misc; /** * @author Harlan * Credits to Sanity */ public class PestControl { public final int GAME_TIMER = 200; public final int WAIT_TIMER = 10; /* * Hashmap for the waitingBoat players */ private static HashMap<Client, Integer> waitingBoat = new HashMap<Client, Integer>(); /* * hashmap for the gameArea players */ private static HashMap<Client, Integer> gameArea = new HashMap<Client, Integer>(); public int gameTimer = -1; public int waitTimer = 60; /** Portals Health ***/ public static int[] portalHealth = { 200, 200, 200, 200 }; /** Void knights health ***/ public static int knightHealth = 200; /** Array used for storing portals location ***/ public int[][] portalLocation = {{2628,2591},{2680,2588},{2669,2570},{2645,2569}}; /** npcs stored in an array so we can remove them easily **/ public int[] pcNpcsList = { 6142, 6143, 6144, 6145, 3782 }; public static boolean gameStarted = false; public void process() { try { setBoatInterface(); if (waitTimer > 0) { waitTimer--; } else if (waitTimer == 0) startGame(); if (gameStarted && playersInGame() < 1) endGame(false); if (gameTimer > 0 && gameStarted) { gameTimer--; //spawnPcNpcs(); setGameInterface(); if (allPortalsDead()) { //Misc.println("All portals dead: "+ allPortalsDead()); endGame(true); } } else if (gameTimer == 0 && gameStarted) endGame(false); } catch(Exception e) { e.printStackTrace(); } } public static void removePlayerFromPc(Client player) { if (player == null) return; if (gameArea.containsKey(player)) { player.getPA().movePlayer(2657, 2639, 0); gameArea.remove(player); } } public void setBoatInterface() { Iterator iterator = waitingBoat.keySet().iterator(); while (iterator.hasNext()) { Client c = (Client) iterator.next(); if (c != null) { if(gameStarted) c.getPA().sendFrame126("Next Departure: "+(waitTimer+gameTimer)+"", 21120); else c.getPA().sendFrame126("Next Departure: "+waitTimer+"", 21120); c.getPA().sendFrame126("Players Ready: "+playersInBoat()+"", 21121); c.getPA().sendFrame126("(Need 4 to 25 players)", 21122); c.getPA().sendFrame126("Points: "+c.pcPoints+"", 21123); } } } public int npcCount = 0; public static int random3(int range) { return (int)((java.lang.Math.random() * range)); } public void setGameInterface() { Iterator iterator = gameArea.keySet().iterator(); while (iterator.hasNext()) { Client c = (Client) iterator.next(); if (c != null) { for (int i = 0; i < portalHealth.length; i++) { if (portalHealth[i] > 0) { c.getPA().sendFrame126("" +portalHealth[i]+ "", 21111+i); } else { c.getPA().sendFrame126("Dead", 21111+i); } } c.getPA().sendFrame126(""+knightHealth, 21115); c.getPA().sendFrame126(""+c.pcDamage, 21116); c.getPA().sendFrame126("Time remaining: "+gameTimer+"", 21117); } } } /*** * Moving players to arena if there's enough players */ private void startGame() { if (playersInBoat() < 3) { waitTimer = WAIT_TIMER; return; } for (int i = 0; i < portalHealth.length; i++) portalHealth[i] = 200; gameTimer = GAME_TIMER; waitTimer = -1; spawnNpcs(); gameStarted = true; Iterator iterator = waitingBoat.keySet().iterator(); while (iterator.hasNext()) { Client player = (Client) iterator.next(); if (player == null) { continue; } if(player.inPcBoat() == false && waitingBoat.containsKey(player)) { waitingBoat.remove(player); } player.getPA().movePlayer(2656+Misc.random3(3),2614-Misc.random3(4),0); gameArea.put(player, 1); player.sendMessage("The Pest Control Game has begun!"); } waitingBoat.clear(); } public int playersInBoat() { int players = 0; Iterator iterator = (!waitingBoat.isEmpty()) ? waitingBoat.values().iterator() : gameArea.values().iterator(); while (iterator.hasNext()) { if ((Integer) iterator.next() == 1) { players++; } } return players; } public int playersInGame() { int players = 0; Iterator iterator = (!gameArea.isEmpty()) ? gameArea.values().iterator() : waitingBoat.values().iterator(); while (iterator.hasNext()) { if ((Integer) iterator.next() == 1) { players++; } } return players; } public void endGame(boolean won) { for (int i = 0; i < portalHealth.length; i++) portalHealth[i] = 200; //npcCount = 0; gameTimer = -1; waitTimer = WAIT_TIMER; gameStarted = false; Misc.println("Ending Pest Control Game"); for (int i = 0; i < portalHealth.length; i++) portalHealth[i] = 0; Iterator iterator = gameArea.keySet().iterator(); while (iterator.hasNext()) { Client player = (Client) iterator.next(); if (player == null) { continue; } player.getPA().movePlayer(2657, 2639, 0); if (won) { player.getDH().sendDialogues(79, 3790); player.sendMessage("You have won the pest control game and have been awarded 4 Nelson points."); player.pcPoints += 4; player.poisonDamage = 0; player.getCombat().resetPrayers(); for (int i = 0; i < 24; i++) { player.playerLevel[i] = player.getPA().getLevelForXP(player.playerXP[i]); player.getPA().refreshSkill(i); } player.specAmount = 10; player.getItems().addItem(995, player.combatLevel * 100000); } else { player.getDH().sendDialogues(78, 3790); player.sendMessage("You failed to kill all the portals in 3 minutes and have not been awarded any points."); } player.pcDamage = 0; player.getItems().addSpecialBar(player.playerEquipment[player.playerWeapon]); } gameArea.clear(); for (int i = 0; i < pcNpcsList.length; i++){ for (int j = 0; j < Server.npcHandler.npcs.length; j++) { if (Server.npcHandler.npcs[j] != null) { if (Server.npcHandler.npcs[j].npcType == pcNpcsList[i]) Server.npcHandler.npcs[j] = null; } } } } public boolean allPortalsDead() { int count = 0; for (int i = 0; i < portalHealth.length; i++) { if (portalHealth[i] <= 4) count++; } return count >= 4; } public static void leaveWaitingBoat(Client c) { if (c == null) { return; } if (waitingBoat.containsKey(c)) { waitingBoat.remove(c); c.getPA().movePlayer(2657,2639,0); return; } } public static void addToWaitRoom(Client c) { if(c == null) return; waitingBoat.put(c, 1); c.sendMessage("You have joined the Pest Control boat."); c.getPA().movePlayer(2661,2639,0); } public static boolean isInPc(Client player) { return gameArea.containsKey(player); } public static boolean isInPcBoat(Client player) { return waitingBoat.containsKey(player); } public void spawnNpcs() { Server.npcHandler.spawnNpc2(6142,2628,2591,0,0,200,0,0,100); Server.npcHandler.spawnNpc2(6143,2680,2588,0,0,200,0,0,100); Server.npcHandler.spawnNpc2(6144,2669,2570,0,0,200,0,0,100); Server.npcHandler.spawnNpc2(6145,2645,2569,0,0,200,0,0,100); Server.npcHandler.spawnNpc2(3782,2656,2592,0,0,knightHealth,0,0, 100); } }[/CODE]
  10. Like starter1 and starter2?
  11. Post the code you see and I'll probably be able to help you
  12. everytime i use eclipse i fuck my server over
  13. dustey

    [PI]Problems!

    Search for the easy xp code, delete it. Then so on, when you compile it, then it should give you errors in other classes about the code you just deleted then go there and do the same if need be. (Thats how id go about it)
×