Jump to content

All Activity

This stream auto-updates     

  1. Earlier
  2. Pat


    Are you using Intellij??
  3. Benjamynm3


    How is this ran? Not a clue with gradles
  4. i tried to add didnot work for me as i dont got the playerrights that yougot and also missing some plugins Could you help
  5. Yes it was made for ruse
  6. Nice release! I will not personally use because I want to learn as I go along and if I use your code that is cheating but thank you for sharing your code for the community to use! Anyone who is using commandpacketlistener to hold their commands should be implementing this code straight away.
  7. Want me to attempt implementing this for you? 😉
  8. oh lol did not read the name Xd
  10. sexyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
  11. Example on what you're adding: @CommandInfo( command = {"test", "tester", "testing"}, description = "Test command.", rights = {SUPPORT, MODERATOR, GLOBAL_MODERATOR, ADMINISTRATOR, OWNER, DEVELOPER, COMMUNITYMANAGER} ) public class Test extends Command { @Override public void execute(Player player, String command) { player.sendMessage("Lol working"); } } CommandInfo.java @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) //on class level public @interface CommandInfo { String[] command() default ""; String description() default ""; int donationAmountRequired() default 0; PlayerRights[] rights() default PlayerRights.PLAYER; } Command.java public class Command { protected Logger logger = Logger.getLogger(super.getClass()); public void execute(Player player, String command) {}; } CommandHandler.java @Log4j public class CommandHandler implements PacketListener { public static List<Class> commands = new ArrayList<>(); @SneakyThrows @Override public void handleMessage(Player player, Packet packet) { String command = Misc.readString(packet.getBuffer()); if (command.contains("\r") || command.contains("\n")) { return; } Command c; try { for(Class clazz : commands) { if(clazz.isAnnotationPresent(CommandInfo.class)) { Annotation annotation = clazz.getAnnotation(CommandInfo.class); CommandInfo commandInfo = (CommandInfo) annotation; String[] realCommand; if(command.contains(" ") && command.contains("-")) { int spaceIndex = command.indexOf(" "); int dashIndex = command.indexOf("-"); if(spaceIndex < dashIndex) { realCommand = command.split(" "); } else { realCommand = command.split("-"); } } else if(command.contains(" ")) { realCommand = command.split(" "); } else if(command.contains("-")) { realCommand = command.split("-"); } else { realCommand = new String[]{command}; } List<String> possibleCommands = Arrays.asList(commandInfo.command()); if(possibleCommands.contains(realCommand[0])) { c = (Command) clazz.newInstance(); List<PlayerRights> rights = Arrays.asList(commandInfo.rights()); if(player.getRights().shouldDebug() || rights.contains(player.getRights())) { if (player.getAmountDonated() >= ((CommandInfo) annotation).donationAmountRequired()) { c.execute(player, command); return; } else { player.sendMessage("You need a total donated value of $" + commandInfo.donationAmountRequired() + " to use this command."); } } } } } } catch (Exception exception) { exception.printStackTrace(); player.getPacketSender().sendMessage("Error executing that command."); } } } PacketConstants.java PACKETS[103] = new CommandPacketListener(); How to load commands: new FastClasspathScanner().matchSubclassesOf(Command.class, clazz -> { try { if (!Modifier.isAbstract(clazz.getModifiers())) { synchronized (GameServer.class) { CommandHandler.commands.add(clazz); } } }catch(Exception e) { logger.error("Error adding command " + clazz.getPackage() + "." + clazz.getName() + "\n " + e); } }).scan();
  12. DOMAIN


    case 15355: itemDef.name = "$1 Bond"; itemDef.modelZoom = 2322; itemDef.rotationY = 530; itemDef.rotationX = 513; itemDef.modelOffsetX = 8; itemDef.modelOffsetY = 12; itemDef.actions = new String[5]; itemDef.actions[4] = "Drop"; itemDef.actions[0] = "Claim"; itemDef.modelID = 46409; break; case 15356: itemDef.name = "$5 Bond"; itemDef.colourRedefine2 = 10000; itemDef.modelZoom = 2322; itemDef.rotationY = 530; itemDef.rotationX = 513; itemDef.modelOffsetX = 8; itemDef.modelOffsetY = 12; itemDef.actions = new String[5]; itemDef.actions[4] = "Drop"; itemDef.actions[0] = "Claim"; itemDef.modelID = 46409; break; case 15357: itemDef.name = "$10 Bond"; itemDef.colourRedefine2 = 20000; itemDef.modelZoom = 2322; itemDef.rotationY = 530; itemDef.rotationX = 513; itemDef.modelOffsetX = 8; itemDef.modelOffsetY = 12; itemDef.actions = new String[5]; itemDef.actions[4] = "Drop"; itemDef.actions[0] = "Claim"; itemDef.modelID = 46409; break; case 15358: itemDef.name = "$25 Bond"; itemDef.colourRedefine2 = 30000; itemDef.modelZoom = 2322; itemDef.rotationY = 530; itemDef.rotationX = 513; itemDef.modelOffsetX = 8; itemDef.modelOffsetY = 12; itemDef.actions = new String[5]; itemDef.actions[4] = "Drop"; itemDef.actions[0] = "Claim"; itemDef.modelID = 46409; break; case 15359: itemDef.name = "$50 Bond"; itemDef.colourRedefine2 = 40000; itemDef.modelZoom = 2322; itemDef.rotationY = 530; itemDef.rotationX = 513; itemDef.modelOffsetX = 8; itemDef.modelOffsetY = 12; itemDef.actions = new String[5]; itemDef.actions[4] = "Drop"; itemDef.actions[0] = "Claim"; itemDef.modelID = 46409; break; case 15360: itemDef.name = "$100 Bond"; itemDef.colourRedefine2 = 50000; itemDef.modelZoom = 2322; itemDef.rotationY = 530; itemDef.rotationX = 513; itemDef.modelOffsetX = 8; itemDef.modelOffsetY = 12; itemDef.actions = new String[5]; itemDef.actions[4] = "Drop"; itemDef.actions[0] = "Claim"; itemDef.modelID = 46409; break; If You want Guys for Model ID here 46409.gz
  13. DOMAIN


    Thanks So much Works Fully For Me
  14. Pat


    Hello Runeplace! I wrote this code for someone but they don't seem to want it so... Here. This class is based off an Enum @Bananastreet created for god statues. Kudos to Bananastreet! Why do you need to change how your server is handling the code for your scrolls? Because some parts of the code are duplicated which is causing an increase in memory. Creating an enum and storing the scrolls there is more easier for someone to add a new scroll and also more efficient, also yet again not duplicating code. You don't have to use my code 🙂 But you really should consider it. This code is server side only. You should not be asking if it needs to be added to the clients source code. This code was written for Ruse framework but can be easily modified to suit your server. Create a new Java file that must be an enum called MemberScrolls. Scroll over all of the implemented methods and paste my code replacing yours. import com.server.model.GameMode; import com.server.model.PlayerRights; import com.server.util.Misc; import com.server.world.content.PlayerPanel; import com.server.world.entity.impl.player.Player; import java.util.HashMap; import java.util.Map; import java.util.Objects; public enum MemberScrolls { TEN_SCROLL(10942, 10), TWENTY_SCROLL(10934, 20), FIFTY_SCROLL(10935, 50), ONE_HUNDRED_SCROLL(10943, 100); int itemId, scrollAmount; MemberScrolls(int itemId, int scrollAmount) { this.itemId = itemId; this.scrollAmount = scrollAmount; } static Map<Integer, MemberScrolls> scrolls = new HashMap<>(); static { for (MemberScrolls scroll : MemberScrolls.values()) { scrolls.put(scroll.getItemId(), scroll); } } public int getItemId() { return itemId; } public int getScrollAmount() { return scrollAmount; } public static boolean claimScroll(Player player, int itemId) { MemberScrolls scroll = scrolls.get(itemId); if (Objects.isNull(scroll)) { return false; } String name = scroll.name().toLowerCase().replace("_", " "); //Checking if the player is doing something. if (player.busy()) { player.getPacketSender().sendMessage("You cannot perform this action right now. " + "Please finish what you are doing first."); return false; } else {//If the player is not doing anything then this code will be read. player.getInventory().delete(scroll.getItemId(), 1); int points = scroll.getScrollAmount(); //Updating points. player.incrementAmountDonated(points);//Updating the total donated all in all. //Setting the points based on the scroll. player.getPointsHandler().setDonationPoints(points, true); //Sending a messaged with the scroll name and points claimed. player.getPacketSender().sendMessage("You claim your " + name + ". Your total funds have been updated."); //Checking if the player has enough points to move on to the next rank. checkForRank(player); //Refreshing the player panel ("Quest tab") to update the points gained. PlayerPanel.refreshPanel(player); return true; } } public static void checkForRank(Player player) { //Fetching the total amount a person has donated and storing the information to a new variable. int amountDonated = player.getAmountDonated(); //Storing string as no reason to duplicate. String noRankUpdate = "Your rank did not update due to being "; //Setting the rights to null so we can perform our rank check. PlayerRights rights = null; //Setting the players rank based on the amount donated. if (amountDonated >= 10) { rights = PlayerRights.REGULAR; } if (amountDonated >= 50) { rights = PlayerRights.SUPER; } if (amountDonated >= 250) { rights = PlayerRights.EXTREME; } if (amountDonated >= 750) { rights = PlayerRights.LEGENDARY; } if (amountDonated >= 2500) { rights = PlayerRights.ONYX; } //Checking if the player has the right already or they are a game mode that the rank cannot be changed. if (rights != null && rights != player.getRights() && !player.getRights().isStaff() && player.getGameMode() != GameMode.IRONMAN && player.getGameMode() != GameMode.HARDCORE_IRONMAN) { //Sending a message to the player if they are eligible for the rank. player.getPacketSender().sendMessage("You've become a " + Misc.formatText(rights.toString().toLowerCase()) + "! Congratulations!"); //Setting the players new rank player.setRights(rights); //Updating the players rank once the rank is set. player.getPacketSender().sendRights(); //Checking if the players game mode is anything other than a normal player. } else if (player.getGameMode() == GameMode.IRONMAN || player.getGameMode() == GameMode.HARDCORE_IRONMAN) { //If the player is not a normal player then they cannot have a rank update. player.getPacketSender().sendMessage(noRankUpdate + player.getGameMode().name().toLowerCase().replace("_", " ") + "."); } else {//Checking to see if the member is staff because that is the only rank left to check. player.getPacketSender().sendMessage(noRankUpdate + player.getRights().name().toLowerCase() + "."); //If the player is indeed a staff member then they will not have a rank update. } } } Save the file then make your way to the ItemActionPacketListener file. Search for: private static void firstAction(final Player player, Packet packet) { Scroll down to: Location targetLocation = player.getLocation(); Call the file and the method one line before or one line after like so Location targetLocation = player.getLocation(); MemberScrolls.claimScroll(player, itemId); Within the same file look for the id's to all the member scrolls, delete the whole case for them. Example below Delete from here case 10942: //all code inside break; To here for all of them and save your file then run your server and check out your fresh member scrolls! What do you do with the old MemberScrolls.java? click it. right click it. delete. Do you need some help adding this class? Hmu 😉 I will be happy to help. I do not give permission for anyone to charge for this code that I have just given for free. Feel free to point out any flaws in my code and I will be sure to rectify it 😉
  15. Website : click here. Welcome to CrystalPS , a server that was made to provide you with a unique experience with constant never seen before updates. Choose your class train your skills . Grab your gear , Make a team with your friends and start raiding! We have daily tasks for all skills including fishing firemaking woodcutting smithing mining runecrafting , Also the new custom skills! *Alot of custom items ---- *Classes interface *Alot of custom maps ---- *Pet combat *Main Quests ---- *Daily quests *Custom slayer ---- *Egg incubator interface *Custom teleportation interface ---- *182 osrs data *Quest log interface ---- *Raids + Custom raids *Active staff ---- *Custom Npcs *Equipment slots Upgrade ---- *Item fuser interface *New custom skills ---- *Afk system
  16. Machine

    Galaxy server

    Galaxy client and source cache
  17. Dear members We are hosting an event that will allow you the chance to help Runeplace grow! check the image below out to find more information in relation on how to be a part of this event. The image says it all! Invite your friends to our discord server for your chance to win The winners will be chosen from the invite manager log You must have at least 10 invites to be eligible for entry! If caught cheating to boost your invites you will be eliminated from the event and all further events. We ask you to kindly think of what you are doing before you do it. We appreciate the gesture of good will but please do not go to other Rsps communities posting any information regarding runeplace if they do not wish for you to do so, if we get reports that your username has been in breach of this rule then we will have no option other than to forfeit you from the event. Thank you for reading! Stay safe, stay well and stay you 🙂 ~Runeplace Staff
  18. Dear members We need to keep a familiar format to each release which gives members the chance to see what they are downloading before they hit that link. Things you must do Post some information about the content you are releasing. Post clear media of the content being used. Post a virus scan of your content to ensure the safety of our members. Post credits to who ever deserves them. (Do not release something as your own if you have only downloaded and re-uploaded.) We care for all of our members. If you miss lead them into harms way you will be permanently banned! (Full virus scans on the files and ensure there are no programs within your content will compromise the member) Failure to comply with this simple list will result in Your topic being removed A temporary ban A permanent ban without a chance to appeal If you feel I should add something to this list, message me to let me know!
  19. Pat


    The cache is with the files? Omniscient #119.zip
  20. Pat

    Necrotic Ruse

    This is not a leak this is a re-release so you do not have to download a torrent. Click me to download ↪ Server Features ↩ All credits to Necrotic for this release!
  21. Pat


    Thank you for your contribution to the community! People will love this xD
  22. Machine


    Loading 182 data Runelite integration All Osrs bosses Mobile app Norse is a unique OSRS experience with a twist, they not only aimed to emulate current version of OSRS content but also introduce their own new fresh content. Their theme is based on Norse mythology and Viking gods and they aimed to introduce new content in the form of quests, areas, NPC's and much more to build upon that theme and integrate more than your run of the mill copy of OSRS. Virus Scan VirusTotal.mp4 Media CLICK HERE TO DOWNLOAD Credits to SirReal - Head of Research and Development RSPSi - Lead Developer The Caddy - Sys Admin Perfection - Staff Manager Eiree - Community Manager Chance - Web/Graphic Design/Marketing Maximax - Modeller Enjoy!
  23. I dunno my dude it looks to be as there are certain models there that should be there, they might have removed their personal models before releasing or something
  24. This theme is for invision software only. Fluent Design Theme Edition is a combination of Fluent Design styles Microsoft, iOS Design, Android Design and Google Design. Click To download This file Full credits to Craigcollo for this theme
  25. Pat


    This is some test spam to test the discord bot.
  26. Purchase this banner advertisement for only $30 a month!


  1. Load more activity
  • Create New...