From d7e7ee348d1213a8e1ec021984289bace5b21f48 Mon Sep 17 00:00:00 2001 From: Ceikry Date: Sat, 9 Apr 2022 02:25:16 +0000 Subject: [PATCH] Better cache parsing, reading more data from cache instead of code/config defined values --- Server/data/configs/music_configs.json | 768 ------------------ .../cache/def/impl/AnimationDefinition.java | 2 +- .../java/core/cache/def/impl/DataMap.java | 117 +++ .../core/cache/def/impl/ItemDefinition.java | 2 +- .../core/cache/def/impl/NPCDefinition.java | 2 +- .../cache/def/impl/SceneryDefinition.java | 2 +- .../main/java/core/cache/def/impl/Struct.java | 99 +++ .../cache/misc/buffer/ByteBufferUtils.java | 2 +- .../entity/player/link/music/MusicPlayer.java | 2 +- .../java/core/net/event/JS5ReadEvent.java | 4 +- Server/src/main/java/core/tools/CP1252.java | 23 + .../rs09/game/interaction/QCRepository.kt | 161 ++-- .../command/sets/DevelopmentCommandSet.kt | 68 +- .../game/system/config/MusicConfigLoader.kt | 20 +- 14 files changed, 374 insertions(+), 898 deletions(-) create mode 100644 Server/src/main/java/core/cache/def/impl/DataMap.java create mode 100644 Server/src/main/java/core/cache/def/impl/Struct.java create mode 100644 Server/src/main/java/core/tools/CP1252.java diff --git a/Server/data/configs/music_configs.json b/Server/data/configs/music_configs.json index 4b76a546d..9b8f98b8b 100644 --- a/Server/data/configs/music_configs.json +++ b/Server/data/configs/music_configs.json @@ -1,1664 +1,1110 @@ [ { "id": "1", - "name": "Iban", - "indexId": "61", "borders": "{2112,4544,2175,4607}" }, { "id": "2", - "name": "Autumn Voyage", - "indexId": "17", "borders": "{3200,3264,3263,3327}" }, { "id": "3", - "name": "Unknown Land", - "indexId": "133", "borders": "{3072,3200,3135,3263}" }, { "id": "4", - "name": "Hell's Bells", - "indexId": "254", "borders": "{2752,3712,2815,3775}" }, { "id": "5", - "name": "Sad Meadow", - "indexId": "101", "borders": "{2496,3264,2559,3327}-{2752,4672,2815,4735}" }, { "id": "6", - "name": "Jolly-R", - "indexId": "65", "borders": "{2752,3200,2815,3263}" }, { "id": "7", - "name": "Overture", - "indexId": "92", "borders": "{2688,3456,2751,3519}" }, { "id": "8", - "name": "Wildwood", - "indexId": "256", "borders": "{3072,3584,3135,3647}" }, { "id": "9", - "name": "Kingdom", - "indexId": "190", "borders": "{2816,3520,2879,3583}" }, { "id": "10", - "name": "Moody", - "indexId": "87", "borders": "{3136,3584,3199,3647}-{2368,3264,2431,3327}" }, { "id": "11", - "name": "Spooky2", - "indexId": "218", "borders": "{3392,9600,3455,9663}" }, { "id": "12", - "name": "Long Way Home", - "indexId": "76", "borders": "{2944,3200,3007,3263}" }, { "id": "13", - "name": "Mage Arena", - "indexId": "78", "borders": "{3072,3904,3135,3967}-{2496,4672,2559,4735}" }, { "id": "14", - "name": "Witching", - "indexId": "145", "borders": "{3264,3648,3327,3711}" }, { "id": "15", - "name": "Workshop", - "indexId": "148", "borders": "{3008,3328,3071,3391}" }, { "id": "17", - "name": "Escape", - "indexId": "176", "borders": "{2688,9664,2751,9727}" }, { "id": "18", - "name": "Horizon", - "indexId": "60", "borders": "{2880,3392,2943,3455}" }, { "id": "19", - "name": "Arabique", - "indexId": "7", "borders": "{2816,9792,2879,9855}" }, { "id": "20", - "name": "Lullaby", - "indexId": "77", "borders": "{3328,3392,3391,3455}-{2624,3520,2687,3583}" }, { "id": "21", - "name": "Monarch Waltz", - "indexId": "86", "borders": "{2688,3520,2751,3583}" }, { "id": "22", - "name": "Gnome King", - "indexId": "51", "borders": "{2432,3456,2495,3519}" }, { "id": "24", - "name": "Attack1", - "indexId": "10", "borders": "{2496,3200,2559,3263}" }, { "id": "25", - "name": "Attack2", - "indexId": "11", "borders": "{2816,9600,2879,9663}" }, { "id": "26", - "name": "Attack3", - "indexId": "12", "borders": "{3008,10240,3071,10303}" }, { "id": "27", - "name": "Attack4", - "indexId": "13", "borders": "{2560,3136,2623,3199}-{2560,9536,2623,9599}" }, { "id": "28", - "name": "Attack5", - "indexId": "14", "borders": "{2240,4672,2303,4735}" }, { "id": "29", - "name": "Attack6", - "indexId": "15", "borders": "{2560,9408,2623,9471}" }, { "id": "30", - "name": "Voodoo Cult", - "indexId": "138", "borders": "{2368,4672,2431,4735}-{2880,9280,2943,9343}" }, { "id": "32", - "name": "Voyage", - "indexId": "139", "borders": "{2496,3456,2559,3519}" }, { "id": "33", - "name": "Gnome Village", - "indexId": "53", "borders": "{2432,3392,2495,3455}" }, { "id": "34", - "name": "Wonder", - "indexId": "146", "borders": "{2944,3520,3007,3583}" }, { "id": "35", - "name": "Sea Shanty2", - "indexId": "107", "borders": "{3008,3200,3071,3263}" }, { "id": "36", - "name": "Arabian", - "indexId": "4", "borders": "{3264,3200,3327,3263}-{3392,3136,3455,3199}" }, { "id": "37", - "name": "Deep Wildy", - "indexId": "32", "borders": "{2944,3776,3007,3839}" }, { "id": "38", - "name": "Trawler", - "indexId": "124", "borders": "{1856,4800,1919,4863}" }, { "id": "41", - "name": "Expecting", - "indexId": "41", "borders": "{2432,3200,2495,3263}-{2432,9600,2495,9663}" }, { "id": "42", - "name": "Wilderness2", - "indexId": "143", "borders": "{3008,3776,3071,3839}" }, { "id": "43", - "name": "Wilderness3", - "indexId": "144", "borders": "{2944,3712,3007,3775}" }, { "id": "45", - "name": "Venture2", - "indexId": "168", "borders": "{3328,9728,3391,9791}" }, { "id": "46", - "name": "Harmony2", - "indexId": "167", "borders": "{3200,9600,3263,9663}" }, { "id": "47", - "name": "Duel Arena", - "indexId": "164", "borders": "{3328,3200,3391,3263}" }, { "id": "48", - "name": "Morytania", - "indexId": "180", "borders": "{3392,3456,3455,3519}" }, { "id": "49", - "name": "Wander", - "indexId": "140", "borders": "{3008,3264,3071,3327}" }, { "id": "50", - "name": "Al Kharid", - "indexId": "1", "borders": "{3264,3136,3327,3199}-{3328,3136,3391,3199}" }, { "id": "51", - "name": "Trawler Minor", - "indexId": "125", "borders": "{1920,4800,1983,4863}" }, { "id": "52", - "name": "Serene", - "indexId": "109", "borders": "{2944,3904,3007,3967}-{2944,10240,3007,10303}-{2816,4800,2879,4863}" }, { "id": "53", - "name": "Royale", - "indexId": "99", "borders": "{2880,9664,2943,9727}" }, { "id": "54", - "name": "Scape Soft", - "indexId": "159", "borders": "{2944,3392,3007,3455}" }, { "id": "55", - "name": "High Seas", - "indexId": "59", "borders": "{2752,3136,2815,3199}" }, { "id": "56", - "name": "Doorways", - "indexId": "34", "borders": "{3136,3520,3199,3583}" }, { "id": "57", - "name": "Rune Essence", - "indexId": "100", "borders": "{2880,4800,2943,4863}" }, { "id": "58", - "name": "Nomad", - "indexId": "171", "borders": "{2752,3072,2815,3135}" }, { "id": "59", - "name": "Cursed", - "indexId": "186", "borders": "{2368,9664,2431,9727}" }, { "id": "60", - "name": "Lasting", - "indexId": "71", "borders": "{2624,3392,2687,3455}" }, { "id": "61", - "name": "Village", - "indexId": "182", "borders": "{3456,3456,3519,3519}" }, { "id": "62", - "name": "Newbie Melody", - "indexId": "89", "borders": "{3052,3055,3155,3135}" }, { "id": "63", - "name": "Chain of Command", - "indexId": "27", "borders": "{2624,9728,2687,9791}-{2688,9792,2751,9855}" }, { "id": "64", - "name": "Book of Spells", - "indexId": "23", "borders": "{3136,3136,3199,3199}" }, { "id": "65", - "name": "Miracle Dance", - "indexId": "85", "borders": "{2752,4800,2815,4863}" }, { "id": "66", - "name": "Legion", - "indexId": "72", "borders": "{3008,3648,3071,3711}-{2496,3520,2559,3583}" }, { "id": "67", - "name": "Close Quarters", - "indexId": "175", "borders": "{3136,3712,3199,3775}-{1536,5760,1599,5823}" }, { "id": "68", - "name": "Cavern", - "indexId": "26", "borders": "{3008,10304,3071,10367}-{2560,9472,2623,9535}" }, { "id": "69", - "name": "Egypt", - "indexId": "37", "borders": "{3264,3072,3327,3135}" }, { "id": "70", - "name": "Upcoming", - "indexId": "135", "borders": "{2624,3200,2687,3263}" }, { "id": "71", - "name": "Chompy Hunt", - "indexId": "178", "borders": "{2624,2944,2687,3007}-{2624,9344,2687,9407}" }, { "id": "72", - "name": "Fanfare", - "indexId": "44", "borders": "{2944,3328,3007,3391}" }, { "id": "73", - "name": "All's Fairy in Love and War", - "indexId": "436", "borders": "" }, { "id": "74", - "name": "Lightwalk", - "indexId": "74", "borders": "{2752,3392,2815,3455}" }, { "id": "75", - "name": "Venture", - "indexId": "136", "borders": "{3328,3328,3391,3391}" }, { "id": "76", - "name": "Harmony", - "indexId": "58", "borders": "{3200,3200,3263,3263}" }, { "id": "77", - "name": "Splendour", - "indexId": "113", "borders": "{2880,3456,2943,3519}" }, { "id": "78", - "name": "Reggae", - "indexId": "96", "borders": "{2880,2880,2943,2943}" }, { "id": "79", - "name": "The Desert", - "indexId": "120", "borders": "{3136,3008,3199,3071}" }, { "id": "80", - "name": "Soundscape", - "indexId": "111", "borders": "{2432,2944,2495,3007}" }, { "id": "81", - "name": "Wonderous", - "indexId": "147", "borders": "{2624,3328,2687,3391}" }, { "id": "82", - "name": "Waterfall", - "indexId": "141", "borders": "{2496,3392,2559,3455}-{2496,9792,2559,9855}" }, { "id": "83", - "name": "Big Chords", - "indexId": "22", "borders": "{2496,3072,2559,3135}" }, { "id": "84", - "name": "Dead Quiet", - "indexId": "181", "borders": "{3392,3392,3455,3455}-{2304,4992,2367,5055}" }, { "id": "85", - "name": "Vision", - "indexId": "137", "borders": "{3072,3136,3135,3199}-{3072,9472,3135,9535}" }, { "id": "87", - "name": "Ice Melody", - "indexId": "165", "borders": "{2816,3456,2879,3519}" }, { "id": "88", - "name": "Twilight", - "indexId": "179", "borders": "{2688,9856,2751,9919}" }, { "id": "89", - "name": "Reggae2", - "indexId": "97", "borders": "{2880,3008,2943,3071}" }, { "id": "90", - "name": "Ambient Jungle", - "indexId": "3", "borders": "{2816,2944,2879,3007}" }, { "id": "91", - "name": "Riverside", - "indexId": "98", "borders": "{2688,3264,2751,3327}-{2112,3072,2175,3135}" }, { "id": "92", - "name": "Sea Shanty", - "indexId": "106", "borders": "{2880,3136,2943,3199}" }, { "id": "93", - "name": "Parade", - "indexId": "93", "borders": "{3264,3456,3327,3519}" }, { "id": "94", - "name": "Tribal2", - "indexId": "129", "borders": "{2880,2944,2943,3007}" }, { "id": "95", - "name": "Intrepid", - "indexId": "64", "borders": "{2304,9792,2367,9855}" }, { "id": "96", - "name": "Inspiration", - "indexId": "63", "borders": "{3008,3520,3071,3583}" }, { "id": "97", - "name": "Hermit", - "indexId": "191", "borders": "{2240,4736,2303,4799}" }, { "id": "98", - "name": "Forever", - "indexId": "48", "borders": "{3072,3456,3135,3519}-{3072,9856,3135,9919}" }, { "id": "99", - "name": "Baroque", - "indexId": "20", "borders": "{2624,3264,2687,3327}" }, { "id": "100", - "name": "Beyond", - "indexId": "21", "borders": "{2816,9856,2879,9919}-{2816,9920,2879,9983}" }, { "id": "101", - "name": "Gnome Village2", - "indexId": "54", "borders": "{2304,3392,2367,3455}" }, { "id": "102", - "name": "Alone", - "indexId": "2", "borders": "{3008,3456,3071,3519}-{2496,9600,2559,9663}" }, { "id": "103", - "name": "Oriental", - "indexId": "91", "borders": "{2880,9344,2943,9407}" }, { "id": "104", - "name": "Camelot", - "indexId": "24", "borders": "{2752,3456,2815,3519}" }, { "id": "105", - "name": "Tomorrow", - "indexId": "163", "borders": "{3008,3136,3071,3199}" }, { "id": "106", - "name": "Expanse", - "indexId": "40", "borders": "{3136,3904,3199,3967}-{3200,3328,3263,3391}-{3200,9728,3263,9791}" }, { "id": "107", - "name": "Miles Away", - "indexId": "84", "borders": "{2880,3264,2943,3327}-{2624,4672,2687,4735}" }, { "id": "108", - "name": "Starlight", - "indexId": "116", "borders": "{2944,9536,3007,9599}-{3200,9536,3263,9599}" }, { "id": "109", - "name": "Theme", - "indexId": "123", "borders": "{2560,3456,2623,3519}-{2496,9856,2559,9919}" }, { "id": "110", - "name": "Serenade", - "indexId": "108", "borders": "{2368,3136,2431,3199}" }, { "id": "111", - "name": "Still Night", - "indexId": "118", "borders": "{3264,3328,3327,3391}" }, { "id": "112", - "name": "Gnomeball", - "indexId": "56", "borders": "{2304,3456,2367,3519}" }, { "id": "113", - "name": "Lightness", - "indexId": "73", "borders": "{3072,3520,3135,3583}" }, { "id": "114", - "name": "Jungly1", - "indexId": "67", "borders": "{2752,2944,2815,3007}-{2752,9344,2815,9407}" }, { "id": "115", - "name": "Jungly2", - "indexId": "68", "borders": "{2688,3200,2751,3263}" }, { "id": "116", - "name": "Greatness", - "indexId": "57", "borders": "{3136,3328,3199,3391}" }, { "id": "117", - "name": "Jungly3", - "indexId": "69", "borders": "{2752,3008,2815,3071}" }, { "id": "118", - "name": "Faerie", - "indexId": "43", "borders": "{2368,4352,2431,4415}" }, { "id": "119", - "name": "Fishing", - "indexId": "46", "borders": "{2816,3392,2879,3455}" }, { "id": "120", - "name": "Shining", - "indexId": "160", "borders": "{3200,3712,3263,3775}" }, { "id": "121", - "name": "Forbidden", - "indexId": "185", "borders": "{3264,3520,3327,3583}" }, { "id": "122", - "name": "Shine", - "indexId": "110", "borders": "{3328,3264,3391,3327}" }, { "id": "123", - "name": "Arabian2", - "indexId": "5", "borders": "{3264,3264,3327,3327}" }, { "id": "124", - "name": "Arabian3", - "indexId": "6", "borders": "{3200,3072,3263,3135}" }, { "id": "125", - "name": "Garden", - "indexId": "50", "borders": "{3200,3392,3263,3455}" }, { "id": "127", - "name": "Nightfall", - "indexId": "90", "borders": "{3200,3904,3263,3967}-{2944,3264,3007,3327}" }, { "id": "128", - "name": "Grumpy", - "indexId": "177", "borders": "{2560,2944,2623,3007}" }, { "id": "129", - "name": "Spooky Jungle", - "indexId": "115", "borders": "{2752,2880,2815,2943}-{2880,9472,2943,9535}" }, { "id": "130", - "name": "Tree Spirits", - "indexId": "126", "borders": "{2304,3328,2367,3391}" }, { "id": "131", - "name": "Understanding", - "indexId": "187", "borders": "{2368,4800,2431,4863}" }, { "id": "132", - "name": "Breeze", - "indexId": "194", "borders": "{2240,3200,2303,3263}" }, { "id": "133", - "name": "The Tower", - "indexId": "122", "borders": "{2560,3328,2623,3391}-{2496,9728,2559,9791}" }, { "id": "134", - "name": "La Mort", - "indexId": "192", "borders": "{2176,4800,2239,4863}" }, { "id": "138", - "name": "Emperor", - "indexId": "39", "borders": "{2880,3200,2943,3263}-{2880,9600,2943,9663}" }, { "id": "140", - "name": "Talking Forest", - "indexId": "119", "borders": "{2624,3456,2687,3519}" }, { "id": "141", - "name": "Barbarianism", - "indexId": "257", "borders": "{3072,3392,3135,3455}-{3072,9792,3135,9855}" }, { "id": "142", - "name": "Complication", - "indexId": "258", "borders": "{2240,4800,2303,4863}" }, { "id": "143", - "name": "Down to Earth", - "indexId": "259", "borders": "{2624,4800,2687,4863}" }, { "id": "144", - "name": "Scape Cave", - "indexId": "102", "borders": "{3136,9856,3199,9919}-{3072,9536,3135,9599}" }, { "id": "145", - "name": "Yesteryear", - "indexId": "161", "borders": "{3200,3136,3263,3199}" }, { "id": "146", - "name": "Zealot", - "indexId": "172", "borders": "{2688,4800,2751,4863}" }, { "id": "148", - "name": "Emotion", - "indexId": "38", "borders": "{2496,3136,2559,3199}-{2560,4416,2623,4479}-{2496,9536,2559,9599}" }, { "id": "149", - "name": "Principality", - "indexId": "188", "borders": "{2880,3520,2943,3583}" }, { "id": "151", - "name": "Start", - "indexId": "117", "borders": "{3072,3264,3135,3327}" }, { "id": "152", - "name": "Ballad of Enchantment", - "indexId": "19", "borders": "{2560,3200,2623,3263}" }, { "id": "153", - "name": "Expedition", - "indexId": "42", "borders": "{2880,9984,2943,10047}" }, { "id": "154", - "name": "Bone Dance", - "indexId": "183", "borders": "{3392,3264,3455,3327}" }, { "id": "155", - "name": "Neverland", - "indexId": "88", "borders": "{2432,3328,2495,3391}" }, { "id": "156", - "name": "Mausoleum", - "indexId": "184", "borders": "{3392,9856,3455,9919}" }, { "id": "157", - "name": "Medieval", - "indexId": "82", "borders": "{3264,3392,3327,3455}" }, { "id": "158", - "name": "Quest", - "indexId": "94", "borders": "{2560,4800,2623,4863}" }, { "id": "159", - "name": "Gaol", - "indexId": "49", "borders": "{3008,3712,3071,3775}-{2496,3008,2559,3071}-{2496,9408,2559,9471}" }, { "id": "160", - "name": "Army of Darkness", - "indexId": "8", "borders": "{3008,3584,3071,3647}" }, { "id": "161", - "name": "Long Ago", - "indexId": "75", "borders": "{2624,3072,2687,3135}" }, { "id": "162", - "name": "Tribal Background", - "indexId": "127", "borders": "{2816,3072,2879,3135}-{2816,9472,2879,9535}" }, { "id": "163", - "name": "Flute Salad", - "indexId": "47", "borders": "{3136,3264,3199,3327}" }, { "id": "164", - "name": "Landlubber", - "indexId": "169", "borders": "{2688,3136,2751,3199}" }, { "id": "165", - "name": "Tribal", - "indexId": "128", "borders": "{2816,3008,2879,3071}" }, { "id": "166", - "name": "Fanfare2", - "indexId": "162", "borders": "{2944,3008,3007,3071}" }, { "id": "167", - "name": "Fanfare3", - "indexId": "45", "borders": "{2624,3136,2687,3199}" }, { "id": "168", - "name": "Lonesome", - "indexId": "149", "borders": "{3264,9408,3327,9471}" }, { "id": "169", - "name": "Crystal Sword", - "indexId": "29", "borders": "{3200,3520,3263,3583}-{2624,9664,2687,9727}" }, { "id": "170", - "name": "The Shadow", - "indexId": "121", "borders": "{2816,3200,2879,3263}" }, { "id": "172", - "name": "Jungle Island", - "indexId": "66", "borders": "{2816,3136,2879,3199}-{2816,2880,2879,2943}" }, { "id": "173", - "name": "Dunjun", - "indexId": "36", "borders": "{2880,9728,2943,9791}" }, { "id": "174", - "name": "Desert Voyage", - "indexId": "33", "borders": "{3264,2944,3327,3007}-{3328,3008,3391,3071}" }, { "id": "175", - "name": "Spirit", - "indexId": "112", "borders": "{3136,3392,3199,3455}" }, { "id": "176", - "name": "Undercurrent", - "indexId": "170", "borders": "{3072,3648,3135,3711}" }, { "id": "177", - "name": "Adventure", - "indexId": "0", "borders": "{3200,3456,3263,3519}" }, { "id": "178", - "name": "Courage", - "indexId": "260", "borders": "{2880,9792,2943,9855}" }, { "id": "179", - "name": "Underground", - "indexId": "132", "borders": "{3328,3584,3391,3647}-{2816,9728,2879,9791}" }, { "id": "180", - "name": "Attention", - "indexId": "16", "borders": "{2944,3136,3007,3199}" }, { "id": "181", - "name": "Crystal Cave", - "indexId": "28", "borders": "{2432,4416,2495,4479}" }, { "id": "182", - "name": "Dangerous", - "indexId": "30", "borders": "{3264,3776,3327,3839}-{3264,3712,3327,3775}" }, { "id": "183", - "name": "Troubled", - "indexId": "131", "borders": "{2944,3648,3007,3711}" }, { "id": "184", - "name": "Magical Journey", - "indexId": "80", "borders": "{2688,3392,2751,3455}" }, { "id": "185", - "name": "Magic Dance", - "indexId": "79", "borders": "{2560,3072,2623,3135}" }, { "id": "186", - "name": "Arrival", - "indexId": "9", "borders": "{2880,3328,2943,3391}" }, { "id": "187", - "name": "Tremble", - "indexId": "189", "borders": "{2816,3584,2879,3647}" }, { "id": "188", - "name": "In the Manor", - "indexId": "62", "borders": "{2560,3008,2623,3071}" }, { "id": "190", - "name": "Heart and Mind", - "indexId": "174", "borders": "{2496,4800,2559,4863}" }, { "id": "191", - "name": "Knightly", - "indexId": "70", "borders": "{2560,3264,2623,3327}" }, { "id": "192", - "name": "Trinity", - "indexId": "130", "borders": "{2688,3328,2751,3391}-{2688,9728,2751,9791}" }, { "id": "193", - "name": "Mellow", - "indexId": "83", "borders": "{2560,3392,2623,3455}" }, { "id": "198", - "name": "Dagannoth Dawn", - "indexId": "365", "borders": "{1792,4352,1855,4415}-{1920,4352,1983,4415}" }, { "id": "220", - "name": "Island of the Trolls", - "indexId": "441", "borders": "{2304,3842,2428,3901}" }, { "id": "241", - "name": "Stagnant", - "indexId": "193", "borders": "{3456,3328,3519,3391}-{2176,4992,2239,5055}" }, { "id": "242", - "name": "Time Out", - "indexId": "196", "borders": "{2880,4544,2943,4607}" }, { "id": "243", - "name": "Stratosphere", - "indexId": "195", "borders": "{2112,4800,2175,4863}" }, { "id": "244", - "name": "Waterlogged", - "indexId": "199", "borders": "{3456,3392,3519,3455}-{1984,4992,2047,5055}" }, { "id": "245", - "name": "Natural", - "indexId": "197", "borders": "{3392,3328,3455,3391}-{2240,4992,2303,5055}" }, { "id": "246", - "name": "Grotto", - "indexId": "198", "borders": "{3392,9728,3455,9791}" }, { "id": "247", - "name": "Artistry", - "indexId": "200", "borders": "{1984,4736,2047,4799}" }, { "id": "248", - "name": "Aztec", - "indexId": "201", "borders": "{2752,9536,2815,9599}" }, { "id": "251", - "name": "Forest", - "indexId": "203", "borders": "{2240,3136,2303,3199}" }, { "id": "252", - "name": "Elven Mist", - "indexId": "202", "borders": "{2304,3200,2367,3263}" }, { "id": "253", - "name": "Lost Soul", - "indexId": "204", "borders": "{2240,3072,2303,3135}" }, { "id": "254", - "name": "Meridian", - "indexId": "205", "borders": "{2112,3136,2175,3199}" }, { "id": "255", - "name": "Woodland", - "indexId": "206", "borders": "{2112,3200,2175,3263}" }, { "id": "256", - "name": "Overpass", - "indexId": "207", "borders": "{2304,3264,2367,3327}" }, { "id": "257", - "name": "Sojourn", - "indexId": "209", "borders": "{2816,3648,2879,3711}" }, { "id": "258", - "name": "Contest", - "indexId": "208", "borders": "{2880,3584,2943,3647}" }, { "id": "259", - "name": "Crystal Castle", - "indexId": "210", "borders": "{2240,3264,2303,3327}" }, { "id": "260", - "name": "Insect Queen", - "indexId": "212", "borders": "{3456,9472,3519,9535}" }, { "id": "261", - "name": "Marzipan", - "indexId": "211", "borders": "{2752,10112,2815,10175}-{2816,10048,2879,10111}" }, { "id": "262", - "name": "Righteousness", - "indexId": "223", "borders": "{2432,4800,2495,4863}" }, { "id": "263", - "name": "Bandit Camp", - "indexId": "214", "borders": "{3136,2944,3199,3007}" }, { "id": "264", - "name": "Mad Eadgar", - "indexId": "213", "borders": "{2880,10048,2943,10111}" }, { "id": "265", - "name": "Superstition", - "indexId": "261", "borders": "{2752,9280,2815,9343}" }, { "id": "266", - "name": "Bone Dry", - "indexId": "216", "borders": "{3200,9344,3263,9407}" }, { "id": "267", - "name": "Sunburn", - "indexId": "215", "borders": "{3200,2944,3263,3007}-{3328,2880,3391,2943}" }, { "id": "268", - "name": "Everywhere", - "indexId": "219", "borders": "{2112,3264,2175,3327}" }, { "id": "269", - "name": "Competition", - "indexId": "217", "borders": "{2176,4928,2239,4991}" }, { "id": "270", - "name": "Exposed", - "indexId": "220", "borders": "{2176,3072,2239,3135}" }, { "id": "271", - "name": "Well of Voyage", - "indexId": "469", "borders": "{2304,9600,2367,9663}" }, { "id": "272", - "name": "Alternative Root", - "indexId": "221", "borders": "" }, { "id": "273", - "name": "Easter Jig", - "indexId": "475", "borders": "" }, { "id": "277", - "name": "Haunted Mine", - "indexId": "222", "borders": "{2752,4416,2815,4479}" }, { "id": "278", - "name": "Deep Down", - "indexId": "224", "borders": "{2688,4544,2751,4607}-{2688,4480,2751,4543}" }, { "id": "282", - "name": "Chamber", - "indexId": "225", "borders": "{2688,4416,2751,4479}-{2752,4480,2815,4543}" }, { "id": "284", - "name": "Miscellania", - "indexId": "226", "borders": "{2496,3840,2559,3903}" }, { "id": "285", - "name": "Etcetera", - "indexId": "227", "borders": "{2560,3840,2623,3903}" }, { "id": "286", - "name": "Shadowland", - "indexId": "228", "borders": "{3392,3200,3455,3263}-{3456,3264,3519,3327}-{2112,4992,2175,5055}" }, { "id": "287", - "name": "Lair", - "indexId": "229", "borders": "{3456,9664,3519,9727}" }, { "id": "288", - "name": "Deadlands", - "indexId": "230", "borders": "{3520,3456,3583,3519}" }, { "id": "289", - "name": "Rellekka", - "indexId": "231", "borders": "{2560,3648,2623,3711}" }, { "id": "290", - "name": "Saga", - "indexId": "232", "borders": "{2560,3584,2623,3647}" }, { "id": "291", - "name": "Borderland", - "indexId": "233", "borders": "{2688,3648,2751,3711}" }, { "id": "292", - "name": "Stranded", - "indexId": "234", "borders": "{2816,3712,2879,3775}-{2880,3712,2943,3775}" }, { "id": "293", - "name": "Legend", - "indexId": "235", "borders": "{2688,3584,2751,3647}" }, { "id": "294", - "name": "Frostbite", - "indexId": "236", "borders": "{2816,3776,2879,3839}" }, { "id": "295", - "name": "Warrior", - "indexId": "237", "borders": "{2624,10048,2687,10111}" }, { "id": "296", - "name": "Technology", - "indexId": "238", "borders": "{2560,4480,2623,4543}" }, { "id": "303", - "name": "Monkey Madness", - "indexId": "239", "borders": "{2752,2752,2815,2815}" }, { "id": "304", - "name": "Marooned", - "indexId": "241", "borders": "{2880,2688,2943,2751}-{3008,5440,3071,5503}" }, { "id": "305", - "name": "Anywhere", - "indexId": "240", "borders": "{2688,2752,2751,2815}" }, { "id": "306", - "name": "Island Life", - "indexId": "242", "borders": "{2688,2688,2751,2751}" }, { "id": "307", - "name": "Temple", - "indexId": "243", "borders": "{2752,9152,2815,9215}" }, { "id": "311", - "name": "Showdown", - "indexId": "245", "borders": "{2688,9152,2751,9215}" }, { "id": "312", - "name": "Find My Way", - "indexId": "246", "borders": "{2688,9088,2751,9151}" }, { "id": "314", - "name": "Castle Wars", - "indexId": "247", "borders": "{2368,3072,2431,3135}" }, { "id": "316", - "name": "The Navigator", - "indexId": "255", "borders": "{2624,9984,2687,10047}" }, { "id": "317", - "name": "Melodrama", - "indexId": "248", "borders": "{2432,3072,2495,3135}" }, { "id": "318", - "name": "Ready for Battle", - "indexId": "249", "borders": "{2368,9472,2431,9535}" }, { "id": "319", - "name": "Stillness", - "indexId": "250", "borders": "{3456,9792,3519,9855}" }, { "id": "320", - "name": "Lighthouse", - "indexId": "251", "borders": "{2496,3584,2559,3647}" }, { "id": "322", - "name": "Out of the Deep", - "indexId": "253", "borders": "{2496,9984,2559,10047}" }, { "id": "323", - "name": "Underground Pass", - "indexId": "134", "borders": "{2368,9536,2431,9599}" }, { "id": "324", - "name": "Background", - "indexId": "18", "borders": "{2752,3328,2815,3391}-{1920,4992,1983,5055}" }, { "id": "325", - "name": "Cave Background", - "indexId": "25", "borders": "{3008,9728,3071,9791}-{2944,9792,3007,9855}" }, { "id": "326", - "name": "Dark", - "indexId": "31", "borders": "{3328,3648,3391,3711}" }, { "id": "327", - "name": "Dream", - "indexId": "35", "borders": "{3136,3200,3199,3263}" }, { "id": "328", - "name": "March", - "indexId": "81", "borders": "{2496,3328,2559,3391}" }, { "id": "329", - "name": "Regal", - "indexId": "95", "borders": "{3264,3904,3327,3967}" }, { "id": "330", - "name": "Cellar Song", - "indexId": "173", "borders": "{3136,9792,3199,9855}" }, { "id": "331", - "name": "Scape Sad", - "indexId": "104", "borders": "{3264,3840,3327,3903}" }, { "id": "332", - "name": "Scape Wild", - "indexId": "105", "borders": "{3200,3648,3263,3711}-{3136,3840,3199,3903}" }, { "id": "333", - "name": "Spooky", - "indexId": "114", "borders": "{3072,3328,3135,3391}" }, { "id": "334", - "name": "Pirates of Peril", - "indexId": "262", "borders": "{3008,3904,3071,3967}" }, { "id": "335", - "name": "Romancing the Crone", - "indexId": "264", "borders": "{2752,3840,2815,3903}" }, { "id": "336", - "name": "Dangerous Road", - "indexId": "263", "borders": "{2816,9536,2879,9599}" }, { "id": "337", - "name": "Faithless", - "indexId": "265", "borders": "{3200,3584,3263,3647}" }, { "id": "338", - "name": "Tiptoe", - "indexId": "266", "borders": "{3072,9728,3135,9791}" }, { "id": "339", - "name": "The Terrible Tower", - "indexId": "267", "borders": "{3392,3520,3455,3583}" }, { "id": "340", - "name": "Masquerade", - "indexId": "268", "borders": "{2688,9984,2751,10047}" }, { "id": "341", - "name": "The Slayer", - "indexId": "269", "borders": "{2752,9984,2815,10047}" }, { "id": "342", - "name": "Body Parts", - "indexId": "270", "borders": "{3456,9920,3519,9983}" }, { "id": "343", - "name": "Monster Melee", - "indexId": "272", "borders": "{3136,9600,3199,9663}" }, { "id": "344", - "name": "Fenkenstrain's Refrain", - "indexId": "271", "borders": "{3456,3520,3519,3583}" }, { "id": "345", - "name": "Barking Mad", - "indexId": "274", "borders": "{3520,9856,3583,9919}" }, { "id": "346", - "name": "Goblin Game", - "indexId": "252", "borders": "{2560,9792,2623,9855}" }, { "id": "347", - "name": "Fruits de Mer", - "indexId": "273", "borders": "{2752,3264,2815,3327}" }, { "id": "348", - "name": "Narnode's Theme", - "indexId": "513", "borders": "{2432,9856,2495,9919}" }, { "id": "351", - "name": "Dynasty", - "indexId": "275", "borders": "{3328,2944,3391,3007}" }, { "id": "352", - "name": "Scarab", - "indexId": "282", "borders": "{3136,2880,3199,2943}" }, { "id": "353", - "name": "Shipwrecked", - "indexId": "276", "borders": "{3584,3520,3647,3583}" }, { "id": "354", - "name": "Phasmatys", - "indexId": "277", "borders": "{3648,9856,3711,9919}" }, { "id": "355", - "name": "The Other Side", - "indexId": "278", "borders": "{3648,3456,3711,3519}" }, { "id": "356", - "name": "Settlement", - "indexId": "279", "borders": "{2752,3648,2815,3711}" }, { "id": "357", - "name": "Cave of Beasts", - "indexId": "280", "borders": "{2752,10048,2815,10111}" }, { "id": "358", - "name": "Dragontooth Island", - "indexId": "281", "borders": "{3776,3520,3839,3583}" }, { "id": "359", - "name": "Sarcophagus", - "indexId": "283", "borders": "{3200,9280,3263,9343}" }, { "id": "361", - "name": "Down Below", - "indexId": "284", "borders": "{3072,9600,3135,9663}" }, { "id": "362", - "name": "Karamja Jam", - "indexId": "286", "borders": "{2688,9472,2751,9535}-{2688,9408,2751,9471}" }, { @@ -1669,644 +1115,430 @@ }, { "id": "364", - "name": "Pathways", - "indexId": "287", "borders": "{2688,9536,2751,9599}" }, { "id": "369", - "name": "Time to Mine", - "indexId": "289", "borders": "{2816,10112,2879,10175}" }, { "id": "370", - "name": "In Between", - "indexId": "290", "borders": "{2496,4928,2559,4991}" }, { "id": "372", - "name": "Far Away", - "indexId": "292", "borders": "{2304,3136,2367,3199}" }, { "id": "373", - "name": "Claustrophobia", - "indexId": "291", "borders": "{2304,4928,2367,4991}" }, { "id": "375", - "name": "Fight or Flight", - "indexId": "293", "borders": "{1920,4608,1983,4671}" }, { "id": "376", - "name": "Temple of Light", - "indexId": "294", "borders": "{1856,4608,1919,4671}" }, { "id": "377", - "name": "The Golem", - "indexId": "295", "borders": "{3392,3072,3455,3135}-{3456,3072,3519,3135}" }, { "id": "380", - "name": "Dance of the Undead", - "indexId": "298", "borders": "{3520,3264,3583,3327}" }, { "id": "381", - "name": "Dangerous Way", - "indexId": "299", "borders": "{3520,9664,3583,9727}" }, { "id": "383", - "name": "City of the Dead", - "indexId": "300", "borders": "{3200,2752,3263,2815}-{3264,2752,3327,2815}" }, { "id": "386", - "name": "Bandos Battalion", - "indexId": "492", "borders": "{2820,5312,2849,5369}-{2849,5349,2880,5374}" }, { "id": "387", - "name": "Sphinx", - "indexId": "302", "borders": "{3264,2816,3327,2879}" }, { "id": "388", - "name": "Mirage", - "indexId": "303", "borders": "{3264,9152,3327,9215}" }, { "id": "389", - "name": "Cave of the Goblins", - "indexId": "304", "borders": "{3136,9536,3199,9599}" }, { "id": "390", - "name": "Romper Chomper", - "indexId": "312", "borders": "{2304,3008,2367,3071}" }, { "id": "391", - "name": "Zamorak Zoo", - "indexId": "490", "borders": "{2879,5340,2944,5366}-{2909,5316,2944,5340}" }, { "id": "392", - "name": "Zogre Dance", - "indexId": "306", "borders": "{2432,3008,2495,3071}" }, { "id": "393", - "name": "Path of Peril", - "indexId": "307", "borders": "{2624,5056,2687,5119}" }, { "id": "394", - "name": "Wayward", - "indexId": "308", "borders": "{2432,9408,2495,9471}" }, { "id": "395", - "name": "Tale of Keldagrim", - "indexId": "309", "borders": "{2880,10112,2943,10175}" }, { "id": "396", - "name": "Land of the Dwarves", - "indexId": "310", "borders": "{2816,10176,2879,10239}" }, { "id": "397", - "name": "Tears of Guthix", - "indexId": "311", "borders": "{3200,9472,3263,9535}" }, { "id": "399", - "name": "Armageddon", - "indexId": "494", "borders": "{2816,5248,2943,5375,[2823,5250,2844,5310]~,[2844,5250,2878,5280]~,[2879,5340,2944,5366]~,[2909,5316,2944,5340]~,[2820,5312,2849,5369]~,[2849,5349,2880,5374]~,[2885,5253,2934,5278]~,[2913,5278,2937,5306]}" }, { "id": "401", - "name": "The Adventurer", - "indexId": "520", "borders": "" }, { "id": "402", - "name": "The Rogues' Den", - "indexId": "313", "borders": "{2944,4928,3007,4991}-{3008,4928,3071,4991}" }, { "id": "403", - "name": "The Far Side", - "indexId": "314", "borders": "{3008,5056,3071,5119}" }, { "id": "404", - "name": "Armadyl Alliance", - "indexId": "493", "borders": "{2823,5250,2844,5310}-{2844,5250,2878,5280}" }, { "id": "407", - "name": "The Lost Melody", - "indexId": "315", "borders": "{3264,9600,3327,9663}" }, { "id": "408", - "name": "Strength of Saradomin", - "indexId": "491", "borders": "{2885,5253,2934,5278}-{2913,5278,2937,5306}" }, { "id": "409", - "name": "Frogland", - "indexId": "336", "borders": "{2432,4736,2495,4799}" }, { "id": "411", - "name": "Evil Bob's Island", - "indexId": "316", "borders": "{2496,4736,2559,4799}" }, { "id": "412", - "name": "Into the Abyss", - "indexId": "317", "borders": "{3008,4800,3071,4863}" }, { "id": "413", - "name": "The Quiz Master", - "indexId": "318", "borders": "{1920,4736,1983,4799}" }, { "id": "418", - "name": "Corporal Punishment", - "indexId": "323", "borders": "{3136,4800,3199,4863}" }, { "id": "419", - "name": "Pheasant Peasant", - "indexId": "321", "borders": "{2560,4736,2623,4799}" }, { "id": "425", - "name": "The Chosen", - "indexId": "324", "borders": "{2432,4928,2495,4991}" }, { "id": "428", - "name": "Altar Ego", - "indexId": "501", "borders": "{3264,4800,3327,4863}" }, { "id": "432", - "name": "Grimly Fiendish", - "indexId": "509", "borders": "{1600,4800,1663,4863}-{1664,4800,1727,4863}" }, { "id": "434", - "name": "Have a Blast", - "indexId": "325", "borders": "{1920,4928,1983,4991}" }, { "id": "435", - "name": "Wilderness", - "indexId": "142", "borders": "{2944,3584,3007,3647}-{3072,3712,3135,3775}" }, { "id": "442", - "name": "Clan Wars", - "indexId": "515", "borders": "" }, { "id": "443", - "name": "Bounty Hunter Level 2", - "indexId": "518", "borders": "{2944,5632,3135,5823}" }, { "id": "444", - "name": "Bounty Hunter Level 1", - "indexId": "517", "borders": "{2688,5632,2879,5823}" }, { "id": "445", - "name": "Bounty Hunter Level 3", - "indexId": "519", "borders": "{3200,5632,3391,5823}" }, { "id": "447", - "name": "Over To Nardah", - "indexId": "328", "borders": "{3392,2880,3455,2943}" }, { "id": "448", - "name": "The Monsters Below", - "indexId": "329", "borders": "{2432,10112,2495,10175}" }, { "id": "454", - "name": "Home Sweet Home", - "indexId": "385", "borders": "" }, { "id": "456", - "name": "Animal Apogee", - "indexId": "504", "borders": "" }, { "id": "461", - "name": "The Desolate Isle", - "indexId": "330", "borders": "{2496,3712,2559,3775}" }, { "id": "462", - "name": "Spirits of Elid", - "indexId": "331", "borders": "{3328,9536,3391,9599}" }, { "id": "463", - "name": "Fire and Brimstone", - "indexId": "334", "borders": "{2368,5120,2431,5183}" }, { "id": "464", - "name": "The Genie", - "indexId": "332", "borders": "{3328,9280,3391,9343}" }, { "id": "465", - "name": "Desert Heat", - "indexId": "333", "borders": "{3392,2944,3455,3007}" }, { "id": "469", - "name": "In the Pits", - "indexId": "335", "borders": "{2432,5120,2495,5183}" }, { "id": "471", - "name": "Brew Hoo Hoo", - "indexId": "338", "borders": "{3648,9920,3711,9983}" }, { "id": "473", - "name": "TzHaar!", - "indexId": "339", "borders": "{2368,5056,2431,5119}" }, { "id": "475", - "name": "Wild Side", - "indexId": "340", "borders": "{3008,3840,3071,3903}" }, { "id": "476", - "name": "Dead Can Dance", - "indexId": "341", "borders": "{3136,3648,3199,3711}" }, { "id": "478", - "name": "The Cellar Dwellers", - "indexId": "342", "borders": "{2496,9664,2559,9727}" }, { "id": "479", - "name": "Jungle Troubles", - "indexId": "343", "borders": "{2880,3072,2943,3135}" }, { "id": "481", - "name": "Catch Me If You Can", - "indexId": "344", "borders": "{2624,9600,2687,9663}" }, { "id": "482", - "name": "Rat a Tat Tat", - "indexId": "345", "borders": "{2880,5056,2943,5119}" }, { "id": "489", - "name": "Bubble and Squeak", - "indexId": "347", "borders": "{1920,4672,1983,4735}" }, { "id": "490", - "name": "Sarim's Vermin", - "indexId": "348", "borders": "{2944,9600,3007,9663}" }, { "id": "491", - "name": "Rat Hunt", - "indexId": "349", "borders": "{2816,5056,2879,5119}" }, { "id": "496", - "name": "The Trade Parade", - "indexId": "555", "borders": "{3136,3456,3199,3519}" }, { "id": "497", - "name": "Aye Car Rum Ba", - "indexId": "351", "borders": "{2112,5056,2175,5119}" }, { "id": "498", - "name": "Blistering Barnacles", - "indexId": "352", "borders": "{2112,5120,2175,5183}" }, { "id": "500", - "name": "A New Menace", - "indexId": "522", "borders": "" }, { "id": "501", - "name": "Distant Land", - "indexId": "353", "borders": "{3456,3136,3519,3199}" }, { "id": "505", - "name": "Pharaoh's Tomb", - "indexId": "355", "borders": "{3328,2816,3391,2879}-{3008,4672,3071,4735}" }, { "id": "511", - "name": "In the Clink", - "indexId": "360", "borders": "{2048,4416,2111,4479}" }, { "id": "515", - "name": "Mudskipper Melody", - "indexId": "361", "borders": "{2944,3072,3007,3135}" }, { "id": "517", - "name": "Subterranea", - "indexId": "362", "borders": "{2496,10112,2559,10175}" }, { "id": "526", - "name": "Arma Gonna Get You", - "indexId": "592", "borders": "" }, { "id": "524", - "name": "Xenophobe", - "indexId": "366", "borders": "{1856,4352,1919,4415}-{2880,4416,2943,4479}" }, { "id": "528", - "name": "Victory is Mine", - "indexId": "368", "borders": "{3136,9728,3199,9791}" }, { "id": "529", - "name": "Woe of the Wyvern", - "indexId": "369", "borders": "{3008,9536,3071,9599}" }, { "id": "530", - "name": "In the Brine", - "indexId": "370", "borders": "{3648,2944,3711,3007}" }, { "id": "532", - "name": "Diango's Little Helpers", - "indexId": "371", "borders": "{1984,4416,2047,4479}" }, { "id": "542", - "name": "Lament", - "indexId": "381", "borders": "{3072,9280,3135,9343}" }, { "id": "544", - "name": "Making Waves", - "indexId": "378", "borders": "{2304,3648,2367,3711}-{2304,3584,2367,3647}" }, { "id": "555", - "name": "Ardougne Ago", - "indexId": "613", "borders": "" }, { "id": "569", - "name": "Undead Army", - "indexId": "607", "borders": "{3200,9984,3263,10047}" }, { "id": "571", - "name": "Art of Hocus-Pocus", - "indexId": "624", "borders": "" }, { "id": "573", - "name": "The Mad Mole", - "indexId": "393", "borders": "{1728,5120,1791,5247}" }, { "id": "575", - "name": "Chickened Out", - "indexId": "395", "borders": "{2432,4352,2495,4415}" }, { "id": "576", - "name": "Davy Jones's Locker", - "indexId": "394", "borders": "{2944,9472,3007,9535}" }, { "id": "583", - "name": "Chef Surprize", - "indexId": "399", "borders": "{1856,5312,1919,5375}" }, { "id": "586", - "name": "Everlasting Fire", - "indexId": "417", "borders": "{3328,3904,3391,3967}" }, { "id": "587", - "name": "Null and Void", - "indexId": "400", "borders": "{2624,2624,2687,2687}" }, { "id": "588", - "name": "Pest Control", - "indexId": "401", "borders": "{2624,2560,2687,2623}" }, { "id": "594", - "name": "No Way Out", - "indexId": "403", "borders": "{3264,9792,3327,9855}-{3072,5184,3135,5247}-{3008,5184,3071,5247}" }, { "id": "603", - "name": "Funny Bunnies", - "indexId": "406", "borders": "{2432,5248,2495,5311}" }, { "id": "604", - "name": "Assault and Battery", - "indexId": "407", "borders": "" }, { "id": "612", - "name": "Head to Head", - "indexId": "411", "borders": "{1856,5120,1919,5183}" }, { "id": "616", - "name": "Back to Life", - "indexId": "414", "borders": "" }, { "id": "634", - "name": "Warriors' Guild", - "indexId": "423", "borders": "" }, { "id": "964", - "name": "Too Many Cooks...", - "indexId": "398", "borders": "{2944,9856,3007,9919}" }, { "id": "222", - "name": "Major Miner", - "indexId": "437", "borders": "{2403,10186,2409,10192}" }, { "id": "223", - "name": "Norse Code", - "indexId": "439", "borders": "{2404,3797,2421,3820}" }, { "id": "225", - "name": "Volcanic Vikings", - "indexId": "440", "borders": "{2304,3785,2635,3818}" }, { "id": "584", - "name": "Temple Desecrated", - "indexId": "628", "borders": "{2580,5763,2620,5700}" }, { "id": "589", - "name": "The Sound of Guthix", - "indexId": "626", "borders": "{2500,5766,2620,5810}" }, { "id": "487", - "name": "Charmin' Farmin'", - "indexId": "516", "borders": "{1600,4672,1663,4735}" }, { "id": "578", - "name": "Stealing Creation", - "indexId": "620", "borders": "" } ] diff --git a/Server/src/main/java/core/cache/def/impl/AnimationDefinition.java b/Server/src/main/java/core/cache/def/impl/AnimationDefinition.java index 7eb25798f..9f54a1d61 100644 --- a/Server/src/main/java/core/cache/def/impl/AnimationDefinition.java +++ b/Server/src/main/java/core/cache/def/impl/AnimationDefinition.java @@ -141,7 +141,7 @@ public final class AnimationDefinition { int i_22_ = buffer.get() & 0xFF; if ((i_22_ ^ 0xffffffff) < -1) { handledSounds[i_21_] = new int[i_22_]; - handledSounds[i_21_][0] = ByteBufferUtils.getTriByte(buffer); + handledSounds[i_21_][0] = ByteBufferUtils.getMedium(buffer); for (int i_23_ = 1; ((i_22_ ^ 0xffffffff) < (i_23_ ^ 0xffffffff)); i_23_++) { handledSounds[i_21_][i_23_] = buffer.getShort() & 0xFFFF; } diff --git a/Server/src/main/java/core/cache/def/impl/DataMap.java b/Server/src/main/java/core/cache/def/impl/DataMap.java new file mode 100644 index 000000000..f00e921d2 --- /dev/null +++ b/Server/src/main/java/core/cache/def/impl/DataMap.java @@ -0,0 +1,117 @@ +package core.cache.def.impl; + +import core.cache.Cache; +import core.cache.CacheFileManager; +import core.cache.misc.Container; +import core.cache.misc.buffer.ByteBufferUtils; +import core.tools.CP1252; +import rs09.game.system.SystemLogger; + +import java.nio.ByteBuffer; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +public class DataMap { + + /** + * The config definitions mapping. + */ + private static final Map definitions = new HashMap<>(); + + /** + * The enum id. + */ + private final int id; + + public char keyType = '?'; + + public char valueType = '?'; + + public String defaultString; + + public int defaultInt; + + public HashMap dataStore = new HashMap<>(); + + public DataMap(int id) { + this.id = id; + } + + public int getInt(int key){ + if(!dataStore.containsKey(key)){ + SystemLogger.logErr("Invalid value passed for key: " + key + " map: " + id); + return -1; + } + return (int) dataStore.get(key); + } + + public String getString(int key){ + return (String) dataStore.get(key); + } + + @Override + public String toString() { + StringBuilder builder = new StringBuilder(); + return "DataMapDefinition{" + + "id=" + id + + ", keyType=" + keyType + + ", valueType=" + (valueType == 'K' ? "Normal" : valueType == 'J' ? "Struct Pointer" : "Unknown") + + ", defaultString='" + defaultString + '\'' + + ", defaultInt=" + defaultInt + + ", dataStore=" + dataStore + + '}' + "\n"; + } + + public static DataMap get(int id){ + core.cache.def.impl.DataMap def = definitions.get(id); + if (def != null) { + return def; + } + byte[] data = Cache.getIndexes()[17].getFileData(id >>> 8, id & 0xFF); + def = parse(id, data); + definitions.put(id, def); + return def; + } + + public static DataMap parse(int id, byte[] data) + { + DataMap def = new DataMap(id); + if (data != null) { + ByteBuffer buffer = ByteBuffer.wrap(data); + int opcode; + + while ((opcode = buffer.get() & 0xFF) != 0) { + + if (opcode == 1) { + def.keyType = CP1252.getFromByte(buffer.get()); + } else if (opcode == 2) { + def.valueType = CP1252.getFromByte(buffer.get()); + } else if (opcode == 3) { + def.defaultString = ByteBufferUtils.getString(buffer); + } else if (opcode == 4) { + def.defaultInt = buffer.getInt(); + } else if (opcode == 5 || opcode == 6) { + int size = buffer.getShort() & 0xFFFF; + + for (int i = 0; i < size; i++) { + int key = buffer.getInt(); + + Object value; + if (opcode == 5) { + value = ByteBufferUtils.getString(buffer); + } else { + value = buffer.getInt(); + } + def.dataStore.put(key, value); + } + } + } + } + return def; + } + + public int getId() { + return id; + } +} diff --git a/Server/src/main/java/core/cache/def/impl/ItemDefinition.java b/Server/src/main/java/core/cache/def/impl/ItemDefinition.java index bf222cbff..6c5e82a9c 100644 --- a/Server/src/main/java/core/cache/def/impl/ItemDefinition.java +++ b/Server/src/main/java/core/cache/def/impl/ItemDefinition.java @@ -495,7 +495,7 @@ public class ItemDefinition extends Definition { } for (int index = 0; index < length; index++) { boolean string = (buffer.get() & 0xFF) == 1; - int key = ByteBufferUtils.getTriByte(buffer); + int key = ByteBufferUtils.getMedium(buffer); Object value = string ? ByteBufferUtils.getString(buffer) : buffer.getInt(); def.clientScriptData.put(key, value); } diff --git a/Server/src/main/java/core/cache/def/impl/NPCDefinition.java b/Server/src/main/java/core/cache/def/impl/NPCDefinition.java index e2105888f..20a6d3b20 100644 --- a/Server/src/main/java/core/cache/def/impl/NPCDefinition.java +++ b/Server/src/main/java/core/cache/def/impl/NPCDefinition.java @@ -473,7 +473,7 @@ public final class NPCDefinition extends Definition { length = buffer.get() & 0xFF; for (int i = 0; i < length; i++) { boolean string = buffer.get() == 1; - ByteBufferUtils.getTriByte(buffer); // script id + ByteBufferUtils.getMedium(buffer); // script id if (!string) { buffer.getInt(); // Value } else { diff --git a/Server/src/main/java/core/cache/def/impl/SceneryDefinition.java b/Server/src/main/java/core/cache/def/impl/SceneryDefinition.java index d0317fb00..7e7aa41cf 100644 --- a/Server/src/main/java/core/cache/def/impl/SceneryDefinition.java +++ b/Server/src/main/java/core/cache/def/impl/SceneryDefinition.java @@ -792,7 +792,7 @@ public class SceneryDefinition extends Definition { int length = buffer.get() & 0xFF; for (int i = 0; i < length; i++) { boolean string = buffer.get() == 1; - ByteBufferUtils.getTriByte(buffer); // script id + ByteBufferUtils.getMedium(buffer); // script id if (!string) { buffer.getInt(); // Value } else { diff --git a/Server/src/main/java/core/cache/def/impl/Struct.java b/Server/src/main/java/core/cache/def/impl/Struct.java new file mode 100644 index 000000000..968cb5e19 --- /dev/null +++ b/Server/src/main/java/core/cache/def/impl/Struct.java @@ -0,0 +1,99 @@ +package core.cache.def.impl; + +import core.cache.Cache; +import core.cache.CacheFileManager; +import core.cache.misc.Container; +import core.cache.misc.buffer.ByteBufferUtils; +import rs09.game.system.SystemLogger; + +import java.nio.ByteBuffer; +import java.util.HashMap; +import java.util.Map; + +public class Struct { + + /** + * The struct definitions mapping. + */ + private static final Map definitions = new HashMap<>(); + + /** + * The enum id. + */ + private final int id; + + public HashMap dataStore = new HashMap<>(); + + public Struct(int id) { + this.id = id; + } + + public int getInt(int key){ + if(!dataStore.containsKey(key)){ + SystemLogger.logErr("Invalid value passed for key: " + key + " struct: " + id); + return -1; + } + return (int) dataStore.get(key); + } + + public String getString(int key){ + return (String) dataStore.get(key); + } + + @Override + public String toString() { + return "Struct{" + + "id=" + id + + ", dataStore=" + dataStore + + '}'; + } + + public static Struct get(int id){ + Struct def = definitions.get(id); + if (def != null) { + return def; + } + byte[] data = Cache.getIndexes()[2].getFileData(26, id); + def = parse(id, data); + + definitions.put(id, def); + return def; + } + + public static Struct parse(int id, byte[] data) + { + Struct def = new Struct(id); + if (data != null) { + ByteBuffer buffer = ByteBuffer.wrap(data); + int opcode; + + while ((opcode = buffer.get() & 0xFF) != 0) { + + if (opcode == 249) { + int size = buffer.get() & 0xFF; + + for (int i = 0; size > i; i++) { + boolean bool = (buffer.get() & 0xFF) == 1; + int key = ByteBufferUtils.getMedium(buffer); + Object value; + if (bool) { + value = ByteBufferUtils.getString(buffer); + } else { + value = buffer.getInt(); + } + def.dataStore.put(key, value); + } + } + } + } + return def; + } + + public static int getCount() { + return Cache.getIndexes()[2].getFilesSize(26); + } + + public int getId() { + return id; + } +} diff --git a/Server/src/main/java/core/cache/misc/buffer/ByteBufferUtils.java b/Server/src/main/java/core/cache/misc/buffer/ByteBufferUtils.java index 6c08a9db1..fb04ae272 100644 --- a/Server/src/main/java/core/cache/misc/buffer/ByteBufferUtils.java +++ b/Server/src/main/java/core/cache/misc/buffer/ByteBufferUtils.java @@ -105,7 +105,7 @@ public final class ByteBufferUtils { * @param buffer The buffer. * @return The value. */ - public static int getTriByte(ByteBuffer buffer) { + public static int getMedium(ByteBuffer buffer) { return ((buffer.get() & 0xFF) << 16) + ((buffer.get() & 0xFF) << 8) + (buffer.get() & 0xFF); } diff --git a/Server/src/main/java/core/game/node/entity/player/link/music/MusicPlayer.java b/Server/src/main/java/core/game/node/entity/player/link/music/MusicPlayer.java index 54a3cdae8..68e73a28f 100644 --- a/Server/src/main/java/core/game/node/entity/player/link/music/MusicPlayer.java +++ b/Server/src/main/java/core/game/node/entity/player/link/music/MusicPlayer.java @@ -168,7 +168,7 @@ public final class MusicPlayer { */ public void play(MusicEntry entry) { PacketRepository.send(MusicPacket.class, new MusicContext(player, entry.getId())); - PacketRepository.send(StringPacket.class, new StringContext(player, entry.getName(), 187, 14)); + PacketRepository.send(StringPacket.class, new StringContext(player, entry.getName() + (player.isDebug() ? (" (" + entry.getId() + ")") : ""), 187, 14)); currentMusicId = entry.getId(); playing = true; } diff --git a/Server/src/main/java/core/net/event/JS5ReadEvent.java b/Server/src/main/java/core/net/event/JS5ReadEvent.java index 893e9d374..ded5d14d5 100644 --- a/Server/src/main/java/core/net/event/JS5ReadEvent.java +++ b/Server/src/main/java/core/net/event/JS5ReadEvent.java @@ -33,7 +33,7 @@ public final class JS5ReadEvent extends IoReadEvent { switch (opcode) { case 0: case 1: - int request = ByteBufferUtils.getTriByte(buffer); + int request = ByteBufferUtils.getMedium(buffer); //System.out.println("Requested file " + request); int container = request >> 16 & 0xFF; //System.out.println("In container " + container); @@ -62,7 +62,7 @@ public final class JS5ReadEvent extends IoReadEvent { buffer.getInt(); break; case 6: - ByteBufferUtils.getTriByte(buffer); // Value should be 3 + ByteBufferUtils.getMedium(buffer); // Value should be 3 // buffer.getShort(); // Value should be 0 break; case 7: diff --git a/Server/src/main/java/core/tools/CP1252.java b/Server/src/main/java/core/tools/CP1252.java new file mode 100644 index 000000000..9269b8710 --- /dev/null +++ b/Server/src/main/java/core/tools/CP1252.java @@ -0,0 +1,23 @@ +package core.tools; + +public class CP1252 { + private static char[] charMap = {'\u20ac', '\0', '\u201a', '\u0192', '\u201e', '\u2026', '\u2020', '\u2021', + '\u02c6', '\u2030', '\u0160', '\u2039', '\u0152', '\0', '\u017d', '\0', '\0', '\u2018', '\u2019', + '\u201c', '\u201d', '\u2022', '\u2013', '\u2014', '\u02dc', '\u2122', '\u0161', '\u203a', '\u0153', + '\0', '\u017e', '\u0178'}; + + public static char getFromByte(byte value) { + int out = value & 0xff; + if (out == 0) { + throw new IllegalArgumentException("Non cp1252 character 0x" + Integer.toString(out, 16) + " provided"); + } + if (out >= 128 && out < 160) { + int cp1252 = charMap[out - 128]; + if (cp1252 == 0) { + cp1252 = 63; + } + out = cp1252; + } + return (char) out; + } +} diff --git a/Server/src/main/kotlin/rs09/game/interaction/QCRepository.kt b/Server/src/main/kotlin/rs09/game/interaction/QCRepository.kt index 25e19c175..8f1c75b01 100644 --- a/Server/src/main/kotlin/rs09/game/interaction/QCRepository.kt +++ b/Server/src/main/kotlin/rs09/game/interaction/QCRepository.kt @@ -1,6 +1,7 @@ package rs09.game.interaction import core.cache.Cache +import core.cache.def.impl.DataMap import core.cache.def.impl.ItemDefinition import core.cache.def.impl.NPCDefinition import core.cache.misc.buffer.ByteBufferUtils @@ -21,37 +22,7 @@ import java.nio.ByteBuffer * Handles the sending of quick chat messages and string-replacement for specific messages. * @author Ceikry */ -//TODO: A lot of the menus defined in the massive arrays at the bottom need to be rearranged because the order they appear in the menu and the order they are actually in is quite different. Start clicking through the "can you cook me..." menu to see what I mean. -//TODO: I've done the groundwork, Please someone else take up the task of rearranging these menus object QCRepository { - - val skillIDs = mapOf( - 0 to "Agility", - 1 to "Attack", - 2 to "Construction", - 3 to "Cooking", - 4 to "Crafting", - 5 to "Defence", - 6 to "Farming", - 7 to "Firemaking", - 8 to "Fishing", - 9 to "Fletching", - 10 to "Herblore", - 11 to "Hitpoints", - 12 to "Hunter", - 13 to "Thieving", - 14 to "Summoning", - 15 to "Strength", - 16 to "Smithing", - 19 to "Slayer", - 20 to "Runecrafting", - 21 to "Ranged", - 22 to "Prayer", - 23 to "Mining", - 24 to "Magic", - 25 to "Woodcutting" - ) - private val quickChatIndex = Cache.getIndexes()[24] /** @@ -62,8 +33,8 @@ object QCRepository { val index = getIndex(offset, multiplier) player?.setAttribute("qc_offset", offset) //Slapping this in an attribute because it's only useful for one or two messages val qcString = when(packetType){ - QCPacketType.SINGLE -> getSingleQC(player, index, selection_a_index) - QCPacketType.DOUBLE -> getDoubleQC(player, index, selection_a_index, selection_b_index) + QCPacketType.SINGLE -> getSingleQC(index, selection_a_index) + QCPacketType.DOUBLE -> getDoubleQC(index, selection_a_index, selection_b_index) QCPacketType.STANDARD -> getStandardQC(player, index) else -> "" } @@ -96,9 +67,9 @@ object QCRepository { //XP to next level if (qcString.contains("to get my next")) { - val offset = player?.getAttribute("qc_offset", 0) ?: 0 - val skillName = skillIDs[offset - 103] - val skill = Skills.getSkillByName(skillName?.toUpperCase()) + val split = qcString.split(" ") + val skillName = split[split.size - 2] + val skill = Skills.getSkillByName(skillName.toUpperCase()) val playerXP = player?.skills?.getExperience(skill) val playerLevel = player?.skills?.getStaticLevel(skill) val nextXP = player?.skills?.getExperienceByLevel(playerLevel?.plus(1) ?: 1) @@ -130,7 +101,7 @@ object QCRepository { * For Single-replacement quick chat messages with one replacement selection */ @JvmStatic - fun getSingleQC(player: Player?, index: Int, selectionIndex: Int): String{ + fun getSingleQC(index: Int, selectionIndex: Int): String{ var qcString = getQCString(index) //Messages that include items @@ -141,184 +112,185 @@ object QCRepository { //Loan duration else if (qcString.contains("I'd like the loan duration to be")){ - qcString = when(selectionIndex){ - 0 -> qcString.replace("<", "just until one of us logs out") - else -> qcString.replace("<", "${selectionIndex} hours") - } + qcString = qcString.replace("<", getFromMap(1642, selectionIndex)) } //Go to agility course / Try training your agility at else if (qcString.contains("Let's go to Agility course:") || qcString.contains("Try training your Agility at:")){ - qcString = qcString.replace("<", AGILITY_COURSES[selectionIndex]) + qcString = qcString.replace("<", getFromMap(1505, selectionIndex)) } //Try training on else if(qcString.contains("Try training on")){ - qcString = qcString.replace("<", TRAIN_MELEE_NPCS[selectionIndex]) + qcString = qcString.replace("<", getFromMap(1524, selectionIndex)) } //Try ranging else if(qcString.contains("Try ranging")){ - qcString = qcString.replace("<", TRAIN_RANGE_NPCS[selectionIndex]) + qcString = qcString.replace("<", getFromMap(1525, selectionIndex)) } //flat-pack else if(qcString.contains("flat-pack")){ - qcString = qcString.replace("<", FLATPAKS[selectionIndex]) + qcString = qcString.replace("<", getFromMap(1490, selectionIndex)) } //Cooking else if(qcString.contains("I'm cooking") || qcString.contains("Would you please cook me") || qcString.contains("Try cooking")){ - qcString = qcString.replace("<", COOK_ITEMS[selectionIndex]) + qcString = qcString.replace("<", getFromMap(1492, selectionIndex)) } //Crafting else if(qcString.contains("I am crafting") || qcString.contains("Try crafting") || qcString.contains("Would you please craft me")){ - qcString = qcString.replace("<", CRAFT_ITEMS[selectionIndex]) + qcString = qcString.replace("<", getFromMap(1493, selectionIndex)) } //Farming else if(qcString.contains("I'm growing crop") || qcString.contains("Try growing crop")){ - qcString = qcString.replace("<", FARM_CROPS[selectionIndex]) + qcString = qcString.replace("<", getFromMap(1494, selectionIndex)) } //I'm burning logs... else if(qcString.contains("I'm burning logs")){ - qcString = qcString.replace("<", FM_LOGS[selectionIndex]) + qcString = qcString.replace("<", getFromMap(1495, selectionIndex)) } //Try burning logs at else if(qcString.contains("Try burning logs at")){ - qcString = qcString.replace("<", FM_LOCATIONS[selectionIndex]) + qcString = qcString.replace("<", getFromMap(1544, selectionIndex)) } //Fishing else if(qcString.contains("I'm fishing") || qcString.contains("Would you please fish me") || qcString.contains("Try fishing for")){ - qcString = qcString.replace("<", FISH[selectionIndex]) + qcString = qcString.replace("<", getFromMap(1491, selectionIndex)) } //Fletching else if(qcString.contains("I'm fletching") || qcString.contains("Try fletching") || qcString.contains("Would you please fetch me")){ - qcString = qcString.replace("<", FLETCH_ITEMS[selectionIndex]) + qcString = qcString.replace("<", getFromMap(1496, selectionIndex)) } //Herblore else if(qcString.contains("I'm mixing potion") || qcString.contains("Would you please mix me a potion") || qcString.contains("Try mixing potion")){ - qcString = qcString.replace("<", HERB_POTIONS[selectionIndex]) + qcString = qcString.replace("<", getFromMap(1526, selectionIndex)) } //Herblore secondaries else if(qcString.contains("Where can I get the secondary ingredient")){ - qcString = qcString.replace("<", HERB_SECONDARIES[selectionIndex]) + qcString = qcString.replace("<", getFromMap(1516, selectionIndex)) } //Hunter else if(qcString.contains("Would you please hunt me") || qcString.contains("Try hunting")){ - qcString = qcString.replace("<", HUNTER_ANIMALS[selectionIndex]) + qcString = qcString.replace("<", getFromMap(1543, selectionIndex)) } //Casting spell else if(qcString.contains("I'm casting spell") || qcString.contains("Would you please cast")){ - qcString = qcString.replace("<", MAGIC_SPELLS[selectionIndex]) + qcString = qcString.replace("<", getFromMap(1527, selectionIndex)) } //Spellbook else if(qcString.contains("I am on spell book")){ - qcString = qcString.replace("<", MAGIC_BOOKS[selectionIndex]) + qcString = qcString.replace("<", getFromMap(1528, selectionIndex)) } //Mining ore else if(qcString.contains("I'm mining ore")){ - qcString = qcString.replace("<", ORES[selectionIndex]) + qcString = qcString.replace("<", getFromMap(1529, selectionIndex)) } //Pickaxe using else if(qcString.contains("I'm using a pick")){ - qcString = qcString.replace("<", PICKAXE_TYPES[selectionIndex]) + qcString = qcString.replace("<", getFromMap(1531, selectionIndex)) } //Try mining at else if(qcString.contains("Try mining at")){ - qcString = qcString.replace("<", MINING_LOCATIONS[selectionIndex]) + qcString = qcString.replace("<", getFromMap(1533, selectionIndex)) } //Use your prayer else if(qcString.contains("Use your prayer")){ - qcString = qcString.replace("<", PRAYERS[selectionIndex]) + qcString = qcString.replace("<", getFromMap(1534, selectionIndex)) } //i'm going to craft rune else if(qcString.contains("I'm going to craft rune")){ - qcString = qcString.replace("<", RUNES[selectionIndex]) + qcString = qcString.replace("<", getFromMap(1535, selectionIndex)) } //try crafting runes at else if(qcString.contains("Try crafting runes at")){ - qcString = qcString.replace("<", RC_LOCATIONS[selectionIndex]) + qcString = qcString.replace("<", getFromMap(1536, selectionIndex)) } //Slayer master in else if(qcString.contains("You should use the Slayer master in")){ - qcString = qcString.replace("<", SLAYER_LOCATIONS[selectionIndex]) + qcString = qcString.replace("<", getFromMap(2139, selectionIndex)) } //Spare slayer equipment else if(qcString.contains("Do you have spare Slayer equipment")){ - qcString = qcString.replace("<", SLAYER_EQUIPMENT[selectionIndex]) + qcString = qcString.replace("<", getFromMap(1538, selectionIndex)) } //familiars else if(qcString.contains("I like the familiar") || qcString.contains("I can summon up to")){ - qcString = qcString.replace("<", FAMILIARS[selectionIndex]) + qcString = qcString.replace("<", getFromMap(1539, selectionIndex)) } //charm droppers else if(qcString.contains("Good charm droppers are")){ - qcString = qcString.replace("<", CHARM_DROPPERS[selectionIndex]) + qcString = qcString.replace("<", getFromMap(1499, selectionIndex)) } //Thieving else if(qcString.contains("Try thieving from")){ - qcString = qcString.replace("<", THIEVE_TARGETS[selectionIndex]) + qcString = qcString.replace("<", getFromMap(1540, selectionIndex)) } //Axe made of else if(qcString.contains("I'm using a woodcutting axe made")){ - qcString = qcString.replace("<", AXE_TYPES[selectionIndex]) + qcString = qcString.replace("<", getFromMap(1532, selectionIndex)) } //Try training woodcutting at else if(qcString.contains("Try training Woodcutting at")){ - qcString = qcString.replace("<", WOODCUTTING_LOCATIONS[selectionIndex]) + qcString = qcString.replace("<", getFromMap(1500, selectionIndex)) } //Nice level in else if(qcString.contains("Nice level in")){ - qcString = qcString.replace("<", SKILL_NAMES[selectionIndex]) + qcString = qcString.replace("<", getFromMap(1517, selectionIndex)) } return qcString } + fun getFromMap(map: Int, index: Int): String + { + return DataMap.get(map).getString(index) + } /** * For Double-replacement quick chat messages with 2 selection replacements. */ @JvmStatic - fun getDoubleQC(player: Player?, index: Int, selection_a_index: Int, selection_b_index: Int): String{ + fun getDoubleQC(index: Int, selection_a_index: Int, selection_b_index: Int): String{ var qcString = getQCString(index) //Giving directions: That is _ of _ if(qcString.contains("That is < of <")){ - qcString = qcString.replaceFirst("<", DIRECTIONS[selection_a_index]) - qcString = qcString.replaceFirst("<", DIR_LOCATIONS[selection_b_index]) + qcString = qcString.replaceFirst("<", getFromMap(1502, selection_a_index)) + qcString = qcString.replaceFirst("<", getFromMap(1504, selection_b_index)) } //Smithing else if(qcString.contains("I am smithing") || qcString.contains("Try smithing") || qcString.contains("Would you please smith me")){ - qcString = qcString.replaceFirst("<", SMITHING_BARTYPES[selection_a_index]) - qcString = qcString.replaceFirst("<", SMITHING_PRODUCTS[selection_b_index]) + qcString = qcString.replaceFirst("<", getFromMap(1530, selection_a_index)) + qcString = qcString.replaceFirst("<", getFromMap(1498, selection_b_index)) } return qcString @@ -341,41 +313,6 @@ object QCRepository { } private fun getQCString(index: Int): String{ - return ByteBufferUtils.getString(ByteBuffer.wrap(QCRepository.quickChatIndex.getFileData(1, index))) + return ByteBufferUtils.getString(ByteBuffer.wrap(quickChatIndex.getFileData(1, index))) } -} - -private val AGILITY_COURSES: Array = arrayOf("Agility Pyramid", "Ape Atoll", "Barbarian Outpost", "Brimhaven Agility Arena", "Dorgesh-Kaan", "Gnome Stronghold Course", "Penguin Course", "Werewolf Agility Course", "Wilderness Course", "Gnome Ball", "Werewolf Skullball") -private val TRAIN_MELEE_NPCS: Array = arrayOf("black demons", "blue dragons", "chickens", "cows", "cyclopes", "dagannoths", "experiments", "fire giants", "goblins", "guards", "hill giants", "ice giants", "lesser demons", "moss giants", "Slayer creatures") -private val TRAIN_RANGE_NPCS: Array = arrayOf("barbarians", "black demons", "blue dragons", "chickens", "cows", "dark wizards", "dwarves", "fire giants", "goblins", "guards", "hill giants", "lesser demons", "moss giants", "rats", "zombies") -private val FLATPAKS: Array = arrayOf("Asgarnian Ale barrel", "beer barrel", "carved oak bench", "carved oak dining table", "carved oak magic wardrobe", "carved teak bench", "carved teak magic wardrobe", "carved teak table", "Chef's Delight barrel", "cider barrel", "crude wooden chair", "Dragon Bitter barrel", "fancy teak dresser", "four-poster bed", "gilded bench", "gilded cape rack", "gilded clock", "gilded dresser", "gilded four-poster bed", "gilded magic wardrobe", "gilded wardrobe", "Greenman's Ale barrel", "large oak bed", "large teak bed", "magical cape rack", "mahogany armchair", "mahogany armour case", "mahogany bench", "mahogany bookcase", "mahogany cape rack", "mahogany costume box", "mahogany dresser", "mahogany magic wardrobe", "mahogany table", "mahogany toy box", "mahogany treasure chest", "mahogany wardrobe", "marble cape rack", "marble magic wardrobe", "oak armchair", "oak armour case", "oak bed", "oak bench", "oak bookcase", "oak cape rack", "oak chair", "oak clock", "oak costume box", "oak dining table", "oak drawers", "oak dresser", "oak kitchen table", "oak magic wardrobe", "oak shaving stand", "oak toy box", "oak treasure chest", "oak wardrobe", "opulent table", "rocking chair", "shaving stand", "shoe box", "teak armchair", "teak armour case", "teak bed", "teak cape rack", "teak clock", "teak costume box", "teak dining bench", "teak drawers", "teak dresser", "teak kitchen table", "teak magic wardrobe", "teak table", "teak toy box", "teak treasure chest", "teak wardrobe", "wooden bed", "wooden bench", "wooden bookcase", "wooden chair", "wooden dining table", "wooden kitchen table") -private val COOK_ITEMS: Array = arrayOf("admiral pie", "anchovies", "anchovy pizza", "apple pie", "bass", "bear meat", "bread", "bird meat", "cake", "cave eel", "cheese and tomato batta", "chicken", "chilli con carne", "chilli potato", "choc chip crunchies", "chocolate bomb", "chocolate cake", "chompy", "cod", "cooked pawya", "cooked rabbit", "crab meat", "crayfish", "curry", "egg and tomato", "egg and tomato potato", "fat snail", "fish pie", "fishcake", "fried mushrooms", "fried onions", "fruit batta", "garden pie", "herring", "jubbly", "karambwan", "karambwanji", "lava eel", "lean snail", "leaping salmon", "leaping sturgeon", "leaping trout", "lobster", "mackerel", "manta ray", "meat", "meat pie", "meat pizza", "monkfish", "mud pie", "mushroom and onion", "mushroom and onion potato", "oomlie wrap", "pawya", "pike", "pineapple pizza", "pitta bread", "plain pizza", "potato", "rabbit", "rainbow fish", "rat meat", "redberry pie", "roasted beast meat", "roasted rabbit", "baked potato with butter", "salmon", "sardine", "baked potato", "scrambled egg", "sea turtle", "seaweed", "shark", "shrimp", "slimy eel", "spice crunchies", "spicy meat", "spicy sauce", "spider on a stick", "stew", "summer pie", "sweetcorn", "swordfish", "tangled toads' legs", "thin snail", "toad batta", "toad crunchies", "trout", "tuna", "tuna and corn", "tuna and corn potato", "ugthanki kebab", "ugthanki meat", "vegball", "vegetable ball", "vegetable batta", "wild pie", "worm batta", "worm crunchies", "worm hole") -private val CRAFT_ITEMS: Array = arrayOf("air battlestaves", "balls of wool", "baskets", "beer glasses", "black dragonhide bodies", "black dragonhide chaps", "black dragonhide vambraces", "black spiked vambraces", "blue dragonhide bodies", "blue dragonhide chaps", "blue dragonhide vambraces", "blue spiked vambraces", "bowls", "bowstrings", "bullseye lanterns", "candle lanterns", "cloth", "coifs", "crossbow strings", "diamond amulets", "diamond bracelets", "diamond necklaces", "diamond rings", "diamonds", "Dorgeshuun light orbs", "dragonstone amulets", "dragonstone bracelets", "dragonstone necklaces", "dragonstone rings", "dragonstones", "earth battlestaves", "emerald amulets", "emerald bracelets", "emerald necklaces", "emerald rings", "emeralds", "feather headdresses", "fire battlestaves", "fishbowls", "fremennik round shields", "glass orbs", "gold amulets", "gold bracelets", "gold necklaces", "gold rings", "green dragonhide bodies", "green dragonhide chaps", "green dragonhide vambraces", "green spiked vambraces", "hard leather bodies", "holy symbols", "leather bodies", "leather boots", "leather chaps", "leather cowls", "leather gloves", "leather vambraces", "lightning conductors", "limestone bricks", "magic string", "oil lamps", "oil lanterns", "onyx", "onyx amulets", "onyx bracelets", "onyx necklaces", "onyx rings", "pie dishes", "plant pots", "pot lids", "pots", "red dragonhide bodies", "red dragonhide chaps", "red dragonhide vambraces", "red spiked vambraces", "rope", "rubies", "ruby amulets", "ruby bracelets", "ruby necklaces", "ruby rings", "sacks", "sapphire amulets", "sapphire bracelets", "sapphire necklaces", "sapphire rings", "sapphires", "silver bolts", "silver sickles", "snakeskin bandannas", "snakeskin bodies", "snakeskin boots", "snakeskin chaps", "snakeskin vambraces", "snelms", "spiked vambraces", "studded bodies", "studded leather chaps", "tiaras", "unholy symbols", "unpowered orbs", "vials", "water battlestaves", "yak-hide bodies", "yak-hide legs") -private val FARM_CROPS: Array = arrayOf("apples", "Asgarnian hops", "avantoe", "bananas", "barley", "bittercap mushrooms", "cabbages", "cacti", "cadantine", "cadavaberries", "calquats", "coconuts", "curry leaves", "deadly nightshade", "dwarf weed", "dwellberries", "evil turnips", "goutweed", "guam", "hammerstone hops", "harralander", "irit", "jade vine", "jangerberries", "jute fiber", "Krandorian hops", "kwuarm", "lantadyme", "limpwurt roots", "magic trees", "maple trees", "marigolds", "marrentill", "nasturtium", "oak trees", "onions", "oranges", "papayas", "pineapples", "poison ivy berries", "potatoes", "ranarr", "redberries", "rosemary", "snapdragon", "spirit trees", "spirit weed", "strawberries", "sweetcorn", "tarromin", "toadflax", "tomatoes", "torstol", "watermelons", "whiteberries", "wildblood hops", "willow trees", "woad leaves", "Yanillian hops", "yew trees") -private val FM_LOGS: Array = arrayOf("achey", "arctic pine", "eucalyptus", "logs", "magic", "mahogany", "maple", "oak", "teak", "willow", "yew") -private val FM_LOCATIONS: Array = arrayOf("Draynor Village", "Falador east bank", "Fishing Colony", "Oo'glog", "Port Phasmatys", "Yanille") -private val FISH: Array = arrayOf("anchovies", "bass", "caskets", "cave eel", "cod", "crayfish", "frog spawn", "herring", "karambwan", "karambwanji", "lava eel", "leaping salmon", "leaping sturgeon", "leaping trout", "lobster", "mackerel", "manta ray", "monkfish", "oysters", "pike", "rainbow fish", "salmon", "sardine", "sea turtle", "seaweed", "shark", "shrimp", "slimy eel", "swordfish", "trout", "tuna") -private val FLETCH_ITEMS: Array = arrayOf("adamant arrows", "adamant bolts", "adamant brutal arrows", "adamant crossbows", "adamant darts", "arrow shafts", "barbed bolts", "black brutal arrows", "blurite bolts", "blurite crossbows", "bronze arrows", "bronze bolts", "bronze brutal arrows", "bronze crossbows", "bronze darts", "composite ogre bows", "crossbow stocks", "diamond bolts", "dragon arrows", "dragon darts", "dragonstone bolts", "emerald bolts", "flighted ogre arrows", "headless arrows", "iron arrows", "iron bolts", "iron brutal arrows", "iron crossbows", "iron darts", "jade bolts", "longbows", "magic longbows", "magic shortbows", "mahogany crossbow stocks", "maple crossbow stocks", "maple longbows", "maple shortbows", "mithril arrows", "mithril bolts", "mithril brutal arrows", "mithril crossbows", "mithril darts", "mithril grapples", "oak crossbow stocks", "oak longbows", "oak shortbows", "ogre arrow shafts", "ogre arrows", "onyx bolts", "opal bolts", "pearl bolts", "red topaz bolts", "ruby bolts", "rune arrows", "rune bolts", "rune brutal arrows", "rune crossbows", "rune darts", "sapphire bolts", "shortbows", "silver bolts", "steel arrows", "steel bolts", "steel brutal arrows", "steel crossbows", "steel darts", "teak crossbow stocks", "willow crossbow stocks", "willow longbows", "willow shortbows", "yew crossbow stocks", "yew longbows", "yew shortbows") -private val HERB_POTIONS: Array = arrayOf("Agility potion", "Anti fire-breath potion", "Antipoison", "Attack potion", "Blamish oil", "Combat potion", "Defence potion", "Energy potion", "Fishing potion", "Guthix Balance", "Hunter potion", "Magic essence potion", "Magic potion", "Prayer restore", "Ranging potion", "Relicym's Balm", "Restore potion", "Sanfew Serum", "Saradomin Brew", "Strength potion", "Summoning potion", "Super antipoison", "Super antipoison+", "Super antipoison++", "Super Attack potion", "Super Defence potion", " Super energy potion", "Super fishing explosive", "Super restore potion", "Super Strength potion", "Weapon poison", "Weapon poison+", "Weapon poison++", "Zamorak Brew") -private val HERB_SECONDARIES: Array = arrayOf("blamish snail slime", "cactus spine", "chocolate dust", "cockatrice egg", "crushed nest", "deadly nightshade", "eye of newt", "garlic", "ground blue dragon scale", "ground goat's horn", "ground gorak claw", "ground unicorn horn", "jangerberries", "kebbit teeth dust", "limpwurt root", "magic tree roots", "Mort Myre fungi", "nail beast nails", "poison ivy berries", "potato cactus", "red spiders' eggs", "rubium", "silver dust", "snake weed", "snape grass", "toad's legs", "white berries", "wine of Zamorak", "yew roots") -private val HUNTER_ANIMALS: Array = arrayOf("baby impling", "barbtailed kebbit", "black salamander", "black warlock", "cerulean twitch", "chinchompa", "common kebbit", "copper longtail", "crimson swift", "dark kebbit", "dashing kebbit", "desert devil", "dragon impling", "earth impling", "eclectic impling", "essence impling", "Feldip weasel", "ferret", "golden warbler", "gourmet impling", "grenwall", "horned graahk", "imp", "magpie impling", "nature impling", "ninja impling", "orange salamander", "pawya", "polar kebbit", "prickly kebbit", "rabbit", "razorbacked kebbit", "red chinchompa", "red salamander", "ruby harvest", "sabretooth kebbit", "sabretooth kyatt", "sapphire glacialis", "snowy knight", "spined larupia", "spotted kebbit", "swamp lizard", "tropical wagtail", "wild kebbit", "young impling") -private val MAGIC_SPELLS: Array = arrayOf("Annakarl Teleport", "Ape Atoll Teleport", "Ardougne Teleport", "Bake Pie", "Barbarian Teleport", "Bind", "Blood Barrage", "Blood Blitz", "Blood Burst", "Blood Rush", "Bones to Bananas", "Bones to Peaches", "Boost Potion Share", "Bounty Locate", "Camelot Teleport", "Carrallangar Teleport", "Catherby Teleport", "Charge", "Charge Air Orb", "Charge Earth Orb", "Charge Fire Orb", "Charge Water Orb", "Claws of Guthix", "Confuse", "Crumble Undead", "Cure Group", "Cure Me", "Cure Other", "Cure Plant", "Curse", "Dareeyak Teleport", "Dream", "Earth Blast", "Earth Bolt", "Earth Strike", "Earth Wave", "Enchant 1 - Sapphire", "Enchant 2 - Emerald", "Enchant 3 - Ruby", "Enchant 4 - Diamond", "Enchant 5 - Dragonstone", "Enchant 6 - Onyx", "Enchant Bolt", "Energy Transfer", "Enfeeble", "Entangle", "Falador Teleport", "Fertilise Soil", "Fire Blast", "Fire Bolt", "Fire Strike", "Fire Wave", "Fishing Guild Teleport", "Flames of Zamorak", "Ghorrock Teleport", "Heal Group", "Heal Other", "High Level Alchemy", "Home Teleport", "House Teleport", "Humidify", "Hunter Kit", "Iban Blast", "Ice Barrage", "Ice Blitz", "Ice Burst", "Ice Plateau Teleport", "Ice Rush", "Kharyll Teleport", "Khazard Teleport", "Lassar Teleport", "Low Level Alchemy", "Lumbridge Teleport", "Magic Dart", "Magic Imbue", "Monster Examine", "Moonclan Teleport", "NPC Contact", "Ourania Teleport", "Paddewwa Teleport", "Plank Make", "Saradomin Strike", "Senntisten Teleport", "Shadow Barrage", "Shadow Blitz", "Shadow Burst", "Shadow Rush", "Smoke Barrage", "Smoke Blitz", "Smoke Burst", "Smoke Rush", "Snare", "Spellbook Swap", "Stat Restore Pot Share", "Stat Spy", "String Jewellery", "Stun", "Superglass Make", "Superheat Item", "Tele Group Barbarian", "Tele Group Catherby", "Tele Group Fishing Guild", "Tele Group Ice Plateau", "Tele Group Khazard", "Tele Group Moonclan", "Tele Group Waterbirth", "Telegrab", "Teleother Camelot", "Teleother Falador", "Teleother Lumbridge", "Trollheim Teleport", "Varrock Teleport", "Vengeance", "Vengeance Other", "Vulnerability", "Watchtower Teleport", "Water Blast", "Water Bolt", "Water Strike", "Water Wave", "Waterbirth Teleport", "Weaken", "Wind Blast", "Wind Bolt", "Wind Strike", "Wind Wave") -private val MAGIC_BOOKS: Array = arrayOf("Standard", "Ancients", "Lunar") -private val ORES: Array = arrayOf("adamantite", "blurite", "clay", "coal", "copper", "elemental", "gold", "granite", "iron", "limestone", "mithril", "obsidian", "pure essence", "rubium", "rune essence", "runite", "sandstone", "silver", "tin") -private val MINING_LOCATIONS: Array = arrayOf("Ardougne south", "Barbarian village", "Brimhaven north-west", "Brimhaven south-west", "Brimhaven volcano gold mine", "Coal Trucks", "Crafting Guild", "Crandor Isle", "Dorgeshuun mine", "Dwarven Mine", "East of Ardougne", "Edgeville", "Edgeville dungeon mine", "Elemental Workshop", "Fremennik Isles mine", "Grand Tree", "Haunted Mine", "Heroes' Guild", "Ice Caves", "Keldagrim", "Kharid Scorpion chasm", "Lumbridge Caves", "Lumbridge swamp", "Lunar Isle", "Mining Guild", "North of Yanille", "Piscatoris", "Port Khazard", "Rimmington", "Shilo Village gem mine", "TzHaar City", "Varrock south-east", "Varrock south-west", "Wilderness Hobgoblins' mine", "Wilderness Lava Maze", "Wilderness Pirates' mine", "Wilderness runite mine") -private val PRAYERS: Array = arrayOf("Burst of Strength", "Chivalry", "Clarity of Thought", "Eagle Eye", "Hawk Eye", "Improved Reflexes", "Incredible Reflexes", "Mystic Lore", "Mystic Might", "Mystic Will", "Piety", "Protect from Magic", "Protect from Melee", "Protect from Missiles", "Protect from Summoning", "Protect Item", "Rapid Heal", "Rapid Restore", "Redemption", "Retribution", "Rock Skin", "Sharp Eye", "Smite", "Steel Skin", "Superhuman Strength", "Thick Skin", "Ultimate Strength") -private val RUNES: Array = arrayOf("air runes", "astral runes", "blood runes", "body runes", "chaos runes", "cosmic runes", "death runes", "dust runes", "earth runes", "fire runes", "lava runes", "law runes", "mind runes", "mist runes", "mud runes", "nature runes", "smoke runes", "soul runes", "steam runes", "water runes") -private val RC_LOCATIONS: Array = arrayOf("Air Altar", "Astral Altar", "Blood Altar", "Body Altar", "Chaos Altar", "Cosmic Altar", "Death Altar", "Earth Altar", "Fire Altar", "Law Altar", "Mind Altar", "Nature Altar", "Ourania Altar", "Water Altar") -private val SLAYER_LOCATIONS: Array = arrayOf("Burthorpe", "Canifis", "Edgeville Dungeon", "Pollnivneach", "Shilo Village", "Zanaris") -private val FAMILIARS: Array = arrayOf("abyssal lurker", "abyssal parasite", "abyssal titan", "adamant minotaur", "albino rat", "arctic bear", "barker toad", "beaver", "bloated leech", "bronze minotaur", "bull ant", "bunyip", "compost mound", "desert wyrm", "dreadfowl", "evil turnip", "fire titan", "forge regent", "fruit bat", "geyser titan", "giant chinchompa", "giant ent", "granite crab", "granite lobster", "honey badger", "hydra", "ibis", "ice titan", "iron minotaur", "iron titan", "karamthulhu overlord", "lava titan", "macaw", "magpie", "mithril minotaur", "moss titan", "obsidian golem", "pack yak", "phoenix", "praying mantis", "pyrelord", "ravenous locust", "rune minotaur", "smoke devil", "spirit cobra", "spirit cockatrice", "spirit coraxatrice", "spirit dagannoth", "spirit graahk", "spirit guthatrice", "spirit jelly", "spirit kalphite", "spirit kyatt", "spirit larupia", "spirit mosquito", "spirit pengatrice", "spirit saratrice", "spirit scorpion", "spirit spider", "spirit terrorbird", "spirit Tz-Kih", "spirit vulatrice", "spirit wolf", "spirit zamatrice", "steel minotaur", "steel titan", "stranger plant", "swamp titan", "talon beast", "thorny snail", "unicorn stallion", "vampire bat", "void ravager", "void shifter", "void spinner", "void torcher", "war tortoise", "wolpertinger") -private val CHARM_DROPPERS: Array = arrayOf("basilisks", "bloodvelds", "dust devils", "fire giants", "ice giants", "ice warriors", "jogres", "ogres", "rock crabs", "rock lobsters", "waterfiends", "wolves") -private val THIEVE_TARGETS: Array = arrayOf("bearded Pollnivnian bandits", "cave goblins", "chests", "desert bandits", "elves", "farmers", "Fremenniks", "gnomes", "guards", "H.A.M. members", "heroes", "knights", "master farmers", "men and women", "Menaphite thugs", "paladins", "Pollnivnian bandits", "rogues", "stalls", "warriors", "watchmen") -private val PICKAXE_TYPES: Array = arrayOf("adamant", "bronze", "iron", "mithril", "rune", "steel") -private val AXE_TYPES: Array = arrayOf("adamant", "black", "bronze", "dragon", "iron", "mithril", "rune", "steel") -private val WOODCUTTING_LOCATIONS: Array = arrayOf("Ape Atoll", "Draynor", "Edgeville", "Gnome Stronghold", "Isafdar", "Kharazi Jungle", "Mage Training Area", "Neitiznot", "Piscatoris", "Seers' Village", "Seers' Village cemetery", "Sinclair Mansion", "Sorcerer's Tower", "South of Castle Wars", "South of Falador", "South of the Lumberyard", "Tai Bwo Bwannai", "Uzer", "Varrock Palace", "West of Barbarian Assault", "West of Catherby", "West of Lumbridge Castle", "West of Oo'glog") -private val SLAYER_EQUIPMENT: Array = arrayOf("a bug lantern", "a crystal chime", "a face mask", "a mirror shield", "a nosepeg", "a Slayer bell", "a spiny helmet", "a witchwood icon", "an enchanted gem", "bags of salt", "broad arrows", "earmuffs", "Fishing explosives", "fungicide spray", "ice coolers", "insulated boots", "leaf-bladed spear", "rock hammers", "Slayer gloves", "Slayer staff", "super fishing explosive") -private val DIRECTIONS: Array = arrayOf("north", "south", "east", "west", "north-east", "north-west", "south-east", "south-west") -private val DIR_LOCATIONS: Array = arrayOf("Al Kharid", "Ape Atoll", "Ardougne (East)", "Ardougne (West)", "Barbarian Village", "Braindeath Island", "Brimhaven", "BUrdh de Rott", "Burthorpe", "Camelot", "Canifis", "Catherby", "Crandor", "Dorgesh-Kaan", "Draynor Manor", "Draynor Village", "Edgeville", "Entrana", "Etceteria", "Falador", "Goblin Village", "God Wars Dungeon", "Grand Exchange", "Gu'Tanoth", "Harmony Island", "Hemenster", "Isafdar", "Jatizso", "Kalphite Lair", "Karamja", "Keldagrim", "Lletya", "Lumbridge", "Lunar Isle", "Meiyerditch", "Miscellania", "Mort'ton", "Mos Le Harmless", "Nardah", "Neitiznot", "Oo'glog", "Paterdomus", "Piscatoris", "Pollnivneach", "Port Khazard", "Port Phasmatys", "Port Sarim", "Rellekka", "Rimmington", "Seers' Village", "Shilo Village", "Sophanem", "Tai Bwo Wannai Village", "Taverley", "Tree Gnome Stronghold", "Tree Gnome Village", "Troll Stronghold", "TzHaar city", "Varrock", "Waterbirth Island", "Witchaven", "Yanille", "Zanaris") -private val SKILL_NAMES: Array = arrayOf("Agility", "Attack", "Construction", "Cooking", "Crafting", "Defence", "Farming", "Firemaking", "Fishing", "Fletching", "Herblore", "Hitpoints", "Hunter", "Magic", "Mining", "Prayer", "Ranged", "Runecrafting", "Slayer", "Smithing", "Strength", "Summoning", "Thieving", "Woodcutting") -private val SMITHING_BARTYPES: Array = arrayOf("adamant", "blurite", "bronze", "iron", "item", "mithril", "rune", "steel") -private val SMITHING_PRODUCTS: Array = arrayOf("arrow tips", "axes", "battleaxes", "bolts", "bullseye lantern frames", "cannonballs", "chainbodies", "claws", "crossbow limbs", "daggers", "dart tips", "full helms", "grapple tips", "hastae", "kite shields", "longswords", "maces", "medium helms", "nails", "oil lantern frames", "pickaxes", "platebodies", "platelegs", "plateskirts", "scimitars", "short swords", "spears", "spits", "square shields", "studs", "throwing knives", "two-handed swords", "warhammers", "wire") \ No newline at end of file +} \ No newline at end of file diff --git a/Server/src/main/kotlin/rs09/game/system/command/sets/DevelopmentCommandSet.kt b/Server/src/main/kotlin/rs09/game/system/command/sets/DevelopmentCommandSet.kt index 79796f5b0..717cb3661 100644 --- a/Server/src/main/kotlin/rs09/game/system/command/sets/DevelopmentCommandSet.kt +++ b/Server/src/main/kotlin/rs09/game/system/command/sets/DevelopmentCommandSet.kt @@ -2,23 +2,25 @@ package rs09.game.system.command.sets import api.sendMessage import core.cache.Cache +import core.cache.def.impl.DataMap import core.cache.def.impl.NPCDefinition import core.cache.def.impl.VarbitDefinition +import core.cache.def.impl.Struct import core.game.node.entity.combat.ImpactHandler.HitsplatType -import core.game.node.entity.npc.drop.NPCDropTables import core.game.node.entity.player.Player import core.game.node.entity.player.link.SpellBookManager import core.game.node.item.Item import core.net.packet.context.PlayerContext import core.net.packet.out.ResetInterface -import core.net.packet.out.Varbit import core.plugin.Initializable import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.launch import org.rs09.consts.Items -import rs09.game.content.global.NPCDropTable -import rs09.game.system.command.Command +import rs09.game.system.SystemLogger import rs09.game.system.command.Privilege +import java.io.BufferedWriter +import java.io.File +import java.io.FileWriter import rs09.net.packet.PacketWriteQueue @Initializable @@ -49,6 +51,64 @@ class DevelopmentCommandSet : CommandSet(Privilege.ADMIN) { player.impactHandler.manualHit(player, player.skills.lifepoints, HitsplatType.NORMAL) } + define("struct") {player, args -> + val mapId = args[1].toIntOrNull() ?: return@define + + val def = Struct.get(mapId) + SystemLogger.logInfo(def.toString()) + } + + define("datamap") {player, args -> + val mapId = args[1].toIntOrNull() ?: return@define + + val def = DataMap.get(mapId) + SystemLogger.logInfo(def.toString()) + } + + define("dumpstructs") {player, _ -> + val dump = File("structs.txt") + val writer = BufferedWriter(FileWriter(dump)) + val index = Cache.getIndexes()[2] + val containers = index.information.containers[26].filesIndexes + for(fID in containers) + { + val file = index.getFileData(26, fID) + if(file != null){ + val def = Struct.parse(fID, file) + if(def.dataStore.isEmpty()) continue //no data in struct. + writer.write(def.toString()) + writer.newLine() + } + } + writer.flush() + writer.close() + } + + define("dumpdatamaps") {player, _ -> + val index = Cache.getIndexes()[17] + val containers = index.information.containersIndexes + + val dump = File("datamaps.txt") + val writer = BufferedWriter(FileWriter(dump)) + + for(cID in containers) + { + val fileIndexes = index.information.containers[cID].filesIndexes + for(fID in fileIndexes) + { + val file = index.getFileData(cID, fID) + if(file != null){ + val def = DataMap.parse((cID shl 8) or fID, file) + if(def.keyType == '?') continue //Empty definition - only a 0 present in the cachefile data. + writer.write(def.toString()) + writer.newLine() + } + } + } + writer.flush() + writer.close() + } + define("rolldrops") { player: Player, args: Array -> if(args.size < 2){ reject(player,"Usage: ::rolldrops npcid amount") diff --git a/Server/src/main/kotlin/rs09/game/system/config/MusicConfigLoader.kt b/Server/src/main/kotlin/rs09/game/system/config/MusicConfigLoader.kt index cd9c22f48..cb3408138 100644 --- a/Server/src/main/kotlin/rs09/game/system/config/MusicConfigLoader.kt +++ b/Server/src/main/kotlin/rs09/game/system/config/MusicConfigLoader.kt @@ -1,5 +1,6 @@ package rs09.game.system.config +import core.cache.def.impl.DataMap import rs09.ServerConstants import core.game.node.entity.player.link.music.MusicEntry import core.game.node.entity.player.link.music.MusicZone @@ -12,6 +13,10 @@ import org.json.simple.parser.JSONParser import java.io.FileReader class MusicConfigLoader { + //1351 -> buttonID:songID + //1345 -> buttonID:songName (capitalized) + //1347 -> buttonID:songName (lowercase) + val parser = JSONParser() var reader: FileReader? = null fun load(){ @@ -19,15 +24,18 @@ class MusicConfigLoader { reader = FileReader(ServerConstants.CONFIG_PATH + "music_configs.json") var configs = parser.parse(reader) as JSONArray + val songs = DataMap.get(1351) + val names = DataMap.get(1345) + + for((index, songId) in songs.dataStore) + { + val entry = MusicEntry(songId as Int, names.getString(index as Int), index) + MusicEntry.getSongs().putIfAbsent(songId, entry) + } + for(config in configs){ val e = config as JSONObject val musicId = Integer.parseInt(e["id"].toString()) - val entry = MusicEntry( - musicId, - e["name"].toString(), - Integer.parseInt(e["indexId"].toString()) - ) - MusicEntry.getSongs().putIfAbsent(entry.id,entry) val string = e["borders"].toString() val borderArray = string.split("-") var tokens: Array? = null