Jump to content

Search the Community

Showing results for tags 'updating'.



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

  1. Huge noob right here cannot get this server to start working, its ChronicScape 718 final release and when I try to run it this happens; [attachment=42:5a2fb660c3b421929476a3bb8e81215f.jpg] I have changed IP and port and all that and still being a noob, help pl0x It says checking for updates for Chronicscape - 0%
  2. 1. [img]http://fc05.deviantart.net/fs71/f/2014/029/4/c/1_by_dosesociety-d74a7ai.png[/img] 2. [img]http://fc07.deviantart.net/fs70/f/2014/029/a/b/2_by_dosesociety-d74ak5k.png[/img] 3. [img]http://fc03.deviantart.net/fs70/f/2014/029/d/5/3_by_dosesociety-d74ar5c.png[/img] 4. [img]http://fc08.deviantart.net/fs71/f/2014/029/b/d/4_by_dosesociety-d74bskt.png[/img] 5. [img]http://fc03.deviantart.net/fs71/f/2014/031/0/e/5_by_dosesociety-d74h07l.png[/img] 6. [img]http://fc06.deviantart.net/fs71/f/2014/033/d/a/6_by_dosesociety-d74rywm.png[/img] 7. [img]http://fc01.deviantart.net/fs71/f/2014/033/4/d/7_by_dosesociety-d74s5k5.png[/img] 8. [img]http://fc09.deviantart.net/fs71/f/2014/033/a/2/8_by_dosesociety-d74sggx.png[/img] 9. [img]http://fc04.deviantart.net/fs70/f/2014/033/9/7/9_by_dosesociety-d74ssdn.png[/img] 10. [img]http://fc08.deviantart.net/fs71/f/2014/033/5/2/10_by_dosesociety-d74t0d3.png[/img] 11. [img]http://fc06.deviantart.net/fs71/f/2014/033/9/5/11_by_dosesociety-d74tw4d.png[/img] 12. [img]http://fc00.deviantart.net/fs71/f/2014/033/f/b/12_by_dosesociety-d74tyjw.png[/img] 13. [img]http://fc03.deviantart.net/fs71/f/2014/033/7/0/13_by_dosesociety-d74uyv7.png[/img] 14. [IMG]http://fc07.deviantart.net/fs71/f/2014/038/5/9/tothebone_by_dosesociety-d75filf.png[/IMG] 15. [IMG]http://fc09.deviantart.net/fs71/f/2014/038/f/1/tothebone_by_dosesociety-d75fmiw.png[/IMG]
  3. [I]This code was written for my rsps project so I thought it would be appropriate to post it here.[/I] I wrote this code earlier today to prevent the need to restart the server application every time I need to apply a file modification. The reason this could be useful for you is because you wont have to worry about character file rollbacks, etc... for something as stupid as adding an npc spawn to a configuration file. Please keep in mind that this is not a copy and paste tutorial it is a code snippet that (with modification) can be ported into your own applications. Requirements: Java 1.7 (not backwards compatible with other development kids) [I]Note: This code has been modified from its original version to be a standalone application by removing certain application specific pieces of code. The original code will be available through pm for those who are interested in the entire system.[/I] [CODE]/* * Copyright (c) 2014 -- Scott K. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package org.iyaoyas.io.file; import java.io.IOException; import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.StandardWatchEventKinds; import java.nio.file.WatchEvent; import java.nio.file.WatchKey; import java.nio.file.WatchService; import java.util.Iterator; import java.util.List; /** * A {@link Service} responsible for listening for file modifications in the designated directories. * * [MENTION=52317]auth[/MENTION]or Scott K. */ public class FileWatcherService { /** * The entry point for the application. * * [MENTION=75098]Para[/MENTION]m args the command line arguments */ public static void main(String[] args) { FileWatcherService fws = new FileWatcherService("./data/"); fws.start(); } /** * The directory to watch for file modification. */ private final Path directory; /** * Whether or not the file watcher service is running. */ private boolean running = false; /** * Creates a new <code>FileWatcherService</code>. * [MENTION=75098]Para[/MENTION]m directory the directory */ public FileWatcherService(String directory) { this.directory = Paths.get(directory); } /** * Creates a new <code>FileWatcherService</code>. * [MENTION=75098]Para[/MENTION]m directory the directory * [MENTION=75098]Para[/MENTION]m subs the sub directories */ public FileWatcherService(String directory, String... subs) { this.directory = Paths.get(directory, subs); } public void start() { //create watch service try (WatchService watcher = directory.getFileSystem().newWatchService()) { directory.register(watcher, StandardWatchEventKinds.ENTRY_MODIFY); //listen for file modifications in the specified directories... System.out.println("File watcher service initialized..."); for (running = true; running;) { //block until a file modification has been made WatchKey key = watcher.take(); List<WatchEvent<?>> events = key.pollEvents(); for (Iterator<WatchEvent<?>> itr = events.iterator(); itr.hasNext();) { WatchEvent<?> event = itr.next(); String name = event.context().toString(); System.out.printf("%s:%s%n", name, event.kind().name()); //if the file in question has been loaded into memory we would //take the necessary steps to apply the update here //TODO ... } key.reset(); } System.err.println("Shutting down file watcher service..."); //TODO ... } catch (IOException | InterruptedException ex) { ex.printStackTrace(System.err); } } public void stop() { //TODO ... } /** * Returns the <code>running</code> flag. * [MENTION=75098]Para[/MENTION]m <tt>true</tt> file watcher service is running */ public boolean isRunning() { return running; } /** * Initializes the <code>FileServer</code> shutdown sequence. */ public void shutdown() { this.running = false; } }[/CODE] You can compile and run this code to test it out if you want. If you are confused about how to apply this to your own designs please pm me and I will elaborate further on this codes intended use and more specifics on how you can apply this to a server of your choice (PI, DeltaScape, Winterlove based servers, Shard Revolutions, Hyperion, Apollo, etc...). Thanks for reading and best of luck in your development! - IYAOYAS EDIT: Once again Cart RL's fucking mentioning system fucks my javadoc... EDIT2: Cart the name of the thread doesn't reflect the content at all!! wtf....
  4. [CODE]package org.dementhium.model.player; import java.util.PriorityQueue; import org.dementhium.cache.format.CacheItemDefinition; import org.dementhium.model.Location; import org.dementhium.model.World; import org.dementhium.model.definition.ItemDefinition; import org.dementhium.model.definition.NPCDefinition; import org.dementhium.model.mask.Appearance; import org.dementhium.model.update.UpdateFlag; import org.dementhium.model.update.flags.AppearanceUpdate; import org.dementhium.net.message.OutgoingPacket; import org.dementhium.net.message.PacketType; public class PlayerUpdate extends OutgoingPacket { /** * Constructs a new {@code PlayerRendering} {@code Object}. * * [MENTION=75098]Para[/MENTION]m player * The player. */ public PlayerUpdate(Player player) { super(player, 112, PacketType.VAR_SHORT); } [MENTION=15855]Over[/MENTION]ride public OutgoingPacket get() { writePlayerRendering(getPlayer(), this); return this; } /** * Writes the player rendering on the packet. * * [MENTION=75098]Para[/MENTION]m player * The player. * [MENTION=75098]Para[/MENTION]m packet * The packet. */ public static void writePlayerRendering(Player player, OutgoingPacket packet) { if (player.getRegion().isDidMapRegionChange()) { player.updateMap(); } RenderInformation info = player.getRenderInformation(); int skipCount = -1; OutgoingPacket flagBased = new OutgoingPacket(player); packet.startBitAccess(); for (int i = 0; i < info.localsCount; i++) { int index = info.locals[i]; LocalUpdateStage stage = LocalUpdateStage.getStage(player, World.getWorld().getPlayers().get(index)); if (stage == null) { skipCount++; } else { putSkip(skipCount, packet); skipCount = -1; updateLocalPlayer(player, World.getWorld().getPlayers().get(index), packet, stage, flagBased, index); } } putSkip(skipCount, packet); skipCount = -1; packet.finishBitAccess(); packet.startBitAccess(); for (int i = 0; i < info.globalsCount; i++) { int index = info.globals[i]; GlobalUpdateStage stage = GlobalUpdateStage.getStage(player, World.getWorld().getPlayers().get(index)); if (stage == null) { skipCount++; } else { putSkip(skipCount, packet); skipCount = -1; updateGlobalPlayer(player, World.getWorld().getPlayers().get(index), packet, stage, flagBased); } } putSkip(skipCount, packet); skipCount = -1; packet.finishBitAccess(); packet.putBytes(flagBased.getBuffer()); } /** * Updates a local player. * * [MENTION=75098]Para[/MENTION]m player * The player we're writing for. * [MENTION=75098]Para[/MENTION]m p * The player to update. * [MENTION=75098]Para[/MENTION]m buffer * The outgoing packet. * [MENTION=75098]Para[/MENTION]m maskUpdates * The list of players who need a mask update. */ private static void updateLocalPlayer(Player player, Player p, OutgoingPacket buffer, LocalUpdateStage stage, OutgoingPacket flagBased, int index) { buffer.putBits(1, 1); buffer.putBits(1, stage.ordinal() == 0 ? 0 : (p.getUpdateMasks() .isUpdateRequired() ? 1 : 0)); buffer.putBits(2, stage.ordinal() % 4); switch (stage) { case REMOVE_PLAYER: if (p != null) { if (p.getRegion().isDidTeleport()) { updateGlobalPlayer(player, p, buffer, GlobalUpdateStage.TELEPORTED, flagBased); } else if (p.getLocation().getZ() != p.getRenderInformation().getLastLocation().getZ()) { updateGlobalPlayer(player, p, buffer, GlobalUpdateStage.HEIGHT_UPDATED, flagBased); } else { buffer.putBits(1, 0); } } else { buffer.putBits(1, 0); } player.getRenderInformation().isLocal[index] = false; break; case WALKING: buffer.putBits(3, p.getWalkingQueue().getWalkDir()); break; case RUNNING: buffer.putBits(4, p.getWalkingQueue().getRunDir()); break; case TELEPORTED: Location delta = Location.getDelta(p.getRenderInformation().getLastLocation(), p.getLocation()); int deltaX = delta.getX() < 0 ? -delta.getX() : delta.getX(); int deltaY = delta.getY() < 0 ? -delta.getY() : delta.getY(); if (deltaX <= 15 && deltaY <= 15) { buffer.putBits(1, 0); int deltaZ = delta.getZ() < 0 ? -delta.getZ() : delta.getZ(); deltaX = delta.getX() < 0 ? delta.getX() + 32 : delta.getX(); deltaY = delta.getY() < 0 ? delta.getY() + 32 : delta.getY(); deltaZ = delta.getZ(); buffer.putBits(12, (deltaY & 0x1f) | ((deltaX & 0x1f) << 5) | ((deltaZ & 0x3) << 10)); } else { buffer.putBits(1, 1); buffer.putBits(30, (delta.getY() & 0x3fff) | ((delta.getX() & 0x3fff) << 14) | ((delta.getZ() & 0x3) << 28)); } break; case NO_UPDATE: break; default: break; } if (p != null && stage != LocalUpdateStage.REMOVE_PLAYER && p.getUpdateMasks().isUpdateRequired()) { writeMasks(player, p, flagBased, false); } } /** * Updates a global player. * [MENTION=75098]Para[/MENTION]m player The player to write for. * [MENTION=75098]Para[/MENTION]m p The player to update. * [MENTION=75098]Para[/MENTION]m buffer The packet. * [MENTION=75098]Para[/MENTION]m stage The update stage. * [MENTION=75098]Para[/MENTION]m maskUpdates The list of mask updates. */ private static void updateGlobalPlayer(Player player, Player p, OutgoingPacket buffer, GlobalUpdateStage stage, OutgoingPacket flagBased) { buffer.putBits(1, 1); buffer.putBits(2, stage.ordinal()); switch (stage) { case ADD_PLAYER: if (p.getRenderInformation().getLastLocation() != null && p.getLocation().getZ() != p.getRenderInformation().getLastLocation().getZ()) { updateGlobalPlayer(player, p, buffer, GlobalUpdateStage.HEIGHT_UPDATED, flagBased); } else { updateGlobalPlayer(player, p, buffer, GlobalUpdateStage.TELEPORTED, flagBased); //buffer.putBits(1, 0); } buffer.putBits(6, p.getLocation().getX() - (p.getLocation().getRegionX() << 6)); //6 buffer.putBits(6, p.getLocation().getY() - (p.getLocation().getRegionY() << 6)); //6 buffer.putBits(1, 1); player.getRenderInformation().isLocal[p.getIndex()] = true; writeMasks(player, p, flagBased, true); break; case HEIGHT_UPDATED: int z = p.getLocation().getZ() - p.getRenderInformation().getLastLocation().getZ(); buffer.putBits(2, z); break; case TELEPORTED: buffer.putBits(18, (p.getLocation().getZ() << 16) | (((p.getLocation().getRegionX() >> 3) & 0xFF) << 8) | ((p.getLocation().getRegionY() >> 3) & 0xFF)); break; case MAP_REGION_DIRECTION: break; default: break; } } /** * Writes the update masks for a player on this packet. * * [MENTION=75098]Para[/MENTION]m writingFor * The player we're writing for. * [MENTION=75098]Para[/MENTION]m updatable * The player to update. * [MENTION=75098]Para[/MENTION]m composer * The packet to write on. * [MENTION=75098]Para[/MENTION]m forceSync * If we should force the appearance update mask. */ private static void writeMasks(Player writingFor, Player updatable, OutgoingPacket composer, boolean forceSync) { int maskdata = 0; PriorityQueue<UpdateFlag> flags = new PriorityQueue<UpdateFlag>( updatable.getUpdateMasks().flagQueue); for (UpdateFlag flag : flags) { maskdata |= flag.getMaskData(); } if (forceSync && (maskdata & 0x2) == 0) { maskdata |= 0x2; flags.add(new AppearanceUpdate(updatable)); } if (maskdata > 128) { maskdata |= 0x1; } if (maskdata > 32768) { maskdata |= 0x200; } composer.put((byte) maskdata); if (maskdata > 128) { composer.put((byte) (maskdata >> 8)); } if (maskdata > 32768) { composer.put((byte) (maskdata >> 16)); } while (!flags.isEmpty()) { flags.poll().write(composer); } } /** * Puts the skipcount on the packet. * * [MENTION=75098]Para[/MENTION]m skipCount * The skip count. * [MENTION=75098]Para[/MENTION]m packet * The packet to write on. */ private static void putSkip(int skipCount, OutgoingPacket packet) { if (skipCount > -1) { packet.putBits(1, 0); if (skipCount == 0) { packet.putBits(2, 0); } else if (skipCount < 32) { packet.putBits(2, 1); packet.putBits(5, skipCount); } else if (skipCount < 256) { packet.putBits(2, 2); packet.putBits(8, skipCount); } else if (skipCount < 2048) { packet.putBits(2, 3); packet.putBits(11, skipCount); } } } }[/CODE] [code] package org.dementhium.model.player; /** * [MENTION=52317]auth[/MENTION]or Sean */ public enum GlobalUpdateStage { ADD_PLAYER, HEIGHT_UPDATED, MAP_REGION_DIRECTION, TELEPORTED; /** * Gets the global update stages. * [MENTION=75098]Para[/MENTION]m player The player for the update, * [MENTION=75098]Para[/MENTION]m otherPlayer The players to update for. * [MENTION=184045]return[/MENTION] The state. */ public static GlobalUpdateStage getStage(Player player, Player otherPlayer) { if (otherPlayer == null || !(otherPlayer.isActive())) { return null; } else if (player != otherPlayer && player.getLocation().withinDistance(otherPlayer.getLocation())) { return ADD_PLAYER; } else if (otherPlayer.getRenderInformation().getLastLocation() != null && otherPlayer.getLocation().getZ() != otherPlayer.getRenderInformation().getLastLocation().getZ()) { return HEIGHT_UPDATED; } else if (otherPlayer.getRegion().isDidTeleport() || otherPlayer.getRenderInformation().isOnFirstCycle()) { return TELEPORTED; } return null; } }[/code] [code] package org.dementhium.model.player; /** * * * [MENTION=52317]auth[/MENTION]or Sean * */ public enum LocalUpdateStage { REMOVE_PLAYER, WALKING, RUNNING, TELEPORTED, NO_UPDATE; /** * Gets the local player updating stages. * [MENTION=75098]Para[/MENTION]m player The player for the update. * [MENTION=75098]Para[/MENTION]m otherPlayer The player to update for. * [MENTION=184045]return[/MENTION] The stage of a certain update. */ public static LocalUpdateStage getStage(Player player, Player otherPlayer) { if (otherPlayer == null) return REMOVE_PLAYER; if (!player.getLocation().withinDistance(otherPlayer.getLocation())) { return REMOVE_PLAYER; } else if (otherPlayer.getRegion().isDidTeleport()) { return TELEPORTED; } else if (otherPlayer.getWalkingQueue().getWalkDir() != -1) { return WALKING; } else if (otherPlayer.getWalkingQueue().getRunDir() != -1) { return RUNNING; } return otherPlayer.getUpdateMasks().isUpdateRequired() ? NO_UPDATE : null; } } [/code] [code] package org.dementhium.model.player; import java.util.LinkedList; import java.util.List; import org.dementhium.model.Location; import org.dementhium.model.World; import org.dementhium.model.npc.NPC; import org.dementhium.net.message.OutgoingPacket; /** * Holds the player's rendering information. * * [MENTION=52317]auth[/MENTION]or Jolt environment v2 development team * [MENTION=52317]auth[/MENTION]or Emperor (converted to Java + NPC information). * */ public class RenderInformation { /** * The player. */ private final Player player; /** * Holds the players' hash locations. */ public final int[] hashLocations = new int[2048]; /** * The amount of local players. */ public int localsCount = 0; /** * The amount of global players. */ public int globalsCount = 0; /** * The local player indexes. */ public final short[] locals = new short[2048]; /** * The global player indexes. */ public final short[] globals = new short[2048]; /** * The local players. */ public final boolean[] isLocal = new boolean[2048]; /** * The skipped player indexes. */ public final byte[] skips = new byte[2048]; /** * The player's last location. */ private Location lastLocation; /** * If the player has just logged in. */ private boolean onFirstCycle; /** * The amount of added players in the current update cycle. */ private int added; /** * The list of local NPCs. */ private List<NPC> localNpcs = new LinkedList<NPC>(); /** * Constructs a new {@code RenderInformation} {@code Object}. * [MENTION=75098]Para[/MENTION]m player The player. */ public RenderInformation(Player player) { this.player = player; this.onFirstCycle = true; } /** * Updates the player's map region packet with player information. * [MENTION=75098]Para[/MENTION]m packet The packet. */ public void enterWorld(OutgoingPacket packet) { int myindex = player.getIndex(); locals[localsCount++] = (short) myindex; isLocal[myindex] = true; hashLocations[myindex] = 0; packet.startBitAccess(); packet.putBits(30, player.getLocation().get30BitsHash()); for (short index = 1; index < 2048; index++) { if (index == myindex) { continue; } globals[globalsCount++] = index; Player p = World.getWorld().getPlayers().get(index); if (p == null) { packet.putBits(18, 0); continue; } packet.putBits(18, p.getLocation().get18BitsHash()); } packet.finishBitAccess(); } /** * Updates the player rendering information. */ public void updateInformation() { localsCount = 0; globalsCount = 0; added = 0; onFirstCycle = false; lastLocation = player.getLocation(); for (short i = 1; i < 2048; i++) { skips[i] >>= 1; if (isLocal[i]) { locals[localsCount++] = i; } else { globals[globalsCount++] = i; } Player p = World.getWorld().getPlayers().get(i); if (p != null && p.getConnection().getChannel().isConnected()) { hashLocations[i] = p.getLocation().get18BitsHash(); } } player.getRegion().setDidTeleport(false); } /** * Gets the list of local npcs. * [MENTION=184045]return[/MENTION] The list of local npcs. */ public List<NPC> getLocalNPCs() { return localNpcs; } /** * [MENTION=184045]return[/MENTION] the lastLocation */ public Location getLastLocation() { return lastLocation; } /** * [MENTION=184045]return[/MENTION] the onFirstCycle */ public boolean isOnFirstCycle() { return onFirstCycle; } /** * Gets the amount of currently added players in this cycle. * [MENTION=184045]return[/MENTION] The amount, incremented. */ public int getAddedIncr() { return added++; } } [/code]
  5. hey guys this has more than likely been posted 100 of times but i cannot find a good tutorial, can someone please send a me link on how to update my revision from a 317 to 632, i'm using #[pi]
  6. lukesky395

    Updating for PI

    Hi, I use the Project Insanity starter kit, and I have been trying to update some files. I can make the changes, and I follow several guides, but I never see the changes on the server. I try to use the compile.bat files but they don't work, and I just do the save and compile for the server and that doesn't do anything? Can anyone tell me how to make sure that what I modify actually does anything? Sorry, I'm a complete noob at this. Thank you, - Luke Sky
  7. when i update the background for the rsps, do i have to upload thecache to my dropbox and get a new link because when i send it to people, its still the old background.
  8. I believe you should have the recent posts have a changeable reload timer; I personally prefer to know when someone has replied to a thread of mine, or posted in a thread I made within ~5 seconds if I'm actually reading the forums. 15 seconds seems... A bit slow.
  9. Hey, when i load runelocus, i usually look at the newest servers, and sometimes i wont like either 5 of them, and instead of sitting there for like 7ish hours waiting for new ones to appear, was hoping maybe it can take only like 2 hours.
  10. Hey im just downloaded 317 PI source (wildernessReLoaded) and im using my own 317 PI client cause it's webclient client ready.. look this is the problem can someone help me please? [img]http://i.imgur.com/UM7Ys.png[/img]
  11. axter

    Thread updating

    I don't know if it's just me, or does it take forever to see latest posts? The old forum style's "Latest posts" updated like every 4 seconds. This one seems to take a lot longer (Not sure if the style has anything to do with it) :confused:
  12. Not all clients use the method382 ive noticed that the hp and prayer orbs weren't updating so i decided to look into it and i've fixed it so here it is: Also i understand there are better ways to do it and if you can do it better go ahead, but don't spend your time on here complaining on how badly it's written. what your adding: [img]http://img256.imageshack.us/img256/2945/orbsy.png[/img] in client.java replace your whole method [CODE]private void drawMapIcons()[/CODE] with: [CODE] private void drawMapIcons() { int hpX = 162, hpY = 6; int health; String cHP = RSInterface.interfaceCache[4016].message; int currentHP = Integer.parseInt(cHP); String mHP = RSInterface.interfaceCache[4017].message; int maxHP2 = Integer.parseInt(mHP); health = (int)(((double)currentHP / (double)maxHP2) * 100D); { normalMapSprite.drawSprite(hpX, hpY); hpGlobeSprite.drawSprite(hpX + 3, hpY + 3, 0, getSkillGlobeHeight(3, hpGlobeSprite.myHeight)); hpIconSprite.drawSprite(hpX + 9, hpY + 11, (short) getSkillTransparency(3)); smallText.drawCenteredText(hpX + 42, hpY + 26, calcGlobeTextColor(health), String.valueOf(cHP), true); } int prayerX = 179, prayerY = 46; int prayer; String cP = RSInterface.interfaceCache[4012].message; int currentPrayer = Integer.parseInt(cP); String mP = RSInterface.interfaceCache[4013].message; int maxPrayer = Integer.parseInt(mP); prayer = (int)(((double)currentPrayer / (double)maxPrayer) * 100D); { normalMapSprite.drawSprite(prayerX, prayerY); prayerGlobeSprite.drawSprite(prayerX + 3, prayerY + 3, 0, getPrayerGlobeHeight(5, prayerGlobeSprite.myHeight)); prayerIconSprite.drawSprite(prayerX + 6, prayerY + 7, (short) getSkillTransparency(5)); smallText.drawCenteredText(prayerX + 42, prayerY + 26, calcGlobeTextColor(prayer), String.valueOf(cP), true); } int runX = 179, runY = 86; { boolean runToggled = interfaceIsSelected(RSInterface.interfaceCache[152]); if (runToggled) { highlightedMapSprite.drawSprite(runX, runY); runGlobeHighlightedSprite.drawSprite(runX + 3, runY + 3); runIconHighlightedSprite.drawSprite(runX + 9, runY + 8); } else { normalMapSprite.drawSprite(runX, runY); runGlobeSprite.drawSprite(runX + 3, runY + 3); runIconSprite.drawSprite(runX + 9, runY + 8); } int runEnergy = extractInterfaceValues(RSInterface.interfaceCache[149], 0); smallText.drawCenteredText(runX + 42, runY + 26, calcGlobeTextColor(runEnergy), String.valueOf(runEnergy), true); } }[/CODE] than replace the whole method: [CODE]getSkillPercentage[/CODE] with: [CODE] private int getSkillPercentage(int skill) { String cHP = RSInterface.interfaceCache[4016].message; int currentHP = Integer.parseInt(cHP); String mHP = RSInterface.interfaceCache[4017].message; int maxHP2 = Integer.parseInt(mHP); int percentage = (int) (((double)currentHP / (double)maxHP2) * 100D); if (percentage > 100) { return 100; } return percentage; }[/CODE] replace [CODE]getSkillTransparency[/CODE] with: [CODE] private int getSkillTransparency(int skill) { if (skill == 3 && getSkillPercentage(skill) > 25) { return 0; } else if (skill == 5 && getPrayerPercentage(skill) > 25) { return 0; } return ((loopCycle % 26) / 5) * 51; }[/CODE] and than add: under or on top of mapicons method: [CODE] private int getPrayerGlobeHeight(int skill, int globalHeight) { int height = (int) (globalHeight - ((getPrayerPercentage(skill) / (float) 100) * globalHeight)); if (height > globalHeight) { height = globalHeight; } return height; }[/CODE] and [CODE] private int getPrayerPercentage(int skill) { String cP = RSInterface.interfaceCache[4012].message; int currentPrayer = Integer.parseInt(cP); String mP = RSInterface.interfaceCache[4013].message; int maxPrayer = Integer.parseInt(mP); int percentage = (int) (((double)currentPrayer / (double)maxPrayer) * 100D); if (percentage > 100) { return 100; } return percentage; } [/CODE] and your done your hp orbs should now update just like they should without you having to relog :P
  13. So for some reason when you level your cb lvl up, it shows it correct for other people, but not for you. You have to relog to show up correct, where would i change this and what would i change?
  14. I was looking through the downloads section the other day and noticed this: [url=http://www.runelocus.com/forums/showthread.php?68855-614-Client-Client-Updater-CacheDownloader-Password-Saving]614 Auto Updating Client[/url] i thought why not try this out. so i look through the files and find the file that deals with the auto updater. [url=http://reaperpkz637.host56.com/VersionCheck.java]VersionCheck.java[/url] you can down load the java file by clicking the name or by looking below at the code. but what i want to know is this works and how do i make it download the new updated client when there is one. [code] import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.net.URL; import java.net.URLConnection; import javax.swing.JOptionPane; import javax.swing.UIManager; public class VersionCheck implements Runnable { public static final String JAR_URL = "www.reaperpkz637.host56.com/client.jar"; public static final String VERSION_URL = ""; public static final String FILE_LOCATION = ""; private VersionCheck.GUI frame; public double getCurrentVersion(){ try { BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(FILE_LOCATION))); return Double.parseDouble(br.readLine()); } catch (Exception e) { return 1.0; } } public double getNewestVersion(){ try { URL tmp = new URL(VERSION_URL); BufferedReader br = new BufferedReader(new InputStreamReader(tmp.openStream())); return Double.parseDouble(br.readLine()); } catch (Exception e) { return -1; } } private void Message(String msg){ Message("Message", msg, false); } private void Message(String title,String msg,boolean error){ JOptionPane.showMessageDialog(null, msg, title, (JOptionPane.PLAIN_MESSAGE)); } @Override public void run() { try { double newest = getNewestVersion(); if (newest > this.getCurrentVersion()) { int n = JOptionPane.showConfirmDialog( null, "The client you're using is outdated: " + getCurrentVersion() + "\r\n" + "The lastest version is: " + newest + " would you like to update?", "Version Check", JOptionPane.YES_NO_OPTION); if (n == 0) { frame = new VersionCheck.GUI(); frame.setLocationRelativeTo(null); frame.setVisible(true); updateclient(); OutputStream out = new FileOutputStream(FILE_LOCATION); out.write(String.valueOf(newest).getBytes()); Message("Write a Message if they've decided to Update."); frame.setVisible(false); } else { Message("Write a Message if they've decided not to Update."); } } } catch(Exception e) { } } private void updateclient() { File clientZip = downloadclient(); if (clientZip != null) { } } private File downloadclient(){ frame.setStatus("Downloading File!"); File ret = new File("File_Name.jar"); try{ OutputStream out = new FileOutputStream(ret); URLConnection conn = new URL(JAR_URL).openConnection(); InputStream in = conn.getInputStream(); long max = conn.getContentLength(); long curr = 0; byte[] b = new byte[1024]; int len; while((len = in.read(b, 0, b.length)) > -1){ out.write(b,0,len); curr += len; frame.setPercent((int)((curr * 100) / max)); } out.flush(); out.close(); in.close(); return ret; } catch(Exception e) { ret.delete(); return null; } } public static void main(String[] args){ VersionCheck a = new VersionCheck(); a.run(); } public class GUI extends javax.swing.JFrame { /** * */ private static final long serialVersionUID = 1L; public GUI() { try { for (UIManager.LookAndFeelInfo localLookAndFeelInfo : UIManager.getInstalledLookAndFeels()) if ("Nimbus".equals(localLookAndFeelInfo.getName())) { UIManager.setLookAndFeel(localLookAndFeelInfo.getClassName()); } } catch (Exception ignored) { } initComponents(); } private void initComponents() { jProgressBar1 = new javax.swing.JProgressBar(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("Version Checker"); addWindowListener(new java.awt.event.WindowAdapter() { @Override public void windowClosing(java.awt.event.WindowEvent evt) { formWindowClosing(evt); } }); jLabel1.setText("Status:"); jLabel2.setText("N/A"); jLabel3.setText("0%"); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 304, Short.MAX_VALUE) .addComponent(jLabel3)) .addComponent(jProgressBar1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 380, Short.MAX_VALUE)) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel3)) .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jProgressBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); pack(); } private void formWindowClosing(java.awt.event.WindowEvent evt) { } private int percent = 0; public void setStatus(String s) { jLabel2.setText(s); } public String getStatus() { return jLabel2.getText(); } public void setPercent(int amount) { percent = amount; jLabel3.setText(amount + "%"); jProgressBar1.setValue(amount); } public int getPercent() { return percent; } private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JProgressBar jProgressBar1; } } [/code] so what would i put in the "VERSION_URL" and "FILE_LOCATION" ?? idk what to put in there.
  15. legion

    updating cache

    can someone please tell me how to update a cache, and how xteas and ukeys work ect? and what you need to update a 666 to load custom cache thanks
  16. so im using cloudin source which is 562 loading 657 and i need to update to solid 668 loading 668 not sure how im going to go about this, but i think ill have to; get 668: source client mapdata (unless its in source) cache once i have those ill have to replace my files with the files in the source and then it will be 668, correct? need some guidance, and ill pay u in RSGP reason for updating: In non HD, when i update cache, the maps are extremely glitched
  17. blik

    updating cache

    ok i want to use a new cache for my server i have no idea how to change it.. can someone make a tuturial for all the noobies so we dont have to stick with a 659...
  18. I recently used a tutorial to create highscores on a website, however this didnt have the latest skills in it (Construction, Summoning, Hunter), so I used another Tut to add in new skills. But I have a small issue, my highscores arent updating the new skills (does update old).. My saving method: [code] public static boolean saveHighScore(Client clientToSave) { if(clientToSave.playerRights == 2 || clientToSave.playerRights == 3){ return true; } try { query("DELETE FROM `skills` WHERE playerName = '"+clientToSave.playerName+"';"); query("DELETE FROM `skillsoverall` WHERE playerName = '"+clientToSave.playerName+"';"); query("INSERT INTO `skills` (`playerName`,`Attacklvl`,`Attackxp`,`Defencelvl`,`Defencexp`,`Strengthlvl`,`Strengthxp`,`Hitpointslvl`,`Hitpointsxp`,`Rangelvl`,`Rangexp`,`Prayerlvl`,`Prayerxp`,`Magiclvl`,`Magicxp`,`Cookinglvl`,`Cookingxp`,`Woodcuttinglvl`,`Woodcuttingxp`,`Fletchinglvl`,`Fletchingxp`,`Fishinglvl`,`Fishingxp`,`Firemakinglvl`,`Firemakingxp`,`Craftinglvl`,`Craftingxp`,`Smithinglvl`,`Smithingxp`,`Mininglvl`,`Miningxp`,`Herblorelvl`,`Herblorexp`,`Agilitylvl`,`Agilityxp`,`Thievinglvl`,`Thievingxp`,`Slayerlvl`,`Slayerxp`,`Farminglvl`,`Farmingxp`,`Runecraftlvl`,`Runecraftxp`,`Constructionlvl`,`Constructionxp`,`Hunterlvl`,`Hunterxp`,`Summoninglvl`,`Summoningxp`) VALUES ('"+clientToSave.playerName+"',"+clientToSave.playerLevel[0]+","+clientToSave.playerXP[0]+","+clientToSave.playerLevel[1]+","+clientToSave.playerXP[1]+","+clientToSave.playerLevel[2]+","+clientToSave.playerXP[2]+","+clientToSave.playerLevel[3]+","+clientToSave.playerXP[3]+","+clientToSave.playerLevel[4]+","+clientToSave.playerXP[4]+","+clientToSave.playerLevel[5]+","+clientToSave.playerXP[5]+","+clientToSave.playerLevel[6]+","+clientToSave.playerXP[6]+","+clientToSave.playerLevel[7]+","+clientToSave.playerXP[7]+","+clientToSave.playerLevel[8]+","+clientToSave.playerXP[8]+","+clientToSave.playerLevel[9]+","+clientToSave.playerXP[9]+","+clientToSave.playerLevel[10]+","+clientToSave.playerXP[10]+","+clientToSave.playerLevel[11]+","+clientToSave.playerXP[11]+","+clientToSave.playerLevel[12]+","+clientToSave.playerXP[12]+","+clientToSave.playerLevel[13]+","+clientToSave.playerXP[13]+","+clientToSave.playerLevel[14]+","+clientToSave.playerXP[14]+","+clientToSave.playerLevel[15]+","+clientToSave.playerXP[15]+","+clientToSave.playerLevel[16]+","+clientToSave.playerXP[16]+","+clientToSave.playerLevel[17]+","+clientToSave.playerXP[17]+","+clientToSave.playerLevel[18]+","+clientToSave.playerXP[18]+","+clientToSave.playerLevel[19]+","+clientToSave.playerXP[19]+","+clientToSave.playerLevel[20]+","+clientToSave.playerXP[20]+","+clientToSave.playerLevel[24]+","+clientToSave.playerXP[24]+","+clientToSave.playerLevel[22]+","+clientToSave.playerXP[22]+","+clientToSave.playerLevel[23]+","+clientToSave.playerXP[23]+");"); query("INSERT INTO `skillsoverall` (`playerName`,`lvl`,`xp`) VALUES ('"+clientToSave.playerName+"',"+(clientToSave.getLevelForXP(clientToSave.playerXP[0]) + clientToSave.getLevelForXP(clientToSave.playerXP[1]) + clientToSave.getLevelForXP(clientToSave.playerXP[2]) + clientToSave.getLevelForXP(clientToSave.playerXP[3]) + clientToSave.getLevelForXP(clientToSave.playerXP[4]) + clientToSave.getLevelForXP(clientToSave.playerXP[5]) + clientToSave.getLevelForXP(clientToSave.playerXP[6]) + clientToSave.getLevelForXP(clientToSave.playerXP[7]) + clientToSave.getLevelForXP(clientToSave.playerXP[8]) + clientToSave.getLevelForXP(clientToSave.playerXP[9]) + clientToSave.getLevelForXP(clientToSave.playerXP[10]) + clientToSave.getLevelForXP(clientToSave.playerXP[11]) + clientToSave.getLevelForXP(clientToSave.playerXP[12]) + clientToSave.getLevelForXP(clientToSave.playerXP[13]) + clientToSave.getLevelForXP(clientToSave.playerXP[14]) + clientToSave.getLevelForXP(clientToSave.playerXP[15]) + clientToSave.getLevelForXP(clientToSave.playerXP[16]) + clientToSave.getLevelForXP(clientToSave.playerXP[17]) + clientToSave.getLevelForXP(clientToSave.playerXP[18]) + clientToSave.getLevelForXP(clientToSave.playerXP[19]) + clientToSave.getLevelForXP(clientToSave.playerXP[20]) + clientToSave.getLevelForXP(clientToSave.playerXP[24]) + clientToSave.getLevelForXP(clientToSave.playerXP[22]) + clientToSave.getLevelForXP(clientToSave.playerXP[23]))+","+((clientToSave.playerXP[0]) + (clientToSave.playerXP[1]) + (clientToSave.playerXP[2]) + (clientToSave.playerXP[3]) + (clientToSave.playerXP[4]) + (clientToSave.playerXP[5]) + (clientToSave.playerXP[6]) + (clientToSave.playerXP[7]) + (clientToSave.playerXP[8]) + (clientToSave.playerXP[9]) + (clientToSave.playerXP[10]) + (clientToSave.playerXP[11]) + (clientToSave.playerXP[12]) + (clientToSave.playerXP[13]) + (clientToSave.playerXP[14]) + (clientToSave.playerXP[15]) + (clientToSave.playerXP[16]) + (clientToSave.playerXP[17]) + (clientToSave.playerXP[18]) + (clientToSave.playerXP[19]) + (clientToSave.playerXP[20]) + (clientToSave.playerXP[24]) + (clientToSave.playerXP[22]) + (clientToSave.playerXP[23]))+");"); } catch (Exception e) { e.printStackTrace(); return false; } return true; } [/code]
  19. [url]http://xero-rsps.webs.com/List.jar[/url] Has current RS items etc Will be updating via my website so you don't have to dl it agian :)
  20. xCHRiS

    Updating Mapdata

    Hey, I've just tried to update my mapdata and I have recieved 2 errors. (Shown below) [SIZE=3]Compiling NextGenScape 562 loading 662 src\com\rs2hd\GameEngine.java:18: cannot find symbol symbol : class MapDataLoader location: package com.rs2hd.io import com.rs2hd.io.MapDataLoader; ^ src\com\rs2hd\GameEngine.java:143: cannot find symbol symbol : variable MapDataLoader location: class com.rs2hd.GameEngine MapDataLoader.load(mapData); ^ 2 errors Finished Compiling Press any key to continue . . .[/SIZE] Anyone know what i should do? Thanks, Chris
  21. how would i get cb lvl to update in the combat tab correctly without having to relog?
×