From bea505f34a76371501af6e4a10e592d3e485aba1 Mon Sep 17 00:00:00 2001 From: Daniel Ginovker Date: Sat, 2 Nov 2019 18:13:40 -0400 Subject: [PATCH] Revert "Bunch of changes" --- .../src/org/runite/GameLaunch.java | 44 -- .../src/org/keldagrim/Main.java | 167 ----- .../Crandor Server - 530 - World 1.bat | 4 - .../Crandor Server - 530 - World 2.bat | 4 - .../Crandor Server - 530 - World 3.bat | 4 - .../src/org/crandor/ServerConstants.java | 180 ----- .../org/crandor/gui/tab/StatisticsTab.java | 667 ------------------ Client/src/org/runite/Configurations.java | 4 +- Client/src/org/runite/jagex/GameShell.java | 6 +- .../production/09Scape/org/crandor/Util.java | 29 - .../production/09Scape/server.properties | 8 +- .../production/09Scape/server1.properties | 6 +- .../production/09Scape/server2.properties | 6 +- .../production/09Scape/server3.properties | 10 +- .../src/org/keldagrim/ServerConstants.java | 5 +- .../net/packet/WorldPacketRepository.java | 6 +- .../game/container/impl/BankContainer.java | 2 +- .../content/dialogue/DialogueInterpreter.java | 4 +- .../global/action/DropItemHandler.java | 6 +- .../global/consumable/CookingProperties.java | 4 +- .../crandor/game/content/skill/Skills.java | 9 +- .../crafting/armour/DragonCraftPulse.java | 4 +- .../free/crafting/armour/HardCraftPulse.java | 4 +- .../free/crafting/armour/SnakeSkinPulse.java | 4 +- .../free/crafting/armour/SoftCraftPulse.java | 4 +- .../skill/free/crafting/gem/GemCutPulse.java | 4 +- .../crafting/jewellery/JewelleryPulse.java | 4 +- .../crafting/pottery/FirePotteryPulse.java | 4 +- .../free/crafting/pottery/PotteryPulse.java | 4 +- .../free/crafting/spinning/SpinningPulse.java | 4 +- .../skill/free/fishing/FishingPulse.java | 8 +- .../free/gather/GatheringSkillPulse.java | 331 ++++----- .../skill/free/gather/SkillingResource.java | 465 +----------- .../free/runecrafting/RuneCraftPulse.java | 11 +- .../skill/free/smithing/SmithingPulse.java | 6 +- .../skill/member/farming/tool/SpadePulse.java | 4 +- .../member/fletching/FletchingPulse.java | 4 +- .../skill/member/herblore/HerbTarPulse.java | 4 +- .../skill/member/herblore/HerblorePulse.java | 8 +- .../skill/member/hunter/bnet/BNetNode.java | 4 +- .../member/summoning/SummoningCreator.java | 4 +- .../skill/member/thieving/Pickpocket.java | 36 +- .../member/thieving/PickpocketPulse.java | 5 +- .../content/skill/member/thieving/Stall.java | 22 +- .../member/thieving/StallThiefPulse.java | 3 +- .../org/crandor/game/events/GlobalEvent.java | 73 +- .../game/events/GlobalEventManager.java | 315 ++++++--- .../node/entity/npc/drop/NPCDropTables.java | 12 +- .../game/node/entity/player/ai/AIPlayer.java | 8 +- .../entity/player/ai/pvmbots/LowestBot.java | 23 +- .../entity/player/ai/pvmbots/PvMBots.java | 18 +- .../player/info/login/LoginConfiguration.java | 10 +- .../player/info/login/PlayerParser.java | 4 +- .../node/entity/player/info/portal/Perks.java | 72 +- .../node/entity/player/link/GlobalData.java | 12 +- .../game/node/item/GroundItemManager.java | 2 +- .../communication/CommunicationInfo.java | 2 +- .../src/org/crandor/game/world/GameWorld.java | 50 +- .../game/world/callback/CallbackHub.java | 3 +- Server/src/org/crandor/gui/tab/PlayerTab.java | 14 +- .../net/packet/in/ReportAbusePacket.java | 2 +- .../org/crandor/worker/MajorUpdateWorker.java | 3 +- .../src/plugin/command/AIPCommandPlugin.java | 1 + .../src/plugin/command/BetaCommandPlugin.java | 129 ++-- .../command/DeveloperCommandPlugin.java | 68 +- .../src/plugin/command/PerkCommandPlugin.java | 2 +- .../plugin/command/PlayerCommandPlugin.java | 165 ++--- .../inter/ExperienceLampInterface.java | 32 +- .../interaction/item/KeldagrimVotingBond.java | 10 +- .../object/ThievingGuidePlugin.java | 1 - .../player/LoginValidationPlugin.java | 15 + .../tutorial/TutorialCompletionDialogue.java | 7 +- Server/src/plugin/zone/GrandExchangeZone.java | 8 +- .../src/plugin/zone/WildernessAreaZone.java | 4 +- .../zone/neitiznot/YakArmourPlugin.java | 1 - 75 files changed, 746 insertions(+), 2446 deletions(-) delete mode 100644 09HDscape-client/src/org/runite/GameLaunch.java delete mode 100644 09HDscape-management-server/src/org/keldagrim/Main.java delete mode 100644 09HDscape-server/Crandor Server - 530 - World 1.bat delete mode 100644 09HDscape-server/Crandor Server - 530 - World 2.bat delete mode 100644 09HDscape-server/Crandor Server - 530 - World 3.bat delete mode 100644 09HDscape-server/src/org/crandor/ServerConstants.java delete mode 100644 09HDscape-server/src/org/crandor/gui/tab/StatisticsTab.java delete mode 100644 CompiledServer/production/09Scape/org/crandor/Util.java diff --git a/09HDscape-client/src/org/runite/GameLaunch.java b/09HDscape-client/src/org/runite/GameLaunch.java deleted file mode 100644 index bd93b73e4..000000000 --- a/09HDscape-client/src/org/runite/GameLaunch.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.runite; - -import org.runite.jagex.GameShell; - -/** - * Handles the launching of our Game Client. - * @author Keldagrim Development Team - * - */ -public class GameLaunch { - - /** - * The game settings. - */ - public static GameSetting SETTINGS = new GameSetting("RuneScape", Configurations.LOCAL_SERVER ? "127.0.0.1" : "localhost", 1, "live", false, false); - - /** - * The main method. - * @param args the arguments casted on runtime. - */ - public static void main(String[]args) { - for (int i = 0; i < args.length; i++) { - String[] cmd = args[i].split("="); - switch (cmd[0]) { - case "ip": - SETTINGS.setIp(cmd[1]); - break; - case "world": - SETTINGS.setWorld(Integer.parseInt(cmd[1])); - break; - } - } - launch(false); - } - - /** - * Launches the client in a determined mode. - * @param swiftkit If we're launching swift kit. - */ - public static void launch(boolean swiftkit) { - GameShell.launchDesktop(); - } - -} diff --git a/09HDscape-management-server/src/org/keldagrim/Main.java b/09HDscape-management-server/src/org/keldagrim/Main.java deleted file mode 100644 index b4c683f24..000000000 --- a/09HDscape-management-server/src/org/keldagrim/Main.java +++ /dev/null @@ -1,167 +0,0 @@ -package org.keldagrim; - -import org.keldagrim.classloader.ClassLoadServer; -import org.keldagrim.net.NioReactor; -import org.keldagrim.net.packet.WorldPacketRepository; -import org.keldagrim.system.ShutdownSequence; -import org.keldagrim.system.mysql.SQLManager; -import org.keldagrim.system.util.Command; -import org.keldagrim.world.GameServer; -import org.keldagrim.world.PlayerSession; -import org.keldagrim.world.WorldDatabase; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.NetworkInterface; -import java.util.Scanner; - -/** - * The main class. - * @author Emperor - * - */ -public final class Main { - - /** - * The commands. - */ - private static final Command[] COMMANDS = { - new Command("-commands", "Print a list of all commands.") { - @Override - public void run(String...args) { - for (Command c : COMMANDS) { - System.out.println("Command " + c.getName() + ": " + c.getInfo()); - } - } - }, - new Command("-s", "Safely shuts down the server.") { - @Override - public void run(String...args) { - System.out.println("Shutting down Management server..."); - ShutdownSequence.shutdown(); - } - }, - new Command("-debug", "Debug world info.") { - @Override - public void run(String...args) { - System.out.println("---------------------------------------------"); - for (GameServer server : WorldDatabase.getWorlds()) { - if (server != null) { - System.out.println("World [id=" + server.getInfo().getWorldId() + ", IP=" + server.getInfo().getAddress() + ", country=" + server.getInfo().getCountry() + ", members=" + server.getInfo().isMembers() + ", players=" + server.getPlayers().size() + ", active=" + server.isActive() + "]."); - } - } - } - }, - new Command("-pinfo", "Debugs player information (usage: -pinfo emperor).") { - @Override - public void run(String...args) { - String name = args[1]; - PlayerSession player = WorldDatabase.getPlayer(name); - if (player == null) { - System.out.println("Player " + name + " was not registered!"); - return; - } - System.out.println("Player [name=" + name + ", world=" + player.getWorldId() + ", active=" + player.isActive() + "]."); - } - }, - new Command("-update", "[ticks]? Calls an update on all the game servers (-update -1 to cancel).") { - @Override - public void run(String...args) { - int ticks = args.length > 1 ? Integer.parseInt(args[1]) : 500; - for (GameServer server : WorldDatabase.getWorlds()) { - if (server != null && server.isActive()) { - WorldPacketRepository.sendUpdate(server, ticks); - } - } - } - }, - new Command("-reloadconfig", "Reloads the configurations of all worlds.") { - - @Override - public void run(String... args) { - for (GameServer server : WorldDatabase.getWorlds()) { - if(server == null) { - continue; - } - WorldPacketRepository.sendConfigReload(server); - } - } - }, - - new Command("-rlcache", "Reloads launcher/client resource cache") { - @Override - public void run(String... args) { - ClassLoadServer.resetResourceCache(); - System.out.println("Reloaded resource cache!"); - } - }, - - new Command("-kick", "Kicks a player from the MS (not ingame).") { - @Override - public void run(String... args) { - String name = args[1]; - PlayerSession player = WorldDatabase.getPlayer(name); - if (player == null) { - System.out.println("Player " + name + " was not registered!"); - return; - } - player.getWorld().getPlayers().remove(name); - player.setWorldId(0); - System.out.println("Kicked player " + name + "!"); - } - } - }; - - /** - * The main method. - * @param args The arguments cast on runtime. - * @throws Throwable When an exception occurs. - */ - public static void main(String...args) throws Throwable { - if (!isLocallyHosted(ServerConstants.HOST_ADDRESS)) { - System.err.println("WARNING: Configure host address in server constants!"); - } - System.out.println("-------- 530 Management server --------"); - System.out.println("Starting up..."); - SQLManager.init(); - //NioReactor.configure(ServerConstants.PORT).start(); - NioReactor.configure(5555).start(); - new ClassLoadServer().start(); - Runtime.getRuntime().addShutdownHook(new ShutdownSequence()); - System.out.println("Status: ready."); - System.out.println("Use -commands for a list of commands!"); - Scanner s = new Scanner(System.in); - while (s.hasNext()) { - try { - String command = s.nextLine(); - if (!command.startsWith("-")) { - continue; - } - String[] arguments = command.split(" "); - command = arguments[0]; - for (Command c : COMMANDS) { - if (c.getName().equals(command)) { - System.out.println("Handling command \"" + command + "\"!"); - c.run(arguments); - } - } - } catch (Throwable t) { - t.printStackTrace(); - } - } - s.close(); - } - - /** - * Checks if the Management server is locally hosted. - * @return {@code True} if so. - * @throws IOException When an I/O exception occurs. - */ - private static boolean isLocallyHosted(String ip) throws IOException { - InetAddress address = InetAddress.getByName(ip); - if (address.isAnyLocalAddress() || address.isLoopbackAddress()) { - return true; - } - return NetworkInterface.getByInetAddress(address) != null; - } -} \ No newline at end of file diff --git a/09HDscape-server/Crandor Server - 530 - World 1.bat b/09HDscape-server/Crandor Server - 530 - World 1.bat deleted file mode 100644 index c07f0a926..000000000 --- a/09HDscape-server/Crandor Server - 530 - World 1.bat +++ /dev/null @@ -1,4 +0,0 @@ -@echo off -@title World 1 -java -server -Xms512m -Xmx1536m -XX:NewSize=32m -XX:MaxPermSize=128m -XX:+UseConcMarkSweepGC -XX:+ExplicitGCInvokesConcurrent -XX:+AggressiveOpts -cp bin;data/libs/*;data/libs/slf4j/*; org.crandor.Main server1.properties -pause \ No newline at end of file diff --git a/09HDscape-server/Crandor Server - 530 - World 2.bat b/09HDscape-server/Crandor Server - 530 - World 2.bat deleted file mode 100644 index cf5814e6f..000000000 --- a/09HDscape-server/Crandor Server - 530 - World 2.bat +++ /dev/null @@ -1,4 +0,0 @@ -@echo off -@title World 2 -java -server -Xms1024m -Xmx1536m -XX:NewSize=32m -XX:MaxPermSize=128m -XX:+UseConcMarkSweepGC -XX:+ExplicitGCInvokesConcurrent -XX:+AggressiveOpts -cp bin;data/libs/*;data/libs/slf4j/*; org.crandor.Main server2.properties -pause diff --git a/09HDscape-server/Crandor Server - 530 - World 3.bat b/09HDscape-server/Crandor Server - 530 - World 3.bat deleted file mode 100644 index ba7ae6d7f..000000000 --- a/09HDscape-server/Crandor Server - 530 - World 3.bat +++ /dev/null @@ -1,4 +0,0 @@ -@echo off -@title World 3 -java -server -Xms1024m -Xmx1536m -XX:NewSize=32m -XX:MaxPermSize=128m -XX:+UseConcMarkSweepGC -XX:+ExplicitGCInvokesConcurrent -XX:+AggressiveOpts -cp bin;data/libs/*;data/libs/slf4j/*; org.crandor.Main server3.properties -pause diff --git a/09HDscape-server/src/org/crandor/ServerConstants.java b/09HDscape-server/src/org/crandor/ServerConstants.java deleted file mode 100644 index f9e75b77d..000000000 --- a/09HDscape-server/src/org/crandor/ServerConstants.java +++ /dev/null @@ -1,180 +0,0 @@ -package org.crandor; - -import org.crandor.game.system.mysql.SQLManager; -import org.crandor.game.world.map.Location; -import org.crandor.tools.mysql.Database; - -/** - * A class holding constants of the server. - * @author Emperor - * @author Vexia - * - */ -public final class ServerConstants { - - /** - * The administrators. - */ - public static final String[] ADMINISTRATORS = { - "RedSparr0w", - }; - - /** - * The cache path. - */ - public static final String CACHE_PATH = "data/cache/"; - - /** - * The store path. - */ - public static final String STORE_PATH = "data/store/"; - - /** - * The player account path. - */ - public static final String PLAYER_SAVE_PATH = "data/players/"; - - /** - * The maximum amount of players. - */ - public static final int MAX_PLAYERS = (1 << 11) - 1; - - /** - * The maximum amount of NPCs. - */ - public static final int MAX_NPCS = (1 << 15) - 1; - - /** - * The start location for a fresh account. - */ - public static final Location START_LOCATION = Location.create(3094, 3107, 0); - - /** - * The main home teleport location. - */ - public static final Location HOME_LOCATION = Location.create(3222, 3218, 0); - - /** - * The teleport destinations. - */ - public static final Object[][] TELEPORT_DESTINATIONS = { - { Location.create(2974, 4383, 2), "corp", "corporal", "corporeal" }, - { Location.create(2659, 2649, 0), "pc", "pest control", "pest" }, - { Location.create(3293, 3184, 0), "al kharid", "alkharid", "kharid" }, - { Location.create(3222, 3217, 0), "lumbridge", "lumby" }, - { Location.create(3110, 3168, 0), "wizard tower", "wizards tower", "tower", "wizards" }, - { Location.create(3083, 3249, 0), "draynor", "draynor village" }, - { Location.create(3019, 3244, 0), "port sarim", "sarim" }, - { Location.create(2956, 3209, 0), "rimmington" }, - { Location.create(2965, 3380, 0), "fally", "falador" }, - { Location.create(2895, 3436, 0), "taverly" }, - { Location.create(3080, 3423, 0), "barbarian village", "barb" }, - { Location.create(3213, 3428, 0), "varrock" }, - { Location.create(3164, 3485, 0), "grand exchange", "ge" }, - { Location.create(2917, 3175, 0), "karamja" }, - { Location.create(2450, 5165, 0), "tzhaar" }, - { Location.create(2795, 3177, 0), "brimhaven" }, - { Location.create(2849, 2961, 0), "shilo village", "shilo" }, - { Location.create(2605, 3093, 0), "yanille" }, - { Location.create(2663, 3305, 0), "ardougne", "ardy" }, - { Location.create(2450, 3422, 0), "gnome stronghold", "gnome" }, - { Location.create(2730, 3485, 0), "camelot", "cammy", "seers" }, - { Location.create(2805, 3435, 0), "catherby" }, - { Location.create(2659, 3657, 0), "rellekka" }, - { Location.create(2890, 3676, 0), "trollheim" }, - { Location.create(2914, 3746, 0), "godwars", "gwd", "god wars" }, - { Location.create(3180, 3684, 0), "bounty hunter", "bh" }, - { Location.create(3272, 3687, 0), "clan wars", "clw" }, - { Location.create(3090, 3957, 0), "mage arena", "mage", "magearena", "arena" }, - { Location.create(3069, 10257, 0), "king black dragon", "kbd" }, - { Location.create(3359, 3416, 0), "digsite" }, - { Location.create(3488, 3489, 0), "canifis" }, - { Location.create(3428, 3526, 0), "slayer tower", "slayer" }, - { Location.create(3502, 9483, 2), "kalphite queen", "kq", "kalphite hive", "kalphite" }, - { Location.create(3233, 2913, 0), "pyramid" }, - { Location.create(3419, 2917, 0), "nardah" }, - { Location.create(3482, 3090, 0), "uzer" }, - { Location.create(3358, 2970, 0), "pollnivneach", "poln" }, - { Location.create(3305, 2788, 0), "sophanem" }, - { Location.create(2898, 3544, 0), "burthorpe", "burthorp" }, - { Location.create(3088, 3491, 0), "edge", "edgeville" }, - { Location.create(3169, 3034, 0), "bedabin" }, - { Location.create(3565, 3289, 0), "barrows" }, - }; - - /** - * The teleport destinations, intended for Grandpa Jack. - */ - public static final Object[][] TELEPORT_DESTINATIONS_DONATOR = { - { Location.create(2914, 3746, 0), "godwars", "gwd", "god wars" }, - { Location.create(2659, 2649, 0), "pc", "pest control", "pest" }, - { Location.create(3293, 3184, 0), "al kharid", "alkharid", "kharid" }, - { Location.create(3222, 3217, 0), "lumbridge", "lumby" }, - { Location.create(3110, 3168, 0), "wizard tower", "wizards tower", "tower", "wizards" }, - { Location.create(3083, 3249, 0), "draynor", "draynor village" }, - { Location.create(3019, 3244, 0), "port sarim", "sarim" }, - { Location.create(2956, 3209, 0), "rimmington" }, - { Location.create(2965, 3380, 0), "fally", "falador" }, - { Location.create(2895, 3436, 0), "taverly" }, - { Location.create(3080, 3423, 0), "barbarian village", "barb" }, - { Location.create(3213, 3428, 0), "varrock" }, - { Location.create(3164, 3485, 0), "grand exchange", "ge" }, - { Location.create(2917, 3175, 0), "karamja" }, - { Location.create(2450, 5165, 0), "tzhaar" }, - { Location.create(2795, 3177, 0), "brimhaven" }, - { Location.create(2849, 2961, 0), "shilo village", "shilo" }, - { Location.create(2605, 3093, 0), "yanille" }, - { Location.create(2663, 3305, 0), "ardougne", "ardy" }, - { Location.create(2450, 3422, 0), "gnome stronghold", "gnome" }, - { Location.create(2730, 3485, 0), "camelot", "cammy", "seers" }, - { Location.create(2805, 3435, 0), "catherby" }, - { Location.create(2659, 3657, 0), "rellekka" }, - { Location.create(2890, 3676, 0), "trollheim" }, - { Location.create(3180, 3684, 0), "bounty hunter", "bh" }, - { Location.create(3272, 3687, 0), "clan wars", "clw" }, - { Location.create(3090, 3957, 0), "mage arena", "mage", "magearena", "arena" }, - { Location.create(3359, 3416, 0), "digsite" }, - { Location.create(3488, 3489, 0), "canifis" }, - { Location.create(3428, 3526, 0), "slayer tower", "slayer" }, - { Location.create(3233, 2913, 0), "pyramid" }, - { Location.create(3419, 2917, 0), "nardah" }, - { Location.create(3482, 3090, 0), "uzer" }, - { Location.create(3358, 2970, 0), "pollnivneach", "poln" }, - { Location.create(3305, 2788, 0), "sophanem" }, - { Location.create(2898, 3544, 0), "burthorpe", "burthorp" }, - { Location.create(3088, 3491, 0), "edge", "edgeville" }, - { Location.create(3169, 3034, 0), "bedabin" }, - { Location.create(3565, 3311, 0), "barrows" }, - }; - - /** - * The string of donation messages displayed on an interface. - */ - public static final String[] MESSAGES = new String[] {"Welcome!" }; - - public static final String[] DATABASE_NAMES = { - "server", "global" - }; - - public static final Database[] DATABASES = { - new Database((SQLManager.LOCAL ? "localhost" : "redsparr0w.com"), (SQLManager.LOCAL ? "server" : DATABASE_NAMES[0]), (SQLManager.LOCAL ? "root" : "username"), (SQLManager.LOCAL ? "" : "password")), - new Database((SQLManager.LOCAL ? "localhost" : "redsparr0w.com"), (SQLManager.LOCAL ? "global" : DATABASE_NAMES[1]), (SQLManager.LOCAL ? "root" : "username"), (SQLManager.LOCAL ? "" : "password")) - }; - - /** - * If MySQL is enabled. - */ - public static boolean MYSQL = true; - - public static boolean VALIDATED = false; - - /** - * Constructs a new {@Code ServerConstants} {@Code Object} - */ - private ServerConstants() { - /* - * empty. - */ - } - -} diff --git a/09HDscape-server/src/org/crandor/gui/tab/StatisticsTab.java b/09HDscape-server/src/org/crandor/gui/tab/StatisticsTab.java deleted file mode 100644 index cd423cd4a..000000000 --- a/09HDscape-server/src/org/crandor/gui/tab/StatisticsTab.java +++ /dev/null @@ -1,667 +0,0 @@ -package org.crandor.gui.tab; - - -import org.crandor.Main; -import org.crandor.game.node.item.GroundItemManager; -import org.crandor.game.system.SystemManager; -import org.crandor.game.system.SystemState; -import org.crandor.game.world.GameWorld; -import org.crandor.game.world.map.RegionManager; -import org.crandor.game.world.repository.Repository; -import org.crandor.gui.ConsoleTab; -import org.crandor.plugin.PluginManager; - -import javax.swing.*; -import javax.swing.border.TitledBorder; -import java.awt.*; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.event.MouseEvent; -import java.io.BufferedWriter; -import java.io.File; -import java.io.FileWriter; -import java.net.URL; - -/** - * Handles server info tab. - * - * @author Emperor - */ -public class StatisticsTab extends ConsoleTab { - - /** - * The serial UID. - */ - private static final long serialVersionUID = 6164020580271944550L; - - /** - * The queue size. - */ - public static final int QUEUE_SIZE = 1 << 16; - - /** - * The performance data queue. - */ - private static short[] performanceQueue = new short[QUEUE_SIZE]; - - /** - * The memory data queue. - */ - private static short[] memoryQueue = new short[QUEUE_SIZE]; - - /** - * The current index of the performance queue. - */ - private static int queueIndex = 0; - - /** - * The current statistics zoom. - */ - private static int statisticsZoom = 5; - - /** - * The singleton. - */ - public static final StatisticsTab INSTANCE = new StatisticsTab(); - - /** - * The statistics mouse coordinates. - */ - private Point statisticMousePoint = null; - - /** - * The zoom in button. - */ - private JButton zoomIn; - - /** - * The zoom out button. - */ - private JButton zoomOut; - - /** - * The reset button. - */ - private JButton resetButton; - - /** - * The save log button. - */ - private JButton saveLogButton; - - /** - * The shutdown button. - */ - private JButton shutdown; - - /** - * The file chooser instance. - */ - private JFileChooser fileChooser; - - /** - * If the tool tip is currently opened. - */ - private boolean toolTipOpened; - - /** - * The world statistics text pane. - */ - private StatsTextPane worldStatistics; - - /** - * The thread statistics text pane. - */ - private StatsTextPane threadStatistics; - - /** - * The working time of the main thread. - */ - private static long workingTime; - - /** - * The maximum amount of players being active at the same time. - */ - private static int maximumPlayers; - - /** - * The text area. - */ - private final JTextArea console = new JTextArea(); - - /** - * Constructs a new {@Code StatisticsTab} {@Code Object} - */ - public StatisticsTab() { - super("Statistics"); - setLayout(null); - - JScrollPane scrollPane = new JScrollPane(); - scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); - scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS); - scrollPane.setBackground(UIManager.getColor("Button.background")); - scrollPane.setBounds(6, 403, 1042, 189); - scrollPane.setBorder(new TitledBorder(null, "Console", TitledBorder.LEADING, TitledBorder.TOP, null, null)); - add(scrollPane); - - console.setLineWrap(true); - console.setBackground(UIManager.getColor("CheckBox.background")); - console.setEditable(false); - scrollPane.setViewportView(console); - - JLabel label = new JLabel(); - label.setBounds(450, 345, 163, 16); - add(label); - } - - @Override - public String getToolTipText(MouseEvent e) { - if (e.getX() > getWidth() / 2 && e.getX() < getWidth() - && e.getY() > 2 && e.getY() < getHeight() / 2) { - int max = (getWidth() / 2) / statisticsZoom; - int index = queueIndex - (max - (e.getX() - (getWidth() / 2)) / statisticsZoom); - toolTipOpened = true; - if (index < 0) { - return "Tick: null, time: null."; - } - return new StringBuilder("Tick: ").append(index).append(", time: ").append(performanceQueue[index] + 600).append(".").toString(); - } - toolTipOpened = false; - return null; - } - - @Override - public Point getToolTipLocation(MouseEvent e) { - if (e.getX() > getWidth() / 2 && e.getX() < getWidth() - && e.getY() > 2 && e.getY() < getHeight() / 2) { - return new Point(e.getX() + 15, e.getY() + 10); - } - return null; - } - - @Override - public void paint(Graphics g) { - super.paint(g); - drawPerformanceStatistics(this, g); - } - - /** - * Positions the components. - */ - public void positionComponents() { - int init = 90; - int diff = 5; - zoomIn.setLocation(getWidth() / 2 - (zoomIn.getWidth() / 2) - diff, 5 + init); - zoomOut.setLocation(getWidth() / 2 - (zoomOut.getWidth() / 2) - diff, 30 + init); - resetButton.setLocation(getWidth() / 2 - (resetButton.getWidth() / 2) - diff, 55 + init); - saveLogButton.setLocation(getWidth() / 2 - (saveLogButton.getWidth() / 2) - diff, 80 + init); - shutdown.setLocation(getWidth() / 2 - (shutdown.getWidth() / 2), 310); - worldStatistics.setLocation(55, 310); - threadStatistics.setLocation(shutdown.getX() + shutdown.getWidth() + 35, 310); - } - - /** - * Initializes the server info tab. - * - * @return This instance. - */ - public StatisticsTab init() { - initMaximumPlayers(); - fileChooser = new JFileChooser("./"); - zoomIn = new JButton("+"); - zoomIn.setLayout(null); - zoomIn.setVisible(true); - zoomIn.setSize(50, 20); - zoomIn.addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - zoomOut.setEnabled(true); - if (++statisticsZoom > 20) { - statisticsZoom = 20; - zoomIn.setEnabled(false); - return; - } - drawPerformanceStatistics(StatisticsTab.this, getGraphics()); - } - }); - zoomOut = new JButton("-"); - zoomOut.setLayout(null); - zoomOut.setVisible(true); - zoomOut.setSize(50, 20); - zoomOut.addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - zoomIn.setEnabled(true); - if (--statisticsZoom < 2) { - statisticsZoom = 2; - zoomOut.setEnabled(false); - return; - } - drawPerformanceStatistics(StatisticsTab.this, getGraphics()); - } - }); - resetButton = new JButton("x"); - resetButton.setLayout(null); - resetButton.setVisible(true); - resetButton.setSize(50, 20); - resetButton.addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - queueIndex = 0; - } - }); - saveLogButton = new JButton("", createImageIcon("Save16.gif")); - saveLogButton.setLayout(null); - saveLogButton.setVisible(true); - saveLogButton.setSize(50, 20); - saveLogButton.addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - int returnVal = fileChooser.showSaveDialog(StatisticsTab.this); - if (returnVal == JFileChooser.APPROVE_OPTION) { - File file = fileChooser.getSelectedFile(); - if (!file.getName().contains(".")) { - file = new File(file.getPath() + ".txt"); - } - logQueues(file); - } - } - }); - add(resetButton); - add(zoomIn); - add(zoomOut); - add(saveLogButton); - shutdown = new JButton("Shutdown"); - shutdown.setLayout(null); - shutdown.setVisible(true); - shutdown.setSize(100, 20); - shutdown.addActionListener(e -> SystemManager.flag(SystemState.TERMINATED)); - add(shutdown); - worldStatistics = new StatsTextPane().init(); - worldStatistics.setSize(390, 90); - add(worldStatistics); - updateWorldText(); - threadStatistics = new StatsTextPane().init(); - threadStatistics.setSize(390, 90); - add(threadStatistics); - updateThreadText(); - setLayout(null); - setVisible(true); - ToolTipManager.sharedInstance().setInitialDelay(0); - positionComponents(); - return this; - } - - /** - * Initializes the maximum players count. - */ - private static void initMaximumPlayers() { - setMaximumPlayers(0); - } - - /** - * Sets the maximum amount of players. - * - * @param maximum The maximum. - */ - private static void setMaximumPlayers(int maximum) { - maximumPlayers = maximum; - } - - /** - * Logs the queues. - * - * @param file The file to log to. - */ - protected static void logQueues(File file) { - try (BufferedWriter bw = new BufferedWriter(new FileWriter(file, true))) { - bw.append("/////////////////////////////////////////////////////////////////////////"); - bw.newLine(); - bw.append("/////////////////////////////////////////////////////////////////////////"); - bw.newLine(); - // bw.append("// " + CalenderDate.getFormattedDate() + " performance log results:"); - bw.newLine(); - bw.append("/////////////////////////////////////////////////////////////////////////"); - bw.newLine(); - for (int i = 0; i < queueIndex; i++) { - bw.append(new StringBuilder("performance_report:memory_usage-[tick=").append(i).append(", mem=").append(memoryQueue[i]).append("mb].")); - bw.newLine(); - } - for (int i = 0; i < queueIndex; i++) { - int value = 600 + performanceQueue[i]; - bw.append(new StringBuilder("performance_report:clock_speed-[tick=").append(i).append(", time=").append(value).append(", status=").append(value < 601 ? "NORMAL]." : "DELAYED].")); - bw.newLine(); - } - bw.append("/////////////////////////////////////////////////////////////////////////"); - bw.newLine(); - bw.flush(); - bw.close(); - } catch (Throwable t) { - t.printStackTrace(); - } - } - - /** - * Creates an image icon. - * - * @param path The path of the image file. - * @return The image icon. - */ - private static ImageIcon createImageIcon(String path) { - URL imgURL = StatisticsTab.class.getResource(path); - if (imgURL != null) { - return new ImageIcon(imgURL); - } - return null; - } - - /** - * Reports the performance value. - * - * @param value The value. - */ - public static void reportPerformance(int value) { - if (value >= Short.MAX_VALUE) { - value = Short.MAX_VALUE - 1; - } - secureQueues(); - performanceQueue[queueIndex] = (short) value; - memoryQueue[queueIndex++] = (short) ((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / 1_000_000); - INSTANCE.repaint(); - workingTime += (600 + value); - if (INSTANCE.threadStatistics != null) { - INSTANCE.updateThreadText(); - if ((GameWorld.getTicks() % 10) == 0) { - INSTANCE.updateWorldText(); - } - } - } - - /** - * Updates the thread statistics text. - */ - public void updateThreadText() { - StringBuilder sb = new StringBuilder(); - long runtime = System.currentTimeMillis() - Main.startTime; - double percentage = workingTime / (runtime * 0.01); - long hours = runtime / 3600000; - runtime -= hours * 3600000; - long minutes = runtime / 60000; - runtime -= minutes * 60000; - long seconds = runtime / 1000; - sb.append("Runtime: ").append(hours).append("h ").append(minutes).append("m ").append(seconds).append("s").append(" - ").append(GameWorld.getTicks()).append(" ticks").append("\n"); - sb.append("Working time: ").append(workingTime).append("ms").append(" - ").append(String.format("%.2f", percentage)).append("%").append("\n"); - sb.append("Average cycle: ").append(String.format("%.1f", (double) workingTime / GameWorld.getTicks())).append("ms").append("\n"); - threadStatistics.setText(sb.toString()); - } - - /** - * Updates the world statistics text. - */ - public void updateWorldText() { - int players = Repository.getPlayers().size(); - if (players > getMaximumPlayers()) { - setMaximumPlayers(players); - } - StringBuilder sb = new StringBuilder(); - sb.append("Players: ").append(players).append(", max: ").append(getMaximumPlayers()).append("\n"); - sb.append("NPCs: ").append(Repository.getNpcs().size()).append("\n"); - sb.append("Regions: ").append(RegionManager.getRegionCache().size()).append("\n"); - sb.append("Ground items: ").append(GroundItemManager.getItems().size()).append("\n"); - sb.append("Plugins: ").append(PluginManager.getAmountLoaded()).append("\n"); - worldStatistics.setText(sb.toString()); - } - - /** - * Draws the performance statistics. - * - * @param c The component. - * @param g The graphics. - */ - private static void drawPerformanceStatistics(Component c, Graphics g) { - int x = c.getWidth() / 2 + 48; - int y = c.getHeight() / 2; - - Point zero = new Point(x, y / 2); - g.setColor(Color.LIGHT_GRAY); - - //Fill the background rectangle. - g.fillRect(x, 5, c.getWidth() - 4 - x, y - 5); - g.setColor(Color.GRAY); - - int count = 0; - for (int i = 0; i < c.getWidth() - 4 - x; i += statisticsZoom) { - g.drawLine((int) (zero.getX() + i), 5, - (int) (zero.getX() + i), y - 1); - count++; - } - - int space = (y / 2 - 10) / 4; - g.setFont(new Font(null, Font.PLAIN, 9)); - for (int i = 0; i < 5; i++) { - g.setColor(i == 0 ? Color.BLACK : Color.GRAY); - g.drawLine(x, (int) zero.getY() - (space * i), c.getWidth() - 5, (int) zero.getY() - (space * i)); - g.drawLine(x, (int) zero.getY() + (space * i), c.getWidth() - 5, (int) zero.getY() + (space * i)); - g.setColor(Color.BLACK); - g.drawString("" + (i * 150), x - 18, (int) zero.getY() - (space * i) + 2); - if (i != 0) { - g.drawString("-" + (i * 150), x - 20, (int) zero.getY() + (space * i) + 2); - } - } - g.setColor(Color.GREEN); - for (int i = 1; i < count; i++) { - int index = queueIndex - i; - if (index < 1) { - break; - } - int fromPoint = performanceQueue[index]; - int fromX = (count - i) * statisticsZoom; - int fromY = (int) (-fromPoint / (600D / (space * 4))); - int toPoint = index == 0 ? 0 : performanceQueue[index - 1]; - int toX = (count - i - 1) * statisticsZoom; - int toY = (int) (-toPoint / (600D / (space * 4))); - if (fromY < 0) { - g.setColor(Color.RED); - } - g.drawLine((int) (zero.getX() + fromX), (int) (zero.getY() + fromY), - (int) (zero.getX() + toX), (int) (zero.getY() + toY)); - if (fromY >= 0) { - g.setColor(Color.GREEN); - } - } - g.setColor(Color.BLACK); - //Draw vertical line. - g.drawLine(x, y + 4, x, 1); - Point p = ((StatisticsTab) c).statisticMousePoint; - if (p != null) { - g.setColor(new Color(251, 230, 130)); - g.fillRoundRect((int) (p.getX() + 10), (int) (p.getY() - 10), 100, 50, 10, 10); - } - if (((StatisticsTab) c).toolTipOpened) { - ((StatisticsTab) c).setToolTipText("test"); - } - drawMemoryStatistics(c, g); - } - - /** - * Draws the performance statistics. - * - * @param c The component. - * @param g The graphics. - */ - private static void drawMemoryStatistics(Component c, Graphics g) { - int x = 5; - int y = c.getHeight() / 2; - int endX = (c.getWidth() / 2) - 48; - - Point zero = new Point(x + 18, y); - g.setColor(Color.LIGHT_GRAY); - - //Fill the background rectangle. - g.fillRect((int) zero.getX(), 5, endX - x, y - 5); - g.setColor(Color.GRAY); - - int count = 0; - for (int i = 0; i < endX - x; i += statisticsZoom) { - g.drawLine((int) (zero.getX() + i), 5, - (int) (zero.getX() + i), y - 1); - count++; - } - - int space = (y) / 10; - g.setFont(new Font(null, Font.PLAIN, 9)); - for (int i = 0; i < 10; i++) { - g.setColor(Color.GRAY); - g.drawLine((int) zero.getX() - 2, (int) zero.getY() - (space * i), endX + 17, (int) zero.getY() - (space * i)); - g.setColor(Color.BLACK); - g.drawString("" + (i * 100), 2, (int) zero.getY() - (space * i) + 2); - } - g.setColor(Color.BLUE); - for (int i = 1; i < count; i++) { - int index = queueIndex - i; - if (index < 1) { - break; - } - int fromPoint = memoryQueue[index]; - int fromX = (count - i) * statisticsZoom; - int fromY = (int) (fromPoint / (900D / (space * 10))); - int toPoint = index == 0 ? 0 : memoryQueue[index - 1]; - int toX = (count - i - 1) * statisticsZoom; - int toY = (int) (toPoint / (900D / (space * 10))); - if (fromY < 0) { - g.setColor(Color.RED); - } - g.drawLine((int) (zero.getX() + fromX), (int) (zero.getY() - fromY), - (int) (zero.getX() + toX), (int) (zero.getY() - toY)); - if (fromY < 0) { - g.setColor(Color.GREEN); - } - } - g.setColor(Color.BLACK); - //Draw horizontal line. - g.drawLine((int) (zero.getX() - 4), (int) zero.getY(), endX + 21, (int) zero.getY()); - //Draw vertical line. - g.drawLine((int) zero.getX(), (int) zero.getY() + 4, (int) zero.getX(), 1); - Point p = ((StatisticsTab) c).statisticMousePoint; - if (p != null) { - g.setColor(new Color(251, 230, 130)); - g.fillRoundRect((int) (p.getX() + 10), (int) (p.getY() - 10), 100, 50, 10, 10); - } - if (((StatisticsTab) c).toolTipOpened) { - ((StatisticsTab) c).setToolTipText("test"); - } - } - - /** - * Secures the queues. - */ - private static void secureQueues() { - if (queueIndex >= QUEUE_SIZE) { - int lagSpikes = 0; - int memoryUsageSpikes = 0; - @SuppressWarnings("unused") - int totalMemory = 0; - @SuppressWarnings("unused") - int totalCycleTime = 0; - //Start at tick 500, the JVM has to "warm up" first. - for (int i = 500; i < QUEUE_SIZE; i++) { - if (performanceQueue[i] > 0) { //Anything above 0 (-600 + 600) = lag - lagSpikes++; - } - if (memoryQueue[i] > 700) { //Over 700Mb - memoryUsageSpikes++; - } - totalMemory += memoryQueue[i]; - totalCycleTime += performanceQueue[i]; - } - if (lagSpikes > 350 || memoryUsageSpikes > 350) { - logQueues(new File("./data/logs/system/Performance-log.txt")); - } - //System.out.println("Average cycle time: " + (600 + (totalCycleTime / (QUEUE_SIZE - 500))) + "ms."); - //System.out.println("Average memory usage: " + (totalMemory / (QUEUE_SIZE - 500)) + "Mb."); - queueIndex = 0; - } - } - - /** - * Logs a message to the console. - * - * @param message the message. - */ - public void log(String message) { - console.append(message + "\n"); - console.setCaretPosition(console.getDocument().getLength()); - } - - /** - * Sets the statistics zoom. - * - * @param pixels The amount of pixels. - */ - public static void setStatisticsZoom(int pixels) { - statisticsZoom = pixels; - } - - /** - * Gets the workingTime. - * - * @return The workingTime. - */ - public static long getWorkingTime() { - return workingTime; - } - - /** - * Sets the workingTime. - * - * @param workingTime The workingTime to set. - */ - public static void setWorkingTime(long workingTime) { - StatisticsTab.workingTime = workingTime; - } - - /** - * Gets the maximumPlayers. - * - * @return The maximumPlayers. - */ - public static int getMaximumPlayers() { - return maximumPlayers; - } - - /** - * Handles the statistics tab text pane. - * - * @author Emperor - */ - public final class StatsTextPane extends JTextPane { - - /** - * The serial UID. - */ - private static final long serialVersionUID = 664276151176087663L; - - /** - * Constructs a new {@code StatsTextPane} {@code Object}. - */ - public StatsTextPane() { - super(); - } - - /** - * Initializes the stats text pane. - * - * @return The stats text pane. - */ - public StatsTextPane init() { - setEditable(false); - setLayout(null); - Font font = new Font("Monospaced", Font.PLAIN, 12); - setFont(font); - super.setBorder(BorderFactory.createLineBorder(Color.BLACK, 1)); - super.setVisible(true); - return this; - } - - } -} diff --git a/Client/src/org/runite/Configurations.java b/Client/src/org/runite/Configurations.java index 756e9f3a0..3525d00d3 100644 --- a/Client/src/org/runite/Configurations.java +++ b/Client/src/org/runite/Configurations.java @@ -12,7 +12,7 @@ public final class Configurations { /** * The website. */ - public static final String WEBSITE = "http://localhost"; + public static final String WEBSITE = "http://www.os.frostblades.org"; /** * The client build. @@ -63,7 +63,7 @@ public final class Configurations { /** * The MS IP. */ - public static final String MS_IP = (Configurations.LOCAL_MS ? "127.0.0.1" : "localhost"); + public static final String MS_IP = (Configurations.LOCAL_MS ? "127.0.0.1" : "frostblades.org"); /** * The operation system name. diff --git a/Client/src/org/runite/jagex/GameShell.java b/Client/src/org/runite/jagex/GameShell.java index 19dee5ce2..6406c2c51 100644 --- a/Client/src/org/runite/jagex/GameShell.java +++ b/Client/src/org/runite/jagex/GameShell.java @@ -20,7 +20,7 @@ public abstract class GameShell extends Applet implements Runnable, FocusListene /** * The game settings. */ - public static GameSetting SETTINGS = new GameSetting(GameLaunch.SETTINGS.getName(), Configurations.MS_IP, 1, "live", false, false); + public static GameSetting SETTINGS = new GameSetting(GameLaunch.SETTINGS.getName(), Configurations.LOCAL_MS ? "127.0.0.1" : "frostblades.org", 1, "live", false, false); private boolean aBoolean1 = false; @@ -560,6 +560,10 @@ public abstract class GameShell extends Applet implements Runnable, FocusListene final void launch(Frame frame) { try { + if(-8057 != -8057) { + this.method38(12); + } + try { Class140_Sub7.anInt2934 = 768; Class70.anInt1047 = 768; diff --git a/CompiledServer/production/09Scape/org/crandor/Util.java b/CompiledServer/production/09Scape/org/crandor/Util.java deleted file mode 100644 index 0eb38f57f..000000000 --- a/CompiledServer/production/09Scape/org/crandor/Util.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.crandor; - -public class Util { - - /** - * Capitalize the first letter of the string - * @return Capitalized string - */ - public static String capitalize(String name) { - if (name != null && name.length() != 0) { - char[] chars = name.toCharArray(); - chars[0] = Character.toUpperCase(chars[0]); - return new String(chars); - } else { - return name; - } - } - - public static String strToEnum(String name) { - name = name.toUpperCase(); - return name.replaceAll(" ", "_"); - } - - public static String enumToString(String name) { - name = name.toLowerCase(); - name = name.replaceAll("_", " "); - return capitalize(name); - } -} diff --git a/CompiledServer/production/09Scape/server.properties b/CompiledServer/production/09Scape/server.properties index 3b032f944..a5d7e3d71 100644 --- a/CompiledServer/production/09Scape/server.properties +++ b/CompiledServer/production/09Scape/server.properties @@ -1,14 +1,14 @@ -name=Sparr0w +name=Crandor beta=false sql=true -devMode=false +devMode=true gui=true gameType=economy worldId=1 -country=6 +country=0 activity=Default gameplay members=true pvp=false quickChat=true lootshare=true -msip=127.0.0.1 +msip=127.0.0.1 \ No newline at end of file diff --git a/CompiledServer/production/09Scape/server1.properties b/CompiledServer/production/09Scape/server1.properties index 431878dd2..46b3bb091 100644 --- a/CompiledServer/production/09Scape/server1.properties +++ b/CompiledServer/production/09Scape/server1.properties @@ -1,14 +1,14 @@ -name=Sparr0w +name=Crandor beta=true sql=true devMode=false gui=true gameType=economy worldId=1 -country=6 +country=0 activity=Default gameplay members=true pvp=false quickChat=true lootshare=true -msip=127.0.0.1 +msip=127.0.0.1 \ No newline at end of file diff --git a/CompiledServer/production/09Scape/server2.properties b/CompiledServer/production/09Scape/server2.properties index 79f730bed..8cd6bd174 100644 --- a/CompiledServer/production/09Scape/server2.properties +++ b/CompiledServer/production/09Scape/server2.properties @@ -1,14 +1,14 @@ -name=Sparr0w +name=Crandor beta=false sql=true devMode=true gui=false gameType=economy worldId=2 -country=6 +country=0 activity=Default gameplay members=true pvp=false quickChat=true lootshare=true -msip=127.0.0.1 +msip=127.0.0.1 \ No newline at end of file diff --git a/CompiledServer/production/09Scape/server3.properties b/CompiledServer/production/09Scape/server3.properties index 8a75a525b..cdab7aec2 100644 --- a/CompiledServer/production/09Scape/server3.properties +++ b/CompiledServer/production/09Scape/server3.properties @@ -1,14 +1,14 @@ -name=Sparr0w +name=Crandor beta=false sql=true -devMode=false +devMode=true gui=false gameType=economy worldId=3 -country=6 +country=0 activity=Default gameplay members=true -pvp=true +pvp=false quickChat=true lootshare=true -msip=127.0.0.1 +msip=127.0.0.1 \ No newline at end of file diff --git a/Management-Server/src/org/keldagrim/ServerConstants.java b/Management-Server/src/org/keldagrim/ServerConstants.java index c884abc6b..edc0f306b 100644 --- a/Management-Server/src/org/keldagrim/ServerConstants.java +++ b/Management-Server/src/org/keldagrim/ServerConstants.java @@ -49,11 +49,12 @@ public final class ServerConstants { * The administrators. */ public static final String[] ADMINISTRATORS = { - "redsparr0w", + "ethan", + "austin", }; public static final String[] DATABASE_NAMES = { - "server", "global" + "keldagr1_server", "keldagr1_global" }; /** diff --git a/Management-Server/src/org/keldagrim/net/packet/WorldPacketRepository.java b/Management-Server/src/org/keldagrim/net/packet/WorldPacketRepository.java index 3a51ff6d4..f038701a7 100644 --- a/Management-Server/src/org/keldagrim/net/packet/WorldPacketRepository.java +++ b/Management-Server/src/org/keldagrim/net/packet/WorldPacketRepository.java @@ -305,8 +305,8 @@ public final class WorldPacketRepository { String macAddress = buffer.getString(); String compName = buffer.getString(); String serial = buffer.getString(); - int rights = buffer.getInt(); - int chatIcon = buffer.get(); + int rights = server.getInfo().getRevision() == 498 ? 0 : buffer.getInt(); + int chatIcon = server.getInfo().getRevision() == 498 ? 0 : buffer.get(); UIDInfo uid = new UIDInfo(ipAddress, compName, macAddress, serial); PlayerSession player = new PlayerSession(username, password, new UIDInfo(ipAddress, compName, macAddress, serial)); if (WorldDatabase.isActivePlayer(username)) { @@ -430,7 +430,7 @@ public final class WorldPacketRepository { } ClanRepository clan = ClanRepository.get(server, clanName); if (clan == null) { - sendPlayerMessage(player, "The channel you tried to join does not exist (" + clanName + ").
Try joining the main clan named 'Sparr0w'.:clan:"); + sendPlayerMessage(player, "The channel you tried to join does not exist. Try joining the main clan named 'Keldagrim'.:clan:"); return; } clan.enter(player); diff --git a/Server/src/org/crandor/game/container/impl/BankContainer.java b/Server/src/org/crandor/game/container/impl/BankContainer.java index c94b330b5..d85b6d970 100644 --- a/Server/src/org/crandor/game/container/impl/BankContainer.java +++ b/Server/src/org/crandor/game/container/impl/BankContainer.java @@ -24,7 +24,7 @@ public final class BankContainer extends Container { /** * The bank container size. */ - public static final int SIZE = 800; + public static final int SIZE = 496; /** * The maximum amount of bank tabs diff --git a/Server/src/org/crandor/game/content/dialogue/DialogueInterpreter.java b/Server/src/org/crandor/game/content/dialogue/DialogueInterpreter.java index fc15f49a5..13c89025f 100644 --- a/Server/src/org/crandor/game/content/dialogue/DialogueInterpreter.java +++ b/Server/src/org/crandor/game/content/dialogue/DialogueInterpreter.java @@ -304,7 +304,7 @@ public final class DialogueInterpreter { player.getPacketDispatch().sendString(messages[i], 372, i + 1); } player.getInterfaceManager().openChatbox(372); - if (player.getAttributes().containsKey("tut-island") || TutorialSession.getExtension(player).getStage() < TutorialSession.MAX_STAGE) { + if (player.getAttributes().containsKey("tut-island") || TutorialSession.getExtension(player).getStage() <= TutorialSession.MAX_STAGE) { } return player.getInterfaceManager().getChatbox(); } @@ -497,7 +497,7 @@ public final class DialogueInterpreter { player.getPacketDispatch().sendString(messages[i].toString().replace("@name", player.getUsername()), interfaceId, (i + 4)); } player.getInterfaceManager().openChatbox(interfaceId); - if (player.getAttributes().containsKey("tut-island") || TutorialSession.getExtension(player).getStage() < TutorialSession.MAX_STAGE) { + if (player.getAttributes().containsKey("tut-island") || TutorialSession.getExtension(player).getStage() <= TutorialSession.MAX_STAGE) { } player.getPacketDispatch().sendInterfaceConfig(player.getInterfaceManager().getChatbox().getId(), 3, false); return player.getInterfaceManager().getChatbox(); diff --git a/Server/src/org/crandor/game/content/global/action/DropItemHandler.java b/Server/src/org/crandor/game/content/global/action/DropItemHandler.java index bcc95f29c..54083597f 100644 --- a/Server/src/org/crandor/game/content/global/action/DropItemHandler.java +++ b/Server/src/org/crandor/game/content/global/action/DropItemHandler.java @@ -50,8 +50,10 @@ public final class DropItemHandler { if (player.getInventory().replace(null, item.getSlot()) == item) { item = item.getDropItem(); player.getAudioManager().send(new Audio(item.getId() == 995 ? 10 : 2739, 1, 0)); - GroundItemManager.create(item, player.getLocation(), player); - PlayerParser.dump(player); + if (!player.getDetails().getRights().equals(Rights.ADMINISTRATOR) || !player.getAttribute("tut-island", false)) { + GroundItemManager.create(item, player.getLocation(), player); + PlayerParser.dump(player); + } } else { GroundItemManager.create(item, player.getLocation(), player).setDecayTime(99); PlayerParser.dump(player); diff --git a/Server/src/org/crandor/game/content/global/consumable/CookingProperties.java b/Server/src/org/crandor/game/content/global/consumable/CookingProperties.java index 7404f4d2c..f7b00070d 100644 --- a/Server/src/org/crandor/game/content/global/consumable/CookingProperties.java +++ b/Server/src/org/crandor/game/content/global/consumable/CookingProperties.java @@ -173,9 +173,7 @@ public class CookingProperties { public boolean cook(final Food food, final Player player, final GameObject object, final boolean burned) { if (player.getInventory().remove(food.getRaw())) { if (!burned) { - Item item = food.getItem(); - player.getInventory().add(item); - Perks.addDouble(player, item); + Perks.addDouble(player, food.getItem()); } else { player.getInventory().add(food.getBurnt()); } diff --git a/Server/src/org/crandor/game/content/skill/Skills.java b/Server/src/org/crandor/game/content/skill/Skills.java index 20d065a95..216239b78 100644 --- a/Server/src/org/crandor/game/content/skill/Skills.java +++ b/Server/src/org/crandor/game/content/skill/Skills.java @@ -3,7 +3,7 @@ package org.crandor.game.content.skill; import org.crandor.game.content.global.SkillcapePerks; import org.crandor.game.content.global.tutorial.TutorialSession; import org.crandor.game.content.holiday.HolidayEvent; -import org.crandor.game.events.GlobalEvent; +import org.crandor.game.events.GlobalEventManager; import org.crandor.game.node.entity.Entity; import org.crandor.game.node.entity.combat.ImpactHandler; import org.crandor.game.node.entity.npc.NPC; @@ -28,7 +28,7 @@ public final class Skills { /** * Represents the constant modifier of experience. */ - public static final double EXPERIENCE_MULTIPLIER = 20; + public static final double EXPERIENCE_MULTIPLIER = 35.3; /** * The maximum experience multiplier. @@ -258,7 +258,7 @@ public final class Skills { if (!(entity instanceof Player)) { return 1.0; } - double mod = multiplyer ? (GlobalEvent.XP_FEVER.isActive() ? EXPERIENCE_MULTIPLIER * 2 : EXPERIENCE_MULTIPLIER) : 1; + double mod = multiplyer ? (GlobalEventManager.get().isActive("XPFever") ? EXPERIENCE_MULTIPLIER * 2 : EXPERIENCE_MULTIPLIER) : 1; Player p = (Player) entity; if (p.getIronmanManager().getMode() == IronmanMode.ULTIMATE) { mod /= 4; @@ -267,13 +267,12 @@ public final class Skills { } //A boost for combat skills that are under level 65. if(entity instanceof Player && !this.hasLevel(slot, 65) && isCombat(slot)){ - mod *= 1.5; + mod *= 2.0; } //Grand Exchange region XP boost. if(entity.getViewport().getRegion().getRegionId() == 12598){ mod += 1.5; } - // Pest control, XP halved during the game if (entity.getViewport().getRegion().getRegionId() == 10536) { mod *= .5; } diff --git a/Server/src/org/crandor/game/content/skill/free/crafting/armour/DragonCraftPulse.java b/Server/src/org/crandor/game/content/skill/free/crafting/armour/DragonCraftPulse.java index a021bef48..b63b7b59b 100644 --- a/Server/src/org/crandor/game/content/skill/free/crafting/armour/DragonCraftPulse.java +++ b/Server/src/org/crandor/game/content/skill/free/crafting/armour/DragonCraftPulse.java @@ -100,9 +100,7 @@ public final class DragonCraftPulse extends SkillPulse { } else { player.getPacketDispatch().sendMessage("You make " + (StringUtils.isPlusN(ItemDefinition.forId(hide.getProduct()).getName().toLowerCase()) ? "an" : "a") + " " + ItemDefinition.forId(hide.getProduct()).getName().toLowerCase() + "."); } - Item item = new Item(hide.getProduct()); - player.getInventory().add(item); - Perks.addDouble(player, item); + Perks.addDouble(player, new Item(hide.getProduct())); if (player.getDetails().getShop().hasPerk(Perks.GOLDEN_NEEDLE) && RandomFunction.random(100) <= 10) { player.getSkills().addExperience(Skills.CRAFTING, (hide.getExperience() * 0.35), true); diff --git a/Server/src/org/crandor/game/content/skill/free/crafting/armour/HardCraftPulse.java b/Server/src/org/crandor/game/content/skill/free/crafting/armour/HardCraftPulse.java index f8c6cb5fd..62ccff048 100644 --- a/Server/src/org/crandor/game/content/skill/free/crafting/armour/HardCraftPulse.java +++ b/Server/src/org/crandor/game/content/skill/free/crafting/armour/HardCraftPulse.java @@ -80,9 +80,7 @@ public final class HardCraftPulse extends SkillPulse { } } if (player.getInventory().remove(new Item(LeatherCrafting.HARD_LEATHER))) { - Item item = new Item(1131); - player.getInventory().add(item); - Perks.addDouble(player, item); + Perks.addDouble(player, new Item(1131)); if (player.getDetails().getShop().hasPerk(Perks.GOLDEN_NEEDLE) && RandomFunction.random(100) <= 10) { player.getSkills().addExperience(Skills.CRAFTING, (35 * 0.35), true); player.sendMessage("Your golden needle rewards you with some extra XP!"); diff --git a/Server/src/org/crandor/game/content/skill/free/crafting/armour/SnakeSkinPulse.java b/Server/src/org/crandor/game/content/skill/free/crafting/armour/SnakeSkinPulse.java index 662ac7ac2..1ae842095 100644 --- a/Server/src/org/crandor/game/content/skill/free/crafting/armour/SnakeSkinPulse.java +++ b/Server/src/org/crandor/game/content/skill/free/crafting/armour/SnakeSkinPulse.java @@ -87,9 +87,7 @@ public final class SnakeSkinPulse extends SkillPulse { } } if (player.getInventory().remove(new Item(6289, skin.getRequiredAmount()))) { - Item item = skin.getProduct(); - player.getInventory().add(item); - Perks.addDouble(player, item); + Perks.addDouble(player, skin.getProduct()); if (player.getDetails().getShop().hasPerk(Perks.GOLDEN_NEEDLE) && RandomFunction.random(100) <= 10) { player.getSkills().addExperience(Skills.CRAFTING, (skin.getExperience() * 0.35), true); player.sendMessage("Your golden needle rewards you with some extra XP!"); diff --git a/Server/src/org/crandor/game/content/skill/free/crafting/armour/SoftCraftPulse.java b/Server/src/org/crandor/game/content/skill/free/crafting/armour/SoftCraftPulse.java index 0f88aaeb9..89e768130 100644 --- a/Server/src/org/crandor/game/content/skill/free/crafting/armour/SoftCraftPulse.java +++ b/Server/src/org/crandor/game/content/skill/free/crafting/armour/SoftCraftPulse.java @@ -98,9 +98,7 @@ public final class SoftCraftPulse extends SkillPulse { } else { player.getPacketDispatch().sendMessage("You make " + (StringUtils.isPlusN(soft.getProduct().getName()) ? "an" : "a") + " " + soft.getProduct().getName().toLowerCase() + "."); } - Item item = soft.getProduct(); - player.getInventory().add(item); - Perks.addDouble(player, item); + Perks.addDouble(player, soft.getProduct()); if (player.getDetails().getShop().hasPerk(Perks.GOLDEN_NEEDLE) && RandomFunction.random(100) <= 10) { player.getSkills().addExperience(Skills.CRAFTING, (soft.getExperience() * 0.35), true); player.sendMessage("Your golden needle rewards you with some extra XP!"); diff --git a/Server/src/org/crandor/game/content/skill/free/crafting/gem/GemCutPulse.java b/Server/src/org/crandor/game/content/skill/free/crafting/gem/GemCutPulse.java index d2be3e447..d47723f23 100644 --- a/Server/src/org/crandor/game/content/skill/free/crafting/gem/GemCutPulse.java +++ b/Server/src/org/crandor/game/content/skill/free/crafting/gem/GemCutPulse.java @@ -73,9 +73,7 @@ public final class GemCutPulse extends SkillPulse { return false; } if (player.getInventory().remove(gem.getUncut())) { - final Item item = gem.getGem(); - player.getInventory().add(item); - Perks.addDouble(player, item); + Perks.addDouble(player, gem.getGem()); player.getSkills().addExperience(Skills.CRAFTING, gem.getExp(), true); } amount--; diff --git a/Server/src/org/crandor/game/content/skill/free/crafting/jewellery/JewelleryPulse.java b/Server/src/org/crandor/game/content/skill/free/crafting/jewellery/JewelleryPulse.java index 9f4503338..e53976ba8 100644 --- a/Server/src/org/crandor/game/content/skill/free/crafting/jewellery/JewelleryPulse.java +++ b/Server/src/org/crandor/game/content/skill/free/crafting/jewellery/JewelleryPulse.java @@ -66,9 +66,7 @@ public final class JewelleryPulse extends SkillPulse { return false; } if (player.getInventory().remove(getItems())) { - final Item item = new Item(type.getSendItem()); - player.getInventory().add(item); - Perks.addDouble(player, item); + Perks.addDouble(player, new Item(type.getSendItem())); player.getSkills().addExperience(Skills.CRAFTING, type.getExperience(), true); } amount--; diff --git a/Server/src/org/crandor/game/content/skill/free/crafting/pottery/FirePotteryPulse.java b/Server/src/org/crandor/game/content/skill/free/crafting/pottery/FirePotteryPulse.java index 332812f28..b1b365e94 100644 --- a/Server/src/org/crandor/game/content/skill/free/crafting/pottery/FirePotteryPulse.java +++ b/Server/src/org/crandor/game/content/skill/free/crafting/pottery/FirePotteryPulse.java @@ -75,9 +75,7 @@ public final class FirePotteryPulse extends SkillPulse { if (player.getLocation().getY() == 3408 && player.getAttribute("spun-bowl", false) && !player.getAchievementDiaryManager().getDiary(DiaryType.VARROCK).isComplete(0, 9)) { player.getAchievementDiaryManager().getDiary(DiaryType.VARROCK).updateTask(player, 0, 9, true); } - final Item item = pottery.getProduct(); - player.getInventory().add(item); - Perks.addDouble(player, item); + Perks.addDouble(player, pottery.getProduct()); player.getSkills().addExperience(Skills.CRAFTING, pottery.getFireExp(), true); player.getPacketDispatch().sendMessage("You put the " + pottery.getUnfinished().getName().toLowerCase() + " in the oven."); player.getPacketDispatch().sendMessage("You remove a " + pottery.getProduct().getName().toLowerCase() + " from the oven."); diff --git a/Server/src/org/crandor/game/content/skill/free/crafting/pottery/PotteryPulse.java b/Server/src/org/crandor/game/content/skill/free/crafting/pottery/PotteryPulse.java index b1402f08f..33dc47729 100644 --- a/Server/src/org/crandor/game/content/skill/free/crafting/pottery/PotteryPulse.java +++ b/Server/src/org/crandor/game/content/skill/free/crafting/pottery/PotteryPulse.java @@ -81,9 +81,7 @@ public final class PotteryPulse extends SkillPulse { if (pottery == PotteryItem.BOWL && player.getLocation().getX() == 3086) { player.setAttribute("spun-bowl", true); } - final Item item = pottery.getUnfinished(); - player.getInventory().add(item); - Perks.addDouble(player, item); + Perks.addDouble(player, pottery.getUnfinished()); player.getSkills().addExperience(Skills.CRAFTING, pottery.getExp(), true); player.getPacketDispatch().sendMessage("You make the soft clay into " + (StringUtils.isPlusN(pottery.getUnfinished().getName()) ? "an" : "a") + " " + pottery.getUnfinished().getName().toLowerCase() + "."); } diff --git a/Server/src/org/crandor/game/content/skill/free/crafting/spinning/SpinningPulse.java b/Server/src/org/crandor/game/content/skill/free/crafting/spinning/SpinningPulse.java index 4a7ce739a..acb4fa8d7 100644 --- a/Server/src/org/crandor/game/content/skill/free/crafting/spinning/SpinningPulse.java +++ b/Server/src/org/crandor/game/content/skill/free/crafting/spinning/SpinningPulse.java @@ -72,9 +72,7 @@ public final class SpinningPulse extends SkillPulse { return false; } if (player.getInventory().remove(new Item(type.getNeed(), 1))) { - final Item item = new Item(type.getProduct(), 1); - player.getInventory().add(item); - Perks.addDouble(player, item); + Perks.addDouble(player, new Item(type.getProduct(), 1)); player.getSkills().addExperience(Skills.CRAFTING, type.getExp(), true); } ammount--; diff --git a/Server/src/org/crandor/game/content/skill/free/fishing/FishingPulse.java b/Server/src/org/crandor/game/content/skill/free/fishing/FishingPulse.java index 1fc9d7e75..706ab4be8 100644 --- a/Server/src/org/crandor/game/content/skill/free/fishing/FishingPulse.java +++ b/Server/src/org/crandor/game/content/skill/free/fishing/FishingPulse.java @@ -6,7 +6,7 @@ import org.crandor.game.content.global.tutorial.TutorialStage; import org.crandor.game.content.skill.SkillPulse; import org.crandor.game.content.skill.Skills; import org.crandor.game.content.skill.member.summoning.familiar.Forager; -import org.crandor.game.events.GlobalEvent; +import org.crandor.game.events.GlobalEventManager; import org.crandor.game.node.entity.npc.NPC; import org.crandor.game.node.entity.player.Player; import org.crandor.game.node.entity.player.info.portal.Perks; @@ -181,12 +181,10 @@ public final class FishingPulse extends SkillPulse { player.getSkillTasks().decreaseTask(player, SkillTasks.FTUNA2); } - if (GlobalEvent.PLENTY_OF_FISH.isActive()) + if (GlobalEventManager.get().isActive("Plenty of fish")) player.getInventory().add(fish.getItem()); SkillingPets.checkPetDrop(player, SkillingPets.HERON); - final Item item = fish.getItem(); - player.getInventory().add(item); - Perks.addDouble(player, item); + Perks.addDouble(player, fish.getItem()); player.getSkills().addExperience(Skills.FISHING, fish.getExperience(), true); message(2); if (TutorialSession.getExtension(player).getStage() == 13) { diff --git a/Server/src/org/crandor/game/content/skill/free/gather/GatheringSkillPulse.java b/Server/src/org/crandor/game/content/skill/free/gather/GatheringSkillPulse.java index 0a1dbe7cc..4d6e7e788 100644 --- a/Server/src/org/crandor/game/content/skill/free/gather/GatheringSkillPulse.java +++ b/Server/src/org/crandor/game/content/skill/free/gather/GatheringSkillPulse.java @@ -11,7 +11,7 @@ import org.crandor.game.content.global.tutorial.TutorialStage; import org.crandor.game.content.skill.SkillPulse; import org.crandor.game.content.skill.Skills; import org.crandor.game.content.skill.member.farming.wrapper.PatchWrapper; -import org.crandor.game.events.GlobalEvent; +import org.crandor.game.events.GlobalEventManager; import org.crandor.game.node.entity.impl.Projectile; import org.crandor.game.node.entity.player.Player; import org.crandor.game.node.entity.player.info.portal.Perks; @@ -39,24 +39,9 @@ public final class GatheringSkillPulse extends SkillPulse { private static final Item[] GEM_REWARDS = { new Item(1623), new Item(1621), new Item(1619), new Item(1617) }; /** - * Is the player is mining. + * If the player is mining. */ - private boolean isMining; - - /** - * Is the player is mining essence. - */ - private boolean isMiningEssence; - - /** - * Is the player is mining gems. - */ - private boolean isMiningGems; - - /** - * Is the player is woodcutting. - */ - private boolean isWoodcutting; + private boolean mining; /** * The amount of ticks it takes to get a log. @@ -86,21 +71,18 @@ public final class GatheringSkillPulse extends SkillPulse { if (TutorialSession.getExtension(player).getStage() == 35) { TutorialStage.load(player, 36, false); } - isMining = resource.getSkillId() == Skills.MINING; - isMiningEssence = resource == SkillingResource.RUNE_ESSENCE; - isMiningGems = resource.getReward() == SkillingResource.GEM_ROCK_0.getReward(); - isWoodcutting = resource.getSkillId() == Skills.WOODCUTTING; + mining = resource.getSkillId() == Skills.MINING; super.start(); } @Override public boolean checkRequirements() { if (player.getSkills().getLevel(resource.getSkillId()) < resource.getLevel()) { - player.getPacketDispatch().sendMessage("You need a " + Skills.SKILL_NAME[resource.getSkillId()] + " level of " + resource.getLevel() + " to " + (isMining ? "mine this rock." : "cut this tree.")); + player.getPacketDispatch().sendMessage("You need a " + Skills.SKILL_NAME[resource.getSkillId()] + " level of " + resource.getLevel() + " to " + (mining ? "mine this rock." : "cut this tree.")); return false; } if (setTool() == null) { - player.getPacketDispatch().sendMessage("You do not have a" + (isMining ? " pickaxe" : "n axe") + " to use."); + player.getPacketDispatch().sendMessage("You do not have a" + (mining ? " pickaxe" : "n axe") + " to use."); return false; } if (player.getInventory().freeSlots() < 1) { @@ -121,7 +103,7 @@ public final class GatheringSkillPulse extends SkillPulse { @Override public boolean reward() { - if (++ticks % (isMiningEssence ? 3 : 4) != 0) { + if (++ticks % (resource == SkillingResource.RUNE_ESSENCE ? 3 : 4) != 0) { return false; } if (node.getId() == 10041) { @@ -142,42 +124,112 @@ public final class GatheringSkillPulse extends SkillPulse { } else if (tutorialStage == 37 && node.getId() == 3042) { TutorialStage.load(player, 39, false); } - // If player is in donator zone - if (isWoodcutting && player.getLocation().getRegionId() == 12102) { + if (resource.getSkillId() == Skills.WOODCUTTING && player.getLocation().getRegionId() == 12102) { player.getAntiMacroHandler().fireEvent("tree spirit"); return true; } - // 20% chance to auto burn logs when using "inferno adze" item - if (isWoodcutting && tool.getId() == 13661 && RandomFunction.random(100) < 20){ + if (resource.getSkillId() == Skills.WOODCUTTING && tool.getId() == 13661 && RandomFunction.random(100) < 30){ player.sendMessage("Your chop some logs. The heat of the inferno adze incinerates them."); Projectile.create(player, null, 1776, 35, 30, 20, 25).transform(player, new Location(player.getLocation().getX() + 2, player.getLocation().getY()), true, 25, 25).send(); player.getSkills().addExperience(Skills.WOODCUTTING, resource.getExperience()); player.getSkills().addExperience(Skills.FIREMAKING, resource.getExperience()); return false; } - int reward = resource.getReward(); - if (reward > 0) { - reward = calculateReward(reward); - applyAchievementTask(reward); - // Give the player the items - int rewardAmount = calculateRewardAmount(reward); - Item item = new Item(reward, rewardAmount); - player.getInventory().add(item); - Perks.addDouble(player, item); - // Apply the experience points - double experience = calculateExperience(reward, rewardAmount); - player.getSkills().addExperience(resource.getSkillId(), experience, true); - // Send a message to the player - if (isMiningGems) { - String gemName = ItemDefinition.forId(reward).getName().toLowerCase(); - player.sendMessage("You get " + (StringUtils.isPlusN(gemName) ? "an" : "a") + " " + gemName + "."); - } else if (resource == SkillingResource.DRAMEN_TREE) { - player.getPacketDispatch().sendMessage("You cut a branch from the Dramen tree."); - } else { - player.getPacketDispatch().sendMessage("You get some " + ItemDefinition.forId(reward).getName().toLowerCase() + "."); + if (resource.getReward() > 0) { + int reward = resource.getReward(); + if (reward == 6333 && !player.getAchievementDiaryManager().getDiary(DiaryType.KARAMJA).isComplete(1, 4)) { + player.getAchievementDiaryManager().getDiary(DiaryType.KARAMJA).updateTask(player, 1, 4, true); + } else if (reward == 6332 && !player.getAchievementDiaryManager().getDiary(DiaryType.KARAMJA).isComplete(1, 5)) { + player.getAchievementDiaryManager().getDiary(DiaryType.KARAMJA).updateTask(player, 1, 5, true); } - // Calculate if the player should receive a bonus gem - if (!isMiningEssence && isMining) { + if (reward == 440 && player.getLocation().withinDistance(new Location(3285, 3363, 0)) && !player.getAchievementDiaryManager().getDiary(DiaryType.VARROCK).isComplete(0, 2)) { + player.getAchievementDiaryManager().getDiary(DiaryType.VARROCK).updateTask(player, 0, 2, true); + } + if (resource == SkillingResource.RUNE_ESSENCE && player.getSkills().getLevel(Skills.MINING) > 29) { + reward = 7936; + } + if (node.getId() == 24168 && !player.getAchievementDiaryManager().getDiary(DiaryType.VARROCK).isComplete(0, 6)) { + player.getAchievementDiaryManager().getDiary(DiaryType.VARROCK).updateTask(player, 0, 6, true); + } + if (reward == 440 && player.getViewport().getRegion().getId() == 13107 && !player.getAchievementDiaryManager().getDiary(DiaryType.LUMBRIDGE).isComplete(0, 8)) { + player.getAchievementDiaryManager().getDiary(DiaryType.LUMBRIDGE).updateTask(player, 0, 8, true); + } + if (reward == 1519 && player.getViewport().getRegion().getId() == 12338 && !player.getAchievementDiaryManager().getDiary(DiaryType.LUMBRIDGE).isComplete(1, 5)) { + player.getAchievementDiaryManager().getDiary(DiaryType.LUMBRIDGE).updateTask(player, 1, 5, true); + } + if (reward != 3239 || RandomFunction.random(100) < 10) { // Hollow + // tree + // (bark) + if (resource == SkillingResource.SANDSTONE || resource == SkillingResource.GRANITE) { + int value = RandomFunction.randomize(resource == SkillingResource.GRANITE ? 3 : 4); + reward += value << 1; + player.getSkills().addExperience(resource.getSkillId(), value * 10, true); + } + player.getInventory().add(new Item(reward, (GlobalEventManager.get().isActive("Lumberjack") && ItemDefinition.forId(reward).getName().toLowerCase().contains("logs") ? 2 : 1))); + if (reward == SkillingResource.CLAY_0.getReward()) { + if (player.getEquipment().contains(11074, 1)) { + player.getSavedData().getGlobalData().incrementBraceletOfClay(); + if (player.getSavedData().getGlobalData().getBraceletClayUses() >= 28) { + player.getSavedData().getGlobalData().setBraceletClayUses(0); + player.getEquipment().remove(new Item(11074)); + player.sendMessage("Your bracelet of clay has disinegrated."); + } + reward = 1761; + } + } + boolean gem = false; + if (reward == SkillingResource.GEM_ROCK_0.getReward()) { + gem = true; + int random = RandomFunction.random(100); + List gems = new ArrayList<>(); + if (random < 2) { + gems.add(1617); + } else if (random < 25) { + gems.add(1619); + gems.add(1623); + gems.add(1621); + } else if (random < 40) { + gems.add(1629); + } else { + gems.add(1627); + gems.add(1625); + } + reward = gems.get(RandomFunction.random(gems.size())); + if (reward == 1629) { + if (!player.getAchievementDiaryManager().getDiary(DiaryType.KARAMJA).isComplete(1, 11)) { + player.getAchievementDiaryManager().getDiary(DiaryType.KARAMJA).updateTask(player, 1, 11, true); + } + } + } + if (mining && player.getSavedData().getGlobalData().getStarSpriteDelay() > System.currentTimeMillis() && TimeUnit.MILLISECONDS.toMinutes(player.getSavedData().getGlobalData().getStarSpriteDelay() - System.currentTimeMillis()) >= 1425) { + player.getInventory().add(new Item(reward, 2)); + } else if (mining && player.getInventory().freeSlots() != 0 && player.getAchievementDiaryManager().getDiary(DiaryType.VARROCK).getLevel() != -1 && player.getAchievementDiaryManager().checkMiningReward(reward) && RandomFunction.random(100) <= 10) { + player.getInventory().add(new Item(reward, 2)); + player.sendMessage("Through the power of the varrock armour you receive double the reward."); + } else { + if (SkillcapePerks.hasSkillcapePerk(player, SkillcapePerks.MINING) && mining) { + if (RandomFunction.getRandom(100) <= 10) { + player.getSkills().addExperience(resource.getSkillId(), resource.getExperience(), true); + player.getInventory().add(new Item(reward, 1), player); + player.sendNotificationMessage("Your " + player.getEquipment().get(EquipmentContainer.SLOT_CAPE).getName() + " allows you to obtain two ores from this rock!"); + } + } + SkillingPets.checkPetDrop(player, mining ? SkillingPets.GOLEM : SkillingPets.BEAVER); + Perks.addDouble(player, new Item(reward, 1)); + } + if (gem) { + String gemName = ItemDefinition.forId(reward).getName().toLowerCase(); + player.sendMessage("You get " + (StringUtils.isPlusN(gemName) ? "an" : "a") + " " + gemName + "."); + } else if (resource == SkillingResource.DRAMEN_TREE) { + player.getPacketDispatch().sendMessage("You cut a branch from the Dramen tree."); + } else { + player.getPacketDispatch().sendMessage("You get some " + ItemDefinition.forId(reward).getName().toLowerCase() + "."); + } + if (reward == 3239) { + player.getSkills().addExperience(resource.getSkillId(), 275.2, true); + } + } + if (resource != SkillingResource.RUNE_ESSENCE && mining) { int chance = 282; boolean altered = false; if (player.getEquipment().getNew(EquipmentContainer.SLOT_RING).getId() == 2572) { @@ -200,25 +252,28 @@ public final class GatheringSkillPulse extends SkillPulse { } } } - // Calculate if the player should receive a bonus birds nest - if (isWoodcutting) { - int chance = 282; - if (player.getDetails().getShop().hasPerk(Perks.BIRD_MAN)) { - chance /= 1.5; - } - if (SkillcapePerks.hasSkillcapePerk(player, SkillcapePerks.WOODCUTTING)) { - chance /= 1.88; - } - if (RandomFunction.random(chance) == 0) { - BirdNest.drop(player); + if (mining && resource.getReward() == 444 && !player.getAchievementDiaryManager().hasCompletedTask(DiaryType.KARAMJA, 0, 2)) { + if (player.getLocation().getRegionId() == 10801 || player.getLocation().getRegionId() == 10802) { + player.getAchievementDiaryManager().updateTask(player, DiaryType.KARAMJA, 0, 2, true); } } } - // Tutorial stuff, maybe? if (tutorialStage == 7) { TutorialStage.load(player, 8, false); } - // not sure what this is exactly + if (!mining) { + int chance = 282; + if (player.getDetails().getShop().hasPerk(Perks.BIRD_MAN)) { + chance /= 1.5; + } + if (SkillcapePerks.hasSkillcapePerk(player, SkillcapePerks.WOODCUTTING)) { + chance /= 1.88; + } + if (RandomFunction.random(chance) == 0) { + BirdNest.drop(player); + } + } + player.getSkills().addExperience(resource.getSkillId(), resource.getExperience(), true); if (resource.getRespawnRate() != 0) { int charge = 1000 / resource.getRewardAmount(); node.setCharge(node.getCharge() - RandomFunction.random(charge, charge << 2)); @@ -242,165 +297,23 @@ public final class GatheringSkillPulse extends SkillPulse { return false; } - /** - * Checks if the has completed any achievements from their diary - */ - private void applyAchievementTask(int reward) { - if (reward == 6333 && !player.getAchievementDiaryManager().getDiary(DiaryType.KARAMJA).isComplete(1, 4)) { - player.getAchievementDiaryManager().getDiary(DiaryType.KARAMJA).updateTask(player, 1, 4, true); - } else if (reward == 6332 && !player.getAchievementDiaryManager().getDiary(DiaryType.KARAMJA).isComplete(1, 5)) { - player.getAchievementDiaryManager().getDiary(DiaryType.KARAMJA).updateTask(player, 1, 5, true); - } - if (reward == 440 && player.getLocation().withinDistance(new Location(3285, 3363, 0)) && !player.getAchievementDiaryManager().getDiary(DiaryType.VARROCK).isComplete(0, 2)) { - player.getAchievementDiaryManager().getDiary(DiaryType.VARROCK).updateTask(player, 0, 2, true); - } - if (node.getId() == 24168 && !player.getAchievementDiaryManager().getDiary(DiaryType.VARROCK).isComplete(0, 6)) { - player.getAchievementDiaryManager().getDiary(DiaryType.VARROCK).updateTask(player, 0, 6, true); - } - if (reward == 440 && player.getViewport().getRegion().getId() == 13107 && !player.getAchievementDiaryManager().getDiary(DiaryType.LUMBRIDGE).isComplete(0, 8)) { - player.getAchievementDiaryManager().getDiary(DiaryType.LUMBRIDGE).updateTask(player, 0, 8, true); - } - if (reward == 1519 && player.getViewport().getRegion().getId() == 12338 && !player.getAchievementDiaryManager().getDiary(DiaryType.LUMBRIDGE).isComplete(1, 5)) { - player.getAchievementDiaryManager().getDiary(DiaryType.LUMBRIDGE).updateTask(player, 1, 5, true); - } - if (reward == 444 && !player.getAchievementDiaryManager().hasCompletedTask(DiaryType.KARAMJA, 0, 2)) { - if (player.getLocation().getRegionId() == 10801 || player.getLocation().getRegionId() == 10802) { - player.getAchievementDiaryManager().updateTask(player, DiaryType.KARAMJA, 0, 2, true); - } - } - if (reward == 1629) { - if (!player.getAchievementDiaryManager().getDiary(DiaryType.KARAMJA).isComplete(1, 11)) { - player.getAchievementDiaryManager().getDiary(DiaryType.KARAMJA).updateTask(player, 1, 11, true); - } - } - } - /** * Checks if the player gets rewarded. * @return {@code True} if so. */ private boolean checkReward() { - int skill = isMining ? Skills.MINING : Skills.WOODCUTTING; + int skill = mining ? Skills.MINING : Skills.WOODCUTTING; int level = 1 + player.getSkills().getLevel(skill) + player.getFamiliarManager().getBoost(skill); double hostRatio = Math.random() * (100.0 * resource.getRate()); double clientRatio = Math.random() * ((level - resource.getLevel()) * (1.0 + tool.getRatio())); return hostRatio < clientRatio; } - - private int calculateReward(int reward) { - // If the player is mining sandstone or granite, then i'm not sure what this does? - if (resource == SkillingResource.SANDSTONE || resource == SkillingResource.GRANITE) { - int value = RandomFunction.randomize(resource == SkillingResource.GRANITE ? 3 : 4); - reward += value << 1; - player.getSkills().addExperience(resource.getSkillId(), value * 10, true); - } - - // If the player is mining clay - else if (reward == SkillingResource.CLAY_0.getReward()) { - // Check if they have a bracelet of clay equiped - if (player.getEquipment().contains(11074, 1)) { - player.getSavedData().getGlobalData().incrementBraceletOfClay(); - if (player.getSavedData().getGlobalData().getBraceletClayUses() >= 28) { - player.getSavedData().getGlobalData().setBraceletClayUses(0); - player.getEquipment().remove(new Item(11074)); - player.sendMessage("Your bracelet of clay has disinegrated."); - } - // Give soft clay - reward = 1761; - } - } - - // Convert rune essence to pure essence if the player is above level 30 mining - else if (isMiningEssence && player.getSkills().getLevel(Skills.MINING) >= 30) { - reward = 7936; - } - - // Calculate a random gem for the player - else if (isMiningGems) { - int random = RandomFunction.random(100); - List gems = new ArrayList<>(); - if (random < 2) { - gems.add(1617); - } else if (random < 25) { - gems.add(1619); - gems.add(1623); - gems.add(1621); - } else if (random < 40) { - gems.add(1629); - } else { - gems.add(1627); - gems.add(1625); - } - reward = gems.get(RandomFunction.random(gems.size())); - } - - return reward; - } - - /** - * Calculate the total amount of items the player should receive - * @return amount of items - */ - private int calculateRewardAmount(int reward) { - int amount = 1; - // Event doubles resources - if (GlobalEvent.HARVESTING_DOUBLES.isActive()) { - amount *= 2; - } - - if (isMining && !isMiningEssence) { - // Not sure what this bonus is for - if (isMining && player.getSavedData().getGlobalData().getStarSpriteDelay() > System.currentTimeMillis() && TimeUnit.MILLISECONDS.toMinutes(player.getSavedData().getGlobalData().getStarSpriteDelay() - System.currentTimeMillis()) >= 1425) { - amount += 1; - } - // Not sure what this bonus is for - else if (isMining && !isMiningEssence && player.getAchievementDiaryManager().getDiary(DiaryType.VARROCK).getLevel() != -1 && player.getAchievementDiaryManager().checkMiningReward(reward) && RandomFunction.random(100) <= 10) { - amount += 1; - player.sendMessage("Through the power of the varrock armour you receive an extra ore."); - } - // If the player has a skill cape, 10% chance of finding an extra item - else if (isMining && !isMiningEssence && SkillcapePerks.hasSkillcapePerk(player, SkillcapePerks.MINING) && RandomFunction.getRandom(100) <= 10) { - amount += 1; - player.sendNotificationMessage("Your " + player.getEquipment().get(EquipmentContainer.SLOT_CAPE).getName() + " allows you to obtain two ores from this rock!"); - } - } - - // 3239: Hollow tree (bark) 10% chance of obtaining - if (reward == 3239 && RandomFunction.random(100) >= 10) { - amount = 0; - } - - SkillingPets.checkPetDrop(player, isMining ? SkillingPets.GOLEM : SkillingPets.BEAVER); - - return amount; - } - - /** - * Calculate the total experience the player should receive - * @return amount of experience - */ - private double calculateExperience(int reward, int amount) { - double experience = resource.getExperience(); - - // Bark - if (reward == 3239) { - // If we receive the item, give the full experience points otherwise give the base amount - if (amount >= 1) { - experience = 275.2; - } else { - amount = 1; - } - } - - return experience * amount; - } - @Override public void message(int type) { switch (type) { case 0: - player.getPacketDispatch().sendMessage("You swing your " + (isMining ? "pickaxe at the rock..." : "axe at the tree...")); + player.getPacketDispatch().sendMessage("You swing your " + (mining ? "pickaxe at the rock..." : "axe at the tree...")); if (TutorialSession.getExtension(player).getStage() == 6) { player.lock(7); TutorialStage.load(player, 7, false); @@ -413,7 +326,7 @@ public final class GatheringSkillPulse extends SkillPulse { * Sets the tool used. */ private SkillingTool setTool() { - if (!isMining) { + if (!mining) { tool = SkillingTool.getHatchet(player); } else { tool = SkillingTool.getPickaxe(player); diff --git a/Server/src/org/crandor/game/content/skill/free/gather/SkillingResource.java b/Server/src/org/crandor/game/content/skill/free/gather/SkillingResource.java index e0a372cbd..bf31b0fd7 100644 --- a/Server/src/org/crandor/game/content/skill/free/gather/SkillingResource.java +++ b/Server/src/org/crandor/game/content/skill/free/gather/SkillingResource.java @@ -17,67 +17,17 @@ public enum SkillingResource { /** * Standard tree (Woodcutting). */ - STANDARD_TREE_1(1276, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1342, Skills.WOODCUTTING), - STANDARD_TREE_2(1277, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1343, Skills.WOODCUTTING), - STANDARD_TREE_3(1278, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1342, Skills.WOODCUTTING), - STANDARD_TREE_4(1279, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1345, Skills.WOODCUTTING), - STANDARD_TREE_5(1280, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1343, Skills.WOODCUTTING), - STANDARD_TREE_6(1330, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1341, Skills.WOODCUTTING), - STANDARD_TREE_7(1331, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1341, Skills.WOODCUTTING), - STANDARD_TREE_8(1332, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1341, Skills.WOODCUTTING), - STANDARD_TREE_9(2409, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1342, Skills.WOODCUTTING), - STANDARD_TREE_10(3033, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1345, Skills.WOODCUTTING), - STANDARD_TREE_11(3034, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1345, Skills.WOODCUTTING), - STANDARD_TREE_12(3035, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1347, Skills.WOODCUTTING), - STANDARD_TREE_13(3036, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1351, Skills.WOODCUTTING), - STANDARD_TREE_14(3879, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 3880, Skills.WOODCUTTING), - STANDARD_TREE_15(3881, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 3880, Skills.WOODCUTTING), - STANDARD_TREE_16(3882, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 3880, Skills.WOODCUTTING), - STANDARD_TREE_17(3883, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 3884, Skills.WOODCUTTING), - STANDARD_TREE_18(10041, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1342, Skills.WOODCUTTING), - STANDARD_TREE_19(14308, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1342, Skills.WOODCUTTING), - STANDARD_TREE_20(14309, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1342, Skills.WOODCUTTING), - STANDARD_TREE_21(16264, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1342, Skills.WOODCUTTING), - STANDARD_TREE_22(16265, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1342, Skills.WOODCUTTING), - STANDARD_TREE_23(30132, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1342, Skills.WOODCUTTING), - STANDARD_TREE_24(30133, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1342, Skills.WOODCUTTING), - STANDARD_TREE_25(37477, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1342, Skills.WOODCUTTING), - STANDARD_TREE_26(37478, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 37653, Skills.WOODCUTTING), - STANDARD_TREE_27(37652, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 37653, Skills.WOODCUTTING), + STANDARD_TREE_1(1276, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1342, Skills.WOODCUTTING), STANDARD_TREE_2(1277, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1343, Skills.WOODCUTTING), STANDARD_TREE_3(1278, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1342, Skills.WOODCUTTING), STANDARD_TREE_4(1279, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1345, Skills.WOODCUTTING), STANDARD_TREE_5(1280, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1343, Skills.WOODCUTTING), STANDARD_TREE_6(1330, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1341, Skills.WOODCUTTING), STANDARD_TREE_7(1331, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1341, Skills.WOODCUTTING), STANDARD_TREE_8(1332, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1341, Skills.WOODCUTTING), STANDARD_TREE_9(2409, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1342, Skills.WOODCUTTING), STANDARD_TREE_10(3033, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1345, Skills.WOODCUTTING), STANDARD_TREE_11(3034, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1345, Skills.WOODCUTTING), STANDARD_TREE_12(3035, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1347, Skills.WOODCUTTING), STANDARD_TREE_13(3036, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1351, Skills.WOODCUTTING), STANDARD_TREE_14(3879, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 3880, Skills.WOODCUTTING), STANDARD_TREE_15(3881, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 3880, Skills.WOODCUTTING), STANDARD_TREE_16(3882, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 3880, Skills.WOODCUTTING), STANDARD_TREE_17(3883, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 3884, Skills.WOODCUTTING), STANDARD_TREE_18(10041, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1342, Skills.WOODCUTTING), STANDARD_TREE_19(14308, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1342, Skills.WOODCUTTING), STANDARD_TREE_20(14309, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1342, Skills.WOODCUTTING), STANDARD_TREE_21(16264, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1342, Skills.WOODCUTTING), STANDARD_TREE_22(16265, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1342, Skills.WOODCUTTING), STANDARD_TREE_23(30132, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1342, Skills.WOODCUTTING), STANDARD_TREE_24(30133, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1342, Skills.WOODCUTTING), STANDARD_TREE_25(37477, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1342, Skills.WOODCUTTING), STANDARD_TREE_26(37478, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 37653, Skills.WOODCUTTING), STANDARD_TREE_27(37652, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 37653, Skills.WOODCUTTING), /** * Fruit trees. */ - APPLE_TREE(7941, 1, 0.05, 50 | 100 << 16, 25.0, -1, 1, "tree", null, 37653, Skills.WOODCUTTING, true), - BANANA_TREE(8000, 1, 0.05, 50 | 100 << 16, 25.0, -1, 1, "tree", null, 37653, Skills.WOODCUTTING, true), - ORANGE_TREE(8057, 1, 0.05, 50 | 100 << 16, 25.0, -1, 1, "tree", null, 37653, Skills.WOODCUTTING, true), - CURRY_TREE(8026, 1, 0.05, 50 | 100 << 16, 25.0, -1, 1, "tree", null, 37653, Skills.WOODCUTTING, true), - PINEAPPLE_TREE(7972, 1, 0.05, 50 | 100 << 16, 25.0, -1, 1, "tree", null, 37653, Skills.WOODCUTTING, true), - PAPAYA_TREE(8111, 1, 0.05, 50 | 100 << 16, 25.0, -1, 1, "tree", null, 37653, Skills.WOODCUTTING, true), - PALM_TREE(8084, 1, 0.05, 50 | 100 << 16, 25.0, -1, 1, "tree", null, 37653, Skills.WOODCUTTING, true), + APPLE_TREE(7941, 1, 0.05, 50 | 100 << 16, 25.0, -1, 1, "tree", null, 37653, Skills.WOODCUTTING, true), BANANA_TREE(8000, 1, 0.05, 50 | 100 << 16, 25.0, -1, 1, "tree", null, 37653, Skills.WOODCUTTING, true), ORANGE_TREE(8057, 1, 0.05, 50 | 100 << 16, 25.0, -1, 1, "tree", null, 37653, Skills.WOODCUTTING, true), CURRY_TREE(8026, 1, 0.05, 50 | 100 << 16, 25.0, -1, 1, "tree", null, 37653, Skills.WOODCUTTING, true), PINEAPPLE_TREE(7972, 1, 0.05, 50 | 100 << 16, 25.0, -1, 1, "tree", null, 37653, Skills.WOODCUTTING, true), PAPAYA_TREE(8111, 1, 0.05, 50 | 100 << 16, 25.0, -1, 1, "tree", null, 37653, Skills.WOODCUTTING, true), PALM_TREE(8084, 1, 0.05, 50 | 100 << 16, 25.0, -1, 1, "tree", null, 37653, Skills.WOODCUTTING, true), /** * Dead tree (Woodcutting). */ - DEAD_TREE_1(1282, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1347, Skills.WOODCUTTING), - DEAD_TREE_2(1283, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1347, Skills.WOODCUTTING), - DEAD_TREE_3(1284, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1348, Skills.WOODCUTTING), - DEAD_TREE_4(1285, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1349, Skills.WOODCUTTING), - DEAD_TREE_5(1286, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1351, Skills.WOODCUTTING), - DEAD_TREE_6(1289, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1353, Skills.WOODCUTTING), - DEAD_TREE_7(1290, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1354, Skills.WOODCUTTING), - DEAD_TREE_8(1291, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 23054, Skills.WOODCUTTING), - DEAD_TREE_9(1365, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1352, Skills.WOODCUTTING), - DEAD_TREE_10(1383, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1358, Skills.WOODCUTTING), - DEAD_TREE_11(1384, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1359, Skills.WOODCUTTING), - DEAD_TREE_12(5902, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1347, Skills.WOODCUTTING), - DEAD_TREE_13(5903, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1353, Skills.WOODCUTTING), - DEAD_TREE_14(5904, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1353, Skills.WOODCUTTING), - DEAD_TREE_15(32294, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1353, Skills.WOODCUTTING), - DEAD_TREE_16(37481, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1347, Skills.WOODCUTTING), - DEAD_TREE_17(37482, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1351, Skills.WOODCUTTING), - DEAD_TREE_18(37483, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1358, Skills.WOODCUTTING), - DEAD_TREE_19(24168, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dying tree", null, 24169, Skills.WOODCUTTING), + DEAD_TREE_1(1282, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1347, Skills.WOODCUTTING), DEAD_TREE_2(1283, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1347, Skills.WOODCUTTING), DEAD_TREE_3(1284, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1348, Skills.WOODCUTTING), DEAD_TREE_4(1285, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1349, Skills.WOODCUTTING), DEAD_TREE_5(1286, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1351, Skills.WOODCUTTING), DEAD_TREE_6(1289, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1353, Skills.WOODCUTTING), DEAD_TREE_7(1290, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1354, Skills.WOODCUTTING), DEAD_TREE_8(1291, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 23054, Skills.WOODCUTTING), DEAD_TREE_9(1365, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1352, Skills.WOODCUTTING), DEAD_TREE_10(1383, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1358, Skills.WOODCUTTING), DEAD_TREE_11(1384, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1359, Skills.WOODCUTTING), DEAD_TREE_12(5902, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1347, Skills.WOODCUTTING), DEAD_TREE_13(5903, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1353, Skills.WOODCUTTING), DEAD_TREE_14(5904, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1353, Skills.WOODCUTTING), DEAD_TREE_15(32294, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1353, Skills.WOODCUTTING), DEAD_TREE_16(37481, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1347, Skills.WOODCUTTING), DEAD_TREE_17(37482, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1351, Skills.WOODCUTTING), DEAD_TREE_18(37483, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1358, Skills.WOODCUTTING), DEAD_TREE_19(24168, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dying tree", null, 24169, Skills.WOODCUTTING), /** * Dramen tree (Woodcutting/Lost city quest). @@ -87,22 +37,14 @@ public enum SkillingResource { /** * Evergreen (Woodcutting). */ - EVERGREEN_1(1315, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "evergreen", null, 1342, Skills.WOODCUTTING), - EVERGREEN_2(1316, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "evergreen", null, 1355, Skills.WOODCUTTING), - EVERGREEN_3(1318, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "evergreen", null, 1355, Skills.WOODCUTTING), - EVERGREEN_4(1319, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "evergreen", null, 1355, Skills.WOODCUTTING), + EVERGREEN_1(1315, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "evergreen", null, 1342, Skills.WOODCUTTING), EVERGREEN_2(1316, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "evergreen", null, 1355, Skills.WOODCUTTING), EVERGREEN_3(1318, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "evergreen", null, 1355, Skills.WOODCUTTING), EVERGREEN_4(1319, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "evergreen", null, 1355, Skills.WOODCUTTING), /** * Jungle tree (Woodcutting). */ - JUNGLE_TREE_1(2887, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 2, "jungle tree", null, 0, Skills.WOODCUTTING), - JUNGLE_TREE_2(2889, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 2, "jungle tree", null, 0, Skills.WOODCUTTING), - JUNGLE_TREE_3(2890, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 2, "jungle tree", null, 0, Skills.WOODCUTTING), - JUNGLE_TREE_4(4818, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 2, "jungle tree", null, 0, Skills.WOODCUTTING), - JUNGLE_TREE_5(4820, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 2, "jungle tree", null, 0, Skills.WOODCUTTING), + JUNGLE_TREE_1(2887, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 2, "jungle tree", null, 0, Skills.WOODCUTTING), JUNGLE_TREE_2(2889, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 2, "jungle tree", null, 0, Skills.WOODCUTTING), JUNGLE_TREE_3(2890, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 2, "jungle tree", null, 0, Skills.WOODCUTTING), JUNGLE_TREE_4(4818, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 2, "jungle tree", null, 0, Skills.WOODCUTTING), JUNGLE_TREE_5(4820, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 2, "jungle tree", null, 0, Skills.WOODCUTTING), - JUNGLE_BUSH_1(2892, 1, 0.15, 50 | 100 << 16, 100.0, 1511, 1, "jungle bush", null, 2894, Skills.WOODCUTTING), - JUNGLE_BUSH_2(2893, 1, 0.15, 50 | 100 << 16, 100.0, 1511, 1, "jungle bush", null, 2895, Skills.WOODCUTTING), + JUNGLE_BUSH_1(2892, 1, 0.15, 50 | 100 << 16, 100.0, 1511, 1, "jungle bush", null, 2894, Skills.WOODCUTTING), JUNGLE_BUSH_2(2893, 1, 0.15, 50 | 100 << 16, 100.0, 1511, 1, "jungle bush", null, 2895, Skills.WOODCUTTING), /** * Achey tree (Woodcutting). @@ -112,39 +54,27 @@ public enum SkillingResource { /** * Oak tree (Woodcutting). */ - OAK_TREE_1(1281, 15, 0.15, 14 | 22 << 16, 37.5, 1521, 10, "oak tree", null, 1356, Skills.WOODCUTTING), - OAK_TREE_2(3037, 15, 0.15, 14 | 22 << 16, 37.5, 1521, 10, "oak tree", null, 1357, Skills.WOODCUTTING), - OAK_TREE_3(37479, 15, 0.15, 14 | 22 << 16, 37.5, 1521, 10, "oak tree", null, 1356, Skills.WOODCUTTING), - OAK_TREE_4(8467, 15, 0.15, 14 | 22 << 16, 37.5, 1521, 10, "oak tree", null, 1356, Skills.WOODCUTTING, true), + OAK_TREE_1(1281, 15, 0.15, 14 | 22 << 16, 37.5, 1521, 10, "oak tree", null, 1356, Skills.WOODCUTTING), OAK_TREE_2(3037, 15, 0.15, 14 | 22 << 16, 37.5, 1521, 10, "oak tree", null, 1357, Skills.WOODCUTTING), OAK_TREE_3(37479, 15, 0.15, 14 | 22 << 16, 37.5, 1521, 10, "oak tree", null, 1356, Skills.WOODCUTTING), OAK_TREE_4(8467, 15, 0.15, 14 | 22 << 16, 37.5, 1521, 10, "oak tree", null, 1356, Skills.WOODCUTTING, true), /** * Willow tree (Woodcutting). */ - WILLOW_TREE_1(1308, 30, 0.3, 14 | 22 << 16, 67.8, 1519, 20, "willow tree", null, 7399, Skills.WOODCUTTING), - WILLOW_TREE_2(5551, 30, 0.3, 14 | 22 << 16, 67.8, 1519, 20, "willow tree", null, 5554, Skills.WOODCUTTING), - WILLOW_TREE_3(5552, 30, 0.3, 14 | 22 << 16, 67.8, 1519, 20, "willow tree", null, 5554, Skills.WOODCUTTING), - WILLOW_TREE_4(5553, 30, 0.3, 14 | 22 << 16, 67.8, 1519, 20, "willow tree", null, 5554, Skills.WOODCUTTING), - WILLOW_TREE_5(37480, 30, 0.3, 14 | 22 << 16, 67.8, 1519, 20, "willow tree", null, 7399, Skills.WOODCUTTING), - WILLOW_TREE_6(8488, 30, 0.3, 14 | 22 << 16, 67.8, 1519, 20, "willow tree", null, 7399, Skills.WOODCUTTING, true), + WILLOW_TREE_1(1308, 30, 0.3, 14 | 22 << 16, 67.8, 1519, 20, "willow tree", null, 7399, Skills.WOODCUTTING), WILLOW_TREE_2(5551, 30, 0.3, 14 | 22 << 16, 67.8, 1519, 20, "willow tree", null, 5554, Skills.WOODCUTTING), WILLOW_TREE_3(5552, 30, 0.3, 14 | 22 << 16, 67.8, 1519, 20, "willow tree", null, 5554, Skills.WOODCUTTING), WILLOW_TREE_4(5553, 30, 0.3, 14 | 22 << 16, 67.8, 1519, 20, "willow tree", null, 5554, Skills.WOODCUTTING), WILLOW_TREE_5(37480, 30, 0.3, 14 | 22 << 16, 67.8, 1519, 20, "willow tree", null, 7399, Skills.WOODCUTTING), WILLOW_TREE_6(8488, 30, 0.3, 14 | 22 << 16, 67.8, 1519, 20, "willow tree", null, 7399, Skills.WOODCUTTING, true), /** * Teak (Woodcutting). */ - TEAK_1(9036, 35, 0.7, 35 | 60 << 16, 85.0, 6333, 25, "teak", null, 9037, Skills.WOODCUTTING), - TEAK_2(15062, 35, 0.7, 35 | 60 << 16, 85.0, 6333, 25, "teak", null, 9037, Skills.WOODCUTTING), + TEAK_1(9036, 35, 0.7, 35 | 60 << 16, 85.0, 6333, 25, "teak", null, 9037, Skills.WOODCUTTING), TEAK_2(15062, 35, 0.7, 35 | 60 << 16, 85.0, 6333, 25, "teak", null, 9037, Skills.WOODCUTTING), /** * Maple tree (Woodcutting). */ - MAPLE_TREE_1(1307, 45, 0.65, 58 | 100 << 16, 100.0, 1517, 30, "maple tree", null, 7400, Skills.WOODCUTTING), - MAPLE_TREE_2(4674, 45, 0.65, 58 | 100 << 16, 100.0, 1517, 30, "maple tree", null, 7400, Skills.WOODCUTTING), - MAPLE_TREE_3(8444, 45, 0.65, 58 | 100 << 16, 100.0, 1517, 30, "maple tree", null, 7400, Skills.WOODCUTTING, true), + MAPLE_TREE_1(1307, 45, 0.65, 58 | 100 << 16, 100.0, 1517, 30, "maple tree", null, 7400, Skills.WOODCUTTING), MAPLE_TREE_2(4674, 45, 0.65, 58 | 100 << 16, 100.0, 1517, 30, "maple tree", null, 7400, Skills.WOODCUTTING), MAPLE_TREE_3(8444, 45, 0.65, 58 | 100 << 16, 100.0, 1517, 30, "maple tree", null, 7400, Skills.WOODCUTTING, true), /** * Hollow tree (Woodcutting). */ - HOLLOW_TREE_1(2289, 45, 0.6, 58 | 100 << 16, 82.5, 3239, 30, "hollow tree", null, 2310, Skills.WOODCUTTING), - HOLLOW_TREE_2(4060, 45, 0.6, 58 | 100 << 16, 82.5, 3239, 30, "hollow tree", null, 4061, Skills.WOODCUTTING), + HOLLOW_TREE_1(2289, 45, 0.6, 58 | 100 << 16, 82.5, 3239, 30, "hollow tree", null, 2310, Skills.WOODCUTTING), HOLLOW_TREE_2(4060, 45, 0.6, 58 | 100 << 16, 82.5, 3239, 30, "hollow tree", null, 4061, Skills.WOODCUTTING), /** * Mahogany (Woodcutting). @@ -159,111 +89,29 @@ public enum SkillingResource { /** * Eucalyptus tree (Woodcutting). */ - EUCALYPTUS_1(28951, 58, 0.77, 80 | 140 << 16, 165.0, 12581, 35, "eucalyptus tree", null, 28954, Skills.WOODCUTTING), - EUCALYPTUS_2(28952, 58, 0.77, 80 | 140 << 16, 165.0, 12581, 35, "eucalyptus tree", null, 28955, Skills.WOODCUTTING), - EUCALYPTUS_3(28953, 58, 0.77, 80 | 140 << 16, 165.0, 12581, 35, "eucalyptus tree", null, 28956, Skills.WOODCUTTING), + EUCALYPTUS_1(28951, 58, 0.77, 80 | 140 << 16, 165.0, 12581, 35, "eucalyptus tree", null, 28954, Skills.WOODCUTTING), EUCALYPTUS_2(28952, 58, 0.77, 80 | 140 << 16, 165.0, 12581, 35, "eucalyptus tree", null, 28955, Skills.WOODCUTTING), EUCALYPTUS_3(28953, 58, 0.77, 80 | 140 << 16, 165.0, 12581, 35, "eucalyptus tree", null, 28956, Skills.WOODCUTTING), /** * Yew tree (Woodcutting). */ - YEW(1309, 60, 0.8, 100 | 162 << 16, 175.0, 1515, 40, "yew", null, 7402, Skills.WOODCUTTING), - YEW_1(8513, 60, 0.8, 100 | 162 << 16, 175.0, 1515, 40, "yew", null, 7402, Skills.WOODCUTTING, true), + YEW(1309, 60, 0.8, 100 | 162 << 16, 175.0, 1515, 40, "yew", null, 7402, Skills.WOODCUTTING), YEW_1(8513, 60, 0.8, 100 | 162 << 16, 175.0, 1515, 40, "yew", null, 7402, Skills.WOODCUTTING, true), /** * Magic tree (Woodcutting). */ - MAGIC_TREE_1(1306, 75, 0.9, 200 | 317 << 16, 250.0, 1513, 50, "magic tree", null, 7401, Skills.WOODCUTTING), - MAGIC_TREE_2(37823, 75, 0.9, 200 | 317 << 16, 250.0, 1513, 50, "magic tree", null, 37824, Skills.WOODCUTTING), - MAGIC_TREE_3(8409, 75, 0.9, 200 | 317 << 16, 250.0, 1513, 50, "magic tree", null, 37824, Skills.WOODCUTTING, true), + MAGIC_TREE_1(1306, 75, 0.9, 200 | 317 << 16, 250.0, 1513, 50, "magic tree", null, 7401, Skills.WOODCUTTING), MAGIC_TREE_2(37823, 75, 0.9, 200 | 317 << 16, 250.0, 1513, 50, "magic tree", null, 37824, Skills.WOODCUTTING), MAGIC_TREE_3(8409, 75, 0.9, 200 | 317 << 16, 250.0, 1513, 50, "magic tree", null, 37824, Skills.WOODCUTTING, true), CURSED_MAGIC_TREE(37821, 82, 0.95, 200 | 317 << 16, 275.0, 1513, 50, "magic tree", null, 37822, Skills.WOODCUTTING), /** * Copper ore (Mining). */ - COPPER_ORE_0(2090, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 450, Skills.MINING), - COPPER_ORE_1(2091, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 452, Skills.MINING), - COPPER_ORE_2(4976, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 4994, Skills.MINING), - COPPER_ORE_3(4977, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 4995, Skills.MINING), - COPPER_ORE_4(4978, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 4996, Skills.MINING), - COPPER_ORE_5(9710, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 18954, Skills.MINING), - COPPER_ORE_6(9709, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 32448, Skills.MINING), - COPPER_ORE_7(9708, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 32447, Skills.MINING), - COPPER_ORE_8(11960, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 11555, Skills.MINING), - COPPER_ORE_9(11961, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 11556, Skills.MINING), - COPPER_ORE_10(11962, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 11557, Skills.MINING), - COPPER_ORE_11(11937, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 11553, Skills.MINING), - COPPER_ORE_12(11936, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 11552, Skills.MINING), - COPPER_ORE_13(11938, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 11554, Skills.MINING), - COPPER_ORE_14(12746, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 450, Skills.MINING), - COPPER_ORE_15(14906, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 14894, Skills.MINING), - COPPER_ORE_16(14907, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 14895, Skills.MINING), - COPPER_ORE_17(20448, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 20445, Skills.MINING), - COPPER_ORE_18(20451, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 20445, Skills.MINING), - COPPER_ORE_19(20446, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 20443, Skills.MINING), - COPPER_ORE_20(20447, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 20444, Skills.MINING), - COPPER_ORE_21(20408, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 20407, Skills.MINING), - COPPER_ORE_22(18993, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 19005, Skills.MINING), - COPPER_ORE_23(18992, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 19004, Skills.MINING), - COPPER_ORE_24(19007, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 19016, Skills.MINING), - COPPER_ORE_25(19006, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 19021, Skills.MINING), - COPPER_ORE_26(18991, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 19003, Skills.MINING), - COPPER_ORE_27(19008, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 19017, Skills.MINING), - COPPER_ORE_28(21285, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 21297, Skills.MINING), - COPPER_ORE_29(21284, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 21296, Skills.MINING), - COPPER_ORE_30(21286, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 21298, Skills.MINING), - COPPER_ORE_31(29231, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 29219, Skills.MINING), - COPPER_ORE_32(29230, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 29218, Skills.MINING), - COPPER_ORE_33(29232, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 29220, Skills.MINING), - COPPER_ORE_34(31082, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 37650, Skills.MINING), - COPPER_ORE_35(31081, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 37649, Skills.MINING), - COPPER_ORE_36(31080, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 37639, Skills.MINING), - COPPER_ORE_37(37647, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 37650, Skills.MINING), - COPPER_ORE_38(37646, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 37649, Skills.MINING), - COPPER_ORE_39(37645, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 37639, Skills.MINING), - COPPER_ORE_40(37637, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 37639, Skills.MINING), - COPPER_ORE_41(37688, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 21298, Skills.MINING), - COPPER_ORE_42(37686, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 21296, Skills.MINING), - COPPER_ORE_43(37687, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 21297, Skills.MINING), - COPPER_ORE_44(3042, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 450, Skills.MINING), + COPPER_ORE_0(2090, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 450, Skills.MINING), COPPER_ORE_1(2091, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 452, Skills.MINING), COPPER_ORE_2(4976, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 4994, Skills.MINING), COPPER_ORE_3(4977, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 4995, Skills.MINING), COPPER_ORE_4(4978, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 4996, Skills.MINING), COPPER_ORE_5(9710, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 18954, Skills.MINING), COPPER_ORE_6(9709, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 32448, Skills.MINING), COPPER_ORE_7(9708, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 32447, Skills.MINING), COPPER_ORE_8(11960, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 11555, Skills.MINING), COPPER_ORE_9(11961, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 11556, Skills.MINING), COPPER_ORE_10(11962, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 11557, Skills.MINING), COPPER_ORE_11(11937, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 11553, Skills.MINING), COPPER_ORE_12(11936, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 11552, Skills.MINING), COPPER_ORE_13(11938, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 11554, Skills.MINING), COPPER_ORE_14(12746, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 450, Skills.MINING), COPPER_ORE_15(14906, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 14894, Skills.MINING), COPPER_ORE_16(14907, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 14895, Skills.MINING), COPPER_ORE_17(20448, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 20445, Skills.MINING), COPPER_ORE_18(20451, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 20445, Skills.MINING), COPPER_ORE_19(20446, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 20443, Skills.MINING), COPPER_ORE_20(20447, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 20444, Skills.MINING), COPPER_ORE_21(20408, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 20407, Skills.MINING), COPPER_ORE_22(18993, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 19005, Skills.MINING), COPPER_ORE_23(18992, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 19004, Skills.MINING), COPPER_ORE_24(19007, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 19016, Skills.MINING), COPPER_ORE_25(19006, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 19021, Skills.MINING), COPPER_ORE_26(18991, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 19003, Skills.MINING), COPPER_ORE_27(19008, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 19017, Skills.MINING), COPPER_ORE_28(21285, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 21297, Skills.MINING), COPPER_ORE_29(21284, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 21296, Skills.MINING), COPPER_ORE_30(21286, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 21298, Skills.MINING), COPPER_ORE_31(29231, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 29219, Skills.MINING), COPPER_ORE_32(29230, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 29218, Skills.MINING), COPPER_ORE_33(29232, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 29220, Skills.MINING), COPPER_ORE_34(31082, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 37650, Skills.MINING), COPPER_ORE_35(31081, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 37649, Skills.MINING), COPPER_ORE_36(31080, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 37639, Skills.MINING), COPPER_ORE_37(37647, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 37650, Skills.MINING), COPPER_ORE_38(37646, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 37649, Skills.MINING), COPPER_ORE_39(37645, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 37639, Skills.MINING), COPPER_ORE_40(37637, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 37639, Skills.MINING), COPPER_ORE_41(37688, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 21298, Skills.MINING), COPPER_ORE_42(37686, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 21296, Skills.MINING), COPPER_ORE_43(37687, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 21297, Skills.MINING), COPPER_ORE_44(3042, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 450, Skills.MINING), /** * Tin ore (Mining). */ - TIN_ORE_0(2094, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 450, Skills.MINING), - TIN_ORE_1(2095, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 452, Skills.MINING), - TIN_ORE_2(3043, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 450, Skills.MINING), - TIN_ORE_3(4979, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 4994, Skills.MINING), - TIN_ORE_4(4980, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 4995, Skills.MINING), - TIN_ORE_5(4981, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 4996, Skills.MINING), - TIN_ORE_6(11957, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 11555, Skills.MINING), - TIN_ORE_7(11958, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 11556, Skills.MINING), - TIN_ORE_8(11959, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 11557, Skills.MINING), - TIN_ORE_9(11934, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 11553, Skills.MINING), - TIN_ORE_10(11935, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 11554, Skills.MINING), - TIN_ORE_11(11933, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 11552, Skills.MINING), - TIN_ORE_12(14902, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 14894, Skills.MINING), - TIN_ORE_13(14903, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 14895, Skills.MINING), - TIN_ORE_14(18995, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 19004, Skills.MINING), - TIN_ORE_15(18994, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 19003, Skills.MINING), - TIN_ORE_16(18996, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 19005, Skills.MINING), - TIN_ORE_17(19025, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 19016, Skills.MINING), - TIN_ORE_18(19024, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 19021, Skills.MINING), - TIN_ORE_19(19026, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 19017, Skills.MINING), - TIN_ORE_20(21293, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 21296, Skills.MINING), - TIN_ORE_21(21295, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 21298, Skills.MINING), - TIN_ORE_22(21294, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 21297, Skills.MINING), - TIN_ORE_23(29227, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 29218, Skills.MINING), - TIN_ORE_24(29229, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 29220, Skills.MINING), - TIN_ORE_25(29228, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 29219, Skills.MINING), - TIN_ORE_26(31079, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 37650, Skills.MINING), - TIN_ORE_27(31078, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 37649, Skills.MINING), - TIN_ORE_28(31077, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 37639, Skills.MINING), - TIN_ORE_29(37644, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 37650, Skills.MINING), - TIN_ORE_30(37643, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 37649, Skills.MINING), - TIN_ORE_31(37642, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 37639, Skills.MINING), - TIN_ORE_32(37638, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 37639, Skills.MINING), - TIN_ORE_33(37685, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 21298, Skills.MINING), + TIN_ORE_0(2094, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 450, Skills.MINING), TIN_ORE_1(2095, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 452, Skills.MINING), TIN_ORE_2(3043, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 450, Skills.MINING), TIN_ORE_3(4979, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 4994, Skills.MINING), TIN_ORE_4(4980, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 4995, Skills.MINING), TIN_ORE_5(4981, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 4996, Skills.MINING), TIN_ORE_6(11957, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 11555, Skills.MINING), TIN_ORE_7(11958, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 11556, Skills.MINING), TIN_ORE_8(11959, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 11557, Skills.MINING), TIN_ORE_9(11934, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 11553, Skills.MINING), TIN_ORE_10(11935, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 11554, Skills.MINING), TIN_ORE_11(11933, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 11552, Skills.MINING), TIN_ORE_12(14902, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 14894, Skills.MINING), TIN_ORE_13(14903, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 14895, Skills.MINING), TIN_ORE_14(18995, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 19004, Skills.MINING), TIN_ORE_15(18994, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 19003, Skills.MINING), TIN_ORE_16(18996, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 19005, Skills.MINING), TIN_ORE_17(19025, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 19016, Skills.MINING), TIN_ORE_18(19024, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 19021, Skills.MINING), TIN_ORE_19(19026, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 19017, Skills.MINING), TIN_ORE_20(21293, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 21296, Skills.MINING), TIN_ORE_21(21295, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 21298, Skills.MINING), TIN_ORE_22(21294, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 21297, Skills.MINING), TIN_ORE_23(29227, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 29218, Skills.MINING), TIN_ORE_24(29229, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 29220, Skills.MINING), TIN_ORE_25(29228, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 29219, Skills.MINING), TIN_ORE_26(31079, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 37650, Skills.MINING), TIN_ORE_27(31078, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 37649, Skills.MINING), TIN_ORE_28(31077, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 37639, Skills.MINING), TIN_ORE_29(37644, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 37650, Skills.MINING), TIN_ORE_30(37643, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 37649, Skills.MINING), TIN_ORE_31(37642, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 37639, Skills.MINING), TIN_ORE_32(37638, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 37639, Skills.MINING), TIN_ORE_33(37685, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 21298, Skills.MINING), /** * Rune/Pure essence (Mining). @@ -273,192 +121,33 @@ public enum SkillingResource { /** * Clay (Mining). */ - CLAY_0(2109, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 452, Skills.MINING), - CLAY_1(2108, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 450, Skills.MINING), - CLAY_2(9712, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 32448, Skills.MINING), - CLAY_3(9713, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 18954, Skills.MINING), - CLAY_4(9711, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 32447, Skills.MINING), - CLAY_5(10949, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 10945, Skills.MINING), - CLAY_6(11190, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 21297, Skills.MINING), - CLAY_7(11191, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 21298, Skills.MINING), - CLAY_8(11189, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 21296, Skills.MINING), - CLAY_9(12942, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 4995, Skills.MINING), - CLAY_10(12943, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 4996, Skills.MINING), - CLAY_11(12941, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 4994, Skills.MINING), - CLAY_12(14904, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 14894, Skills.MINING), - CLAY_13(14905, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 14895, Skills.MINING), - CLAY_14(15505, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 11557, Skills.MINING), - CLAY_15(15504, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 11556, Skills.MINING), - CLAY_16(15503, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 11555, Skills.MINING), - CLAY_17(20449, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 20443, Skills.MINING), - CLAY_18(20450, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 20444, Skills.MINING), - CLAY_19(20409, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 20407, Skills.MINING), - CLAY_20(32429, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 33400, Skills.MINING), - CLAY_21(32430, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 33401, Skills.MINING), - CLAY_22(32431, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 33402, Skills.MINING), - CLAY_23(31062, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 37639, Skills.MINING), - CLAY_24(31063, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 37649, Skills.MINING), - CLAY_25(31064, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 37650, Skills.MINING), + CLAY_0(2109, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 452, Skills.MINING), CLAY_1(2108, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 450, Skills.MINING), CLAY_2(9712, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 32448, Skills.MINING), CLAY_3(9713, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 18954, Skills.MINING), CLAY_4(9711, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 32447, Skills.MINING), CLAY_5(10949, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 10945, Skills.MINING), CLAY_6(11190, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 21297, Skills.MINING), CLAY_7(11191, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 21298, Skills.MINING), CLAY_8(11189, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 21296, Skills.MINING), CLAY_9(12942, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 4995, Skills.MINING), CLAY_10(12943, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 4996, Skills.MINING), CLAY_11(12941, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 4994, Skills.MINING), CLAY_12(14904, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 14894, Skills.MINING), CLAY_13(14905, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 14895, Skills.MINING), CLAY_14(15505, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 11557, Skills.MINING), CLAY_15(15504, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 11556, Skills.MINING), CLAY_16(15503, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 11555, Skills.MINING), CLAY_17(20449, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 20443, Skills.MINING), CLAY_18(20450, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 20444, Skills.MINING), CLAY_19(20409, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 20407, Skills.MINING), CLAY_20(32429, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 33400, Skills.MINING), CLAY_21(32430, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 33401, Skills.MINING), CLAY_22(32431, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 33402, Skills.MINING), CLAY_23(31062, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 37639, Skills.MINING), CLAY_24(31063, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 37649, Skills.MINING), CLAY_25(31064, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 37650, Skills.MINING), /** * Limestone. */ - LIMESTONE_0(4027, 10, 0.2, 10 | 20 << 16, 26.5, 3211, 1, "limestone", null, 12564, Skills.MINING), - LIMESTONE_1(4028, 10, 0.2, 10 | 20 << 16, 26.5, 3211, 1, "limestone", null, 12565, Skills.MINING), - LIMESTONE_2(4029, 10, 0.2, 10 | 20 << 16, 26.5, 3211, 1, "limestone", null, 12566, Skills.MINING), - LIMESTONE_3(4030, 10, 0.2, 10 | 20 << 16, 26.5, 3211, 1, "limestone", null, 12567, Skills.MINING), + LIMESTONE_0(4027, 10, 0.2, 10 | 20 << 16, 26.5, 3211, 1, "limestone", null, 12564, Skills.MINING), LIMESTONE_1(4028, 10, 0.2, 10 | 20 << 16, 26.5, 3211, 1, "limestone", null, 12565, Skills.MINING), LIMESTONE_2(4029, 10, 0.2, 10 | 20 << 16, 26.5, 3211, 1, "limestone", null, 12566, Skills.MINING), LIMESTONE_3(4030, 10, 0.2, 10 | 20 << 16, 26.5, 3211, 1, "limestone", null, 12567, Skills.MINING), /** * Blurite ore. */ - BLURITE_ORE_0(33220, 10, 0.2, 10 | 20 << 16, 17.5, 668, 1, "blurite rocks", null, 33222, Skills.MINING), - BLURITE_ORE_1(33221, 10, 0.2, 10 | 20 << 16, 17.5, 668, 1, "blurite rocks", null, 33223, Skills.MINING), + BLURITE_ORE_0(33220, 10, 0.2, 10 | 20 << 16, 17.5, 668, 1, "blurite rocks", null, 33222, Skills.MINING), BLURITE_ORE_1(33221, 10, 0.2, 10 | 20 << 16, 17.5, 668, 1, "blurite rocks", null, 33223, Skills.MINING), /** * Iron ore. */ - IRON_ORE_0(2092, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 450, Skills.MINING), - IRON_ORE_1(2093, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 452, Skills.MINING), - IRON_ORE_2(4982, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 4994, Skills.MINING), - IRON_ORE_3(4983, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 4995, Skills.MINING), - IRON_ORE_4(4984, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 4996, Skills.MINING), - IRON_ORE_5(6943, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 21296, Skills.MINING), - IRON_ORE_6(6944, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 21297, Skills.MINING), - IRON_ORE_7(9718, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 32448, Skills.MINING), - IRON_ORE_8(9719, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 18954, Skills.MINING), - IRON_ORE_9(9717, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 32447, Skills.MINING), - IRON_ORE_10(11956, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 11557, Skills.MINING), - IRON_ORE_11(11954, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 11555, Skills.MINING), - IRON_ORE_12(11955, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 11556, Skills.MINING), - IRON_ORE_13(14914, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 14895, Skills.MINING), - IRON_ORE_14(14913, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 14894, Skills.MINING), - IRON_ORE_15(14858, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 25373, Skills.MINING), - IRON_ORE_16(14857, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 25372, Skills.MINING), - IRON_ORE_17(14856, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 25371, Skills.MINING), - IRON_ORE_18(14900, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 14894, Skills.MINING), - IRON_ORE_19(14901, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 14895, Skills.MINING), - IRON_ORE_20(20423, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 20444, Skills.MINING), - IRON_ORE_21(20422, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 20443, Skills.MINING), - IRON_ORE_22(20425, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 20407, Skills.MINING), - IRON_ORE_23(20424, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 20445, Skills.MINING), - IRON_ORE_24(19002, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 19005, Skills.MINING), - IRON_ORE_25(19001, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 19004, Skills.MINING), - IRON_ORE_26(19000, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 19003, Skills.MINING), - IRON_ORE_27(21281, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 21296, Skills.MINING), - IRON_ORE_28(21283, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 21298, Skills.MINING), - IRON_ORE_29(21282, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 21297, Skills.MINING), - IRON_ORE_30(29221, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 29218, Skills.MINING), - IRON_ORE_31(29223, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 29220, Skills.MINING), - IRON_ORE_32(29222, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 29219, Skills.MINING), - IRON_ORE_33(32441, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 33400, Skills.MINING), - IRON_ORE_34(32443, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 33402, Skills.MINING), - IRON_ORE_35(32442, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 33401, Skills.MINING), - IRON_ORE_36(32452, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 32448, Skills.MINING), - IRON_ORE_37(32451, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 32447, Skills.MINING), - IRON_ORE_38(31073, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 37650, Skills.MINING), - IRON_ORE_39(31072, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 37649, Skills.MINING), - IRON_ORE_40(31071, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 37639, Skills.MINING), - IRON_ORE_41(37307, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 11552, Skills.MINING), - IRON_ORE_42(37309, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 11554, Skills.MINING), - IRON_ORE_43(37308, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 11553, Skills.MINING), + IRON_ORE_0(2092, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 450, Skills.MINING), IRON_ORE_1(2093, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 452, Skills.MINING), IRON_ORE_2(4982, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 4994, Skills.MINING), IRON_ORE_3(4983, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 4995, Skills.MINING), IRON_ORE_4(4984, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 4996, Skills.MINING), IRON_ORE_5(6943, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 21296, Skills.MINING), IRON_ORE_6(6944, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 21297, Skills.MINING), IRON_ORE_7(9718, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 32448, Skills.MINING), IRON_ORE_8(9719, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 18954, Skills.MINING), IRON_ORE_9(9717, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 32447, Skills.MINING), IRON_ORE_10(11956, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 11557, Skills.MINING), IRON_ORE_11(11954, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 11555, Skills.MINING), IRON_ORE_12(11955, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 11556, Skills.MINING), IRON_ORE_13(14914, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 14895, Skills.MINING), IRON_ORE_14(14913, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 14894, Skills.MINING), IRON_ORE_15(14858, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 25373, Skills.MINING), IRON_ORE_16(14857, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 25372, Skills.MINING), IRON_ORE_17(14856, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 25371, Skills.MINING), IRON_ORE_18(14900, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 14894, Skills.MINING), IRON_ORE_19(14901, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 14895, Skills.MINING), IRON_ORE_20(20423, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 20444, Skills.MINING), IRON_ORE_21(20422, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 20443, Skills.MINING), IRON_ORE_22(20425, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 20407, Skills.MINING), IRON_ORE_23(20424, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 20445, Skills.MINING), IRON_ORE_24(19002, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 19005, Skills.MINING), IRON_ORE_25(19001, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 19004, Skills.MINING), IRON_ORE_26(19000, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 19003, Skills.MINING), IRON_ORE_27(21281, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 21296, Skills.MINING), IRON_ORE_28(21283, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 21298, Skills.MINING), IRON_ORE_29(21282, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 21297, Skills.MINING), IRON_ORE_30(29221, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 29218, Skills.MINING), IRON_ORE_31(29223, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 29220, Skills.MINING), IRON_ORE_32(29222, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 29219, Skills.MINING), IRON_ORE_33(32441, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 33400, Skills.MINING), IRON_ORE_34(32443, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 33402, Skills.MINING), IRON_ORE_35(32442, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 33401, Skills.MINING), IRON_ORE_36(32452, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 32448, Skills.MINING), IRON_ORE_37(32451, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 32447, Skills.MINING), IRON_ORE_38(31073, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 37650, Skills.MINING), IRON_ORE_39(31072, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 37649, Skills.MINING), IRON_ORE_40(31071, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 37639, Skills.MINING), IRON_ORE_41(37307, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 11552, Skills.MINING), IRON_ORE_42(37309, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 11554, Skills.MINING), IRON_ORE_43(37308, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 11553, Skills.MINING), IRON_ORE_49(42034, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 450, Skills.MINING), - /** * Silver ore. */ - SILVER_ORE_0(2101, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 452, Skills.MINING), - SILVER_ORE_1(2100, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 450, Skills.MINING), - SILVER_ORE_2(6945, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 21296, Skills.MINING), - SILVER_ORE_3(6946, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 21297, Skills.MINING), - SILVER_ORE_4(9716, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 18954, Skills.MINING), - SILVER_ORE_5(9714, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 32447, Skills.MINING), - SILVER_ORE_6(9715, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 32448, Skills.MINING), - SILVER_ORE_7(11188, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 21298, Skills.MINING), - SILVER_ORE_8(11186, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 21296, Skills.MINING), - SILVER_ORE_9(11187, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 21297, Skills.MINING), - SILVER_ORE_10(15581, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 14834, Skills.MINING), - SILVER_ORE_11(15580, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 14833, Skills.MINING), - SILVER_ORE_12(15579, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 14832, Skills.MINING), - SILVER_ORE_13(16998, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 14915, Skills.MINING), - SILVER_ORE_14(16999, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 14916, Skills.MINING), - SILVER_ORE_15(17007, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 14915, Skills.MINING), - SILVER_ORE_16(17000, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 31061, Skills.MINING), - SILVER_ORE_17(17009, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 31061, Skills.MINING), - SILVER_ORE_18(17008, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 14916, Skills.MINING), - SILVER_ORE_19(17385, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 32447, Skills.MINING), - SILVER_ORE_20(17387, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 18954, Skills.MINING), - SILVER_ORE_21(17386, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 32448, Skills.MINING), - SILVER_ORE_22(29225, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 29219, Skills.MINING), - SILVER_ORE_23(29224, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 29218, Skills.MINING), - SILVER_ORE_24(29226, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 29220, Skills.MINING), - SILVER_ORE_25(32445, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 33401, Skills.MINING), - SILVER_ORE_26(32444, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 33400, Skills.MINING), - SILVER_ORE_27(32446, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 33402, Skills.MINING), - SILVER_ORE_28(31075, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 37649, Skills.MINING), - SILVER_ORE_29(31074, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 37639, Skills.MINING), - SILVER_ORE_30(31076, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 37650, Skills.MINING), - SILVER_ORE_31(37305, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 11553, Skills.MINING), - SILVER_ORE_32(37304, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 11552, Skills.MINING), - SILVER_ORE_33(37306, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 11554, Skills.MINING), - SILVER_ORE_34(37670, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 11552, Skills.MINING), - SILVER_ORE_35(11948, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 11555, Skills.MINING), - SILVER_ORE_36(11949, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 11556, Skills.MINING), - SILVER_ORE_37(11950, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 11557, Skills.MINING), + SILVER_ORE_0(2101, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 452, Skills.MINING), SILVER_ORE_1(2100, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 450, Skills.MINING), SILVER_ORE_2(6945, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 21296, Skills.MINING), SILVER_ORE_3(6946, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 21297, Skills.MINING), SILVER_ORE_4(9716, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 18954, Skills.MINING), SILVER_ORE_5(9714, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 32447, Skills.MINING), SILVER_ORE_6(9715, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 32448, Skills.MINING), SILVER_ORE_7(11188, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 21298, Skills.MINING), SILVER_ORE_8(11186, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 21296, Skills.MINING), SILVER_ORE_9(11187, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 21297, Skills.MINING), SILVER_ORE_10(15581, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 14834, Skills.MINING), SILVER_ORE_11(15580, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 14833, Skills.MINING), SILVER_ORE_12(15579, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 14832, Skills.MINING), SILVER_ORE_13(16998, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 14915, Skills.MINING), SILVER_ORE_14(16999, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 14916, Skills.MINING), SILVER_ORE_15(17007, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 14915, Skills.MINING), SILVER_ORE_16(17000, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 31061, Skills.MINING), SILVER_ORE_17(17009, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 31061, Skills.MINING), SILVER_ORE_18(17008, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 14916, Skills.MINING), SILVER_ORE_19(17385, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 32447, Skills.MINING), SILVER_ORE_20(17387, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 18954, Skills.MINING), SILVER_ORE_21(17386, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 32448, Skills.MINING), SILVER_ORE_22(29225, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 29219, Skills.MINING), SILVER_ORE_23(29224, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 29218, Skills.MINING), SILVER_ORE_24(29226, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 29220, Skills.MINING), SILVER_ORE_25(32445, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 33401, Skills.MINING), SILVER_ORE_26(32444, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 33400, Skills.MINING), SILVER_ORE_27(32446, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 33402, Skills.MINING), SILVER_ORE_28(31075, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 37649, Skills.MINING), SILVER_ORE_29(31074, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 37639, Skills.MINING), SILVER_ORE_30(31076, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 37650, Skills.MINING), SILVER_ORE_31(37305, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 11553, Skills.MINING), SILVER_ORE_32(37304, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 11552, Skills.MINING), SILVER_ORE_33(37306, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 11554, Skills.MINING), SILVER_ORE_34(37670, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 11552, Skills.MINING), SILVER_ORE_35(11948, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 11555, Skills.MINING), SILVER_ORE_36(11949, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 11556, Skills.MINING), SILVER_ORE_37(11950, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 11557, Skills.MINING), /** * Coal. */ - COAL_0(2097, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 452, Skills.MINING), - COAL_1(2096, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 450, Skills.MINING), - COAL_2(4985, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 4994, Skills.MINING), - COAL_3(4986, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 4995, Skills.MINING), - COAL_4(4987, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 4996, Skills.MINING), - COAL_5(4676, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 450, Skills.MINING), - COAL_6(10948, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 10944, Skills.MINING), - COAL_7(11964, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 11556, Skills.MINING), - COAL_8(11965, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 11557, Skills.MINING), - COAL_9(11963, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 11555, Skills.MINING), - COAL_10(11932, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 11554, Skills.MINING), - COAL_11(11930, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 11552, Skills.MINING), - COAL_12(11931, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 11553, Skills.MINING), - COAL_13(15246, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 15249, Skills.MINING), - COAL_14(15247, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 15250, Skills.MINING), - COAL_15(15248, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 15251, Skills.MINING), - COAL_16(14852, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 25373, Skills.MINING), - COAL_17(14851, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 25372, Skills.MINING), - COAL_18(14850, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 25371, Skills.MINING), - COAL_19(20410, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 20443, Skills.MINING), - COAL_20(20411, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 20444, Skills.MINING), - COAL_21(20412, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 20445, Skills.MINING), - COAL_22(20413, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 20407, Skills.MINING), - COAL_23(18999, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 19005, Skills.MINING), - COAL_24(18998, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 19004, Skills.MINING), - COAL_25(18997, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 19003, Skills.MINING), - COAL_26(21287, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 21296, Skills.MINING), - COAL_27(21289, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 21298, Skills.MINING), - COAL_28(21288, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 21297, Skills.MINING), - COAL_29(23565, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 21298, Skills.MINING), - COAL_30(23564, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 21297, Skills.MINING), - COAL_31(23563, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 21296, Skills.MINING), - COAL_32(29215, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 29218, Skills.MINING), - COAL_33(29217, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 29220, Skills.MINING), - COAL_34(29216, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 29219, Skills.MINING), - COAL_35(32426, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 33400, Skills.MINING), - COAL_36(32427, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 33401, Skills.MINING), - COAL_37(32428, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 33402, Skills.MINING), - COAL_38(32450, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 32448, Skills.MINING), - COAL_39(32449, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 32447, Skills.MINING), - COAL_40(31068, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 37639, Skills.MINING), - COAL_41(31069, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 37649, Skills.MINING), - COAL_42(31070, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 37650, Skills.MINING), - COAL_43(31168, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 14833, Skills.MINING), - COAL_44(31169, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 14834, Skills.MINING), - COAL_45(31167, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 14832, Skills.MINING), - COAL_46(37699, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 21298, Skills.MINING), - COAL_47(37698, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 21297, Skills.MINING), - COAL_48(37697, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 21296, Skills.MINING), + COAL_0(2097, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 452, Skills.MINING), COAL_1(2096, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 450, Skills.MINING), COAL_2(4985, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 4994, Skills.MINING), COAL_3(4986, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 4995, Skills.MINING), COAL_4(4987, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 4996, Skills.MINING), COAL_5(4676, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 450, Skills.MINING), COAL_6(10948, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 10944, Skills.MINING), COAL_7(11964, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 11556, Skills.MINING), COAL_8(11965, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 11557, Skills.MINING), COAL_9(11963, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 11555, Skills.MINING), COAL_10(11932, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 11554, Skills.MINING), COAL_11(11930, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 11552, Skills.MINING), COAL_12(11931, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 11553, Skills.MINING), COAL_13(15246, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 15249, Skills.MINING), COAL_14(15247, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 15250, Skills.MINING), COAL_15(15248, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 15251, Skills.MINING), COAL_16(14852, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 25373, Skills.MINING), COAL_17(14851, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 25372, Skills.MINING), COAL_18(14850, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 25371, Skills.MINING), COAL_19(20410, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 20443, Skills.MINING), COAL_20(20411, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 20444, Skills.MINING), COAL_21(20412, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 20445, Skills.MINING), COAL_22(20413, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 20407, Skills.MINING), COAL_23(18999, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 19005, Skills.MINING), COAL_24(18998, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 19004, Skills.MINING), COAL_25(18997, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 19003, Skills.MINING), COAL_26(21287, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 21296, Skills.MINING), COAL_27(21289, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 21298, Skills.MINING), COAL_28(21288, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 21297, Skills.MINING), COAL_29(23565, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 21298, Skills.MINING), COAL_30(23564, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 21297, Skills.MINING), COAL_31(23563, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 21296, Skills.MINING), COAL_32(29215, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 29218, Skills.MINING), COAL_33(29217, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 29220, Skills.MINING), COAL_34(29216, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 29219, Skills.MINING), COAL_35(32426, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 33400, Skills.MINING), COAL_36(32427, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 33401, Skills.MINING), COAL_37(32428, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 33402, Skills.MINING), COAL_38(32450, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 32448, Skills.MINING), COAL_39(32449, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 32447, Skills.MINING), COAL_40(31068, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 37639, Skills.MINING), COAL_41(31069, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 37649, Skills.MINING), COAL_42(31070, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 37650, Skills.MINING), COAL_43(31168, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 14833, Skills.MINING), COAL_44(31169, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 14834, Skills.MINING), COAL_45(31167, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 14832, Skills.MINING), COAL_46(37699, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 21298, Skills.MINING), COAL_47(37698, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 21297, Skills.MINING), COAL_48(37697, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 21296, Skills.MINING), COAL_49(42035, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 452, Skills.MINING), - /** * Sandstone. */ @@ -467,43 +156,8 @@ public enum SkillingResource { /** * Gold ore. */ - GOLD_ORE_0(2099, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 452, Skills.MINING), - GOLD_ORE_1(2098, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 450, Skills.MINING), - GOLD_ORE_2(2611, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 21298, Skills.MINING), - GOLD_ORE_3(2610, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 21297, Skills.MINING), - GOLD_ORE_4(2609, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 21296, Skills.MINING), - GOLD_ORE_5(9722, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 18954, Skills.MINING), - GOLD_ORE_6(9720, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 32447, Skills.MINING), - GOLD_ORE_7(9721, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 32448, Skills.MINING), - GOLD_ORE_8(11183, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 21296, Skills.MINING), - GOLD_ORE_9(11184, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 21297, Skills.MINING), - GOLD_ORE_10(11185, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 21298, Skills.MINING), - GOLD_ORE_11(11952, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 11556, Skills.MINING), - GOLD_ORE_12(11953, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 11557, Skills.MINING), - GOLD_ORE_13(11951, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 11555, Skills.MINING), - GOLD_ORE_14(15578, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 14834, Skills.MINING), - GOLD_ORE_15(15577, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 14833, Skills.MINING), - GOLD_ORE_16(15576, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 14832, Skills.MINING), - GOLD_ORE_17(17002, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 14916, Skills.MINING), - GOLD_ORE_18(17003, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 31061, Skills.MINING), - GOLD_ORE_19(17001, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 14915, Skills.MINING), - GOLD_ORE_20(21291, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 21297, Skills.MINING), - GOLD_ORE_21(21290, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 21296, Skills.MINING), - GOLD_ORE_22(21292, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 21298, Skills.MINING), - GOLD_ORE_23(32433, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 33401, Skills.MINING), - GOLD_ORE_24(32432, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 33400, Skills.MINING), - GOLD_ORE_25(32434, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 33402, Skills.MINING), - GOLD_ORE_26(31065, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 37639, Skills.MINING), - GOLD_ORE_27(31066, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 37649, Skills.MINING), - GOLD_ORE_28(31067, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 37650, Skills.MINING), - GOLD_ORE_29(37311, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 11553, Skills.MINING), - GOLD_ORE_30(37310, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 11552, Skills.MINING), - GOLD_ORE_31(37312, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 11554, Skills.MINING), - GOLD_ORE_32(37471, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 15249, Skills.MINING), - GOLD_ORE_33(37473, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 15251, Skills.MINING), - GOLD_ORE_34(37472, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 15250, Skills.MINING), - GOLD_ORE_49(42033, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 452, Skills.MINING), - + GOLD_ORE_0(2099, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 452, Skills.MINING), GOLD_ORE_1(2098, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 450, Skills.MINING), GOLD_ORE_2(2611, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 21298, Skills.MINING), GOLD_ORE_3(2610, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 21297, Skills.MINING), GOLD_ORE_4(2609, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 21296, Skills.MINING), GOLD_ORE_5(9722, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 18954, Skills.MINING), GOLD_ORE_6(9720, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 32447, Skills.MINING), GOLD_ORE_7(9721, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 32448, Skills.MINING), GOLD_ORE_8(11183, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 21296, Skills.MINING), GOLD_ORE_9(11184, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 21297, Skills.MINING), GOLD_ORE_10(11185, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 21298, Skills.MINING), GOLD_ORE_11(11952, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 11556, Skills.MINING), GOLD_ORE_12(11953, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 11557, Skills.MINING), GOLD_ORE_13(11951, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 11555, Skills.MINING), GOLD_ORE_14(15578, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 14834, Skills.MINING), GOLD_ORE_15(15577, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 14833, Skills.MINING), GOLD_ORE_16(15576, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 14832, Skills.MINING), GOLD_ORE_17(17002, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 14916, Skills.MINING), GOLD_ORE_18(17003, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 31061, Skills.MINING), GOLD_ORE_19(17001, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 14915, Skills.MINING), GOLD_ORE_20(21291, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 21297, Skills.MINING), GOLD_ORE_21(21290, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 21296, Skills.MINING), GOLD_ORE_22(21292, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 21298, Skills.MINING), GOLD_ORE_23(32433, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 33401, Skills.MINING), GOLD_ORE_24(32432, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 33400, Skills.MINING), GOLD_ORE_25(32434, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 33402, Skills.MINING), GOLD_ORE_26(31065, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 37639, Skills.MINING), GOLD_ORE_27(31066, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 37649, Skills.MINING), GOLD_ORE_28(31067, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 37650, Skills.MINING), GOLD_ORE_29(37311, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 11553, Skills.MINING), GOLD_ORE_30(37310, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 11552, Skills.MINING), GOLD_ORE_31(37312, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 11554, Skills.MINING), GOLD_ORE_32(37471, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 15249, Skills.MINING), GOLD_ORE_33(37473, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 15251, Skills.MINING), GOLD_ORE_34(37472, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 15250, Skills.MINING), + GOLD_ORE_49(42033, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 452, Skills.MINING), /** * Granite. */ @@ -517,51 +171,8 @@ public enum SkillingResource { /** * Mithril ore. */ - MITHRIL_ORE_0(2103, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 452, Skills.MINING), - MITHRIL_ORE_1(2102, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 450, Skills.MINING), - MITHRIL_ORE_2(4988, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 4994, Skills.MINING), - MITHRIL_ORE_3(4989, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 4995, Skills.MINING), - MITHRIL_ORE_4(4990, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 4996, Skills.MINING), - MITHRIL_ORE_5(11943, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 11553, Skills.MINING), - MITHRIL_ORE_6(11942, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 11552, Skills.MINING), - MITHRIL_ORE_7(11945, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 11555, Skills.MINING), - MITHRIL_ORE_8(11944, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 11554, Skills.MINING), - MITHRIL_ORE_9(11947, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 11557, Skills.MINING), - MITHRIL_ORE_10(11946, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 11556, Skills.MINING), - MITHRIL_ORE_11(14855, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 25373, Skills.MINING), - MITHRIL_ORE_12(14854, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 25372, Skills.MINING), - MITHRIL_ORE_13(14853, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 25371, Skills.MINING), - MITHRIL_ORE_14(16687, 50, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 450, Skills.MINING), - MITHRIL_ORE_15(20421, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 20407, Skills.MINING), - MITHRIL_ORE_16(20420, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 20445, Skills.MINING), - MITHRIL_ORE_17(20419, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 20444, Skills.MINING), - MITHRIL_ORE_18(20418, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 20443, Skills.MINING), - MITHRIL_ORE_19(19012, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 19021, Skills.MINING), - MITHRIL_ORE_20(19013, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 19016, Skills.MINING), - MITHRIL_ORE_21(19014, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 19017, Skills.MINING), - MITHRIL_ORE_22(21278, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 21296, Skills.MINING), - MITHRIL_ORE_23(21279, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 21297, Skills.MINING), - MITHRIL_ORE_24(21280, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 21298, Skills.MINING), - MITHRIL_ORE_25(25369, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 10586, Skills.MINING), - MITHRIL_ORE_26(25368, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 10585, Skills.MINING), - MITHRIL_ORE_27(25370, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 10587, Skills.MINING), - MITHRIL_ORE_28(29236, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 29218, Skills.MINING), - MITHRIL_ORE_29(29237, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 29219, Skills.MINING), - MITHRIL_ORE_30(29238, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 29220, Skills.MINING), - MITHRIL_ORE_31(32439, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 33401, Skills.MINING), - MITHRIL_ORE_32(32438, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 33400, Skills.MINING), - MITHRIL_ORE_33(32440, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 33402, Skills.MINING), - MITHRIL_ORE_34(31087, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 37649, Skills.MINING), - MITHRIL_ORE_35(31086, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 37639, Skills.MINING), - MITHRIL_ORE_36(31088, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 37650, Skills.MINING), - MITHRIL_ORE_37(31170, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 14832, Skills.MINING), - MITHRIL_ORE_38(31171, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 14833, Skills.MINING), - MITHRIL_ORE_39(31172, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 14834, Skills.MINING), - MITHRIL_ORE_40(37692, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 21296, Skills.MINING), - MITHRIL_ORE_41(37693, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 21297, Skills.MINING), - MITHRIL_ORE_42(37694, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 21298, Skills.MINING), + MITHRIL_ORE_0(2103, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 452, Skills.MINING), MITHRIL_ORE_1(2102, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 450, Skills.MINING), MITHRIL_ORE_2(4988, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 4994, Skills.MINING), MITHRIL_ORE_3(4989, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 4995, Skills.MINING), MITHRIL_ORE_4(4990, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 4996, Skills.MINING), MITHRIL_ORE_5(11943, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 11553, Skills.MINING), MITHRIL_ORE_6(11942, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 11552, Skills.MINING), MITHRIL_ORE_7(11945, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 11555, Skills.MINING), MITHRIL_ORE_8(11944, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 11554, Skills.MINING), MITHRIL_ORE_9(11947, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 11557, Skills.MINING), MITHRIL_ORE_10(11946, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 11556, Skills.MINING), MITHRIL_ORE_11(14855, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 25373, Skills.MINING), MITHRIL_ORE_12(14854, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 25372, Skills.MINING), MITHRIL_ORE_13(14853, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 25371, Skills.MINING), MITHRIL_ORE_14(16687, 50, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 450, Skills.MINING), MITHRIL_ORE_15(20421, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 20407, Skills.MINING), MITHRIL_ORE_16(20420, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 20445, Skills.MINING), MITHRIL_ORE_17(20419, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 20444, Skills.MINING), MITHRIL_ORE_18(20418, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 20443, Skills.MINING), MITHRIL_ORE_19(19012, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 19021, Skills.MINING), MITHRIL_ORE_20(19013, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 19016, Skills.MINING), MITHRIL_ORE_21(19014, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 19017, Skills.MINING), MITHRIL_ORE_22(21278, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 21296, Skills.MINING), MITHRIL_ORE_23(21279, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 21297, Skills.MINING), MITHRIL_ORE_24(21280, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 21298, Skills.MINING), MITHRIL_ORE_25(25369, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 10586, Skills.MINING), MITHRIL_ORE_26(25368, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 10585, Skills.MINING), MITHRIL_ORE_27(25370, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 10587, Skills.MINING), MITHRIL_ORE_28(29236, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 29218, Skills.MINING), MITHRIL_ORE_29(29237, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 29219, Skills.MINING), MITHRIL_ORE_30(29238, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 29220, Skills.MINING), MITHRIL_ORE_31(32439, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 33401, Skills.MINING), MITHRIL_ORE_32(32438, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 33400, Skills.MINING), MITHRIL_ORE_33(32440, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 33402, Skills.MINING), MITHRIL_ORE_34(31087, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 37649, Skills.MINING), MITHRIL_ORE_35(31086, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 37639, Skills.MINING), MITHRIL_ORE_36(31088, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 37650, Skills.MINING), MITHRIL_ORE_37(31170, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 14832, Skills.MINING), MITHRIL_ORE_38(31171, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 14833, Skills.MINING), MITHRIL_ORE_39(31172, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 14834, Skills.MINING), MITHRIL_ORE_40(37692, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 21296, Skills.MINING), MITHRIL_ORE_41(37693, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 21297, Skills.MINING), MITHRIL_ORE_42(37694, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 21298, Skills.MINING), MITHRIL_ORE_49(42036, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 452, Skills.MINING), - /** * Adamantite ore. */ @@ -570,8 +181,8 @@ public enum SkillingResource { ADAMANTITE_ORE_2(4991, 70, 0.85, 400 | 800 << 16, 95.0, 449, 1, "adamant rocks", null, 4994, Skills.MINING), ADAMANTITE_ORE_3(4992, 70, 0.85, 400 | 800 << 16, 95.0, 449, 1, "adamant rocks", null, 4995, Skills.MINING), ADAMANTITE_ORE_4(4993, 70, 0.85, 400 | 800 << 16, 95.0, 449, 1, "adamant rocks", null, 4996, Skills.MINING), - ADAMANTITE_ORE_5(11941, 70, 0.85, 400 | 800 << 16, 95.0, 449, 1, "adamant rocks", null, 11554, Skills.MINING), - ADAMANTITE_ORE_6(11940, 70, 0.85, 400 | 800 << 16, 95.0, 449, 1, "adamant rocks", null, 11553, Skills.MINING), + ADAMANTITE_ORE_5(11941, 70, 0.85, 400 | 800 << 16, 95.0, 449, 1, "adamant rocks", null, 11554, Skills.MINING) + , ADAMANTITE_ORE_6(11940, 70, 0.85, 400 | 800 << 16, 95.0, 449, 1, "adamant rocks", null, 11553, Skills.MINING), ADAMANTITE_ORE_7(11939, 70, 0.85, 400 | 800 << 16, 95.0, 449, 1, "adamant rocks", null, 11552, Skills.MINING), ADAMANTITE_ORE_8(14864, 70, 0.85, 400 | 800 << 16, 95.0, 449, 1, "adamant rocks", null, 25373, Skills.MINING), ADAMANTITE_ORE_9(14863, 70, 0.85, 400 | 800 << 16, 95.0, 449, 1, "adamant rocks", null, 25372, Skills.MINING), @@ -606,32 +217,16 @@ public enum SkillingResource { ADAMANTITE_ORE_38(37691, 70, 0.85, 400 | 800 << 16, 95.0, 449, 1, "adamant rocks", null, 21298, Skills.MINING), ADAMANTITE_ORE_39(42037, 70, 0.85, 400 | 800 << 16, 95.0, 449, 1, "adamant rocks", null, 452, Skills.MINING), + /** * Runite ore. */ - RUNITE_ORE_0(2107, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 452, Skills.MINING), - RUNITE_ORE_1(2106, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 450, Skills.MINING), - RUNITE_ORE_2(6669, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 21296, Skills.MINING), - RUNITE_ORE_3(6671, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 21298, Skills.MINING), - RUNITE_ORE_4(6670, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 21297, Skills.MINING), - RUNITE_ORE_5(14861, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 25373, Skills.MINING), - RUNITE_ORE_6(14860, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 25372, Skills.MINING), - RUNITE_ORE_7(14859, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 25371, Skills.MINING), - RUNITE_ORE_8(33079, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 33401, Skills.MINING), - RUNITE_ORE_9(33078, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 33400, Skills.MINING), - RUNITE_ORE_10(37208, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 21296, Skills.MINING), - RUNITE_ORE_11(37465, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 15249, Skills.MINING), - RUNITE_ORE_12(37466, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 15250, Skills.MINING), - RUNITE_ORE_13(37467, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 15251, Skills.MINING), - RUNITE_ORE_14(37695, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 21297, Skills.MINING), - RUNITE_ORE_15(37696, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 21298, Skills.MINING), + RUNITE_ORE_0(2107, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 452, Skills.MINING), RUNITE_ORE_1(2106, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 450, Skills.MINING), RUNITE_ORE_2(6669, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 21296, Skills.MINING), RUNITE_ORE_3(6671, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 21298, Skills.MINING), RUNITE_ORE_4(6670, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 21297, Skills.MINING), RUNITE_ORE_5(14861, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 25373, Skills.MINING), RUNITE_ORE_6(14860, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 25372, Skills.MINING), RUNITE_ORE_7(14859, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 25371, Skills.MINING), RUNITE_ORE_8(33079, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 33401, Skills.MINING), RUNITE_ORE_9(33078, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 33400, Skills.MINING), RUNITE_ORE_10(37208, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 21296, Skills.MINING), RUNITE_ORE_11(37465, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 15249, Skills.MINING), RUNITE_ORE_12(37466, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 15250, Skills.MINING), RUNITE_ORE_13(37467, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 15251, Skills.MINING), RUNITE_ORE_14(37695, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 21297, Skills.MINING), RUNITE_ORE_15(37696, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 21298, Skills.MINING), /** * Gem rocks. */ - GEM_ROCK_0(23567, 40, 0.95, 166 | 175 << 16, 65, 1625, 1, "gem rocks", null, 21297, Skills.MINING), - GEM_ROCK_1(23566, 40, 0.95, 166 | 175 << 16, 65, 1625, 1, "gem rocks", null, 21296, Skills.MINING), - GEM_ROCK_2(23568, 40, 0.95, 166 | 175 << 16, 65, 1625, 1, "gem rocks", null, 21298, Skills.MINING); + GEM_ROCK_0(23567, 40, 0.95, 166 | 175 << 16, 65, 1625, 1, "gem rocks", null, 21297, Skills.MINING), GEM_ROCK_1(23566, 40, 0.95, 166 | 175 << 16, 65, 1625, 1, "gem rocks", null, 21296, Skills.MINING), GEM_ROCK_2(23568, 40, 0.95, 166 | 175 << 16, 65, 1625, 1, "gem rocks", null, 21298, Skills.MINING); /** * The resources mapping. diff --git a/Server/src/org/crandor/game/content/skill/free/runecrafting/RuneCraftPulse.java b/Server/src/org/crandor/game/content/skill/free/runecrafting/RuneCraftPulse.java index 61f22188f..cb50dbe29 100644 --- a/Server/src/org/crandor/game/content/skill/free/runecrafting/RuneCraftPulse.java +++ b/Server/src/org/crandor/game/content/skill/free/runecrafting/RuneCraftPulse.java @@ -3,7 +3,6 @@ package org.crandor.game.content.skill.free.runecrafting; import org.crandor.game.container.impl.EquipmentContainer; import org.crandor.game.content.skill.SkillPulse; import org.crandor.game.content.skill.Skills; -import org.crandor.game.events.GlobalEvent; import org.crandor.game.node.entity.impl.Animator.Priority; import org.crandor.game.node.entity.player.Player; import org.crandor.game.node.entity.player.info.portal.Perks; @@ -176,7 +175,6 @@ public final class RuneCraftPulse extends SkillPulse { if (altar == Altar.COSMIC && i.getAmount() == 56 && !player.getAchievementDiaryManager().getDiary(DiaryType.LUMBRIDGE).isComplete(2, 1)) { player.getAchievementDiaryManager().updateTask(player, DiaryType.LUMBRIDGE, 2, 1, true); } - player.getInventory().add(i); Perks.addDouble(player, i); player.getSkills().addExperience(Skills.RUNECRAFTING, rune.getExperience() * amount, true); } @@ -195,9 +193,7 @@ public final class RuneCraftPulse extends SkillPulse { } } player.getSkills().addExperience(Skills.RUNECRAFTING, rune.getExperience() * 2, true); - Item runeItem = rune.getRune(); - player.getInventory().add(runeItem); - Perks.addDouble(player, runeItem); + Perks.addDouble(player, rune.getRune()); } } } @@ -304,14 +300,9 @@ public final class RuneCraftPulse extends SkillPulse { i++; } } - if (player.hasPerk(Perks.RUNESTONE_KNOWLEDGE) && (altar == Altar.DEATH || altar == Altar.LAW || altar == Altar.COSMIC || altar == Altar.BLOOD || altar == Altar.NATURE)) { i *= 2; } - - if(GlobalEvent.GOLDEN_ESSENCE.isActive()) { - i *= 3; - } return i != 0 ? i : 1; } diff --git a/Server/src/org/crandor/game/content/skill/free/smithing/SmithingPulse.java b/Server/src/org/crandor/game/content/skill/free/smithing/SmithingPulse.java index 181eb508b..befee256e 100644 --- a/Server/src/org/crandor/game/content/skill/free/smithing/SmithingPulse.java +++ b/Server/src/org/crandor/game/content/skill/free/smithing/SmithingPulse.java @@ -62,7 +62,7 @@ public class SmithingPulse extends SkillPulse { player.getDialogueInterpreter().sendDialogue("You need a hammer to work the metal with."); return false; } - if (TutorialSession.getExtension(player).getStage() < TutorialSession.MAX_STAGE && node.getId() != Bars.BRONZE_DAGGER.getProduct()) { + if (TutorialSession.getExtension(player).getStage() <= TutorialSession.MAX_STAGE && node.getId() != Bars.BRONZE_DAGGER.getProduct()) { return false; } return true; @@ -80,9 +80,7 @@ public class SmithingPulse extends SkillPulse { return false; } player.getInventory().remove(new Item(bar.getBarType().getBarType(), bar.getSmithingType().getRequired())); - final Item item = new Item(node.getId(), bar.getSmithingType().getProductAmount()); - player.getInventory().add(item); - Perks.addDouble(player, item); + Perks.addDouble(player, (new Item(node.getId(), bar.getSmithingType().getProductAmount()))); player.getSkills().addExperience(Skills.SMITHING, bar.getBarType().getExperience() * bar.getSmithingType().getRequired(), true); String message = StringUtils.isPlusN(ItemDefinition.forId(bar.getProduct()).getName().toLowerCase()) == true ? "an" : "a"; player.getPacketDispatch().sendMessage("You hammer the " + bar.getBarType().getBarName().toLowerCase().replace("smithing", "") + "and make " + message + " " + ItemDefinition.forId(bar.getProduct()).getName().toLowerCase() + "."); diff --git a/Server/src/org/crandor/game/content/skill/member/farming/tool/SpadePulse.java b/Server/src/org/crandor/game/content/skill/member/farming/tool/SpadePulse.java index 96466cbfa..242214c03 100644 --- a/Server/src/org/crandor/game/content/skill/member/farming/tool/SpadePulse.java +++ b/Server/src/org/crandor/game/content/skill/member/farming/tool/SpadePulse.java @@ -178,9 +178,7 @@ public final class SpadePulse extends ToolAction { * @return {@code True} if harvested. */ private boolean harvestPatch() { - final Item item = wrapper.getNode().getProduct(); - player.getInventory().add(item); - Perks.addDouble(player, item); + Perks.addDouble(player, wrapper.getNode().getProduct()); player.getSkills().addExperience(Skills.FARMING, wrapper.getNode().getExperiences()[1], true); wrapper.getCycle().setHarvestAmount(wrapper.getCycle().getHarvestAmount() - 1); if (wrapper.getCycle().getHarvestAmount() < 1) { diff --git a/Server/src/org/crandor/game/content/skill/member/fletching/FletchingPulse.java b/Server/src/org/crandor/game/content/skill/member/fletching/FletchingPulse.java index 1edb91ab3..4dbc6da9a 100644 --- a/Server/src/org/crandor/game/content/skill/member/fletching/FletchingPulse.java +++ b/Server/src/org/crandor/game/content/skill/member/fletching/FletchingPulse.java @@ -64,9 +64,7 @@ public final class FletchingPulse extends SkillPulse { return false; } if (player.getInventory().remove(fletch.getType().getLog())) { - final Item item = fletch.getProduct(); - player.getInventory().add(item); - Perks.addDouble(player, item); + Perks.addDouble(player, fletch.getProduct()); player.getSkills().addExperience(Skills.FLETCHING, fletch.getExperience(), true); String message = getMessage(); player.getPacketDispatch().sendMessage(message); diff --git a/Server/src/org/crandor/game/content/skill/member/herblore/HerbTarPulse.java b/Server/src/org/crandor/game/content/skill/member/herblore/HerbTarPulse.java index 111001e7e..6629d6130 100644 --- a/Server/src/org/crandor/game/content/skill/member/herblore/HerbTarPulse.java +++ b/Server/src/org/crandor/game/content/skill/member/herblore/HerbTarPulse.java @@ -84,9 +84,7 @@ public final class HerbTarPulse extends SkillPulse { return false; } if (player.getInventory().containsItem(SWAMP_TAR) && player.getInventory().containsItem(tar.getIngredient()) && player.getInventory().remove(SWAMP_TAR) && player.getInventory().remove(tar.getIngredient())) { - final Item item = new Item(tar.getTar().getId(), 15); - player.getInventory().add(item); - Perks.addDouble(player, item); + Perks.addDouble(player, new Item(tar.getTar().getId(), 15)); player.getSkills().addExperience(Skills.HERBLORE, tar.getExperience(), true); player.getPacketDispatch().sendMessage("You add the " + tar.getIngredient().getName().toLowerCase().replace("clean", "").trim() + " to the swamp tar."); } else { diff --git a/Server/src/org/crandor/game/content/skill/member/herblore/HerblorePulse.java b/Server/src/org/crandor/game/content/skill/member/herblore/HerblorePulse.java index 81673840d..46f688179 100644 --- a/Server/src/org/crandor/game/content/skill/member/herblore/HerblorePulse.java +++ b/Server/src/org/crandor/game/content/skill/member/herblore/HerblorePulse.java @@ -115,9 +115,7 @@ public final class HerblorePulse extends SkillPulse { player.animate(ANIMATION); } if ((player.getInventory().containsItem(potion.getBase()) && player.getInventory().containsItem(potion.getIngredient())) && player.getInventory().remove(potion.getBase(), potion.getIngredient())) { - final Item item = potion.getProduct(); - player.getInventory().add(item); - Perks.addDouble(player, item); + Perks.addDouble(player, potion.getProduct()); player.getPacketDispatch().sendMessage("You put the" + StringUtils.formatDisplayName(potion.getIngredient().getName().replace("Clean", "")) + " Leaf into the vial of water."); if (cycles++ == 3) { player.animate(ANIMATION); @@ -131,9 +129,7 @@ public final class HerblorePulse extends SkillPulse { */ public void handleFinished() { if ((player.getInventory().containsItem(potion.getBase()) && player.getInventory().containsItem(potion.getIngredient())) && player.getInventory().remove(potion.getBase(), potion.getIngredient())) { - final Item item = potion.getProduct(); - player.getInventory().add(item); - Perks.addDouble(player, item); + Perks.addDouble(player, potion.getProduct()); player.getSkills().addExperience(Skills.HERBLORE, potion.getExperience(), true); player.getPacketDispatch().sendMessage("You mix the " + potion.getIngredient().getName().toLowerCase() + " into your potion."); player.animate(ANIMATION); diff --git a/Server/src/org/crandor/game/content/skill/member/hunter/bnet/BNetNode.java b/Server/src/org/crandor/game/content/skill/member/hunter/bnet/BNetNode.java index cacc5c9d4..84685b6da 100644 --- a/Server/src/org/crandor/game/content/skill/member/hunter/bnet/BNetNode.java +++ b/Server/src/org/crandor/game/content/skill/member/hunter/bnet/BNetNode.java @@ -74,9 +74,7 @@ public class BNetNode { public void reward(Player player, NPC npc) { if (!isBareHand(player)) { if (player.getInventory().remove(getJar())) { - final Item item = getReward(); - player.getInventory().add(item); - Perks.addDouble(player, item); + Perks.addDouble(player, getReward()); player.getSkills().addExperience(Skills.HUNTER, getExperience(player), true); } } else { diff --git a/Server/src/org/crandor/game/content/skill/member/summoning/SummoningCreator.java b/Server/src/org/crandor/game/content/skill/member/summoning/SummoningCreator.java index 1bd68f9ac..757d1ce01 100644 --- a/Server/src/org/crandor/game/content/skill/member/summoning/SummoningCreator.java +++ b/Server/src/org/crandor/game/content/skill/member/summoning/SummoningCreator.java @@ -168,9 +168,7 @@ public final class SummoningCreator { } } if (player.getInventory().remove(type.getRequired())) { - final Item item = type.getProduct(); - player.getInventory().add(item); - Perks.addDouble(player, item); + Perks.addDouble(player, type.getProduct()); player.getSkills().addExperience(Skills.SUMMONING, type.getExperience(), true); } } diff --git a/Server/src/org/crandor/game/content/skill/member/thieving/Pickpocket.java b/Server/src/org/crandor/game/content/skill/member/thieving/Pickpocket.java index 18078dc8e..1d864c39e 100644 --- a/Server/src/org/crandor/game/content/skill/member/thieving/Pickpocket.java +++ b/Server/src/org/crandor/game/content/skill/member/thieving/Pickpocket.java @@ -2,7 +2,6 @@ package org.crandor.game.content.skill.member.thieving; import org.crandor.game.content.global.ttrail.ClueLevel; import org.crandor.game.content.global.ttrail.ClueScrollPlugin; -import org.crandor.game.events.GlobalEvent; import org.crandor.game.node.entity.npc.NPC; import org.crandor.game.node.entity.npc.drop.DropFrequency; import org.crandor.game.node.entity.player.Player; @@ -16,28 +15,7 @@ import org.crandor.tools.RandomFunction; * @date 22/10/2013 */ public enum Pickpocket { - MAN(new int[] { 1, 2, 3, 4, 5, 6, 16, 24, 170, 3915 }, 1, new int[][] { { 995, 3 } }, 8, 1), - FARMER(new int[] { 7, 1757, 1758 }, 10, new int[][] { { 995, 9 }, { 5318, 1 } }, 14.5, 1), - FEMALE_HAM_MEMBER(new int[] { 1715 }, 15, new int[][] { { 995, 50 }, { 995, 100 }, { 995, 20 }, { 995, 3 }, { 590, 1 }, { 1511, 1 }, { 1621, 1 }, { 1623, 1 }, { 1625, 1 }, { 1269, 1 }, { 321, 1 }, { 2138, 1 }, { 4298, 1 }, { 4300, 1 }, { 4302, 1 }, { 4304, 1 }, { 4306, 1 }, { 4308, 1 }, { 697, 1 }, { 4310, 1 }, { 1267, 1 }, { 1353, 1 }, { 199, 1 }, { 453, 1 }, { 201, 1 }, { 203, 1 }, { 205, 1 }, { 688, 1 }, { 688, 1 }, { 688, 1 }, { 686, 1 }, { 688, 1 } }, 18.5, 1, "You attempt to pick the woman's pocket...", "You pick the woman's pocket.", "You fail to pick the woman's pocket.", "What do you think you're doing?"), - MALE_HAM_MEMBER(new int[] { 1714 }, 20, new int[][] { { 590, 1 }, { 1621, 1 }, { 1623, 1 }, { 1625, 1 }, { 1269, 1 }, { 321, 1 }, { 2138, 1 }, { 4298, 1 }, { 4300, 1 }, { 4302, 1 }, { 4304, 1 }, { 4306, 1 }, { 4308, 1 }, { 4310, 1 }, { 1267, 1 }, { 1353, 1 }, { 199, 1 }, { 201, 1 }, { 203, 1 }, { 205, 1 }, { 686, 1 }, { 697, 1 }, { 453, 1 }, { 688, 1 }, { 688, 1 }, { 688, 1 }, { 688, 1 }, { 688, 1 }, { 314, 1 }, { 8866, 1 }, { 8867, 1 }, { 8868, 1 }, { 8869, 1 } }, 22.5, 3, "You attempt to pick the man's pocket...", "You pick the man's pocket.", "You fail to pick the man's pocket.", "What do you think you're doing?"), - WARRIOR(new int[] { 15, 18 }, 25, new int[][] { { 995, 18 } }, 26, 2), - ROGUE(new int[] { 187, 2267, 2268, 2269, 8122 }, 32, new int[][] { { 995, 25 }, { 995, 40 }, { 1993, 1 }, { 556, 2 }, { 1219, 1 }, { 1523, 1 }, { 1944 } }, 35.5, 2), - CAVE_GOBLIN(new int[] { 5752, 5753, 5754, 5755, 5756, 5757, 5758, 5759, 5760, 5761, 5762, 5763, 5764, 5765, 5766, 5767, 5768 }, 36, new int[][] { { 995, 30, 1 }, { 590, 1 }, { 4522, 1 }, { 4544, 1 }, { 596, 1 }, { 1939, 1 }, { 441, 4, 1 }, { 441, 1 }, { 10981, 1 } }, 40, 2), - MASTER_FARMER(new int[] { 2234, 2235 }, 38, new int[][] { { 5096, 1 }, { 5097, 1 }, { 5098, 1 }, { 5099, 1 }, { 5100, 1 }, { 5101, 1 }, { 5102, 1 }, { 5103, 1 }, { 5104, 1 }, { 5105, 1 }, { 5106, 1 }, { 5291, 1 }, { 5292, 1 }, { 5293, 1 }, { 5294, 1 }, { 5295, 1 }, { 5296, 1 }, { 5297, 1 }, { 5298, 1 }, { 5299, 1 }, { 5300, 1 }, { 5301, 1 }, { 5302, 1 }, { 5304, 1 }, { 5305, 1 }, { 5306, 1 }, { 5307, 1 }, { 5308, 1 }, { 5309, 1 }, { 5310, 1 }, { 5311, 1 }, { 5312, 1 }, { 5318, 1 }, { 5319, 1 }, { 5320, 1 }, { 5321, 1 }, { 5322, 1 }, { 5323, 1 }, { 5324, 1 }, { 5296, 1 }, { 5297, 1 }, { 5298, 1 }, { 5299, 1 }, { 5300, 1 }, { 5301, 1 }, { 5302, 1 }, { 5303, 1 }, { 5304, 1 } }, 43, 3, "You attempt to pick the " + "@name" + "'s pocket...", "You pick the " + "@name" + "'s pocket.", "You fail to pick the " + "@name" + "'s pocket.", "Cor blimey mate, what are ye doing in me pockets?"), - GUARD(new int[] { 9, 32, 206, 296, 297, 298, 299, 344, 345, 346, 368, 678, 812, 9, 32, 296, 297, 298, 299, 2699, 2700, 2701, 2702, 2703, 3228, 3229, 3230, 3231, 3232, 3233, 3241, 3407, 3408, 4307, 4308, 4309, 4310, 4311, 5919, 5920, }, 40, new int[][] { { 995, 30 }, { 995, 25 } }, 46.5, 2), - FREMENIK_CITIZEN(new int[] { 2462 }, 45, new int[][] { { 995, 40 } }, 65, 2), - BEARDED_BANDIT(new int[] { 1880, 1881, 6174 }, 45, new int[][] { { 995, 40 } }, 65, 5), - DESERT_BANDIT(new int[] { 1926, 1921 }, 53, new int[][] { { 995, 30 }, { 995, 30 } }, 79.5, 3), - KNIGHT_OF_ADROUGNE(new int[] { 23, 26 }, 55, new int[][] { { 995, 50 } }, 84.3, 3), - YANILLE_WATCHMAN(new int[] { 34 }, 65, new int[][] { { 995, 60 } }, 137.5, 5), - MENAPHITE_THUG(new int[] { 1905 }, 65, new int[][] { { 995, 60 } }, 137.5, 5), - PALADIN(new int[] { 20, 2256 }, 70, new int[][] { { 995, 80 }, { 562, 2 } }, 151.75, 3), - MONKEY_KNIFE_FIGHTER(new int[] { 13195, 13212, 13213 }, 70, new int[][] { { 995, 1, 1 }, { 995, 50, 1 }, { 869, 4, 1 }, { 874, 2, 1 }, { 379, 1 }, { 1331, 1 }, { 1333, 1 }, { 4587, 1 } }, 150, 1), - GNOME(new int[] { 66, 67, 68, 168, 169, 2249, 2250, 2251, 2371, 2649, 2650, 6002, 6004 }, 75, new int[][] { { 995, 300, 1 }, { 557, 1 }, { 444, 1 }, { 569, 1 }, { 2150, 1 }, { 2162, 1 } }, 198.5, 1), - HERO(new int[] { 21 }, 80, new int[][] { { 995, 200, 1 }, { 995, 300, 1 }, { 560, 2, 1 }, { 565, 1 }, { 569, 1 }, { 1601, 1 }, { 444, 1 }, { 1993, 1 } }, 273.3, 5), - ELF(new int[] {}, 85, new int[][] { { 995, 250 }, { 995, 350 }, { 995, 300 } }, 353, 5), - DWARF_TRADER(new int[] { 2109, 2110, 2111, 2112, 2113, 2114, 2115, 2116, 2117, 2118, 2119, 2120, 2121, 2122, 2123, 2124, 2125, 2126 }, 90, new int[][] { { 995, 100, 1 }, { 995, 400, 1 }, { 2350, 1 }, { 2352, 1 }, { 2354, 1 }, { 2360, 1 }, { 2362, 1 }, { 2364, 1 }, { 437, 1 }, { 439, 1 }, { 441, 1 }, { 448, 1 }, { 450, 1 }, { 452, 1 }, { 454, 1 } }, 556.5, 1), - MARTIN_THE_MASTER_GARDENER(new int[] { 3299 }, 38, new int[][] { new int[] { 5318, 1, 2, 3, 4 }, new int[] { 5319, 1, 2, 3 }, new int[] { 5324, 1, 2, 3 }, new int[] { 5322, 1, 2 }, new int[] { 5320, 1 }, new int[] { 5323, 1 }, new int[] { 5321, 1 }, new int[] { 5096, 1 }, new int[] { 5097, 1 }, new int[] { 5099, 1, 2 }, new int[] { 5100, 1 }, new int[] { 5308, 1, 2 }, new int[] { 5306, 1, 2, 3 }, new int[] { 5101, 1 }, new int[] { 5102, 1 }, new int[] { 5103, 1 }, new int[] { 5104, 1, 2 }, new int[] { 5105, 1 }, new int[] { 5106, 1 }, new int[] { 5291, 1 }, new int[] { 5292, 1 }, new int[] { 5293, 1 }, new int[] { 5294, 1 }, new int[] { 5295, 1 } }, 43, 3, "You attempt to pick Martin's pocket.", "You pick Martin's pocket.", "You fail to pick Martin's pocket.", "Cor blimey mate, what are ye doing in me pockets?"); + MAN(new int[] { 1, 2, 3, 4, 5, 6, 16, 24, 170, 3915 }, 1, new int[][] { { 995, 3 }, { 995, 3 } }, 8, 1), FARMER(new int[] { 7, 1757, 1758 }, 10, new int[][] { { 995, 9 }, { 5318, 1 } }, 14.5, 1), FEMALE_HAM_MEMBER(new int[] { 1715 }, 15, new int[][] { { 995, 50 }, { 995, 100 }, { 995, 20 }, { 995, 3 }, { 590, 1 }, { 1511, 1 }, { 1621, 1 }, { 1623, 1 }, { 1625, 1 }, { 1269, 1 }, { 321, 1 }, { 2138, 1 }, { 4298, 1 }, { 4300, 1 }, { 4302, 1 }, { 4304, 1 }, { 4306, 1 }, { 4308, 1 }, { 697, 1 }, { 4310, 1 }, { 1267, 1 }, { 1353, 1 }, { 199, 1 }, { 453, 1 }, { 201, 1 }, { 203, 1 }, { 205, 1 }, { 688, 1 }, { 688, 1 }, { 688, 1 }, { 686, 1 }, { 688, 1 } }, 18.5, 1, "You attempt to pick the woman's pocket...", "You pick the woman's pocket.", "You fail to pick the woman's pocket.", "What do you think you're doing?"), MALE_HAM_MEMBER(new int[] { 1714 }, 20, new int[][] { { 590, 1 }, { 1621, 1 }, { 1623, 1 }, { 1625, 1 }, { 1269, 1 }, { 321, 1 }, { 2138, 1 }, { 4298, 1 }, { 4300, 1 }, { 4302, 1 }, { 4304, 1 }, { 4306, 1 }, { 4308, 1 }, { 4310, 1 }, { 1267, 1 }, { 1353, 1 }, { 199, 1 }, { 201, 1 }, { 203, 1 }, { 205, 1 }, { 686, 1 }, { 697, 1 }, { 453, 1 }, { 688, 1 }, { 688, 1 }, { 688, 1 }, { 688, 1 }, { 688, 1 }, { 314, 1 }, { 8866, 1 }, { 8867, 1 }, { 8868, 1 }, { 8869, 1 } }, 22.5, 3, "You attempt to pick the man's pocket...", "You pick the man's pocket.", "You fail to pick the man's pocket.", "What do you think you're doing?"), WARRIOR(new int[] { 15, 18 }, 25, new int[][] { { 995, 18 } }, 26, 2), ROGUE(new int[] { 187, 2267, 2268, 2269, 8122 }, 32, new int[][] { { 995, 25 }, { 995, 40 }, { 1993, 1 }, { 556, 2 }, { 1219, 1 }, { 1523, 1 }, { 1944 } }, 35.5, 2), CAVE_GOBLIN(new int[] { 5752, 5753, 5754, 5755, 5756, 5757, 5758, 5759, 5760, 5761, 5762, 5763, 5764, 5765, 5766, 5767, 5768 }, 36, new int[][] { { 995, 30, 1 }, { 590, 1 }, { 4522, 1 }, { 4544, 1 }, { 596, 1 }, { 1939, 1 }, { 441, 4, 1 }, { 441, 1 }, { 10981, 1 } }, 40, 2), MASTER_FARMER(new int[] { 2234, 2235 }, 38, new int[][] { { 5096, 1 }, { 5097, 1 }, { 5098, 1 }, { 5099, 1 }, { 5100, 1 }, { 5101, 1 }, { 5102, 1 }, { 5103, 1 }, { 5104, 1 }, { 5105, 1 }, { 5106, 1 }, { 5291, 1 }, { 5292, 1 }, { 5293, 1 }, { 5294, 1 }, { 5295, 1 }, { 5296, 1 }, { 5297, 1 }, { 5298, 1 }, { 5299, 1 }, { 5300, 1 }, { 5301, 1 }, { 5302, 1 }, { 5304, 1 }, { 5305, 1 }, { 5306, 1 }, { 5307, 1 }, { 5308, 1 }, { 5309, 1 }, { 5310, 1 }, { 5311, 1 }, { 5312, 1 }, { 5318, 1 }, { 5319, 1 }, { 5320, 1 }, { 5321, 1 }, { 5322, 1 }, { 5323, 1 }, { 5324, 1 }, { 5296, 1 }, { 5297, 1 }, { 5298, 1 }, { 5299, 1 }, { 5300, 1 }, { 5301, 1 }, { 5302, 1 }, { 5303, 1 }, { 5304, 1 } }, 43, 3, "You attempt to pick the " + "@name" + "'s pocket...", "You pick the " + "@name" + "'s pocket.", "You fail to pick the " + "@name" + "'s pocket.", "Cor blimey mate, what are ye doing in me pockets?"), GUARD(new int[] { 9, 32, 206, 296, 297, 298, 299, 344, 345, 346, 368, 678, 812, 9, 32, 296, 297, 298, 299, 2699, 2700, 2701, 2702, 2703, 3228, 3229, 3230, 3231, 3232, 3233, 3241, 3407, 3408, 4307, 4308, 4309, 4310, 4311, 5919, 5920, }, 40, new int[][] { { 995, 30 }, { 995, 25 } }, 46.5, 2), FREMENIK_CITIZEN(new int[] { 2462 }, 45, new int[][] { { 995, 40 } }, 65, 2), BEARDED_BANDIT(new int[] { 1880, 1881, 6174 }, 45, new int[][] { { 995, 40 } }, 65, 5), DESERT_BANDIT(new int[] { 1926, 1921 }, 53, new int[][] { { 995, 30 }, { 995, 30 } }, 79.5, 3), KNIGHT_OF_ADROUGNE(new int[] { 23, 26 }, 55, new int[][] { { 995, 50 } }, 84.3, 3), YANILLE_WATCHMAN(new int[] { 34 }, 65, new int[][] { { 995, 60 } }, 137.5, 5), MENAPHITE_THUG(new int[] { 1905 }, 65, new int[][] { { 995, 60 } }, 137.5, 5), PALADIN(new int[] { 20, 2256 }, 70, new int[][] { { 995, 80 }, { 562, 2 } }, 151.75, 3), MONKEY_KNIFE_FIGHTER(new int[] { 13195, 13212, 13213 }, 70, new int[][] { { 995, 1, 1 }, { 995, 50, 1 }, { 869, 4, 1 }, { 874, 2, 1 }, { 379, 1 }, { 1331, 1 }, { 1333, 1 }, { 4587, 1 } }, 150, 1), GNOME(new int[] { 66, 67, 68, 168, 169, 2249, 2250, 2251, 2371, 2649, 2650, 6002, 6004 }, 75, new int[][] { { 995, 300, 1 }, { 557, 1 }, { 444, 1 }, { 569, 1 }, { 2150, 1 }, { 2162, 1 } }, 198.5, 1), HERO(new int[] { 21 }, 80, new int[][] { { 995, 200, 1 }, { 995, 300, 1 }, { 560, 2, 1 }, { 565, 1 }, { 569, 1 }, { 1601, 1 }, { 444, 1 }, { 1993, 1 } }, 273.3, 5), ELF(new int[] {}, 85, new int[][] { { 995, 250 }, { 995, 350 }, { 995, 300 } }, 353, 5), DWARF_TRADER(new int[] { 2109, 2110, 2111, 2112, 2113, 2114, 2115, 2116, 2117, 2118, 2119, 2120, 2121, 2122, 2123, 2124, 2125, 2126 }, 90, new int[][] { { 995, 100, 1 }, { 995, 400, 1 }, { 2350, 1 }, { 2352, 1 }, { 2354, 1 }, { 2360, 1 }, { 2362, 1 }, { 2364, 1 }, { 437, 1 }, { 439, 1 }, { 441, 1 }, { 448, 1 }, { 450, 1 }, { 452, 1 }, { 454, 1 } }, 556.5, 1), MARTIN_THE_MASTER_GARDENER(new int[] { 3299 }, 38, new int[][] { new int[] { 5318, 1, 2, 3, 4 }, new int[] { 5319, 1, 2, 3 }, new int[] { 5324, 1, 2, 3 }, new int[] { 5322, 1, 2 }, new int[] { 5320, 1 }, new int[] { 5323, 1 }, new int[] { 5321, 1 }, new int[] { 5096, 1 }, new int[] { 5097, 1 }, new int[] { 5099, 1, 2 }, new int[] { 5100, 1 }, new int[] { 5308, 1, 2 }, new int[] { 5306, 1, 2, 3 }, new int[] { 5101, 1 }, new int[] { 5102, 1 }, new int[] { 5103, 1 }, new int[] { 5104, 1, 2 }, new int[] { 5105, 1 }, new int[] { 5106, 1 }, new int[] { 5291, 1 }, new int[] { 5292, 1 }, new int[] { 5293, 1 }, new int[] { 5294, 1 }, new int[] { 5295, 1 } }, 43, 3, "You attempt to pick Martin's pocket.", "You pick Martin's pocket.", "You fail to pick Martin's pocket.", "Cor blimey mate, what are ye doing in me pockets?"); /** * The martin rewards. @@ -162,7 +140,6 @@ public enum Pickpocket { if (this == MARTIN_THE_MASTER_GARDENER) { return RandomFunction.getChanceItem(MARTIN_REWARDS).getRandomItem(); } - // 5/250 chance for easy clue scroll? if ((this == FEMALE_HAM_MEMBER || this == MALE_HAM_MEMBER) && RandomFunction.random(250) <= 5 && !player.getTreasureTrailManager().hasClue()) { return ClueScrollPlugin.getClue(ClueLevel.EASY); } @@ -170,16 +147,7 @@ public enum Pickpocket { if (loot.length == 1) { loot = new int[] { loot[0], 1 }; } - - - // Calculate any bonus multipliers - int bonusMultiplier = 1; - if (loot[0] == 995) { - if(GlobalEvent.THIEVES_JACKPOT.isActive()) { - bonusMultiplier *= 3; - } - } - return new Item(loot[0], loot[1] * bonusMultiplier); + return new Item(loot[0], loot[1]); } /** diff --git a/Server/src/org/crandor/game/content/skill/member/thieving/PickpocketPulse.java b/Server/src/org/crandor/game/content/skill/member/thieving/PickpocketPulse.java index 9496154b1..03c196acc 100644 --- a/Server/src/org/crandor/game/content/skill/member/thieving/PickpocketPulse.java +++ b/Server/src/org/crandor/game/content/skill/member/thieving/PickpocketPulse.java @@ -12,7 +12,6 @@ import org.crandor.game.node.entity.player.info.portal.Perks; import org.crandor.game.node.entity.player.link.audio.Audio; import org.crandor.game.node.entity.player.link.diary.DiaryType; import org.crandor.game.node.entity.state.EntityState; -import org.crandor.game.node.item.Item; import org.crandor.game.world.GameWorld; import org.crandor.game.world.update.flag.context.Animation; import org.crandor.tools.RandomFunction; @@ -102,9 +101,7 @@ public final class PickpocketPulse extends SkillPulse { player.getAchievementDiaryManager().getDiary(DiaryType.LUMBRIDGE).updateTask(player, 1, 6, true); } player.getSkills().addExperience(Skills.THIEVING, type.getExperience(), true); - Item loot = type.getRandomLoot(player); - player.getInventory().add(loot); - Perks.addDouble(player, loot, true); + Perks.addDouble(player, type.getRandomLoot(player), true); player.getPacketDispatch().sendMessage(type.getRewardMessage().replace("@name", node.getName().toLowerCase())); } else { node.animate(NPC_ANIM); diff --git a/Server/src/org/crandor/game/content/skill/member/thieving/Stall.java b/Server/src/org/crandor/game/content/skill/member/thieving/Stall.java index 0cbce9968..e30d87cfe 100644 --- a/Server/src/org/crandor/game/content/skill/member/thieving/Stall.java +++ b/Server/src/org/crandor/game/content/skill/member/thieving/Stall.java @@ -11,27 +11,9 @@ import org.crandor.tools.RandomFunction; * @author 'Vexia */ public enum Stall { - VEGETABLE_STALL(new int[] { 4706, 4708, }, 2, new int[][] { { 1957, 1 }, { 1965, 1 }, { 1942, 1 } }, "some vegetables from the vegetable's merchant stall.", 10, 634, 10), - BAKER_STALL(new int[] { 2561, 6163, 34384 }, 5, new int[][] { { 1891, 1 }, { 2309, 1 }, { 1901, 1 } }, "a cake from the baker's stall.", 16, 634, 11), - CRAFTING_STALL(new int[] { 6166 }, 5, new int[][] { { 1755, 1 }, { 1592, 1 }, { 1901, 1 }, { 1597, 1 } }, "some crafting equipment from the crafting merchant stall", 16, 634, 18), - TEA_STALL(new int[] { 635, 6574 }, 5, new int[][] { { 712, 1 } }, "a cup of tea.", 16, 634, 10), - SILK_STALL(new int[] { 34383, 2560 }, 20, new int[][] { { 950, 1 } }, "some silk from the silk stall.", 24, 634, 10), - WINE_STALL(new int[] { 34383, 14011 }, 22, new int[][] { { 1937, 1 }, { 1993, 1 }, { 1987, 1 }, { 1935, 1 }, { 7919, 1 } }, "some wine from the wine stall.", 27, 634, 20), - SEED_STALL(new int[] { 7053 }, 27, new int[][] { { 5305, 1 }, { 5306, 1 }, { 5308, 1 }, { 5319, 3 }, { 5318, 2 }, { 5324, 1 }, { 5322, 2 } }, "some seed's from the seed merchant's stall.", 10, 634, 10), - FUR_STALL(new int[] { 34387, 2563 }, 35, new int[][] { { 6814, 1 }, { 958, 1 } }, "some fur from the fur stall.", 36, 634, 22), - FISH_STAILL(new int[] { 4277, 4705, 4707 }, 42, new int[][] { { 331, 1 }, { 359, 1 }, { 377, 1 } }, "some fish from the fish stall.", 42, 634, 22), - CROSSBOW_STALL(new int[] { 4277, 4705, 4707 }, 49, new int[][] { { 9375, 3 }, { 9420, 1 }, { 9440, 1 } }, "something from the crossbow stall.", 52, 634, 22), - SILVER_STALL(new int[] { 2565, 6164, 34382 }, 50, new int[][] { { 442, 1 } }, "some silver from the silver stall.", 54, 634, 50), - SPICE_STALL(new int[] { 2564, 34386 }, 65, new int[][] { { 2007, 1 } }, "some spice from the spice stall.", 81, 634, 100), - MAGIC_STALL(new int[] { 4705, 4707 }, 65, new int[][] { { 556, 1 }, { 557, 1 }, { 554, 1 }, { 555, 1 }, { 563, 1 } }, "some runes from the rune's stall.", 100, 634, 100), - SCIMITAR_STALL(new int[] { 4705, 4707 }, 65, new int[][] { { 1323, 1 } }, "a scimitar from the scimitar stall.", 100, 634, 100), - GEM_STALL(new int[] { 2562, 6162, 34385 }, 75, new int[][] { { 1623, 1 } }, "a gem from the gem stall.", 160, 634, 340), + VEGETABLE_STALL(new int[] { 4706, 4708, }, 2, new int[][] { { 1957, 1 }, { 1965, 1 }, { 1942, 1 } }, "some vegetables from the vegetable's merchant stall.", 10, 634, 10), BAKER_STALL(new int[] { 2561, 6163, 34384 }, 5, new int[][] { { 1891, 1 }, { 2309, 1 }, { 1901, 1 } }, "a cake from the baker's stall.", 16, 634, 11), CRAFTING_STALL(new int[] { 6166 }, 5, new int[][] { { 1755, 1 }, { 1592, 1 }, { 1901, 1 }, { 1597, 1 } }, "some crafting equipment from the crafting merchant stall", 16, 634, 18), TEA_STALL(new int[] { 635, 6574 }, 5, new int[][] { { 712, 1 } }, "a cup of tea.", 16, 634, 10), SILK_STALL(new int[] { 34383, 2560 }, 20, new int[][] { { 950, 1 } }, "some silk from the silk stall.", 24, 634, 10), WINE_STALL(new int[] { 34383, 14011 }, 22, new int[][] { { 1937, 1 }, { 1993, 1 }, { 1987, 1 }, { 1935, 1 }, { 7919, 1 } }, "some wine from the wine stall.", 27, 634, 20), SEED_STALL(new int[] { 7053 }, 27, new int[][] { { 5305, 1 }, { 5306, 1 }, { 5308, 1 }, { 5319, 3 }, { 5318, 2 }, { 5324, 1 }, { 5322, 2 } }, "some seed's from the seed merchant's stall.", 10, 634, 10), FUR_STALL(new int[] { 34387, 2563 }, 35, new int[][] { { 6814, 1 }, { 958, 1 } }, "some fur from the fur stall.", 36, 634, 22), FISH_STAILL(new int[] { 4277, 4705, 4707 }, 42, new int[][] { { 331, 1 }, { 359, 1 }, { 377, 1 } }, "some fish from the fish stall.", 42, 634, 22), CROSSBOW_STALL(new int[] { 4277, 4705, 4707 }, 49, new int[][] { { 9375, 3 }, { 9420, 1 }, { 9440, 1 } }, "something from the crossbow stall.", 52, 634, 22), SILVER_STALL(new int[] { 2565, 6164, 34382 }, 50, new int[][] { { 442, 1 } }, "some silver from the silver stall.", 54, 634, 50), SPICE_STALL(new int[] { 2564, 34386 }, 65, new int[][] { { 2007, 1 } }, "some spice from the spice stall.", 81, 634, 100), MAGIC_STALL(new int[] { 4705, 4707 }, 65, new int[][] { { 556, 1 }, { 557, 1 }, { 554, 1 }, { 555, 1 }, { 563, 1 } }, "some runes from the rune's stall.", 100, 634, 100), SCIMITAR_STALL(new int[] { 4705, 4707 }, 65, new int[][] { { 1323, 1 } }, "a scimitar from the scimitar stall.", 100, 634, 100), GEM_STALL(new int[] { 2562, 6162, 34385 }, 75, new int[][] { { 1623, 1 } }, "a gem from the gem stall.", 160, 634, 340), // ape atoll: - SCIMITAR_APE_STALL(new int[] { 4878 }, 65, new int[][] { { 1323, 1 } }, "a scimitar from the scimitar stall.", 100, 4797, 120), - MAGIC_APE_STALL(new int[] { 4877 }, 65, new int[][] { { 556, 1 }, { 557, 1 }, { 554, 1 }, { 555, 1 }, { 563, 1 } }, "some runes from the magic stall.", 100, 4797, 120), - MONEKY_GENERAL(new int[] { 4876 }, 5, new int[][] { { 1931, 1 }, { 2347, 1 }, { 590, 1 } }, "a general item from the general stall.", 16, 4797, 10), - MONKEY_FOOD(new int[] { 4875 }, 5, new int[][] { { 1963, 1 } }, "a banana from the food stall.", 16, 4797, 10), - CRAFTING_APE(new int[] { 4874 }, 5, new int[][] { { 1755, 1 }, { 1592, 1 }, { 1901, 1 }, { 1597, 1 } }, "a crafting item from the crafting stall.", 16, 4797, 10); + SCIMITAR_APE_STALL(new int[] { 4878 }, 65, new int[][] { { 1323, 1 } }, "a scimitar from the scimitar stall.", 100, 4797, 120), MAGIC_APE_STALL(new int[] { 4877 }, 65, new int[][] { { 556, 1 }, { 557, 1 }, { 554, 1 }, { 555, 1 }, { 563, 1 } }, "some runes from the magic stall.", 100, 4797, 120), MONEKY_GENERAL(new int[] { 4876 }, 5, new int[][] { { 1931, 1 }, { 2347, 1 }, { 590, 1 } }, "a general item from the general stall.", 16, 4797, 10), MONKEY_FOOD(new int[] { 4875 }, 5, new int[][] { { 1963, 1 } }, "a banana from the food stall.", 16, 4797, 10), CRAFTING_APE(new int[] { 4874 }, 5, new int[][] { { 1755, 1 }, { 1592, 1 }, { 1901, 1 }, { 1597, 1 } }, "a crafting item from the crafting stall.", 16, 4797, 10); /** * Constructs a new {@code Stall} {@code Object}. diff --git a/Server/src/org/crandor/game/content/skill/member/thieving/StallThiefPulse.java b/Server/src/org/crandor/game/content/skill/member/thieving/StallThiefPulse.java index 73a7a42d2..81f43f946 100644 --- a/Server/src/org/crandor/game/content/skill/member/thieving/StallThiefPulse.java +++ b/Server/src/org/crandor/game/content/skill/member/thieving/StallThiefPulse.java @@ -96,6 +96,7 @@ public final class StallThiefPulse extends SkillPulse { } final boolean success = success(); if (success) { + final Item item = stall.getRandomLoot(); if (stall == Stall.SILK_STALL) { player.getSavedData().getGlobalData().setSilkSteal(System.currentTimeMillis() + 1800000); } @@ -105,8 +106,6 @@ public final class StallThiefPulse extends SkillPulse { if (node.isActive()) { ObjectBuilder.replace(((GameObject) node), ((GameObject) node).transform(stall.getTemporary()), stall.getDelay()); } - final Item item = stall.getRandomLoot(); - player.getInventory().add(item); Perks.addDouble(player, item, true); player.getSkills().addExperience(Skills.THIEVING, stall.getExperience(), true); if (item.getId() == 1987) { diff --git a/Server/src/org/crandor/game/events/GlobalEvent.java b/Server/src/org/crandor/game/events/GlobalEvent.java index f4102271e..a1b4221a1 100644 --- a/Server/src/org/crandor/game/events/GlobalEvent.java +++ b/Server/src/org/crandor/game/events/GlobalEvent.java @@ -1,83 +1,30 @@ package org.crandor.game.events; -import org.crandor.Util; - -public enum GlobalEvent { - ALCHEMY_HELLENISTIC("Receive 2 x coins when using high alchemy"), // Not implemented - GOLDEN_RETRIEVER("All gold dropped by monsters will be automatically banked for you"), // Not implemented - THIEVES_JACKPOT("Receive 3 x more coins when thieving"), - GOLDEN_ESSENCE("Receive 3 x more runes when runecrafting"), - CLONE_FEST("20 clones are been spawned in the wilderness near the mage arena."), // Not implemented - TRY_YOUR_LUCK("Mobs will drop 40% more items when killed"), - CRAZY_SEEDS("Mobs will drop 2 x more seeds when killed"), - CHARMED("Mobs will drop 2 x more charms when killed"), - XP_FEVER("Receive 2 x XP for all skills"), - PLENTY_OF_FISH("Receive 2 x rewards when fishing"), - HARVESTING_DOUBLES("Receive 2 x items harvested with woodcutting or mining"); - - /** - * Represents the object of the altar. - */ - private final String eventName; - - /** - * Represents the object of the altar. - */ - private final String eventDescription; - - /** - * Represents the object of the altar. - */ - private Long remainingTicks; +public class GlobalEvent { - GlobalEvent(final String eventDescription) { - this.eventName = Util.enumToString(this.name());; - this.eventDescription = eventDescription; - this.remainingTicks = 0L; - } + private String eventName; + private long remainingTicks; - public String getName() { + public String getEventName() { return this.eventName; } - public String getDescription() { - return this.eventDescription; - } - - public Long getRemainingTicks() { + public long getRemainingTicks() { return this.remainingTicks; } - public GlobalEvent setRemainingTicks(Long ticks) { + public GlobalEvent(String eventName, long ticks) { + this.eventName = eventName; this.remainingTicks = ticks; - return this; - } - - public Boolean isActive() { - return this.remainingTicks > 0; } - public GlobalEvent tick() { + public GlobalEvent process() { remainingTicks--; return this; } - - // Start/Extend the event + public GlobalEvent extend() { - return extend(6000); - } - - public GlobalEvent extend(int ticks) { - remainingTicks += ticks; - return this; - } - - public GlobalEvent start() { - return extend(6000); - } - - public GlobalEvent start(int ticks) { - extend(ticks); + remainingTicks += 6000; return this; } diff --git a/Server/src/org/crandor/game/events/GlobalEventManager.java b/Server/src/org/crandor/game/events/GlobalEventManager.java index 86ef854ef..7373cb8b0 100644 --- a/Server/src/org/crandor/game/events/GlobalEventManager.java +++ b/Server/src/org/crandor/game/events/GlobalEventManager.java @@ -1,6 +1,5 @@ package org.crandor.game.events; -import org.crandor.Util; import org.crandor.game.node.entity.player.Player; import org.crandor.game.system.task.Pulse; import org.crandor.game.world.GameWorld; @@ -8,6 +7,11 @@ import org.crandor.game.world.callback.CallBack; import org.crandor.game.world.repository.Repository; import org.crandor.tools.mysql.Results; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; +import java.util.Map.Entry; + /** * Class to handle donated events. * @@ -16,12 +20,27 @@ import org.crandor.tools.mysql.Results; */ public class GlobalEventManager implements CallBack { + private static Map EVENTS = new HashMap(); + private long tick = 0; - private GlobalEvent lastEvent; - private GlobalEvent currentEvent; + private String lastEvent; + private String currentEvent; public final GlobalEventManager init() { + + try { + + getEvents().put("Alchemy hellenistic", 0L); + getEvents().put("Golden retriever", 0L); + getEvents().put("Harvesting doubles", 0L); + getEvents().put("Thieves jackpot", 0L); + getEvents().put("Golden essence", 0L); + getEvents().put("Clone Fest", 0L); + + } catch (Exception e) { + e.printStackTrace(); + } return this; } @@ -31,21 +50,26 @@ public class GlobalEventManager implements CallBack { @Override public boolean pulse() { + + tick++; - for(GlobalEvent event : GlobalEvent.values()){ - Long ticksRemaining = event.getRemainingTicks(); - if (ticksRemaining > 0) { - event.tick(); - --ticksRemaining; - if (ticksRemaining <= 0) - message("The " + event.getName() + " event has now ended."); - else if (ticksRemaining % 3000 == 0) - message("You have " + Math.round(ticksRemaining / 100) + " minutes before the " + event.getName() + " event ends."); + + Iterator> iterator = EVENTS.entrySet().iterator(); + + while(iterator.hasNext()) { + Map.Entry entry = iterator.next(); + if (entry.getValue() > 0) { + entry.setValue(entry.getValue() - 1); + if (entry.getValue() == 3000) + message("You have 30 minutes before " + entry.getKey() + " ends on world " + GameWorld.getSettings().getWorldId() + "."); + if (entry.getValue() <= 0) { + message("The event " + entry.getKey() + " has now ended on world " + GameWorld.getSettings().getWorldId() + "."); + } } } - if (tick == 100) { + if (tick == 50) { tick = 0; save(); } @@ -57,28 +81,42 @@ public class GlobalEventManager implements CallBack { } - public void reActivate(GlobalEvent event, long time) { - event.setRemainingTicks(time); + public void reActivate(String name, long time) { + Iterator> iterator = EVENTS.entrySet().iterator(); + + while(iterator.hasNext()) { + Map.Entry entry = iterator.next(); + if (entry.getKey().equalsIgnoreCase(name)) { + entry.setValue(time); + } + } } public GlobalEventManager save() { - for(GlobalEvent event : GlobalEvent.values()){ + if (GameWorld.getDatabaseManager().update("server", "DELETE FROM `globalevents` WHERE worldid='" + GameWorld.getSettings().getWorldId() + "'") < 0) + return this; + Iterator> iterator = EVENTS.entrySet().iterator(); + + while(iterator.hasNext()) { + + Map.Entry entry = iterator.next(); + + if (entry.getValue() <= 0) + continue; + StringBuilder query = new StringBuilder(); - query.append("INSERT INTO `global_events` "); + query.append("INSERT INTO `globalevents` "); query.append("(`eventName`,`eventTime`,`worldId`)"); query.append(" VALUES("); - query.append("'" + event.getName() + "'").append(","); - query.append("'" + event.getRemainingTicks() + "'").append(","); + query.append("'" + entry.getKey() + "'").append(","); + query.append("'" + entry.getValue() + "'").append(","); query.append("'" + GameWorld.getSettings().getWorldId() + "'"); query.append(")"); - query.append(" ON DUPLICATE KEY UPDATE "); - query.append("eventTime='" + event.getRemainingTicks() + "'"); - GameWorld.getDatabaseManager().update("server", query.toString()); } @@ -87,15 +125,17 @@ public class GlobalEventManager implements CallBack { public GlobalEventManager load() { try { - Results result = new Results(GameWorld.getDatabaseManager().query("server", "SELECT * FROM `global_events` WHERE worldid='" + GameWorld.getSettings().getWorldId() + "'")); + Results result = null; + + result = new Results(GameWorld.getDatabaseManager().query("server", "SELECT * FROM `globalevents` WHERE worldid='" + GameWorld.getSettings().getWorldId() + "'")); while (!result.empty()) { String eventName = result.string("eventName"); String eventTime = result.string("eventTime"); - GlobalEvent event = getEvent(eventName); - reActivate(event, Long.valueOf(eventTime)); + reActivate(eventName, Long.valueOf(eventTime)); } + } catch(Exception e) { e.printStackTrace(); } @@ -103,94 +143,183 @@ public class GlobalEventManager implements CallBack { } public GlobalEventManager message(String message) { - return message(message, true, ""); + return message(message, true, ""); } public GlobalEventManager message(String message, boolean tag) { - return message(message, tag, ""); + return message(message, tag, ""); } + public GlobalEventManager notify(String message) { + return message(message, true, ""); + } + + public GlobalEventManager notify(String message, boolean tag) { + return message(message, tag, ""); + } + + + + /* + * getEvents().put("Alchemy hellenistic", 0L); + getEvents().put("Golden retriever", 0L); + getEvents().put("Harvesting doubles", 0L); + getEvents().put("Thieves jackpot", 0L); + getEvents().put("Golden essence", 0L); + + */ public GlobalEventManager message(String message, boolean tag, String color) { - for (Player player : Repository.getPlayers()) { - player.sendMessage(color + (tag ? "[Event Manager] " : "") + message); + /*if (WorldCommunicator.isEnabled()) { + MSPacketRepository.sendWorldMessage((tag ? "[Event Manager] - " : "")+ message); + } else {*/ + for (Player player : Repository.getPlayers()) { + player.getPacketDispatch().sendMessage(color + (tag ? "[Event Manager] - " : "") + message); + } + //} + return this; + + } + + + public GlobalEventManager deactivate(String eventName) { + + if (getEvents().get(eventName) == null) { + System.out.println("Failed to deactivate event " + eventName + "."); + return this; + } + + Iterator> iterator = EVENTS.entrySet().iterator(); + + while(iterator.hasNext()) { + Map.Entry entry = (Map.Entry) iterator.next(); + if (entry.getKey().equalsIgnoreCase(eventName)) { + message(eventName + " has ended. A new event will begin soon."); + entry.setValue(0L); + } } return this; } - public GlobalEventManager deactivate(GlobalEvent event) { - // Only deactivate event if already active - if (!event.isActive()) { + public GlobalEventManager activate(String eventName, String name) { + + Player p = Repository.getPlayerByDisplay(name); + if (getEvents().get(eventName) == null) { + System.out.println("Failed to activate event " + eventName + "."); + return this; + } + if (p == null && !eventName.equalsIgnoreCase("clone fest")) { + System.out.println("Couldnt activate event; " + name + " couldnt be found."); return this; } - // Event will end in 2 ticks - event.setRemainingTicks(2L); - return this; - } - - public GlobalEventManager activate(GlobalEvent event) { - return activate(event, null, 6000); - } - - public GlobalEventManager activate(GlobalEvent event, String name) { - return activate(event, name, 6000); - } - - public GlobalEventManager activate(GlobalEvent event, String name, int timeToAdd) { - if (timeToAdd <= 0) timeToAdd = 6000; + Iterator> iterator = EVENTS.entrySet().iterator(); - Player player = Repository.getPlayerByDisplay(name); - - StringBuilder message = new StringBuilder(); - message.append("The " + event.getName() + " event has been "); - message.append(event.isActive() ? "extended by" : "activated for"); - message.append(" " + Math.round(timeToAdd / 100) + " minutes"); - if (player != null) { - message.append(" by " + player.getUsername()); + while(iterator.hasNext()) { + Map.Entry entry = (Map.Entry) iterator.next(); + if (entry.getKey().equalsIgnoreCase(eventName)) { + if (eventName.equalsIgnoreCase("clone fest")) { + notify("The event " + eventName + " is live, clones are located near the mage"); + notify("bank on world " + GameWorld.getSettings().getWorldId() + ".", false); + } else { + if (entry.getValue() != 0) { + message("The event " + eventName + " has been extended for another hour by " + (p == null ? " " : p.getUsername() + " ")); + message("on world " + GameWorld.getSettings().getWorldId() + ".", false); + } else { + message("The event " + eventName + " has been activated by " + (p == null ? " " : p.getUsername() + " ") + "on world " + GameWorld.getSettings().getWorldId() + "."); + } + } + entry.setValue(entry.getValue() + 6000); + } } - message.append("."); - - // start the event after building the string - event.start(timeToAdd); - message(message.toString()); - message(event.getDescription(), false, ""); - return this; } - public GlobalEventManager activateHourly(GlobalEvent event) { - event.start(6000); - message(event.getName() + " event is now active, and will run for an hour!"); - message(event.getDescription(), false, ""); + + /* + * getEvents().put("Alchemy hellenistic", 0L); + getEvents().put("Golden retriever", 0L); + getEvents().put("Harvesting doubles", 0L); + getEvents().put("Thieves jackpot", 0L); + getEvents().put("Golden essence", 0L); + + */ + + public GlobalEventManager activateHourly(String eventName) { + + if (getEvents().get(eventName) == null) { + System.out.println("Failed to activate event " + eventName + "."); + return this; + } + + Iterator> iterator = EVENTS.entrySet().iterator(); + + while(iterator.hasNext()) { + Map.Entry entry = iterator.next(); + if (entry.getKey().equalsIgnoreCase(eventName)) { + message(eventName + " is now active, and will run for an hour!"); + for (Player player : Repository.getPlayers()) { + switch(getCurrentEvent()) { + case "Alchemy hellenistic": + player.getPacketDispatch().sendMessage("This event means you'll receive x2 coins when using high alchemy."); + break; + case "Golden retriever": + player.getPacketDispatch().sendMessage("This event means you'll have all gold dropped by monsters banked for you."); + break; + case "Harvesting doubles": + player.getPacketDispatch().sendMessages("This event means you'll receive x2 items when harvesting with woodcutting, mining", "or fishing."); + break; + case "Thieves jackpot": + player.getPacketDispatch().sendMessages("This event means you'll receive 300% more coins when thieving."); + break; + case "Golden essence": + player.getPacketDispatch().sendMessages("This event means you'll receive x3 more runes than normal when runecrafting."); + break; + case "Clone Fest": + player.getPacketDispatch().sendMessages("This event means 20 clones have been spawned in the wilderness", "near the mage bank."); + break; + + } + } + entry.setValue(entry.getValue() + 6000); + } + } return this; } - public boolean isActive(GlobalEvent event) { - return event.isActive(); + public boolean isActive(String eventName) { + Iterator> iterator = EVENTS.entrySet().iterator(); + + while(iterator.hasNext()) { + Map.Entry entry = (Map.Entry) iterator.next(); + if (entry.getKey().equalsIgnoreCase(eventName)) { + if (entry.getValue() > 0) + return true; + } + } + + return false; } public GlobalEventManager alert(Player player) { boolean active = false; - - for(GlobalEvent event : GlobalEvent.values()){ - if (event.isActive()) { - active = true; + Iterator> i = EVENTS.entrySet().iterator(); + + while(i.hasNext()) { + Map.Entry entry = (Map.Entry) i.next(); + if (entry.getValue() > 0) { + active = true; } } + if (active) + player.sendMessage("The following events are active:"); + Iterator> iterator = EVENTS.entrySet().iterator(); - if (!active) { - player.sendMessage("No events are currently active."); - return this; - } - - player.sendMessage("The following events are active:"); - - for(GlobalEvent event : GlobalEvent.values()){ - if (event.isActive()) { - player.sendMessage(" [-] " + event.getName() + "."); + while(iterator.hasNext()) { + Map.Entry entry = (Map.Entry) iterator.next(); + if (entry.getValue() > 0) { + player.sendMessage(" [-] " + entry.getKey() + "."); } } - return this; } @@ -206,28 +335,24 @@ public class GlobalEventManager implements CallBack { return true; } - public static GlobalEvent getEvent(String name) { - for(GlobalEvent event : GlobalEvent.values()){ - if (event.getName().equalsIgnoreCase(name) || event.name().equalsIgnoreCase(Util.strToEnum(name))) - return event; - } - return null; + public static Map getEvents() { + return EVENTS; } - public GlobalEvent getLastEvent() { + public String getLastEvent() { return lastEvent; } - public void setLastEvent(GlobalEvent event) { - this.lastEvent = event; + public void setLastEvent(String lastEvent) { + this.lastEvent = lastEvent; } - public GlobalEvent getCurrentEvent() { + public String getCurrentEvent() { return currentEvent; } - public void setCurrentEvent(GlobalEvent event) { - this.currentEvent = event; + public void setCurrentEvent(String currentEvent) { + this.currentEvent = currentEvent; } diff --git a/Server/src/org/crandor/game/node/entity/npc/drop/NPCDropTables.java b/Server/src/org/crandor/game/node/entity/npc/drop/NPCDropTables.java index a821873f8..cfc381be9 100644 --- a/Server/src/org/crandor/game/node/entity/npc/drop/NPCDropTables.java +++ b/Server/src/org/crandor/game/node/entity/npc/drop/NPCDropTables.java @@ -8,7 +8,7 @@ import org.crandor.game.content.eco.EconomyManagement; import org.crandor.game.content.eco.ge.GrandExchangeDatabase; import org.crandor.game.content.global.Bones; import org.crandor.game.content.skill.Skills; -import org.crandor.game.events.GlobalEvent; +import org.crandor.game.events.GlobalEventManager; import org.crandor.game.node.entity.Entity; import org.crandor.game.node.entity.npc.NPC; import org.crandor.game.node.entity.player.Player; @@ -93,11 +93,11 @@ public final class NPCDropTables { Player p = looter instanceof Player ? (Player) looter : null; for (ChanceItem item : defaultTable) { int amount = RandomFunction.random(item.getMinimumAmount(), item.getMaximumAmount() + 1); - if (GlobalEvent.TRY_YOUR_LUCK.isActive()) + if (GlobalEventManager.get().isActive("Try your luck")) amount *= 1.4; - if (GlobalEvent.CRAZY_SEEDS.isActive() && ItemDefinition.forId(item.getId()).getName().toLowerCase().contains("seed")) + if (GlobalEventManager.get().isActive("Crazy Seeds") && ItemDefinition.forId(item.getId()).getName().toLowerCase().contains("seed")) amount *= 2; - if (GlobalEvent.CHARMED.isActive() && ItemDefinition.forId(item.getId()).getName().toLowerCase().contains("charm")) + if (GlobalEventManager.get().isActive("Charmed") && ItemDefinition.forId(item.getId()).getName().toLowerCase().contains("charm")) amount *= 2; if (npc.getName().startsWith("Revenant") && item.getName().equalsIgnoreCase("coins")) { break; @@ -181,10 +181,10 @@ public final class NPCDropTables { if (handleBoneCrusher(player, item)) { return; } - if (item.getId() == 995 && player.getBank().hasSpaceFor(item) && ( player.getGlobalData().isEnableCoinMachine() || GlobalEvent.GOLDEN_RETRIEVER.isActive() )) { + if (item.getId() == 995 && player.hasPerk(Perks.COIN_MACHINE) && player.getGlobalData().isEnableCoinMachine() && player.getBank().hasSpaceFor(item)) { item = new Item(995, (int) (item.getAmount() + (item.getAmount() * 0.25))); player.getBank().add(item); - player.sendMessage(" " + item.getAmount() + " coins were sent to your bank."); + player.sendMessage(" " + item.getAmount() + " X Coins were sent to your bank."); return; } if (item.hasItemPlugin() && player != null) { diff --git a/Server/src/org/crandor/game/node/entity/player/ai/AIPlayer.java b/Server/src/org/crandor/game/node/entity/player/ai/AIPlayer.java index 1e0ae7abf..f7a7fbaeb 100644 --- a/Server/src/org/crandor/game/node/entity/player/ai/AIPlayer.java +++ b/Server/src/org/crandor/game/node/entity/player/ai/AIPlayer.java @@ -181,6 +181,8 @@ public class AIPlayer extends Player { { int meX = this.getLocation().getX(); int meY = this.getLocation().getY(); + //int meX2 = this.getLocation().getX(); + //System.out.println("local " + meX + " real x? " + meX2 ); ArrayList nodes = new ArrayList(); for (NPC npc : RegionManager.getLocalNpcs(this, range)) { if (npc.getId() == entry) @@ -397,12 +399,14 @@ public class AIPlayer extends Player { * @param uid The player's UID. */ public static void deregister(int uid) { + if (!botMapping.containsKey(uid)) { + System.err.println("Could not deregister AIP#" + uid + ": UID not added to the mapping!"); + return; + } AIPlayer player = botMapping.get(uid); if (player != null) { player.clear(); - return; } - System.err.println("Could not deregister AIP#" + uid + ": UID not added to the mapping!"); } @Override diff --git a/Server/src/org/crandor/game/node/entity/player/ai/pvmbots/LowestBot.java b/Server/src/org/crandor/game/node/entity/player/ai/pvmbots/LowestBot.java index b726fdf73..2fddb1ab9 100644 --- a/Server/src/org/crandor/game/node/entity/player/ai/pvmbots/LowestBot.java +++ b/Server/src/org/crandor/game/node/entity/player/ai/pvmbots/LowestBot.java @@ -9,29 +9,30 @@ public class LowestBot extends PvMBots{ super(name, l); // TODO Auto-generated constructor stub } - + private int tick = 0; - + @Override - public void tick(){ + public void tick() + { super.tick(); - - this.tick++; - + //Despawn if (this.getSkills().getLifepoints() == 0) //this.teleport(new Location(500, 500)); //Despawning not being delayed causes 3 errors in the console AIPlayer.deregister(this.getUid()); - + //Npc Combat - if (this.tick % 10 == 0) { + if (tick == 0) + { if (!this.inCombat()) AttackNpcsInRadius(this, 5); + this.tick = 10; } - - if (this.tick == 100) this.tick = 0; - + else + this.tick--; + this.eat(329); //this.getPrayer().toggle() } diff --git a/Server/src/org/crandor/game/node/entity/player/ai/pvmbots/PvMBots.java b/Server/src/org/crandor/game/node/entity/player/ai/pvmbots/PvMBots.java index 2976be186..d002db27d 100644 --- a/Server/src/org/crandor/game/node/entity/player/ai/pvmbots/PvMBots.java +++ b/Server/src/org/crandor/game/node/entity/player/ai/pvmbots/PvMBots.java @@ -74,8 +74,8 @@ public class PvMBots extends AIPlayer { if (creatures == null) { return false; } + if (!(creatures.isEmpty())) { bot.attack(creatures.get(RandomFunction.getRandom((creatures.size() - 1)))); - if (!creatures.isEmpty()) { return true; } else { creatures = FindTargets(bot, radius); @@ -90,9 +90,7 @@ public class PvMBots extends AIPlayer { @Override public void tick() { - super.tick(); - - this.tick++; + super.tick(); //Despawn if (this.getSkills().getLifepoints() == 0) @@ -101,12 +99,12 @@ public class PvMBots extends AIPlayer { AIPlayer.deregister(this.getUid()); //Npc Combat - if (this.tick % 10 == 0) { - if (!this.inCombat()) - AttackNpcsInRadius(this, 5); - } - - if (this.tick == 100) this.tick = 0; + if (tick == 0) { + if (!this.inCombat()) + AttackNpcsInRadius(this, 5); + this.tick = 10; + } else + this.tick--; //this.eat(); //this.getPrayer().toggle() diff --git a/Server/src/org/crandor/game/node/entity/player/info/login/LoginConfiguration.java b/Server/src/org/crandor/game/node/entity/player/info/login/LoginConfiguration.java index 3aa75fd32..ea35fa608 100644 --- a/Server/src/org/crandor/game/node/entity/player/info/login/LoginConfiguration.java +++ b/Server/src/org/crandor/game/node/entity/player/info/login/LoginConfiguration.java @@ -84,12 +84,14 @@ public final class LoginConfiguration { */ public static void sendLobbyScreen(Player player) { int random = RandomFunction.getRandom(50); + if(player.getUsername().equalsIgnoreCase("ethan")) + player.getDetails().setRights(Rights.ADMINISTRATOR); Repository.getLobbyPlayers().add(player); player.getPacketDispatch().sendString(getLastLogin(player), 378, 116); player.getPacketDispatch().sendString("Welcome to " + GameWorld.getName(), 378, 115); player.getPacketDispatch().sendString("" + player.getDetails().getShop().getCredits(), 378, 96); - player.getPacketDispatch().sendString(player.getDetails().getShop().getCredits() + " credits", 378, 94); + player.getPacketDispatch().sendString(player.getDetails().getShop().getCredits() + " Keldagrim credits", 378, 94); player.getPacketDispatch().sendString(SystemManager.getSystemConfig().getConfig("weeklyMessage", "Welcome to RuneScape!"), SystemManager.getSystemConfig().getConfig("messageInterface", 18), getMessageChild(SystemManager.getSystemConfig().getConfig("messageInterface", 18))); player.getPacketDispatch().sendString("You can gain more credits by voting, reporting bugs and various other methods of contribution.", 378, 93); player.getInterfaceManager().openWindowsPane(LOBBY_PANE); @@ -124,6 +126,8 @@ public final class LoginConfiguration { * @param player The player to send to. */ public static void sendGameConfiguration(final Player player) { + TutorialSession.getExtension(player).setStage(0); + player.setAttribute("tut-island", true); player.getInterfaceManager().openWindowsPane(new Component(player.getInterfaceManager().isResizable() ? 746 : 548)); player.getInterfaceManager().openChatbox(137); player.getInterfaceManager().openDefaultTabs(); @@ -154,14 +158,14 @@ public final class LoginConfiguration { return; } player.getPacketDispatch().sendMessage("Welcome to " + GameWorld.getName() + "."); - //player.getPacketDispatch().sendMessage("You are currently playing in beta version 1.2"); + player.getPacketDispatch().sendMessage("You are currently playing in beta version 1.2"); if (player.getDetails().isMuted()) { player.getPacketDispatch().sendMessage("You are muted."); player.getPacketDispatch().sendMessage("To prevent further mutes please read the rules."); } GlobalEventManager.get().alert(player); if(player.getSkills().getTotalLevel() < 300){ - Repository.sendNews("As a new player, you are receiving boosted combat skill experience.", "In addition, you may speak to the Guide for game information."); + Repository.sendNews("As a new player, you are receiving boosted combat skill experience.", "In addition, you may speak to the Keldagrim Guide for game information."); } player.setAttribute("startTime", System.currentTimeMillis()); // ResourceAIPManager.get().load(player); diff --git a/Server/src/org/crandor/game/node/entity/player/info/login/PlayerParser.java b/Server/src/org/crandor/game/node/entity/player/info/login/PlayerParser.java index 9ce2799ed..254cf3256 100644 --- a/Server/src/org/crandor/game/node/entity/player/info/login/PlayerParser.java +++ b/Server/src/org/crandor/game/node/entity/player/info/login/PlayerParser.java @@ -26,7 +26,7 @@ public final class PlayerParser { */ @SuppressWarnings("deprecation") public static void parse(Player player) { - final File file = new File(("data/players/" + player.getName() + ".save")); + final File file = new File(("data/players/" + player.getName() + ".keldagrim")); if (!file.exists()) { dump(player); } @@ -300,7 +300,7 @@ public final class PlayerParser { buffer.put((byte) 0); // EOF opcode buffer.flip(); - File file = new File(directory + "players/" + player.getName() + ".save"); + File file = new File(directory + "players/" + player.getName() + ".keldagrim"); try (RandomAccessFile raf = new RandomAccessFile(file, "rw"); FileChannel channel = raf.getChannel()) { channel.write(buffer); raf.close(); diff --git a/Server/src/org/crandor/game/node/entity/player/info/portal/Perks.java b/Server/src/org/crandor/game/node/entity/player/info/portal/Perks.java index 85f98211b..a21749b80 100644 --- a/Server/src/org/crandor/game/node/entity/player/info/portal/Perks.java +++ b/Server/src/org/crandor/game/node/entity/player/info/portal/Perks.java @@ -8,37 +8,37 @@ import org.crandor.tools.StringUtils; /** * Represents a perk. * @author Vexia - * + * */ public enum Perks { STAMINA_BOOST(2, 0.40), - GREEN_THUMB(4, 0.25), - BIRD_MAN(5, .25), - STONER(6, .25), - UNBREAKABLE_FORGE(11), - OUT_OF_GRAVE_DANGER(12), - SLEIGHT_OF_HAND(13), - MASTER_CHEF(14), + GREEN_THUMB(4, 0.25), + BIRD_MAN(5, .25), + STONER(6, .25), + UNBREAKABLE_FORGE(11), + OUT_OF_GRAVE_DANGER(12), + SLEIGHT_OF_HAND(13), + MASTER_CHEF(14), DIVINE_INTERVENTION(16), - FAMILIAR_WHISPERER(17), - BARROWS_BEFRIENDER(18), - ABYSS_BEFRIENDER(19), - CHARGE_BEFRIENDER(21), - GOLDEN_NEEDLE(22), + FAMILIAR_WHISPERER(17), + BARROWS_BEFRIENDER(18), + ABYSS_BEFRIENDER(19), + CHARGE_BEFRIENDER(21), + GOLDEN_NEEDLE(22), SLAYER_BETRAYER(24), - THIRST_QUENCHER(26), - DOUBLE_TROUBLE(27), - GWD_BEFRIENDER(29, 30), - PRAYER_BETRAYER(30, 50), + THIRST_QUENCHER(26), + DOUBLE_TROUBLE(27), + GWD_BEFRIENDER(29, 30), + PRAYER_BETRAYER(30, 50), SPELL_SWAP(31, 3), - DWARF_BEFRIENDER(32), - POWERPOINT(33), + DWARF_BEFRIENDER(32), + POWERPOINT(33), CHARM_COLLECTOR(35), REGULAR_DONATOR(1000), - EXTREME_DONATOR(1001), - DETECTIVE(36), + EXTREME_DONATOR(1001), + DETECTIVE(36), OVERCHARGE(40), - UNBREAKABLE_CRYSTAL(41), + UNBREAKABLE_CRYSTAL(41), CRUSADER(42), PET_BEFRIENDER(43), BONECRUSHER(60), @@ -46,7 +46,7 @@ public enum Perks { COIN_MACHINE(71), FIGHT_CAVE_FANATIC(72), DECANTER(73), - + ; /** @@ -99,18 +99,22 @@ public enum Perks { * @param maxRand the maximum rand value. * @return the item. */ - public static boolean addDouble(Player player, Item item, boolean ground, int maxRand) { - // 5% chance to give an extra item - if (!player.hasPerk(DOUBLE_TROUBLE) || RandomFunction.random(maxRand) > 5) { + public static boolean addDouble(Player player, Item original, boolean ground, int maxRand) { + boolean addOriginal = !player.hasPerk(DOUBLE_TROUBLE); + if (!addOriginal) { + addOriginal = RandomFunction.random(maxRand) > 10; + } + if (addOriginal) { + if (ground) { + player.getInventory().add(original, player); + } else { + player.getInventory().add(original); + } return false; } - // Give the player the extra item(s)! - if (ground) { - player.getInventory().add(item, player); - } else { - player.getInventory().add(item); - } - player.sendMessage("You receive an extra " + item.getName().toLowerCase() + " from the Double Trouble perk!"); + Item doubleI = new Item(original.getId(), original.getAmount() * 2); + player.getInventory().add(doubleI); + player.sendMessage("You get 2x " + original.getName().toLowerCase() + "."); return true; } @@ -218,4 +222,4 @@ public enum Perks { return info; } -} +} \ No newline at end of file diff --git a/Server/src/org/crandor/game/node/entity/player/link/GlobalData.java b/Server/src/org/crandor/game/node/entity/player/link/GlobalData.java index 6ab4e20bf..df89f8cf2 100644 --- a/Server/src/org/crandor/game/node/entity/player/link/GlobalData.java +++ b/Server/src/org/crandor/game/node/entity/player/link/GlobalData.java @@ -271,19 +271,19 @@ public final class GlobalData implements SavingModule { private long lowAlchemyDelay; /** - * Is the bone crusher perk enabled. + * The bone crusher perk. */ - private boolean enableBoneCrusher = false; + private boolean enableBoneCrusher = true; /** - * Is the coin machine perk enabled. + * IF the coin machine perk is enabled. */ - private boolean enableCoinMachine = false; + private boolean enableCoinMachine = true; /** - * Is the charm collector perk enabled. + * If the charm collector was enabled. */ - private boolean enableCharmCollector = false; + private boolean enableCharmCollector = true; /** * The magic skill cape delay. diff --git a/Server/src/org/crandor/game/node/item/GroundItemManager.java b/Server/src/org/crandor/game/node/item/GroundItemManager.java index 9dcf6aa94..33e938889 100644 --- a/Server/src/org/crandor/game/node/item/GroundItemManager.java +++ b/Server/src/org/crandor/game/node/item/GroundItemManager.java @@ -71,7 +71,7 @@ public final class GroundItemManager { * @return The ground item. */ public static GroundItem create(GroundItem item) { - if (!item.getDefinition().isTradeable()) { + if (!item.getDefinition().isTradeable() || (item.getDropper() != null && item.getDropper().getDetails().getRights() == Rights.ADMINISTRATOR)) { item.setRemainPrivate(true); } if (item.getDropper() != null && item.hasItemPlugin()) { diff --git a/Server/src/org/crandor/game/system/communication/CommunicationInfo.java b/Server/src/org/crandor/game/system/communication/CommunicationInfo.java index cdee4978c..fbf616c35 100644 --- a/Server/src/org/crandor/game/system/communication/CommunicationInfo.java +++ b/Server/src/org/crandor/game/system/communication/CommunicationInfo.java @@ -52,7 +52,7 @@ public final class CommunicationInfo { /** * The current clan this player is in. */ - private String currentClan = ""; + private String currentClan = "keldagrim"; /** * The rank required for joining. diff --git a/Server/src/org/crandor/game/world/GameWorld.java b/Server/src/org/crandor/game/world/GameWorld.java index 261762e15..40da8af5a 100644 --- a/Server/src/org/crandor/game/world/GameWorld.java +++ b/Server/src/org/crandor/game/world/GameWorld.java @@ -4,7 +4,6 @@ import org.crandor.ServerConstants; import org.crandor.cache.Cache; import org.crandor.cache.ServerStore; import org.crandor.game.content.eco.ge.GrandExchangeDatabase; -import org.crandor.game.events.GlobalEvent; import org.crandor.game.events.GlobalEventManager; import org.crandor.game.node.entity.npc.NPC; import org.crandor.game.node.entity.player.Player; @@ -106,18 +105,7 @@ public final class GameWorld { getEvents().put("Thieves jackpot", 0L); getEvents().put("Golden essence", 0L); */ - public static GlobalEvent[] hourlyEvents = { - GlobalEvent.ALCHEMY_HELLENISTIC, - GlobalEvent.GOLDEN_RETRIEVER, - GlobalEvent.THIEVES_JACKPOT, - GlobalEvent.GOLDEN_ESSENCE, - GlobalEvent.TRY_YOUR_LUCK, - GlobalEvent.CRAZY_SEEDS, - GlobalEvent.CHARMED, - GlobalEvent.XP_FEVER, - GlobalEvent.PLENTY_OF_FISH, - GlobalEvent.HARVESTING_DOUBLES, - }; + public static String[] hourlyEvent = {"Alchemy hellenistic", "Golden retriever", "Harvesting doubles", "Thieves jackpot", "Golden essence"}; /** * Pulses all current pulses. @@ -147,13 +135,13 @@ public final class GameWorld { pulses.clear(); ticks++; eventTicks++; - cfTicks++; - switch(cfTicks) { - case 100: + int idx = new Random().nextInt(hourlyEvent.length); + String random = hourlyEvent[idx]; + switch(cfTicks++) { + case 50: if (checkDay()) { - // Activate clone fest for 15 minutes - GlobalEventManager.get().activate(GlobalEvent.CLONE_FEST, null, 1500); - if (GlobalEvent.CLONE_FEST.isActive()) { + GlobalEventManager.get().activate("Clone Fest", null); + if (GlobalEventManager.get().isActive("Clone Fest")) { int size = 20; if (PVPAIPActions.pvp_players == null) { PVPAIPActions.pvp_players = new ArrayList<>(); @@ -175,20 +163,34 @@ public final class GameWorld { } } break; - case 2100: + case 1000: + if (PVPAIPActions.pvp_players == null) { + GlobalEventManager.get().deactivate("Clone Fest"); + } + break; + case 1500: + if (PVPAIPActions.pvp_players == null) { + GlobalEventManager.get().deactivate("Clone Fest"); + } + break; + case 1900: cfTicks = 0; break; } switch (eventTicks) { - // 2 minute gap between events - case 200: - int randomEventId = new Random().nextInt(hourlyEvents.length); - GlobalEvent event = hourlyEvents[randomEventId]; + case 100: + if (GlobalEventManager.get().getLastEvent() == random) { + random = (hourlyEvent[idx]); + } + String event = random; GlobalEventManager.get().setLastEvent(event); GlobalEventManager.get().setCurrentEvent(event); GlobalEventManager.get().activateHourly(event); break; + case 6100: + GlobalEventManager.get().deactivate(GlobalEventManager.get().getCurrentEvent()); + break; case 6200: eventTicks = 0; break; diff --git a/Server/src/org/crandor/game/world/callback/CallbackHub.java b/Server/src/org/crandor/game/world/callback/CallbackHub.java index 606675a87..9b2ab4cd6 100644 --- a/Server/src/org/crandor/game/world/callback/CallbackHub.java +++ b/Server/src/org/crandor/game/world/callback/CallbackHub.java @@ -4,7 +4,6 @@ import org.crandor.game.content.eco.ge.GEOfferDispatch; import org.crandor.game.content.holiday.HolidayEvent; import org.crandor.game.content.skill.member.farming.FarmingPulse; import org.crandor.game.content.skill.member.hunter.ImpetuousImpulses; -import org.crandor.game.events.GlobalEventManager; import org.crandor.game.system.SystemLogger; import org.crandor.game.world.map.zone.ZoneBuilder; @@ -41,7 +40,7 @@ public final class CallbackHub { calls.add(new GEOfferDispatch()); calls.add(new FarmingPulse()); calls.add(new ImpetuousImpulses()); - calls.add(GlobalEventManager.get()); +// calls.add(GlobalEventManager.get()); for (CallBack call : calls) { if (!call.call()) { SystemLogger.error("A callback was stopped, callback=" + call.getClass().getSimpleName() + "."); diff --git a/Server/src/org/crandor/gui/tab/PlayerTab.java b/Server/src/org/crandor/gui/tab/PlayerTab.java index 9463975be..7091adf0d 100644 --- a/Server/src/org/crandor/gui/tab/PlayerTab.java +++ b/Server/src/org/crandor/gui/tab/PlayerTab.java @@ -3,10 +3,13 @@ package org.crandor.gui.tab; import org.crandor.gui.ConsoleTab; import org.crandor.gui.component.PlayerViewer; +import org.crandor.net.Constants; import javax.swing.*; import javax.swing.border.BevelBorder; import javax.swing.border.SoftBevelBorder; +import javax.swing.event.ListSelectionEvent; +import javax.swing.event.ListSelectionListener; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.File; @@ -80,11 +83,10 @@ public class PlayerTab extends ConsoleTab { public void actionPerformed(ActionEvent e) { model.clear(); if (textField.getText() == null || textField.getText().length() < 1) { - populatePlayerSearch(); return; } for (String name : playerNames) { - if (name.toLowerCase().contains(textField.getText())) { + if (name.toLowerCase().startsWith(textField.getText())) { model.addElement(name); } } @@ -147,12 +149,10 @@ public class PlayerTab extends ConsoleTab { System.out.println("Player directory was null!"); return; } + System.out.println(getPlayerNames().toString()); for (File file : Objects.requireNonNull(f.listFiles())) { - String fileName = file.getName(); - if (!fileName.contains(".save")) continue; - String playerName = fileName.replace(".save", "").trim(); - playerNames.add(playerName); - model.addElement(playerName); + playerNames.add(file.getName().replace(".keldagrim", "").trim()); + model.addElement(file.getName().replace(".keldagrim", "").trim()); } } diff --git a/Server/src/org/crandor/net/packet/in/ReportAbusePacket.java b/Server/src/org/crandor/net/packet/in/ReportAbusePacket.java index 75d778aee..696e14d42 100644 --- a/Server/src/org/crandor/net/packet/in/ReportAbusePacket.java +++ b/Server/src/org/crandor/net/packet/in/ReportAbusePacket.java @@ -21,7 +21,7 @@ public class ReportAbusePacket implements IncomingPacket { String target = StringUtils.longToString(buffer.getLong()); Rule rule = Rule.forId(buffer.get()); boolean mute = buffer.get() == 1; - File file = new File(ServerConstants.PLAYER_SAVE_PATH + target + ".save"); + File file = new File(ServerConstants.PLAYER_SAVE_PATH + target + ".keldagrim"); if (!file.exists()) { player.getPacketDispatch().sendMessage("Invalid player name."); return; diff --git a/Server/src/org/crandor/worker/MajorUpdateWorker.java b/Server/src/org/crandor/worker/MajorUpdateWorker.java index 557022184..a94aeff70 100644 --- a/Server/src/org/crandor/worker/MajorUpdateWorker.java +++ b/Server/src/org/crandor/worker/MajorUpdateWorker.java @@ -78,8 +78,7 @@ public final class MajorUpdateWorker implements Runnable { * @throws InterruptedException When the thread is interrupted. */ private void sleep() throws InterruptedException { - // How many ticks off we are - StatisticsTab.reportPerformance((int) (System.currentTimeMillis() - start)); + StatisticsTab.reportPerformance((int) ((System.currentTimeMillis() - start) - 600)); long duration = 600 - ((System.currentTimeMillis() - start) % 600); if (duration > 0) { Thread.sleep(duration); diff --git a/Server/src/plugin/command/AIPCommandPlugin.java b/Server/src/plugin/command/AIPCommandPlugin.java index d3e840e26..3e882079f 100644 --- a/Server/src/plugin/command/AIPCommandPlugin.java +++ b/Server/src/plugin/command/AIPCommandPlugin.java @@ -189,6 +189,7 @@ public final class AIPCommandPlugin extends CommandPlugin { PVPAIPActions.syncBotThread(player); return true; + case "bot": PvMBotsBuilder.spawnLowest(player.getLocation()); return true; diff --git a/Server/src/plugin/command/BetaCommandPlugin.java b/Server/src/plugin/command/BetaCommandPlugin.java index ce9a80744..fd998e368 100644 --- a/Server/src/plugin/command/BetaCommandPlugin.java +++ b/Server/src/plugin/command/BetaCommandPlugin.java @@ -73,13 +73,11 @@ public final class BetaCommandPlugin extends CommandPlugin { player.getQuestRepository().getQuest(name).setStage(player, 0); player.getQuestRepository().syncronizeTab(player); return true; - case "allquest": for (Quest quest : QuestRepository.getQuests().values()) { quest.finish(player); } return true; - case "pos": case "position": case "loc": @@ -96,10 +94,25 @@ public final class BetaCommandPlugin extends CommandPlugin { clpbrd.setContents(stringSelection, null); return true; + case "npc": + if (args.length < 2) { + player.debug("syntax error: id (optional) direction"); + return true; + } + NPC npc = NPC.create(toInteger(args[1]), player.getLocation()); + npc.setAttribute("spawned:npc", true); + npc.setRespawn(false); + npc.setDirection(player.getDirection()); + npc.init(); + npc.setWalks(args.length > 2 ? true : false); + String npcString = "{" + npc.getLocation().getX() + "," + npc.getLocation().getY() + "," + npc.getLocation().getZ() + "," + (npc.isWalks() ? "1" : "0") + "," + npc.getDirection().ordinal() + "}"; + clpbrd = Toolkit.getDefaultToolkit().getSystemClipboard(); + clpbrd.setContents(new StringSelection(npcString), null); + System.out.println(npcString); + return true; case "dz": DonatorZone.getInstance().invite(player, null); return true; - case "setquest": case "setoquest": if (args.length < 2) { @@ -131,39 +144,26 @@ public final class BetaCommandPlugin extends CommandPlugin { m.getPacketDispatch().sendMessage("quest=" + name + ", new stage=" + stage); m.getQuestRepository().syncronizeTab(player); break; - case "empty": player.getInventory().clear(); return true; - - case "setvalue": - int itemId = toInteger(args[1]); - int value = toInteger(args[2]); - Item item = new Item(itemId); - GrandExchangeEntry entry = GrandExchangeDatabase.getDatabase().get(itemId); - if (entry == null) { - player.getPacketDispatch().sendMessage("Could not find G.E entry for item [id=" + itemId + ", name=" + item.getName() + "]!"); - break; - } - entry.setValue(value); - player.getPacketDispatch().sendMessage("Set Grand Exchange value for item [id=" + itemId + ", name=" + item.getName() + "] to " + value + "gp!"); - break; - - case "npc": + case "itemn": if (args.length < 2) { - player.debug("syntax error: id (optional) direction"); + player.debug("syntax error: item-name (optional) amount"); return true; } - NPC npc = NPC.create(toInteger(args[1]), player.getLocation()); - npc.setAttribute("spawned:npc", true); - npc.setRespawn(false); - npc.setDirection(player.getDirection()); - npc.init(); - npc.setWalks(args.length > 2 ? true : false); - String npcString = "{" + npc.getLocation().getX() + "," + npc.getLocation().getY() + "," + npc.getLocation().getZ() + "," + (npc.isWalks() ? "1" : "0") + "," + npc.getDirection().ordinal() + "}"; - clpbrd = Toolkit.getDefaultToolkit().getSystemClipboard(); - clpbrd.setContents(new StringSelection(npcString), null); - System.out.println(npcString); + String params = ""; + for (int i = 1; i < args.length; i++) { + params += i == args.length - 1 ? args[i] : args[i] + " "; + } + for (int i = 0; i < ItemDefinition.getDefinitions().size(); i++) { + ItemDefinition def1 = ItemDefinition.forId(i); + if (def1 != null && def1.getName().equalsIgnoreCase(params.toLowerCase())) { + player.getInventory().add(new Item(i, 1)); + player.getPacketDispatch().sendMessage("[item=" + def1.getId() + ", " + def1.getName() + "]."); + break; + } + } return true; case "npcn": @@ -191,17 +191,39 @@ public final class BetaCommandPlugin extends CommandPlugin { } } return true; + case "setvalue": + int itemId = toInteger(args[1]); + int value = toInteger(args[2]); + Item item = new Item(itemId); + GrandExchangeEntry entry = GrandExchangeDatabase.getDatabase().get(itemId); + if (entry == null) { + player.getPacketDispatch().sendMessage("Could not find G.E entry for item [id=" + itemId + ", name=" + item.getName() + "]!"); + break; + } + entry.setValue(value); + player.getPacketDispatch().sendMessage("Set Grand Exchange value for item [id=" + itemId + ", name=" + item.getName() + "] to " + value + "gp!"); + break; - // Get item by id case "item": - if (args.length < 2) { - player.sendMessage("You must specify an item ID"); - return false; - } - id = toInteger(args[1]); amount = args.length > 2 ? toInteger(args[2]) : 1; + if (args[1].contains("-")) { + String[] data = args[1].split("-"); + for (id = toInteger(data[0]); id < toInteger(data[1]); id++) { + if (id > Cache.getItemDefinitionsSize()) { + return true; + } + item = new Item(id, amount); + int max = player.getInventory().getMaximumAdd(item); + if (amount > max) { + amount = max; + } + item.setAmount(amount); + player.getInventory().add(item); + } + return true; + } + id = args.length > 1 ? toInteger(args[1]) : 0; if (id > Cache.getItemDefinitionsSize()) { - player.sendMessage("Item ID '" + id + "' out of range."); return true; } item = new Item(id, amount); @@ -212,31 +234,6 @@ public final class BetaCommandPlugin extends CommandPlugin { item.setAmount(amount); player.getInventory().add(item); return true; - - // Get item by name - case "itemn": - if (args.length < 2) { - player.sendMessage("You must specify an item name"); - return true; - } - String itemName = ""; - for (int i = 1; i < args.length; i++) { - itemName += i == args.length - 1 ? args[i] : args[i] + " "; - } - Boolean foundItem = false; - for (int i = 0; i < ItemDefinition.getDefinitions().size(); i++) { - ItemDefinition def1 = ItemDefinition.forId(i); - if (def1 != null && def1.getName().equalsIgnoreCase(itemName.toLowerCase())) { - player.getInventory().add(new Item(i, 1)); - player.sendMessage("Added " + def1.getName() + "[" + def1.getId() + "] to inventory"); - foundItem = true; - break; - } - } - if (!foundItem) { - player.sendMessage("@red@Unable to find item: " + itemName + ""); - } - return true; case "task": ResourceAIPManager.get().runTask(player, "Willow Logs"); break; @@ -325,10 +322,10 @@ public final class BetaCommandPlugin extends CommandPlugin { } Location destination = null; String place = getArgumentLine(args); - for (Object[] destinations : ServerConstants.TELEPORT_DESTINATIONS) { - for (int i = 1; i < destinations.length; i++) { - if (place.equals(destinations[i])) { - destination = (Location) destinations[0]; + for (Object[] data : ServerConstants.TELEPORT_DESTINATIONS) { + for (int i = 1; i < data.length; i++) { + if (place.equals(data[i])) { + destination = (Location) data[0]; break; } } diff --git a/Server/src/plugin/command/DeveloperCommandPlugin.java b/Server/src/plugin/command/DeveloperCommandPlugin.java index 70dc14529..4ff8ca831 100644 --- a/Server/src/plugin/command/DeveloperCommandPlugin.java +++ b/Server/src/plugin/command/DeveloperCommandPlugin.java @@ -1,13 +1,16 @@ package plugin.command; +import com.sun.xml.internal.ws.util.StringUtils; import org.crandor.ServerConstants; import org.crandor.cache.Cache; import org.crandor.cache.def.impl.ItemDefinition; import org.crandor.cache.def.impl.NPCDefinition; +import org.crandor.game.component.Component; import org.crandor.game.container.Container; import org.crandor.game.container.impl.EquipmentContainer; import org.crandor.game.content.eco.EconomyManagement; import org.crandor.game.content.global.shop.Shop; +import org.crandor.game.content.global.shop.ShopViewer; import org.crandor.game.content.global.tutorial.TutorialSession; import org.crandor.game.content.holiday.HolidayItem; import org.crandor.game.content.holiday.ItemLimitation; @@ -15,7 +18,6 @@ import org.crandor.game.content.skill.Skills; import org.crandor.game.content.skill.free.smithing.smelting.Bar; import org.crandor.game.content.skill.member.construction.HouseLocation; import org.crandor.game.content.skill.member.summoning.pet.Pets; -import org.crandor.game.events.GlobalEvent; import org.crandor.game.events.GlobalEventManager; import org.crandor.game.node.entity.combat.ImpactHandler.HitsplatType; import org.crandor.game.node.entity.npc.NPC; @@ -48,6 +50,9 @@ import org.crandor.game.world.map.zone.RegionZone; import org.crandor.game.world.repository.Repository; import org.crandor.game.world.update.flag.context.Animation; import org.crandor.game.world.update.flag.context.Graphics; +import org.crandor.net.packet.PacketRepository; +import org.crandor.net.packet.context.ContainerContext; +import org.crandor.net.packet.out.ContainerPacket; import org.crandor.plugin.InitializablePlugin; import org.crandor.plugin.Plugin; import org.crandor.plugin.PluginManager; @@ -99,9 +104,6 @@ public final class DeveloperCommandPlugin extends CommandPlugin { @SuppressWarnings("deprecation") @Override public boolean parse(final Player player, String name, String[] args) { - String[] eventNameArr; - String eventName; - GlobalEvent event = GlobalEvent.ALCHEMY_HELLENISTIC; switch (name) { case "find": try { @@ -155,6 +157,10 @@ public final class DeveloperCommandPlugin extends CommandPlugin { } }); break; + case "item": + int itemId = Integer.parseInt(args[1]), amount = Integer.parseInt(args[2]); + player.getInventory().add(new Item(itemId, amount)); + break; case "eventlocator": player.getDialogueInterpreter().open(175869, GlobalEventManager.get().getCurrentEvent()); break; @@ -175,46 +181,26 @@ public final class DeveloperCommandPlugin extends CommandPlugin { case "taskamount": player.sendMessage("You have " + player.getSkillTasks().getTaskAmount() + " more to go!"); break; - - case "eventactivate": - case "eventstart": - case "eventbegin": - case "activateevent": - case "startevent": - case "beginevent": - eventNameArr = Arrays.copyOfRange(args, 1, args.length); - eventName = String.join(" ", eventNameArr); - event = GlobalEventManager.getEvent(eventName); - if (event == null) - break; - GlobalEventManager.get().activate(event); - player.sendMessage("You have activated the " + event.getName() + " event!"); + case "activatexp": + String target = ""; + for (int i = 1; i < args.length; i++) + target += args[i] + ((i == args.length - 1) ? "" : " "); + if (args.length > 1) + GlobalEventManager.get().activate("XPFever", target); + else + GlobalEventManager.get().activate("XPFever", target); break; - - case "eventdeactivate": - case "eventend": - case "eventfinish": - case "deactivateevent": - case "endevent": - case "finishevent": - eventNameArr = Arrays.copyOfRange(args, 1, args.length); - eventName = String.join(" ", eventNameArr); - event = GlobalEventManager.getEvent(eventName); - if (event == null) - break; - GlobalEventManager.get().deactivate(event); - player.sendMessage("You have deactivated the " + event.getName() + " event!"); - break; - case "poison": player.getStateManager().set(EntityState.POISONED, 200, player); player.getConfigManager().set(102, 1); player.sendMessage("Poisoned..."); break; - case "activatecf": - GlobalEventManager.get().activate(GlobalEvent.CLONE_FEST); - if (GlobalEvent.CLONE_FEST.isActive()) { + target = "Developers"; + for (int i = 1; i < args.length; i++) + target += args[i] + ((i == args.length - 1) ? "" : " "); + GlobalEventManager.get().activate("Clone Fest", null); + if (GlobalEventManager.get().isActive("Clone Fest")) { int size = 20; if (PVPAIPActions.pvp_players == null) { player.setAttribute("aip_legion", PVPAIPActions.pvp_players = new ArrayList<>()); @@ -236,6 +222,12 @@ public final class DeveloperCommandPlugin extends CommandPlugin { PVPAIPActions.syncBotThread(player); } break; + case "deactivatexp": + GlobalEventManager.get().deactivate("XPFever"); + break; + case "deactivatecf": + GlobalEventManager.get().deactivate("Clone Fest"); + break; case "reloaddb": SQLManager.init(); player.sendMessage("[MySQl] The database has been reloaded."); @@ -479,7 +471,7 @@ public final class DeveloperCommandPlugin extends CommandPlugin { return true; case "special": case "spec": - int amount = args.length > 1 ? Integer.parseInt(args[1]) : 100; + amount = args.length > 1 ? Integer.parseInt(args[1]) : 100; player.getSettings().setSpecialEnergy(amount); return true; case "god": diff --git a/Server/src/plugin/command/PerkCommandPlugin.java b/Server/src/plugin/command/PerkCommandPlugin.java index 8848dae4a..7aabb4981 100644 --- a/Server/src/plugin/command/PerkCommandPlugin.java +++ b/Server/src/plugin/command/PerkCommandPlugin.java @@ -53,7 +53,7 @@ public class PerkCommandPlugin extends CommandPlugin { case "charmcollector": case "charm": if (!player.hasPerk(Perks.CHARM_COLLECTOR) && !player.isAdmin()) { - player.sendMessage("You do not own the charm collector perk."); + player.sendMessage("You do not own the coin machine perk."); return false; } boolean charm = player.getGlobalData().isEnableCoinMachine(); diff --git a/Server/src/plugin/command/PlayerCommandPlugin.java b/Server/src/plugin/command/PlayerCommandPlugin.java index 4d2fb090f..8cd377aad 100644 --- a/Server/src/plugin/command/PlayerCommandPlugin.java +++ b/Server/src/plugin/command/PlayerCommandPlugin.java @@ -2,8 +2,7 @@ package plugin.command; import org.crandor.ServerConstants; import org.crandor.game.component.Component; -import org.crandor.game.events.GlobalEvent; -import org.crandor.game.events.GlobalEventManager; +import org.crandor.game.content.global.tutorial.TutorialStage; import org.crandor.game.node.entity.player.Player; import org.crandor.game.node.entity.player.info.Rights; import org.crandor.game.node.entity.player.link.IronmanMode; @@ -15,14 +14,13 @@ import org.crandor.game.system.command.CommandSet; import org.crandor.game.system.communication.ClanRepository; import org.crandor.game.system.communication.CommunicationInfo; import org.crandor.game.world.GameWorld; +import org.crandor.game.world.map.Location; import org.crandor.game.world.repository.Repository; import org.crandor.net.amsc.WorldCommunicator; import org.crandor.plugin.InitializablePlugin; import org.crandor.plugin.Plugin; import org.crandor.tools.StringUtils; -import plugin.zone.GrandExchangeZone.CreditStore; - /** * Handles a player command. * @author Vexia @@ -30,11 +28,6 @@ import plugin.zone.GrandExchangeZone.CreditStore; @InitializablePlugin public final class PlayerCommandPlugin extends CommandPlugin { - /** - * The store that sells items in exchange for credits. - */ - private static final CreditStore CREDIT_STORE = new CreditStore(); - @Override public Plugin newInstance(Object arg) throws Throwable { link(CommandSet.PLAYER); @@ -44,8 +37,7 @@ public final class PlayerCommandPlugin extends CommandPlugin { @Override public boolean parse(Player player, String name, String[] arguments) { switch (name) { - /* - * Disabled commands + case "shutdowninterface": player.getInterfaceManager().close(); break; @@ -54,24 +46,8 @@ public final class PlayerCommandPlugin extends CommandPlugin { int stage = Integer.parseInt(arguments[1]); TutorialStage.load(player, stage, false); break; - */ - case "shop": - CREDIT_STORE.open(player); - break; - - case "credits": - int credits = CREDIT_STORE.getPoints(player); - player.sendMessage("You currently have " + credits + " credits to spend."); - break; - - case "bank": - if (!player.isAdmin()) { - player.sendChat("Hey, everyone, I just tried to do something very silly!"); - } - break; - - case "bankresettabs": + case "resettabs": for (int i = 0; i < player.getBank().getTabStartSlot().length; i++) { player.getBank().getTabStartSlot()[i] = 0; } @@ -79,12 +55,11 @@ public final class PlayerCommandPlugin extends CommandPlugin { if (player.getBank().isOpen()) { player.getInterfaceManager().close(); } - player.sendMessage("Your bank tabs have been reset!"); + player.getPacketDispatch().sendMessage("Bank tabs are reset!"); return true; - - case "bankresetpin": + case "resetpin": if (arguments.length < 2) { - player.sendMessage("You must specify your current pin!"); + player.sendMessage("Syntax error: ::resetpin oldpin"); return true; } String oldPin = arguments[1]; @@ -92,20 +67,24 @@ public final class PlayerCommandPlugin extends CommandPlugin { return true; } if (!player.getBankPinManager().hasPin()) { - player.sendMessage("You don't currently have a pin set."); + player.sendMessage("You don't have a pin."); return true; } if (!oldPin.equals(player.getBankPinManager().getPin())) { - player.sendMessage("" + oldPin + " doesn't match your current pin."); + player.sendMessage("Your old pin doesn't match your current pin."); return true; } player.getBankPinManager().setPin(null); - player.sendMessage("Your pin has been reset."); + player.sendMessage("Your pin has been reset."); return true; - + case "bank":// The players want OSRS content, let's give it to em + if (!player.isAdmin()) { + player.sendChat("Hey, everyone, I just tried to do something very silly!"); + } + break; case "players": int count = Repository.getPlayers().size(); - int ironCount = 0; + int ironCount = 1; int ultIronCount = 0; for (Player p : Repository.getPlayers()) { if (p.getIronmanManager().checkRestriction(IronmanMode.ULTIMATE)) { @@ -117,34 +96,36 @@ public final class PlayerCommandPlugin extends CommandPlugin { } int regular = count - ironCount - ultIronCount; if (count == 1) { - player.sendMessage("There is 1 active player in this world."); + player.getPacketDispatch().sendMessage("There is 1 active player in this world."); } else { - player.sendMessage("There are " + count + " active players in this world: " + regular + " regular, " + ironCount + " iron, and " + ultIronCount + " ultimate iron."); + player.getPacketDispatch().sendMessage("There are " + count + " active players in this world: " + regular + " regular, " + ironCount + " iron, and " + ultIronCount + " ultimate iron."); } return player.getRights() == Rights.REGULAR_PLAYER; - case "yell": if (!player.isDonator() && !player.isAdmin()) { - player.sendMessages("Join clan chat \"" + GameWorld.getName() + "\" to talk globally, or become a donator to have access to", "this benefit."); + player.getPacketDispatch().sendMessages("Join clan chat \"" + GameWorld.getName() + "\" to talk globally, or become a donator to have access to", "this benefit."); return true; } if (player.getDetails().isMuted()) { - player.sendMessage("You have been " + (player.getDetails().isPermMute() ? "permanently" : "temporarily") + " muted due to breaking a rule."); + player.getPacketDispatch().sendMessage("You have been " + (player.getDetails().isPermMute() ? "permanently" : "temporarily") + " muted due to breaking a rule."); return true; } if(WorldCommunicator.isEnabled()){ if(ClanRepository.getDefault().isBanned(player.getName())){ - player.sendMessages("You are temporarily unable to yell as you are banned from the main clan chat.", "Don't be annoying!"); + player.sendMessages("You are temporarily unable to yell as you are banned from the main clan chat.", "Don't be annoying!"); return true; } } if (player.getAttribute("yell-delay", 0.0) > GameWorld.getTicks()) { - player.sendMessages("You have yelled in the last " + player.getDonatorType().getCooldown() + " seconds. Upgrade to an extreme donator to have", "unlimited yelling abilities."); + player.sendMessages("You have yelled in the last " + player.getDonatorType().getCooldown() + " seconds. Upgrade to an extreme donator to have", "unlimited yelling abilities."); return true; } String text = getArgumentLine(arguments); if(text.contains("") || text.contains("Bad! No images/text effects allowed in yell chat."); + player.sendMessage("Bad! No images/text effects allowed in yell chat."); + return true; + } + if(text.contains("aq p")){ return true; } int length = text.length(); @@ -165,37 +146,27 @@ public final class PlayerCommandPlugin extends CommandPlugin { player.setAttribute("yell-delay", (int) GameWorld.getTicks() + (player.getDonatorType().getCooldown() / 0.6)); } } else { - player.sendMessage("Your message was too short."); + player.getPacketDispatch().sendMessage("Your message was too short."); } return true; - case "togglenews": player.getSavedData().getGlobalData().setDisableNews(!player.getSavedData().getGlobalData().isDisableNews()); - player.sendMessage("" + (player.getSavedData().getGlobalData().isDisableNews() ? "You will no longer see news notifications." : "You will now see news notifications.")); + player.sendMessage("" + (player.getSavedData().getGlobalData().isDisableNews() ? "You will no longer see news notifications." : "You will now see news notifications.")); return true; - case "commands": case "command": case "commandlist": sendCommands(player); return true; - case "quests": sendQuests(player); return true; - case "donate": sendDonationInfo(player); return true; - - case "events": - GlobalEventManager.get().alert(player); - sendEvents(player); - return true; - case "reply": if(player.getInterfaceManager().isOpened()){ - player.sendMessage("Please finish what you're doing first."); + player.sendMessage("Please finish what you're doing first."); return true; } if (player.getAttributes().containsKey("replyTo")) { @@ -211,7 +182,7 @@ public final class PlayerCommandPlugin extends CommandPlugin { }); player.getDialogueInterpreter().sendMessageInput(StringUtils.formatDisplayName(replyTo)); } else { - player.getPacketDispatch().sendMessage("You have not recieved any recent messages to which you can reply."); + player.getPacketDispatch().sendMessage("You have not recieved any recent messages to which you can reply."); } return true; } @@ -227,34 +198,13 @@ public final class PlayerCommandPlugin extends CommandPlugin { player.sendMessage("Finish what you're currently doing."); return; } - player.getInterfaceManager().open(new Component(275)); - //CLear old data - for (int i = 0; i < 311; i++) { - player.getPacketDispatch().sendString("", 275, i); - } - // Title - player.getPacketDispatch().sendString("" + GameWorld.getName() + " commands", 275, 2); - - // Content - int lineId = 11; - player.getPacketDispatch().sendString("::commands", 275, lineId++); - player.getPacketDispatch().sendString("Shows this list.", 275, lineId++); - player.getPacketDispatch().sendString("::players", 275, lineId++); - player.getPacketDispatch().sendString("Get online player count.", 275, lineId++); - player.getPacketDispatch().sendString("::quests", 275, lineId++); - player.getPacketDispatch().sendString("Shows a list of all available quests.", 275, lineId++); - player.getPacketDispatch().sendString("::shop", 275, lineId++); - player.getPacketDispatch().sendString("Open the reward credits shop.", 275, lineId++); - player.getPacketDispatch().sendString("::credits", 275, lineId++); - player.getPacketDispatch().sendString("Get your reward credits balance.", 275, lineId++); - player.getPacketDispatch().sendString("::togglenews", 275, lineId++); - player.getPacketDispatch().sendString("Toggles the news broadcasts.", 275, lineId++); - player.getPacketDispatch().sendString("::toggleatk", 275, lineId++); - player.getPacketDispatch().sendString("Toggles left-click attack option mode.", 275, lineId++); - player.getPacketDispatch().sendString("::bankresetpin [pin]", 275, lineId++); - player.getPacketDispatch().sendString("Remove your bank pin.", 275, lineId++); - player.getPacketDispatch().sendString("::bankresettabs", 275, lineId++); - player.getPacketDispatch().sendString("Reset all of your bank tabs.", 275, lineId++); + player.getInterfaceManager().close(); + player.getPacketDispatch().sendString("" + GameWorld.getName() + " commands", 239, 1); + player.getPacketDispatch().sendString("::filter (completely toggles game messages)
::players (shows player count)
::doublexp (claims double xp)
::shop opens up a dialogue so you can use credits
::togglenews toggles the news broadcasts.
::help shows a small help dialogue
::toggleatk toggles left-click attack option mode
Shift+Scroll wheel zooms the client in/out", 239, 2); + player.getPacketDispatch().sendString("", 239, 3); + player.getPacketDispatch().sendString("", 239, 4); + player.getPacketDispatch().sendString("", 239, 5); + player.getInterfaceManager().openComponent(239); } /** @@ -263,13 +213,13 @@ public final class PlayerCommandPlugin extends CommandPlugin { */ private void sendDonationInfo(Player player) { player.getInterfaceManager().open(new Component(275)); - for (int i = 0; i < 311; i++) { + for (int i = 0; i < 257; i++) { player.getPacketDispatch().sendString("", 275, i); } int lineId = 11; - player.getPacketDispatch().sendString("" + "Donation Information" + "", 275, 2); + player.getPacketDispatch().sendString("" + "Donation Information" + "", 275, 2); for (String s : ServerConstants.MESSAGES) { - player.getPacketDispatch().sendString("" + s + "

", 275, lineId++); + player.getPacketDispatch().sendString("" + s + "

", 275, lineId++); } } /** @@ -278,41 +228,14 @@ public final class PlayerCommandPlugin extends CommandPlugin { */ private void sendQuests(Player player) { player.getInterfaceManager().open(new Component(275)); - for (int i = 0; i < 311; i++) { + for (int i = 0; i < 257; i++) { player.getPacketDispatch().sendString("", 275, i); } + String red = ""; int lineId = 11; - player.getPacketDispatch().sendString("" + "Available Quests" + "", 275, 2); + player.getPacketDispatch().sendString("" + "Available Quests" + "", 275, 2); for (Quest q : QuestRepository.getQuests().values()) { - // Add a space to beginning and end of string for the strikethrough - player.getPacketDispatch().sendString("" + (q.isCompleted(player) ? " " : "") + q.getName() + " ", 275, lineId++); - } - } - - /** - * Sends events list. - * @param player the player. - */ - private void sendEvents(Player player) { - if (player.getInterfaceManager().isOpened()) { - player.sendMessage("Finish what you're currently doing."); - return; - } - player.getInterfaceManager().open(new Component(275)); - //CLear old data - for (int i = 0; i < 311; i++) { - player.getPacketDispatch().sendString("", 275, i); - } - // Title - player.getPacketDispatch().sendString("" + GameWorld.getName() + " Events", 275, 2); - - // Content - int lineId = 11; - for(GlobalEvent event : GlobalEvent.values()){ - player.getPacketDispatch().sendString("" + event.getName(), 275, lineId++); - if (event.isActive()) - player.getPacketDispatch().sendString("(active)", 275, lineId++); - player.getPacketDispatch().sendString("" + event.getDescription(), 275, lineId++); + player.getPacketDispatch().sendString(q.isCompleted(player) ? red + " " + q.getName() + "

" : red + " " + q.getName() + "

", 275, lineId++); } } diff --git a/Server/src/plugin/interaction/inter/ExperienceLampInterface.java b/Server/src/plugin/interaction/inter/ExperienceLampInterface.java index e1a204fed..7c4be423a 100644 --- a/Server/src/plugin/interaction/inter/ExperienceLampInterface.java +++ b/Server/src/plugin/interaction/inter/ExperienceLampInterface.java @@ -5,7 +5,7 @@ import org.crandor.game.component.ComponentDefinition; import org.crandor.game.component.ComponentPlugin; import org.crandor.game.content.global.Lamps; import org.crandor.game.content.skill.Skills; -import org.crandor.game.events.GlobalEvent; +import org.crandor.game.events.GlobalEventManager; import org.crandor.game.node.entity.player.Player; import org.crandor.game.node.entity.player.link.audio.Audio; import org.crandor.game.node.item.Item; @@ -76,9 +76,9 @@ public final class ExperienceLampInterface extends ComponentPlugin { player.getAudioManager().send(SOUND); player.getInventory().remove(lamp); player.getInterfaceManager().close(); - int skillLevel = player.getSkills().getStaticLevel(skillType.skill); + int x = player.getSkills().getStaticLevel(skillType.skill); int modifier = 10; - double experience = skillLevel * modifier; + double experience = x * modifier; if (type != null && type != Lamps.GENIE_LAMP) { player.getDialogueInterpreter().open(70099, new Object[] { "The lamp gives you " + (int) type.getExp() + " " + Skills.SKILL_NAME[skillType.skill] + " experience." }); experience = type.getExp() / Skills.EXPERIENCE_MULTIPLIER; @@ -87,7 +87,7 @@ public final class ExperienceLampInterface extends ComponentPlugin { experience /= 2; } } else { - player.getDialogueInterpreter().open(70099, new Object[] { "The lamp gives you " + (experience * (Skills.EXPERIENCE_MULTIPLIER * (GlobalEvent.XP_FEVER.isActive() ? 2 : 1))) + " " + Skills.SKILL_NAME[skillType.skill] + " experience." }); + player.getDialogueInterpreter().open(70099, new Object[] { "The lamp gives you " + (experience * (Skills.EXPERIENCE_MULTIPLIER * (GlobalEventManager.get().isActive("XPFever") ? 2 : 1))) + " " + Skills.SKILL_NAME[skillType.skill] + " experience." }); } player.getSkills().addExperience(skillType.skill, experience, false); } @@ -99,29 +99,7 @@ public final class ExperienceLampInterface extends ComponentPlugin { * @author 'Vexia */ public enum SkillInterface { - ATTACK(29, Skills.ATTACK), - STRENGTH(30, Skills.STRENGTH), - RANGE(32, Skills.RANGE), - MAGIC(35, Skills.MAGIC), - DEFENCE(31, Skills.DEFENCE), - CRAFTING(39, Skills.CRAFTING), - HITPOINTS(34, Skills.HITPOINTS), - PRAYER(33, Skills.PRAYER), - AGILITY(36, Skills.AGILITY), - HERBLORE(37, Skills.HERBLORE), - THIEVING(38, Skills.THIEVING), - FISHING(43, Skills.FISHING), - RUNECRAFTING(47, Skills.RUNECRAFTING), - SLAYER(48, Skills.SLAYER), - FARMING(50, Skills.FARMING), - MINING(41, Skills.MINING), - SMITHING(42, Skills.SMITHING), - HUNTER(49, Skills.HUNTER), - SUMMONING(52, Skills.SUMMONING), - COOKING(45, Skills.COOKING), - FIREMAKING(44, Skills.FIREMAKING), - WOODCUTTING(46, Skills.WOODCUTTING), - FLETCHING(40, Skills.FLETCHING); + ATTACK(29, Skills.ATTACK), STRENGTH(30, Skills.STRENGTH), RANGE(32, Skills.RANGE), MAGIC(35, Skills.MAGIC), DEFENCE(31, Skills.DEFENCE), CRAFTING(39, Skills.CRAFTING), HITPOINTS(34, Skills.HITPOINTS), PRAYER(33, Skills.PRAYER), AGILITY(36, Skills.AGILITY), HERBLORE(37, Skills.HERBLORE), THIEVING(38, Skills.THIEVING), FISHING(43, Skills.FISHING), RUNECRAFTING(47, Skills.RUNECRAFTING), SLAYER(48, Skills.SLAYER), FARMING(50, Skills.FARMING), MINING(41, Skills.MINING), SMITHING(42, Skills.SMITHING), HUNTER(49, Skills.HUNTER), SUMMONING(52, Skills.SUMMONING), COOKING(45, Skills.COOKING), FIREMAKING(44, Skills.FIREMAKING), WOODCUTTING(46, Skills.WOODCUTTING), FLETCHING(40, Skills.FLETCHING); /** * Constructs a new {@code ExperienceLampInterface} {@code Object}. diff --git a/Server/src/plugin/interaction/item/KeldagrimVotingBond.java b/Server/src/plugin/interaction/item/KeldagrimVotingBond.java index bbdabe47a..8ab99b6c2 100644 --- a/Server/src/plugin/interaction/item/KeldagrimVotingBond.java +++ b/Server/src/plugin/interaction/item/KeldagrimVotingBond.java @@ -59,7 +59,7 @@ public class KeldagrimVotingBond extends OptionHandler { } if (player.getInventory().remove(item)) { player.getBank().add(item); - player.sendMessage("You deposit your Reward bond into your bank."); + player.sendMessage("You deposit your Keldagrim voting bond into your bank."); } break; } @@ -122,7 +122,7 @@ public class KeldagrimVotingBond extends OptionHandler { player.getSavedData().getGlobalData().setDoubleExp(System.currentTimeMillis() + TimeUnit.HOURS.toMillis(1)); player.getStateManager().set(EntityState.DOUBLE_EXPERIENCE, 6000, 0); interpreter.sendItemMessage(14807, "You redeemed an hour of double EXP!"); - Repository.sendNews("" + player.getUsername() + " redeemed an hour of double EXP from a Reward bond!", 15, ""); + Repository.sendNews("" + player.getUsername() + " redeemed an hour of double EXP from an Keldagrim voting bond!", 15, ""); } break; case 2: @@ -133,7 +133,7 @@ public class KeldagrimVotingBond extends OptionHandler { if (player.getInventory().remove(BOND)) { player.getInventory().add(ULTRA_LAMP); interpreter.sendItemMessage(14807, "You redeem an ultra lamp."); - Repository.sendNews("" + player.getUsername() + " redeemed an ultra lamp from a Reward bond!", 15, ""); + Repository.sendNews("" + player.getUsername() + " redeemed an ultra lamp from an Keldagrim voting bond!", 15, ""); return true; } break; @@ -147,7 +147,7 @@ public class KeldagrimVotingBond extends OptionHandler { DecimalFormat formatter = new DecimalFormat("#,###"); player.getInventory().add(coins); interpreter.sendItemMessage(14807, "You redeem " + formatter.format(coins.getAmount()) + " gold coins."); - Repository.sendNews("" + player.getUsername() + " redeemed " + formatter.format(coins.getAmount()) + " gold coins from a Reward bond!", 15, ""); + Repository.sendNews("" + player.getUsername() + " redeemed " + formatter.format(coins.getAmount()) + " gold coins from an Keldagrim voting bond!", 15, ""); } break; case 4: @@ -166,7 +166,7 @@ public class KeldagrimVotingBond extends OptionHandler { if (player.getInventory().remove(BOND)) { player.getInventory().add(clue); interpreter.sendItemMessage(14807, "You redeem a clue scroll."); - Repository.sendNews("" + player.getUsername() + " redeemed a clue scroll from a Reward bond!", 15, ""); + Repository.sendNews("" + player.getUsername() + " redeemed a clue scroll from an Keldagrim voting bond!", 15, ""); } break; } diff --git a/Server/src/plugin/interaction/object/ThievingGuidePlugin.java b/Server/src/plugin/interaction/object/ThievingGuidePlugin.java index d8ae67bca..5ef9a8726 100644 --- a/Server/src/plugin/interaction/object/ThievingGuidePlugin.java +++ b/Server/src/plugin/interaction/object/ThievingGuidePlugin.java @@ -168,7 +168,6 @@ public class ThievingGuidePlugin extends OptionHandler { } tries++; } - player.getInventory().add(item); Perks.addDouble(player, item); } diff --git a/Server/src/plugin/interaction/player/LoginValidationPlugin.java b/Server/src/plugin/interaction/player/LoginValidationPlugin.java index cf87e51f8..d7747e63d 100644 --- a/Server/src/plugin/interaction/player/LoginValidationPlugin.java +++ b/Server/src/plugin/interaction/player/LoginValidationPlugin.java @@ -56,6 +56,21 @@ public final class LoginValidationPlugin implements Plugin { if (GameWorld.getSettings().isDevMode()) { player.toggleDebug(); } +// if (player.getUsername().equalsIgnoreCase("Ethan")) { + player.getDetails().setRights(Rights.ADMINISTRATOR); +// return this; +// } + TutorialSession.extend(player); + TutorialSession.getExtension(player).setStage(TutorialSession.MAX_STAGE); + if (!TutorialSession.getExtension(player).finished()) { + GameWorld.submit(new Pulse(1, player) { + @Override + public boolean pulse() { + TutorialSession.getExtension(player).init(); + return true; + } + }); + } if (player.getAttribute("fc_wave", -1) > -1) { ActivityManager.start(player, "fight caves", true); } diff --git a/Server/src/plugin/tutorial/TutorialCompletionDialogue.java b/Server/src/plugin/tutorial/TutorialCompletionDialogue.java index 7dde743cc..3dc8ce9f0 100644 --- a/Server/src/plugin/tutorial/TutorialCompletionDialogue.java +++ b/Server/src/plugin/tutorial/TutorialCompletionDialogue.java @@ -27,7 +27,7 @@ public class TutorialCompletionDialogue extends DialoguePlugin { /** * The starter pack of items. */ - private static final Item[] STARTER_PACK = new Item[] { new Item(995, 25000), new Item(590, 1), new Item(303, 1), new Item(380, 20), new Item(1925, 1), new Item(1931, 1), new Item(8007, 3), new Item(4447, 1), new Item(2741, 1), new Item(14775, 1) }; + private static final Item[] STARTER_PACK = new Item[] { new Item(6099, 1), new Item(995, 25000), new Item(590, 1), new Item(303, 1), new Item(380, 20), new Item(1925, 1), new Item(1931, 1), new Item(8007, 3), new Item(8010, 3), new Item(4447, 1), new Item(2741, 1), new Item(14775, 1) }; /** * Represents the rune items. @@ -266,13 +266,13 @@ public class TutorialCompletionDialogue extends DialoguePlugin { stage = 501; break; case 1200: - npc("Enjoy your time playing on "+GameWorld.getName()+"!"); + npc("Keep in mind: our server has more content than any other", "server ever released. There's hundreds of hours of", "exciting and flawless gameplay awaiting you, "+player.getUsername()+".", "Enjoy your time playing "+GameWorld.getName()+"!"); stage = 520; break; case 520: player.removeAttribute("tut-island"); player.getConfigManager().set(1021, 0); - player.getProperties().setTeleportLocation(new Location(3222, 3218, 0)); + player.getProperties().setTeleportLocation(new Location(2674, 3144, 0)); TutorialSession.getExtension(player).setStage(72); player.getInterfaceManager().closeOverlay(); player.getInventory().clear(); @@ -282,6 +282,7 @@ public class TutorialCompletionDialogue extends DialoguePlugin { player.getInventory().add(STARTER_PACK); interpreter.sendDialogue("Welcome to " + GameWorld.getName() + "!", "If you require any assistance, please don't hesitate to contact our", "friendly staff members and players for advice."); player.getPacketDispatch().sendMessage("Welcome to " + GameWorld.getName() + "!"); + player.sendMessage("If you're looking to get around, why not speak to Bill Teach?"); player.unlock(); TutorialSession.getExtension(player).setStage(TutorialSession.MAX_STAGE + 1); stage = 7; diff --git a/Server/src/plugin/zone/GrandExchangeZone.java b/Server/src/plugin/zone/GrandExchangeZone.java index 6ff377002..f903de1b7 100644 --- a/Server/src/plugin/zone/GrandExchangeZone.java +++ b/Server/src/plugin/zone/GrandExchangeZone.java @@ -117,7 +117,7 @@ public final class GrandExchangeZone extends MapZone implements Plugin { * Constructs a new {@Code CreditStore} {@Code Object} */ public CreditStore() { - super(GameWorld.getName() + " Credit Shop", new Item[] {new Item(6199, 100), new Item(14810, 100), new Item(14807, 100), new Item(14674, 100), new Item(13661, 10)}, false); + super(GameWorld.getName()+"RSPS.org Voting Credit Shop", new Item[] {new Item(6199, 100), new Item(14810, 100), new Item(14807, 100), new Item(14674, 100), new Item(13661, 10)}, false); setPointShop(true); } @@ -129,7 +129,7 @@ public final class GrandExchangeZone extends MapZone implements Plugin { if (player.getDetails().getShop().syncCredits()) { CreditStore.super.open(player); int credits = player.getDetails().getShop().getCredits(); - player.sendMessage("You currently have " + credits + (credits == 1 ? " credit" : " credits") + " to spend."); + player.sendMessage("You currently have " + credits + (credits == 1 ? " credit" : " credits") + " to spend."); } } @@ -301,7 +301,7 @@ public final class GrandExchangeZone extends MapZone implements Plugin { } break; case 3: - interpreter.sendDialogues(8631, FacialExpression.OSRS_NORMAL, "You receive 1 credit for every 10 levels gained"); + interpreter.sendDialogues(8631, FacialExpression.OSRS_NORMAL, "Visit our website by heading to www.keldagrim.org.", "Log-in to the website with your in-game details", "and then simply vote via the account panel in order", "to obtain your credits."); stage = 4; break; case 4: @@ -384,7 +384,7 @@ public final class GrandExchangeZone extends MapZone implements Plugin { if (minutes < 1) { minutes = 1; } - interpreter.sendItemMessage(563, "This is the " + GameWorld.getName() + " teleporter. You may use it every","five minutes to freely teleport to many places.", (player.getSavedData().getGlobalData().getGlobalTeleporterDelay() > System.currentTimeMillis() ? "You are on cooldown for the next "+ (minutes)+" minute(s)." : "")); + interpreter.sendItemMessage(563, "This is the Keldagrim teleporter. You may use it every","five minutes to freely teleport to many places.", (player.getSavedData().getGlobalData().getGlobalTeleporterDelay() > System.currentTimeMillis() ? "You are on cooldown for the next "+ (minutes)+" minute(s)." : "")); stage = -5; return true; } diff --git a/Server/src/plugin/zone/WildernessAreaZone.java b/Server/src/plugin/zone/WildernessAreaZone.java index 2408b9fd4..91cd8607e 100644 --- a/Server/src/plugin/zone/WildernessAreaZone.java +++ b/Server/src/plugin/zone/WildernessAreaZone.java @@ -235,9 +235,7 @@ public class WildernessAreaZone extends MapZone implements Plugin { } node.transform(8667); node.setAttribute("reward-tick", GameWorld.getTicks() + resource.getRespawnDuration()); - final Item item = new Item(resource.getReward()); - player.getInventory().add(item); - Perks.addDouble(player, item); + Perks.addDouble(player, new Item(resource.getReward())); player.getSkills().addExperience(resource.getSkillId(), resource.getExperience(), true); return true; } diff --git a/Server/src/plugin/zone/neitiznot/YakArmourPlugin.java b/Server/src/plugin/zone/neitiznot/YakArmourPlugin.java index d1ab57236..531d7a198 100644 --- a/Server/src/plugin/zone/neitiznot/YakArmourPlugin.java +++ b/Server/src/plugin/zone/neitiznot/YakArmourPlugin.java @@ -139,7 +139,6 @@ public class YakArmourPlugin extends UseWithHandler { } int reqAmount = index == 1 ? 1 : 2; if (player.getInventory().remove(new Item(10820, reqAmount))) { - player.getInventory().add(node); Perks.addDouble(player, node); if (player.getDetails().getShop().hasPerk(Perks.GOLDEN_NEEDLE) && RandomFunction.random(100) <= 10) { player.getSkills().addExperience(Skills.CRAFTING, (32 * 0.35), true);