Jump to content

Flub

Members
  • Joined

  • Last visited

Everything posted by Flub

  1. RuneSuite does it again
  2. Flub replied to Jire's post in a topic in RSPS Tools Downloads
    Damn you're expanding the Jire software empire lol
  3. thanks jack
  4. Flub replied to Origin's post in a topic in 317
    Need an interface thx
  5. I've always liked being able to reference an item in code via static ints. I have a file named Items.java, and I simply reference Items.RUNE_ARROW for example. Well if you want this too, I made this to generate them. public static void main(String[] args) { try { File dumpedDefs = new File("./DumpedDefs.txt"); FileWriter fw = new FileWriter(dumpedDefs, false); //Loading ints into definitions[] init(); HashMap<String, ItemDefinition> map = new HashMap<>(); // Adding definitions into a hashmap in reverse // This replaces items that have duplicate names such as tinderbox // With the version which has the lowest ID // The key for the map is the name of the item for (int i = definitions.length - 1; i > 0; i--) { ItemDefinition itemDef = forId(i); if (!itemDef.description.contains("null")) { String stack = itemDef.isStackable() ? "_STACK" : ""; String noted = itemDef.isNoted() ? "_NOTED" : ""; String name = itemDef.name.replaceAll(" ", "_") .replaceAll("'", "") .replaceAll("!", "") .replaceAll("%", "") .replaceAll("-", "_") .replace("+", "PLUS") .replace("(", "") .replace(")", "") .replace(".", "_") .replace("&", "_") .replace("/", "_OF_") .replace(",", "_") .replace("?", "") .replaceAll("\"", "") + (itemDef.isNoted() ? noted : stack); if (Character.isDigit(name.charAt(0))) { name = "_" + name; } map.put(name, itemDef); } } ArrayList<Integer> itemArray = new ArrayList<>(); // Adding all of the items from the hashmap into an array that we can sort for (String key : map.keySet()) { ItemDefinition itemDef = map.get(key); itemArray.add(itemDef.id); } // printing the unsorted ArrayList System.out.println("Before Sorting: " + itemArray); // Sorting ArrayList in ascending Order Collections.sort(itemArray); // printing the sorted ArrayList System.out.println("After Sorting: " + itemArray); // Writing the file and removing junk from the name for (Integer integer : itemArray) { ItemDefinition itemDef = forId(integer); String stack = itemDef.isStackable() ? "_STACK" : ""; String noted = itemDef.isNoted() ? "_NOTED" : ""; String name = itemDef.name.replaceAll(" ", "_") .replaceAll("'", "") .replaceAll("!", "") .replaceAll("%", "") .replaceAll("-", "_") .replace("+", "PLUS") .replace("(", "") .replace(")", "") .replace(".", "_") .replace("&", "_") .replace("/", "_OF_") .replace(",", "_") .replace("?", "") .replaceAll("\"", "") + (itemDef.isNoted() ? noted : stack); if (Character.isDigit(name.charAt(0))) { name = "_" + name; } fw.write("public static int " + name.toUpperCase() + " = " + itemDef.id + "; \n"); } fw.close(); } catch (Exception e) { e.printStackTrace(); } } Example of the ints generated: public static int TOOLKIT = 1; public static int CANNONBALL_STACK = 2; public static int NULODIONS_NOTES = 3; public static int AMMO_MOULD = 4; public static int INSTRUCTION_MANUAL = 5; public static int CANNON_BASE = 6; public static int CANNON_BASE_NOTED = 7; public static int CANNON_STAND = 8; public static int CANNON_STAND_NOTED = 9; public static int CANNON_BARRELS = 10; public static int CANNON_BARRELS_NOTED = 11; public static int CANNON_FURNACE = 12; public static int CANNON_FURNACE_NOTED = 13; public static int RAILING_STACK = 14; public static int HOLY_TABLE_NAPKIN = 15; public static int MAGIC_WHISTLE = 16; public static int GRAIL_BELL = 17; public static int MAGIC_GOLD_FEATHER = 18; public static int HOLY_LONGBOW = 20; public static int COPSE_LONGBOW = 21; public static int ELEGANT_LONGBOW = 22; public static int MALEVOLENT_LONGBOW = 23; public static int RAT_POISON = 24; public static int RED_VINE_WORM_STACK = 25; public static int FISHING_TROPHY = 26; public static int FISHING_PASS = 27; public static int INSECT_REPELLENT = 28; public static int TINDERBOX = 29; public static int BUCKET_OF_WAX = 30; public static int LIT_BLACK_CANDLE = 32; public static int LIT_CANDLE = 33; public static int LIT_CANDLE_STACK = 34; public static int EXCALIBUR = 35; public static int CANDLE = 36; public static int CANDLE_NOTED = 37; Thanks boiz
  6. needed the sql, thanks
  7. Thanks Jack
  8. gravedig, need interface plz
  9. Flub replied to Juice's post in a topic in 317
    Need cache god damnit
  10. Masque - Massive respect to the effort put into this!
  11. Thanks for sharing Epic I always preferred buggy sources - like you said it's great to learn on.
  12. Thanks, annoyingly I tried using GPT-3 initially, however their API is pretty shitty when used through Java! This API is much nicer to work with, although less impressive
  13. So I thought it would be cool to make an NPC actually think and respond back to a player. Decided to make it happen lol. It uses an AI API to generate a HTTP response. Can convert to other 317 sources prolly. Each player can have their own convo with the AI, the history is unique to them. Can also be used as a chat system for an NPC.. Here I simple enabled a chat response for any NPC within 1 square of the player. Obviously this is dumb, it's just a demo
  14. Flub posted a post in a topic in Ruse
    Hey guys, whipped this up quickly. Make sure to add my previous snippets too. Genie.java package com.janus.world.content.randomevents; import com.janus.engine.task.Task; import com.janus.engine.task.TaskManager; import com.janus.model.Animation; import com.janus.model.Graphic; import com.janus.model.Item; import com.janus.model.container.impl.Inventory; import com.janus.world.World; import com.janus.world.entity.impl.npc.NPC; import com.janus.world.entity.impl.player.Player; import lombok.Getter; import lombok.Setter; public class Genie { @Getter @Setter private Player spawnedFor; @Getter @Setter private boolean claimed; public Genie(Player spawnedFor, boolean claimed) { this.spawnedFor = spawnedFor; this.claimed = claimed; } public static final int genieID = 409; private static final int lampID = 18782; private static final Item reward = new Item(lampID, 1); private static final Animation wave = new Animation(863); private static final Graphic smoke = new Graphic(188); public static void spawn(Player player) { String userName = player.getUsername(); Genie genie = player.getGenie(); genie.setClaimed(false); NPC genieNpc = new NPC(409, player.getPosition()); genieNpc.setSpawnedFor(player); World.register(genieNpc); genieNpc.setResetMovementQueue(true); genieNpc.performGraphic(smoke); genieNpc.getMovementQueue().setFollowCharacter(player); genieNpc.performAnimation(wave); genieNpc.forceChat(userName + " I have a reward for you!"); TaskManager.submit(new Task(60, false) { @Override protected void execute() { despawn(genieNpc); } }); } public static void handleInteraction(NPC genieNpc, Player player, int click) { String userName = player.getUsername(); Inventory invent = player.getInventory(); boolean freeSlot = invent.getFreeSlots() >= 1; Genie playerGenie = player.getGenie(); if (genieNpc.getSpawnedFor() == player && !player.getGenie().isClaimed() && playerGenie.getSpawnedFor() == player) { if (!freeSlot) { genieNpc.forceChat("You need to have at least one inventory slot free!"); return; } switch (click) { case 1: invent.add(reward); playerGenie.setClaimed(true); genieNpc.forceChat("Enjoy your reward " + userName + "!"); break; case 2: player.getPacketSender().sendMessage("You dismiss the Genie!"); genieNpc.forceChat("Okay, bye for now " + userName + "!"); break; } despawn(genieNpc); } else if (playerGenie.isClaimed()){ player.getPacketSender().sendMessage("You've already claimed your reward!"); } else { player.getPacketSender().sendMessage("This Genie isn't here for you!"); } } public static void despawn(NPC genieNpc) { if (genieNpc != null) { genieNpc.performAnimation(wave); genieNpc.performGraphic(smoke); TaskManager.submit(new Task(2, false) { @Override protected void execute() { World.deregister(genieNpc); } }); } } } Player.java @Getter @Setter private Genie genie = new Genie(this, false); NPCOptionPacketListener.java First Click: case Genie.genieID: Genie.handleInteraction(npc, player, 1); break; Second Click: case Genie.genieID: Genie.handleInteraction(npc, player, 2); break; SkillManager.java Anywhere in the addExperience method: if (Misc.percentageChance(10.0)) { //Change the value. This is a 10% change of a spawn - Way too high. Genie.spawn(player); }
  15. Flub posted a post in a topic in Ruse
    Hey guys. I see far too many servers using this method to generate percentage chance; int chance = 10; if (Misc.random(100) <= chance){ doSomething; } I made this one to simplify things: public static double randomDouble(double i) { return getRandomDouble(i); } public static boolean percentageChance(double percentage) { return percentage >= randomDouble(100); } You need the random double method in order for for the percentage chance to work. Shove them into Misc.java or something. Use like this (This example is generating a 10% chance) if (Misc.percentageChance(10.0)) { doSomething; } Noice
  16. Flub replied to Flub's post in a topic in Other (377-742)
    The guy sucks, so feel free to use them however you want lol
  17. Flub posted a post in a topic in Other (377-742)
    Eh - Alec Bissell (Supreme Leader of the worlds 'greatest' server) is literally a psychopath. Some of the insane things he spouts are honestly worrying. Not only does he believe that he is in command of the entire RSPS scene, he thinks he's the greatest person to have ever existed. Well - Here are his client files.. https://www.mediafire.com/file/1q03l4z81bsdyok/Snow_Clients.zip/file Also for some light reading, here is Snow literally paying someone to stop messing with his server by logging in with a headless client Oh and don't forget his actual business cards
  18. Damn some of the interfaces in this source are insane.
  19. Flub replied to Alching's post in a topic in RSPS Help
    He asked the question 5/16/2019 - I don't think he will reply now Topic locked
  20. Thanks Masque, this is a good release! That presets interface is perfect.
  21. Flub replied to Life's post in a topic in RSPS Show-off
    It's from 2016 😭
  22. Well.. they didn't obfuscate their clients.. Why! All IP's are found in 'GameType.java' All of the direct download links to models / maps / cache / sprites and textures follow the same template: CACHE("full_cache.zip", "https://runelinks.com/coliseum/full_cache.zip"), MISC_SPRITES("misc_sprites.zip", "https://runelinks.com/coliseum/misc_sprites.zip", true), REG_MAPS("reg_maps.zip", "https://runelinks.com/coliseum/reg_maps.zip", true), REG_MODELS("reg_models.zip", "https://runelinks.com/coliseum/reg_models.zip", true), DATA("data.zip", "https://runelinks.com/coliseum/data.zip", true); Replace the name of the server and you'll find it The file is 'CacheDownloadType.java' Coliseum: https://www.mediafire.com/file/cwegcnpdf8ic2xk/Coliseum_Client_Decompiled.zip/file CustomX: https://www.mediafire.com/file/0srypuefd7ets0s/CustomX_Client_Decompiled..zip/file Delrith: https://www.mediafire.com/file/j9wyk01zawzrp0n/Delrith_Client_Decompiled.zip/file Genesis: https://www.mediafire.com/file/rifivkac1zhc1e7/Genesis_Client_Decompiled.zip/file Enjoy
  23. Flub replied to Flub's post in a topic in 317
    Let me know if it's any good. I know it's old, but a lot of people have been asking for an OSRS PK release