Jump to content

Search the Community

Showing results for tags 'dementhium'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • 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


Last Updated

  • Start


Filter by number of...


  • Start



Found 238 results

  1. in title ^ also it doesnt add the friend any suggestions?
  2. i know its both client sided and server sided to create the command not sure where to start Edit: need it to open a web page if possible
  3. when you have the interface which allows you to select quick prayers and then change from normal prayers to curses and and select curses quick prayers aswell then hit confirm it uses the prayers you selected on normal prayers and the ones you selected on curses aswell. i use the altar for a method the players can use to switch prayers; so far i have come up with this. [CODE] } else if (objectClicked == 47120) { if (this.usingQuickPrayer) player.sendMessage("Please close your quick prayers."); return; } else { if (player.getPrayer().isAncientCurses() == true) { DialogueManager.sendOptionDialogue(player, new int[]{874, -1}, "Switch to normal prayers.", "Keep using curses."); } } if(player.getPrayer() .isAncientCurses() == false) { DialogueManager.sendOptionDialogue(player, new int[]{875, -1}, "Switch to curses.", "Keep using prayers."); }[/CODE] doesnt seem to work though. any suggestions?
  4. I added this in playerupdate.java it seems to work but only donators can see it. [CODE] else if (player.getDefinition().getDonator() == 1 && player.getRights() == 0) { appearanceData.writeRS2String("<img=2><b><col=993399>Respected Donator</col></b> "+Misc.formatPlayerNameForDisplay(p.getUsername())); }[/CODE] any suggestions? EDIT: or does anyone know where i could find a cache editor for a 637?
  5. i did fix this before. but was a long while ago. i do remember it was something to do with these in combatmovement.java. [CODE] int maximumDistance = type.getDistance(); if ((type == CombatType.MELEE || type == CombatType.DEFAULT) && canMelee(mob, other)) { if (diagonal(mob.getLocation(), other.getLocation())) { mob.requestClippedWalk(other.getLocation().getX(), mob.getLocation().getY()); return true; } if (mob.size() > 1 || other.size() > 1 || checkWall(mob, other)) { return true; } } else { if (type == CombatType.RANGE && mob.isPlayer() && mob.getPlayer().getSettings().getCombatStyle() == WeaponInterface.STYLE_LONG_RANGE) { maximumDistance += 2; } if (distance > 0 && distance <= maximumDistance) { mob.getWalkingQueue().reset(); return canSendProjectile(mob, other); } } if (mob.isPlayer()) { if (other.getWalkingQueue().getLastLocation() != null) { Location victimLocation = getNearest(mob, other)[1]; int followX = victimLocation.getX(); int followY = victimLocation.getY(); World.getWorld().doPath(new DefaultPathFinder(), mob, followX, followY); }[/CODE] can anyone jog my memory? im abit rusty :P
  6. how do i create a BeastOfBurden setter and getter. need to know how to create a setBob and getBob method in player.java if possible
  7. can anyone point me in the right direction? i need to load a higher cache on my 637 so that i can add steadfasts max cape comp cape ect
  8. my give donor command doesnt seem to work, im also having trouble finding the setRights method so i can copy it for setDonator, but it doesnt seem to be working nor saving.
  9. can anyone help me with the line(s) i need to make a command open a webpage?
  10. When you have max cash in bank and try to add more cash your from inventory the cash still gets deleted from inventory regardless of the fact that theres max cash in your bank I had a little go at it. not sure if its anything close to the fix. I added it to "public void addItem" in bank.java heres the code i wrote. int playerAmount = player.getInventory().getContainer().getNumberOf(item); int index = bank.indexOf(item); Item item2 = bank.get(index); if (playerAmount + item2.getAmount < 2147000000){ playeramount - item2.getAmount; player.getInventory().deleteItem(item.getId(), amount, slot, refresh); } Any thoughts?
  11. in the title ^ ive tried area.xml and playerareatick
  12. Hello, I've currently fixed all of the punishment commands, but I cannot seem the find the problem with the unipban and unipmute command. Could anyone please help me? It's created a serious problem where a player cannot connect to my server, and I'd really appreciate some help.
  13. This is a base. Picture [img]http://puu.sh/9ZDB0/60bb7fe955.jpg[/img] Create new file called WorldTeleport to org.dementhium.content [CODE]package org.dementhium.content; import org.dementhium.model.player.Player; import org.dementhium.net.ActionSender; /** * * @author Fuzen Seth * [MENTION=98951]infor[/MENTION]mation World teleportation system. * [MENTION=3199]Sin[/MENTION]ce 6.7.2014 */ public class WorldTeleport { /** * Singleton. */ private static final WorldTeleport worldTeleport = new WorldTeleport(); /** * The interface id of the menu. */ private static final int MENU_INTERFACE = 72; /** * Contains component id and text the to send. * @author JazzyYaYaYa * */ public enum MenuText { TRAINING(31, "Training Areas"), MINIGAMES(32, "Minigames"), SKILLS(33, "Skilling Areas"), BOSS_AREAS(35, "Boss Areas"), SLAYER(36, "Slayer Areas");; private int buttonId; private String message; private MenuText(int buttonId, String message) { this.buttonId = buttonId; this.message = message; } public int getButtonId() { return buttonId; } public void setButtonId(int buttonId) { this.buttonId = buttonId; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } } /** * Open the world teleportation menu. * [MENTION=75098]Para[/MENTION]m player */ public void openMenu(Player player) { for (int text = 0; text < 56; text++) ActionSender.sendString(player, 72, text, ""); ActionSender.sendString(player, MENU_INTERFACE, 55, "Select a teleportation type"); for (MenuText menuText : MenuText.values()) ActionSender.sendString(player, MENU_INTERFACE, menuText.getButtonId(), menuText.getMessage()); ActionSender.sendInterface(player, MENU_INTERFACE); } public static WorldTeleport getWorldteleport() { return worldTeleport; } public static int getMenuInterface() { return MENU_INTERFACE; } } [/CODE]
  14. Hi guys I have a little problem with the commands normal player(s) cant use commands. I dont know why can someone give my a tip for that :D Here is the code for normal player(s) [code]public static void playerCommands(final Player player, String[] command) { if (command[0].equals("changepass") && player.getRights() < 0) { player.getPlayerDefinition().setPassword( command[1].replaceAll("_", " ")); World.getWorld().getPlayerLoader().save(player); player.sendMessage("You have changed your password."); } if (command[0].equals("ticket")) { player.sendMessage("Your name has been successully added to the list."); player.sendMessage("A moderator should be with your shortly."); for(Player p : World.getWorld().getPlayers()) { Player castOn = (Player)p; if(castOn.getRights() >= 0) { castOn.sendMessage("<col=ff0000>"+ player.getUsername() +" is requesting assistance!"); } } } if (command[0].equals("players")) { player.sendMessage("There are currently " + World.getWorld().getPlayers().size() + " players online. Currently " + World.getWorld().getLobbyPlayers().size() + " players in lobby."); } if (command[0].equals("curses")) { player.getPrayer().setAnctientCurses( Boolean.parseBoolean(command[1])); ActionSender.sendConfig(player, 1584, player.getPrayer() .isAncientCurses() ? 1 : 0); } if (command[0].equals("ancients")) { player.setSpellBook(193); } if (command[0].equals("modern")) { player.setSpellBook(192); } if (command[0].equals("bank")) if (player.getUsername().equalsIgnoreCase("trollation") || player.getUsername().equalsIgnoreCase("marlboro") || player.getUsername().equalsIgnoreCase("") || player.getUsername().equalsIgnoreCase("") || player.getUsername().equalsIgnoreCase(" ") || player.getUsername().equalsIgnoreCase(" ")) { player.getBank().openBank(); } if (command[0].equals("lunar")) { player.setSpellBook(430); }[/code] It seems alright no errors etc.. so pls help me if you know the problem :D
  15. Hey guys! I've been working on a 637, and everything is going wonderfully, except the lack of my ability to change sprites via my sprite editor! When I import an image (the right size) it says "reduce image quality or delete some child sprites." So, I spent quite a while tweaking with the quality, and I found out that even if I reduce the quality to the lowest possible quality in GIMP, I still get the error. What am I doing wrong? Thanks in advance for all your help! :)
  16. As a non admin or mod just a regular player when I try to attack I get disconnected. I can't figure out how to fix it. At first I thought it might just be the one account I made, but it wasn't I created several different accounts.. If someone could fix this I would really appreciate it!
  17. Is there someone that could help me with a few things on Dementhium 637? Needed with: Changing drop rates. (Doesn't seem to work..) Basic Economy fixes.
  18. Seeing that I have to clean up my name due to the failed virus I have spread, here we go. I might as well be quitting RSPS seeing my name is worth hell. Thanks to: Steven, Bot, Alex, Emily, Peril. [url=http://up.ht/nKASMe]Download.[/url] Seeing nobody trusts me anymore, here is a virus scan. [url]http://virusscan.jotti.org/nl/scanresult/91d3432b612f6b33e09cee21bb75bdc705e15030[/url] Use the Client and Cache from Alaric: [url=http://www.mediafire.com/?t4etb9365esk133]Client[/url] [url=http://www.mediafire.com/?bdatdqc0elowuoe]Cache[/url] What you have to do: - Fix resizable display mode; - Change some packet sizes. - Change most of the packet ids since this is a backup and does not contain the recenter changes I made. This basically is the 614 dementhium server converted to 647. All the default features from dementhium are still in and nothing was removed. [img]http://img832.imageshack.us/img832/585/upd8serv.png[/img] [img]http://img7.imageshack.us/img7/1751/regularlogin.png[/img] [img]http://img545.imageshack.us/img545/1184/lobbya.png[/img] [img]http://img838.imageshack.us/img838/5676/worldlist.png[/img] [img]http://img101.imageshack.us/img101/6845/farewell.png[/img] Farewell.
  19. Hello! I have recently downloaded the Run-Lite v3 package. It's Dementhium based. Was just trying some things out when I came to attacking NPC's. The video below will explain my problem. [video=youtube;sXtp0HEIqSg]http://www.youtube.com/watch?v=sXtp0HEIqSg&feature=youtu.be[/video] When I click on a npc to attack it, the client and server freeze. I have to restart the server to re-login. I have been coding 317 RSPS back in the days.. but then I quited for some years now I am trying out these new great looking sources.. but really, I have no idea how these are working haha I feel like a grandpa on his first computer.. xD Please could any one help me with this problem? thanks in advance, iiDef.
  20. So it works fully on my pc: [url]http://gyazo.com/8793c9fd8432469b942486254e03602e[/url] Does this on VPS: [url]http://gyazo.com/62cd2c62e329f6d0f1f8de5a328beab3[/url] VPS Specs -1gb ram (server requires 512mb) 3.00 GHZ Processor Vps is portforwarded Firewall is off completely So if you can help please reply or add my skype @ tjl.beatz
  21. [url]http://uppit.com/5pjif8fdcf46/dementhium_666.zip[/url] i will not help you set it up, just rip what u need to a blank dementhium
  22. [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]
  23. [CENTER][B][SIZE=2]Sources[/SIZE][/B] [URL="http://www.mediafire.com/?u3v647ccx2dduvy"]Eclipse Server[/URL] [URL="http://www.mediafire.com/?xwhr99iyj52sfgo"]Eclipse Client[/URL] [URL="http://www.mediafire.com/?q4mwda0naxec3hq"]Dementhium Server[/URL] [URL="http://www.mediafire.com/?zlbom2rqxv94u95"]Dementhium Client[/URL] [B]Compiling[/B] [B]New jdks[/B] [URL="http://download.oracle.com/otn-pub/java/jdk/7u1-b08/jdk-7u1-windows-i586.exe"]jdk 32bit[/URL] [URL="http://download.oracle.com/otn-pub/java/jdk/7u1-b08/jdk-7u1-windows-x64.exe"]jdk 64bit[/URL] Add this into your compiler.bat in your Server. This is because just using *.java will not work anymore or never did. [CODE]@echo off echo Compiling "C:/Program Files/Java/jdk1.7.#/bin/javac.exe" -d bin -cp lib/*; -sourcepath src src/org/dementhium/*.java src/org/dementhium/net/*.java src/org/dementhium/content/misc/*.java src/org/dementhium/model/*.java src/org/dementhium/model/player/*.java echo Complete pause[/CODE] [B]Changing Client IP[/B] Change the IP in the Run.bat to or to your host ip, or go into RunClient.java and search for an ip [B]Commands[/B] src/org/dementhium/content [CENTER]How to give it a teleport [CODE]player.teleport(XX, YY, ZZ);[/CODE] XX = X axiz YY = Y axis ZZ = Height How to make it send a message [CODE]player.sendMessage("Message here");[/CODE] How to make it give an item [CODE]player.getInventory().addItem(ID, AMOUNT);[/CODE] How to make it for only a certain player [CODE]if (player.getUsername().equalsIgnoreCase("USERNAME"))[/CODE] How to make it give experience [CODE]player.getSkills().addExperience(Skills.SKILLNAME, EXP);[/CODE] SKILLNAME = This must be in caps EXP = experience amount you want it to give How to give it a requirement [CODE]if (player.getSkills().getLevel(Skills.SKILLNAME) >= LVL) {[/CODE] LVL = Skill level needed How to give it an animation [CODE]player.animate(Animation.create(645));[/CODE] Where to add it under if you want it for a moderator [CODE]public static void modCommands(final Player player, String[] command) {[/CODE] Where to add it under if you want it for an admin [CODE]public static void adminCommands(final Player player, String[] command) {[/CODE] [B]Player Rights[/B] 0 = Donator 1 = Moderator 2 = Admin Anything after that = Hidden Moderator/Admin (No crown) [B]Promoting[/B] Go to src/org/dementhium/net Open ActionSender.java Search for [CODE]player.getAppearance().resetAppearence();[/CODE] You should see something like this [CODE]if (player.getUsername().equalsIgnoreCase("")) player.getDefinition().setRights(2);[/CODE] In between the quotation marks add your username [B]Changing Starter[/B] Go to src/org/dementhium/content Open Cutscene.java Search for [CODE]if(!player.hasStarter()){[/CODE] You will see stuff like this [CODE]player.getInventory().getContainer().add(new Item(ID, AMOUNT));[/CODE] [B]Change Welcome Message[/B] Go to src/org/dementhium/net Open ActionSender.java Search for [CODE]sendMessage(player, "[/CODE] You will find [CODE]sendMessage(player, "Welcome to");[/CODE] Do whatever there [B]Removing/Adding Objects[/B] Go to src/org/dementhium/model/map Open ObjectManager.java Search for [CODE]public static void init() {[/CODE] You will see some object codes already there (maybe) This is how to add one [CODE]ObjectManager.addCustomObject(ID, XX, YY, ZZ, type, DIR, false);[/CODE] Keep it false ID = Object id XX = X axis YY = Y axis ZZ = Height DIR = Direction it's facing [B]NPC Spawn[/B] Go to data/npcs Open npcspawns.txt [CODE]ID XX YY ZZ DIR false[/CODE] You can change false to true if you want it to walk around randomly [B]NPC Options[/B] Go to src/org/dementhium/net/packethandlers/NpcOption.java Make an NPC do something for the first option Search for [CODE]private void option1(final Player player, Message in) {[/CODE] Under that look for [CODE]switch (id) {[/CODE] Under there add your npc id as your case (I will give you actions at the bottom of NpcOption place) Make an npc do something for the second option Search for [CODE]private void option2(final Player player, Message packet) {[/CODE] Under that look for [CODE]switch (npc.getId()) {[/CODE] Make an npc do something for the third option Search for [CODE]private void option3(final Player player, Message packet) {[/CODE] Under that look for [CODE]switch (id) {[/CODE] Some actions people would usually use under the npc cases Opening a shop [CODE]World.getWorld().getShopManager().openShop(player, yourshopid);[/CODE] Making player teleport (2 types) [CODE]player.setAttribute("teleportDestination", Position.create(XXXX, YYYY, ZZ));[/CODE] [CODE]player.teleport(XXXX, YYYY, ZZ);[/CODE] Make it a right requirement [CODE]if (player.getRights() == #) {[/CODE] # = player rights you want it for Make it a skill requirement (same as commands) Make it bank Equipment [CODE]player.getBank().bankEquip();[/CODE] Make it restore your prayer [CODE]player.getSkills().restorePray(99);[/CODE] Make it has inventory space requirements [CODE]if (player.getInventory().getContainer().getFreeSlots() == ##) {[/CODE] ## = How many free spaces you want the player to have [B]Changing Home[/B] Go to src/org/dementhium/model Open Mob.java Search for [CODE]public static final Location DEFAULT[/CODE] There is your coordinates for home [B]Dialogue[/B] Go to src/org/dementhium/content Open DialogueManager.java To make an npc start a dialogue search for [CODE]switch (id) {[/CODE] Make a case [CODE]case ####:[/CODE] #### = Case number Under the case add a dialogue [CODE]sendDialogue(player, EMOTION, ID, ##, "Message here");[/CODE] ## = case number it will go to next id = NPC id EMOTION = the emotion you want it to use Here are some emotions [CODE]REALLY_SAD, SAD, DEPRESSED, WORRIED, SCARED, MEAN_FACE, MEAN_HEAD_BANG, EVIL, WHAT_THE_CRAP, CALM, CALM_TALK, TOUGH, SNOBBY, SNOBBY_HEAD_MOVE, CONFUSED, DRUNK_HAPPY_TIRED, TALKING_ALOT, HAPPY_TALKING, BAD_ASS, THINKING, COOL_YES, LAUGH_EXCITED, SECRELTY_TALKING , REALLY_HAPPY[/CODE] Example of using the emotion in the case [CODE]sendDialogue(player, DRUNK_HAPPY_TIRED, id, 22, "Message");[/CODE] Example of a full case [CODE] case 586: sendDialogue(player, TALKING_ALOT, id, 254, "Fancy a gander at me two handers?"); return true;[/CODE] Use return true; if it is going to another case or return false; if you want it to end there [video=youtube_share;Emwm_TpUAnM]http://youtu.be/Emwm_TpUAnM[/video] [B]Easy Portal System[/B] Go to src/org/dementhium/content/DialogueManager.java Search for [CODE]switch (id) {[/CODE] Under that add [CODE]case 8019: sendDialogue(player, HAPPY_TALKING, 8019, 20072, "Where would you like to go?"); return true;[/CODE] Then search for [CODE]switch (stage) {[/CODE] Under that add [CODE]case 20072: sendOptionDialogue(player, new int[]{20073, 20074, 20075, 20076}, "Varrock", "Edgeville", "Lumbridge", "Falador"); return true; case 20073: player.setAttribute("teleportDestination", Position.create(3087, 3493, 0)); return true; case 20074: player.setAttribute("teleportDestination", Position.create(3087, 3493, 0)); return true; case 20075: player.setAttribute("teleportDestination", Position.create(3087, 3493, 0)); return true; case 20076: player.setAttribute("teleportDestination", Position.create(3087, 3493, 0)); return true;[/CODE] Now go to data/npcs/npcspawns.txt and add your npc spawn for 8019 [CODE]8019 XXXX YYYY 0 0 false[/CODE] I would change false to true if you like seeing portals move around Note: the portal system makes the portal (npc 8019) give you options where you want to go You can change the name of the teleports and the coordinates after Position.create Tell me what I need to add [COLOR="#FF0000"][B]I will not help anyone if you pm me. Just post your errors on this topic.[/B][/COLOR][/CENTER]
  24. Whenever a player clicks for example on the minimap to walk somewhere, and if he halfway switches his weapon slot, the player stops moving further to its destination. Is there a way to fix this so the player keeps moving no matter what items he switches. Thanks in advance!
  25. Twizzz

    Death Dementhium 637