From 14b3ff0a4b310a354bc53ff124b43df9a01e9995 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Thu, 19 Sep 2019 21:52:05 +1200 Subject: [PATCH 01/83] Update Client name --- 09HDscape-client/src/org/runite/GameLaunch.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/09HDscape-client/src/org/runite/GameLaunch.java b/09HDscape-client/src/org/runite/GameLaunch.java index b93c0f0af..bd93b73e4 100644 --- a/09HDscape-client/src/org/runite/GameLaunch.java +++ b/09HDscape-client/src/org/runite/GameLaunch.java @@ -12,7 +12,7 @@ public class GameLaunch { /** * The game settings. */ - public static GameSetting SETTINGS = new GameSetting("Fat Cunt", Configurations.LOCAL_SERVER ? "127.0.0.1" : "frostblades.org", 1, "live", false, false); + public static GameSetting SETTINGS = new GameSetting("RuneScape", Configurations.LOCAL_SERVER ? "127.0.0.1" : "localhost", 1, "live", false, false); /** * The main method. From 03827f7ae2b9e9fc15987b29cc9b9cdee25e7d70 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Thu, 19 Sep 2019 21:54:16 +1200 Subject: [PATCH 02/83] Fix startup scripts --- 09HDscape-server/Crandor Server - 530 - World 1.bat | 2 +- 09HDscape-server/Crandor Server - 530 - World 2.bat | 4 ++-- 09HDscape-server/Crandor Server - 530 - World 3.bat | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/09HDscape-server/Crandor Server - 530 - World 1.bat b/09HDscape-server/Crandor Server - 530 - World 1.bat index 1457ba8f0..c07f0a926 100644 --- a/09HDscape-server/Crandor Server - 530 - World 1.bat +++ b/09HDscape-server/Crandor Server - 530 - World 1.bat @@ -1,4 +1,4 @@ @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.keldagrim.Main server1.properties +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 index 7ccd6f161..cf5814e6f 100644 --- a/09HDscape-server/Crandor Server - 530 - World 2.bat +++ b/09HDscape-server/Crandor Server - 530 - World 2.bat @@ -1,4 +1,4 @@ @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.keldagrim.Main server2.properties -pause \ No newline at end of file +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 index a5831e864..ba7ae6d7f 100644 --- a/09HDscape-server/Crandor Server - 530 - World 3.bat +++ b/09HDscape-server/Crandor Server - 530 - World 3.bat @@ -1,4 +1,4 @@ @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.keldagrim.Main server3.properties -pause \ No newline at end of file +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 From 4761f894ccb3925dc33411d6f940fe926a0a5e56 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Thu, 19 Sep 2019 22:26:48 +1200 Subject: [PATCH 03/83] minor changes --- 09HDscape-server/server1.properties | 4 ++-- 09HDscape-server/src/org/crandor/ServerConstants.java | 11 +++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/09HDscape-server/server1.properties b/09HDscape-server/server1.properties index 46b3bb091..f9017bafa 100644 --- a/09HDscape-server/server1.properties +++ b/09HDscape-server/server1.properties @@ -1,4 +1,4 @@ -name=Crandor +name=Sparr0w beta=true sql=true devMode=false @@ -11,4 +11,4 @@ members=true pvp=false quickChat=true lootshare=true -msip=127.0.0.1 \ No newline at end of file +msip=127.0.0.1 diff --git a/09HDscape-server/src/org/crandor/ServerConstants.java b/09HDscape-server/src/org/crandor/ServerConstants.java index 5c0cc854d..f77acb77d 100644 --- a/09HDscape-server/src/org/crandor/ServerConstants.java +++ b/09HDscape-server/src/org/crandor/ServerConstants.java @@ -16,8 +16,7 @@ public final class ServerConstants { * The administrators. */ public static final String[] ADMINISTRATORS = { - "ethan", - "austin", + "RedSparr0w", }; /** @@ -68,15 +67,15 @@ public final class ServerConstants { /** * The string of donation messages displayed on an interface. */ - public static final String[] MESSAGES = new String[] {"Donations on Keldagrim are different than those elsewhere.", "Here we use a perk system.", "There are many different type of perks that can be bought to", "speed up efficiency, but nothing game breaking. By doing this", "we provide players with ways to support Keldagrim, in a manner" , "that doesn't ruin the economy or provide substantial advantages.", "If you would like to check out our perks please visit", "keldagrim.com/donate/." }; + public static final String[] MESSAGES = new String[] {"Welcome!" }; public static final String[] DATABASE_NAMES = { - "keldagr1_server", "keldagr1_global" + "server", "global" }; public static final Database[] DATABASES = { - new Database((SQLManager.LOCAL ? "localhost" : "keldagrim.org"), (SQLManager.LOCAL ? "server" : DATABASE_NAMES[0]), (SQLManager.LOCAL ? "root" : "keldagr1_user"), (SQLManager.LOCAL ? "" : "2jf4wkz$")), - new Database((SQLManager.LOCAL ? "localhost" : "keldagrim.org"), (SQLManager.LOCAL ? "global" : DATABASE_NAMES[1]), (SQLManager.LOCAL ? "root" : "keldagr1_user"), (SQLManager.LOCAL ? "" : "2jf4wkz$")) + 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")) }; /** From c5d4e3d2ff73c46872bebe4cf9e558f28e518393 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Fri, 20 Sep 2019 09:58:43 +1200 Subject: [PATCH 04/83] update default server properties --- 09HDscape-server/server.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/09HDscape-server/server.properties b/09HDscape-server/server.properties index a5d7e3d71..fe8df5372 100644 --- a/09HDscape-server/server.properties +++ b/09HDscape-server/server.properties @@ -1,5 +1,5 @@ -name=Crandor beta=false +name=Sparr0w sql=true devMode=true gui=true @@ -11,4 +11,4 @@ members=true pvp=false quickChat=true lootshare=true -msip=127.0.0.1 \ No newline at end of file +msip=127.0.0.1 From 9ce9ef962a3d966176f5bc7f4f4d9e47c5314aed Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Fri, 20 Sep 2019 10:02:46 +1200 Subject: [PATCH 05/83] Start on tutorial island, Set lumbridge as home spawn --- 09HDscape-server/src/org/crandor/ServerConstants.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/09HDscape-server/src/org/crandor/ServerConstants.java b/09HDscape-server/src/org/crandor/ServerConstants.java index f77acb77d..78fd4fdbf 100644 --- a/09HDscape-server/src/org/crandor/ServerConstants.java +++ b/09HDscape-server/src/org/crandor/ServerConstants.java @@ -47,12 +47,12 @@ public final class ServerConstants { /** * The start location for a fresh account. */ - public static final Location START_LOCATION = Location.create(3088, 3491, 0); + public static final Location START_LOCATION = Location.create(3094, 3107, 0); /** * The main home teleport location. */ - public static final Location HOME_LOCATION = Location.create(3088, 3491, 0); + public static final Location HOME_LOCATION = Location.create(3222, 3218, 0); /** * The teleport destinations. From 9031d433931c250c630c7c5948a78a46d5ddbb61 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Fri, 20 Sep 2019 10:03:09 +1200 Subject: [PATCH 06/83] Update tutorial finish message --- .../src/plugin/tutorial/TutorialCompletionDialogue.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/09HDscape-server/src/plugin/tutorial/TutorialCompletionDialogue.java b/09HDscape-server/src/plugin/tutorial/TutorialCompletionDialogue.java index 3dc8ce9f0..de001475d 100644 --- a/09HDscape-server/src/plugin/tutorial/TutorialCompletionDialogue.java +++ b/09HDscape-server/src/plugin/tutorial/TutorialCompletionDialogue.java @@ -266,7 +266,7 @@ public class TutorialCompletionDialogue extends DialoguePlugin { stage = 501; break; case 1200: - 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()+"!"); + npc("Enjoy your time playing on "+GameWorld.getName()+"!"); stage = 520; break; case 520: From c99b0e74a59547c40902dc5946255c73aee876d2 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Fri, 20 Sep 2019 10:03:21 +1200 Subject: [PATCH 07/83] Tele player to lumbridge after tutorial --- .../src/plugin/tutorial/TutorialCompletionDialogue.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/09HDscape-server/src/plugin/tutorial/TutorialCompletionDialogue.java b/09HDscape-server/src/plugin/tutorial/TutorialCompletionDialogue.java index de001475d..471969bdc 100644 --- a/09HDscape-server/src/plugin/tutorial/TutorialCompletionDialogue.java +++ b/09HDscape-server/src/plugin/tutorial/TutorialCompletionDialogue.java @@ -272,7 +272,7 @@ public class TutorialCompletionDialogue extends DialoguePlugin { case 520: player.removeAttribute("tut-island"); player.getConfigManager().set(1021, 0); - player.getProperties().setTeleportLocation(new Location(2674, 3144, 0)); + player.getProperties().setTeleportLocation(new Location(3222, 3218, 0)); TutorialSession.getExtension(player).setStage(72); player.getInterfaceManager().closeOverlay(); player.getInventory().clear(); From def59d2aab730678cbdb66bd53323578f316e8df Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Fri, 20 Sep 2019 10:03:28 +1200 Subject: [PATCH 08/83] remove message --- .../src/plugin/tutorial/TutorialCompletionDialogue.java | 1 - 1 file changed, 1 deletion(-) diff --git a/09HDscape-server/src/plugin/tutorial/TutorialCompletionDialogue.java b/09HDscape-server/src/plugin/tutorial/TutorialCompletionDialogue.java index 471969bdc..50e792762 100644 --- a/09HDscape-server/src/plugin/tutorial/TutorialCompletionDialogue.java +++ b/09HDscape-server/src/plugin/tutorial/TutorialCompletionDialogue.java @@ -282,7 +282,6 @@ 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; From 6603676dffedc39a6e05c3668fe15ec28c295934 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Fri, 20 Sep 2019 10:03:56 +1200 Subject: [PATCH 09/83] Remove camelot teleport tablets, remove teleport stone item. --- .../src/plugin/tutorial/TutorialCompletionDialogue.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/09HDscape-server/src/plugin/tutorial/TutorialCompletionDialogue.java b/09HDscape-server/src/plugin/tutorial/TutorialCompletionDialogue.java index 50e792762..7dde743cc 100644 --- a/09HDscape-server/src/plugin/tutorial/TutorialCompletionDialogue.java +++ b/09HDscape-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(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) }; + 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) }; /** * Represents the rune items. From e8bf4545cbe91ae6526ae58f04407151b046bda5 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Fri, 20 Sep 2019 11:40:22 +1200 Subject: [PATCH 10/83] remove item command from dev --- .../src/plugin/command/DeveloperCommandPlugin.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/09HDscape-server/src/plugin/command/DeveloperCommandPlugin.java b/09HDscape-server/src/plugin/command/DeveloperCommandPlugin.java index 4ff8ca831..28eed47fc 100644 --- a/09HDscape-server/src/plugin/command/DeveloperCommandPlugin.java +++ b/09HDscape-server/src/plugin/command/DeveloperCommandPlugin.java @@ -157,10 +157,6 @@ 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; From a3431d7ff52c367decdfbecfdf9f15effe59838a Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Fri, 20 Sep 2019 11:40:28 +1200 Subject: [PATCH 11/83] fixup type --- 09HDscape-server/src/plugin/command/DeveloperCommandPlugin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/09HDscape-server/src/plugin/command/DeveloperCommandPlugin.java b/09HDscape-server/src/plugin/command/DeveloperCommandPlugin.java index 28eed47fc..843e9a3c8 100644 --- a/09HDscape-server/src/plugin/command/DeveloperCommandPlugin.java +++ b/09HDscape-server/src/plugin/command/DeveloperCommandPlugin.java @@ -467,7 +467,7 @@ public final class DeveloperCommandPlugin extends CommandPlugin { return true; case "special": case "spec": - amount = args.length > 1 ? Integer.parseInt(args[1]) : 100; + int amount = args.length > 1 ? Integer.parseInt(args[1]) : 100; player.getSettings().setSpecialEnergy(amount); return true; case "god": From 802c825c212a1615c849e29e15f0e657768f1f07 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Fri, 20 Sep 2019 11:40:57 +1200 Subject: [PATCH 12/83] format teleport locations --- .../src/org/crandor/ServerConstants.java | 87 ++++++++++++++++++- 1 file changed, 85 insertions(+), 2 deletions(-) diff --git a/09HDscape-server/src/org/crandor/ServerConstants.java b/09HDscape-server/src/org/crandor/ServerConstants.java index 78fd4fdbf..f9e75b77d 100644 --- a/09HDscape-server/src/org/crandor/ServerConstants.java +++ b/09HDscape-server/src/org/crandor/ServerConstants.java @@ -57,12 +57,95 @@ public final class ServerConstants { /** * 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" } }; + 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" } }; + 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. From fb4ebf8e27b0d607bfc47015be41cad4b67ab939 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Fri, 20 Sep 2019 11:41:24 +1200 Subject: [PATCH 13/83] rename data -> destinations (duplicate var) --- .../src/plugin/command/BetaCommandPlugin.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/09HDscape-server/src/plugin/command/BetaCommandPlugin.java b/09HDscape-server/src/plugin/command/BetaCommandPlugin.java index fd998e368..5c4e9776a 100644 --- a/09HDscape-server/src/plugin/command/BetaCommandPlugin.java +++ b/09HDscape-server/src/plugin/command/BetaCommandPlugin.java @@ -322,10 +322,10 @@ public final class BetaCommandPlugin extends CommandPlugin { } Location destination = null; String place = getArgumentLine(args); - for (Object[] data : ServerConstants.TELEPORT_DESTINATIONS) { - for (int i = 1; i < data.length; i++) { - if (place.equals(data[i])) { - destination = (Location) data[0]; + for (Object[] destinations : ServerConstants.TELEPORT_DESTINATIONS) { + for (int i = 1; i < destinations.length; i++) { + if (place.equals(destinations[i])) { + destination = (Location) destinations[0]; break; } } From b07344aa7ceda9ac2ca20176d12bce43a7432867 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Fri, 20 Sep 2019 13:13:51 +1200 Subject: [PATCH 14/83] rearrange item, itemn, update functions, add comments --- .../src/plugin/command/BetaCommandPlugin.java | 68 +++++++++---------- 1 file changed, 33 insertions(+), 35 deletions(-) diff --git a/09HDscape-server/src/plugin/command/BetaCommandPlugin.java b/09HDscape-server/src/plugin/command/BetaCommandPlugin.java index 5c4e9776a..1decedcf8 100644 --- a/09HDscape-server/src/plugin/command/BetaCommandPlugin.java +++ b/09HDscape-server/src/plugin/command/BetaCommandPlugin.java @@ -147,24 +147,6 @@ public final class BetaCommandPlugin extends CommandPlugin { case "empty": player.getInventory().clear(); return true; - case "itemn": - if (args.length < 2) { - player.debug("syntax error: item-name (optional) amount"); - return true; - } - 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": if (args.length < 2) { @@ -191,6 +173,7 @@ public final class BetaCommandPlugin extends CommandPlugin { } } return true; + case "setvalue": int itemId = toInteger(args[1]); int value = toInteger(args[2]); @@ -204,26 +187,16 @@ public final class BetaCommandPlugin extends CommandPlugin { 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); @@ -234,6 +207,31 @@ 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; From 9431d257867e86a7a7cc0d21e63d9c0f3e17ef27 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Fri, 20 Sep 2019 15:44:05 +1200 Subject: [PATCH 15/83] remove, not needed --- .../src/org/keldagrim/net/packet/WorldPacketRepository.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/09HDscape-management-server/src/org/keldagrim/net/packet/WorldPacketRepository.java b/09HDscape-management-server/src/org/keldagrim/net/packet/WorldPacketRepository.java index f038701a7..aad8a9b4d 100644 --- a/09HDscape-management-server/src/org/keldagrim/net/packet/WorldPacketRepository.java +++ b/09HDscape-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 = server.getInfo().getRevision() == 498 ? 0 : buffer.getInt(); - int chatIcon = server.getInfo().getRevision() == 498 ? 0 : buffer.get(); + int rights = buffer.getInt(); + int chatIcon = 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)) { From 3cf86da51cb9767960cc2ebf3985eb7267b2394c Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Fri, 20 Sep 2019 15:44:35 +1200 Subject: [PATCH 16/83] rearrange commands --- .../src/plugin/command/BetaCommandPlugin.java | 60 ++++++++++--------- 1 file changed, 31 insertions(+), 29 deletions(-) diff --git a/09HDscape-server/src/plugin/command/BetaCommandPlugin.java b/09HDscape-server/src/plugin/command/BetaCommandPlugin.java index 1decedcf8..01cea0355 100644 --- a/09HDscape-server/src/plugin/command/BetaCommandPlugin.java +++ b/09HDscape-server/src/plugin/command/BetaCommandPlugin.java @@ -78,6 +78,7 @@ public final class BetaCommandPlugin extends CommandPlugin { quest.finish(player); } return true; + case "pos": case "position": case "loc": @@ -94,22 +95,6 @@ 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; @@ -148,6 +133,36 @@ public final class BetaCommandPlugin extends CommandPlugin { 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": + 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 "npcn": if (args.length < 2) { player.debug("syntax error: npc-name (optional) amount"); @@ -173,19 +188,6 @@ 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": From 0a5ef421a5da702184ee69ce6ec8aeee7b0a0399 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Fri, 20 Sep 2019 16:53:14 +1200 Subject: [PATCH 17/83] tidy up formatting --- 09HDscape-server/src/plugin/command/BetaCommandPlugin.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/09HDscape-server/src/plugin/command/BetaCommandPlugin.java b/09HDscape-server/src/plugin/command/BetaCommandPlugin.java index 01cea0355..ce9a80744 100644 --- a/09HDscape-server/src/plugin/command/BetaCommandPlugin.java +++ b/09HDscape-server/src/plugin/command/BetaCommandPlugin.java @@ -73,6 +73,7 @@ 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); @@ -98,6 +99,7 @@ public final class BetaCommandPlugin extends CommandPlugin { case "dz": DonatorZone.getInstance().invite(player, null); return true; + case "setquest": case "setoquest": if (args.length < 2) { @@ -129,6 +131,7 @@ 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; From 3090c3840d870dde1d0fb752c7878b05c088bd41 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Fri, 20 Sep 2019 22:16:06 +1200 Subject: [PATCH 18/83] Do not auto set 'tut-island' attribute on login --- .../game/node/entity/player/info/login/LoginConfiguration.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/09HDscape-server/src/org/crandor/game/node/entity/player/info/login/LoginConfiguration.java b/09HDscape-server/src/org/crandor/game/node/entity/player/info/login/LoginConfiguration.java index ea35fa608..3e25f5cd0 100644 --- a/09HDscape-server/src/org/crandor/game/node/entity/player/info/login/LoginConfiguration.java +++ b/09HDscape-server/src/org/crandor/game/node/entity/player/info/login/LoginConfiguration.java @@ -126,8 +126,6 @@ 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(); From 4a20b0ae1ed8bdfb553d709a4c51bcce99c38eab Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Fri, 20 Sep 2019 22:18:47 +1200 Subject: [PATCH 19/83] remove Keldagrim references --- .../node/entity/player/info/login/LoginConfiguration.java | 4 ++-- .../game/node/entity/player/info/login/PlayerParser.java | 4 ++-- 09HDscape-server/src/org/crandor/gui/tab/PlayerTab.java | 4 ++-- .../src/org/crandor/net/packet/in/ReportAbusePacket.java | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/09HDscape-server/src/org/crandor/game/node/entity/player/info/login/LoginConfiguration.java b/09HDscape-server/src/org/crandor/game/node/entity/player/info/login/LoginConfiguration.java index 3e25f5cd0..499ec0d5a 100644 --- a/09HDscape-server/src/org/crandor/game/node/entity/player/info/login/LoginConfiguration.java +++ b/09HDscape-server/src/org/crandor/game/node/entity/player/info/login/LoginConfiguration.java @@ -91,7 +91,7 @@ public final class LoginConfiguration { 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() + " Keldagrim credits", 378, 94); + player.getPacketDispatch().sendString(player.getDetails().getShop().getCredits() + " 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); @@ -163,7 +163,7 @@ public final class LoginConfiguration { } 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 Keldagrim Guide for game information."); + Repository.sendNews("As a new player, you are receiving boosted combat skill experience.", "In addition, you may speak to the Guide for game information."); } player.setAttribute("startTime", System.currentTimeMillis()); // ResourceAIPManager.get().load(player); diff --git a/09HDscape-server/src/org/crandor/game/node/entity/player/info/login/PlayerParser.java b/09HDscape-server/src/org/crandor/game/node/entity/player/info/login/PlayerParser.java index 254cf3256..9ce2799ed 100644 --- a/09HDscape-server/src/org/crandor/game/node/entity/player/info/login/PlayerParser.java +++ b/09HDscape-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() + ".keldagrim")); + final File file = new File(("data/players/" + player.getName() + ".save")); 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() + ".keldagrim"); + File file = new File(directory + "players/" + player.getName() + ".save"); try (RandomAccessFile raf = new RandomAccessFile(file, "rw"); FileChannel channel = raf.getChannel()) { channel.write(buffer); raf.close(); diff --git a/09HDscape-server/src/org/crandor/gui/tab/PlayerTab.java b/09HDscape-server/src/org/crandor/gui/tab/PlayerTab.java index 7091adf0d..3dc14d22b 100644 --- a/09HDscape-server/src/org/crandor/gui/tab/PlayerTab.java +++ b/09HDscape-server/src/org/crandor/gui/tab/PlayerTab.java @@ -151,8 +151,8 @@ public class PlayerTab extends ConsoleTab { } System.out.println(getPlayerNames().toString()); for (File file : Objects.requireNonNull(f.listFiles())) { - playerNames.add(file.getName().replace(".keldagrim", "").trim()); - model.addElement(file.getName().replace(".keldagrim", "").trim()); + playerNames.add(file.getName().replace(".save", "").trim()); + model.addElement(file.getName().replace(".save", "").trim()); } } diff --git a/09HDscape-server/src/org/crandor/net/packet/in/ReportAbusePacket.java b/09HDscape-server/src/org/crandor/net/packet/in/ReportAbusePacket.java index 696e14d42..75d778aee 100644 --- a/09HDscape-server/src/org/crandor/net/packet/in/ReportAbusePacket.java +++ b/09HDscape-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 + ".keldagrim"); + File file = new File(ServerConstants.PLAYER_SAVE_PATH + target + ".save"); if (!file.exists()) { player.getPacketDispatch().sendMessage("Invalid player name."); return; From 80a5f8b61a2afe50ce3bbb352bfbda557c02bdac Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Sat, 21 Sep 2019 00:07:27 +1200 Subject: [PATCH 20/83] Don't auto admin everyone --- .../player/info/login/LoginConfiguration.java | 2 -- .../interaction/player/LoginValidationPlugin.java | 15 --------------- 2 files changed, 17 deletions(-) diff --git a/09HDscape-server/src/org/crandor/game/node/entity/player/info/login/LoginConfiguration.java b/09HDscape-server/src/org/crandor/game/node/entity/player/info/login/LoginConfiguration.java index 499ec0d5a..4b88e12b8 100644 --- a/09HDscape-server/src/org/crandor/game/node/entity/player/info/login/LoginConfiguration.java +++ b/09HDscape-server/src/org/crandor/game/node/entity/player/info/login/LoginConfiguration.java @@ -84,8 +84,6 @@ 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); diff --git a/09HDscape-server/src/plugin/interaction/player/LoginValidationPlugin.java b/09HDscape-server/src/plugin/interaction/player/LoginValidationPlugin.java index d7747e63d..cf87e51f8 100644 --- a/09HDscape-server/src/plugin/interaction/player/LoginValidationPlugin.java +++ b/09HDscape-server/src/plugin/interaction/player/LoginValidationPlugin.java @@ -56,21 +56,6 @@ 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); } From 554bb9b8eb02dc9589c7b3ef955525a01ef70fa2 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Sat, 21 Sep 2019 00:20:52 +1200 Subject: [PATCH 21/83] Don't limit drops, unless non tradable --- .../crandor/game/content/global/action/DropItemHandler.java | 6 ++---- .../src/org/crandor/game/node/item/GroundItemManager.java | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/09HDscape-server/src/org/crandor/game/content/global/action/DropItemHandler.java b/09HDscape-server/src/org/crandor/game/content/global/action/DropItemHandler.java index 54083597f..bcc95f29c 100644 --- a/09HDscape-server/src/org/crandor/game/content/global/action/DropItemHandler.java +++ b/09HDscape-server/src/org/crandor/game/content/global/action/DropItemHandler.java @@ -50,10 +50,8 @@ 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)); - if (!player.getDetails().getRights().equals(Rights.ADMINISTRATOR) || !player.getAttribute("tut-island", false)) { - GroundItemManager.create(item, player.getLocation(), player); - PlayerParser.dump(player); - } + GroundItemManager.create(item, player.getLocation(), player); + PlayerParser.dump(player); } else { GroundItemManager.create(item, player.getLocation(), player).setDecayTime(99); PlayerParser.dump(player); diff --git a/09HDscape-server/src/org/crandor/game/node/item/GroundItemManager.java b/09HDscape-server/src/org/crandor/game/node/item/GroundItemManager.java index 33e938889..9dcf6aa94 100644 --- a/09HDscape-server/src/org/crandor/game/node/item/GroundItemManager.java +++ b/09HDscape-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() || (item.getDropper() != null && item.getDropper().getDetails().getRights() == Rights.ADMINISTRATOR)) { + if (!item.getDefinition().isTradeable()) { item.setRemainPrivate(true); } if (item.getDropper() != null && item.hasItemPlugin()) { From 9851e5964fa1bf28f0bd2a86cf7be0925737b9b8 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Sat, 21 Sep 2019 00:46:38 +1200 Subject: [PATCH 22/83] remove clan ranks and admin extras --- .../crandor/game/node/entity/npc/agg/AggressiveHandler.java | 4 +--- .../src/org/crandor/game/node/entity/player/Player.java | 2 +- .../game/node/entity/player/link/grave/GraveManager.java | 3 --- .../src/org/crandor/game/system/communication/ClanRank.java | 2 +- .../crandor/game/system/communication/ClanRepository.java | 5 +---- .../crandor/game/system/communication/CommunicationInfo.java | 2 +- .../src/plugin/interaction/inter/ClanInterfacePlugin.java | 2 +- 7 files changed, 6 insertions(+), 14 deletions(-) diff --git a/09HDscape-server/src/org/crandor/game/node/entity/npc/agg/AggressiveHandler.java b/09HDscape-server/src/org/crandor/game/node/entity/npc/agg/AggressiveHandler.java index f30744549..947c285a8 100644 --- a/09HDscape-server/src/org/crandor/game/node/entity/npc/agg/AggressiveHandler.java +++ b/09HDscape-server/src/org/crandor/game/node/entity/npc/agg/AggressiveHandler.java @@ -81,9 +81,7 @@ public final class AggressiveHandler { Entity target = behavior.getLogicalTarget(entity, behavior.getPossibleTargets(entity, radius)); if (target instanceof Player) { if (target.getAttribute("ignore_aggression", false)) { - if (((Player) target).getRights().equals(Rights.ADMINISTRATOR)) { - return false; - } + return false; } } if (target != null) { diff --git a/09HDscape-server/src/org/crandor/game/node/entity/player/Player.java b/09HDscape-server/src/org/crandor/game/node/entity/player/Player.java index 7fe4f9436..03d171457 100644 --- a/09HDscape-server/src/org/crandor/game/node/entity/player/Player.java +++ b/09HDscape-server/src/org/crandor/game/node/entity/player/Player.java @@ -501,7 +501,7 @@ public class Player extends Entity { Repository.sendNews("Ultimate ironman "+this.getUsername()+" has just perished."); } packetDispatch.sendTempMusic(90); - if (!getZoneMonitor().handleDeath(killer) && (!getProperties().isSafeZone() && getZoneMonitor().getType() != ZoneType.SAFE.getId()) && getDetails().getRights() != Rights.ADMINISTRATOR) { + if (!getZoneMonitor().handleDeath(killer) && (!getProperties().isSafeZone() && getZoneMonitor().getType() != ZoneType.SAFE.getId())) { GroundItemManager.create(new Item(526), getLocation(), k); final Container[] c = DeathTask.getContainers(this); boolean gravestone = graveManager.generateable() && getIronmanManager().getMode() != IronmanMode.ULTIMATE; diff --git a/09HDscape-server/src/org/crandor/game/node/entity/player/link/grave/GraveManager.java b/09HDscape-server/src/org/crandor/game/node/entity/player/link/grave/GraveManager.java index 2fc5e7140..0859a46fc 100644 --- a/09HDscape-server/src/org/crandor/game/node/entity/player/link/grave/GraveManager.java +++ b/09HDscape-server/src/org/crandor/game/node/entity/player/link/grave/GraveManager.java @@ -93,9 +93,6 @@ public class GraveManager implements SavingModule { * @return {@code True} if so. */ public boolean generateable() { - if (player.getDetails().getRights() == Rights.ADMINISTRATOR && GameWorld.getSettings().isHosted()) { - return false; - } if (player.getSkullManager().isWilderness()) { return false; } diff --git a/09HDscape-server/src/org/crandor/game/system/communication/ClanRank.java b/09HDscape-server/src/org/crandor/game/system/communication/ClanRank.java index 73178136e..3abf44ad7 100644 --- a/09HDscape-server/src/org/crandor/game/system/communication/ClanRank.java +++ b/09HDscape-server/src/org/crandor/game/system/communication/ClanRank.java @@ -5,7 +5,7 @@ package org.crandor.game.system.communication; * @author Emperor */ public enum ClanRank { - NONE(-1, "Anyone"), FRIEND(0, "Any friends"), RECRUIT(1, "Recruit+"), CORPORAL(2, "Corporal+"), SERGEANT(3, "Sergeant+"), LIEUTENANT(4, "Lieutenant+"), CAPTAIN(5, "Captain+"), GENERAL(6, "General+"), OWNER(7, "Only me"), KELDAGRIM_MOD(127, "No-one"); + NONE(-1, "Anyone"), FRIEND(0, "Any friends"), RECRUIT(1, "Recruit+"), CORPORAL(2, "Corporal+"), SERGEANT(3, "Sergeant+"), LIEUTENANT(4, "Lieutenant+"), CAPTAIN(5, "Captain+"), GENERAL(6, "General+"), OWNER(7, "Only me"); /** * The value of the rank. diff --git a/09HDscape-server/src/org/crandor/game/system/communication/ClanRepository.java b/09HDscape-server/src/org/crandor/game/system/communication/ClanRepository.java index 1eacd5821..df08ee3bb 100644 --- a/09HDscape-server/src/org/crandor/game/system/communication/ClanRepository.java +++ b/09HDscape-server/src/org/crandor/game/system/communication/ClanRepository.java @@ -61,7 +61,7 @@ public final class ClanRepository { /** * The rank required for loot-share. */ - private ClanRank lootRequirement = ClanRank.KELDAGRIM_MOD; + private ClanRank lootRequirement = ClanRank.CAPTAIN; /** * The members mapping. @@ -312,9 +312,6 @@ public final class ClanRepository { */ public ClanRank getRank(Player player) { ClanRank rank = ranks.get(player.getName()); - if (player.getDetails().getRights() == Rights.ADMINISTRATOR && !player.getName().equals(owner)) { - return ClanRank.KELDAGRIM_MOD; - } if (rank == null) { if (player.getName().equals(owner)) { return ClanRank.OWNER; diff --git a/09HDscape-server/src/org/crandor/game/system/communication/CommunicationInfo.java b/09HDscape-server/src/org/crandor/game/system/communication/CommunicationInfo.java index fbf616c35..5085fbc92 100644 --- a/09HDscape-server/src/org/crandor/game/system/communication/CommunicationInfo.java +++ b/09HDscape-server/src/org/crandor/game/system/communication/CommunicationInfo.java @@ -72,7 +72,7 @@ public final class CommunicationInfo { /** * The rank required for loot-share. */ - private ClanRank lootRequirement = ClanRank.KELDAGRIM_MOD; + private ClanRank lootRequirement = ClanRank.CAPTAIN; /** * If lootshare is enabled. diff --git a/09HDscape-server/src/plugin/interaction/inter/ClanInterfacePlugin.java b/09HDscape-server/src/plugin/interaction/inter/ClanInterfacePlugin.java index 3c4416916..3e645fde5 100644 --- a/09HDscape-server/src/plugin/interaction/inter/ClanInterfacePlugin.java +++ b/09HDscape-server/src/plugin/interaction/inter/ClanInterfacePlugin.java @@ -72,7 +72,7 @@ public final class ClanInterfacePlugin extends ComponentPlugin { break; case 26: if (opcode == 230) { - clan.setLootRequirement(ClanRank.KELDAGRIM_MOD); + clan.setLootRequirement(ClanRank.CAPTAIN); } else { clan.setLootRequirement(getRank(opcode)); } From 3fedcc9bef39a3e58e69df74d47e7fcd27ad5c2a Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Sat, 21 Sep 2019 01:14:14 +1200 Subject: [PATCH 23/83] lower exp modifier --- .../src/org/crandor/game/content/skill/Skills.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/09HDscape-server/src/org/crandor/game/content/skill/Skills.java b/09HDscape-server/src/org/crandor/game/content/skill/Skills.java index 216239b78..5e74bf52f 100644 --- a/09HDscape-server/src/org/crandor/game/content/skill/Skills.java +++ b/09HDscape-server/src/org/crandor/game/content/skill/Skills.java @@ -28,7 +28,7 @@ public final class Skills { /** * Represents the constant modifier of experience. */ - public static final double EXPERIENCE_MULTIPLIER = 35.3; + public static final double EXPERIENCE_MULTIPLIER = 25; /** * The maximum experience multiplier. @@ -267,12 +267,13 @@ 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 *= 2.0; + mod *= 1.5; } //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; } From 88bf1ef44da5fe1f3f655c7316b5c10a0f67959b Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Sat, 21 Sep 2019 01:14:38 +1200 Subject: [PATCH 24/83] Fix XP Fever --- .../crandor/game/content/skill/Skills.java | 2 +- .../game/events/GlobalEventManager.java | 24 ++++--------------- .../command/DeveloperCommandPlugin.java | 4 ++-- .../inter/ExperienceLampInterface.java | 2 +- 4 files changed, 8 insertions(+), 24 deletions(-) diff --git a/09HDscape-server/src/org/crandor/game/content/skill/Skills.java b/09HDscape-server/src/org/crandor/game/content/skill/Skills.java index 5e74bf52f..78b559a5c 100644 --- a/09HDscape-server/src/org/crandor/game/content/skill/Skills.java +++ b/09HDscape-server/src/org/crandor/game/content/skill/Skills.java @@ -258,7 +258,7 @@ public final class Skills { if (!(entity instanceof Player)) { return 1.0; } - double mod = multiplyer ? (GlobalEventManager.get().isActive("XPFever") ? EXPERIENCE_MULTIPLIER * 2 : EXPERIENCE_MULTIPLIER) : 1; + double mod = multiplyer ? (GlobalEventManager.get().isActive("XP Fever") ? EXPERIENCE_MULTIPLIER * 2 : EXPERIENCE_MULTIPLIER) : 1; Player p = (Player) entity; if (p.getIronmanManager().getMode() == IronmanMode.ULTIMATE) { mod /= 4; diff --git a/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java b/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java index 7373cb8b0..b827ef898 100644 --- a/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java +++ b/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java @@ -37,6 +37,7 @@ public class GlobalEventManager implements CallBack { getEvents().put("Thieves jackpot", 0L); getEvents().put("Golden essence", 0L); getEvents().put("Clone Fest", 0L); + getEvents().put("XPFever", 0L); } catch (Exception e) { e.printStackTrace(); @@ -158,16 +159,6 @@ public class GlobalEventManager implements CallBack { 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) { /*if (WorldCommunicator.isEnabled()) { MSPacketRepository.sendWorldMessage((tag ? "[Event Manager] - " : "")+ message); @@ -234,16 +225,6 @@ public class GlobalEventManager implements CallBack { return this; } - - /* - * 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) { @@ -277,6 +258,9 @@ public class GlobalEventManager implements CallBack { case "Clone Fest": player.getPacketDispatch().sendMessages("This event means 20 clones have been spawned in the wilderness", "near the mage bank."); break; + case "XPFever": + player.getPacketDispatch().sendMessages("This event means you'll receive x2 XP"); + break; } } diff --git a/09HDscape-server/src/plugin/command/DeveloperCommandPlugin.java b/09HDscape-server/src/plugin/command/DeveloperCommandPlugin.java index 843e9a3c8..ab89ed789 100644 --- a/09HDscape-server/src/plugin/command/DeveloperCommandPlugin.java +++ b/09HDscape-server/src/plugin/command/DeveloperCommandPlugin.java @@ -182,9 +182,9 @@ public final class DeveloperCommandPlugin extends CommandPlugin { for (int i = 1; i < args.length; i++) target += args[i] + ((i == args.length - 1) ? "" : " "); if (args.length > 1) - GlobalEventManager.get().activate("XPFever", target); + GlobalEventManager.get().activate("XP Fever", target); else - GlobalEventManager.get().activate("XPFever", target); + GlobalEventManager.get().activate("XP Fever", target); break; case "poison": player.getStateManager().set(EntityState.POISONED, 200, player); diff --git a/09HDscape-server/src/plugin/interaction/inter/ExperienceLampInterface.java b/09HDscape-server/src/plugin/interaction/inter/ExperienceLampInterface.java index 7c4be423a..e4b4003a7 100644 --- a/09HDscape-server/src/plugin/interaction/inter/ExperienceLampInterface.java +++ b/09HDscape-server/src/plugin/interaction/inter/ExperienceLampInterface.java @@ -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 * (GlobalEventManager.get().isActive("XPFever") ? 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("XP Fever") ? 2 : 1))) + " " + Skills.SKILL_NAME[skillType.skill] + " experience." }); } player.getSkills().addExperience(skillType.skill, experience, false); } From 3e0bfd7c1dd521eeeec2722c4cd7d7cc273424fa Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Sat, 21 Sep 2019 01:18:26 +1200 Subject: [PATCH 25/83] fixup --- .../src/org/crandor/game/events/GlobalEventManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java b/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java index b827ef898..e3cb36080 100644 --- a/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java +++ b/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java @@ -37,7 +37,7 @@ public class GlobalEventManager implements CallBack { getEvents().put("Thieves jackpot", 0L); getEvents().put("Golden essence", 0L); getEvents().put("Clone Fest", 0L); - getEvents().put("XPFever", 0L); + getEvents().put("XP Fever", 0L); } catch (Exception e) { e.printStackTrace(); @@ -258,7 +258,7 @@ public class GlobalEventManager implements CallBack { case "Clone Fest": player.getPacketDispatch().sendMessages("This event means 20 clones have been spawned in the wilderness", "near the mage bank."); break; - case "XPFever": + case "XP Fever": player.getPacketDispatch().sendMessages("This event means you'll receive x2 XP"); break; From 98a8005de4a9d2035a843a78b696f0e079493fbb Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Sat, 21 Sep 2019 09:40:42 +1200 Subject: [PATCH 26/83] upgrade max bank storage --- .../src/org/crandor/game/container/impl/BankContainer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/09HDscape-server/src/org/crandor/game/container/impl/BankContainer.java b/09HDscape-server/src/org/crandor/game/container/impl/BankContainer.java index d85b6d970..c94b330b5 100644 --- a/09HDscape-server/src/org/crandor/game/container/impl/BankContainer.java +++ b/09HDscape-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 = 496; + public static final int SIZE = 800; /** * The maximum amount of bank tabs From 06041578a86a8d54b89df5d026083e9c0c00d01b Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Sat, 21 Sep 2019 09:41:19 +1200 Subject: [PATCH 27/83] Revert "remove clan ranks and admin extras" This reverts commit 9851e5964fa1bf28f0bd2a86cf7be0925737b9b8. --- .../crandor/game/node/entity/npc/agg/AggressiveHandler.java | 4 +++- .../src/org/crandor/game/node/entity/player/Player.java | 2 +- .../game/node/entity/player/link/grave/GraveManager.java | 3 +++ .../src/org/crandor/game/system/communication/ClanRank.java | 2 +- .../crandor/game/system/communication/ClanRepository.java | 5 ++++- .../crandor/game/system/communication/CommunicationInfo.java | 2 +- .../src/plugin/interaction/inter/ClanInterfacePlugin.java | 2 +- 7 files changed, 14 insertions(+), 6 deletions(-) diff --git a/09HDscape-server/src/org/crandor/game/node/entity/npc/agg/AggressiveHandler.java b/09HDscape-server/src/org/crandor/game/node/entity/npc/agg/AggressiveHandler.java index 947c285a8..f30744549 100644 --- a/09HDscape-server/src/org/crandor/game/node/entity/npc/agg/AggressiveHandler.java +++ b/09HDscape-server/src/org/crandor/game/node/entity/npc/agg/AggressiveHandler.java @@ -81,7 +81,9 @@ public final class AggressiveHandler { Entity target = behavior.getLogicalTarget(entity, behavior.getPossibleTargets(entity, radius)); if (target instanceof Player) { if (target.getAttribute("ignore_aggression", false)) { - return false; + if (((Player) target).getRights().equals(Rights.ADMINISTRATOR)) { + return false; + } } } if (target != null) { diff --git a/09HDscape-server/src/org/crandor/game/node/entity/player/Player.java b/09HDscape-server/src/org/crandor/game/node/entity/player/Player.java index 03d171457..7fe4f9436 100644 --- a/09HDscape-server/src/org/crandor/game/node/entity/player/Player.java +++ b/09HDscape-server/src/org/crandor/game/node/entity/player/Player.java @@ -501,7 +501,7 @@ public class Player extends Entity { Repository.sendNews("Ultimate ironman "+this.getUsername()+" has just perished."); } packetDispatch.sendTempMusic(90); - if (!getZoneMonitor().handleDeath(killer) && (!getProperties().isSafeZone() && getZoneMonitor().getType() != ZoneType.SAFE.getId())) { + if (!getZoneMonitor().handleDeath(killer) && (!getProperties().isSafeZone() && getZoneMonitor().getType() != ZoneType.SAFE.getId()) && getDetails().getRights() != Rights.ADMINISTRATOR) { GroundItemManager.create(new Item(526), getLocation(), k); final Container[] c = DeathTask.getContainers(this); boolean gravestone = graveManager.generateable() && getIronmanManager().getMode() != IronmanMode.ULTIMATE; diff --git a/09HDscape-server/src/org/crandor/game/node/entity/player/link/grave/GraveManager.java b/09HDscape-server/src/org/crandor/game/node/entity/player/link/grave/GraveManager.java index 0859a46fc..2fc5e7140 100644 --- a/09HDscape-server/src/org/crandor/game/node/entity/player/link/grave/GraveManager.java +++ b/09HDscape-server/src/org/crandor/game/node/entity/player/link/grave/GraveManager.java @@ -93,6 +93,9 @@ public class GraveManager implements SavingModule { * @return {@code True} if so. */ public boolean generateable() { + if (player.getDetails().getRights() == Rights.ADMINISTRATOR && GameWorld.getSettings().isHosted()) { + return false; + } if (player.getSkullManager().isWilderness()) { return false; } diff --git a/09HDscape-server/src/org/crandor/game/system/communication/ClanRank.java b/09HDscape-server/src/org/crandor/game/system/communication/ClanRank.java index 3abf44ad7..73178136e 100644 --- a/09HDscape-server/src/org/crandor/game/system/communication/ClanRank.java +++ b/09HDscape-server/src/org/crandor/game/system/communication/ClanRank.java @@ -5,7 +5,7 @@ package org.crandor.game.system.communication; * @author Emperor */ public enum ClanRank { - NONE(-1, "Anyone"), FRIEND(0, "Any friends"), RECRUIT(1, "Recruit+"), CORPORAL(2, "Corporal+"), SERGEANT(3, "Sergeant+"), LIEUTENANT(4, "Lieutenant+"), CAPTAIN(5, "Captain+"), GENERAL(6, "General+"), OWNER(7, "Only me"); + NONE(-1, "Anyone"), FRIEND(0, "Any friends"), RECRUIT(1, "Recruit+"), CORPORAL(2, "Corporal+"), SERGEANT(3, "Sergeant+"), LIEUTENANT(4, "Lieutenant+"), CAPTAIN(5, "Captain+"), GENERAL(6, "General+"), OWNER(7, "Only me"), KELDAGRIM_MOD(127, "No-one"); /** * The value of the rank. diff --git a/09HDscape-server/src/org/crandor/game/system/communication/ClanRepository.java b/09HDscape-server/src/org/crandor/game/system/communication/ClanRepository.java index df08ee3bb..1eacd5821 100644 --- a/09HDscape-server/src/org/crandor/game/system/communication/ClanRepository.java +++ b/09HDscape-server/src/org/crandor/game/system/communication/ClanRepository.java @@ -61,7 +61,7 @@ public final class ClanRepository { /** * The rank required for loot-share. */ - private ClanRank lootRequirement = ClanRank.CAPTAIN; + private ClanRank lootRequirement = ClanRank.KELDAGRIM_MOD; /** * The members mapping. @@ -312,6 +312,9 @@ public final class ClanRepository { */ public ClanRank getRank(Player player) { ClanRank rank = ranks.get(player.getName()); + if (player.getDetails().getRights() == Rights.ADMINISTRATOR && !player.getName().equals(owner)) { + return ClanRank.KELDAGRIM_MOD; + } if (rank == null) { if (player.getName().equals(owner)) { return ClanRank.OWNER; diff --git a/09HDscape-server/src/org/crandor/game/system/communication/CommunicationInfo.java b/09HDscape-server/src/org/crandor/game/system/communication/CommunicationInfo.java index 5085fbc92..fbf616c35 100644 --- a/09HDscape-server/src/org/crandor/game/system/communication/CommunicationInfo.java +++ b/09HDscape-server/src/org/crandor/game/system/communication/CommunicationInfo.java @@ -72,7 +72,7 @@ public final class CommunicationInfo { /** * The rank required for loot-share. */ - private ClanRank lootRequirement = ClanRank.CAPTAIN; + private ClanRank lootRequirement = ClanRank.KELDAGRIM_MOD; /** * If lootshare is enabled. diff --git a/09HDscape-server/src/plugin/interaction/inter/ClanInterfacePlugin.java b/09HDscape-server/src/plugin/interaction/inter/ClanInterfacePlugin.java index 3e645fde5..3c4416916 100644 --- a/09HDscape-server/src/plugin/interaction/inter/ClanInterfacePlugin.java +++ b/09HDscape-server/src/plugin/interaction/inter/ClanInterfacePlugin.java @@ -72,7 +72,7 @@ public final class ClanInterfacePlugin extends ComponentPlugin { break; case 26: if (opcode == 230) { - clan.setLootRequirement(ClanRank.CAPTAIN); + clan.setLootRequirement(ClanRank.KELDAGRIM_MOD); } else { clan.setLootRequirement(getRank(opcode)); } From 453694e4bfa79fd8f09b6e263b39d68b9cfaef34 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Sat, 21 Sep 2019 11:34:36 +1200 Subject: [PATCH 28/83] ... --- .../src/org/keldagrim/net/packet/WorldPacketRepository.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/09HDscape-management-server/src/org/keldagrim/net/packet/WorldPacketRepository.java b/09HDscape-management-server/src/org/keldagrim/net/packet/WorldPacketRepository.java index aad8a9b4d..3a51ff6d4 100644 --- a/09HDscape-management-server/src/org/keldagrim/net/packet/WorldPacketRepository.java +++ b/09HDscape-management-server/src/org/keldagrim/net/packet/WorldPacketRepository.java @@ -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. Try joining the main clan named 'Keldagrim'.:clan:"); + sendPlayerMessage(player, "The channel you tried to join does not exist (" + clanName + ").
Try joining the main clan named 'Sparr0w'.:clan:"); return; } clan.enter(player); From ccd7cc582f6a1ca8eaed649c9162b7ea6d1c7593 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Sat, 21 Sep 2019 11:34:54 +1200 Subject: [PATCH 29/83] Update PlayerCommandPlugin.java --- .../src/plugin/command/PlayerCommandPlugin.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/09HDscape-server/src/plugin/command/PlayerCommandPlugin.java b/09HDscape-server/src/plugin/command/PlayerCommandPlugin.java index 8cd377aad..03e0b5fe3 100644 --- a/09HDscape-server/src/plugin/command/PlayerCommandPlugin.java +++ b/09HDscape-server/src/plugin/command/PlayerCommandPlugin.java @@ -37,7 +37,8 @@ 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; @@ -46,8 +47,9 @@ public final class PlayerCommandPlugin extends CommandPlugin { int stage = Integer.parseInt(arguments[1]); TutorialStage.load(player, stage, false); break; + */ - case "resettabs": + case "bankresettabs": for (int i = 0; i < player.getBank().getTabStartSlot().length; i++) { player.getBank().getTabStartSlot()[i] = 0; } @@ -57,7 +59,8 @@ public final class PlayerCommandPlugin extends CommandPlugin { } player.getPacketDispatch().sendMessage("Bank tabs are reset!"); return true; - case "resetpin": + + case "bankresetpin": if (arguments.length < 2) { player.sendMessage("Syntax error: ::resetpin oldpin"); return true; @@ -125,9 +128,6 @@ public final class PlayerCommandPlugin extends CommandPlugin { player.sendMessage("Bad! No images/text effects allowed in yell chat."); return true; } - if(text.contains("aq p")){ - return true; - } int length = text.length(); if (length > 100) { length = 100; From dbe36b04e4ded73be86eb904d84c773fcbce025f Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Sat, 21 Sep 2019 12:02:47 +1200 Subject: [PATCH 30/83] Add shop command --- .../src/plugin/command/PlayerCommandPlugin.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/09HDscape-server/src/plugin/command/PlayerCommandPlugin.java b/09HDscape-server/src/plugin/command/PlayerCommandPlugin.java index 03e0b5fe3..95f011e1c 100644 --- a/09HDscape-server/src/plugin/command/PlayerCommandPlugin.java +++ b/09HDscape-server/src/plugin/command/PlayerCommandPlugin.java @@ -21,6 +21,8 @@ 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 @@ -28,6 +30,11 @@ import org.crandor.tools.StringUtils; @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); @@ -48,7 +55,10 @@ public final class PlayerCommandPlugin extends CommandPlugin { TutorialStage.load(player, stage, false); break; */ - + case "shop": + CREDIT_STORE.open(player); + break; + case "bankresettabs": for (int i = 0; i < player.getBank().getTabStartSlot().length; i++) { player.getBank().getTabStartSlot()[i] = 0; From e57f9de51637f60e8ccd659a1a09575cc7e6aec6 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Sat, 21 Sep 2019 12:03:04 +1200 Subject: [PATCH 31/83] Remove keldagrim references --- .../plugin/interaction/item/KeldagrimVotingBond.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/09HDscape-server/src/plugin/interaction/item/KeldagrimVotingBond.java b/09HDscape-server/src/plugin/interaction/item/KeldagrimVotingBond.java index 8ab99b6c2..bbdabe47a 100644 --- a/09HDscape-server/src/plugin/interaction/item/KeldagrimVotingBond.java +++ b/09HDscape-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 Keldagrim voting bond into your bank."); + player.sendMessage("You deposit your Reward 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 an Keldagrim voting bond!", 15, ""); + Repository.sendNews("" + player.getUsername() + " redeemed an hour of double EXP from a Reward 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 an Keldagrim voting bond!", 15, ""); + Repository.sendNews("" + player.getUsername() + " redeemed an ultra lamp from a Reward 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 an Keldagrim voting bond!", 15, ""); + Repository.sendNews("" + player.getUsername() + " redeemed " + formatter.format(coins.getAmount()) + " gold coins from a Reward 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 an Keldagrim voting bond!", 15, ""); + Repository.sendNews("" + player.getUsername() + " redeemed a clue scroll from a Reward bond!", 15, ""); } break; } From a60e8121bd47bbe515b6a41aa83bf757131ed9e1 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Sat, 21 Sep 2019 12:03:31 +1200 Subject: [PATCH 32/83] Remove keldagrim references --- 09HDscape-server/src/plugin/zone/GrandExchangeZone.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/09HDscape-server/src/plugin/zone/GrandExchangeZone.java b/09HDscape-server/src/plugin/zone/GrandExchangeZone.java index f903de1b7..97e39d772 100644 --- a/09HDscape-server/src/plugin/zone/GrandExchangeZone.java +++ b/09HDscape-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()+"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); + 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); setPointShop(true); } @@ -301,7 +301,7 @@ public final class GrandExchangeZone extends MapZone implements Plugin { } break; case 3: - 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."); + interpreter.sendDialogues(8631, FacialExpression.OSRS_NORMAL, "You receive 1 credit for every 10 levels gained"); 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 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)." : "")); + 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)." : "")); stage = -5; return true; } From 182754f7ff34a999c0db6458ef45923e424868ff Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Sat, 21 Sep 2019 12:06:36 +1200 Subject: [PATCH 33/83] add credits as alias for shop --- 09HDscape-server/src/plugin/command/PlayerCommandPlugin.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/09HDscape-server/src/plugin/command/PlayerCommandPlugin.java b/09HDscape-server/src/plugin/command/PlayerCommandPlugin.java index 95f011e1c..23c508717 100644 --- a/09HDscape-server/src/plugin/command/PlayerCommandPlugin.java +++ b/09HDscape-server/src/plugin/command/PlayerCommandPlugin.java @@ -55,7 +55,9 @@ public final class PlayerCommandPlugin extends CommandPlugin { TutorialStage.load(player, stage, false); break; */ + case "shop": + case "credits": CREDIT_STORE.open(player); break; From 12f598768ae4a2ae92b666b1fe2a4469c8dd13ef Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Sat, 21 Sep 2019 12:16:34 +1200 Subject: [PATCH 34/83] Add seperate credits command --- .../src/plugin/command/PlayerCommandPlugin.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/09HDscape-server/src/plugin/command/PlayerCommandPlugin.java b/09HDscape-server/src/plugin/command/PlayerCommandPlugin.java index 23c508717..b3bf56fba 100644 --- a/09HDscape-server/src/plugin/command/PlayerCommandPlugin.java +++ b/09HDscape-server/src/plugin/command/PlayerCommandPlugin.java @@ -57,9 +57,13 @@ public final class PlayerCommandPlugin extends CommandPlugin { */ case "shop": - case "credits": CREDIT_STORE.open(player); break; + + case "credits": + int credits = CREDIT_STORE.getPoints(player); + player.sendMessage("You currently have " + credits + " credits to spend."); + break; case "bankresettabs": for (int i = 0; i < player.getBank().getTabStartSlot().length; i++) { From df44ba4c401327f209f95a9f7ef70de1a743dfb7 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Sat, 21 Sep 2019 12:28:17 +1200 Subject: [PATCH 35/83] Add some color to commands --- .../plugin/command/PlayerCommandPlugin.java | 49 ++++++++++--------- .../src/plugin/zone/GrandExchangeZone.java | 2 +- 2 files changed, 27 insertions(+), 24 deletions(-) diff --git a/09HDscape-server/src/plugin/command/PlayerCommandPlugin.java b/09HDscape-server/src/plugin/command/PlayerCommandPlugin.java index b3bf56fba..ab86962bc 100644 --- a/09HDscape-server/src/plugin/command/PlayerCommandPlugin.java +++ b/09HDscape-server/src/plugin/command/PlayerCommandPlugin.java @@ -62,7 +62,13 @@ public final class PlayerCommandPlugin extends CommandPlugin { case "credits": int credits = CREDIT_STORE.getPoints(player); - player.sendMessage("You currently have " + credits + " credits to spend."); + 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": @@ -73,12 +79,12 @@ public final class PlayerCommandPlugin extends CommandPlugin { if (player.getBank().isOpen()) { player.getInterfaceManager().close(); } - player.getPacketDispatch().sendMessage("Bank tabs are reset!"); + player.sendMessage("Your bank tabs have been reset!"); return true; case "bankresetpin": if (arguments.length < 2) { - player.sendMessage("Syntax error: ::resetpin oldpin"); + player.sendMessage("You must specify your current pin!"); return true; } String oldPin = arguments[1]; @@ -86,24 +92,20 @@ public final class PlayerCommandPlugin extends CommandPlugin { return true; } if (!player.getBankPinManager().hasPin()) { - player.sendMessage("You don't have a pin."); + player.sendMessage("You don't currently have a pin set."); return true; } if (!oldPin.equals(player.getBankPinManager().getPin())) { - player.sendMessage("Your old pin doesn't match your current pin."); + player.sendMessage("" + oldPin + " 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 = 1; + int ironCount = 0; int ultIronCount = 0; for (Player p : Repository.getPlayers()) { if (p.getIronmanManager().checkRestriction(IronmanMode.ULTIMATE)) { @@ -115,33 +117,34 @@ public final class PlayerCommandPlugin extends CommandPlugin { } int regular = count - ironCount - ultIronCount; if (count == 1) { - player.getPacketDispatch().sendMessage("There is 1 active player in this world."); + player.sendMessage("There is 1 active player in this world."); } else { - player.getPacketDispatch().sendMessage("There are " + count + " active players in this world: " + regular + " regular, " + ironCount + " iron, and " + ultIronCount + " ultimate iron."); + player.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.getPacketDispatch().sendMessages("Join clan chat \"" + GameWorld.getName() + "\" to talk globally, or become a donator to have access to", "this benefit."); + player.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.getPacketDispatch().sendMessage("You have been " + (player.getDetails().isPermMute() ? "permanently" : "temporarily") + " muted due to breaking a rule."); + player.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."); return true; } int length = text.length(); @@ -162,12 +165,12 @@ public final class PlayerCommandPlugin extends CommandPlugin { player.setAttribute("yell-delay", (int) GameWorld.getTicks() + (player.getDonatorType().getCooldown() / 0.6)); } } else { - player.getPacketDispatch().sendMessage("Your message was too short."); + player.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": @@ -182,7 +185,7 @@ public final class PlayerCommandPlugin extends CommandPlugin { 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")) { @@ -198,7 +201,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; } diff --git a/09HDscape-server/src/plugin/zone/GrandExchangeZone.java b/09HDscape-server/src/plugin/zone/GrandExchangeZone.java index 97e39d772..6ff377002 100644 --- a/09HDscape-server/src/plugin/zone/GrandExchangeZone.java +++ b/09HDscape-server/src/plugin/zone/GrandExchangeZone.java @@ -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."); } } From 424bda64a89a396b64c00623b9fff247090992e9 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Sat, 21 Sep 2019 14:05:37 +1200 Subject: [PATCH 36/83] Update interfaces --- .../src/org/runite/Configurations.java | 4 +-- .../plugin/command/PlayerCommandPlugin.java | 35 +++++++++++-------- 2 files changed, 23 insertions(+), 16 deletions(-) diff --git a/09HDscape-client/src/org/runite/Configurations.java b/09HDscape-client/src/org/runite/Configurations.java index 3525d00d3..756e9f3a0 100644 --- a/09HDscape-client/src/org/runite/Configurations.java +++ b/09HDscape-client/src/org/runite/Configurations.java @@ -12,7 +12,7 @@ public final class Configurations { /** * The website. */ - public static final String WEBSITE = "http://www.os.frostblades.org"; + public static final String WEBSITE = "http://localhost"; /** * 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" : "frostblades.org"); + public static final String MS_IP = (Configurations.LOCAL_MS ? "127.0.0.1" : "localhost"); /** * The operation system name. diff --git a/09HDscape-server/src/plugin/command/PlayerCommandPlugin.java b/09HDscape-server/src/plugin/command/PlayerCommandPlugin.java index ab86962bc..9a5764bd6 100644 --- a/09HDscape-server/src/plugin/command/PlayerCommandPlugin.java +++ b/09HDscape-server/src/plugin/command/PlayerCommandPlugin.java @@ -217,13 +217,20 @@ public final class PlayerCommandPlugin extends CommandPlugin { player.sendMessage("Finish what you're currently doing."); return; } - 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); + player.getInterfaceManager().open(new Component(275)); + for (int i = 0; i < 311; i++) { + player.getPacketDispatch().sendString("", 275, i); + } + int lineId = 11; + player.getPacketDispatch().sendString("" + GameWorld.getName() + " commands", 275, 2); + player.getPacketDispatch().sendString("::players", 275, lineId++); + player.getPacketDispatch().sendString("Shows online player count.", 275, lineId++); + player.getPacketDispatch().sendString("::shop", 275, lineId++); + player.getPacketDispatch().sendString("Open the reward credits shop.", 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++); } /** @@ -232,13 +239,13 @@ public final class PlayerCommandPlugin extends CommandPlugin { */ private void sendDonationInfo(Player player) { player.getInterfaceManager().open(new Component(275)); - for (int i = 0; i < 257; i++) { + for (int i = 0; i < 311; 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++); } } /** @@ -247,14 +254,14 @@ public final class PlayerCommandPlugin extends CommandPlugin { */ private void sendQuests(Player player) { player.getInterfaceManager().open(new Component(275)); - for (int i = 0; i < 257; i++) { + for (int i = 0; i < 311; 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()) { - player.getPacketDispatch().sendString(q.isCompleted(player) ? red + " " + q.getName() + "

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

", 275, lineId++); + // Add a space to beginning and end of string for the strikethrough + player.getPacketDispatch().sendString("" + (q.isCompleted(player) ? " " : "") + q.getName() + " ", 275, lineId++); } } From 3cfd4765e12765ee172151d64bbfd42feb45547a Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Sat, 21 Sep 2019 14:26:54 +1200 Subject: [PATCH 37/83] update command list --- .../plugin/command/PlayerCommandPlugin.java | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/09HDscape-server/src/plugin/command/PlayerCommandPlugin.java b/09HDscape-server/src/plugin/command/PlayerCommandPlugin.java index 9a5764bd6..910849c1e 100644 --- a/09HDscape-server/src/plugin/command/PlayerCommandPlugin.java +++ b/09HDscape-server/src/plugin/command/PlayerCommandPlugin.java @@ -168,21 +168,26 @@ public final class PlayerCommandPlugin extends CommandPlugin { player.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.")); 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 "reply": if(player.getInterfaceManager().isOpened()){ player.sendMessage("Please finish what you're doing first."); @@ -218,19 +223,33 @@ public final class PlayerCommandPlugin extends CommandPlugin { return; } player.getInterfaceManager().open(new Component(275)); + //CLear old data for (int i = 0; i < 311; i++) { player.getPacketDispatch().sendString("", 275, i); } - int lineId = 11; + // 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("Shows online player count.", 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++); } /** From 59e205f4aab6df9b03c430192cea7a190d743a69 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Sat, 21 Sep 2019 15:47:51 +1200 Subject: [PATCH 38/83] [events] Fix Thieves jackpot event --- .../skill/member/thieving/Pickpocket.java | 29 ++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/09HDscape-server/src/org/crandor/game/content/skill/member/thieving/Pickpocket.java b/09HDscape-server/src/org/crandor/game/content/skill/member/thieving/Pickpocket.java index 1d864c39e..717f7a66f 100644 --- a/09HDscape-server/src/org/crandor/game/content/skill/member/thieving/Pickpocket.java +++ b/09HDscape-server/src/org/crandor/game/content/skill/member/thieving/Pickpocket.java @@ -2,6 +2,7 @@ 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.GlobalEventManager; 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; @@ -15,7 +16,28 @@ 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 }, { 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 } }, 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. @@ -147,6 +169,11 @@ public enum Pickpocket { if (loot.length == 1) { loot = new int[] { loot[0], 1 }; } + if (loot[0] == 995) { + if(GlobalEventManager.get().isActive("Thieves jackpot")) { + loot[1] *= 3; + } + } return new Item(loot[0], loot[1]); } From 4b7c33e76ab86caf4f8f0272730577429e50c0b2 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Sat, 21 Sep 2019 17:54:35 +1200 Subject: [PATCH 39/83] Add event related commands --- .../game/events/GlobalEventManager.java | 52 +++++++++---------- .../command/DeveloperCommandPlugin.java | 18 +++---- .../plugin/command/PlayerCommandPlugin.java | 17 ++++++ 3 files changed, 50 insertions(+), 37 deletions(-) diff --git a/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java b/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java index e3cb36080..de4378b61 100644 --- a/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java +++ b/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java @@ -5,6 +5,8 @@ import org.crandor.game.system.task.Pulse; import org.crandor.game.world.GameWorld; import org.crandor.game.world.callback.CallBack; import org.crandor.game.world.repository.Repository; +import org.crandor.net.amsc.MSPacketRepository; +import org.crandor.net.amsc.WorldCommunicator; import org.crandor.tools.mysql.Results; import java.util.HashMap; @@ -30,7 +32,6 @@ public class GlobalEventManager implements CallBack { public final GlobalEventManager init() { try { - getEvents().put("Alchemy hellenistic", 0L); getEvents().put("Golden retriever", 0L); getEvents().put("Harvesting doubles", 0L); @@ -144,29 +145,25 @@ 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, ""); + return message(message, true, ""); } public GlobalEventManager notify(String message, boolean tag) { - return message(message, tag, ""); + return message(message, tag, ""); } public GlobalEventManager message(String message, boolean tag, String color) { - /*if (WorldCommunicator.isEnabled()) { - MSPacketRepository.sendWorldMessage((tag ? "[Event Manager] - " : "")+ message); - } else {*/ - for (Player player : Repository.getPlayers()) { - player.getPacketDispatch().sendMessage(color + (tag ? "[Event Manager] - " : "") + message); - } - //} + for (Player player : Repository.getPlayers()) { + player.getPacketDispatch().sendMessage(color + (tag ? "[Event Manager] " : "") + message); + } return this; } @@ -193,15 +190,8 @@ public class GlobalEventManager implements CallBack { 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; - } + Player player = Repository.getPlayerByDisplay(name); + Boolean eventStarted = false; Iterator> iterator = EVENTS.entrySet().iterator(); @@ -213,15 +203,18 @@ public class GlobalEventManager implements CallBack { 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); + message("The event " + eventName + " has been extended for another hour" + (player == null ? "" : " by " + player.getUsername()) + "."); } else { - message("The event " + eventName + " has been activated by " + (p == null ? " " : p.getUsername() + " ") + "on world " + GameWorld.getSettings().getWorldId() + "."); + message("The event " + eventName + " has been activated" + (player == null ? "" : " by " + player.getUsername()) + " on world " + GameWorld.getSettings().getWorldId() + "."); } } entry.setValue(entry.getValue() + 6000); + eventStarted = true; } } + if (!eventStarted) { + player.sendMessage("Failed to activate event " + eventName + "."); + } return this; } @@ -250,7 +243,7 @@ public class GlobalEventManager implements CallBack { 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."); + player.getPacketDispatch().sendMessages("This event means you'll receive 3x more coins when thieving."); break; case "Golden essence": player.getPacketDispatch().sendMessages("This event means you'll receive x3 more runes than normal when runecrafting."); @@ -294,14 +287,17 @@ public class GlobalEventManager implements CallBack { active = true; } } - if (active) - player.sendMessage("The following events are active:"); + if (!active) { + player.sendMessage("No events are currently active."); + return this; + } + player.sendMessage("The following events are active:"); Iterator> iterator = EVENTS.entrySet().iterator(); while(iterator.hasNext()) { Map.Entry entry = (Map.Entry) iterator.next(); if (entry.getValue() > 0) { - player.sendMessage(" [-] " + entry.getKey() + "."); + player.sendMessage(" [-] " + entry.getKey() + "."); } } return this; diff --git a/09HDscape-server/src/plugin/command/DeveloperCommandPlugin.java b/09HDscape-server/src/plugin/command/DeveloperCommandPlugin.java index ab89ed789..8ac20c6d2 100644 --- a/09HDscape-server/src/plugin/command/DeveloperCommandPlugin.java +++ b/09HDscape-server/src/plugin/command/DeveloperCommandPlugin.java @@ -177,22 +177,22 @@ public final class DeveloperCommandPlugin extends CommandPlugin { case "taskamount": player.sendMessage("You have " + player.getSkillTasks().getTaskAmount() + " more to go!"); break; - 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("XP Fever", target); - else - GlobalEventManager.get().activate("XP Fever", target); + + case "eventactivate": + String[] eventNameArr = Arrays.copyOfRange(args, 1, args.length); + String eventName = String.join(" ", eventNameArr); + player.sendMessage("You have activated the " + eventName + " event!"); + GlobalEventManager.get().activate(eventName, null); break; + case "poison": player.getStateManager().set(EntityState.POISONED, 200, player); player.getConfigManager().set(102, 1); player.sendMessage("Poisoned..."); break; + case "activatecf": - target = "Developers"; + String target = ""; for (int i = 1; i < args.length; i++) target += args[i] + ((i == args.length - 1) ? "" : " "); GlobalEventManager.get().activate("Clone Fest", null); diff --git a/09HDscape-server/src/plugin/command/PlayerCommandPlugin.java b/09HDscape-server/src/plugin/command/PlayerCommandPlugin.java index 910849c1e..1342467f1 100644 --- a/09HDscape-server/src/plugin/command/PlayerCommandPlugin.java +++ b/09HDscape-server/src/plugin/command/PlayerCommandPlugin.java @@ -3,6 +3,7 @@ package plugin.command; import org.crandor.ServerConstants; import org.crandor.game.component.Component; import org.crandor.game.content.global.tutorial.TutorialStage; +import org.crandor.game.events.GlobalEventManager; 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; @@ -188,6 +189,11 @@ public final class PlayerCommandPlugin extends CommandPlugin { 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."); @@ -284,6 +290,17 @@ public final class PlayerCommandPlugin extends CommandPlugin { } } + /** + * 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; + } + } + /** * Gets the yell prefix for the given player. * @param player The player. From 6a8cdc82859f9f1b71d5d214ae509fe183a66966 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Sun, 22 Sep 2019 00:35:22 +1200 Subject: [PATCH 40/83] Dont have perks auto enabled --- .../game/node/entity/player/link/GlobalData.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/09HDscape-server/src/org/crandor/game/node/entity/player/link/GlobalData.java b/09HDscape-server/src/org/crandor/game/node/entity/player/link/GlobalData.java index df89f8cf2..6ab4e20bf 100644 --- a/09HDscape-server/src/org/crandor/game/node/entity/player/link/GlobalData.java +++ b/09HDscape-server/src/org/crandor/game/node/entity/player/link/GlobalData.java @@ -271,19 +271,19 @@ public final class GlobalData implements SavingModule { private long lowAlchemyDelay; /** - * The bone crusher perk. + * Is the bone crusher perk enabled. */ - private boolean enableBoneCrusher = true; + private boolean enableBoneCrusher = false; /** - * IF the coin machine perk is enabled. + * Is the coin machine perk enabled. */ - private boolean enableCoinMachine = true; + private boolean enableCoinMachine = false; /** - * If the charm collector was enabled. + * Is the charm collector perk enabled. */ - private boolean enableCharmCollector = true; + private boolean enableCharmCollector = false; /** * The magic skill cape delay. From c8a90c39cc5618ff3cb7f2087688ccbac50950a0 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Sun, 22 Sep 2019 00:36:13 +1200 Subject: [PATCH 41/83] Formatting, wording --- .../src/org/crandor/game/events/GlobalEventManager.java | 2 -- .../org/crandor/game/node/entity/npc/drop/NPCDropTables.java | 2 +- 09HDscape-server/src/plugin/command/PerkCommandPlugin.java | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java b/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java index de4378b61..8fef61142 100644 --- a/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java +++ b/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java @@ -30,7 +30,6 @@ public class GlobalEventManager implements CallBack { private String currentEvent; public final GlobalEventManager init() { - try { getEvents().put("Alchemy hellenistic", 0L); getEvents().put("Golden retriever", 0L); @@ -39,7 +38,6 @@ public class GlobalEventManager implements CallBack { getEvents().put("Golden essence", 0L); getEvents().put("Clone Fest", 0L); getEvents().put("XP Fever", 0L); - } catch (Exception e) { e.printStackTrace(); } diff --git a/09HDscape-server/src/org/crandor/game/node/entity/npc/drop/NPCDropTables.java b/09HDscape-server/src/org/crandor/game/node/entity/npc/drop/NPCDropTables.java index cfc381be9..aa11afb0b 100644 --- a/09HDscape-server/src/org/crandor/game/node/entity/npc/drop/NPCDropTables.java +++ b/09HDscape-server/src/org/crandor/game/node/entity/npc/drop/NPCDropTables.java @@ -184,7 +184,7 @@ public final class NPCDropTables { 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() + " X Coins were sent to your bank."); + player.sendMessage(" " + item.getAmount() + " coins were sent to your bank."); return; } if (item.hasItemPlugin() && player != null) { diff --git a/09HDscape-server/src/plugin/command/PerkCommandPlugin.java b/09HDscape-server/src/plugin/command/PerkCommandPlugin.java index 7aabb4981..8848dae4a 100644 --- a/09HDscape-server/src/plugin/command/PerkCommandPlugin.java +++ b/09HDscape-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 coin machine perk."); + player.sendMessage("You do not own the charm collector perk."); return false; } boolean charm = player.getGlobalData().isEnableCoinMachine(); From b864e972e4c66111050572118fcc025cbc6f3330 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Sun, 22 Sep 2019 00:36:51 +1200 Subject: [PATCH 42/83] Enable golden retriever event correctly --- .../org/crandor/game/node/entity/npc/drop/NPCDropTables.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/09HDscape-server/src/org/crandor/game/node/entity/npc/drop/NPCDropTables.java b/09HDscape-server/src/org/crandor/game/node/entity/npc/drop/NPCDropTables.java index aa11afb0b..200103d7d 100644 --- a/09HDscape-server/src/org/crandor/game/node/entity/npc/drop/NPCDropTables.java +++ b/09HDscape-server/src/org/crandor/game/node/entity/npc/drop/NPCDropTables.java @@ -181,7 +181,7 @@ public final class NPCDropTables { if (handleBoneCrusher(player, item)) { return; } - if (item.getId() == 995 && player.hasPerk(Perks.COIN_MACHINE) && player.getGlobalData().isEnableCoinMachine() && player.getBank().hasSpaceFor(item)) { + if (item.getId() == 995 && player.getBank().hasSpaceFor(item) && ( player.getGlobalData().isEnableCoinMachine() || GlobalEventManager.get().isActive("Golden retriever") )) { 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."); From b39719b1124e099311d93946680f22ad1f5ad133 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Sun, 22 Sep 2019 02:07:17 +1200 Subject: [PATCH 43/83] Tidy up --- .../free/gather/GatheringSkillPulse.java | 107 +++++++++++------- 1 file changed, 64 insertions(+), 43 deletions(-) diff --git a/09HDscape-server/src/org/crandor/game/content/skill/free/gather/GatheringSkillPulse.java b/09HDscape-server/src/org/crandor/game/content/skill/free/gather/GatheringSkillPulse.java index 4d6e7e788..91512510d 100644 --- a/09HDscape-server/src/org/crandor/game/content/skill/free/gather/GatheringSkillPulse.java +++ b/09HDscape-server/src/org/crandor/game/content/skill/free/gather/GatheringSkillPulse.java @@ -39,9 +39,20 @@ public final class GatheringSkillPulse extends SkillPulse { private static final Item[] GEM_REWARDS = { new Item(1623), new Item(1621), new Item(1619), new Item(1617) }; /** - * If the player is mining. + * Is the player is mining. */ - private boolean mining; + private boolean isMining; + + + /** + * Is the player is mining essence. + */ + private boolean isMiningEssence; + + /** + * Is the player is woodcutting. + */ + private boolean isWoodcutting; /** * The amount of ticks it takes to get a log. @@ -71,18 +82,20 @@ public final class GatheringSkillPulse extends SkillPulse { if (TutorialSession.getExtension(player).getStage() == 35) { TutorialStage.load(player, 36, false); } - mining = resource.getSkillId() == Skills.MINING; + isMining = resource.getSkillId() == Skills.MINING; + isMiningEssence = resource == SkillingResource.RUNE_ESSENCE; + isWoodcutting = resource.getSkillId() == Skills.WOODCUTTING; 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 " + (mining ? "mine this rock." : "cut this tree.")); + player.getPacketDispatch().sendMessage("You need a " + Skills.SKILL_NAME[resource.getSkillId()] + " level of " + resource.getLevel() + " to " + (isMining ? "mine this rock." : "cut this tree.")); return false; } if (setTool() == null) { - player.getPacketDispatch().sendMessage("You do not have a" + (mining ? " pickaxe" : "n axe") + " to use."); + player.getPacketDispatch().sendMessage("You do not have a" + (isMining ? " pickaxe" : "n axe") + " to use."); return false; } if (player.getInventory().freeSlots() < 1) { @@ -103,7 +116,7 @@ public final class GatheringSkillPulse extends SkillPulse { @Override public boolean reward() { - if (++ticks % (resource == SkillingResource.RUNE_ESSENCE ? 3 : 4) != 0) { + if (++ticks % (isMiningEssence ? 3 : 4) != 0) { return false; } if (node.getId() == 10041) { @@ -124,42 +137,24 @@ public final class GatheringSkillPulse extends SkillPulse { } else if (tutorialStage == 37 && node.getId() == 3042) { TutorialStage.load(player, 39, false); } - if (resource.getSkillId() == Skills.WOODCUTTING && player.getLocation().getRegionId() == 12102) { + // If player is in donator zone + if (isWoodcutting && player.getLocation().getRegionId() == 12102) { player.getAntiMacroHandler().fireEvent("tree spirit"); return true; } - if (resource.getSkillId() == Skills.WOODCUTTING && tool.getId() == 13661 && RandomFunction.random(100) < 30){ + // 20% chance to auto burn logs when using "inferno adze" item + if (isWoodcutting && tool.getId() == 13661 && RandomFunction.random(100) < 20){ 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; } - 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); - } - 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) + int reward = resource.getReward(); + if (reward > 0) { + applyAchievementTask(reward); + 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; @@ -201,20 +196,20 @@ public final class GatheringSkillPulse extends SkillPulse { } } } - if (mining && player.getSavedData().getGlobalData().getStarSpriteDelay() > System.currentTimeMillis() && TimeUnit.MILLISECONDS.toMinutes(player.getSavedData().getGlobalData().getStarSpriteDelay() - System.currentTimeMillis()) >= 1425) { + if (isMining && 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) { + } else if (isMining && 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 (SkillcapePerks.hasSkillcapePerk(player, SkillcapePerks.MINING) && isMining) { 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); + SkillingPets.checkPetDrop(player, isMining ? SkillingPets.GOLEM : SkillingPets.BEAVER); Perks.addDouble(player, new Item(reward, 1)); } if (gem) { @@ -229,7 +224,7 @@ public final class GatheringSkillPulse extends SkillPulse { player.getSkills().addExperience(resource.getSkillId(), 275.2, true); } } - if (resource != SkillingResource.RUNE_ESSENCE && mining) { + if (!isMiningEssence && isMining) { int chance = 282; boolean altered = false; if (player.getEquipment().getNew(EquipmentContainer.SLOT_RING).getId() == 2572) { @@ -252,7 +247,7 @@ public final class GatheringSkillPulse extends SkillPulse { } } } - if (mining && resource.getReward() == 444 && !player.getAchievementDiaryManager().hasCompletedTask(DiaryType.KARAMJA, 0, 2)) { + if (isMining && 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); } @@ -261,7 +256,7 @@ public final class GatheringSkillPulse extends SkillPulse { if (tutorialStage == 7) { TutorialStage.load(player, 8, false); } - if (!mining) { + if (!isMining) { int chance = 282; if (player.getDetails().getShop().hasPerk(Perks.BIRD_MAN)) { chance /= 1.5; @@ -297,12 +292,38 @@ 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 (isMiningEssence && 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); + } + } + /** * Checks if the player gets rewarded. * @return {@code True} if so. */ private boolean checkReward() { - int skill = mining ? Skills.MINING : Skills.WOODCUTTING; + int skill = isMining ? 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())); @@ -313,7 +334,7 @@ public final class GatheringSkillPulse extends SkillPulse { public void message(int type) { switch (type) { case 0: - player.getPacketDispatch().sendMessage("You swing your " + (mining ? "pickaxe at the rock..." : "axe at the tree...")); + player.getPacketDispatch().sendMessage("You swing your " + (isMining ? "pickaxe at the rock..." : "axe at the tree...")); if (TutorialSession.getExtension(player).getStage() == 6) { player.lock(7); TutorialStage.load(player, 7, false); @@ -326,7 +347,7 @@ public final class GatheringSkillPulse extends SkillPulse { * Sets the tool used. */ private SkillingTool setTool() { - if (!mining) { + if (!isMining) { tool = SkillingTool.getHatchet(player); } else { tool = SkillingTool.getPickaxe(player); From ea0c55deb5c0398a1b1f029c2d8b6e103a2a549d Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Sun, 22 Sep 2019 02:18:23 +1200 Subject: [PATCH 44/83] Fix always doubling gathering resources --- .../node/entity/player/info/portal/Perks.java | 72 +++++++++---------- 1 file changed, 34 insertions(+), 38 deletions(-) diff --git a/09HDscape-server/src/org/crandor/game/node/entity/player/info/portal/Perks.java b/09HDscape-server/src/org/crandor/game/node/entity/player/info/portal/Perks.java index a21749b80..7701e52fe 100644 --- a/09HDscape-server/src/org/crandor/game/node/entity/player/info/portal/Perks.java +++ b/09HDscape-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,22 +99,18 @@ public enum Perks { * @param maxRand the maximum rand value. * @return the item. */ - 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); - } + public static boolean addDouble(Player player, Item item, boolean ground, int maxRand) { + // 10 % chance to give an extra item + if (!player.hasPerk(DOUBLE_TROUBLE) || RandomFunction.random(maxRand) > 10) { return false; } - Item doubleI = new Item(original.getId(), original.getAmount() * 2); - player.getInventory().add(doubleI); - player.sendMessage("You get 2x " + original.getName().toLowerCase() + "."); + // Give the player an extra item! + 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!"); return true; } @@ -222,4 +218,4 @@ public enum Perks { return info; } -} \ No newline at end of file +} From 097f87b4312e0370bf267ad99968c8d33fae5cd1 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Sun, 22 Sep 2019 02:20:49 +1200 Subject: [PATCH 45/83] [events] Implement Harvesting doubles event --- .../game/content/skill/free/gather/SkillingResource.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/09HDscape-server/src/org/crandor/game/content/skill/free/gather/SkillingResource.java b/09HDscape-server/src/org/crandor/game/content/skill/free/gather/SkillingResource.java index bf31b0fd7..7f9011474 100644 --- a/09HDscape-server/src/org/crandor/game/content/skill/free/gather/SkillingResource.java +++ b/09HDscape-server/src/org/crandor/game/content/skill/free/gather/SkillingResource.java @@ -2,6 +2,7 @@ package org.crandor.game.content.skill.free.gather; import org.crandor.ServerConstants; import org.crandor.game.content.skill.Skills; +import org.crandor.game.events.GlobalEventManager; import org.crandor.game.world.repository.Repository; import org.crandor.game.world.update.flag.context.Animation; @@ -498,7 +499,7 @@ public enum SkillingResource { * @return The rewardAmount. */ public int getRewardAmount() { - return rewardAmount; + return GlobalEventManager.get().isActive("Harvesting doubles") ? rewardAmount * 2 : rewardAmount; } /** From 86d6a6074129c67a652727a8577e4c49890eccb5 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Sun, 22 Sep 2019 02:25:02 +1200 Subject: [PATCH 46/83] Revert "[events] Implement Harvesting doubles event" This reverts commit 097f87b4312e0370bf267ad99968c8d33fae5cd1. --- .../game/content/skill/free/gather/SkillingResource.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/09HDscape-server/src/org/crandor/game/content/skill/free/gather/SkillingResource.java b/09HDscape-server/src/org/crandor/game/content/skill/free/gather/SkillingResource.java index 7f9011474..bf31b0fd7 100644 --- a/09HDscape-server/src/org/crandor/game/content/skill/free/gather/SkillingResource.java +++ b/09HDscape-server/src/org/crandor/game/content/skill/free/gather/SkillingResource.java @@ -2,7 +2,6 @@ package org.crandor.game.content.skill.free.gather; import org.crandor.ServerConstants; import org.crandor.game.content.skill.Skills; -import org.crandor.game.events.GlobalEventManager; import org.crandor.game.world.repository.Repository; import org.crandor.game.world.update.flag.context.Animation; @@ -499,7 +498,7 @@ public enum SkillingResource { * @return The rewardAmount. */ public int getRewardAmount() { - return GlobalEventManager.get().isActive("Harvesting doubles") ? rewardAmount * 2 : rewardAmount; + return rewardAmount; } /** From 27c18ee65cb51ba7fba0782f17b31bf8a8fedc12 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Sun, 22 Sep 2019 09:50:35 +1200 Subject: [PATCH 47/83] [event] Implement Harvesting doubles event --- .../game/content/skill/free/gather/GatheringSkillPulse.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/09HDscape-server/src/org/crandor/game/content/skill/free/gather/GatheringSkillPulse.java b/09HDscape-server/src/org/crandor/game/content/skill/free/gather/GatheringSkillPulse.java index 91512510d..393bb723c 100644 --- a/09HDscape-server/src/org/crandor/game/content/skill/free/gather/GatheringSkillPulse.java +++ b/09HDscape-server/src/org/crandor/game/content/skill/free/gather/GatheringSkillPulse.java @@ -160,7 +160,7 @@ public final class GatheringSkillPulse extends SkillPulse { 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))); + player.getInventory().add(new Item(reward, (GlobalEventManager.get().isActive("Harvesting doubles") ? 2 : 1))); if (reward == SkillingResource.CLAY_0.getReward()) { if (player.getEquipment().contains(11074, 1)) { player.getSavedData().getGlobalData().incrementBraceletOfClay(); From 988ff71d90aa26c6eb91323ceabed3e441a825b8 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Sun, 22 Sep 2019 09:51:00 +1200 Subject: [PATCH 48/83] Formatting --- .../skill/free/gather/SkillingResource.java | 465 ++++++++++++++++-- 1 file changed, 435 insertions(+), 30 deletions(-) diff --git a/09HDscape-server/src/org/crandor/game/content/skill/free/gather/SkillingResource.java b/09HDscape-server/src/org/crandor/game/content/skill/free/gather/SkillingResource.java index bf31b0fd7..e0a372cbd 100644 --- a/09HDscape-server/src/org/crandor/game/content/skill/free/gather/SkillingResource.java +++ b/09HDscape-server/src/org/crandor/game/content/skill/free/gather/SkillingResource.java @@ -17,17 +17,67 @@ 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). @@ -37,14 +87,22 @@ 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). @@ -54,27 +112,39 @@ 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). @@ -89,29 +159,111 @@ 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). @@ -121,33 +273,192 @@ 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. */ @@ -156,8 +467,43 @@ 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. */ @@ -171,8 +517,51 @@ 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. */ @@ -181,8 +570,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), @@ -217,16 +606,32 @@ 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. From cec8e810823faf6ab9f1643d34a99ace2e72c6c2 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Sun, 22 Sep 2019 11:21:16 +1200 Subject: [PATCH 49/83] refactor code --- .../free/gather/GatheringSkillPulse.java | 48 +++++++++++-------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/09HDscape-server/src/org/crandor/game/content/skill/free/gather/GatheringSkillPulse.java b/09HDscape-server/src/org/crandor/game/content/skill/free/gather/GatheringSkillPulse.java index 393bb723c..234407d9d 100644 --- a/09HDscape-server/src/org/crandor/game/content/skill/free/gather/GatheringSkillPulse.java +++ b/09HDscape-server/src/org/crandor/game/content/skill/free/gather/GatheringSkillPulse.java @@ -152,15 +152,24 @@ public final class GatheringSkillPulse extends SkillPulse { } int reward = resource.getReward(); if (reward > 0) { + // Convert to pure essence if the player is above level 30 mining + if (isMiningEssence && player.getSkills().getLevel(Skills.MINING) >= 30) { + reward = 7936; + } applyAchievementTask(reward); + // 3239: Hollow tree (bark) 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("Harvesting doubles") ? 2 : 1))); + int amount = 1; + if (GlobalEventManager.get().isActive("Harvesting doubles")) { + amount *= 2; + } + player.getInventory().add(new Item(reward, amount)); if (reward == SkillingResource.CLAY_0.getReward()) { if (player.getEquipment().contains(11074, 1)) { player.getSavedData().getGlobalData().incrementBraceletOfClay(); @@ -197,18 +206,18 @@ public final class GatheringSkillPulse extends SkillPulse { } } if (isMining && 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 (isMining && 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) && isMining) { - 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!"); - } + player.getInventory().add(new Item(reward, 1)); + } else if (isMining && !isMiningEssence && 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, 1)); + player.sendMessage("Through the power of the varrock armour you receive an extra ore."); + } else if (isMining && !isMiningEssence && SkillcapePerks.hasSkillcapePerk(player, SkillcapePerks.MINING)) { + // If the player has a skillcape, 10% chance of finding extra + 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!"); } + } else { SkillingPets.checkPetDrop(player, isMining ? SkillingPets.GOLEM : SkillingPets.BEAVER); Perks.addDouble(player, new Item(reward, 1)); } @@ -247,11 +256,6 @@ public final class GatheringSkillPulse extends SkillPulse { } } } - if (isMining && 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); - } - } } if (tutorialStage == 7) { TutorialStage.load(player, 8, false); @@ -304,9 +308,6 @@ public final class GatheringSkillPulse extends SkillPulse { 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 (isMiningEssence && 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); } @@ -316,6 +317,11 @@ public final class GatheringSkillPulse extends SkillPulse { 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); + } + } } /** From 6535fc6b46ed43155f66d5876d094455d672080b Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Sun, 22 Sep 2019 12:56:21 +1200 Subject: [PATCH 50/83] Refactor, Add comments --- .../free/gather/GatheringSkillPulse.java | 245 +++++++++++------- .../node/entity/player/info/portal/Perks.java | 2 +- 2 files changed, 153 insertions(+), 94 deletions(-) diff --git a/09HDscape-server/src/org/crandor/game/content/skill/free/gather/GatheringSkillPulse.java b/09HDscape-server/src/org/crandor/game/content/skill/free/gather/GatheringSkillPulse.java index 234407d9d..c154bab09 100644 --- a/09HDscape-server/src/org/crandor/game/content/skill/free/gather/GatheringSkillPulse.java +++ b/09HDscape-server/src/org/crandor/game/content/skill/free/gather/GatheringSkillPulse.java @@ -43,12 +43,16 @@ public final class GatheringSkillPulse extends SkillPulse { */ 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. */ @@ -84,6 +88,7 @@ public final class GatheringSkillPulse extends SkillPulse { } isMining = resource.getSkillId() == Skills.MINING; isMiningEssence = resource == SkillingResource.RUNE_ESSENCE; + isMiningGems = resource.getReward() == SkillingResource.GEM_ROCK_0.getReward(); isWoodcutting = resource.getSkillId() == Skills.WOODCUTTING; super.start(); } @@ -152,87 +157,24 @@ public final class GatheringSkillPulse extends SkillPulse { } int reward = resource.getReward(); if (reward > 0) { - // Convert to pure essence if the player is above level 30 mining - if (isMiningEssence && player.getSkills().getLevel(Skills.MINING) >= 30) { - reward = 7936; - } + reward = calculateReward(reward); applyAchievementTask(reward); - // 3239: Hollow tree (bark) - if (reward != 3239 || RandomFunction.random(100) < 10) { - - 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); - } - int amount = 1; - if (GlobalEventManager.get().isActive("Harvesting doubles")) { - amount *= 2; - } - player.getInventory().add(new Item(reward, amount)); - 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 (isMining && player.getSavedData().getGlobalData().getStarSpriteDelay() > System.currentTimeMillis() && TimeUnit.MILLISECONDS.toMinutes(player.getSavedData().getGlobalData().getStarSpriteDelay() - System.currentTimeMillis()) >= 1425) { - player.getInventory().add(new Item(reward, 1)); - } else if (isMining && !isMiningEssence && 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, 1)); - player.sendMessage("Through the power of the varrock armour you receive an extra ore."); - } else if (isMining && !isMiningEssence && SkillcapePerks.hasSkillcapePerk(player, SkillcapePerks.MINING)) { - // If the player has a skillcape, 10% chance of finding extra - 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!"); - } - } else { - SkillingPets.checkPetDrop(player, isMining ? 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); - } + // Give the player the items + int rewardAmount = calculateRewardAmount(reward); + player.getInventory().add(new Item(reward, rewardAmount)); + // 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() + "."); } + // Calculate if the player should receive a bonus gem if (!isMiningEssence && isMining) { int chance = 282; boolean altered = false; @@ -256,23 +198,25 @@ 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); + } + } } + // Tutorial stuff, maybe? if (tutorialStage == 7) { TutorialStage.load(player, 8, false); } - if (!isMining) { - 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); + // not sure what this is exactly if (resource.getRespawnRate() != 0) { int charge = 1000 / resource.getRewardAmount(); node.setCharge(node.getCharge() - RandomFunction.random(charge, charge << 2)); @@ -322,6 +266,11 @@ public final class GatheringSkillPulse extends SkillPulse { 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); + } + } } /** @@ -335,6 +284,116 @@ public final class GatheringSkillPulse extends SkillPulse { 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 (GlobalEventManager.get().isActive("Harvesting doubles")) { + 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 skillcape, 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); + Perks.addDouble(player, new Item(reward, 1)); + + 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) { diff --git a/09HDscape-server/src/org/crandor/game/node/entity/player/info/portal/Perks.java b/09HDscape-server/src/org/crandor/game/node/entity/player/info/portal/Perks.java index 7701e52fe..43fd6fda6 100644 --- a/09HDscape-server/src/org/crandor/game/node/entity/player/info/portal/Perks.java +++ b/09HDscape-server/src/org/crandor/game/node/entity/player/info/portal/Perks.java @@ -104,7 +104,7 @@ public enum Perks { if (!player.hasPerk(DOUBLE_TROUBLE) || RandomFunction.random(maxRand) > 10) { return false; } - // Give the player an extra item! + // Give the player the extra item(s)! if (ground) { player.getInventory().add(item, player); } else { From 10c3c3da78352a0680f758f4b9caf26dfcbad9f3 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Sun, 22 Sep 2019 15:21:42 +1200 Subject: [PATCH 51/83] add event activate aliases, add eventdeactive command --- .../command/DeveloperCommandPlugin.java | 29 ++++++++++++++----- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/09HDscape-server/src/plugin/command/DeveloperCommandPlugin.java b/09HDscape-server/src/plugin/command/DeveloperCommandPlugin.java index 8ac20c6d2..8be8ae6f9 100644 --- a/09HDscape-server/src/plugin/command/DeveloperCommandPlugin.java +++ b/09HDscape-server/src/plugin/command/DeveloperCommandPlugin.java @@ -104,6 +104,8 @@ public final class DeveloperCommandPlugin extends CommandPlugin { @SuppressWarnings("deprecation") @Override public boolean parse(final Player player, String name, String[] args) { + String[] eventNameArr; + String eventName; switch (name) { case "find": try { @@ -179,12 +181,29 @@ public final class DeveloperCommandPlugin extends CommandPlugin { break; case "eventactivate": - String[] eventNameArr = Arrays.copyOfRange(args, 1, args.length); - String eventName = String.join(" ", eventNameArr); + case "eventstart": + case "eventbegin": + case "activateevent": + case "startevent": + case "beginevent": + eventNameArr = Arrays.copyOfRange(args, 1, args.length); + eventName = String.join(" ", eventNameArr); player.sendMessage("You have activated the " + eventName + " event!"); GlobalEventManager.get().activate(eventName, null); break; + case "eventdeactivate": + case "eventend": + case "eventfinish": + case "deactivateevent": + case "endevent": + case "finishevent": + eventNameArr = Arrays.copyOfRange(args, 1, args.length); + eventName = String.join(" ", eventNameArr); + player.sendMessage("You have deactivated the " + eventName + " event!"); + GlobalEventManager.get().activate(eventName, null); + break; + case "poison": player.getStateManager().set(EntityState.POISONED, 200, player); player.getConfigManager().set(102, 1); @@ -218,12 +237,6 @@ 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."); From 8f176e194453838dfafeb6b19c510214abb9663f Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Sun, 22 Sep 2019 15:22:54 +1200 Subject: [PATCH 52/83] refactor eventticks --- .../src/org/crandor/game/world/GameWorld.java | 25 +++++++------------ 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/09HDscape-server/src/org/crandor/game/world/GameWorld.java b/09HDscape-server/src/org/crandor/game/world/GameWorld.java index 40da8af5a..5f29517ff 100644 --- a/09HDscape-server/src/org/crandor/game/world/GameWorld.java +++ b/09HDscape-server/src/org/crandor/game/world/GameWorld.java @@ -135,10 +135,9 @@ public final class GameWorld { pulses.clear(); ticks++; eventTicks++; - int idx = new Random().nextInt(hourlyEvent.length); - String random = hourlyEvent[idx]; - switch(cfTicks++) { - case 50: + cfTicks++; + switch(cfTicks) { + case 100: if (checkDay()) { GlobalEventManager.get().activate("Clone Fest", null); if (GlobalEventManager.get().isActive("Clone Fest")) { @@ -163,34 +162,28 @@ public final class GameWorld { } } break; - case 1000: + case 1100: if (PVPAIPActions.pvp_players == null) { GlobalEventManager.get().deactivate("Clone Fest"); } break; case 1500: - if (PVPAIPActions.pvp_players == null) { - GlobalEventManager.get().deactivate("Clone Fest"); - } + GlobalEventManager.get().deactivate("Clone Fest"); break; case 1900: cfTicks = 0; break; } switch (eventTicks) { - case 100: - if (GlobalEventManager.get().getLastEvent() == random) { - random = (hourlyEvent[idx]); - } - String event = random; + // 2 minute gap between events + case 200: + int randomEventId = new Random().nextInt(hourlyEvent.length); + String event = hourlyEvent[randomEventId]; 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; From 059564e47ebf3c2b814347838dabe090feed0efd Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Sun, 22 Sep 2019 15:23:13 +1200 Subject: [PATCH 53/83] Update event handling, messages --- .../game/events/GlobalEventManager.java | 36 ++++++++++++------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java b/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java index 8fef61142..e6d11f322 100644 --- a/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java +++ b/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java @@ -61,10 +61,10 @@ public class GlobalEventManager implements CallBack { 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() + "."); + message("You have 30 minutes before the " + entry.getKey() + " event ends on world " + GameWorld.getSettings().getWorldId() + "."); if (entry.getValue() <= 0) { - message("The event " + entry.getKey() + " has now ended on world " + GameWorld.getSettings().getWorldId() + "."); + message("The " + entry.getKey() + " event has now ended on world " + GameWorld.getSettings().getWorldId() + "."); } } } @@ -166,11 +166,13 @@ public class GlobalEventManager implements CallBack { } - public GlobalEventManager deactivate(String eventName) { - - if (getEvents().get(eventName) == null) { - System.out.println("Failed to deactivate event " + eventName + "."); + return deactivate(eventName, false); + } + + public GlobalEventManager deactivate(String eventName, boolean forceMessage) { + // Only deactivate event if already active + if (!isActive(eventName) && !forceMessage) { return this; } @@ -179,14 +181,23 @@ public class GlobalEventManager implements CallBack { 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."); + message(eventName + " event has ended."); entry.setValue(0L); } } return this; } + public GlobalEventManager activate(String eventName) { + return activate(eventName, null, 6000); + } + public GlobalEventManager activate(String eventName, String name) { + return activate(eventName, name, 6000); + } + + public GlobalEventManager activate(String eventName, String name, int timeToAdd) { + if (timeToAdd <= 0) timeToAdd = 6000; Player player = Repository.getPlayerByDisplay(name); Boolean eventStarted = false; @@ -197,16 +208,15 @@ public class GlobalEventManager implements CallBack { 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); + notify("The " + eventName + " event is live, clones are located near the mage arena."); } else { - if (entry.getValue() != 0) { - message("The event " + eventName + " has been extended for another hour" + (player == null ? "" : " by " + player.getUsername()) + "."); + if (entry.getValue() == 0) { + message("The " + eventName + " event has been activated" + (player == null ? "" : " by " + player.getUsername()) + "."); } else { - message("The event " + eventName + " has been activated" + (player == null ? "" : " by " + player.getUsername()) + " on world " + GameWorld.getSettings().getWorldId() + "."); + message("The " + eventName + " event has been extended for another hour" + (player == null ? "" : " by " + player.getUsername()) + "."); } } - entry.setValue(entry.getValue() + 6000); + entry.setValue(entry.getValue() + timeToAdd); eventStarted = true; } } From 15465f20449c3195a507dc0cb452658258ae2808 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Sun, 22 Sep 2019 16:51:09 +1200 Subject: [PATCH 54/83] fixup add doubles --- .../global/consumable/CookingProperties.java | 4 +++- .../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 | 4 +++- .../free/gather/GatheringSkillPulse.java | 5 +++-- .../free/runecrafting/RuneCraftPulse.java | 6 ++++- .../skill/free/smithing/SmithingPulse.java | 4 +++- .../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 | 9 ++++++-- .../member/thieving/PickpocketPulse.java | 5 ++++- .../content/skill/member/thieving/Stall.java | 22 +++++++++++++++++-- .../member/thieving/StallThiefPulse.java | 3 ++- .../node/entity/player/info/portal/Perks.java | 4 ++-- .../object/ThievingGuidePlugin.java | 1 + .../src/plugin/zone/WildernessAreaZone.java | 4 +++- .../zone/neitiznot/YakArmourPlugin.java | 1 + 28 files changed, 105 insertions(+), 31 deletions(-) diff --git a/09HDscape-server/src/org/crandor/game/content/global/consumable/CookingProperties.java b/09HDscape-server/src/org/crandor/game/content/global/consumable/CookingProperties.java index f7b00070d..7404f4d2c 100644 --- a/09HDscape-server/src/org/crandor/game/content/global/consumable/CookingProperties.java +++ b/09HDscape-server/src/org/crandor/game/content/global/consumable/CookingProperties.java @@ -173,7 +173,9 @@ 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) { - Perks.addDouble(player, food.getItem()); + Item item = food.getItem(); + player.getInventory().add(item); + Perks.addDouble(player, item); } else { player.getInventory().add(food.getBurnt()); } diff --git a/09HDscape-server/src/org/crandor/game/content/skill/free/crafting/armour/DragonCraftPulse.java b/09HDscape-server/src/org/crandor/game/content/skill/free/crafting/armour/DragonCraftPulse.java index b63b7b59b..a021bef48 100644 --- a/09HDscape-server/src/org/crandor/game/content/skill/free/crafting/armour/DragonCraftPulse.java +++ b/09HDscape-server/src/org/crandor/game/content/skill/free/crafting/armour/DragonCraftPulse.java @@ -100,7 +100,9 @@ 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() + "."); } - Perks.addDouble(player, new Item(hide.getProduct())); + Item item = new Item(hide.getProduct()); + player.getInventory().add(item); + Perks.addDouble(player, item); 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/09HDscape-server/src/org/crandor/game/content/skill/free/crafting/armour/HardCraftPulse.java b/09HDscape-server/src/org/crandor/game/content/skill/free/crafting/armour/HardCraftPulse.java index 62ccff048..f8c6cb5fd 100644 --- a/09HDscape-server/src/org/crandor/game/content/skill/free/crafting/armour/HardCraftPulse.java +++ b/09HDscape-server/src/org/crandor/game/content/skill/free/crafting/armour/HardCraftPulse.java @@ -80,7 +80,9 @@ public final class HardCraftPulse extends SkillPulse { } } if (player.getInventory().remove(new Item(LeatherCrafting.HARD_LEATHER))) { - Perks.addDouble(player, new Item(1131)); + Item item = new Item(1131); + player.getInventory().add(item); + Perks.addDouble(player, item); 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/09HDscape-server/src/org/crandor/game/content/skill/free/crafting/armour/SnakeSkinPulse.java b/09HDscape-server/src/org/crandor/game/content/skill/free/crafting/armour/SnakeSkinPulse.java index 1ae842095..662ac7ac2 100644 --- a/09HDscape-server/src/org/crandor/game/content/skill/free/crafting/armour/SnakeSkinPulse.java +++ b/09HDscape-server/src/org/crandor/game/content/skill/free/crafting/armour/SnakeSkinPulse.java @@ -87,7 +87,9 @@ public final class SnakeSkinPulse extends SkillPulse { } } if (player.getInventory().remove(new Item(6289, skin.getRequiredAmount()))) { - Perks.addDouble(player, skin.getProduct()); + Item item = skin.getProduct(); + player.getInventory().add(item); + Perks.addDouble(player, item); 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/09HDscape-server/src/org/crandor/game/content/skill/free/crafting/armour/SoftCraftPulse.java b/09HDscape-server/src/org/crandor/game/content/skill/free/crafting/armour/SoftCraftPulse.java index 89e768130..0f88aaeb9 100644 --- a/09HDscape-server/src/org/crandor/game/content/skill/free/crafting/armour/SoftCraftPulse.java +++ b/09HDscape-server/src/org/crandor/game/content/skill/free/crafting/armour/SoftCraftPulse.java @@ -98,7 +98,9 @@ public final class SoftCraftPulse extends SkillPulse { } else { player.getPacketDispatch().sendMessage("You make " + (StringUtils.isPlusN(soft.getProduct().getName()) ? "an" : "a") + " " + soft.getProduct().getName().toLowerCase() + "."); } - Perks.addDouble(player, soft.getProduct()); + Item item = soft.getProduct(); + player.getInventory().add(item); + Perks.addDouble(player, item); 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/09HDscape-server/src/org/crandor/game/content/skill/free/crafting/gem/GemCutPulse.java b/09HDscape-server/src/org/crandor/game/content/skill/free/crafting/gem/GemCutPulse.java index d47723f23..d2be3e447 100644 --- a/09HDscape-server/src/org/crandor/game/content/skill/free/crafting/gem/GemCutPulse.java +++ b/09HDscape-server/src/org/crandor/game/content/skill/free/crafting/gem/GemCutPulse.java @@ -73,7 +73,9 @@ public final class GemCutPulse extends SkillPulse { return false; } if (player.getInventory().remove(gem.getUncut())) { - Perks.addDouble(player, gem.getGem()); + final Item item = gem.getGem(); + player.getInventory().add(item); + Perks.addDouble(player, item); player.getSkills().addExperience(Skills.CRAFTING, gem.getExp(), true); } amount--; diff --git a/09HDscape-server/src/org/crandor/game/content/skill/free/crafting/jewellery/JewelleryPulse.java b/09HDscape-server/src/org/crandor/game/content/skill/free/crafting/jewellery/JewelleryPulse.java index e53976ba8..9f4503338 100644 --- a/09HDscape-server/src/org/crandor/game/content/skill/free/crafting/jewellery/JewelleryPulse.java +++ b/09HDscape-server/src/org/crandor/game/content/skill/free/crafting/jewellery/JewelleryPulse.java @@ -66,7 +66,9 @@ public final class JewelleryPulse extends SkillPulse { return false; } if (player.getInventory().remove(getItems())) { - Perks.addDouble(player, new Item(type.getSendItem())); + final Item item = new Item(type.getSendItem()); + player.getInventory().add(item); + Perks.addDouble(player, item); player.getSkills().addExperience(Skills.CRAFTING, type.getExperience(), true); } amount--; diff --git a/09HDscape-server/src/org/crandor/game/content/skill/free/crafting/pottery/FirePotteryPulse.java b/09HDscape-server/src/org/crandor/game/content/skill/free/crafting/pottery/FirePotteryPulse.java index b1b365e94..332812f28 100644 --- a/09HDscape-server/src/org/crandor/game/content/skill/free/crafting/pottery/FirePotteryPulse.java +++ b/09HDscape-server/src/org/crandor/game/content/skill/free/crafting/pottery/FirePotteryPulse.java @@ -75,7 +75,9 @@ 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); } - Perks.addDouble(player, pottery.getProduct()); + final Item item = pottery.getProduct(); + player.getInventory().add(item); + Perks.addDouble(player, item); 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/09HDscape-server/src/org/crandor/game/content/skill/free/crafting/pottery/PotteryPulse.java b/09HDscape-server/src/org/crandor/game/content/skill/free/crafting/pottery/PotteryPulse.java index 33dc47729..b1402f08f 100644 --- a/09HDscape-server/src/org/crandor/game/content/skill/free/crafting/pottery/PotteryPulse.java +++ b/09HDscape-server/src/org/crandor/game/content/skill/free/crafting/pottery/PotteryPulse.java @@ -81,7 +81,9 @@ public final class PotteryPulse extends SkillPulse { if (pottery == PotteryItem.BOWL && player.getLocation().getX() == 3086) { player.setAttribute("spun-bowl", true); } - Perks.addDouble(player, pottery.getUnfinished()); + final Item item = pottery.getUnfinished(); + player.getInventory().add(item); + Perks.addDouble(player, item); 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/09HDscape-server/src/org/crandor/game/content/skill/free/crafting/spinning/SpinningPulse.java b/09HDscape-server/src/org/crandor/game/content/skill/free/crafting/spinning/SpinningPulse.java index acb4fa8d7..4a7ce739a 100644 --- a/09HDscape-server/src/org/crandor/game/content/skill/free/crafting/spinning/SpinningPulse.java +++ b/09HDscape-server/src/org/crandor/game/content/skill/free/crafting/spinning/SpinningPulse.java @@ -72,7 +72,9 @@ public final class SpinningPulse extends SkillPulse { return false; } if (player.getInventory().remove(new Item(type.getNeed(), 1))) { - Perks.addDouble(player, new Item(type.getProduct(), 1)); + final Item item = new Item(type.getProduct(), 1); + player.getInventory().add(item); + Perks.addDouble(player, item); player.getSkills().addExperience(Skills.CRAFTING, type.getExp(), true); } ammount--; diff --git a/09HDscape-server/src/org/crandor/game/content/skill/free/fishing/FishingPulse.java b/09HDscape-server/src/org/crandor/game/content/skill/free/fishing/FishingPulse.java index 706ab4be8..8536baa26 100644 --- a/09HDscape-server/src/org/crandor/game/content/skill/free/fishing/FishingPulse.java +++ b/09HDscape-server/src/org/crandor/game/content/skill/free/fishing/FishingPulse.java @@ -184,7 +184,9 @@ public final class FishingPulse extends SkillPulse { if (GlobalEventManager.get().isActive("Plenty of fish")) player.getInventory().add(fish.getItem()); SkillingPets.checkPetDrop(player, SkillingPets.HERON); - Perks.addDouble(player, fish.getItem()); + final Item item = fish.getItem(); + player.getInventory().add(item); + Perks.addDouble(player, item); player.getSkills().addExperience(Skills.FISHING, fish.getExperience(), true); message(2); if (TutorialSession.getExtension(player).getStage() == 13) { diff --git a/09HDscape-server/src/org/crandor/game/content/skill/free/gather/GatheringSkillPulse.java b/09HDscape-server/src/org/crandor/game/content/skill/free/gather/GatheringSkillPulse.java index c154bab09..fdbf32e89 100644 --- a/09HDscape-server/src/org/crandor/game/content/skill/free/gather/GatheringSkillPulse.java +++ b/09HDscape-server/src/org/crandor/game/content/skill/free/gather/GatheringSkillPulse.java @@ -161,7 +161,9 @@ public final class GatheringSkillPulse extends SkillPulse { applyAchievementTask(reward); // Give the player the items int rewardAmount = calculateRewardAmount(reward); - player.getInventory().add(new Item(reward, rewardAmount)); + 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); @@ -369,7 +371,6 @@ public final class GatheringSkillPulse extends SkillPulse { } SkillingPets.checkPetDrop(player, isMining ? SkillingPets.GOLEM : SkillingPets.BEAVER); - Perks.addDouble(player, new Item(reward, 1)); return amount; } diff --git a/09HDscape-server/src/org/crandor/game/content/skill/free/runecrafting/RuneCraftPulse.java b/09HDscape-server/src/org/crandor/game/content/skill/free/runecrafting/RuneCraftPulse.java index cb50dbe29..d2e958d04 100644 --- a/09HDscape-server/src/org/crandor/game/content/skill/free/runecrafting/RuneCraftPulse.java +++ b/09HDscape-server/src/org/crandor/game/content/skill/free/runecrafting/RuneCraftPulse.java @@ -175,6 +175,7 @@ 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); } @@ -193,7 +194,9 @@ public final class RuneCraftPulse extends SkillPulse { } } player.getSkills().addExperience(Skills.RUNECRAFTING, rune.getExperience() * 2, true); - Perks.addDouble(player, rune.getRune()); + Item runeItem = rune.getRune(); + player.getInventory().add(runeItem); + Perks.addDouble(player, runeItem); } } } @@ -300,6 +303,7 @@ 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; } diff --git a/09HDscape-server/src/org/crandor/game/content/skill/free/smithing/SmithingPulse.java b/09HDscape-server/src/org/crandor/game/content/skill/free/smithing/SmithingPulse.java index befee256e..2eb3beda5 100644 --- a/09HDscape-server/src/org/crandor/game/content/skill/free/smithing/SmithingPulse.java +++ b/09HDscape-server/src/org/crandor/game/content/skill/free/smithing/SmithingPulse.java @@ -80,7 +80,9 @@ public class SmithingPulse extends SkillPulse { return false; } player.getInventory().remove(new Item(bar.getBarType().getBarType(), bar.getSmithingType().getRequired())); - Perks.addDouble(player, (new Item(node.getId(), bar.getSmithingType().getProductAmount()))); + final Item item = new Item(node.getId(), bar.getSmithingType().getProductAmount()); + player.getInventory().add(item); + Perks.addDouble(player, item); 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/09HDscape-server/src/org/crandor/game/content/skill/member/farming/tool/SpadePulse.java b/09HDscape-server/src/org/crandor/game/content/skill/member/farming/tool/SpadePulse.java index 242214c03..96466cbfa 100644 --- a/09HDscape-server/src/org/crandor/game/content/skill/member/farming/tool/SpadePulse.java +++ b/09HDscape-server/src/org/crandor/game/content/skill/member/farming/tool/SpadePulse.java @@ -178,7 +178,9 @@ public final class SpadePulse extends ToolAction { * @return {@code True} if harvested. */ private boolean harvestPatch() { - Perks.addDouble(player, wrapper.getNode().getProduct()); + final Item item = wrapper.getNode().getProduct(); + player.getInventory().add(item); + Perks.addDouble(player, item); 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/09HDscape-server/src/org/crandor/game/content/skill/member/fletching/FletchingPulse.java b/09HDscape-server/src/org/crandor/game/content/skill/member/fletching/FletchingPulse.java index 4dbc6da9a..1edb91ab3 100644 --- a/09HDscape-server/src/org/crandor/game/content/skill/member/fletching/FletchingPulse.java +++ b/09HDscape-server/src/org/crandor/game/content/skill/member/fletching/FletchingPulse.java @@ -64,7 +64,9 @@ public final class FletchingPulse extends SkillPulse { return false; } if (player.getInventory().remove(fletch.getType().getLog())) { - Perks.addDouble(player, fletch.getProduct()); + final Item item = fletch.getProduct(); + player.getInventory().add(item); + Perks.addDouble(player, item); player.getSkills().addExperience(Skills.FLETCHING, fletch.getExperience(), true); String message = getMessage(); player.getPacketDispatch().sendMessage(message); diff --git a/09HDscape-server/src/org/crandor/game/content/skill/member/herblore/HerbTarPulse.java b/09HDscape-server/src/org/crandor/game/content/skill/member/herblore/HerbTarPulse.java index 6629d6130..111001e7e 100644 --- a/09HDscape-server/src/org/crandor/game/content/skill/member/herblore/HerbTarPulse.java +++ b/09HDscape-server/src/org/crandor/game/content/skill/member/herblore/HerbTarPulse.java @@ -84,7 +84,9 @@ 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())) { - Perks.addDouble(player, new Item(tar.getTar().getId(), 15)); + final Item item = new Item(tar.getTar().getId(), 15); + player.getInventory().add(item); + Perks.addDouble(player, item); 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/09HDscape-server/src/org/crandor/game/content/skill/member/herblore/HerblorePulse.java b/09HDscape-server/src/org/crandor/game/content/skill/member/herblore/HerblorePulse.java index 46f688179..81673840d 100644 --- a/09HDscape-server/src/org/crandor/game/content/skill/member/herblore/HerblorePulse.java +++ b/09HDscape-server/src/org/crandor/game/content/skill/member/herblore/HerblorePulse.java @@ -115,7 +115,9 @@ 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())) { - Perks.addDouble(player, potion.getProduct()); + final Item item = potion.getProduct(); + player.getInventory().add(item); + Perks.addDouble(player, item); 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); @@ -129,7 +131,9 @@ 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())) { - Perks.addDouble(player, potion.getProduct()); + final Item item = potion.getProduct(); + player.getInventory().add(item); + Perks.addDouble(player, item); 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/09HDscape-server/src/org/crandor/game/content/skill/member/hunter/bnet/BNetNode.java b/09HDscape-server/src/org/crandor/game/content/skill/member/hunter/bnet/BNetNode.java index 84685b6da..cacc5c9d4 100644 --- a/09HDscape-server/src/org/crandor/game/content/skill/member/hunter/bnet/BNetNode.java +++ b/09HDscape-server/src/org/crandor/game/content/skill/member/hunter/bnet/BNetNode.java @@ -74,7 +74,9 @@ public class BNetNode { public void reward(Player player, NPC npc) { if (!isBareHand(player)) { if (player.getInventory().remove(getJar())) { - Perks.addDouble(player, getReward()); + final Item item = getReward(); + player.getInventory().add(item); + Perks.addDouble(player, item); player.getSkills().addExperience(Skills.HUNTER, getExperience(player), true); } } else { diff --git a/09HDscape-server/src/org/crandor/game/content/skill/member/summoning/SummoningCreator.java b/09HDscape-server/src/org/crandor/game/content/skill/member/summoning/SummoningCreator.java index 757d1ce01..1bd68f9ac 100644 --- a/09HDscape-server/src/org/crandor/game/content/skill/member/summoning/SummoningCreator.java +++ b/09HDscape-server/src/org/crandor/game/content/skill/member/summoning/SummoningCreator.java @@ -168,7 +168,9 @@ public final class SummoningCreator { } } if (player.getInventory().remove(type.getRequired())) { - Perks.addDouble(player, type.getProduct()); + final Item item = type.getProduct(); + player.getInventory().add(item); + Perks.addDouble(player, item); player.getSkills().addExperience(Skills.SUMMONING, type.getExperience(), true); } } diff --git a/09HDscape-server/src/org/crandor/game/content/skill/member/thieving/Pickpocket.java b/09HDscape-server/src/org/crandor/game/content/skill/member/thieving/Pickpocket.java index 717f7a66f..3a5f518f5 100644 --- a/09HDscape-server/src/org/crandor/game/content/skill/member/thieving/Pickpocket.java +++ b/09HDscape-server/src/org/crandor/game/content/skill/member/thieving/Pickpocket.java @@ -162,6 +162,7 @@ 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); } @@ -169,12 +170,16 @@ 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(GlobalEventManager.get().isActive("Thieves jackpot")) { - loot[1] *= 3; + bonusMultiplier *= 3; } } - return new Item(loot[0], loot[1]); + return new Item(loot[0], loot[1] * bonusMultiplier); } /** diff --git a/09HDscape-server/src/org/crandor/game/content/skill/member/thieving/PickpocketPulse.java b/09HDscape-server/src/org/crandor/game/content/skill/member/thieving/PickpocketPulse.java index 03c196acc..9496154b1 100644 --- a/09HDscape-server/src/org/crandor/game/content/skill/member/thieving/PickpocketPulse.java +++ b/09HDscape-server/src/org/crandor/game/content/skill/member/thieving/PickpocketPulse.java @@ -12,6 +12,7 @@ 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; @@ -101,7 +102,9 @@ public final class PickpocketPulse extends SkillPulse { player.getAchievementDiaryManager().getDiary(DiaryType.LUMBRIDGE).updateTask(player, 1, 6, true); } player.getSkills().addExperience(Skills.THIEVING, type.getExperience(), true); - Perks.addDouble(player, type.getRandomLoot(player), true); + Item loot = type.getRandomLoot(player); + player.getInventory().add(loot); + Perks.addDouble(player, loot, true); player.getPacketDispatch().sendMessage(type.getRewardMessage().replace("@name", node.getName().toLowerCase())); } else { node.animate(NPC_ANIM); diff --git a/09HDscape-server/src/org/crandor/game/content/skill/member/thieving/Stall.java b/09HDscape-server/src/org/crandor/game/content/skill/member/thieving/Stall.java index e30d87cfe..0cbce9968 100644 --- a/09HDscape-server/src/org/crandor/game/content/skill/member/thieving/Stall.java +++ b/09HDscape-server/src/org/crandor/game/content/skill/member/thieving/Stall.java @@ -11,9 +11,27 @@ 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/09HDscape-server/src/org/crandor/game/content/skill/member/thieving/StallThiefPulse.java b/09HDscape-server/src/org/crandor/game/content/skill/member/thieving/StallThiefPulse.java index 81f43f946..73a7a42d2 100644 --- a/09HDscape-server/src/org/crandor/game/content/skill/member/thieving/StallThiefPulse.java +++ b/09HDscape-server/src/org/crandor/game/content/skill/member/thieving/StallThiefPulse.java @@ -96,7 +96,6 @@ 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); } @@ -106,6 +105,8 @@ 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/09HDscape-server/src/org/crandor/game/node/entity/player/info/portal/Perks.java b/09HDscape-server/src/org/crandor/game/node/entity/player/info/portal/Perks.java index 43fd6fda6..85f98211b 100644 --- a/09HDscape-server/src/org/crandor/game/node/entity/player/info/portal/Perks.java +++ b/09HDscape-server/src/org/crandor/game/node/entity/player/info/portal/Perks.java @@ -100,8 +100,8 @@ public enum Perks { * @return the item. */ public static boolean addDouble(Player player, Item item, boolean ground, int maxRand) { - // 10 % chance to give an extra item - if (!player.hasPerk(DOUBLE_TROUBLE) || RandomFunction.random(maxRand) > 10) { + // 5% chance to give an extra item + if (!player.hasPerk(DOUBLE_TROUBLE) || RandomFunction.random(maxRand) > 5) { return false; } // Give the player the extra item(s)! diff --git a/09HDscape-server/src/plugin/interaction/object/ThievingGuidePlugin.java b/09HDscape-server/src/plugin/interaction/object/ThievingGuidePlugin.java index 5ef9a8726..d8ae67bca 100644 --- a/09HDscape-server/src/plugin/interaction/object/ThievingGuidePlugin.java +++ b/09HDscape-server/src/plugin/interaction/object/ThievingGuidePlugin.java @@ -168,6 +168,7 @@ public class ThievingGuidePlugin extends OptionHandler { } tries++; } + player.getInventory().add(item); Perks.addDouble(player, item); } diff --git a/09HDscape-server/src/plugin/zone/WildernessAreaZone.java b/09HDscape-server/src/plugin/zone/WildernessAreaZone.java index 91cd8607e..2408b9fd4 100644 --- a/09HDscape-server/src/plugin/zone/WildernessAreaZone.java +++ b/09HDscape-server/src/plugin/zone/WildernessAreaZone.java @@ -235,7 +235,9 @@ public class WildernessAreaZone extends MapZone implements Plugin { } node.transform(8667); node.setAttribute("reward-tick", GameWorld.getTicks() + resource.getRespawnDuration()); - Perks.addDouble(player, new Item(resource.getReward())); + final Item item = new Item(resource.getReward()); + player.getInventory().add(item); + Perks.addDouble(player, item); player.getSkills().addExperience(resource.getSkillId(), resource.getExperience(), true); return true; } diff --git a/09HDscape-server/src/plugin/zone/neitiznot/YakArmourPlugin.java b/09HDscape-server/src/plugin/zone/neitiznot/YakArmourPlugin.java index 531d7a198..d1ab57236 100644 --- a/09HDscape-server/src/plugin/zone/neitiznot/YakArmourPlugin.java +++ b/09HDscape-server/src/plugin/zone/neitiznot/YakArmourPlugin.java @@ -139,6 +139,7 @@ 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); From aa6e69cff29d6d43b9095b3d1f88407347eca803 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Sun, 22 Sep 2019 16:51:29 +1200 Subject: [PATCH 55/83] [events] Implement Golden essence event --- .../game/content/skill/free/runecrafting/RuneCraftPulse.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/09HDscape-server/src/org/crandor/game/content/skill/free/runecrafting/RuneCraftPulse.java b/09HDscape-server/src/org/crandor/game/content/skill/free/runecrafting/RuneCraftPulse.java index d2e958d04..5593c9b88 100644 --- a/09HDscape-server/src/org/crandor/game/content/skill/free/runecrafting/RuneCraftPulse.java +++ b/09HDscape-server/src/org/crandor/game/content/skill/free/runecrafting/RuneCraftPulse.java @@ -3,6 +3,7 @@ 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.GlobalEventManager; 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; @@ -307,6 +308,10 @@ public final class RuneCraftPulse extends SkillPulse { if (player.hasPerk(Perks.RUNESTONE_KNOWLEDGE) && (altar == Altar.DEATH || altar == Altar.LAW || altar == Altar.COSMIC || altar == Altar.BLOOD || altar == Altar.NATURE)) { i *= 2; } + + if(GlobalEventManager.get().isActive("Golden essence")) { + i *= 2; + } return i != 0 ? i : 1; } From 9edca5beb529a35a01b8e483d642bdad6418965d Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Sun, 22 Sep 2019 18:17:47 +1200 Subject: [PATCH 56/83] Tick through event manager --- .../org/crandor/game/events/GlobalEventManager.java | 10 ++++++---- .../src/org/crandor/game/world/GameWorld.java | 12 ++---------- .../org/crandor/game/world/callback/CallbackHub.java | 3 ++- 3 files changed, 10 insertions(+), 15 deletions(-) diff --git a/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java b/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java index e6d11f322..d5929137e 100644 --- a/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java +++ b/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java @@ -58,18 +58,20 @@ public class GlobalEventManager implements CallBack { while(iterator.hasNext()) { Map.Entry entry = iterator.next(); + Long ticksRemaining = entry.getValue(); if (entry.getValue() > 0) { - entry.setValue(entry.getValue() - 1); - if (entry.getValue() == 3000) + entry.setValue(--ticksRemaining); + if (ticksRemaining == 3000) message("You have 30 minutes before the " + entry.getKey() + " event ends on world " + GameWorld.getSettings().getWorldId() + "."); - if (entry.getValue() <= 0) { + if (ticksRemaining <= 0) { message("The " + entry.getKey() + " event has now ended on world " + GameWorld.getSettings().getWorldId() + "."); } + System.out.println("The " + entry.getKey() + " event has " + ticksRemaining + " ticks remaining"); } } - if (tick == 50) { + if (tick == 100) { tick = 0; save(); } diff --git a/09HDscape-server/src/org/crandor/game/world/GameWorld.java b/09HDscape-server/src/org/crandor/game/world/GameWorld.java index 5f29517ff..8a2e289b7 100644 --- a/09HDscape-server/src/org/crandor/game/world/GameWorld.java +++ b/09HDscape-server/src/org/crandor/game/world/GameWorld.java @@ -139,7 +139,7 @@ public final class GameWorld { switch(cfTicks) { case 100: if (checkDay()) { - GlobalEventManager.get().activate("Clone Fest", null); + GlobalEventManager.get().activate("Clone Fest", null, 2000); if (GlobalEventManager.get().isActive("Clone Fest")) { int size = 20; if (PVPAIPActions.pvp_players == null) { @@ -162,15 +162,7 @@ public final class GameWorld { } } break; - case 1100: - if (PVPAIPActions.pvp_players == null) { - GlobalEventManager.get().deactivate("Clone Fest"); - } - break; - case 1500: - GlobalEventManager.get().deactivate("Clone Fest"); - break; - case 1900: + case 2100: cfTicks = 0; break; } diff --git a/09HDscape-server/src/org/crandor/game/world/callback/CallbackHub.java b/09HDscape-server/src/org/crandor/game/world/callback/CallbackHub.java index 9b2ab4cd6..606675a87 100644 --- a/09HDscape-server/src/org/crandor/game/world/callback/CallbackHub.java +++ b/09HDscape-server/src/org/crandor/game/world/callback/CallbackHub.java @@ -4,6 +4,7 @@ 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; @@ -40,7 +41,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() + "."); From 4531f75ec89147a5a88e3cfd5c5cdd7f55ff3993 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Sun, 22 Sep 2019 18:29:54 +1200 Subject: [PATCH 57/83] update messages, remove system print --- .../src/org/crandor/game/events/GlobalEventManager.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java b/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java index d5929137e..454a42764 100644 --- a/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java +++ b/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java @@ -62,12 +62,11 @@ public class GlobalEventManager implements CallBack { if (entry.getValue() > 0) { entry.setValue(--ticksRemaining); if (ticksRemaining == 3000) - message("You have 30 minutes before the " + entry.getKey() + " event ends on world " + GameWorld.getSettings().getWorldId() + "."); + message("You have 30 minutes before the " + entry.getKey() + " event ends."); if (ticksRemaining <= 0) { - message("The " + entry.getKey() + " event has now ended on world " + GameWorld.getSettings().getWorldId() + "."); + message("The " + entry.getKey() + " event has now ended."); } - System.out.println("The " + entry.getKey() + " event has " + ticksRemaining + " ticks remaining"); } } @@ -213,9 +212,9 @@ public class GlobalEventManager implements CallBack { notify("The " + eventName + " event is live, clones are located near the mage arena."); } else { if (entry.getValue() == 0) { - message("The " + eventName + " event has been activated" + (player == null ? "" : " by " + player.getUsername()) + "."); + message("The " + eventName + " event has been activated for " + Math.round(timeToAdd / 100) + " minutes" + (player == null ? "" : " by " + player.getUsername()) + "."); } else { - message("The " + eventName + " event has been extended for another hour" + (player == null ? "" : " by " + player.getUsername()) + "."); + message("The " + eventName + " event has been extended by " + Math.round(timeToAdd / 100) + " minutes" + (player == null ? "" : " by " + player.getUsername()) + "."); } } entry.setValue(entry.getValue() + timeToAdd); From 5ffab8abe3ff0e191bd62a398647fe5b906ddbd2 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Sun, 22 Sep 2019 18:32:28 +1200 Subject: [PATCH 58/83] remove unused --- .../src/org/crandor/game/events/GlobalEventManager.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java b/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java index 454a42764..ca44cbe29 100644 --- a/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java +++ b/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java @@ -5,8 +5,6 @@ import org.crandor.game.system.task.Pulse; import org.crandor.game.world.GameWorld; import org.crandor.game.world.callback.CallBack; import org.crandor.game.world.repository.Repository; -import org.crandor.net.amsc.MSPacketRepository; -import org.crandor.net.amsc.WorldCommunicator; import org.crandor.tools.mysql.Results; import java.util.HashMap; From 9e1d0588209c1f3c465949ef2826a8210cac0686 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Sun, 22 Sep 2019 21:04:13 +1200 Subject: [PATCH 59/83] on duplicate key update --- .../org/crandor/game/events/GlobalEventManager.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java b/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java index ca44cbe29..4db9c276a 100644 --- a/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java +++ b/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java @@ -92,18 +92,12 @@ public class GlobalEventManager implements CallBack { } public GlobalEventManager save() { - 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 `globalevents` "); @@ -116,6 +110,9 @@ public class GlobalEventManager implements CallBack { query.append(")"); + query.append(" ON DUPLICATE KEY UPDATE "); + query.append("eventTime='" + entry.getValue() + "'"); + GameWorld.getDatabaseManager().update("server", query.toString()); } From e195c7a8f78524206000eea40b3474d76f4c32c9 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Sun, 22 Sep 2019 21:07:31 +1200 Subject: [PATCH 60/83] rename table globalevents -> global_events --- .../src/org/crandor/game/events/GlobalEventManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java b/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java index 4db9c276a..bfc40be3a 100644 --- a/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java +++ b/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java @@ -100,7 +100,7 @@ public class GlobalEventManager implements CallBack { StringBuilder query = new StringBuilder(); - query.append("INSERT INTO `globalevents` "); + query.append("INSERT INTO `global_events` "); query.append("(`eventName`,`eventTime`,`worldId`)"); query.append(" VALUES("); @@ -123,7 +123,7 @@ public class GlobalEventManager implements CallBack { try { Results result = null; - result = new Results(GameWorld.getDatabaseManager().query("server", "SELECT * FROM `globalevents` WHERE worldid='" + GameWorld.getSettings().getWorldId() + "'")); + result = new Results(GameWorld.getDatabaseManager().query("server", "SELECT * FROM `global_events` WHERE worldid='" + GameWorld.getSettings().getWorldId() + "'")); while (!result.empty()) { String eventName = result.string("eventName"); From f828ef699ca5d40066566fe32c727d8d700f5855 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Sun, 22 Sep 2019 21:14:13 +1200 Subject: [PATCH 61/83] [events] fixup Golden essence multiplier --- .../game/content/skill/free/runecrafting/RuneCraftPulse.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/09HDscape-server/src/org/crandor/game/content/skill/free/runecrafting/RuneCraftPulse.java b/09HDscape-server/src/org/crandor/game/content/skill/free/runecrafting/RuneCraftPulse.java index 5593c9b88..5124458d6 100644 --- a/09HDscape-server/src/org/crandor/game/content/skill/free/runecrafting/RuneCraftPulse.java +++ b/09HDscape-server/src/org/crandor/game/content/skill/free/runecrafting/RuneCraftPulse.java @@ -310,7 +310,7 @@ public final class RuneCraftPulse extends SkillPulse { } if(GlobalEventManager.get().isActive("Golden essence")) { - i *= 2; + i *= 3; } return i != 0 ? i : 1; } From 78673774c20a4b78dc83825cd466fbaf6a2a4038 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Mon, 23 Sep 2019 00:12:43 +1200 Subject: [PATCH 62/83] [events] Convert to enum --- 09HDscape-server/src/org/crandor/Util.java | 30 +++ .../crandor/game/content/skill/Skills.java | 6 +- .../skill/free/fishing/FishingPulse.java | 4 +- .../free/gather/GatheringSkillPulse.java | 6 +- .../free/runecrafting/RuneCraftPulse.java | 4 +- .../skill/member/thieving/Pickpocket.java | 4 +- .../org/crandor/game/events/GlobalEvent.java | 77 +++++- .../game/events/GlobalEventManager.java | 254 ++++++------------ .../node/entity/npc/drop/NPCDropTables.java | 10 +- .../player/info/login/LoginConfiguration.java | 2 +- .../src/org/crandor/game/world/GameWorld.java | 23 +- .../command/DeveloperCommandPlugin.java | 25 +- .../inter/ExperienceLampInterface.java | 28 +- 13 files changed, 247 insertions(+), 226 deletions(-) create mode 100644 09HDscape-server/src/org/crandor/Util.java diff --git a/09HDscape-server/src/org/crandor/Util.java b/09HDscape-server/src/org/crandor/Util.java new file mode 100644 index 000000000..231ca4063 --- /dev/null +++ b/09HDscape-server/src/org/crandor/Util.java @@ -0,0 +1,30 @@ +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(); + name = name.replaceAll(" ", "_"); + return capitalize(name); + } + + public static String enumToString(String name) { + name = name.toLowerCase(); + name = name.replaceAll("_", " "); + return capitalize(name); + } +} diff --git a/09HDscape-server/src/org/crandor/game/content/skill/Skills.java b/09HDscape-server/src/org/crandor/game/content/skill/Skills.java index 78b559a5c..20d065a95 100644 --- a/09HDscape-server/src/org/crandor/game/content/skill/Skills.java +++ b/09HDscape-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.GlobalEventManager; +import org.crandor.game.events.GlobalEvent; 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 = 25; + public static final double EXPERIENCE_MULTIPLIER = 20; /** * The maximum experience multiplier. @@ -258,7 +258,7 @@ public final class Skills { if (!(entity instanceof Player)) { return 1.0; } - double mod = multiplyer ? (GlobalEventManager.get().isActive("XP Fever") ? EXPERIENCE_MULTIPLIER * 2 : EXPERIENCE_MULTIPLIER) : 1; + double mod = multiplyer ? (GlobalEvent.XP_FEVER.isActive() ? EXPERIENCE_MULTIPLIER * 2 : EXPERIENCE_MULTIPLIER) : 1; Player p = (Player) entity; if (p.getIronmanManager().getMode() == IronmanMode.ULTIMATE) { mod /= 4; diff --git a/09HDscape-server/src/org/crandor/game/content/skill/free/fishing/FishingPulse.java b/09HDscape-server/src/org/crandor/game/content/skill/free/fishing/FishingPulse.java index 8536baa26..1fc9d7e75 100644 --- a/09HDscape-server/src/org/crandor/game/content/skill/free/fishing/FishingPulse.java +++ b/09HDscape-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.GlobalEventManager; +import org.crandor.game.events.GlobalEvent; 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,7 +181,7 @@ public final class FishingPulse extends SkillPulse { player.getSkillTasks().decreaseTask(player, SkillTasks.FTUNA2); } - if (GlobalEventManager.get().isActive("Plenty of fish")) + if (GlobalEvent.PLENTY_OF_FISH.isActive()) player.getInventory().add(fish.getItem()); SkillingPets.checkPetDrop(player, SkillingPets.HERON); final Item item = fish.getItem(); diff --git a/09HDscape-server/src/org/crandor/game/content/skill/free/gather/GatheringSkillPulse.java b/09HDscape-server/src/org/crandor/game/content/skill/free/gather/GatheringSkillPulse.java index fdbf32e89..0a1dbe7cc 100644 --- a/09HDscape-server/src/org/crandor/game/content/skill/free/gather/GatheringSkillPulse.java +++ b/09HDscape-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.GlobalEventManager; +import org.crandor.game.events.GlobalEvent; 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; @@ -344,7 +344,7 @@ public final class GatheringSkillPulse extends SkillPulse { private int calculateRewardAmount(int reward) { int amount = 1; // Event doubles resources - if (GlobalEventManager.get().isActive("Harvesting doubles")) { + if (GlobalEvent.HARVESTING_DOUBLES.isActive()) { amount *= 2; } @@ -358,7 +358,7 @@ public final class GatheringSkillPulse extends SkillPulse { amount += 1; player.sendMessage("Through the power of the varrock armour you receive an extra ore."); } - // If the player has a skillcape, 10% chance of finding an extra item + // 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!"); diff --git a/09HDscape-server/src/org/crandor/game/content/skill/free/runecrafting/RuneCraftPulse.java b/09HDscape-server/src/org/crandor/game/content/skill/free/runecrafting/RuneCraftPulse.java index 5124458d6..61f22188f 100644 --- a/09HDscape-server/src/org/crandor/game/content/skill/free/runecrafting/RuneCraftPulse.java +++ b/09HDscape-server/src/org/crandor/game/content/skill/free/runecrafting/RuneCraftPulse.java @@ -3,7 +3,7 @@ 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.GlobalEventManager; +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; @@ -309,7 +309,7 @@ public final class RuneCraftPulse extends SkillPulse { i *= 2; } - if(GlobalEventManager.get().isActive("Golden essence")) { + if(GlobalEvent.GOLDEN_ESSENCE.isActive()) { i *= 3; } return i != 0 ? i : 1; diff --git a/09HDscape-server/src/org/crandor/game/content/skill/member/thieving/Pickpocket.java b/09HDscape-server/src/org/crandor/game/content/skill/member/thieving/Pickpocket.java index 3a5f518f5..18078dc8e 100644 --- a/09HDscape-server/src/org/crandor/game/content/skill/member/thieving/Pickpocket.java +++ b/09HDscape-server/src/org/crandor/game/content/skill/member/thieving/Pickpocket.java @@ -2,7 +2,7 @@ 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.GlobalEventManager; +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; @@ -175,7 +175,7 @@ public enum Pickpocket { // Calculate any bonus multipliers int bonusMultiplier = 1; if (loot[0] == 995) { - if(GlobalEventManager.get().isActive("Thieves jackpot")) { + if(GlobalEvent.THIEVES_JACKPOT.isActive()) { bonusMultiplier *= 3; } } diff --git a/09HDscape-server/src/org/crandor/game/events/GlobalEvent.java b/09HDscape-server/src/org/crandor/game/events/GlobalEvent.java index a1b4221a1..12c868da8 100644 --- a/09HDscape-server/src/org/crandor/game/events/GlobalEvent.java +++ b/09HDscape-server/src/org/crandor/game/events/GlobalEvent.java @@ -1,30 +1,83 @@ package org.crandor.game.events; -public class GlobalEvent { +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 x PVP clones have been spawned in the wilderness near the mage bank."), // 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; - private String eventName; - private long remainingTicks; + GlobalEvent(final String eventDescription) { + this.eventName = Util.enumToString(this.name());; + this.eventDescription = eventDescription; + this.remainingTicks = 0L; + } - public String getEventName() { + public String getName() { return this.eventName; } - public long getRemainingTicks() { + public String getDescription() { + return this.eventDescription; + } + + public Long getRemainingTicks() { return this.remainingTicks; } - public GlobalEvent(String eventName, long ticks) { - this.eventName = eventName; + public GlobalEvent setRemainingTicks(Long ticks) { this.remainingTicks = ticks; - } - - public GlobalEvent process() { - remainingTicks--; return this; } + public Boolean isActive() { + return this.remainingTicks > 0; + } + + public GlobalEvent tick() { + remainingTicks--; + return this; + } + + // Start/Extend the event public GlobalEvent extend() { - remainingTicks += 6000; + 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); return this; } diff --git a/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java b/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java index bfc40be3a..6e43d5472 100644 --- a/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java +++ b/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java @@ -20,25 +20,12 @@ import java.util.Map.Entry; */ public class GlobalEventManager implements CallBack { - private static Map EVENTS = new HashMap(); - private long tick = 0; - private String lastEvent; - private String currentEvent; + private GlobalEvent lastEvent; + private GlobalEvent 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); - getEvents().put("XP Fever", 0L); - } catch (Exception e) { - e.printStackTrace(); - } return this; } @@ -48,23 +35,17 @@ public class GlobalEventManager implements CallBack { @Override public boolean pulse() { - - tick++; - - Iterator> iterator = EVENTS.entrySet().iterator(); - - while(iterator.hasNext()) { - Map.Entry entry = iterator.next(); - Long ticksRemaining = entry.getValue(); - if (entry.getValue() > 0) { - entry.setValue(--ticksRemaining); - if (ticksRemaining == 3000) - message("You have 30 minutes before the " + entry.getKey() + " event ends."); + for(GlobalEvent event : GlobalEvent.values()){ + Long ticksRemaining = event.getRemainingTicks(); + if (ticksRemaining > 0) { + event.tick(); + --ticksRemaining; + if (ticksRemaining % 3000 == 0) + message("You have " + Math.round(ticksRemaining / 100) + " minutes before the " + event.getName() + " event ends."); - if (ticksRemaining <= 0) { - message("The " + entry.getKey() + " event has now ended."); - } + if (ticksRemaining <= 0) + message("The " + event.getName() + " event has now ended."); } } @@ -80,23 +61,12 @@ public class GlobalEventManager implements CallBack { } - 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 void reActivate(GlobalEvent event, long time) { + event.setRemainingTicks(time); } public GlobalEventManager save() { - Iterator> iterator = EVENTS.entrySet().iterator(); - - while(iterator.hasNext()) { - - Map.Entry entry = iterator.next(); + for(GlobalEvent event : GlobalEvent.values()){ StringBuilder query = new StringBuilder(); @@ -104,14 +74,14 @@ public class GlobalEventManager implements CallBack { query.append("(`eventName`,`eventTime`,`worldId`)"); query.append(" VALUES("); - query.append("'" + entry.getKey() + "'").append(","); - query.append("'" + entry.getValue() + "'").append(","); + query.append("'" + event.getName() + "'").append(","); + query.append("'" + event.getRemainingTicks() + "'").append(","); query.append("'" + GameWorld.getSettings().getWorldId() + "'"); query.append(")"); query.append(" ON DUPLICATE KEY UPDATE "); - query.append("eventTime='" + entry.getValue() + "'"); + query.append("eventTime='" + event.getRemainingTicks() + "'"); GameWorld.getDatabaseManager().update("server", query.toString()); @@ -121,17 +91,15 @@ public class GlobalEventManager implements CallBack { public GlobalEventManager load() { try { - Results result = null; - - result = new Results(GameWorld.getDatabaseManager().query("server", "SELECT * FROM `global_events` WHERE worldid='" + GameWorld.getSettings().getWorldId() + "'")); + Results result = new Results(GameWorld.getDatabaseManager().query("server", "SELECT * FROM `global_events` WHERE worldid='" + GameWorld.getSettings().getWorldId() + "'")); while (!result.empty()) { String eventName = result.string("eventName"); String eventTime = result.string("eventTime"); - reActivate(eventName, Long.valueOf(eventTime)); + GlobalEvent event = getEvent(eventName); + reActivate(event, Long.valueOf(eventTime)); } - } catch(Exception e) { e.printStackTrace(); } @@ -147,11 +115,11 @@ public class GlobalEventManager implements CallBack { } public GlobalEventManager notify(String message) { - return message(message, true, ""); + return message(message, true, ""); } public GlobalEventManager notify(String message, boolean tag) { - return message(message, tag, ""); + return message(message, tag, ""); } public GlobalEventManager message(String message, boolean tag, String color) { @@ -159,151 +127,83 @@ public class GlobalEventManager implements CallBack { player.getPacketDispatch().sendMessage(color + (tag ? "[Event Manager] " : "") + message); } return this; - } - public GlobalEventManager deactivate(String eventName) { - return deactivate(eventName, false); - } - - public GlobalEventManager deactivate(String eventName, boolean forceMessage) { + public GlobalEventManager deactivate(GlobalEvent event) { // Only deactivate event if already active - if (!isActive(eventName) && !forceMessage) { + if (!event.isActive()) { return this; } - - Iterator> iterator = EVENTS.entrySet().iterator(); - - while(iterator.hasNext()) { - Map.Entry entry = (Map.Entry) iterator.next(); - if (entry.getKey().equalsIgnoreCase(eventName)) { - message(eventName + " event has ended."); - entry.setValue(0L); - } - } + + // Event will end in 2 ticks + event.setRemainingTicks(2L); return this; } - public GlobalEventManager activate(String eventName) { - return activate(eventName, null, 6000); + public GlobalEventManager activate(GlobalEvent event) { + return activate(event, null, 6000); } - public GlobalEventManager activate(String eventName, String name) { - return activate(eventName, name, 6000); + public GlobalEventManager activate(GlobalEvent event, String name) { + return activate(event, name, 6000); } - public GlobalEventManager activate(String eventName, String name, int timeToAdd) { + public GlobalEventManager activate(GlobalEvent event, String name, int timeToAdd) { if (timeToAdd <= 0) timeToAdd = 6000; - + event.start(timeToAdd); + Player player = Repository.getPlayerByDisplay(name); - Boolean eventStarted = false; - - Iterator> iterator = EVENTS.entrySet().iterator(); - - while(iterator.hasNext()) { - Map.Entry entry = (Map.Entry) iterator.next(); - if (entry.getKey().equalsIgnoreCase(eventName)) { - if (eventName.equalsIgnoreCase("clone fest")) { - notify("The " + eventName + " event is live, clones are located near the mage arena."); - } else { - if (entry.getValue() == 0) { - message("The " + eventName + " event has been activated for " + Math.round(timeToAdd / 100) + " minutes" + (player == null ? "" : " by " + player.getUsername()) + "."); - } else { - message("The " + eventName + " event has been extended by " + Math.round(timeToAdd / 100) + " minutes" + (player == null ? "" : " by " + player.getUsername()) + "."); - } - } - entry.setValue(entry.getValue() + timeToAdd); - eventStarted = true; - } + + 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()); } - if (!eventStarted) { - player.sendMessage("Failed to activate event " + eventName + "."); + message.append("."); + + message(message.toString()); + player.getPacketDispatch().sendMessage(event.getDescription()); + + return this; + } + + public GlobalEventManager activateHourly(GlobalEvent event) { + event.start(6000); + message(event.getName() + " is now active, and will run for an hour!"); + for (Player player : Repository.getPlayers()) { + player.getPacketDispatch().sendMessage(event.getDescription()); } return this; } - 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 3x 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; - case "XP Fever": - player.getPacketDispatch().sendMessages("This event means you'll receive x2 XP"); - break; - - } - } - entry.setValue(entry.getValue() + 6000); - } - } - return this; - } - - 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 boolean isActive(GlobalEvent event) { + return event.isActive(); } public GlobalEventManager alert(Player player) { boolean active = false; - Iterator> i = EVENTS.entrySet().iterator(); - - while(i.hasNext()) { - Map.Entry entry = (Map.Entry) i.next(); - if (entry.getValue() > 0) { - active = true; + + for(GlobalEvent event : GlobalEvent.values()){ + if (event.isActive()) { + active = true; } } + if (!active) { player.sendMessage("No events are currently active."); return this; } - player.sendMessage("The following events are active:"); - Iterator> iterator = EVENTS.entrySet().iterator(); - while(iterator.hasNext()) { - Map.Entry entry = (Map.Entry) iterator.next(); - if (entry.getValue() > 0) { - player.sendMessage(" [-] " + entry.getKey() + "."); + player.sendMessage("The following events are active:"); + + for(GlobalEvent event : GlobalEvent.values()){ + if (event.isActive()) { + player.sendMessage(" [-] " + event.getName() + "."); } } + return this; } @@ -319,24 +219,28 @@ public class GlobalEventManager implements CallBack { return true; } - public static Map getEvents() { - return EVENTS; + public static GlobalEvent getEvent(String name) { + for(GlobalEvent event : GlobalEvent.values()){ + if (event.getName().equalsIgnoreCase(name)) + return event; + } + return null; } - public String getLastEvent() { + public GlobalEvent getLastEvent() { return lastEvent; } - public void setLastEvent(String lastEvent) { - this.lastEvent = lastEvent; + public void setLastEvent(GlobalEvent event) { + this.lastEvent = event; } - public String getCurrentEvent() { + public GlobalEvent getCurrentEvent() { return currentEvent; } - public void setCurrentEvent(String currentEvent) { - this.currentEvent = currentEvent; + public void setCurrentEvent(GlobalEvent event) { + this.currentEvent = event; } diff --git a/09HDscape-server/src/org/crandor/game/node/entity/npc/drop/NPCDropTables.java b/09HDscape-server/src/org/crandor/game/node/entity/npc/drop/NPCDropTables.java index 200103d7d..a821873f8 100644 --- a/09HDscape-server/src/org/crandor/game/node/entity/npc/drop/NPCDropTables.java +++ b/09HDscape-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.GlobalEventManager; +import org.crandor.game.events.GlobalEvent; 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 (GlobalEventManager.get().isActive("Try your luck")) + if (GlobalEvent.TRY_YOUR_LUCK.isActive()) amount *= 1.4; - if (GlobalEventManager.get().isActive("Crazy Seeds") && ItemDefinition.forId(item.getId()).getName().toLowerCase().contains("seed")) + if (GlobalEvent.CRAZY_SEEDS.isActive() && ItemDefinition.forId(item.getId()).getName().toLowerCase().contains("seed")) amount *= 2; - if (GlobalEventManager.get().isActive("Charmed") && ItemDefinition.forId(item.getId()).getName().toLowerCase().contains("charm")) + if (GlobalEvent.CHARMED.isActive() && ItemDefinition.forId(item.getId()).getName().toLowerCase().contains("charm")) amount *= 2; if (npc.getName().startsWith("Revenant") && item.getName().equalsIgnoreCase("coins")) { break; @@ -181,7 +181,7 @@ public final class NPCDropTables { if (handleBoneCrusher(player, item)) { return; } - if (item.getId() == 995 && player.getBank().hasSpaceFor(item) && ( player.getGlobalData().isEnableCoinMachine() || GlobalEventManager.get().isActive("Golden retriever") )) { + if (item.getId() == 995 && player.getBank().hasSpaceFor(item) && ( player.getGlobalData().isEnableCoinMachine() || GlobalEvent.GOLDEN_RETRIEVER.isActive() )) { 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."); diff --git a/09HDscape-server/src/org/crandor/game/node/entity/player/info/login/LoginConfiguration.java b/09HDscape-server/src/org/crandor/game/node/entity/player/info/login/LoginConfiguration.java index 4b88e12b8..3aa75fd32 100644 --- a/09HDscape-server/src/org/crandor/game/node/entity/player/info/login/LoginConfiguration.java +++ b/09HDscape-server/src/org/crandor/game/node/entity/player/info/login/LoginConfiguration.java @@ -154,7 +154,7 @@ 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."); diff --git a/09HDscape-server/src/org/crandor/game/world/GameWorld.java b/09HDscape-server/src/org/crandor/game/world/GameWorld.java index 8a2e289b7..261762e15 100644 --- a/09HDscape-server/src/org/crandor/game/world/GameWorld.java +++ b/09HDscape-server/src/org/crandor/game/world/GameWorld.java @@ -4,6 +4,7 @@ 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; @@ -105,7 +106,18 @@ public final class GameWorld { getEvents().put("Thieves jackpot", 0L); getEvents().put("Golden essence", 0L); */ - public static String[] hourlyEvent = {"Alchemy hellenistic", "Golden retriever", "Harvesting doubles", "Thieves jackpot", "Golden essence"}; + 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, + }; /** * Pulses all current pulses. @@ -139,8 +151,9 @@ public final class GameWorld { switch(cfTicks) { case 100: if (checkDay()) { - GlobalEventManager.get().activate("Clone Fest", null, 2000); - if (GlobalEventManager.get().isActive("Clone Fest")) { + // Activate clone fest for 15 minutes + GlobalEventManager.get().activate(GlobalEvent.CLONE_FEST, null, 1500); + if (GlobalEvent.CLONE_FEST.isActive()) { int size = 20; if (PVPAIPActions.pvp_players == null) { PVPAIPActions.pvp_players = new ArrayList<>(); @@ -169,8 +182,8 @@ public final class GameWorld { switch (eventTicks) { // 2 minute gap between events case 200: - int randomEventId = new Random().nextInt(hourlyEvent.length); - String event = hourlyEvent[randomEventId]; + int randomEventId = new Random().nextInt(hourlyEvents.length); + GlobalEvent event = hourlyEvents[randomEventId]; GlobalEventManager.get().setLastEvent(event); GlobalEventManager.get().setCurrentEvent(event); diff --git a/09HDscape-server/src/plugin/command/DeveloperCommandPlugin.java b/09HDscape-server/src/plugin/command/DeveloperCommandPlugin.java index 8be8ae6f9..d01108610 100644 --- a/09HDscape-server/src/plugin/command/DeveloperCommandPlugin.java +++ b/09HDscape-server/src/plugin/command/DeveloperCommandPlugin.java @@ -1,16 +1,13 @@ 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; @@ -18,6 +15,7 @@ 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; @@ -50,9 +48,6 @@ 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; @@ -106,6 +101,7 @@ public final class DeveloperCommandPlugin extends CommandPlugin { public boolean parse(final Player player, String name, String[] args) { String[] eventNameArr; String eventName; + GlobalEvent event; switch (name) { case "find": try { @@ -188,8 +184,11 @@ public final class DeveloperCommandPlugin extends CommandPlugin { 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 " + eventName + " event!"); - GlobalEventManager.get().activate(eventName, null); break; case "eventdeactivate": @@ -200,8 +199,11 @@ public final class DeveloperCommandPlugin extends CommandPlugin { 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 " + eventName + " event!"); - GlobalEventManager.get().activate(eventName, null); break; case "poison": @@ -211,11 +213,8 @@ public final class DeveloperCommandPlugin extends CommandPlugin { break; case "activatecf": - String target = ""; - 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")) { + GlobalEventManager.get().activate(GlobalEvent.CLONE_FEST); + if (GlobalEvent.CLONE_FEST.isActive()) { int size = 20; if (PVPAIPActions.pvp_players == null) { player.setAttribute("aip_legion", PVPAIPActions.pvp_players = new ArrayList<>()); diff --git a/09HDscape-server/src/plugin/interaction/inter/ExperienceLampInterface.java b/09HDscape-server/src/plugin/interaction/inter/ExperienceLampInterface.java index e4b4003a7..e67ed1fa1 100644 --- a/09HDscape-server/src/plugin/interaction/inter/ExperienceLampInterface.java +++ b/09HDscape-server/src/plugin/interaction/inter/ExperienceLampInterface.java @@ -76,9 +76,9 @@ public final class ExperienceLampInterface extends ComponentPlugin { player.getAudioManager().send(SOUND); player.getInventory().remove(lamp); player.getInterfaceManager().close(); - int x = player.getSkills().getStaticLevel(skillType.skill); + int skillLevel = player.getSkills().getStaticLevel(skillType.skill); int modifier = 10; - double experience = x * modifier; + double experience = skillLevel * 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; @@ -99,7 +99,29 @@ 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}. From 059032c01a5b7576f5d154ab6b8c542082feb4b5 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Mon, 23 Sep 2019 00:39:53 +1200 Subject: [PATCH 63/83] [events] fixup some things --- 09HDscape-server/src/org/crandor/Util.java | 3 +-- .../org/crandor/game/events/GlobalEventManager.java | 10 ++++++---- .../src/plugin/command/DeveloperCommandPlugin.java | 4 ++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/09HDscape-server/src/org/crandor/Util.java b/09HDscape-server/src/org/crandor/Util.java index 231ca4063..0eb38f57f 100644 --- a/09HDscape-server/src/org/crandor/Util.java +++ b/09HDscape-server/src/org/crandor/Util.java @@ -18,8 +18,7 @@ public class Util { public static String strToEnum(String name) { name = name.toUpperCase(); - name = name.replaceAll(" ", "_"); - return capitalize(name); + return name.replaceAll(" ", "_"); } public static String enumToString(String name) { diff --git a/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java b/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java index 6e43d5472..43f1318e3 100644 --- a/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java +++ b/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java @@ -1,5 +1,6 @@ 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; @@ -150,7 +151,6 @@ public class GlobalEventManager implements CallBack { public GlobalEventManager activate(GlobalEvent event, String name, int timeToAdd) { if (timeToAdd <= 0) timeToAdd = 6000; - event.start(timeToAdd); Player player = Repository.getPlayerByDisplay(name); @@ -162,7 +162,9 @@ public class GlobalEventManager implements CallBack { message.append(" by " + player.getUsername()); } message.append("."); - + + // start the event after building the string + event.start(timeToAdd); message(message.toString()); player.getPacketDispatch().sendMessage(event.getDescription()); @@ -171,7 +173,7 @@ public class GlobalEventManager implements CallBack { public GlobalEventManager activateHourly(GlobalEvent event) { event.start(6000); - message(event.getName() + " is now active, and will run for an hour!"); + message(event.getName() + " event is now active, and will run for an hour!"); for (Player player : Repository.getPlayers()) { player.getPacketDispatch().sendMessage(event.getDescription()); } @@ -221,7 +223,7 @@ public class GlobalEventManager implements CallBack { public static GlobalEvent getEvent(String name) { for(GlobalEvent event : GlobalEvent.values()){ - if (event.getName().equalsIgnoreCase(name)) + if (event.getName().equalsIgnoreCase(name) || event.name().equalsIgnoreCase(Util.strToEnum(name))) return event; } return null; diff --git a/09HDscape-server/src/plugin/command/DeveloperCommandPlugin.java b/09HDscape-server/src/plugin/command/DeveloperCommandPlugin.java index d01108610..d9d4d8a36 100644 --- a/09HDscape-server/src/plugin/command/DeveloperCommandPlugin.java +++ b/09HDscape-server/src/plugin/command/DeveloperCommandPlugin.java @@ -188,7 +188,7 @@ public final class DeveloperCommandPlugin extends CommandPlugin { if (event == null) break; GlobalEventManager.get().activate(event); - player.sendMessage("You have activated the " + eventName + " event!"); + player.sendMessage("You have activated the " + event.getName() + " event!"); break; case "eventdeactivate": @@ -203,7 +203,7 @@ public final class DeveloperCommandPlugin extends CommandPlugin { if (event == null) break; GlobalEventManager.get().deactivate(event); - player.sendMessage("You have deactivated the " + eventName + " event!"); + player.sendMessage("You have deactivated the " + event.getName() + " event!"); break; case "poison": From 47705aba6e8c2c9e25a50325339fda2beaad7eaf Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Mon, 23 Sep 2019 00:53:29 +1200 Subject: [PATCH 64/83] fixup --- .../src/org/crandor/game/events/GlobalEventManager.java | 5 ----- .../plugin/interaction/inter/ExperienceLampInterface.java | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java b/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java index 43f1318e3..514ab826c 100644 --- a/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java +++ b/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java @@ -8,11 +8,6 @@ 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. * diff --git a/09HDscape-server/src/plugin/interaction/inter/ExperienceLampInterface.java b/09HDscape-server/src/plugin/interaction/inter/ExperienceLampInterface.java index e67ed1fa1..e1a204fed 100644 --- a/09HDscape-server/src/plugin/interaction/inter/ExperienceLampInterface.java +++ b/09HDscape-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.GlobalEventManager; +import org.crandor.game.events.GlobalEvent; 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; @@ -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 * (GlobalEventManager.get().isActive("XP Fever") ? 2 : 1))) + " " + Skills.SKILL_NAME[skillType.skill] + " experience." }); + 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.getSkills().addExperience(skillType.skill, experience, false); } From f6055f197b86d5e631a5fc1fa80ccfc3d280208b Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Mon, 23 Sep 2019 01:03:05 +1200 Subject: [PATCH 65/83] [events] implement event interface with command --- .../plugin/command/PlayerCommandPlugin.java | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/09HDscape-server/src/plugin/command/PlayerCommandPlugin.java b/09HDscape-server/src/plugin/command/PlayerCommandPlugin.java index 1342467f1..4d2fb090f 100644 --- a/09HDscape-server/src/plugin/command/PlayerCommandPlugin.java +++ b/09HDscape-server/src/plugin/command/PlayerCommandPlugin.java @@ -2,7 +2,7 @@ package plugin.command; import org.crandor.ServerConstants; import org.crandor.game.component.Component; -import org.crandor.game.content.global.tutorial.TutorialStage; +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.info.Rights; @@ -15,7 +15,6 @@ 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; @@ -299,6 +298,22 @@ 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() + " 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++); + } } /** From ee52cda27e1b58c35516d07529fae56755be0250 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Mon, 23 Sep 2019 01:06:32 +1200 Subject: [PATCH 66/83] fixup --- 09HDscape-server/src/plugin/command/DeveloperCommandPlugin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/09HDscape-server/src/plugin/command/DeveloperCommandPlugin.java b/09HDscape-server/src/plugin/command/DeveloperCommandPlugin.java index d9d4d8a36..70dc14529 100644 --- a/09HDscape-server/src/plugin/command/DeveloperCommandPlugin.java +++ b/09HDscape-server/src/plugin/command/DeveloperCommandPlugin.java @@ -101,7 +101,7 @@ public final class DeveloperCommandPlugin extends CommandPlugin { public boolean parse(final Player player, String name, String[] args) { String[] eventNameArr; String eventName; - GlobalEvent event; + GlobalEvent event = GlobalEvent.ALCHEMY_HELLENISTIC; switch (name) { case "find": try { From e4ea3bf7586161b932c36074e3276662296b08f7 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Mon, 23 Sep 2019 01:16:02 +1200 Subject: [PATCH 67/83] [events] fixup remaining tick messages --- .../src/org/crandor/game/events/GlobalEventManager.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java b/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java index 514ab826c..5cab00d14 100644 --- a/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java +++ b/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java @@ -37,11 +37,11 @@ public class GlobalEventManager implements CallBack { if (ticksRemaining > 0) { event.tick(); --ticksRemaining; - if (ticksRemaining % 3000 == 0) - message("You have " + Math.round(ticksRemaining / 100) + " minutes before the " + event.getName() + " event ends."); - 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."); + } } From ceee5d8d107379205e1df501c782acc09a5b01b6 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Mon, 23 Sep 2019 01:16:27 +1200 Subject: [PATCH 68/83] [events] ... --- .../src/org/crandor/game/events/GlobalEventManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java b/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java index 5cab00d14..4b0bd9b41 100644 --- a/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java +++ b/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java @@ -161,7 +161,7 @@ public class GlobalEventManager implements CallBack { // start the event after building the string event.start(timeToAdd); message(message.toString()); - player.getPacketDispatch().sendMessage(event.getDescription()); + player.sendMessage(event.getDescription()); return this; } @@ -170,7 +170,7 @@ public class GlobalEventManager implements CallBack { event.start(6000); message(event.getName() + " event is now active, and will run for an hour!"); for (Player player : Repository.getPlayers()) { - player.getPacketDispatch().sendMessage(event.getDescription()); + player.sendMessage(event.getDescription()); } return this; } From 67d3fec2c50756c189a0c6855b0ece1aeff81c78 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Mon, 23 Sep 2019 01:26:22 +1200 Subject: [PATCH 69/83] [events] fix null point erro --- .../crandor/game/events/GlobalEventManager.java | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java b/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java index 4b0bd9b41..fce784a18 100644 --- a/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java +++ b/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java @@ -110,17 +110,9 @@ public class GlobalEventManager implements CallBack { return message(message, tag, ""); } - public GlobalEventManager notify(String message) { - return message(message, true, ""); - } - - public GlobalEventManager notify(String message, boolean tag) { - return message(message, tag, ""); - } - public GlobalEventManager message(String message, boolean tag, String color) { for (Player player : Repository.getPlayers()) { - player.getPacketDispatch().sendMessage(color + (tag ? "[Event Manager] " : "") + message); + player.sendMessage(color + (tag ? "[Event Manager] " : "") + message); } return this; } @@ -161,7 +153,7 @@ public class GlobalEventManager implements CallBack { // start the event after building the string event.start(timeToAdd); message(message.toString()); - player.sendMessage(event.getDescription()); + message(event.getDescription(), false, "ecf0f1"); return this; } @@ -169,9 +161,7 @@ public class GlobalEventManager implements CallBack { public GlobalEventManager activateHourly(GlobalEvent event) { event.start(6000); message(event.getName() + " event is now active, and will run for an hour!"); - for (Player player : Repository.getPlayers()) { - player.sendMessage(event.getDescription()); - } + message(event.getDescription(), false, "ecf0f1"); return this; } From 3c1a9a7bdf1f5288444e52753deefc2939be4fab Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Mon, 23 Sep 2019 01:28:07 +1200 Subject: [PATCH 70/83] [events] fixup color --- .../src/org/crandor/game/events/GlobalEventManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java b/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java index fce784a18..86ef854ef 100644 --- a/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java +++ b/09HDscape-server/src/org/crandor/game/events/GlobalEventManager.java @@ -153,7 +153,7 @@ public class GlobalEventManager implements CallBack { // start the event after building the string event.start(timeToAdd); message(message.toString()); - message(event.getDescription(), false, "ecf0f1"); + message(event.getDescription(), false, ""); return this; } @@ -161,7 +161,7 @@ public class GlobalEventManager implements CallBack { 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, "ecf0f1"); + message(event.getDescription(), false, ""); return this; } From 5007272dcba17b040fb3f5ba7efa9b958d0d233b Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Mon, 23 Sep 2019 01:30:30 +1200 Subject: [PATCH 71/83] [events] shrink message to fit --- 09HDscape-server/src/org/crandor/game/events/GlobalEvent.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/09HDscape-server/src/org/crandor/game/events/GlobalEvent.java b/09HDscape-server/src/org/crandor/game/events/GlobalEvent.java index 12c868da8..f4102271e 100644 --- a/09HDscape-server/src/org/crandor/game/events/GlobalEvent.java +++ b/09HDscape-server/src/org/crandor/game/events/GlobalEvent.java @@ -7,7 +7,7 @@ public enum GlobalEvent { 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 x PVP clones have been spawned in the wilderness near the mage bank."), // Not implemented + 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"), From 3e1f59c1c3b039ec8265a8799469ef9260380cb6 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Mon, 23 Sep 2019 16:38:18 +1200 Subject: [PATCH 72/83] [ms] Fix -update command, --- 09HDscape-management-server/src/org/keldagrim/Main.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/09HDscape-management-server/src/org/keldagrim/Main.java b/09HDscape-management-server/src/org/keldagrim/Main.java index 5beb849f1..b4c683f24 100644 --- a/09HDscape-management-server/src/org/keldagrim/Main.java +++ b/09HDscape-management-server/src/org/keldagrim/Main.java @@ -64,10 +64,10 @@ public final class Main { System.out.println("Player [name=" + name + ", world=" + player.getWorldId() + ", active=" + player.isActive() + "]."); } }, - new Command("-update", "Calls an update on all the game servers (-update -1 to cancel).") { + new Command("-update", "[ticks]? Calls an update on all the game servers (-update -1 to cancel).") { @Override public void run(String...args) { - int ticks = Integer.parseInt(args[1]); + int ticks = args.length > 1 ? Integer.parseInt(args[1]) : 500; for (GameServer server : WorldDatabase.getWorlds()) { if (server != null && server.isActive()) { WorldPacketRepository.sendUpdate(server, ticks); From aaba303dd77e4f15b0d6167a92cb95b98e4473c3 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Mon, 23 Sep 2019 16:38:36 +1200 Subject: [PATCH 73/83] [ms] Fix database names --- .../src/org/keldagrim/ServerConstants.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/09HDscape-management-server/src/org/keldagrim/ServerConstants.java b/09HDscape-management-server/src/org/keldagrim/ServerConstants.java index edc0f306b..c884abc6b 100644 --- a/09HDscape-management-server/src/org/keldagrim/ServerConstants.java +++ b/09HDscape-management-server/src/org/keldagrim/ServerConstants.java @@ -49,12 +49,11 @@ public final class ServerConstants { * The administrators. */ public static final String[] ADMINISTRATORS = { - "ethan", - "austin", + "redsparr0w", }; public static final String[] DATABASE_NAMES = { - "keldagr1_server", "keldagr1_global" + "server", "global" }; /** From 6af0e71693ddc1e1f3c4052c5e66f16d64dfa90e Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Mon, 23 Sep 2019 16:52:39 +1200 Subject: [PATCH 74/83] [gui] Only show player.save files --- .../src/org/crandor/gui/tab/PlayerTab.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/09HDscape-server/src/org/crandor/gui/tab/PlayerTab.java b/09HDscape-server/src/org/crandor/gui/tab/PlayerTab.java index 3dc14d22b..5e44f3659 100644 --- a/09HDscape-server/src/org/crandor/gui/tab/PlayerTab.java +++ b/09HDscape-server/src/org/crandor/gui/tab/PlayerTab.java @@ -83,10 +83,11 @@ 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().startsWith(textField.getText())) { + if (name.toLowerCase().contains(textField.getText())) { model.addElement(name); } } @@ -151,8 +152,11 @@ public class PlayerTab extends ConsoleTab { } System.out.println(getPlayerNames().toString()); for (File file : Objects.requireNonNull(f.listFiles())) { - playerNames.add(file.getName().replace(".save", "").trim()); - model.addElement(file.getName().replace(".save", "").trim()); + String fileName = file.getName(); + if (!fileName.contains(".save")) continue; + String playerName = fileName.replace(".save", "").trim(); + playerNames.add(playerName); + model.addElement(playerName); } } From 8fa4c7fbef0c5283d66adfe4b9d6932ca0f9065d Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Mon, 23 Sep 2019 17:46:05 +1200 Subject: [PATCH 75/83] [gui] Fix tps display --- 09HDscape-server/src/org/crandor/gui/tab/PlayerTab.java | 4 ---- .../src/org/crandor/gui/tab/StatisticsTab.java | 7 +++---- .../src/org/crandor/worker/MajorUpdateWorker.java | 3 ++- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/09HDscape-server/src/org/crandor/gui/tab/PlayerTab.java b/09HDscape-server/src/org/crandor/gui/tab/PlayerTab.java index 5e44f3659..9463975be 100644 --- a/09HDscape-server/src/org/crandor/gui/tab/PlayerTab.java +++ b/09HDscape-server/src/org/crandor/gui/tab/PlayerTab.java @@ -3,13 +3,10 @@ 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; @@ -150,7 +147,6 @@ 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; diff --git a/09HDscape-server/src/org/crandor/gui/tab/StatisticsTab.java b/09HDscape-server/src/org/crandor/gui/tab/StatisticsTab.java index 23b16fbc8..92840fafa 100644 --- a/09HDscape-server/src/org/crandor/gui/tab/StatisticsTab.java +++ b/09HDscape-server/src/org/crandor/gui/tab/StatisticsTab.java @@ -439,7 +439,7 @@ public class StatisticsTab extends ConsoleTab { int space = (y / 2 - 10) / 4; g.setFont(new Font(null, Font.PLAIN, 9)); for (int i = 0; i < 5; i++) { - g.setColor(Color.GRAY); + 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); @@ -460,18 +460,17 @@ public class StatisticsTab extends ConsoleTab { int toPoint = index == 0 ? 0 : performanceQueue[index - 1]; int toX = (count - i - 1) * statisticsZoom; int toY = (int) (-toPoint / (600D / (space * 4))); + System.out.println(fromY + " -> " + toY); 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) { + if (fromY >= 0) { g.setColor(Color.GREEN); } } g.setColor(Color.BLACK); - //Draw horizontal line. - g.drawLine(x - 4, (int) zero.getY(), c.getWidth() - 2, (int) zero.getY()); //Draw vertical line. g.drawLine(x, y + 4, x, 1); Point p = ((StatisticsTab) c).statisticMousePoint; diff --git a/09HDscape-server/src/org/crandor/worker/MajorUpdateWorker.java b/09HDscape-server/src/org/crandor/worker/MajorUpdateWorker.java index a94aeff70..557022184 100644 --- a/09HDscape-server/src/org/crandor/worker/MajorUpdateWorker.java +++ b/09HDscape-server/src/org/crandor/worker/MajorUpdateWorker.java @@ -78,7 +78,8 @@ public final class MajorUpdateWorker implements Runnable { * @throws InterruptedException When the thread is interrupted. */ private void sleep() throws InterruptedException { - StatisticsTab.reportPerformance((int) ((System.currentTimeMillis() - start) - 600)); + // How many ticks off we are + StatisticsTab.reportPerformance((int) (System.currentTimeMillis() - start)); long duration = 600 - ((System.currentTimeMillis() - start) % 600); if (duration > 0) { Thread.sleep(duration); From 983e4fb6a5e9fd2d4f8f943e594ff5e353aca8dd Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Mon, 23 Sep 2019 22:50:22 +1200 Subject: [PATCH 76/83] [gui] fixup --- 09HDscape-server/src/org/crandor/gui/tab/StatisticsTab.java | 1 - 1 file changed, 1 deletion(-) diff --git a/09HDscape-server/src/org/crandor/gui/tab/StatisticsTab.java b/09HDscape-server/src/org/crandor/gui/tab/StatisticsTab.java index 92840fafa..cd423cd4a 100644 --- a/09HDscape-server/src/org/crandor/gui/tab/StatisticsTab.java +++ b/09HDscape-server/src/org/crandor/gui/tab/StatisticsTab.java @@ -460,7 +460,6 @@ public class StatisticsTab extends ConsoleTab { int toPoint = index == 0 ? 0 : performanceQueue[index - 1]; int toX = (count - i - 1) * statisticsZoom; int toY = (int) (-toPoint / (600D / (space * 4))); - System.out.println(fromY + " -> " + toY); if (fromY < 0) { g.setColor(Color.RED); } From 464954c43fd963e8e1947a421e50a2c1e93b2764 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Mon, 23 Sep 2019 23:07:07 +1200 Subject: [PATCH 77/83] remove frostblade --- 09HDscape-client/src/org/runite/jagex/GameShell.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/09HDscape-client/src/org/runite/jagex/GameShell.java b/09HDscape-client/src/org/runite/jagex/GameShell.java index 6406c2c51..19dee5ce2 100644 --- a/09HDscape-client/src/org/runite/jagex/GameShell.java +++ b/09HDscape-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.LOCAL_MS ? "127.0.0.1" : "frostblades.org", 1, "live", false, false); + public static GameSetting SETTINGS = new GameSetting(GameLaunch.SETTINGS.getName(), Configurations.MS_IP, 1, "live", false, false); private boolean aBoolean1 = false; @@ -560,10 +560,6 @@ 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; From 3336f3422e780400dd63674cd4f13d778145b51b Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Tue, 24 Sep 2019 20:24:18 +1200 Subject: [PATCH 78/83] [tutorial] fix checks --- .../crandor/game/content/dialogue/DialogueInterpreter.java | 4 ++-- .../game/content/skill/free/smithing/SmithingPulse.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/09HDscape-server/src/org/crandor/game/content/dialogue/DialogueInterpreter.java b/09HDscape-server/src/org/crandor/game/content/dialogue/DialogueInterpreter.java index 13c89025f..fc15f49a5 100644 --- a/09HDscape-server/src/org/crandor/game/content/dialogue/DialogueInterpreter.java +++ b/09HDscape-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/09HDscape-server/src/org/crandor/game/content/skill/free/smithing/SmithingPulse.java b/09HDscape-server/src/org/crandor/game/content/skill/free/smithing/SmithingPulse.java index 2eb3beda5..181eb508b 100644 --- a/09HDscape-server/src/org/crandor/game/content/skill/free/smithing/SmithingPulse.java +++ b/09HDscape-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; From 686757d1894ffd388c7c2074b3640fa490517d01 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Thu, 26 Sep 2019 18:56:46 +1200 Subject: [PATCH 79/83] [AI] refactor --- .../org/crandor/game/node/entity/player/ai/AIPlayer.java | 8 ++------ .../game/node/entity/player/ai/pvmbots/LowestBot.java | 3 +-- .../game/node/entity/player/ai/pvmbots/PvMBots.java | 2 +- 09HDscape-server/src/plugin/command/AIPCommandPlugin.java | 1 - 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/09HDscape-server/src/org/crandor/game/node/entity/player/ai/AIPlayer.java b/09HDscape-server/src/org/crandor/game/node/entity/player/ai/AIPlayer.java index f7a7fbaeb..1e0ae7abf 100644 --- a/09HDscape-server/src/org/crandor/game/node/entity/player/ai/AIPlayer.java +++ b/09HDscape-server/src/org/crandor/game/node/entity/player/ai/AIPlayer.java @@ -181,8 +181,6 @@ 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) @@ -399,14 +397,12 @@ 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/09HDscape-server/src/org/crandor/game/node/entity/player/ai/pvmbots/LowestBot.java b/09HDscape-server/src/org/crandor/game/node/entity/player/ai/pvmbots/LowestBot.java index 2fddb1ab9..023aa04ff 100644 --- a/09HDscape-server/src/org/crandor/game/node/entity/player/ai/pvmbots/LowestBot.java +++ b/09HDscape-server/src/org/crandor/game/node/entity/player/ai/pvmbots/LowestBot.java @@ -13,8 +13,7 @@ public class LowestBot extends PvMBots{ private int tick = 0; @Override - public void tick() - { + public void tick(){ super.tick(); //Despawn diff --git a/09HDscape-server/src/org/crandor/game/node/entity/player/ai/pvmbots/PvMBots.java b/09HDscape-server/src/org/crandor/game/node/entity/player/ai/pvmbots/PvMBots.java index d002db27d..06b83f128 100644 --- a/09HDscape-server/src/org/crandor/game/node/entity/player/ai/pvmbots/PvMBots.java +++ b/09HDscape-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); diff --git a/09HDscape-server/src/plugin/command/AIPCommandPlugin.java b/09HDscape-server/src/plugin/command/AIPCommandPlugin.java index 3e882079f..d3e840e26 100644 --- a/09HDscape-server/src/plugin/command/AIPCommandPlugin.java +++ b/09HDscape-server/src/plugin/command/AIPCommandPlugin.java @@ -189,7 +189,6 @@ public final class AIPCommandPlugin extends CommandPlugin { PVPAIPActions.syncBotThread(player); return true; - case "bot": PvMBotsBuilder.spawnLowest(player.getLocation()); return true; From 5eef4616313c3c4521c981d4cafac1236ce86b32 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Thu, 26 Sep 2019 19:04:45 +1200 Subject: [PATCH 80/83] [s3] pvp --- 09HDscape-server/server3.properties | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/09HDscape-server/server3.properties b/09HDscape-server/server3.properties index cdab7aec2..8a75a525b 100644 --- a/09HDscape-server/server3.properties +++ b/09HDscape-server/server3.properties @@ -1,14 +1,14 @@ -name=Crandor +name=Sparr0w beta=false sql=true -devMode=true +devMode=false gui=false gameType=economy worldId=3 -country=0 +country=6 activity=Default gameplay members=true -pvp=false +pvp=true quickChat=true lootshare=true -msip=127.0.0.1 \ No newline at end of file +msip=127.0.0.1 From 68707e4047920681625f21807cbfa5ddd397b227 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Thu, 26 Sep 2019 19:06:27 +1200 Subject: [PATCH 81/83] ... --- 09HDscape-server/server.properties | 6 +++--- 09HDscape-server/server1.properties | 2 +- 09HDscape-server/server2.properties | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/09HDscape-server/server.properties b/09HDscape-server/server.properties index fe8df5372..3b032f944 100644 --- a/09HDscape-server/server.properties +++ b/09HDscape-server/server.properties @@ -1,11 +1,11 @@ -beta=false name=Sparr0w +beta=false sql=true -devMode=true +devMode=false gui=true gameType=economy worldId=1 -country=0 +country=6 activity=Default gameplay members=true pvp=false diff --git a/09HDscape-server/server1.properties b/09HDscape-server/server1.properties index f9017bafa..431878dd2 100644 --- a/09HDscape-server/server1.properties +++ b/09HDscape-server/server1.properties @@ -5,7 +5,7 @@ devMode=false gui=true gameType=economy worldId=1 -country=0 +country=6 activity=Default gameplay members=true pvp=false diff --git a/09HDscape-server/server2.properties b/09HDscape-server/server2.properties index 8cd6bd174..79f730bed 100644 --- a/09HDscape-server/server2.properties +++ b/09HDscape-server/server2.properties @@ -1,14 +1,14 @@ -name=Crandor +name=Sparr0w beta=false sql=true devMode=true gui=false gameType=economy worldId=2 -country=0 +country=6 activity=Default gameplay members=true pvp=false quickChat=true lootshare=true -msip=127.0.0.1 \ No newline at end of file +msip=127.0.0.1 From 941aa9c93fd5a917693e0f3ae17f0ed17273edb6 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Thu, 26 Sep 2019 19:09:21 +1200 Subject: [PATCH 82/83] [AI] count ticks up instead of down. --- .../entity/player/ai/pvmbots/LowestBot.java | 20 +++++++++---------- .../entity/player/ai/pvmbots/PvMBots.java | 16 ++++++++------- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/09HDscape-server/src/org/crandor/game/node/entity/player/ai/pvmbots/LowestBot.java b/09HDscape-server/src/org/crandor/game/node/entity/player/ai/pvmbots/LowestBot.java index 023aa04ff..b726fdf73 100644 --- a/09HDscape-server/src/org/crandor/game/node/entity/player/ai/pvmbots/LowestBot.java +++ b/09HDscape-server/src/org/crandor/game/node/entity/player/ai/pvmbots/LowestBot.java @@ -9,29 +9,29 @@ public class LowestBot extends PvMBots{ super(name, l); // TODO Auto-generated constructor stub } - + private int tick = 0; - + @Override 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 (tick == 0) - { + if (this.tick % 10 == 0) { if (!this.inCombat()) AttackNpcsInRadius(this, 5); - this.tick = 10; } - else - this.tick--; - + + if (this.tick == 100) this.tick = 0; + this.eat(329); //this.getPrayer().toggle() } diff --git a/09HDscape-server/src/org/crandor/game/node/entity/player/ai/pvmbots/PvMBots.java b/09HDscape-server/src/org/crandor/game/node/entity/player/ai/pvmbots/PvMBots.java index 06b83f128..2976be186 100644 --- a/09HDscape-server/src/org/crandor/game/node/entity/player/ai/pvmbots/PvMBots.java +++ b/09HDscape-server/src/org/crandor/game/node/entity/player/ai/pvmbots/PvMBots.java @@ -90,7 +90,9 @@ public class PvMBots extends AIPlayer { @Override public void tick() { - super.tick(); + super.tick(); + + this.tick++; //Despawn if (this.getSkills().getLifepoints() == 0) @@ -99,12 +101,12 @@ public class PvMBots extends AIPlayer { AIPlayer.deregister(this.getUid()); //Npc Combat - if (tick == 0) { - if (!this.inCombat()) - AttackNpcsInRadius(this, 5); - this.tick = 10; - } else - this.tick--; + if (this.tick % 10 == 0) { + if (!this.inCombat()) + AttackNpcsInRadius(this, 5); + } + + if (this.tick == 100) this.tick = 0; //this.eat(); //this.getPrayer().toggle() From 6bd1a68e88abebfe9bc824debac0462b9c8bc214 Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Thu, 26 Sep 2019 19:31:53 +1200 Subject: [PATCH 83/83] remove keldagrim --- .../crandor/game/system/communication/CommunicationInfo.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/09HDscape-server/src/org/crandor/game/system/communication/CommunicationInfo.java b/09HDscape-server/src/org/crandor/game/system/communication/CommunicationInfo.java index fbf616c35..cdee4978c 100644 --- a/09HDscape-server/src/org/crandor/game/system/communication/CommunicationInfo.java +++ b/09HDscape-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 = "keldagrim"; + private String currentClan = ""; /** * The rank required for joining.