diff --git a/2006Scape Server/pom.xml b/2006Scape Server/pom.xml
index 09eda320..5f53dd89 100644
--- a/2006Scape Server/pom.xml
+++ b/2006Scape Server/pom.xml
@@ -34,13 +34,13 @@
com.fasterxml.jackson.core
jackson-annotations
- 2.10.1
+ 2.12.1
com.fasterxml.jackson.core
jackson-core
- 2.10.1
+ 2.12.1
diff --git a/2006Scape Server/src/main/java/com/rs2/game/content/StaticItemList.java b/2006Scape Server/src/main/java/com/rs2/game/content/StaticItemList.java
index 2f349af5..2da08c16 100644
--- a/2006Scape Server/src/main/java/com/rs2/game/content/StaticItemList.java
+++ b/2006Scape Server/src/main/java/com/rs2/game/content/StaticItemList.java
@@ -9,7 +9,7 @@ package com.rs2.game.content;
@SuppressWarnings("unused")
public class StaticItemList {
- public static final int DWARF_REMAINS = 0;
+ public static final int NULL_0 = 0;
public static final int TOOL_KIT = 1;
public static final int CANNONBALL = 2;
public static final int NULODIONS_NOTES = 3;
diff --git a/2006Scape Server/src/main/java/com/rs2/game/content/consumables/Food.java b/2006Scape Server/src/main/java/com/rs2/game/content/consumables/Food.java
index 78a40968..6cf9ca1f 100644
--- a/2006Scape Server/src/main/java/com/rs2/game/content/consumables/Food.java
+++ b/2006Scape Server/src/main/java/com/rs2/game/content/consumables/Food.java
@@ -15,90 +15,90 @@ import static com.rs2.game.content.consumables.Food.FoodType.*;
public class Food {
- public static enum FoodType { FOOD, DRINK };
+ public enum FoodType { FOOD, DRINK };
- public static enum FoodToEat {
- Easter_Egg_(EASTER_EGG, 12, DWARF_REMAINS, FOOD, false),
- Pumpkin_(PUMPKIN, 14, DWARF_REMAINS, FOOD, false),
+ public enum FoodToEat {
+ Easter_Egg_(EASTER_EGG, 12, NULL_0, FOOD, false),
+ Pumpkin_(PUMPKIN, 14, NULL_0, FOOD, false),
Half_Jug_of_Wine_(HALF_FULL_WINE_JUG, 7, JUG, DRINK, false),
CUP_OF_TEA_(CUP_OF_TEA_1978, 2, EMPTY_CUP, DRINK, true),
CUP_OF_TEA2_(CUP_OF_TEA, 2, EMPTY_CUP, DRINK, true),
- LEMON_(LEMON, 2, DWARF_REMAINS, FOOD, false),
- LIME_(LIME, 2, DWARF_REMAINS, FOOD, false),
- PINEAPPLE_(PINEAPPLE, 2, DWARF_REMAINS, FOOD, false),
- CHOCOLATE_BAR_(CHOCOLATE_BAR, 2, DWARF_REMAINS, FOOD, false),
+ LEMON_(LEMON, 2, NULL_0, FOOD, false),
+ LIME_(LIME, 2, NULL_0, FOOD, false),
+ PINEAPPLE_(PINEAPPLE, 2, NULL_0, FOOD, false),
+ CHOCOLATE_BAR_(CHOCOLATE_BAR, 2, NULL_0, FOOD, false),
Wine_(JUG_OF_WINE, 11, JUG, DRINK, false),
- MACKEREL_(MACKEREL, 6, DWARF_REMAINS, FOOD, false),
- MANTA_(MANTA_RAY, 22, DWARF_REMAINS, FOOD, false),
- SHARK_(SHARK, 20, DWARF_REMAINS, FOOD, false),
- LOBSTER_(LOBSTER, 12, DWARF_REMAINS, FOOD, false),
- KARAMBWAN_(COOKED_KARAMBWAN, 18, DWARF_REMAINS, FOOD, false),
- TROUT_(TROUT, 7, DWARF_REMAINS, FOOD, false),
- SALMON_(SALMON, 9, DWARF_REMAINS, FOOD, false),
- SWORDFISH_(SWORDFISH, 14, DWARF_REMAINS, FOOD, false),
- TUNA_(TUNA, 10, DWARF_REMAINS, FOOD, false),
- MONKFISH_(MONKFISH, 16, DWARF_REMAINS, FOOD, false),
- SEA_TURTLE_(SEA_TURTLE, 21, DWARF_REMAINS, FOOD, false),
- CABBAGE_(CABBAGE, 1, DWARF_REMAINS, FOOD, false),
- CABBAGE_SOUTH_OF_FALADOR_(CABBAGE_1967, 1, DWARF_REMAINS, FOOD, false),
- SPINACH_(SPINACH_ROLL, 2, DWARF_REMAINS, FOOD, false),
+ MACKEREL_(MACKEREL, 6, NULL_0, FOOD, false),
+ MANTA_(MANTA_RAY, 22, NULL_0, FOOD, false),
+ SHARK_(SHARK, 20, NULL_0, FOOD, false),
+ LOBSTER_(LOBSTER, 12, NULL_0, FOOD, false),
+ KARAMBWAN_(COOKED_KARAMBWAN, 18, NULL_0, FOOD, false),
+ TROUT_(TROUT, 7, NULL_0, FOOD, false),
+ SALMON_(SALMON, 9, NULL_0, FOOD, false),
+ SWORDFISH_(SWORDFISH, 14, NULL_0, FOOD, false),
+ TUNA_(TUNA, 10, NULL_0, FOOD, false),
+ MONKFISH_(MONKFISH, 16, NULL_0, FOOD, false),
+ SEA_TURTLE_(SEA_TURTLE, 21, NULL_0, FOOD, false),
+ CABBAGE_(CABBAGE, 1, NULL_0, FOOD, false),
+ CABBAGE_SOUTH_OF_FALADOR_(CABBAGE_1967, 1, NULL_0, FOOD, false),
+ SPINACH_(SPINACH_ROLL, 2, NULL_0, FOOD, false),
CAKE_(CAKE, 4, _23_CAKE, FOOD, false),
CAKE2_(_23_CAKE, 4, SLICE_OF_CAKE, FOOD, false),
- SLICE_OF_CAKE_(SLICE_OF_CAKE, 4, DWARF_REMAINS, FOOD, false),
- BASS_(BASS, 13, DWARF_REMAINS, FOOD, false),
- COD_(COD, 7, DWARF_REMAINS, FOOD, false),
- POTATO_(POTATO, 1, DWARF_REMAINS, FOOD, false),
- BAKED_POTATO_(BAKED_POTATO, 4, DWARF_REMAINS, FOOD, false),
- POTATO_WITH_CHEESE_(POTATO_WITH_CHEESE, 16, DWARF_REMAINS, FOOD, false),
- EGG_POTATO_(EGG_POTATO, 16, DWARF_REMAINS, FOOD, false),
- CHILLI_POTATO_(CHILLI_POTATO, 14, DWARF_REMAINS, FOOD, false),
- MUSHROOM_POTATO_(MUSHROOM_POTATO, 20, DWARF_REMAINS, FOOD, false),
- TUNA_POTATO_(TUNA_POTATO, 22, DWARF_REMAINS, FOOD, false),
- SHRIMPS_(SHRIMPS, 3, DWARF_REMAINS, FOOD, false),
- HERRING_(HERRING, 5, DWARF_REMAINS, FOOD, false),
- SARDINE_(SARDINE, 4, DWARF_REMAINS, FOOD, false),
+ SLICE_OF_CAKE_(SLICE_OF_CAKE, 4, NULL_0, FOOD, false),
+ BASS_(BASS, 13, NULL_0, FOOD, false),
+ COD_(COD, 7, NULL_0, FOOD, false),
+ POTATO_(POTATO, 1, NULL_0, FOOD, false),
+ BAKED_POTATO_(BAKED_POTATO, 4, NULL_0, FOOD, false),
+ POTATO_WITH_CHEESE_(POTATO_WITH_CHEESE, 16, NULL_0, FOOD, false),
+ EGG_POTATO_(EGG_POTATO, 16, NULL_0, FOOD, false),
+ CHILLI_POTATO_(CHILLI_POTATO, 14, NULL_0, FOOD, false),
+ MUSHROOM_POTATO_(MUSHROOM_POTATO, 20, NULL_0, FOOD, false),
+ TUNA_POTATO_(TUNA_POTATO, 22, NULL_0, FOOD, false),
+ SHRIMPS_(SHRIMPS, 3, NULL_0, FOOD, false),
+ HERRING_(HERRING, 5, NULL_0, FOOD, false),
+ SARDINE_(SARDINE, 4, NULL_0, FOOD, false),
CHOCOLATE_CAKE_(CHOCOLATE_CAKE, 5, _23_CHOCOLATE_CAKE, FOOD, false),
HALF_CHOCOLATE_CAKE_(_23_CHOCOLATE_CAKE, 5, CHOCOLATE_SLICE, FOOD, false),
- CHOCOLATE_SLICE_(CHOCOLATE_SLICE, 5, DWARF_REMAINS, FOOD, false),
- ANCHOVIES_(ANCHOVIES, 2, DWARF_REMAINS, FOOD, false),
+ CHOCOLATE_SLICE_(CHOCOLATE_SLICE, 5, NULL_0, FOOD, false),
+ ANCHOVIES_(ANCHOVIES, 2, NULL_0, FOOD, false),
PLAIN_PIZZA_(PLAIN_PIZZA, 7, _12_PLAIN_PIZZA, FOOD, false),
- HALF_PLAIN_PIZZA_(_12_PLAIN_PIZZA, 7, DWARF_REMAINS, FOOD, false),
+ HALF_PLAIN_PIZZA_(_12_PLAIN_PIZZA, 7, NULL_0, FOOD, false),
MEAT_PIZZA_(MEAT_PIZZA, 8, _12_MEAT_PIZZA, FOOD, false),
- CHICKEN_(COOKED_CHICKEN, 3, DWARF_REMAINS, FOOD, false),
- MEAT_(COOKED_MEAT, 2, DWARF_REMAINS, FOOD, false),
- HALF_MEAT_PIZZA_(_12_MEAT_PIZZA, 8, DWARF_REMAINS, FOOD, false),
+ CHICKEN_(COOKED_CHICKEN, 3, NULL_0, FOOD, false),
+ MEAT_(COOKED_MEAT, 2, NULL_0, FOOD, false),
+ HALF_MEAT_PIZZA_(_12_MEAT_PIZZA, 8, NULL_0, FOOD, false),
ANCHOVY_PIZZA_(ANCHOVY_PIZZA, 9, _12_ANCHOVY_PIZZA, FOOD, false),
- HALF_ANCHOVY_PIZZA_(_12_ANCHOVY_PIZZA, 9, DWARF_REMAINS, FOOD, false),
+ HALF_ANCHOVY_PIZZA_(_12_ANCHOVY_PIZZA, 9, NULL_0, FOOD, false),
PINEAPPLE_PIZZA_(PINEAPPLE_PIZZA, 11, _12PINEAPPLE_PIZZA, FOOD, false),
- HALF_PINEAPPLE_PIZZA_(_12PINEAPPLE_PIZZA, 11, DWARF_REMAINS, FOOD, false),
- BREAD_(BREAD, 5, DWARF_REMAINS, FOOD, false),
+ HALF_PINEAPPLE_PIZZA_(_12PINEAPPLE_PIZZA, 11, NULL_0, FOOD, false),
+ BREAD_(BREAD, 5, NULL_0, FOOD, false),
APPLE_PIE_(APPLE_PIE, 7, HALF_AN_APPLE_PIE, FOOD, false),
HALF_APPLE_PIE_(HALF_AN_APPLE_PIE, 7, PIE_DISH, FOOD, false),
REDBERRY_PIE_(REDBERRY_PIE, 5, HALF_A_REDBERRY_PIE, FOOD, false),
HALF_REDBERRY_PIE_(HALF_A_REDBERRY_PIE, 5, PIE_DISH, FOOD, false),
- Ugthanki_kebab_(UGTHANKI_KEBAB, 2, DWARF_REMAINS, FOOD, false),
- SEAWEED_(EDIBLE_SEAWEED, 4, DWARF_REMAINS, FOOD, false),
+ Ugthanki_kebab_(UGTHANKI_KEBAB, 2, NULL_0, FOOD, false),
+ SEAWEED_(EDIBLE_SEAWEED, 4, NULL_0, FOOD, false),
MEAT_PIE_(MEAT_PIE, 6, HALF_A_MEAT_PIE, FOOD, false),
HALF_MEAT_PIE_(HALF_A_MEAT_PIE, 6, PIE_DISH, FOOD, false),
SUMMER_PIE_(SUMMER_PIE, 11, HALF_A_SUMMER_PIE, FOOD, false),
HALF_SUMMER_PIE_(HALF_A_SUMMER_PIE, 11, PIE_DISH, FOOD, false),
- PIKE_(PIKE, 8, DWARF_REMAINS, FOOD, false),
- POTATO_WITH_BUTTER_(POTATO_WITH_BUTTER, 14, DWARF_REMAINS, FOOD, false),
- SLICED_BANANA_(SLICED_BANANA, 2, DWARF_REMAINS, FOOD, false),
- BANANA_(BANANA, 2, DWARF_REMAINS, FOOD, false),
- PEACH_(PEACH, 8, DWARF_REMAINS, FOOD, false),
- ORANGE_(ORANGE, 2, DWARF_REMAINS, FOOD, false),
- PINEAPPLE_RINGS_(PINEAPPLE_RING, 2, DWARF_REMAINS, FOOD, false),
- PINEAPPLE_CHUNKS_(PINEAPPLE_CHUNKS, 2, DWARF_REMAINS, FOOD, false),
- EASTER_EGG_(EASTER_EGG_7928, 1, DWARF_REMAINS, FOOD, false),
- EASTER_EGG2_(EASTER_EGG_7929, 1, DWARF_REMAINS, FOOD, false),
- EASTER_EGG3_(EASTER_EGG_7930, 1, DWARF_REMAINS, FOOD, false),
- EASTER_EGG4_(EASTER_EGG_7931, 1, DWARF_REMAINS, FOOD, false),
- EASTER_EGG5_(EASTER_EGG_7932, 1, DWARF_REMAINS, FOOD, false),
- EASTER_EGG6_(EASTER_EGG_7933, 1, DWARF_REMAINS, FOOD, false),
- PURPLE_SWEETS_(10476, 9, DWARF_REMAINS, FOOD, false),
- POT_OF_CREAM_(POT_OF_CREAM, 1, DWARF_REMAINS, FOOD, false),
- FILED_RATION_(FIELD_RATION, 9, DWARF_REMAINS, FOOD, false),
+ PIKE_(PIKE, 8, NULL_0, FOOD, false),
+ POTATO_WITH_BUTTER_(POTATO_WITH_BUTTER, 14, NULL_0, FOOD, false),
+ SLICED_BANANA_(SLICED_BANANA, 2, NULL_0, FOOD, false),
+ BANANA_(BANANA, 2, NULL_0, FOOD, false),
+ PEACH_(PEACH, 8, NULL_0, FOOD, false),
+ ORANGE_(ORANGE, 2, NULL_0, FOOD, false),
+ PINEAPPLE_RINGS_(PINEAPPLE_RING, 2, NULL_0, FOOD, false),
+ PINEAPPLE_CHUNKS_(PINEAPPLE_CHUNKS, 2, NULL_0, FOOD, false),
+ EASTER_EGG_(EASTER_EGG_7928, 1, NULL_0, FOOD, false),
+ EASTER_EGG2_(EASTER_EGG_7929, 1, NULL_0, FOOD, false),
+ EASTER_EGG3_(EASTER_EGG_7930, 1, NULL_0, FOOD, false),
+ EASTER_EGG4_(EASTER_EGG_7931, 1, NULL_0, FOOD, false),
+ EASTER_EGG5_(EASTER_EGG_7932, 1, NULL_0, FOOD, false),
+ EASTER_EGG6_(EASTER_EGG_7933, 1, NULL_0, FOOD, false),
+ PURPLE_SWEETS_(10476, 9, NULL_0, FOOD, false),
+ POT_OF_CREAM_(POT_OF_CREAM, 1, NULL_0, FOOD, false),
+ FILED_RATION_(FIELD_RATION, 9, NULL_0, FOOD, false),
STEW_(STEW, 11, BOWL, FOOD, false),
CURRY_(CURRY, 19, BOWL, DRINK, false),
SPICY_SAUCE_(SPICY_SAUCE, 2, BOWL, FOOD, false),
@@ -110,57 +110,57 @@ public class Food {
MUSHROOM_AND_ONION_(MUSHROOM__ONION, 11, BOWL, FOOD, false),
TUNA_AND_CORN_(TUNA_AND_CORN, 13, BOWL, FOOD, false),
BANANA_STEW_(BANANA_STEW, 11, BOWL, FOOD, false),
- TOAD_CRUNCHIES_(TOAD_CRUNCHIES, 8, DWARF_REMAINS, FOOD, false),
- SPICY_CRUNCHIES_(SPICY_CRUNCHIES, 7, DWARF_REMAINS, FOOD, false),
- WORM_CRUNCHIES_(WORM_CRUNCHIES, 8, DWARF_REMAINS, FOOD, false),
- CHOCCHIP_CRUNCHIES_(CHOCCHIP_CRUNCHIES, 7, DWARF_REMAINS, FOOD, false),
- FRUIT_BATTA_(FRUIT_BATTA_2277, 11, DWARF_REMAINS, FOOD, false),
- TOAD_BATTA_(TOAD_BATTA_2255, 11, DWARF_REMAINS, FOOD, false),
- WORM_BATTA_(WORM_BATTA_2253, 11, DWARF_REMAINS, FOOD, false),
- VEGETABLE_BATTA_(VEGETABLE_BATTA_2281, 11, DWARF_REMAINS, FOOD, false),
- CHEESE_TOMATO_BATTA_(CHEESETOM_BATTA_2259, 11, DWARF_REMAINS, FOOD, false),
- WORM_HOLE_(WORM_HOLE, 12, DWARF_REMAINS, FOOD, false),
- VEG_BALL_(VEG_BALL, 12, DWARF_REMAINS, FOOD, false),
- TANGLED_TOADS_LEGS_(TANGLED_TOADS_LEGS, 15, DWARF_REMAINS, FOOD, false),
- CHOCOLATE_BOMB_(CHOCOLATE_BOMB, 15, DWARF_REMAINS, FOOD, false),
- PRE_TOAD_CRUNCH_(TOAD_CRUNCHIES_2243, 7, DWARF_REMAINS, FOOD, false),
- PRE_SPICE_CRUNCH_(SPICY_CRUNCHIES_2241, 7, DWARF_REMAINS, FOOD, false),
- PRE_WORM_CRUNCH_(WORM_CRUNCHIES_2237, 8, DWARF_REMAINS, FOOD, false),
- PRE_CHOC_CRUNCH_(CHOCCHIP_CRUNCHIES_2239, 7, DWARF_REMAINS, FOOD, false),
- PRE_FRUIT_BATTA_(FRUIT_BATTA, 11, DWARF_REMAINS, FOOD, false),
- PRE_TOAD_BATTA_(TOAD_BATTA, 11, DWARF_REMAINS, FOOD, false),
- PRE_WORM_BATTA_(WORM_BATTA, 11, DWARF_REMAINS, FOOD, false),
- PRE_VEG_BATTA_(VEGETABLE_BATTA, 11, DWARF_REMAINS, FOOD, false),
- PRE_CHEESETOM_BATTA_(CHEESETOM_BATTA, 11, DWARF_REMAINS, FOOD, false),
- PRE_WORM_HOLE_(WORM_HOLE_2233, 12, DWARF_REMAINS, FOOD, false),
- PRE_VEG_BALL_(VEG_BALL_2235, 12, DWARF_REMAINS, FOOD, false),
- PRE_TOADS_LEGS_(TANGLED_TOADS_LEGS_2231, 15, DWARF_REMAINS, FOOD, false),
- PRE_CHOC_BOMB_(CHOCOLATE_BOMB_2229, 15, DWARF_REMAINS, FOOD, false),
+ TOAD_CRUNCHIES_(TOAD_CRUNCHIES, 8, NULL_0, FOOD, false),
+ SPICY_CRUNCHIES_(SPICY_CRUNCHIES, 7, NULL_0, FOOD, false),
+ WORM_CRUNCHIES_(WORM_CRUNCHIES, 8, NULL_0, FOOD, false),
+ CHOCCHIP_CRUNCHIES_(CHOCCHIP_CRUNCHIES, 7, NULL_0, FOOD, false),
+ FRUIT_BATTA_(FRUIT_BATTA_2277, 11, NULL_0, FOOD, false),
+ TOAD_BATTA_(TOAD_BATTA_2255, 11, NULL_0, FOOD, false),
+ WORM_BATTA_(WORM_BATTA_2253, 11, NULL_0, FOOD, false),
+ VEGETABLE_BATTA_(VEGETABLE_BATTA_2281, 11, NULL_0, FOOD, false),
+ CHEESE_TOMATO_BATTA_(CHEESETOM_BATTA_2259, 11, NULL_0, FOOD, false),
+ WORM_HOLE_(WORM_HOLE, 12, NULL_0, FOOD, false),
+ VEG_BALL_(VEG_BALL, 12, NULL_0, FOOD, false),
+ TANGLED_TOADS_LEGS_(TANGLED_TOADS_LEGS, 15, NULL_0, FOOD, false),
+ CHOCOLATE_BOMB_(CHOCOLATE_BOMB, 15, NULL_0, FOOD, false),
+ PRE_TOAD_CRUNCH_(TOAD_CRUNCHIES_2243, 7, NULL_0, FOOD, false),
+ PRE_SPICE_CRUNCH_(SPICY_CRUNCHIES_2241, 7, NULL_0, FOOD, false),
+ PRE_WORM_CRUNCH_(WORM_CRUNCHIES_2237, 8, NULL_0, FOOD, false),
+ PRE_CHOC_CRUNCH_(CHOCCHIP_CRUNCHIES_2239, 7, NULL_0, FOOD, false),
+ PRE_FRUIT_BATTA_(FRUIT_BATTA, 11, NULL_0, FOOD, false),
+ PRE_TOAD_BATTA_(TOAD_BATTA, 11, NULL_0, FOOD, false),
+ PRE_WORM_BATTA_(WORM_BATTA, 11, NULL_0, FOOD, false),
+ PRE_VEG_BATTA_(VEGETABLE_BATTA, 11, NULL_0, FOOD, false),
+ PRE_CHEESETOM_BATTA_(CHEESETOM_BATTA, 11, NULL_0, FOOD, false),
+ PRE_WORM_HOLE_(WORM_HOLE_2233, 12, NULL_0, FOOD, false),
+ PRE_VEG_BALL_(VEG_BALL_2235, 12, NULL_0, FOOD, false),
+ PRE_TOADS_LEGS_(TANGLED_TOADS_LEGS_2231, 15, NULL_0, FOOD, false),
+ PRE_CHOC_BOMB_(CHOCOLATE_BOMB_2229, 15, NULL_0, FOOD, false),
FRUIT_BLAST_(FRUIT_BLAST_2084, 9, COCKTAIL_GLASS, DRINK, false),
PINE_PUNCH_(PINEAPPLE_PUNCH_2048, 9, COCKTAIL_GLASS, DRINK, false),
PRE_FRUIT_BLAST_(FRUIT_BLAST, 9, COCKTAIL_GLASS, DRINK, false),
PRE_PINE_PUNCH_(PINEAPPLE_PUNCH, 9, COCKTAIL_GLASS, DRINK, false),
- RABBIT_(COOKED_RABBIT, 5, DWARF_REMAINS, FOOD, false),
- UGTHANKI_MEAT_(UGTHANKI_MEAT, 3, DWARF_REMAINS, FOOD, false),
- ROAST_BIRD_MEAT_(9980, 6, DWARF_REMAINS, FOOD, false),
- THIN_SNAIL_(THIN_SNAIL_MEAT, 5, DWARF_REMAINS, FOOD, false),
- SPIDER_ON_STICK_(SPIDER_ON_STICK_6297, 7, DWARF_REMAINS, FOOD, false),
- SPIDER_ON_SHAFT_(SPIDER_ON_SHAFT_6299, 7, DWARF_REMAINS, FOOD, false),
- ROAST_RABBIT_(ROAST_RABBIT, 7, DWARF_REMAINS, FOOD, false),
- LEAN_SNAIL_(LEAN_SNAIL_MEAT, 8, DWARF_REMAINS, FOOD, false),
- ROAST_BEAST_MEAT_(9988, 8, DWARF_REMAINS, FOOD, false),
- FAT_SNAIL_(FAT_SNAIL_MEAT, 9, DWARF_REMAINS, FOOD, false),
- SLIMY_EEL_(COOKED_SLIMY_EEL, 8, DWARF_REMAINS, FOOD, false),
- COOKED_CHOMPY_(COOKED_CHOMPY, 10, DWARF_REMAINS, FOOD, false),
- COOKED_FISHCAKE_(COOKED_FISHCAKE, 11, DWARF_REMAINS, FOOD, false),
- RAINBOW_FISH_(10136, 11, DWARF_REMAINS, FOOD, false),
- CAVE_EEL_(CAVE_EEL, 9, DWARF_REMAINS, FOOD, false),
- COOKED_JUBBLY_(COOKED_JUBBLY, 15, DWARF_REMAINS, FOOD, false),
- LAVA_EEL_(LAVA_EEL, 11, DWARF_REMAINS, FOOD, false),
+ RABBIT_(COOKED_RABBIT, 5, NULL_0, FOOD, false),
+ UGTHANKI_MEAT_(UGTHANKI_MEAT, 3, NULL_0, FOOD, false),
+ ROAST_BIRD_MEAT_(9980, 6, NULL_0, FOOD, false),
+ THIN_SNAIL_(THIN_SNAIL_MEAT, 5, NULL_0, FOOD, false),
+ SPIDER_ON_STICK_(SPIDER_ON_STICK_6297, 7, NULL_0, FOOD, false),
+ SPIDER_ON_SHAFT_(SPIDER_ON_SHAFT_6299, 7, NULL_0, FOOD, false),
+ ROAST_RABBIT_(ROAST_RABBIT, 7, NULL_0, FOOD, false),
+ LEAN_SNAIL_(LEAN_SNAIL_MEAT, 8, NULL_0, FOOD, false),
+ ROAST_BEAST_MEAT_(9988, 8, NULL_0, FOOD, false),
+ FAT_SNAIL_(FAT_SNAIL_MEAT, 9, NULL_0, FOOD, false),
+ SLIMY_EEL_(COOKED_SLIMY_EEL, 8, NULL_0, FOOD, false),
+ COOKED_CHOMPY_(COOKED_CHOMPY, 10, NULL_0, FOOD, false),
+ COOKED_FISHCAKE_(COOKED_FISHCAKE, 11, NULL_0, FOOD, false),
+ RAINBOW_FISH_(10136, 11, NULL_0, FOOD, false),
+ CAVE_EEL_(CAVE_EEL, 9, NULL_0, FOOD, false),
+ COOKED_JUBBLY_(COOKED_JUBBLY, 15, NULL_0, FOOD, false),
+ LAVA_EEL_(LAVA_EEL, 11, NULL_0, FOOD, false),
CHOCOLATEY_MILK_(CHOCOLATEY_MILK, 4, BUCKET, DRINK, false),
- BANDAGES_(BANDAGES, 3, DWARF_REMAINS, FOOD, false),
- TOMATO_(TOMATO, 2, DWARF_REMAINS, FOOD, false),
- CHEESE_(CHEESE, 2, DWARF_REMAINS, FOOD, false);
+ BANDAGES_(BANDAGES, 3, NULL_0, FOOD, false),
+ TOMATO_(TOMATO, 2, NULL_0, FOOD, false),
+ CHEESE_(CHEESE, 2, NULL_0, FOOD, false);
private int id;
private int heal;
diff --git a/2006Scape Server/src/main/java/com/rs2/game/content/consumables/Kebabs.java b/2006Scape Server/src/main/java/com/rs2/game/content/consumables/Kebabs.java
index f9ae0b4c..77ffebea 100644
--- a/2006Scape Server/src/main/java/com/rs2/game/content/consumables/Kebabs.java
+++ b/2006Scape Server/src/main/java/com/rs2/game/content/consumables/Kebabs.java
@@ -4,134 +4,134 @@ import com.rs2.Constants;
import com.rs2.game.players.Player;
import com.rs2.util.Misc;
+import static com.rs2.game.content.StaticItemList.KEBAB;
+
/**
* @author darkside1222
*/
public class Kebabs {
+ float chances = 0.0f;
- public static int Kebab = 1971;
- float chances = 0.0f;
+ /**
+ * Chances(Percents)
+ */
+ public static float chances(String effect) {
+ float chances = 0.0f;// PERCENT
+ if (effect.equalsIgnoreCase("Effect1")) {// Nothing
+ chances = 8.7f;
+ } else if (effect.equalsIgnoreCase("Effect2")) {// normal heal
+ chances = 61.2f;
+ } else if (effect.equalsIgnoreCase("Effect3")) {// better heal
+ chances = 21.1f;
+ } else if (effect.equalsIgnoreCase("Effect4")) {// SUPER heal
+ chances = 3.6f;
+ } else if (effect.equalsIgnoreCase("Effect5")) {// Damages you.
+ chances = 6.3f - 0.9f;
+ ;
+ } else {
+ chances = Float.parseFloat(effect);
+ }
+ return chances; // Equals 100%
+ }
- /**
- * Chances(Percents)
- */
- public static float chances(String effect) {
- float chances = 0.0f;// PERCENT
- if (effect.equalsIgnoreCase("Effect1")) {// Nothing
- chances = 8.7f;
- } else if (effect.equalsIgnoreCase("Effect2")) {// normal heal
- chances = 61.2f;
- } else if (effect.equalsIgnoreCase("Effect3")) {// better heal
- chances = 21.1f;
- } else if (effect.equalsIgnoreCase("Effect4")) {// SUPER heal
- chances = 3.6f;
- } else if (effect.equalsIgnoreCase("Effect5")) {// Damages you.
- chances = 6.3f - 0.9f;
- ;
- } else {
- chances = Float.parseFloat(effect);
- }
- return chances; // Equals 100%
- }
+ /**
+ * Different effects(Healing,lowering,damaging)
+ */
+ public static void effects(Player c) {
+ float eff1 = chances("effect1");
+ float eff2 = chances("effect2");
+ float eff3 = chances("effect3");
+ float eff4 = chances("effect4");
+ float eff5 = chances("effect5");
- /**
- * Different effects(Healing,lowering,damaging)
- */
- public static void effects(Player c) {
- float eff1 = chances("effect1");
- float eff2 = chances("effect2");
- float eff3 = chances("effect3");
- float eff4 = chances("effect4");
- float eff5 = chances("effect5");
+ if (Misc.random(100.0f) <= eff1) { // 8.71%
+ c.getPacketSender().sendMessage(
+ "That kebab didn't seem to do a lot.");
- if (Misc.random(100.0f) <= eff1) { // 8.71%
- c.getPacketSender().sendMessage(
- "That kebab didn't seem to do a lot.");
+ } else if (Misc.random(100.0f) <= eff2) { // 61.24% heals 10% of HP
+ c.getPacketSender()
+ .sendMessage("It restores some life points.");
+ if (c.playerLevel[Constants.HITPOINTS] < c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.HITPOINTS])) {
+ c.playerLevel[Constants.HITPOINTS] += c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.HITPOINTS]) * 0.10;
+ if (c.playerLevel[Constants.HITPOINTS] > c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.HITPOINTS])) {
+ c.playerLevel[Constants.HITPOINTS] = c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.HITPOINTS]);
+ }
- } else if (Misc.random(100.0f) <= eff2) { // 61.24% heals 10% of HP
- c.getPacketSender()
- .sendMessage("It restores some life points.");
- if (c.playerLevel[Constants.HITPOINTS] < c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.HITPOINTS])) {
- c.playerLevel[Constants.HITPOINTS] += c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.HITPOINTS]) * 0.10;
- if (c.playerLevel[Constants.HITPOINTS] > c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.HITPOINTS])) {
- c.playerLevel[Constants.HITPOINTS] = c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.HITPOINTS]);
- }
+ }
- }
+ } else if (Misc.random(100.0f) <= eff3) { // 21.12% + 10-20 HP
+ c.getPacketSender().sendMessage(
+ "That was a good kebab. You feel a lot better. ");
+ if (c.playerLevel[Constants.HITPOINTS] < c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.HITPOINTS])) {
+ c.playerLevel[Constants.HITPOINTS] += Misc.random(20);
+ if (c.playerLevel[Constants.HITPOINTS] > c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.HITPOINTS])) {
+ c.playerLevel[Constants.HITPOINTS] = c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.HITPOINTS]);
+ }
+ }
- } else if (Misc.random(100.0f) <= eff3) { // 21.12% + 10-20 HP
- c.getPacketSender().sendMessage(
- "That was a good kebab. You feel a lot better. ");
- if (c.playerLevel[Constants.HITPOINTS] < c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.HITPOINTS])) {
- c.playerLevel[Constants.HITPOINTS] += Misc.random(20);
- if (c.playerLevel[Constants.HITPOINTS] > c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.HITPOINTS])) {
- c.playerLevel[Constants.HITPOINTS] = c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.HITPOINTS]);
- }
- }
+ } else if (Misc.random(100.0f) <= eff4) {// 3.65% + attk,str,def +
+ // 2-3 + heal 0-300
+ c.getPacketSender()
+ .sendMessage(
+ "Wow, that was an amazing kebab! You feel really invigorated.");
+ c.playerLevel[Constants.DEFENCE] += 2 + Misc.random(1); // def
+ c.playerLevel[Constants.STRENGTH] += 2 + Misc.random(1); // str
+ c.playerLevel[Constants.ATTACK] += 2 + Misc.random(1); // atk
+ c.getPlayerAssistant().refreshSkill(Constants.DEFENCE);
+ c.getPlayerAssistant().refreshSkill(Constants.STRENGTH);
+ c.getPlayerAssistant().refreshSkill(Constants.HITPOINTS);
+ if (c.playerLevel[Constants.HITPOINTS] < c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.HITPOINTS])) {
+ c.playerLevel[Constants.HITPOINTS] += Misc.random(30);
+ if (c.playerLevel[Constants.HITPOINTS] > c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.HITPOINTS])) {
+ c.playerLevel[Constants.HITPOINTS] = c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.HITPOINTS]);
+ }
+ }
- } else if (Misc.random(100.0f) <= eff4) {// 3.65% + attk,str,def +
- // 2-3 + heal 0-300
- c.getPacketSender()
- .sendMessage(
- "Wow, that was an amazing kebab! You feel really invigorated.");
- c.playerLevel[Constants.DEFENCE] += 2 + Misc.random(1); // def
- c.playerLevel[Constants.STRENGTH] += 2 + Misc.random(1); // str
- c.playerLevel[Constants.ATTACK] += 2 + Misc.random(1); // atk
- c.getPlayerAssistant().refreshSkill(Constants.DEFENCE);
- c.getPlayerAssistant().refreshSkill(Constants.STRENGTH);
- c.getPlayerAssistant().refreshSkill(Constants.HITPOINTS);
- if (c.playerLevel[Constants.HITPOINTS] < c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.HITPOINTS])) {
- c.playerLevel[Constants.HITPOINTS] += Misc.random(30);
- if (c.playerLevel[Constants.HITPOINTS] > c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.HITPOINTS])) {
- c.playerLevel[Constants.HITPOINTS] = c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.HITPOINTS]);
- }
- }
+ } else if (Misc.random(100.0f) <= eff5) {// 6.3%. lower STAT
+ c.getPacketSender().sendMessage(
+ "That tasted very dodgy. You feel very ill.");
+ c.getPacketSender().sendMessage(
+ "Eating the kebab has done damage to some of your stats.");
+ for (int j = 0; j < 2; j++) {
+ c.playerLevel[j] -= 2; // Fix this l0l
+ c.getPlayerAssistant().refreshSkill(j);
+ }
+ }
- } else if (Misc.random(100.0f) <= eff5) {// 6.3%. lower STAT
- c.getPacketSender().sendMessage(
- "That tasted very dodgy. You feel very ill.");
- c.getPacketSender().sendMessage(
- "Eating the kebab has done damage to some of your stats.");
- for (int j = 0; j < 2; j++) {
- c.playerLevel[j] -= 2; // Fix this l0l
- c.getPlayerAssistant().refreshSkill(j);
- }
- }
+ }
- }
-
- /**
- * Eatting the kebab
- */
- public static void eat(Player player, int slot) {
- if (System.currentTimeMillis() - player.foodDelay >= 1500
- && player.playerLevel[Constants.HITPOINTS] > 0) {
- if (player.playerLevel[Constants.HITPOINTS] == player.getPlayerAssistant().getLevelForXP(player.playerXP[Constants.HITPOINTS])) { // If
- // full
- // health,
- // does
- // nothing
- // but
- // eat.
- player.getCombatAssistant().resetPlayerAttack();
- player.getPacketSender().sendMessage("You eat the kebab.");
- player.attackTimer += 2;
- player.startAnimation(829);
- player.getItemAssistant().deleteItem(Kebab, slot, 1);
- player.getPacketSender().sendSound(317, 100, 0);
- player.foodDelay = System.currentTimeMillis();
- player.getPlayerAssistant().refreshSkill(Constants.HITPOINTS);
- return;
- }
- player.getCombatAssistant().resetPlayerAttack();
- player.getPacketSender().sendMessage("You eat the kebab.");
- effects(player);
- player.attackTimer += 2;
- player.startAnimation(829);
- player.getItemAssistant().deleteItem(Kebab, slot, 1);
- player.getPacketSender().sendSound(317, 100, 0);
- player.foodDelay = System.currentTimeMillis();
- player.getPlayerAssistant().refreshSkill(Constants.HITPOINTS);
- }
- }
+ /**
+ * Eatting the kebab
+ */
+ public static void eat(Player player, int slot) {
+ if (System.currentTimeMillis() - player.foodDelay >= 1500
+ && player.playerLevel[Constants.HITPOINTS] > 0) {
+ if (player.playerLevel[Constants.HITPOINTS] == player.getPlayerAssistant().getLevelForXP(player.playerXP[Constants.HITPOINTS])) { // If
+ // full
+ // health,
+ // does
+ // nothing
+ // but
+ // eat.
+ player.getCombatAssistant().resetPlayerAttack();
+ player.getPacketSender().sendMessage("You eat the kebab.");
+ player.attackTimer += 2;
+ player.startAnimation(829);
+ player.getItemAssistant().deleteItem(KEBAB, slot, 1);
+ player.getPacketSender().sendSound(317, 100, 0);
+ player.foodDelay = System.currentTimeMillis();
+ player.getPlayerAssistant().refreshSkill(Constants.HITPOINTS);
+ return;
+ }
+ player.getCombatAssistant().resetPlayerAttack();
+ player.getPacketSender().sendMessage("You eat the kebab.");
+ effects(player);
+ player.attackTimer += 2;
+ player.startAnimation(829);
+ player.getItemAssistant().deleteItem(KEBAB, slot, 1);
+ player.getPacketSender().sendSound(317, 100, 0);
+ player.foodDelay = System.currentTimeMillis();
+ player.getPlayerAssistant().refreshSkill(Constants.HITPOINTS);
+ }
+ }
}
diff --git a/2006Scape Server/src/main/java/com/rs2/game/content/consumables/Potions.java b/2006Scape Server/src/main/java/com/rs2/game/content/consumables/Potions.java
index 59c73846..278cbf10 100644
--- a/2006Scape Server/src/main/java/com/rs2/game/content/consumables/Potions.java
+++ b/2006Scape Server/src/main/java/com/rs2/game/content/consumables/Potions.java
@@ -1,476 +1,456 @@
package com.rs2.game.content.consumables;
import com.rs2.Constants;
-import org.apollo.cache.def.ItemDefinition;
-
import com.rs2.event.CycleEvent;
import com.rs2.event.CycleEventContainer;
import com.rs2.event.CycleEventHandler;
import com.rs2.game.items.DeprecatedItems;
import com.rs2.game.players.Player;
+import org.apollo.cache.def.ItemDefinition;
+
+import static com.rs2.game.content.StaticItemList.*;
public class Potions {
- private final Player c;
+ private final Player c;
- public Potions(Player player) {
- this.c = player;
- }
+ public Potions(Player player) {
+ this.c = player;
+ }
- public void handlePotion(int itemId, int slot) {
- if (c.duelRule[5]) {
- c.getPacketSender().sendMessage(
- "You may not drink potions in this duel.");
- return;
- }
- if (c.isDead || c.playerLevel[Constants.HITPOINTS] <= 0) {
- return;
- }
- if (System.currentTimeMillis() - c.potDelay >= 1200) {
- c.potDelay = System.currentTimeMillis();
- c.foodDelay = System.currentTimeMillis();
- c.getCombatAssistant().resetPlayerAttack();
- c.attackTimer++;
- c.getPacketSender().sendMessage(
- "You drink some of your " + ItemDefinition.lookup(itemId).getName() + ".");
- c.startAnimation(829);
- final String item = ItemDefinition.lookup(itemId).getName();
- String m = "";
- if (item.endsWith("(4)")) {
- m = "You have 3 doses of potion left.";
- } else if (item.endsWith("(3)")) {
- m = "You have 2 doses of potion left.";
- } else if (item.endsWith("(2)")) {
- m = "You have 1 dose of potion left.";
- } else if (item.endsWith("(1)")) {
- m = "You have finished your potion.";
- }
- final String m1 = m;
- CycleEventHandler.getSingleton().addEvent(c, new CycleEvent() {
- @Override
- public void execute(CycleEventContainer container) {
- c.getPacketSender().sendSound(1210, 100, 0);
- c.getPacketSender().sendMessage(m1);
- container.stop();
- }
- @Override
- public void stop() {
-
- }
- }, 1);
- switch (itemId) {
- case 3040:
- drinkStatPotion(itemId, 3042, slot, 6, false);
- break;
- case 3042:
- drinkStatPotion(itemId, 3044, slot, 6, false);
- break;
- case 3044:
- drinkStatPotion(itemId, 3046, slot, 6, false);
- break;
- case 3046:
- drinkStatPotion(itemId, 229, slot, 6, false);
- break;
- case 2450:
- doTheBrewzam(itemId, 189, slot);
- break;
- case 189:
- doTheBrewzam(itemId, 191, slot);
- break;
- case 191:
- doTheBrewzam(itemId, 193, slot);
- break;
- case 193:
- doTheBrewzam(itemId, 229, slot);
- break;
- case 6685: // brews
- doTheBrew(itemId, 6687, slot);
- break;
- case 6687:
- doTheBrew(itemId, 6689, slot);
- break;
- case 6689:
- doTheBrew(itemId, 6691, slot);
- break;
- case 6691:
- doTheBrew(itemId, 229, slot);
- break;
- case 2436:
- drinkStatPotion(itemId, 145, slot, 0, true); // sup attack
- break;
- case 145:
- drinkStatPotion(itemId, 147, slot, 0, true);
- break;
- case 147:
- drinkStatPotion(itemId, 149, slot, 0, true);
- break;
- case 149:
- drinkStatPotion(itemId, 229, slot, 0, true);
- break;
- case 2440:
- drinkStatPotion(itemId, 157, slot, 2, true); // sup str
- break;
- case 157:
- drinkStatPotion(itemId, 159, slot, 2, true);
- break;
- case 159:
- drinkStatPotion(itemId, 161, slot, 2, true);
- break;
- case 161:
- drinkStatPotion(itemId, 229, slot, 2, true);
- break;
- case 2444:
- drinkStatPotion(itemId, 169, slot, 4, false); // range pot
- break;
- case 169:
- drinkStatPotion(itemId, 171, slot, 4, false);
- break;
- case 171:
- drinkStatPotion(itemId, 173, slot, 4, false);
- break;
- case 173:
- drinkStatPotion(itemId, 229, slot, 4, false);
- break;
- case 2432:
- drinkStatPotion(itemId, 133, slot, 1, false); // def pot
- break;
- case 133:
- drinkStatPotion(itemId, 135, slot, 1, false);
- break;
- case 135:
- drinkStatPotion(itemId, 137, slot, 1, false);
- break;
- case 137:
- drinkStatPotion(itemId, 229, slot, 1, false);
- break;
- case 113:
- drinkStatPotion(itemId, 115, slot, 2, false); // str pot
- break;
- case 115:
- drinkStatPotion(itemId, 117, slot, 2, false);
- break;
- case 117:
- drinkStatPotion(itemId, 119, slot, 2, false);
- break;
- case 119:
- drinkStatPotion(itemId, 229, slot, 2, false);
- break;
- case 2428:
- drinkStatPotion(itemId, 121, slot, 0, false); // attack
- // pot
- break;
- case 121:
- drinkStatPotion(itemId, 123, slot, 0, false);
- break;
- case 123:
- drinkStatPotion(itemId, 125, slot, 0, false);
- break;
- case 125:
- drinkStatPotion(itemId, 229, slot, 0, false);
- break;
- case 2442:
- drinkStatPotion(itemId, 163, slot, 1, true); // super def
- // pot
- break;
- case 163:
- drinkStatPotion(itemId, 165, slot, 1, true);
- break;
- case 165:
- drinkStatPotion(itemId, 167, slot, 1, true);
- break;
- case 167:
- drinkStatPotion(itemId, 229, slot, 1, true);
- break;
- case 3024:
- drinkPrayerPot(itemId, 3026, slot, true); // sup restore
- break;
- case 3026:
- drinkPrayerPot(itemId, 3028, slot, true);
- break;
- case 3028:
- drinkPrayerPot(itemId, 3030, slot, true);
- break;
- case 3030:
- drinkPrayerPot(itemId, 229, slot, true);
- break;
- case 10925:
- drinkPrayerPot(itemId, 10927, slot, true); // sanfew
- // serums
- curePoison(300000);
- break;
- case 10927:
- drinkPrayerPot(itemId, 10929, slot, true);
- curePoison(300000);
- break;
- case 10929:
- drinkPrayerPot(itemId, 10931, slot, true);
- curePoison(300000);
- break;
- case 10931:
- drinkPrayerPot(itemId, 229, slot, true);
- curePoison(300000);
- break;
- case 2434:
- drinkPrayerPot(itemId, 139, slot, false); // pray pot
- break;
- case 139:
- drinkPrayerPot(itemId, 141, slot, false);
- break;
- case 141:
- drinkPrayerPot(itemId, 143, slot, false);
- break;
- case 143:
- drinkPrayerPot(itemId, 229, slot, false);
- break;
- case 2446:
- drinkAntiPoison(itemId, 175, slot, 30000); // anti poisons
- break;
- case 175:
- drinkAntiPoison(itemId, 177, slot, 30000);
- break;
- case 177:
- drinkAntiPoison(itemId, 179, slot, 30000);
- break;
- case 179:
- drinkAntiPoison(itemId, 229, slot, 30000);
- break;
- case 2448:
- drinkAntiPoison(itemId, 181, slot, 300000); // anti
- // poisons
- break;
- case 181:
- drinkAntiPoison(itemId, 183, slot, 300000);
- break;
- case 183:
- drinkAntiPoison(itemId, 185, slot, 300000);
- break;
- case 185:
- drinkAntiPoison(itemId, 229, slot, 300000);
- break;
- /** Energy Potions **/
- case 3008:
- energyPotion(itemId, 3010, slot);
- break;
- case 3010:
- energyPotion(itemId, 3012, slot);
- break;
- case 3012:
- energyPotion(itemId, 3014, slot);
- break;
- case 3014:
- energyPotion(itemId, 229, slot);
- break;
- /** Super Energy Potions **/
- case 3016:
- energyPotion(itemId, 3018, slot);
- break;
- case 3018:
- energyPotion(itemId, 3020, slot);
- break;
- case 3020:
- energyPotion(itemId, 3022, slot);
- break;
- case 3022:
- energyPotion(itemId, 229, slot);
- break;
- case 2452:
- antifirePot(itemId, 2454, slot);
- break;
- case 2454:
- antifirePot(itemId, 2456, slot);
- break;
- case 2456:
- antifirePot(itemId, 2458, slot);
- break;
- case 2458:
- antifirePot(itemId, 229, slot);
- break;
- }
- }
- }
+ public void handlePotion(int itemId, int slot) {
+ if (c.duelRule[5]) {
+ c.getPacketSender().sendMessage(
+ "You may not drink potions in this duel.");
+ return;
+ }
+ if (c.isDead || c.playerLevel[Constants.HITPOINTS] <= 0) {
+ return;
+ }
+ if (System.currentTimeMillis() - c.potDelay >= 1200) {
+ c.potDelay = System.currentTimeMillis();
+ c.foodDelay = System.currentTimeMillis();
+ c.getCombatAssistant().resetPlayerAttack();
+ c.attackTimer++;
+ c.getPacketSender().sendMessage(
+ "You drink some of your " + ItemDefinition.lookup(itemId).getName() + ".");
+ c.startAnimation(829);
+ final String item = ItemDefinition.lookup(itemId).getName();
+ String m = "";
+ if (item.endsWith("(4)")) {
+ m = "You have 3 doses of potion left.";
+ } else if (item.endsWith("(3)")) {
+ m = "You have 2 doses of potion left.";
+ } else if (item.endsWith("(2)")) {
+ m = "You have 1 dose of potion left.";
+ } else if (item.endsWith("(1)")) {
+ m = "You have finished your potion.";
+ }
+ final String m1 = m;
+ CycleEventHandler.getSingleton().addEvent(c, new CycleEvent() {
+ @Override
+ public void execute(CycleEventContainer container) {
+ c.getPacketSender().sendSound(1210, 100, 0);
+ c.getPacketSender().sendMessage(m1);
+ container.stop();
+ }
- private void energyPotion(int itemId, int replaceItem, int slot) {
- c.playerItems[slot] = replaceItem + 1;
- c.getItemAssistant().resetItems(3214);
- if (itemId >= 3008 && itemId <= 3014) {
- c.playerEnergy += 20;
- } else {
- c.playerEnergy += 40;
- }
- if (c.playerEnergy > 100) {
- c.playerEnergy = 100;
- }
- c.getPacketSender().sendString((int) Math.ceil(c.playerEnergy) + "%", 149);
- }
+ @Override
+ public void stop() {
- public void drinkAntiPoison(int itemId, int replaceItem, int slot,
- long delay) {
- // c.startAnimation(829);
- c.playerItems[slot] = replaceItem + 1;
- c.getItemAssistant().resetItems(3214);
- curePoison(delay);
- }
+ }
+ }, 1);
+ switch (itemId) {
+ case MAGIC_POTION4:
+ drinkStatPotion(itemId, MAGIC_POTION3, slot, 6, false);
+ break;
+ case MAGIC_POTION3:
+ drinkStatPotion(itemId, MAGIC_POTION2, slot, 6, false);
+ break;
+ case MAGIC_POTION2:
+ drinkStatPotion(itemId, MAGIC_POTION1, slot, 6, false);
+ break;
+ case MAGIC_POTION1:
+ drinkStatPotion(itemId, VIAL, slot, 6, false);
+ break;
+ case ZAMORAK_BREW4:
+ doTheBrewzam(itemId, ZAMORAK_BREW3, slot);
+ break;
+ case ZAMORAK_BREW3:
+ doTheBrewzam(itemId, ZAMORAK_BREW2, slot);
+ break;
+ case ZAMORAK_BREW2:
+ doTheBrewzam(itemId, ZAMORAK_BREW1, slot);
+ break;
+ case ZAMORAK_BREW1:
+ doTheBrewzam(itemId, VIAL, slot);
+ break;
+ case SARADOMIN_BREW4:
+ doTheBrew(itemId, SARADOMIN_BREW3, slot);
+ break;
+ case SARADOMIN_BREW3:
+ doTheBrew(itemId, SARADOMIN_BREW2, slot);
+ break;
+ case SARADOMIN_BREW2:
+ doTheBrew(itemId, SARADOMIN_BREW1, slot);
+ break;
+ case SARADOMIN_BREW1:
+ doTheBrew(itemId, VIAL, slot);
+ break;
+ case SUPER_ATTACK4:
+ drinkStatPotion(itemId, SUPER_ATTACK3, slot, 0, true);
+ break;
+ case SUPER_ATTACK3:
+ drinkStatPotion(itemId, SUPER_ATTACK2, slot, 0, true);
+ break;
+ case SUPER_ATTACK2:
+ drinkStatPotion(itemId, SUPER_ATTACK1, slot, 0, true);
+ break;
+ case SUPER_ATTACK1:
+ drinkStatPotion(itemId, VIAL, slot, 0, true);
+ break;
+ case SUPER_STRENGTH4:
+ drinkStatPotion(itemId, SUPER_STRENGTH3, slot, 2, true);
+ break;
+ case SUPER_STRENGTH3:
+ drinkStatPotion(itemId, SUPER_STRENGTH2, slot, 2, true);
+ break;
+ case SUPER_STRENGTH2:
+ drinkStatPotion(itemId, SUPER_STRENGTH1, slot, 2, true);
+ break;
+ case SUPER_STRENGTH1:
+ drinkStatPotion(itemId, VIAL, slot, 2, true);
+ break;
+ case RANGING_POTION4:
+ drinkStatPotion(itemId, RANGING_POTION3, slot, 4, false);
+ break;
+ case RANGING_POTION3:
+ drinkStatPotion(itemId, RANGING_POTION2, slot, 4, false);
+ break;
+ case RANGING_POTION2:
+ drinkStatPotion(itemId, RANGING_POTION1, slot, 4, false);
+ break;
+ case RANGING_POTION1:
+ drinkStatPotion(itemId, VIAL, slot, 4, false);
+ break;
+ case DEFENCE_POTION4:
+ drinkStatPotion(itemId, DEFENCE_POTION3, slot, 1, false);
+ break;
+ case DEFENCE_POTION3:
+ drinkStatPotion(itemId, DEFENCE_POTION2, slot, 1, false);
+ break;
+ case DEFENCE_POTION2:
+ drinkStatPotion(itemId, DEFENCE_POTION1, slot, 1, false);
+ break;
+ case DEFENCE_POTION1:
+ drinkStatPotion(itemId, VIAL, slot, 1, false);
+ break;
+ case STRENGTH_POTION4:
+ drinkStatPotion(itemId, STRENGTH_POTION3, slot, 2, false);
+ break;
+ case STRENGTH_POTION3:
+ drinkStatPotion(itemId, STRENGTH_POTION2, slot, 2, false);
+ break;
+ case STRENGTH_POTION2:
+ drinkStatPotion(itemId, STRENGTH_POTION1, slot, 2, false);
+ break;
+ case STRENGTH_POTION1:
+ drinkStatPotion(itemId, VIAL, slot, 2, false);
+ break;
+ case ATTACK_POTION4:
+ drinkStatPotion(itemId, ATTACK_POTION3, slot, 0, false);
+ break;
+ case ATTACK_POTION3:
+ drinkStatPotion(itemId, ATTACK_POTION2, slot, 0, false);
+ break;
+ case ATTACK_POTION2:
+ drinkStatPotion(itemId, ATTACK_POTION1, slot, 0, false);
+ break;
+ case ATTACK_POTION1:
+ drinkStatPotion(itemId, VIAL, slot, 0, false);
+ break;
+ case SUPER_DEFENCE4:
+ drinkStatPotion(itemId, SUPER_DEFENCE3, slot, 1, true);
+ break;
+ case SUPER_DEFENCE3:
+ drinkStatPotion(itemId, SUPER_DEFENCE2, slot, 1, true);
+ break;
+ case SUPER_DEFENCE2:
+ drinkStatPotion(itemId, SUPER_DEFENCE1, slot, 1, true);
+ break;
+ case SUPER_DEFENCE1:
+ drinkStatPotion(itemId, VIAL, slot, 1, true);
+ break;
+ case SUPER_RESTORE4:
+ drinkPrayerPot(itemId, SUPER_RESTORE3, slot, true);
+ break;
+ case SUPER_RESTORE3:
+ drinkPrayerPot(itemId, SUPER_RESTORE2, slot, true);
+ break;
+ case SUPER_RESTORE2:
+ drinkPrayerPot(itemId, SUPER_RESTORE1, slot, true);
+ break;
+ case SUPER_RESTORE1:
+ drinkPrayerPot(itemId, VIAL, slot, true);
+ break;
+ case PRAYER_POTION4:
+ drinkPrayerPot(itemId, PRAYER_POTION3, slot, false);
+ break;
+ case PRAYER_POTION3:
+ drinkPrayerPot(itemId, PRAYER_POTION2, slot, false);
+ break;
+ case PRAYER_POTION2:
+ drinkPrayerPot(itemId, PRAYER_POTION1, slot, false);
+ break;
+ case PRAYER_POTION1:
+ drinkPrayerPot(itemId, VIAL, slot, false);
+ break;
+ case ANTIPOISON4:
+ drinkAntiPoison(itemId, ANTIPOISON3, slot, 30000);
+ break;
+ case ANTIPOISON3:
+ drinkAntiPoison(itemId, ANTIPOISON2, slot, 30000);
+ break;
+ case ANTIPOISON2:
+ drinkAntiPoison(itemId, ANTIPOISON1, slot, 30000);
+ break;
+ case ANTIPOISON1:
+ drinkAntiPoison(itemId, VIAL, slot, 30000);
+ break;
+ case SUPERANTIPOISON4:
+ drinkAntiPoison(itemId, SUPERANTIPOISON3, slot, 300000);
+ break;
+ case SUPERANTIPOISON3:
+ drinkAntiPoison(itemId, SUPERANTIPOISON2, slot, 300000);
+ break;
+ case SUPERANTIPOISON2:
+ drinkAntiPoison(itemId, SUPERANTIPOISON1, slot, 300000);
+ break;
+ case SUPERANTIPOISON1:
+ drinkAntiPoison(itemId, VIAL, slot, 300000);
+ break;
+ case ENERGY_POTION4:
+ energyPotion(itemId, ENERGY_POTION3, slot);
+ break;
+ case ENERGY_POTION3:
+ energyPotion(itemId, ENERGY_POTION2, slot);
+ break;
+ case ENERGY_POTION2:
+ energyPotion(itemId, ENERGY_POTION1, slot);
+ break;
+ case ENERGY_POTION1:
+ energyPotion(itemId, VIAL, slot);
+ break;
+ case SUPER_ENERGY4:
+ energyPotion(itemId, SUPER_ENERGY3, slot);
+ break;
+ case SUPER_ENERGY3:
+ energyPotion(itemId, SUPER_ENERGY2, slot);
+ break;
+ case SUPER_ENERGY2:
+ energyPotion(itemId, SUPER_ENERGY1, slot);
+ break;
+ case SUPER_ENERGY1:
+ energyPotion(itemId, VIAL, slot);
+ break;
+ case ANTIFIRE_POTION4:
+ antifirePot(itemId, ANTIFIRE_POTION3, slot);
+ break;
+ case ANTIFIRE_POTION3:
+ antifirePot(itemId, ANTIFIRE_POTION2, slot);
+ break;
+ case ANTIFIRE_POTION2:
+ antifirePot(itemId, ANTIFIRE_POTION1, slot);
+ break;
+ case ANTIFIRE_POTION1:
+ antifirePot(itemId, VIAL, slot);
+ break;
+ }
+ }
+ }
- public void curePoison(long delay) {
- c.poisonDamage = 0;
- c.poisonImmune = delay;
- c.lastPoisonSip = System.currentTimeMillis();
- }
+ private void energyPotion(int itemId, int replaceItem, int slot) {
+ c.playerItems[slot] = replaceItem + 1;
+ c.getItemAssistant().resetItems(3214);
+ if (itemId >= ENERGY_POTION4 && itemId <= ENERGY_POTION1) {
+ c.playerEnergy += 20;
+ } else {
+ c.playerEnergy += 40;
+ }
+ if (c.playerEnergy > 100) {
+ c.playerEnergy = 100;
+ }
+ c.getPacketSender().sendString((int) Math.ceil(c.playerEnergy) + "%", 149);
+ }
- public void drinkStatPotion(int itemId, int replaceItem, int slot,
- int stat, boolean sup) {
- // c.startAnimation(829);
- c.playerItems[slot] = replaceItem + 1;
- c.getItemAssistant().resetItems(3214);
- enchanceStat(stat, sup);
- }
+ public void drinkAntiPoison(int itemId, int replaceItem, int slot,
+ long delay) {
+ // c.startAnimation(829);
+ c.playerItems[slot] = replaceItem + 1;
+ c.getItemAssistant().resetItems(3214);
+ curePoison(delay);
+ }
- public void drinkPrayerPot(int itemId, int replaceItem, int slot,
- boolean rest) {
- // c.startAnimation(829);
- c.playerItems[slot] = replaceItem + 1;
- c.getItemAssistant().resetItems(3214);
- c.playerLevel[Constants.PRAYER] += c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.PRAYER]) * .33;
- if (rest) {
- c.playerLevel[Constants.PRAYER] += 1;
- }
- if (c.playerLevel[Constants.PRAYER] > c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.PRAYER])) {
- c.playerLevel[Constants.PRAYER] = c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.PRAYER]);
- }
- c.getPlayerAssistant().refreshSkill(Constants.PRAYER);
- if (rest) {
- restoreStats();
- }
- }
+ public void curePoison(long delay) {
+ c.poisonDamage = 0;
+ c.poisonImmune = delay;
+ c.lastPoisonSip = System.currentTimeMillis();
+ }
- public void restoreStats() {
- for (int j = 0; j <= 6; j++) {
- if (j == 5 || j == 3) {
- continue;
- }
- if (c.playerLevel[j] < c.getPlayerAssistant().getLevelForXP(c.playerXP[j])) {
- c.playerLevel[j] += c.getPlayerAssistant().getLevelForXP(c.playerXP[j]) * .33;
- if (c.playerLevel[j] > c.getPlayerAssistant().getLevelForXP(c.playerXP[j])) {
- c.playerLevel[j] = c.getPlayerAssistant().getLevelForXP(c.playerXP[j]);
- }
- c.getPlayerAssistant().refreshSkill(j);
- c.getPacketSender().setSkillLevel(j, c.playerLevel[j],
- c.playerXP[j]);
- }
- }
- }
+ public void drinkStatPotion(int itemId, int replaceItem, int slot,
+ int stat, boolean sup) {
+ // c.startAnimation(829);
+ c.playerItems[slot] = replaceItem + 1;
+ c.getItemAssistant().resetItems(3214);
+ enchanceStat(stat, sup);
+ }
- public void doTheBrewzam(int itemId, int replaceItem, int slot) {
- // c.startAnimation(829);
- c.playerItems[slot] = replaceItem + 1;
- c.getItemAssistant().resetItems(3214);
- int[] toDecrease = { 1, 3 };
- for (int tD : toDecrease) {
- c.playerLevel[tD] -= getBrewStat(tD, .10);
- if (c.playerLevel[tD] < 0) {
- c.playerLevel[tD] = 1;
- }
- c.getPlayerAssistant().refreshSkill(tD);
- c.getPacketSender().setSkillLevel(tD, c.playerLevel[tD],
- c.playerXP[tD]);
- }
- c.playerLevel[Constants.ATTACK] += getBrewStat(0, .20);
- if (c.playerLevel[Constants.ATTACK] > c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.ATTACK]) * 1.2 + 1) {
- c.playerLevel[Constants.ATTACK] = (int) (c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.ATTACK]) * 1.2);
- }
- c.playerLevel[Constants.STRENGTH] += getBrewStat(2, .12);
- if (c.playerLevel[Constants.STRENGTH] > c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.STRENGTH]) * 1.2 + 1) {
- c.playerLevel[Constants.STRENGTH] = (int) (c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.STRENGTH]) * 1.2);
- }
- c.playerLevel[Constants.PRAYER] += getBrewStat(5, .10);
- if (c.playerLevel[Constants.PRAYER] > c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.PRAYER]) * 1.2 + 1) {
- c.playerLevel[Constants.PRAYER] = (int) (c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.PRAYER]) * 1.2);
- }
- c.getPlayerAssistant().refreshSkill(0);
- c.getPlayerAssistant().refreshSkill(Constants.STRENGTH);
- c.getPlayerAssistant().refreshSkill(Constants.PRAYER);
- c.hitUpdateRequired = true;
- c.hitDiff = 9;
- }
+ public void drinkPrayerPot(int itemId, int replaceItem, int slot,
+ boolean rest) {
+ // c.startAnimation(829);
+ c.playerItems[slot] = replaceItem + 1;
+ c.getItemAssistant().resetItems(3214);
+ c.playerLevel[Constants.PRAYER] += c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.PRAYER]) * .33;
+ if (rest) {
+ c.playerLevel[Constants.PRAYER] += 1;
+ }
+ if (c.playerLevel[Constants.PRAYER] > c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.PRAYER])) {
+ c.playerLevel[Constants.PRAYER] = c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.PRAYER]);
+ }
+ c.getPlayerAssistant().refreshSkill(Constants.PRAYER);
+ if (rest) {
+ restoreStats();
+ }
+ }
- public void doTheBrew(int itemId, int replaceItem, int slot) {
- if (c.duelRule[6]) {
- c.getPacketSender()
- .sendMessage("You may not eat in this duel.");
- return;
- }
- // c.startAnimation(829);
- c.playerItems[slot] = replaceItem + 1;
- c.getItemAssistant().resetItems(3214);
- int[] toDecrease = { 0, 2, 4, 6 };
- for (int tD : toDecrease) {
- c.playerLevel[tD] -= getBrewStat(tD, .10);
- if (c.playerLevel[tD] < 0) {
- c.playerLevel[tD] = 1;
- }
- c.getPlayerAssistant().refreshSkill(tD);
- c.getPacketSender().setSkillLevel(tD, c.playerLevel[tD],
- c.playerXP[tD]);
- }
- c.playerLevel[Constants.DEFENCE] += getBrewStat(1, .20);
- if (c.playerLevel[Constants.DEFENCE] > c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.DEFENCE]) * 1.2 + 1) {
- c.playerLevel[Constants.DEFENCE] = (int) (c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.DEFENCE]) * 1.2);
- }
- c.getPlayerAssistant().refreshSkill(Constants.DEFENCE);
+ public void restoreStats() {
+ for (int j = 0; j <= 6; j++) {
+ if (j == 5 || j == 3) {
+ continue;
+ }
+ if (c.playerLevel[j] < c.getPlayerAssistant().getLevelForXP(c.playerXP[j])) {
+ c.playerLevel[j] += c.getPlayerAssistant().getLevelForXP(c.playerXP[j]) * .33;
+ if (c.playerLevel[j] > c.getPlayerAssistant().getLevelForXP(c.playerXP[j])) {
+ c.playerLevel[j] = c.getPlayerAssistant().getLevelForXP(c.playerXP[j]);
+ }
+ c.getPlayerAssistant().refreshSkill(j);
+ c.getPacketSender().setSkillLevel(j, c.playerLevel[j],
+ c.playerXP[j]);
+ }
+ }
+ }
- c.playerLevel[Constants.HITPOINTS] += getBrewStat(3, .15);
- if (c.playerLevel[Constants.HITPOINTS] > c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.HITPOINTS]) * 1.17 + 1) {
- c.playerLevel[Constants.HITPOINTS] = (int) (c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.HITPOINTS]) * 1.17);
- }
- c.getPlayerAssistant().refreshSkill(Constants.HITPOINTS);
- }
+ public void doTheBrewzam(int itemId, int replaceItem, int slot) {
+ // c.startAnimation(829);
+ c.playerItems[slot] = replaceItem + 1;
+ c.getItemAssistant().resetItems(3214);
+ int[] toDecrease = {1, 3};
+ for (int tD : toDecrease) {
+ c.playerLevel[tD] -= getBrewStat(tD, .10);
+ if (c.playerLevel[tD] < 0) {
+ c.playerLevel[tD] = 1;
+ }
+ c.getPlayerAssistant().refreshSkill(tD);
+ c.getPacketSender().setSkillLevel(tD, c.playerLevel[tD],
+ c.playerXP[tD]);
+ }
+ c.playerLevel[Constants.ATTACK] += getBrewStat(0, .20);
+ if (c.playerLevel[Constants.ATTACK] > c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.ATTACK]) * 1.2 + 1) {
+ c.playerLevel[Constants.ATTACK] = (int) (c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.ATTACK]) * 1.2);
+ }
+ c.playerLevel[Constants.STRENGTH] += getBrewStat(2, .12);
+ if (c.playerLevel[Constants.STRENGTH] > c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.STRENGTH]) * 1.2 + 1) {
+ c.playerLevel[Constants.STRENGTH] = (int) (c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.STRENGTH]) * 1.2);
+ }
+ c.playerLevel[Constants.PRAYER] += getBrewStat(5, .10);
+ if (c.playerLevel[Constants.PRAYER] > c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.PRAYER]) * 1.2 + 1) {
+ c.playerLevel[Constants.PRAYER] = (int) (c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.PRAYER]) * 1.2);
+ }
+ c.getPlayerAssistant().refreshSkill(0);
+ c.getPlayerAssistant().refreshSkill(Constants.STRENGTH);
+ c.getPlayerAssistant().refreshSkill(Constants.PRAYER);
+ c.hitUpdateRequired = true;
+ c.hitDiff = 9;
+ }
- public void enchanceStat(int skillID, boolean sup) {
- c.playerLevel[skillID] += getBoostedStat(skillID, sup);
- c.getPlayerAssistant().refreshSkill(skillID);
- }
+ public void doTheBrew(int itemId, int replaceItem, int slot) {
+ if (c.duelRule[6]) {
+ c.getPacketSender()
+ .sendMessage("You may not eat in this duel.");
+ return;
+ }
+ // c.startAnimation(829);
+ c.playerItems[slot] = replaceItem + 1;
+ c.getItemAssistant().resetItems(3214);
+ int[] toDecrease = {0, 2, 4, 6};
+ for (int tD : toDecrease) {
+ c.playerLevel[tD] -= getBrewStat(tD, .10);
+ if (c.playerLevel[tD] < 0) {
+ c.playerLevel[tD] = 1;
+ }
+ c.getPlayerAssistant().refreshSkill(tD);
+ c.getPacketSender().setSkillLevel(tD, c.playerLevel[tD],
+ c.playerXP[tD]);
+ }
+ c.playerLevel[Constants.DEFENCE] += getBrewStat(1, .20);
+ if (c.playerLevel[Constants.DEFENCE] > c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.DEFENCE]) * 1.2 + 1) {
+ c.playerLevel[Constants.DEFENCE] = (int) (c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.DEFENCE]) * 1.2);
+ }
+ c.getPlayerAssistant().refreshSkill(Constants.DEFENCE);
- public void antifirePot(int itemId, int replaceItem, int slot) {
- c.startAnimation(829);
- c.playerItems[slot] = replaceItem + 1;
- c.antiFirePot = true;
- c.antiFirePotion();
- c.getPacketSender().sendMessage(
- "Your immunity against dragon fire has been increased.");
- c.getItemAssistant().resetItems(3214);
+ c.playerLevel[Constants.HITPOINTS] += getBrewStat(3, .15);
+ if (c.playerLevel[Constants.HITPOINTS] > c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.HITPOINTS]) * 1.17 + 1) {
+ c.playerLevel[Constants.HITPOINTS] = (int) (c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.HITPOINTS]) * 1.17);
+ }
+ c.getPlayerAssistant().refreshSkill(Constants.HITPOINTS);
+ }
- }
+ public void enchanceStat(int skillID, boolean sup) {
+ c.playerLevel[skillID] += getBoostedStat(skillID, sup);
+ c.getPlayerAssistant().refreshSkill(skillID);
+ }
- public int getBrewStat(int skill, double amount) {
- return (int) (c.getPlayerAssistant().getLevelForXP(c.playerXP[skill]) * amount);
- }
+ public void antifirePot(int itemId, int replaceItem, int slot) {
+ c.startAnimation(829);
+ c.playerItems[slot] = replaceItem + 1;
+ c.antiFirePot = true;
+ c.antiFirePotion();
+ c.getPacketSender().sendMessage(
+ "Your immunity against dragon fire has been increased.");
+ c.getItemAssistant().resetItems(3214);
- public int getBoostedStat(int skill, boolean sup) {
- int increaseBy;
- if (sup) {
- increaseBy = (int) (c.getPlayerAssistant().getLevelForXP(c.playerXP[skill]) * .20);
- } else {
- increaseBy = (int) (c.getPlayerAssistant().getLevelForXP(c.playerXP[skill]) * .13) + 1;
- }
- if (c.playerLevel[skill] + increaseBy > c.getPlayerAssistant()
- .getLevelForXP(c.playerXP[skill]) + increaseBy + 1) {
- return c.getPlayerAssistant().getLevelForXP(c.playerXP[skill]) + increaseBy
- - c.playerLevel[skill];
- }
- return increaseBy;
- }
+ }
- public boolean isPotion(int itemId) {
- String name = DeprecatedItems.getItemName(itemId);
- return name.contains("(4)") || name.contains("(3)")
- || name.contains("(2)") || name.contains("(1)");
- }
+ public int getBrewStat(int skill, double amount) {
+ return (int) (c.getPlayerAssistant().getLevelForXP(c.playerXP[skill]) * amount);
+ }
- public boolean potionNames(int itemId) {
- String name = DeprecatedItems.getItemName(itemId);
- return name.endsWith("potion(4)") || name.endsWith("potion(3)")
- || name.endsWith("potion(2)") || name.endsWith("potion(1)")
- || name.contains("saradomin brew")
- || name.contains("zamorak brew");
- }
-}
+ public int getBoostedStat(int skill, boolean sup) {
+ int increaseBy;
+ if (sup) {
+ increaseBy = (int) (c.getPlayerAssistant().getLevelForXP(c.playerXP[skill]) * .20);
+ } else {
+ increaseBy = (int) (c.getPlayerAssistant().getLevelForXP(c.playerXP[skill]) * .13) + 1;
+ }
+ if (c.playerLevel[skill] + increaseBy > c.getPlayerAssistant()
+ .getLevelForXP(c.playerXP[skill]) + increaseBy + 1) {
+ return c.getPlayerAssistant().getLevelForXP(c.playerXP[skill]) + increaseBy
+ - c.playerLevel[skill];
+ }
+ return increaseBy;
+ }
+
+ public boolean isPotion(int itemId) {
+ String name = DeprecatedItems.getItemName(itemId);
+ return name.contains("(4)") || name.contains("(3)")
+ || name.contains("(2)") || name.contains("(1)");
+ }
+
+ public boolean potionNames(int itemId) {
+ String name = DeprecatedItems.getItemName(itemId);
+ return name.endsWith("potion(4)") || name.endsWith("potion(3)")
+ || name.endsWith("potion(2)") || name.endsWith("potion(1)")
+ || name.contains("saradomin brew")
+ || name.contains("zamorak brew");
+ }
+}
\ No newline at end of file
diff --git a/2006Scape Server/src/main/java/com/rs2/game/content/skills/crafting/BattleStaffs.java b/2006Scape Server/src/main/java/com/rs2/game/content/skills/crafting/BattleStaffs.java
index 6b04ae7c..5ac447f5 100644
--- a/2006Scape Server/src/main/java/com/rs2/game/content/skills/crafting/BattleStaffs.java
+++ b/2006Scape Server/src/main/java/com/rs2/game/content/skills/crafting/BattleStaffs.java
@@ -6,100 +6,103 @@ import com.rs2.event.CycleEventContainer;
import com.rs2.event.CycleEventHandler;
import com.rs2.game.players.Player;
+import static com.rs2.game.content.StaticItemList.*;
+
/**
* Battle Staff making
+ *
* @author Andrew (Mr Extremez)
*/
public class BattleStaffs {
-
- public static enum battleStaffs {
- AIR(573, 66, 138, 1397),
- FIRE(569, 62, 125, 1393),
- EARTH(575, 58, 113, 1399),
- WATER(571, 54, 100, 1395);
+ public static enum battleStaffs {
- private int orb, levelReq, xpRecieved, battlestaff;
+ AIR(AIR_ORB, 66, 138, AIR_BATTLESTAFF),
+ FIRE(FIRE_ORB, 62, 125, FIRE_BATTLESTAFF),
+ EARTH(EARTH_ORB, 58, 113, EARTH_BATTLESTAFF),
+ WATER(WATER_ORB, 54, 100, WATER_BATTLESTAFF);
- private battleStaffs(final int orb, final int levelReq, final int xpRecieved, final int battlestaff) {
- this.orb = orb;
- this.levelReq = levelReq;
- this.xpRecieved = xpRecieved;
- this.battlestaff = battlestaff;
- }
+ private int orb, levelReq, xpRecieved, battlestaff;
- public int getOrb() {
- return orb;
- }
-
- public int getLevelReq() {
- return levelReq;
- }
-
- public int getXP() {
- return xpRecieved;
- }
+ private battleStaffs(final int orb, final int levelReq, final int xpRecieved, final int battlestaff) {
+ this.orb = orb;
+ this.levelReq = levelReq;
+ this.xpRecieved = xpRecieved;
+ this.battlestaff = battlestaff;
+ }
- public int getBattlestaff() {
- return battlestaff;
- }
- }
-
- public static void makeBattleStaff(Player player, int itemUsed, int usedWith) {
- for (final battleStaffs b : battleStaffs.values()) {
- if ((itemUsed == b.getOrb() && usedWith == 1391) || (itemUsed == 1391 && usedWith == b.getOrb())) {
- if (player.getItemAssistant().playerHasItem(1391) && player.getItemAssistant().playerHasItem(b.getOrb())) {
- if (player.isCrafting == true) {
- return;
- }
- if (player.playerLevel[Constants.CRAFTING] < b.getLevelReq()) {
- player.getPacketSender().sendMessage("You need level " + b.getLevelReq() + " crafting to do that.");
- return;
- }
- player.getPacketSender().closeAllWindows();
- player.isCrafting = true;
- player.skillAmount = player.getItemAssistant().getItemAmount(b.getOrb());
- CycleEventHandler.getSingleton().addEvent(player, new CycleEvent() {
- @Override
- public void execute(CycleEventContainer container) {
- if (player.isCrafting == true && player != null) {
- if (!player.getItemAssistant().playerHasItem(1391, 1)) {
- player.getPacketSender().sendMessage("You have run out of battlestaffs.");
- container.stop();
- return;
- }
- if (!player.getItemAssistant().playerHasItem(b.getOrb(), 1)) {
- player.getPacketSender().sendMessage("You have run out of orbs.");
- container.stop();
- return;
- }
- if (player.skillAmount == 0) {
- container.stop();
- return;
- }
- player.getItemAssistant().deleteItem(1391, 1);
- player.getItemAssistant().deleteItem(b.getOrb(), 1);
- player.getItemAssistant().addItem(b.getBattlestaff(), 1);
- player.getPlayerAssistant().addSkillXP((int) b.getXP(), 6);
- player.skillAmount--;
- if (!player.getItemAssistant().playerHasItem(1391) || !player.getItemAssistant().playerHasItem(b.getOrb())) {
- container.stop();
- return;
- }
- } else {
- container.stop();
- }
- }
+ public int getOrb() {
+ return orb;
+ }
+
+ public int getLevelReq() {
+ return levelReq;
+ }
+
+ public int getXP() {
+ return xpRecieved;
+ }
+
+ public int getBattlestaff() {
+ return battlestaff;
+ }
+ }
+
+ public static void makeBattleStaff(Player player, int itemUsed, int usedWith) {
+ for (final battleStaffs b : battleStaffs.values()) {
+ if ((itemUsed == b.getOrb() && usedWith == BATTLESTAFF) || (itemUsed == BATTLESTAFF && usedWith == b.getOrb())) {
+ if (player.getItemAssistant().playerHasItem(BATTLESTAFF) && player.getItemAssistant().playerHasItem(b.getOrb())) {
+ if (player.isCrafting == true) {
+ return;
+ }
+ if (player.playerLevel[Constants.CRAFTING] < b.getLevelReq()) {
+ player.getPacketSender().sendMessage("You need level " + b.getLevelReq() + " crafting to do that.");
+ return;
+ }
+ player.getPacketSender().closeAllWindows();
+ player.isCrafting = true;
+ player.skillAmount = player.getItemAssistant().getItemAmount(b.getOrb());
+ CycleEventHandler.getSingleton().addEvent(player, new CycleEvent() {
+ @Override
+ public void execute(CycleEventContainer container) {
+ if (player.isCrafting == true && player != null) {
+ if (!player.getItemAssistant().playerHasItem(BATTLESTAFF, 1)) {
+ player.getPacketSender().sendMessage("You have run out of battlestaffs.");
+ container.stop();
+ return;
+ }
+ if (!player.getItemAssistant().playerHasItem(b.getOrb(), 1)) {
+ player.getPacketSender().sendMessage("You have run out of orbs.");
+ container.stop();
+ return;
+ }
+ if (player.skillAmount == 0) {
+ container.stop();
+ return;
+ }
+ player.getItemAssistant().deleteItem(BATTLESTAFF, 1);
+ player.getItemAssistant().deleteItem(b.getOrb(), 1);
+ player.getItemAssistant().addItem(b.getBattlestaff(), 1);
+ player.getPlayerAssistant().addSkillXP((int) b.getXP(), 6);
+ player.skillAmount--;
+ if (!player.getItemAssistant().playerHasItem(BATTLESTAFF) || !player.getItemAssistant().playerHasItem(b.getOrb())) {
+ container.stop();
+ return;
+ }
+ } else {
+ container.stop();
+ }
+ }
+
+ @Override
+ public void stop() {
+ player.isCrafting = false;
+ }
+ }, 2);
+ }
+ }
+ }
+ }
- @Override
- public void stop() {
- player.isCrafting = false;
- }
- }, 2);
- }
- }
- }
- }
-
}
diff --git a/2006Scape Server/src/main/java/com/rs2/game/content/skills/crafting/CraftingData.java b/2006Scape Server/src/main/java/com/rs2/game/content/skills/crafting/CraftingData.java
index aaa6249c..5757bda2 100644
--- a/2006Scape Server/src/main/java/com/rs2/game/content/skills/crafting/CraftingData.java
+++ b/2006Scape Server/src/main/java/com/rs2/game/content/skills/crafting/CraftingData.java
@@ -2,366 +2,369 @@ package com.rs2.game.content.skills.crafting;
import com.rs2.game.content.skills.SkillHandler;
+import static com.rs2.game.content.StaticItemList.*;
+
public class CraftingData extends SkillHandler {
- public static enum tanningData {
+ public static enum tanningData {
- SOFT_LEATHER(new int[][] { { 57225, 1 }, { 57217, 5 }, { 57201, 28 } },
- 1739, 1741, 1, new int[] { 14777, 14785, 14769 },
- "Soft leather"), HARD_LEATHER(new int[][] { { 57226, 1 },
- { 57218, 5 }, { 57202, 28 } }, 1739, 1743, 3, new int[] {
- 14778, 14786, 14770 }, "Hard leather"), SNAKESKIN(new int[][] {
- { 57227, 1 }, { 57219, 5 }, { 57203, 28 } }, 6287, 6289, 15,
- new int[] { 14779, 14787, 14771 }, "Snakeskin"), SNAKESKIN2(
- new int[][] { { 57228, 1 }, { 57220, 5 }, { 57204, 28 } },
- 6287, 6289, 20, new int[] { 14780, 14788, 14772 }, "Snakeskin"), GREEN_DRAGON_LEATHER(
- new int[][] { { 57229, 1 }, { 57221, 5 }, { 57205, 28 } },
- 1753, 1745, 20, new int[] { 14781, 14789, 14773 },
- "Green d'hide"), BLUE_DRAGON_LEATHER(new int[][] {
- { 57230, 1 }, { 57222, 5 }, { 57206, 28 } }, 1751, 2505, 20,
- new int[] { 14782, 14790, 14774 }, "Blue d'hide"), RED_DRAGON_LEATHER(
- new int[][] { { 57231, 1 }, { 57223, 5 }, { 57207, 28 } },
- 1749, 2507, 20, new int[] { 14783, 14791, 14775 }, "Red d'hide"), BLACK_DRAGON_LEATHER(
- new int[][] { { 57232, 1 }, { 57224, 5 }, { 57208, 28 } },
- 1747, 2509, 20, new int[] { 14784, 14792, 14776 },
- "Black d'hide");
+ SOFT_LEATHER(new int[][]{{57225, 1}, {57217, 5}, {57201, 28}}, 1739, 1741, 1, new int[]{14777, 14785, 14769}, "Soft leather"),
+ HARD_LEATHER(new int[][]{{57226, 1}, {57218, 5}, {57202, 28}}, 1739, 1743, 3, new int[]{14778, 14786, 14770}, "Hard leather"),
+ SNAKESKIN(new int[][]{{57227, 1}, {57219, 5}, {57203, 28}}, 6287, 6289, 15, new int[]{14779, 14787, 14771}, "Snakeskin"),
+ SNAKESKIN2(
+ new int[][]{{57228, 1}, {57220, 5}, {57204, 28}},
+ 6287, 6289, 20, new int[]{14780, 14788, 14772}, "Snakeskin"), GREEN_DRAGON_LEATHER(
+ new int[][]{{57229, 1}, {57221, 5}, {57205, 28}},
+ 1753, 1745, 20, new int[]{14781, 14789, 14773},
+ "Green d'hide"), BLUE_DRAGON_LEATHER(new int[][]{
+ {57230, 1}, {57222, 5}, {57206, 28}}, 1751, 2505, 20,
+ new int[]{14782, 14790, 14774}, "Blue d'hide"), RED_DRAGON_LEATHER(
+ new int[][]{{57231, 1}, {57223, 5}, {57207, 28}},
+ 1749, 2507, 20, new int[]{14783, 14791, 14775}, "Red d'hide"), BLACK_DRAGON_LEATHER(
+ new int[][]{{57232, 1}, {57224, 5}, {57208, 28}},
+ 1747, 2509, 20, new int[]{14784, 14792, 14776},
+ "Black d'hide");
- private final int[][] buttonId;
- private final int hideId, leatherId, price;
- private final int[] frameId;
- private final String name;
+ private final int[][] buttonId;
+ private final int hideId, leatherId, price;
+ private final int[] frameId;
+ private final String name;
- private tanningData(final int[][] buttonId, final int hideId,
- final int leatherId, final int price, final int[] frameId,
- final String name) {
- this.buttonId = buttonId;
- this.hideId = hideId;
- this.leatherId = leatherId;
- this.price = price;
- this.frameId = frameId;
- this.name = name;
- }
+ private tanningData(final int[][] buttonId, final int hideId,
+ final int leatherId, final int price, final int[] frameId,
+ final String name) {
+ this.buttonId = buttonId;
+ this.hideId = hideId;
+ this.leatherId = leatherId;
+ this.price = price;
+ this.frameId = frameId;
+ this.name = name;
+ }
- public int getButtonId(final int button) {
- for (int[] element : buttonId) {
- if (button == element[0]) {
- return element[0];
- }
- }
- return -1;
- }
+ public int getButtonId(final int button) {
+ for (int[] element : buttonId) {
+ if (button == element[0]) {
+ return element[0];
+ }
+ }
+ return -1;
+ }
- public int getAmount(final int button) {
- for (int[] element : buttonId) {
- if (button == element[0]) {
- return element[1];
- }
- }
- return -1;
- }
+ public int getAmount(final int button) {
+ for (int[] element : buttonId) {
+ if (button == element[0]) {
+ return element[1];
+ }
+ }
+ return -1;
+ }
- public int getHideId() {
- return hideId;
- }
+ public int getHideId() {
+ return hideId;
+ }
- public int getLeatherId() {
- return leatherId;
- }
+ public int getLeatherId() {
+ return leatherId;
+ }
- public int getPrice() {
- return price;
- }
+ public int getPrice() {
+ return price;
+ }
- public int getNameFrame() {
- return frameId[0];
- }
+ public int getNameFrame() {
+ return frameId[0];
+ }
- public int getCostFrame() {
- return frameId[1];
- }
+ public int getCostFrame() {
+ return frameId[1];
+ }
- public int getItemFrame() {
- return frameId[2];
- }
+ public int getItemFrame() {
+ return frameId[2];
+ }
- public String getName() {
- return name;
- }
- }
+ public String getName() {
+ return name;
+ }
+ }
- public static enum leatherDialogueData {
+ public static enum leatherDialogueData {
- GREEN_LEATHER(1745, 1065, 1135, 1099), BLUE_LEATHER(2505, 2487, 2499,
- 2493), RED_LEATHER(2507, 2489, 2501, 2495), BLACK_LEATHER(2509,
- 2491, 2503, 2497);
+ GREEN_LEATHER(GREEN_DLEATHER, GREEN_DHIDE_VAMB, GREEN_DHIDE_BODY, GREEN_DHIDE_CHAPS),
+ BLUE_LEATHER(BLUE_DLEATHER, BLUE_DHIDE_VAMB, BLUE_DHIDE_BODY, BLUE_DHIDE_CHAPS),
+ RED_LEATHER(RED_DRAGON_LEATHER, RED_DHIDE_VAMB, RED_DHIDE_BODY, RED_DHIDE_CHAPS),
+ BLACK_LEATHER(BLACK_DLEATHER, BLACK_DHIDE_VAMB, BLACK_DHIDE_BODY, BLACK_DHIDE_CHAPS);
- private final int leather, vambraces, chaps, body;
+ private final int leather, vambraces, body, chaps;
- private leatherDialogueData(final int leather, final int vambraces,
- final int chaps, final int body) {
- this.leather = leather;
- this.vambraces = vambraces;
- this.chaps = chaps;
- this.body = body;
- }
+ private leatherDialogueData(final int leather, final int vambraces, final int body, final int chaps) {
+ this.leather = leather;
+ this.vambraces = vambraces;
+ this.body = body;
+ this.chaps = chaps;
+ }
- public int getLeather() {
- return leather;
- }
+ public int getLeather() {
+ return leather;
+ }
- public int getVamb() {
- return vambraces;
- }
+ public int getVamb() {
+ return vambraces;
+ }
- public int getChaps() {
- return chaps;
- }
+ public int getChaps() {
+ return chaps;
+ }
- public int getBody() {
- return body;
- }
- }
+ public int getBody() {
+ return body;
+ }
+ }
- public enum Leather {
+ public enum Leather {
- LEATHER_GLOVES(1733, 1741, 1059, 1, 1, 13.75), LEATHER_BOOTS(1733,
- 1741, 1061, 1, 7, 16.25);
+ LEATHER_GLOVES_(LEATHER, LEATHER_GLOVES, 1, 1, 13.75),
+ LEATHER_BOOTS_(LEATHER, LEATHER_BOOTS, 1, 7, 16.25);
- public int item1, leatherId, product, amountOfLeather, level;
- public double xp;
+ public int leatherId, product, amountOfLeather, level;
+ public double xp;
- public static Leather forId(int itemUsed, int usedWith) {
- for (Leather Data : Leather.values()) {
- if (Data.item1 == itemUsed && Data.leatherId == usedWith
- || Data.leatherId == itemUsed && Data.item1 == usedWith) {
- return Data;
- }
- }
- return null;
- }
+ public static Leather forId(int itemUsed, int usedWith) {
+ for (Leather Data : Leather.values()) {
+ if (NEEDLE == itemUsed && Data.leatherId == usedWith
+ || Data.leatherId == itemUsed && NEEDLE == usedWith) {
+ return Data;
+ }
+ }
+ return null;
+ }
- private Leather(int item1, int leatherId, int product,
- int amountOfLeather, int level, double xp) {
- this.leatherId = leatherId;
- this.product = product;
- this.amountOfLeather = amountOfLeather;
- this.level = level;
- this.xp = xp;
- }
+ private Leather(int leatherId, int product,
+ int amountOfLeather, int level, double xp) {
+ this.leatherId = leatherId;
+ this.product = product;
+ this.amountOfLeather = amountOfLeather;
+ this.level = level;
+ this.xp = xp;
+ }
- public int needle() {
- return item1;
- }
+ public int getLeather() {
+ return leatherId;
+ }
- public int getLeather() {
- return leatherId;
- }
+ public int getProduct() {
+ return product;
+ }
- public int getProduct() {
- return product;
- }
+ public int amountOfLeather4Product() {
+ return amountOfLeather;
+ }
- public int amountOfLeather4Product() {
- return amountOfLeather;
- }
+ public int getLevel() {
+ return level;
+ }
- public int getLevel() {
- return level;
- }
+ public double getXp() {
+ return xp;
+ }
+ }
- public double getXp() {
- return xp;
- }
- }
+ public static enum leatherData {
- public static enum leatherData {
+ LEATHER_BODY(new int[][]{{33187, 1}, {33186, 5}, {33185, 10}},
+ 1741, 1129, 14, 25, 1), LEATHER_GLOVES(new int[][]{
+ {33190, 1}, {33189, 5}, {33188, 10}}, 1741, 1059, 1,
+ 13.8, 1), LEATHER_BOOTS(new int[][]{{33193, 1},
+ {33192, 5}, {33191, 10}}, 1741, 1061, 7, 16.25, 1), LEATHER_VAMBRACES(
+ new int[][]{{33196, 1}, {33195, 5}, {33194, 10}}, 1741,
+ 1063, 11, 22, 1), LEATHER_CHAPS(new int[][]{{33199, 1},
+ {33198, 5}, {33197, 10}}, 1741, 1095, 18, 27, 1), LEATHER_COIF(
+ new int[][]{{33202, 1}, {33201, 5}, {33200, 10}},
+ 1741, 1169, 38, 37, 1), LEATHER_COWL(new int[][]{
+ {33205, 1}, {33204, 5}, {33203, 10}}, 1741, 1167, 9,
+ 18.5, 1), HARD_LEATHER_BODY(new int[][]{{10239, 1},
+ {10238, 5}, {6212, 28}}, 1743, 1131, 28, 35, 1), SNAKESKIN_BODY(
+ new int[][]{{34245, 1}, {34244, 5}, {34243, 10},
+ {34242, 28}}, 6289, 6322, 53, 55, 15), SNAKESKIN_CHAPS(
+ new int[][]{{34249, 1}, {34248, 5}, {34247, 10},
+ {34246, 28}}, 6289, 6324, 51, 50, 12), SNAKESKIN_BANDANA(
+ new int[][]{{34253, 1}, {34252, 5}, {34251, 10},
+ {34250, 28}}, 6289, 6326, 48, 45, 5), SNAKESKIN_BOOTS(
+ new int[][]{{35001, 1}, {35000, 5}, {34255, 10},
+ {34254, 28}}, 6289, 6328, 45, 30, 6), SNAKESKIN_VAMBRACES(
+ new int[][]{{35005, 1}, {35004, 5}, {35003, 10},
+ {35002, 28}}, 6289, 6330, 47, 35, 8), GREEN_DHIDE_VAMBRACES(
+ new int[][]{{34185, 1}, {34184, 5}, {34183, 10},
+ {34182, 28}}, 1745, 1065, 57, 62, 1), GREEN_DHIDE_BODY(
+ new int[][]{{34189, 1}, {34188, 5}, {34187, 10},
+ {34186, 28}}, 1745, 1135, 63, 186, 3), GREEN_DHIDE_CHAPS(
+ new int[][]{{34193, 1}, {34192, 5}, {34191, 10},
+ {34190, 28}}, 1745, 1099, 60, 124, 2), BLUE_DHIDE_VAMBRACES(
+ new int[][]{{34185, 1}, {34184, 5}, {34183, 10},
+ {34182, 28}}, 2505, 2487, 66, 70, 1), BLUE_DHIDE_BODY(
+ new int[][]{{34189, 1}, {34188, 5}, {34187, 10},
+ {34186, 28}}, 2505, 2499, 71, 210, 3), BLUE_DHIDE_CHAPS(
+ new int[][]{{34193, 1}, {34192, 5}, {34191, 10},
+ {34190, 28}}, 2505, 2493, 68, 140, 2), RED_DHIDE_VAMBRACES(
+ new int[][]{{34185, 1}, {34184, 5}, {34183, 10},
+ {34182, 28}}, 2507, 2489, 73, 78, 1), RED_DHIDE_BODY(
+ new int[][]{{34189, 1}, {34188, 5}, {34187, 10},
+ {34186, 28}}, 2507, 2501, 77, 234, 3), RED_DHIDE_CHAPS(
+ new int[][]{{34193, 1}, {34192, 5}, {34191, 10},
+ {34190, 28}}, 2507, 2495, 75, 156, 2), BLACK_DHIDE_VAMBRACES(
+ new int[][]{{34185, 1}, {34184, 5}, {34183, 10},
+ {34182, 28}}, 2509, 2491, 79, 86, 1), BLACK_DHIDE_BODY(
+ new int[][]{{34189, 1}, {34188, 5}, {34187, 10},
+ {34186, 28}}, 2509, 2503, 84, 258, 3), BLACK_DHIDE_CHAPS(
+ new int[][]{{34193, 1}, {34192, 5}, {34191, 10},
+ {34190, 28}}, 2509, 2497, 82, 172, 2);
- LEATHER_BODY(new int[][] { { 33187, 1 }, { 33186, 5 }, { 33185, 10 } },
- 1741, 1129, 14, 25, 1), LEATHER_GLOVES(new int[][] {
- { 33190, 1 }, { 33189, 5 }, { 33188, 10 } }, 1741, 1059, 1,
- 13.8, 1), LEATHER_BOOTS(new int[][] { { 33193, 1 },
- { 33192, 5 }, { 33191, 10 } }, 1741, 1061, 7, 16.25, 1), LEATHER_VAMBRACES(
- new int[][] { { 33196, 1 }, { 33195, 5 }, { 33194, 10 } }, 1741,
- 1063, 11, 22, 1), LEATHER_CHAPS(new int[][] { { 33199, 1 },
- { 33198, 5 }, { 33197, 10 } }, 1741, 1095, 18, 27, 1), LEATHER_COIF(
- new int[][] { { 33202, 1 }, { 33201, 5 }, { 33200, 10 } },
- 1741, 1169, 38, 37, 1), LEATHER_COWL(new int[][] {
- { 33205, 1 }, { 33204, 5 }, { 33203, 10 } }, 1741, 1167, 9,
- 18.5, 1), HARD_LEATHER_BODY(new int[][] { { 10239, 1 },
- { 10238, 5 }, { 6212, 28 } }, 1743, 1131, 28, 35, 1), SNAKESKIN_BODY(
- new int[][] { { 34245, 1 }, { 34244, 5 }, { 34243, 10 },
- { 34242, 28 } }, 6289, 6322, 53, 55, 15), SNAKESKIN_CHAPS(
- new int[][] { { 34249, 1 }, { 34248, 5 }, { 34247, 10 },
- { 34246, 28 } }, 6289, 6324, 51, 50, 12), SNAKESKIN_BANDANA(
- new int[][] { { 34253, 1 }, { 34252, 5 }, { 34251, 10 },
- { 34250, 28 } }, 6289, 6326, 48, 45, 5), SNAKESKIN_BOOTS(
- new int[][] { { 35001, 1 }, { 35000, 5 }, { 34255, 10 },
- { 34254, 28 } }, 6289, 6328, 45, 30, 6), SNAKESKIN_VAMBRACES(
- new int[][] { { 35005, 1 }, { 35004, 5 }, { 35003, 10 },
- { 35002, 28 } }, 6289, 6330, 47, 35, 8), GREEN_DHIDE_VAMBRACES(
- new int[][] { { 34185, 1 }, { 34184, 5 }, { 34183, 10 },
- { 34182, 28 } }, 1745, 1065, 57, 62, 1), GREEN_DHIDE_BODY(
- new int[][] { { 34189, 1 }, { 34188, 5 }, { 34187, 10 },
- { 34186, 28 } }, 1745, 1135, 63, 186, 3), GREEN_DHIDE_CHAPS(
- new int[][] { { 34193, 1 }, { 34192, 5 }, { 34191, 10 },
- { 34190, 28 } }, 1745, 1099, 60, 124, 2), BLUE_DHIDE_VAMBRACES(
- new int[][] { { 34185, 1 }, { 34184, 5 }, { 34183, 10 },
- { 34182, 28 } }, 2505, 2487, 66, 70, 1), BLUE_DHIDE_BODY(
- new int[][] { { 34189, 1 }, { 34188, 5 }, { 34187, 10 },
- { 34186, 28 } }, 2505, 2499, 71, 210, 3), BLUE_DHIDE_CHAPS(
- new int[][] { { 34193, 1 }, { 34192, 5 }, { 34191, 10 },
- { 34190, 28 } }, 2505, 2493, 68, 140, 2), RED_DHIDE_VAMBRACES(
- new int[][] { { 34185, 1 }, { 34184, 5 }, { 34183, 10 },
- { 34182, 28 } }, 2507, 2489, 73, 78, 1), RED_DHIDE_BODY(
- new int[][] { { 34189, 1 }, { 34188, 5 }, { 34187, 10 },
- { 34186, 28 } }, 2507, 2501, 77, 234, 3), RED_DHIDE_CHAPS(
- new int[][] { { 34193, 1 }, { 34192, 5 }, { 34191, 10 },
- { 34190, 28 } }, 2507, 2495, 75, 156, 2), BLACK_DHIDE_VAMBRACES(
- new int[][] { { 34185, 1 }, { 34184, 5 }, { 34183, 10 },
- { 34182, 28 } }, 2509, 2491, 79, 86, 1), BLACK_DHIDE_BODY(
- new int[][] { { 34189, 1 }, { 34188, 5 }, { 34187, 10 },
- { 34186, 28 } }, 2509, 2503, 84, 258, 3), BLACK_DHIDE_CHAPS(
- new int[][] { { 34193, 1 }, { 34192, 5 }, { 34191, 10 },
- { 34190, 28 } }, 2509, 2497, 82, 172, 2);
+ private final int[][] buttonId;
+ private final int leather, product, level, amount;
+ private final double xp;
- private final int[][] buttonId;
- private final int leather, product, level, amount;
- private final double xp;
+ private leatherData(final int[][] buttonId, final int leather,
+ final int product, final int level, final double xp,
+ final int amount) {
+ this.buttonId = buttonId;
+ this.leather = leather;
+ this.product = product;
+ this.level = level;
+ this.xp = xp;
+ this.amount = amount;
+ }
- private leatherData(final int[][] buttonId, final int leather,
- final int product, final int level, final double xp,
- final int amount) {
- this.buttonId = buttonId;
- this.leather = leather;
- this.product = product;
- this.level = level;
- this.xp = xp;
- this.amount = amount;
- }
+ public int getButtonId(final int button) {
+ for (int[] element : buttonId) {
+ if (button == element[0]) {
+ return element[0];
+ }
+ }
+ return -1;
+ }
- public int getButtonId(final int button) {
- for (int[] element : buttonId) {
- if (button == element[0]) {
- return element[0];
- }
- }
- return -1;
- }
+ public int getAmount(final int button) {
+ for (int[] element : buttonId) {
+ if (button == element[0]) {
+ return element[1];
+ }
+ }
+ return -1;
+ }
- public int getAmount(final int button) {
- for (int[] element : buttonId) {
- if (button == element[0]) {
- return element[1];
- }
- }
- return -1;
- }
+ public int getLeather() {
+ return leather;
+ }
- public int getLeather() {
- return leather;
- }
+ public int getProduct() {
+ return product;
+ }
- public int getProduct() {
- return product;
- }
+ public int getLevel() {
+ return level;
+ }
- public int getLevel() {
- return level;
- }
+ public double getXP() {
+ return xp;
+ }
- public double getXP() {
- return xp;
- }
+ public int getHideAmount() {
+ return amount;
+ }
+ }
- public int getHideAmount() {
- return amount;
- }
- }
+ public static enum cutGemData {
- public static enum cutGemData {
+ SAPPHIRE_(UNCUT_SAPPHIRE, SAPPHIRE, 20, 888, 50.0),
+ EMERALD_(UNCUT_EMERALD, EMERALD, 27, 889, 67.0),
+ RUBY_(UNCUT_RUBY, RUBY, 34, 887, 85.0),
+ DIAMOND_(UNCUT_DIAMOND, DIAMOND, 43, 886, 107.5),
+ DRAGONSTONE_(UNCUT_DRAGONSTONE, DRAGONSTONE, 55, 885, 137.5),
+ ONYX_(UNCUT_ONYX, ONYX, 67, 885, 168.0),
+ /**
+ * Need correct animation ID
+ **/
+ OPAL_(UNCUT_OPAL, OPAL, 1, 890, 12.0),
+ JADE_(UNCUT_JADE, JADE, 13, 891, 20.0),
+ RED_TOPAZ_(UNCUT_RED_TOPAZ, RED_TOPAZ, 16, 892, 25.0);
- SAPPHIRE(1623, 1607, 20, 50, 888), EMERALD(1621, 1605, 27, 67, 889), RUBY(
- 1619, 1603, 34, 85, 887), DIAMOND(1617, 1601, 43, 107.5, 886), DRAGONSTONE(
- 1631, 1615, 55, 137.5, 885), ONYX(6571, 6573, 67, 168, 885), /**
- *
- * Need correct animation ID
- **/
- OPAL(1625, 1609, 1, 12, 890), JADE(1627, 1611, 13, 20, 891), RED_TOPAZ(
- 1629, 1613, 16, 25, 892);
+ private final int uncut, cut, level, animation;
+ private final double xp;
- private final int uncut, cut, level, animation;
- private final double xp;
+ private cutGemData(final int uncut, final int cut, final int level, final int animation,
+ final double xp) {
+ this.uncut = uncut;
+ this.cut = cut;
+ this.level = level;
+ this.animation = animation;
+ this.xp = xp;
+ }
- private cutGemData(final int uncut, final int cut, final int level,
- final double xp, final int animation) {
- this.uncut = uncut;
- this.cut = cut;
- this.level = level;
- this.xp = xp;
- this.animation = animation;
- }
+ public int getUncut() {
+ return uncut;
+ }
- public int getUncut() {
- return uncut;
- }
+ public int getCut() {
+ return cut;
+ }
- public int getCut() {
- return cut;
- }
+ public int getLevel() {
+ return level;
+ }
- public int getLevel() {
- return level;
- }
+ public double getXP() {
+ return xp;
+ }
- public double getXP() {
- return xp;
- }
+ public int getAnimation() {
+ return animation;
+ }
+ }
- public int getAnimation() {
- return animation;
- }
- }
+ public static enum jewelryData {
- public static enum jewelryData {
+ RINGS(new int[][]{{2357, 1635, 5, 15}, {1607, 1637, 20, 40},
+ {1605, 1639, 27, 55}, {1603, 1641, 34, 70},
+ {1601, 1643, 43, 85}, {1615, 1645, 55, 100},
+ {6573, 6575, 67, 115}}), NECKLACE(new int[][]{
+ {2357, 1654, 6, 20}, {1607, 1656, 22, 55},
+ {1605, 1658, 29, 60}, {1603, 1660, 40, 75},
+ {1601, 1662, 56, 90}, {1615, 1664, 72, 105},
+ {6573, 6577, 82, 120}}), AMULETS(new int[][]{
+ {2357, 1673, 8, 30}, {1607, 1675, 24, 65},
+ {1605, 1677, 31, 70}, {1603, 1679, 50, 85},
+ {1601, 1681, 70, 100}, {1615, 1683, 80, 150},
+ {6573, 6579, 90, 165}});
- RINGS(new int[][] { { 2357, 1635, 5, 15 }, { 1607, 1637, 20, 40 },
- { 1605, 1639, 27, 55 }, { 1603, 1641, 34, 70 },
- { 1601, 1643, 43, 85 }, { 1615, 1645, 55, 100 },
- { 6573, 6575, 67, 115 } }), NECKLACE(new int[][] {
- { 2357, 1654, 6, 20 }, { 1607, 1656, 22, 55 },
- { 1605, 1658, 29, 60 }, { 1603, 1660, 40, 75 },
- { 1601, 1662, 56, 90 }, { 1615, 1664, 72, 105 },
- { 6573, 6577, 82, 120 } }), AMULETS(new int[][] {
- { 2357, 1673, 8, 30 }, { 1607, 1675, 24, 65 },
- { 1605, 1677, 31, 70 }, { 1603, 1679, 50, 85 },
- { 1601, 1681, 70, 100 }, { 1615, 1683, 80, 150 },
- { 6573, 6579, 90, 165 } });
+ public int[][] item;
- public int[][] item;
+ private jewelryData(final int[][] item) {
+ this.item = item;
+ }
+ }
- private jewelryData(final int[][] item) {
- this.item = item;
- }
- }
+ public static enum amuletData {
+ GOLD(GOLD_AMULET, GOLD_AMULET_1692),
+ SAPPHIRE(SAPPHIRE_AMULET, SAPPHIRE_AMULET_1694),
+ EMERALD(EMERALD_AMULET, EMERALD_AMULET_1696),
+ RUBY(RUBY_AMULET, RUBY_AMULET_1698),
+ DIAMOND(DIAMOND_AMULET, DIAMOND_AMULET_1700),
+ DRAGONSTONE(DRAGONSTONE_AMMY, DRAGONSTONE_AMMY_1702),
+ ONYX(ONYX_AMULET_6579, ONYX_AMULET_6581);
- public static enum amuletData {
- GOLD(1673, 1692), SAPPHIRE(1675, 1694), EMERALD(1677, 1696), RUBY(1679,
- 1698), DIAMOND(1681, 1700), DRAGONSTONE(1683, 1702), ONYX(6579,
- 6581);
+ private final int amuletId, product;
- private final int amuletId, product;
+ private amuletData(final int amuletId, final int product) {
+ this.amuletId = amuletId;
+ this.product = product;
+ }
- private amuletData(final int amuletId, final int product) {
- this.amuletId = amuletId;
- this.product = product;
- }
+ public int getAmuletId() {
+ return amuletId;
+ }
- public int getAmuletId() {
- return amuletId;
- }
-
- public int getProduct() {
- return product;
- }
- }
+ public int getProduct() {
+ return product;
+ }
+ }
}
diff --git a/2006Scape Server/src/main/java/com/rs2/game/items/ItemData.java b/2006Scape Server/src/main/java/com/rs2/game/items/ItemData.java
index 8e921de6..eb8603cc 100644
--- a/2006Scape Server/src/main/java/com/rs2/game/items/ItemData.java
+++ b/2006Scape Server/src/main/java/com/rs2/game/items/ItemData.java
@@ -138,13 +138,13 @@ public class ItemData {
"tunic", "blouse", "Wizard robe(g)", "Wizard robe(t)"
};
/* Fullhat covers your head but not your beard. */
- private static String[] fullhat = { "med helm", "coif", "Dharok's helm",
+ private static String[] fullhat = { "med helm", "coif", "Dharoks helm",
"hood", "Initiate helm", "Coif", "Helm of neitiznot",
"Armadyl helmet", "Berserker helm", "Archer helm", "Farseer helm",
"Warrior helm", "Void"};
/* Fullmask covers your entire head. */
- private static String[] fullmask = { "full helm(t)", "full helm(g)", "full helm", "mask", "Verac's helm",
- "Guthan's helm", "Karil's coif", "mask", "Torag's helm", "Void", "helmet",
+ private static String[] fullmask = { "full helm(t)", "full helm(g)", "full helm", "mask", "Veracs helm",
+ "Guthans helm", "Karils coif", "mask", "Torags helm", "Void", "helmet",
"sallet", "Facemask", "Bearhead"};
public static boolean isFullBody(int itemId) {