diff --git a/Server/pom.xml b/Server/pom.xml
index 188230d74..8adac8e6e 100644
--- a/Server/pom.xml
+++ b/Server/pom.xml
@@ -5,7 +5,7 @@
server
1.0.0
- rs09.Server
+ core.Server
true
1.6.21
1.6
@@ -93,6 +93,8 @@
+ src/main
+ src/test
@@ -173,8 +175,7 @@
- ${project.basedir}/src/main/kotlin
- ${project.basedir}/src/main/java
+ ${project.basedir}/src/main
@@ -258,7 +259,7 @@
exec-maven-plugin
1.2.1
- rs09.Server
+ core.Server
@@ -278,7 +279,7 @@
classname="io.gitlab.arturbosch.detekt.cli.Main"
classpathref="maven.plugin.classpath">
-
+
diff --git a/Server/src/main/java/core/game/content/global/BossKillCounter.java b/Server/src/main/content/data/BossKillCounter.java
similarity index 99%
rename from Server/src/main/java/core/game/content/global/BossKillCounter.java
rename to Server/src/main/content/data/BossKillCounter.java
index 319b0dcdb..3759a5951 100644
--- a/Server/src/main/java/core/game/content/global/BossKillCounter.java
+++ b/Server/src/main/content/data/BossKillCounter.java
@@ -1,4 +1,4 @@
-package core.game.content.global;
+package content.data;
import core.game.node.entity.player.Player;
diff --git a/Server/src/main/java/core/game/content/global/Dyes.java b/Server/src/main/content/data/Dyes.java
similarity index 96%
rename from Server/src/main/java/core/game/content/global/Dyes.java
rename to Server/src/main/content/data/Dyes.java
index 63e47122c..79c508fa8 100644
--- a/Server/src/main/java/core/game/content/global/Dyes.java
+++ b/Server/src/main/content/data/Dyes.java
@@ -1,4 +1,4 @@
-package core.game.content.global;
+package content.data;
import core.game.node.item.Item;
diff --git a/Server/src/main/kotlin/rs09/game/content/global/EnchantedJewellery.kt b/Server/src/main/content/data/EnchantedJewellery.kt
similarity index 96%
rename from Server/src/main/kotlin/rs09/game/content/global/EnchantedJewellery.kt
rename to Server/src/main/content/data/EnchantedJewellery.kt
index c91d84341..e44cd32fa 100644
--- a/Server/src/main/kotlin/rs09/game/content/global/EnchantedJewellery.kt
+++ b/Server/src/main/content/data/EnchantedJewellery.kt
@@ -1,8 +1,9 @@
-package rs09.game.content.global
+package content.data
-import api.*
-import api.events.TeleportEvent
-import core.game.content.dialogue.FacialExpression
+import content.global.skill.magic.TeleportMethod
+import content.global.skill.slayer.SlayerManager.Companion.getInstance
+import core.api.*
+import core.game.event.TeleportEvent
import core.game.node.entity.player.Player
import core.game.node.entity.player.link.TeleportManager
import core.game.node.entity.player.link.audio.Audio
@@ -12,9 +13,7 @@ import core.game.world.map.Location
import core.game.world.update.flag.context.Animation
import core.game.world.update.flag.context.Graphics
import org.rs09.consts.Items
-import rs09.game.node.entity.skill.magic.TeleportMethod
-import rs09.game.node.entity.skill.slayer.SlayerManager.Companion.getInstance
-import rs09.game.world.GameWorld.Pulser
+import core.game.world.GameWorld.Pulser
import java.util.*
/**
@@ -275,12 +274,12 @@ enum class EnchantedJewellery(
val slayerManager = getInstance(player)
if (!slayerManager.hasTask()) {
sendNPCDialogue(player, slayerManager.master!!.npc, "You need something new to hunt. Come and " +
- "see me When you can and I'll give you a new task.", FacialExpression.HALF_GUILTY)
+ "see me When you can and I'll give you a new task.", core.game.dialogue.FacialExpression.HALF_GUILTY)
return
}
sendNPCDialogue(player, slayerManager.master!!.npc, "You're currently " +
"assigned to kill ${getSlayerTaskName(player).lowercase(Locale.getDefault())}'s; " +
- "only ${getSlayerTaskKillsRemaining(player)} more to go.", FacialExpression.FRIENDLY)
+ "only ${getSlayerTaskKillsRemaining(player)} more to go.", core.game.dialogue.FacialExpression.FRIENDLY)
// Slayer tracker UI
setVarbit(player, 2502, 0, slayerManager.flags.taskFlags shr 4)
}
diff --git a/Server/src/main/java/core/game/content/global/GodBook.java b/Server/src/main/content/data/GodBook.java
similarity index 99%
rename from Server/src/main/java/core/game/content/global/GodBook.java
rename to Server/src/main/content/data/GodBook.java
index 7198cf39c..37e0adae8 100644
--- a/Server/src/main/java/core/game/content/global/GodBook.java
+++ b/Server/src/main/content/data/GodBook.java
@@ -1,4 +1,4 @@
-package core.game.content.global;
+package content.data;
import core.game.node.entity.player.Player;
import core.game.node.item.Item;
diff --git a/Server/src/main/java/core/game/content/global/GodType.java b/Server/src/main/content/data/GodType.java
similarity index 97%
rename from Server/src/main/java/core/game/content/global/GodType.java
rename to Server/src/main/content/data/GodType.java
index e202c34e4..2b8ce7e9a 100644
--- a/Server/src/main/java/core/game/content/global/GodType.java
+++ b/Server/src/main/content/data/GodType.java
@@ -1,13 +1,13 @@
-package core.game.content.global;
+package content.data;
-import core.game.content.dialogue.DialogueAction;
+import core.game.dialogue.DialogueAction;
import core.game.node.entity.player.Player;
import core.game.node.item.GroundItem;
import core.game.node.item.GroundItemManager;
import core.game.node.item.Item;
import core.game.node.scenery.Scenery;
import core.game.system.task.Pulse;
-import rs09.game.world.GameWorld;
+import core.game.world.GameWorld;
import core.game.world.map.Location;
import core.game.world.update.flag.context.Animation;
import core.tools.StringUtils;
diff --git a/Server/src/main/java/core/game/content/global/Lamps.java b/Server/src/main/content/data/Lamps.java
similarity index 98%
rename from Server/src/main/java/core/game/content/global/Lamps.java
rename to Server/src/main/content/data/Lamps.java
index 4abba5531..e4631c78b 100644
--- a/Server/src/main/java/core/game/content/global/Lamps.java
+++ b/Server/src/main/content/data/Lamps.java
@@ -1,4 +1,4 @@
-package core.game.content.global;
+package content.data;
import core.game.node.item.Item;
diff --git a/Server/src/main/java/core/game/content/global/LightSource.java b/Server/src/main/content/data/LightSource.java
similarity index 99%
rename from Server/src/main/java/core/game/content/global/LightSource.java
rename to Server/src/main/content/data/LightSource.java
index 1a8c4f7d3..118cb492f 100644
--- a/Server/src/main/java/core/game/content/global/LightSource.java
+++ b/Server/src/main/content/data/LightSource.java
@@ -1,4 +1,4 @@
-package core.game.content.global;
+package content.data;
import core.game.node.entity.player.Player;
import core.game.node.item.Item;
diff --git a/Server/src/main/java/core/game/content/global/Meat.kt b/Server/src/main/content/data/Meat.kt
similarity index 97%
rename from Server/src/main/java/core/game/content/global/Meat.kt
rename to Server/src/main/content/data/Meat.kt
index 5248986bc..714b2403a 100644
--- a/Server/src/main/java/core/game/content/global/Meat.kt
+++ b/Server/src/main/content/data/Meat.kt
@@ -1,6 +1,4 @@
-package core.game.content.global
-
-import java.util.ArrayList
+package content.data
enum class MeatState {
INEDIBLE_RAW,
diff --git a/Server/src/main/java/core/game/content/global/RepairItem.java b/Server/src/main/content/data/RepairItem.java
similarity index 98%
rename from Server/src/main/java/core/game/content/global/RepairItem.java
rename to Server/src/main/content/data/RepairItem.java
index 00ebd7a36..3ab25a4d5 100644
--- a/Server/src/main/java/core/game/content/global/RepairItem.java
+++ b/Server/src/main/content/data/RepairItem.java
@@ -1,4 +1,4 @@
-package core.game.content.global;
+package content.data;
import core.game.node.item.Item;
diff --git a/Server/src/main/java/core/game/content/consumable/Consumables.java b/Server/src/main/content/data/consumables/Consumables.java
similarity index 98%
rename from Server/src/main/java/core/game/content/consumable/Consumables.java
rename to Server/src/main/content/data/consumables/Consumables.java
index c14e32161..40c52e87e 100644
--- a/Server/src/main/java/core/game/content/consumable/Consumables.java
+++ b/Server/src/main/content/data/consumables/Consumables.java
@@ -1,397 +1,397 @@
-package core.game.content.consumable;
-
-import org.rs09.consts.Items;
-import core.game.node.entity.player.link.diary.DiaryType;
-import core.game.node.entity.state.EntityState;
-import core.game.world.update.flag.context.Animation;
-import core.game.content.consumable.effects.*;
-import core.game.node.entity.skill.Skills;
-import rs09.game.content.consumable.effects.KegOfBeerEffect;
-import rs09.game.content.consumable.effects.RestoreSummoningSpecial;
-
-import java.util.HashMap;
-
-/**
- * Represents a repository of active consumables in the framework.
- */
-public enum Consumables {
-
- /** Meats */
- COOKED_MEAT(new Food(new int[] {2142}, new HealingEffect(3))),
- SHRIMPS(new Food(new int[] {315}, new HealingEffect(3))),
- COOKED_CHICKEN(new Food(new int[] {2140}, new HealingEffect(3))),
- COOKED_RABBIT(new Food(new int[] {3228}, new HealingEffect(5))),
- ANCHOVIES(new Food(new int[] {319}, new HealingEffect(1))),
- SARDINE(new Food(new int[] {325}, new HealingEffect(4))),
- POISON_KARAMBWAN(new Food(new int[] {3146}, new PoisonKarambwanEffect())),
- UGTHANKI_MEAT(new Food(new int[] {1861}, new HealingEffect(3))),
- HERRING(new Food(new int[] {347}, new HealingEffect(5))),
- MACKEREL(new Food(new int[] {355}, new HealingEffect(6))),
- ROAST_BIRD_MEAT(new Food(new int[] {9980}, new HealingEffect(6))),
- THIN_SNAIL(new Food(new int[] {3369}, new HealingEffect(5))),
- TROUT(new Food(new int[] {333}, new HealingEffect(7))),
- SPIDER_ON_STICK(new Food(new int[] {6297, 6305}, new HealingEffect(7))),
- SPIDER_ON_SHAFT(new Food(new int[] {6299}, new HealingEffect(7))),
- ROAST_RABBIT(new Food(new int[] {7223}, new HealingEffect(7))),
- LEAN_SNAIL(new Food(new int[] {3371}, new HealingEffect(8))),
- COD(new Food(new int[] {339}, new HealingEffect(7))),
- PIKE(new Food(new int[] {351}, new HealingEffect(8))),
- ROAST_BEAST_MEAT(new Food(new int[] {9988}, new HealingEffect(8))),
- COOKED_CRAB_MEAT(new Food(new int[] {7521, 7523, 7524, 7525, 7526}, new HealingEffect(2))),
- FAT_SNAIL(new Food(new int[] {3373}, new HealingEffect(9))),
- SALMON(new Food(new int[] {329}, new HealingEffect(9))),
- SLIMY_EEL(new Food(new int[] {3381}, new HealingEffect(6))),
- TUNA(new Food(new int[] {361}, new HealingEffect(10))),
- COOKED_KARAMBWAN(new Food(new int[] {3144}, new HealingEffect(18))),
- COOKED_CHOMPY(new Food(new int[] {2878}, new HealingEffect(10))),
- RAINBOW_FISH(new Food(new int[] {10136}, new HealingEffect(11))),
- CAVE_EEL(new Food(new int[] {5003}, new HealingEffect(7))),
- LOBSTER(new Food(new int[] {379}, new HealingEffect(12))),
- COOKED_JUBBLY(new Food(new int[] {7568}, new HealingEffect(15))),
- BASS(new Food(new int[] {365}, new HealingEffect(13))),
- SWORDFISH(new Food(new int[] {373}, new HealingEffect(14))),
- LAVA_EEL(new Food(new int[] {2149}, new HealingEffect(14))),
- MONKFISH(new Food(new int[] {7946}, new HealingEffect(16))),
- SHARK(new Food(new int[] {385}, new HealingEffect(20))),
- SEA_TURTLE(new Food(new int[] {397}, new HealingEffect(21))),
- MANTA_RAY(new Food(new int[] {391}, new HealingEffect(22))),
- KARAMBWANJI(new Food(new int[] {3151}, new HealingEffect(3))),
- STUFFED_SNAKE(new Food(new int[] {7579}, new HealingEffect(20), "You eat the stuffed snake-it's quite a meal! It tastes like chicken.")),
- CRAYFISH(new Food(new int[] {13433}, new HealingEffect(2))),
- GIANT_FROG_LEGS(new Food(new int [] {4517}, new HealingEffect(6))),
-
- /** Breads */
- BREAD(new Food(new int[] {2309}, new HealingEffect(5))),
- BAGUETTE(new Food(new int[] {6961}, new HealingEffect(6))),
-
- /** Sandwiches */
- TRIANGLE_SANDWICH(new Food(new int[] {6962}, new HealingEffect(6))),
- SQUARE_SANDWICH(new Food(new int[] {6965}, new HealingEffect(6))),
- SEAWEED_SANDWICH(new FakeConsumable(3168, new String[] {"You really, really do not want to eat that."})),
- FROGBURGER(new Food(new int[] {10962}, new HealingEffect(2))),
-
- /** Kebabs */
- UGTHANKI_KEBAB(new Food(new int[] {1883}, new UgthankiKebabEffect())),
- UGTHANKI_KEBAB_SMELLING(new Food(new int[] {1885}, new SmellingUgthankiKebabEffect())),
- KEBAB(new Food(new int[] {1971}, new KebabEffect())),
- SUPER_KEBAB(new Food(new int[] {4608}, new SuperKebabEffect())),
-
- /** Pies */
- REDBERRY_PIE(new HalfableFood(new int[] {2325, 2333, 2313}, new HealingEffect(5))),
- MEAT_PIE(new HalfableFood(new int[] {2327, 2331, 2313}, new HealingEffect(6))),
- APPLE_PIE(new HalfableFood(new int[] {2323, 2335, 2313}, new HealingEffect(7))),
- GARDEN_PIE(new HalfableFood(new int[] {7178, 7180, 2313}, new MultiEffect(new HealingEffect(6), new SkillEffect(Skills.FARMING, 3, 0)))),
- FISH_PIE(new HalfableFood(new int[] {7188, 7190, 2313}, new MultiEffect(new HealingEffect(6), new SkillEffect(Skills.FISHING, 3, 0)))),
- ADMIRAL_PIE(new HalfableFood(new int[] {7198, 7200, 2313}, new MultiEffect(new HealingEffect(8), new SkillEffect(Skills.FISHING, 5, 0)))),
- WILD_PIE(new HalfableFood(new int[] {7208, 7210, 2313}, new MultiEffect(new SkillEffect(Skills.SLAYER, 5, 0), new SkillEffect(Skills.RANGE, 4, 0), new HealingEffect(11)))),
- SUMMER_PIE(new HalfableFood(new int[] {7218, 7220, 2313}, new MultiEffect(new HealingEffect(11), new SkillEffect(Skills.AGILITY, 5, 0), new EnergyEffect(10)))),
-
- /** Stews */
- STEW(new Food(new int[] {2003, 1923}, new HealingEffect(11))),
- SPICY_STEW(new Food(new int[] {7479, 1923}, new HealingEffect(11))),
- CURRY(new Food(new int[] {2011, 1923}, new HealingEffect(19))),
- BANANA_STEW(new Food(new int[] {4016, 1923}, new HealingEffect(11))),
-
- /** Pizzas */
- PLAIN_PIZZA(new HalfableFood(new int[] {2289, 2291}, new HealingEffect(7))),
- MEAT_PIZZA(new HalfableFood(new int[] {2293, 2295}, new HealingEffect(8))),
- ANCHOVY_PIZZA(new HalfableFood(new int[] {2297, 2299}, new HealingEffect(9))),
- PINEAPPLE_PIZZA(new HalfableFood(new int[] {2301, 2303}, new HealingEffect(11))),
-
- /** Cakes */
- CAKE(new Cake(new int[] {1891, 1893, 1895}, new HealingEffect(4), "You eat part of the cake.", "You eat some more cake.", "You eat the slice of cake.")),
- CHOCOLATE_CAKE(new Cake(new int[] {1897, 1899, 1901}, new HealingEffect(5), "You eat part of the chocolate cake.", "You eat some more of the chocolate cake.", "You eat the slice of cake.")),
- ROCK_CAKE(new Food(new int[] {2379}, new RockCakeEffect(), "The rock cake resists all attempts to eat it.")),
- DWARVEN_ROCK_CAKE(new Food(new int[] {7510, 7510}, new DwarvenRockCakeEffect(), "Ow! You nearly broke a tooth!", "The rock cake resists all attempts to eat it.")),
- HOT_DWARVEN_ROCK_CAKE(new Food(new int[] {7509, 7509}, new DwarvenRockCakeEffect(), "Ow! You nearly broke a tooth!", "The rock cake resists all attempts to eat it.")),
- COOKED_FISHCAKE(new Food(new int[] {7530}, new HealingEffect(11))),
- MINT_CAKE(new Food(new int[] {9475}, new EnergyEffect(50))),
-
- /** Vegetables */
- POTATO(new Food(new int[] {1942}, new HealingEffect(1))),
- BAKED_POTATO(new Food(new int[] {6701}, new HealingEffect(2))),
- SPICY_SAUCE(new Food(new int[] {7072, 1923}, new HealingEffect(2))),
- CHILLI_CON_CARNE(new Food(new int[] {7062, 1923}, new HealingEffect(5))),
- SCRAMBLED_EGG(new Food(new int[] {7078, 1923}, new HealingEffect(5))),
- EGG_AND_TOMATO(new Food(new int[] {7064, 1923}, new HealingEffect(8))),
- SWEET_CORN(new Food(new int[] {5988}, new MultiEffect(new HealingEffect(1), new PercentageHealthEffect(10)))),
- SWEETCORN_BOWL(new Food(new int[] {7088, 1923}, new MultiEffect(new HealingEffect(1), new PercentageHealthEffect(10)))),
- POTATO_WITH_BUTTER(new Food(new int[] {6703}, new HealingEffect(7))),
- CHILLI_POTATO(new Food(new int[] {7054}, new HealingEffect(14))),
- FRIED_ONIONS(new Food(new int[] {7084, 1923}, new HealingEffect(5))),
- FRIED_MUSHROOMS(new Food(new int[] {7082, 1923}, new HealingEffect(5))),
- POTATO_WITH_CHEESE(new Food(new int[] {6705}, new HealingEffect(16))),
- EGG_POTATO(new Food(new int[] {7056}, new HealingEffect(11))),
- MUSHROOMS_AND_ONIONS(new Food(new int[] {7066, 1923}, new HealingEffect(11))),
- MUSHROOM_POTATO(new Food(new int[] {7058}, new HealingEffect(20))),
- TUNA_AND_CORN(new Food(new int[] {7068, 1923}, new HealingEffect(13))),
- TUNA_POTATO(new Food(new int[] {7060}, new HealingEffect(22))),
- ONION(new Food(new int[] {1957}, new HealingEffect(2), "It's always sad to see a grown man/woman cry.")),
- CABBAGE(new Food(new int[] {1965}, new HealingEffect(2), "You eat the cabbage. Yuck!")),
- DRAYNOR_CABBAGE(new Food(new int[] {1967}, new DraynorCabbageEffect(), "You eat the cabbage.", "It seems to taste nicer than normal.")),
- EVIL_TURNIP(new Food(new int[] {12134, 12136, 12138}, new HealingEffect(6))),
- SPINACH_ROLL(new Food(new int[] {1969}, new HealingEffect(2))),
-
- /** Dairies */
- POT_OF_CREAM(new Food(new int[] {2130}, new HealingEffect(1))),
- CHEESE(new Food(new int[] {1985}, new HealingEffect(2))),
- CHOCOLATEY_MILK(new Drink(new int[] {1977, 1925}, new HealingEffect(4))),
-
- /** Fruits */
- BANANA(new Food(new int[] {1963}, new HealingEffect(2))),
- SLICED_BANANA(new Food(new int[] {3162}, new HealingEffect(2))),
- RED_BANANA(new Food(new int[] {7572}, new HealingEffect(5), "You eat the red banana. It's tastier than your average banana.")),
- SLICED_RED_BANANA(new Food(new int[] {7574}, new HealingEffect(5), "You eat the sliced red banana. Yum.")),
- ORANGE(new Food(new int[] {2108}, new HealingEffect(2))),
- ORANGE_CHUNKS(new Food(new int[] {2110}, new HealingEffect(2))),
- ORANGE_SLICES(new Food(new int[] {2112}, new HealingEffect(2))),
- PAPAYA_FRUIT(new Food(new int[] {5972}, new HealingEffect(2))),
- TENTI_PINEAPPLE(new FakeConsumable(1851, new String[] {"Try using a knife to slice it into pieces."})),
- PINEAPPLE(new FakeConsumable(2114, new String[] {"Try using a knife to slice it into pieces."})),
- PINEAPPLE_CHUNKS(new Food(new int[] {2116}, new HealingEffect(2))),
- PINEAPPLE_RING(new Food(new int[] {2118}, new HealingEffect(2))),
- DWELLBERRIES(new Food(new int[] {2126}, new HealingEffect(2))),
- JANGERBERRIES(new Food(new int[] {247}, new MultiEffect(new SkillEffect(Skills.ATTACK, 2, 0), new SkillEffect(Skills.STRENGTH, 1, 0), new PrayerEffect(1, 0), new SkillEffect(Skills.DEFENCE, -1, 0)))),
- STRAWBERRY(new Food(new int[] {5504}, new MultiEffect(new HealingEffect(1), new PercentageHealthEffect(6)))),
- TOMATO(new Food(new int[] {1982}, new HealingEffect(2))),
- WATERMELON(new FakeConsumable(5982, new String[] {"Try using a knife to slice it into pieces."})),
- WATERMELON_SLICE(new Food(new int[] {5984}, new PercentageHealthEffect(5))),
- LEMON(new Food(new int[] {2102}, new HealingEffect(2))),
- LEMON_CHUNKS(new Food(new int[] {2104}, new HealingEffect(2))),
- LEMON_SLICES(new Food(new int[] {2106}, new HealingEffect(2))),
- LIME(new Food(new int[] {2120}, new HealingEffect(2))),
- LIME_CHUNKS(new Food(new int[] {2122}, new HealingEffect(2))),
- LIME_SLICES(new Food(new int[] {2124}, new HealingEffect(2))),
- PEACH(new Food(new int[] {6883}, new HealingEffect(8))),
- WHITE_TREE_FRUIT(new Food(new int[] {6469}, new MultiEffect(new RandomEnergyEffect(5, 10), new HealingEffect(3)))),
- STRANGE_FRUIT(new Food(new int[] {464}, new MultiEffect(new RemoveStateEffect(EntityState.POISONED.ordinal()), new EnergyEffect(30)))),
-
- /** Gnome Cooking */
- TOAD_CRUNCHIES(new Food(new int[] {2217}, new HealingEffect(12))),
- PREMADE_TD_CRUNCH(new Food(new int[] {2243}, new HealingEffect(12))),
- SPICY_CRUNCHIES(new Food(new int[] {2213}, new HealingEffect(7))),
- PREMADE_SY_CRUNCH(new Food(new int[] {2241}, new HealingEffect(7))),
- WORM_CRUNCHIES(new Food(new int[] {2205}, new HealingEffect(8))),
- PREMADE_WM_CRUNC(new Food(new int[] {2237}, new HealingEffect(8))),
- CHOCCHIP_CRUNCHIES(new Food(new int[] {2209}, new HealingEffect(7))),
- PREMADE_CH_CRUNCH(new Food(new int[] {2239}, new HealingEffect(7))),
- FRUIT_BATTA(new Food(new int[] {2277}, new HealingEffect(11))),
- PREMADE_FRT_BATTA(new Food(new int[] {2225}, new HealingEffect(11))),
- TOAD_BATTA(new Food(new int[] {2255}, new HealingEffect(11))),
- PREMADE_TD_BATTA(new Food(new int[] {2221}, new HealingEffect(11))),
- WORM_BATTA(new Food(new int[] {2253}, new HealingEffect(11))),
- PREMADE_WM_BATTA(new Food(new int[] {2219}, new HealingEffect(11))),
- VEGETABLE_BATTA(new Food(new int[] {2281}, new HealingEffect(11))),
- PREMADE_VEG_BATTA(new Food(new int[] {2227}, new HealingEffect(11))),
- CHEESE_AND_TOMATOES_BATTA(new Food(new int[] {2259}, new HealingEffect(11))),
- PREMADE_CT_BATTA(new Food(new int[] {2223}, new HealingEffect(11))),
- WORM_HOLE(new Food(new int[] {2191}, new HealingEffect(12))),
- PREMADE_WORM_HOLE(new Food(new int[] {2233}, new HealingEffect(12))),
- VEG_BALL(new Food(new int[] {2195}, new HealingEffect(12))),
- PREMADE_VEG_BALL(new Food(new int[] {2235}, new HealingEffect(12))),
- TANGLED_TOADS_LEGS(new Food(new int[] {2187}, new HealingEffect(15))),
- PREMADE_TTL(new Food(new int[] {2231}, new HealingEffect(15))),
- CHOCOLATE_BOMB(new Food(new int[] {2195}, new HealingEffect(15))),
- PREMADE_CHOC_BOMB(new Food(new int[] {2229}, new HealingEffect(15))),
- TOAD_LEGS(new Food(new int[] {2152}, new HealingEffect(3))),
- KING_WORM(new Food(new int[] {2162}, new HealingEffect(2))),
-
- /** Ales */
- ASGOLDIAN_ALE(new FakeConsumable(7508, new String[] {"I don't think I'd like gold in beer thanks. Leave it for the dwarves."})),
- ASGARNIAN_ALE(new Drink(new int[] {1905, 1919}, new MultiEffect(new HealingEffect(2), new SkillEffect(Skills.STRENGTH, 2, 0), new SkillEffect(Skills.ATTACK, -4, 0)), "You drink the ale. You feel slightly reinvigorated...", "...and slightly dizzy too.")),
- ASGARNIAN_ALE_KEG(new Drink(new int[] {5785, 5783, 5781, 5779, 5769}, new MultiEffect(new SkillEffect(Skills.STRENGTH, 2, 0), new SkillEffect(Skills.ATTACK, -4, 0)), new Animation(2289), "You drink the ale. You feel slightly reinvigorated...", "...and slightly dizzy too.")),
- ASGARNIAN_ALE_M(new Drink(new int[] {5739, 1919}, new MultiEffect(new SkillEffect(Skills.STRENGTH, 3, 0), new SkillEffect(Skills.ATTACK, -6, 0)))),
- ASGARNIAN_ALE_M_KEG(new Drink(new int[] {5865, 5863, 5861, 5859, 5769}, new MultiEffect(new SkillEffect(Skills.STRENGTH, 3, 0), new SkillEffect(Skills.ATTACK, -6, 0)), new Animation(2289))),
- AXEMANS_FOLLY(new Drink(new int[] {5751, 1919}, new MultiEffect(new SkillEffect(Skills.WOODCUTTING, 1, 0), new HealingEffect(1), new SkillEffect(Skills.STRENGTH, -3, 0), new SkillEffect(Skills.ATTACK, -3, 0)))),
- AXEMANS_FOLLY_KEG(new Drink(new int[] {5825, 5823, 5821, 5819, 5769}, new MultiEffect(new SkillEffect(Skills.WOODCUTTING, 1, 0), new HealingEffect(1), new SkillEffect(Skills.STRENGTH, -3, 0), new SkillEffect(Skills.ATTACK, -3, 0)), new Animation(2289))),
- AXEMANS_FOLLY_M(new Drink(new int[] {5753, 1919}, new MultiEffect(new SkillEffect(Skills.WOODCUTTING, 2, 0), new HealingEffect(2), new SkillEffect(Skills.STRENGTH, -4, 0), new SkillEffect(Skills.ATTACK, -4, 0)))),
- AXEMANS_FOLLY_M_KEG(new Drink(new int[] {5905, 5903, 5901, 5899, 5769}, new MultiEffect(new SkillEffect(Skills.WOODCUTTING, 2, 0), new HealingEffect(2), new SkillEffect(Skills.STRENGTH, -4, 0), new SkillEffect(Skills.ATTACK, -4, 0)), new Animation(2289))),
- BANDITS_BREW(new Drink(new int[] {4627, 1919}, new MultiEffect(new SkillEffect(Skills.THIEVING, 1, 0), new SkillEffect(Skills.ATTACK, 1, 0), new SkillEffect(Skills.STRENGTH, -1, 0), new SkillEffect(Skills.DEFENCE, -6, 0), new HealingEffect(1)), "You drink the beer. You feel slightly reinvigorated...", "...and slightly dizzy too.")),
- BEER(new Drink(new int[] {1917, 1919}, new MultiEffect(new HealingEffect(1), new SkillEffect(Skills.STRENGTH, 0, 0.04), new SkillEffect(Skills.ATTACK, 0, -0.07)), "You drink the beer. You feel slightly reinvigorated...", "...and slightly dizzy too.")),
- BEER_TANKARD(new Drink(new int[] {3803, 3805}, new MultiEffect(new SkillEffect(Skills.ATTACK, -9, 0), new SkillEffect(Skills.STRENGTH, 4, 0)), "You quaff the beer. You feel slightly reinvigorated...", "...but very dizzy too.")),
- KEG_OF_BEER(new Drink(new int[] {3801}, new KegOfBeerEffect(), new Animation(1330), "You chug the keg. You feel reinvigorated...", "...but extremely drunk too.")),
- CHEFS_DELIGHT(new Drink(new int[] {5755, 1919}, new MultiEffect(new SkillEffect(Skills.COOKING, 1, 0.05), new HealingEffect(1), new SkillEffect(Skills.ATTACK, -2, 0), new SkillEffect(Skills.STRENGTH, -2, 0)))),
- CHEFS_DELIGHT_KEG(new Drink(new int[] {5833, 5831, 5829, 5827, 5769}, new MultiEffect(new SkillEffect(Skills.COOKING, 1, 0.05), new HealingEffect(1), new SkillEffect(Skills.ATTACK, -2, 0), new SkillEffect(Skills.STRENGTH, -2, 0)), new Animation(2289))),
- CHEFS_DELIGHT_M(new Drink(new int[] {5757, 1919}, new MultiEffect(new SkillEffect(Skills.COOKING, 2, 0.05), new HealingEffect(2), new SkillEffect(Skills.ATTACK, -3, 0), new SkillEffect(Skills.STRENGTH, -3, 0)))),
- CHEFS_DELIGHT_M_KEG(new Drink(new int[] {5913, 5911, 5909, 5907, 5769}, new MultiEffect(new SkillEffect(Skills.COOKING, 2, 0.05), new HealingEffect(2), new SkillEffect(Skills.ATTACK, -3, 0), new SkillEffect(Skills.STRENGTH, -3, 0)), new Animation(2289))),
- CIDER(new Drink(new int[] {5763, 1919}, new MultiEffect(new MultiEffect(new HealingEffect(2), new SkillEffect(Skills.FARMING, 1, 0), new SkillEffect(Skills.ATTACK, -2, 0), new SkillEffect(Skills.STRENGTH, -2, 0))))),
- CIDER_KEG(new Drink(new int[] {5849, 5847, 5845, 5843, 5769}, new MultiEffect(new MultiEffect(new HealingEffect(2), new SkillEffect(Skills.FARMING, 1, 0), new SkillEffect(Skills.ATTACK, -2, 0), new SkillEffect(Skills.STRENGTH, -2, 0))), new Animation(2289))),
- MATURE_CIDER(new Drink(new int[] {5765, 1919}, new MultiEffect(new MultiEffect(new HealingEffect(2), new SkillEffect(Skills.FARMING, 2, 0), new SkillEffect(Skills.ATTACK, -5, 0), new SkillEffect(Skills.STRENGTH, -5, 0))))),
- CIDER_M_KEG(new Drink(new int[] {5929, 5927, 5925, 5923, 5769}, new MultiEffect(new MultiEffect(new HealingEffect(2), new SkillEffect(Skills.FARMING, 2, 0), new SkillEffect(Skills.ATTACK, -5, 0), new SkillEffect(Skills.STRENGTH, -5, 0))), new Animation(2289))),
- DRAGON_BITTER(new Drink(new int[] {1911, 1919}, new MultiEffect(new HealingEffect(1), new SkillEffect(Skills.STRENGTH, 2, 0), new SkillEffect(Skills.ATTACK, -4, 0)))),
- DRAGON_BITTER_KEG(new Drink(new int[] {5809, 5807, 5805, 5803, 5769}, new MultiEffect(new HealingEffect(1), new SkillEffect(Skills.STRENGTH, 2, 0), new SkillEffect(Skills.ATTACK, -4, 0)), new Animation(2289))),
- DRAGON_BITTER_M(new Drink(new int[] {5745, 1919}, new MultiEffect(new HealingEffect(2), new SkillEffect(Skills.STRENGTH, 3, 0), new SkillEffect(Skills.ATTACK, -6, 0)))),
- DRAGON_BITTER_M_KEG(new Drink(new int[] {5889, 5887, 5885, 5883, 5769}, new MultiEffect(new HealingEffect(2), new SkillEffect(Skills.STRENGTH, 3, 0), new SkillEffect(Skills.ATTACK, -6, 0)), new Animation(2289))),
- DWARVEN_STOUT(new Drink(new int[] {1913, 1919}, new MultiEffect(new SkillEffect(Skills.MINING, 1, 0), new SkillEffect(Skills.SMITHING, 1 ,0), new SkillEffect(Skills.ATTACK, -2, 0), new SkillEffect(Skills.STRENGTH, -2, 0), new SkillEffect(Skills.DEFENCE, -2, 0), new HealingEffect(1)), "You drink the Dwarven Stout. It tastes foul.", "It tastes pretty strong too.")),
- DWARVEN_STOUT_KEG(new Drink(new int[] {5777, 5775, 5773, 5771, 5769}, new MultiEffect(new SkillEffect(Skills.MINING, 1, 0), new SkillEffect(Skills.SMITHING, 1 ,0), new SkillEffect(Skills.ATTACK, -2, 0), new SkillEffect(Skills.STRENGTH, -2, 0), new SkillEffect(Skills.DEFENCE, -2, 0), new HealingEffect(1)), new Animation(2289), "You drink the Dwarven Stout. It tastes foul.", "It tastes pretty strong too.")),
- DWARVEN_STOUT_M(new Drink(new int[] {5747, 1919}, new MultiEffect(new SkillEffect(Skills.MINING, 2, 0), new SkillEffect(Skills.SMITHING, 2 ,0), new SkillEffect(Skills.ATTACK, -7, 0), new SkillEffect(Skills.STRENGTH, -7, 0), new SkillEffect(Skills.DEFENCE, -7, 0), new HealingEffect(1)))),
- DWARVEN_STOUT_M_KEG(new Drink(new int[] {5857, 5855, 5853, 5851, 5769}, new MultiEffect(new SkillEffect(Skills.MINING, 2, 0), new SkillEffect(Skills.SMITHING, 2 ,0), new SkillEffect(Skills.ATTACK, -7, 0), new SkillEffect(Skills.STRENGTH, -7, 0), new SkillEffect(Skills.DEFENCE, -7, 0), new HealingEffect(1)), new Animation(2289))),
- GREENMANS_ALE(new Drink(new int[] {1909, 1919}, new MultiEffect(new HealingEffect(1), new SkillEffect(Skills.HERBLORE, 1, 0), new SkillEffect(Skills.ATTACK, -3, 0), new SkillEffect(Skills.STRENGTH, -3, 0), new SkillEffect(Skills.DEFENCE, -3, 0)))),
- GREENMANS_ALE_KEG(new Drink(new int[] {5793, 5791, 5789, 5787, 5769}, new MultiEffect(new HealingEffect(1), new SkillEffect(Skills.HERBLORE, 1, 0), new SkillEffect(Skills.ATTACK, -3, 0), new SkillEffect(Skills.STRENGTH, -3, 0), new SkillEffect(Skills.DEFENCE, -3, 0)), new Animation(2289))),
- GREENMANS_ALE_M(new Drink(new int[] {5743, 1919}, new MultiEffect(new HealingEffect(1), new SkillEffect(Skills.HERBLORE, 2, 0), new SkillEffect(Skills.ATTACK, -2, 0), new SkillEffect(Skills.STRENGTH, -2, 0)))),
- GREENMANS_ALE_M_KEG(new Drink(new int[] {5873, 5871, 5869, 5867, 5769}, new MultiEffect(new HealingEffect(1), new SkillEffect(Skills.HERBLORE, 2, 0), new SkillEffect(Skills.ATTACK, -2, 0), new SkillEffect(Skills.STRENGTH, -2, 0)), new Animation(2289))),
- GROG(new Drink(new int[] {1915, 1919}, new MultiEffect(new SkillEffect(Skills.STRENGTH, 3, 0), new SkillEffect(Skills.ATTACK, -6, 0)))),
- MOONLIGHT_MEAD(new Drink(new int[] {2955, 1919}, new HealingEffect(4), "It tastes like something just died in your mouth.")),
- MOONLIGHT_MEAD_KEG(new Drink(new int[] {5817, 5815, 5813, 5811, 5769}, new HealingEffect(4), new Animation(2289), "It tastes like something just died in your mouth.")),
- MOONLIGHT_MEAD_M(new Drink(new int[] {5749, 1919}, new HealingEffect(6))),
- MOONLIGHT_MEAD_M_KEG(new Drink(new int[] {5897, 5895, 5893, 5891, 5769}, new HealingEffect(6), new Animation(2289))),
- SLAYERS_RESPITE(new Drink(new int[] {5759, 1919}, new MultiEffect(new HealingEffect(1), new SkillEffect(Skills.SLAYER, 2, 0), new SkillEffect(Skills.ATTACK, -2, 0), new SkillEffect(Skills.STRENGTH, -2, 0)))),
- SLAYERS_RESPITE_KEG(new Drink(new int[] {5841, 5839, 5837, 5835, 5769}, new MultiEffect(new HealingEffect(1), new SkillEffect(Skills.SLAYER, 2, 0), new SkillEffect(Skills.ATTACK, -2, 0), new SkillEffect(Skills.STRENGTH, -2, 0)), new Animation(2289))),
- SLAYERS_RESPITE_M(new Drink(new int[] {5761, 1919}, new MultiEffect(new HealingEffect(1), new SkillEffect(Skills.SLAYER, 4, 0), new SkillEffect(Skills.ATTACK, -2, 0), new SkillEffect(Skills.STRENGTH, -2, 0)))),
- SLAYERS_RESPITE_M_KEG(new Drink(new int[] {5841, 5839, 5837, 5835, 5769}, new MultiEffect(new HealingEffect(1), new SkillEffect(Skills.SLAYER, 4, 0), new SkillEffect(Skills.ATTACK, -2, 0), new SkillEffect(Skills.STRENGTH, -2, 0)), new Animation(2289))),
- WIZARDS_MIND_BOMB(new Drink(new int[] {1907, 1919}, new WizardsMindBombEffect(), "You drink the Wizard's Mind Bomb.", "You feel very strange.")),
- MATURE_WMB(new Drink(new int[] {5741, 1919}, new MatureWmbEffect())),
-
- /** Cocktails */
- FRUIT_BLAST(new Drink(new int[] {2084, 2026}, new HealingEffect(9))),
- PREMADE_FR_BLAST(new Food(new int[] {2034, 2026}, new HealingEffect(9))),
- PINEAPPLE_PUNCH(new Drink(new int[] {2048, 2026}, new HealingEffect(9), "You drink the cocktail. It tastes great.")),
- PREMADE_P_PUNCH(new Drink(new int[] {2036, 2026}, new HealingEffect(9), "You drink the cocktail. It tastes great.")),
- WIZARD_BLIZZARD(new Drink(new int[] {2054, 2026}, new MultiEffect(new HealingEffect(5), new SkillEffect(Skills.STRENGTH, 6, 0), new SkillEffect(Skills.ATTACK, -4, 0)))),
- PREMADE_WIZ_BLZD(new Drink(new int[] {2040, 2026}, new MultiEffect(new HealingEffect(5), new SkillEffect(Skills.STRENGTH, 6, 0), new SkillEffect(Skills.ATTACK, -4, 0)))),
- SHORT_GREEN_GUY(new Drink(new int[] {2080, 2026}, new MultiEffect(new HealingEffect(5), new SkillEffect(Skills.STRENGTH, 4, 0), new SkillEffect(Skills.ATTACK, -3, 0)))),
- PREMADE_SGG(new Drink(new int[] {2038, 2026}, new MultiEffect(new HealingEffect(5), new SkillEffect(Skills.STRENGTH, 4, 0), new SkillEffect(Skills.ATTACK, -3, 0)))),
- DRUNK_DRAGON(new Drink(new int[] {2092, 2026}, new MultiEffect(new HealingEffect(5), new SkillEffect(Skills.STRENGTH, 7, 0), new SkillEffect(Skills.ATTACK, -4, 0)))),
- PREMADE_DR_DRAGON(new Drink(new int[] {2032, 2026}, new MultiEffect(new HealingEffect(5), new SkillEffect(Skills.STRENGTH, 7, 0), new SkillEffect(Skills.ATTACK, -4, 0)))),
- CHOC_SATURDAY(new Drink(new int[] {2074, 2026}, new MultiEffect(new HealingEffect(5), new SkillEffect(Skills.STRENGTH, 7, 0), new SkillEffect(Skills.ATTACK, -4, 0)))),
- PREMADE_CHOC_SDY(new Drink(new int[] {2030, 2026}, new MultiEffect(new HealingEffect(5), new SkillEffect(Skills.STRENGTH, 7, 0), new SkillEffect(Skills.ATTACK, -4, 0)))),
- BLURBERRY_SPECIAL(new Drink(new int[] {2064, 2026}, new MultiEffect(new HealingEffect(6), new SkillEffect(Skills.STRENGTH, 6, 0), new SkillEffect(Skills.ATTACK, -4, 0)))),
- PREMADE_BLURB_SP(new Drink(new int[] {2028, 2026}, new MultiEffect(new HealingEffect(6), new SkillEffect(Skills.STRENGTH, 6, 0), new SkillEffect(Skills.ATTACK, -4, 0)))),
-
- /** Bottled Drinks */
- KARAMJAN_RUM(new Drink(new int[] {431}, new MultiEffect(new HealingEffect(5), new SkillEffect(Skills.STRENGTH, 5, 0), new SkillEffect(Skills.ATTACK, -4, 0)))),
- BRAINDEATH_RUM(new Drink(new int[] {7157}, new MultiEffect(new SkillEffect(Skills.DEFENCE, 0, -0.1), new SkillEffect(Skills.ATTACK, 0, -0.05), new SkillEffect(Skills.PRAYER, 0, -0.05), new SkillEffect(Skills.RANGE, 0, -0.05), new SkillEffect(Skills.MAGIC, 0, -0.05), new SkillEffect(Skills.HERBLORE, 0, -0.05), new SkillEffect(Skills.STRENGTH, 3, 0), new SkillEffect(Skills.MINING, 1, 0)), "With a sense of impending doom you drink the 'rum'. You try very hard not to die.")),
- RUM_TROUBLE_BREWING_RED(new Drink(new int[] {8940, 8940}, new TroubleBrewingRumEffect("Oh gods! It tastes like burning!"), new Animation(9605))),
- RUM_TROUBLE_BREWING_BLUE(new Drink(new int[] {8941, 8941}, new TroubleBrewingRumEffect("My Liver! My Liver is melting!"), new Animation(9604))),
- VODKA(new Drink(new int[] {2015}, new MultiEffect(new SkillEffect(Skills.STRENGTH, 3, 0), new SkillEffect(Skills.ATTACK, -3, 0)))),
- GIN(new Drink(new int[] {2019}, new MultiEffect(new SkillEffect(Skills.STRENGTH, 1, 0), new SkillEffect(Skills.ATTACK, 4, 0), new RandomHealthEffect(3, 4)))),
- BRANDY(new Drink(new int[] {2021}, new MultiEffect(new HealingEffect(5), new SkillEffect(Skills.ATTACK, 4, 0)))),
- WHISKY(new Drink(new int[] {2017}, new MultiEffect(new HealingEffect(5), new SkillEffect(Skills.STRENGTH, 3, 0), new SkillEffect(Skills.ATTACK, -4, 0)))),
- BOTTLE_OF_WINE(new Drink(new int[] {2015, 7921}, new MultiEffect(new HealingEffect(14), new SkillEffect(Skills.ATTACK, -3, 0)))),
-
- /** Wine */
- JUG_OF_WINE(new Drink(new int[] {1993, 1935}, new MultiEffect(new HealingEffect(11), new SkillEffect(Skills.ATTACK, -2, 0)))),
- HALF_FULL_WINE_JUG(new Drink(new int[] {1989, 1935}, new HealingEffect(7))),
-
- /** Tea */
- CUP_OF_TEA(new Drink(new int[] {712, 1980}, new MultiEffect(new HealingEffect(3), new SkillEffect(Skills.ATTACK, 3, 0)), "Aaah, nothing like a nice cuppa tea!")),
- CUP_OF_TEA_NETTLE(new Drink(new int[] {4242, 1980}, new EnergyEffect(10))),
- CUP_OF_TEA_MILKY_NETTLE(new Drink(new int[] {4243, 1980}, new EnergyEffect(10))),
- NETTLE_TEA(new Drink(new int[] {4239, 1980}, new NettleTeaEffect())),
- NETTLE_TEA_MILKY(new Drink(new int[] {4240, 1980}, new NettleTeaEffect())),
- CUP_OF_TEA_CLAY(new Drink(new int[] {7730, 7728}, new SkillEffect(Skills.CONSTRUCTION, 1, 0), "You feel refreshed and ready for more building.")),
- CUP_OF_TEA_CLAY_MILKY(new Drink(new int[] {7731, 7728}, new SkillEffect(Skills.CONSTRUCTION, 1, 0))),
- CUP_OF_TEA_WHITE(new Drink(new int[] {7733, 7732}, new SkillEffect(Skills.CONSTRUCTION, 2, 0), "You feel refreshed and ready for more building.")),
- CUP_OF_TEA_WHITE_MILKY(new Drink(new int[] {7734, 7732}, new SkillEffect(Skills.CONSTRUCTION, 2, 0))),
- CUP_OF_TEA_GOLD(new Drink(new int[] {7736, 7735}, new SkillEffect(Skills.CONSTRUCTION, 3, 0), "You feel refreshed and ready for more building.")),
- CUP_OF_TEA_GOLD_MILKY(new Drink(new int[] {7737, 7735}, new SkillEffect(Skills.CONSTRUCTION, 3, 0))),
-
- /** Miscellaneous */
- CHOCOLATE_BAR(new Food(new int[] {1973}, new HealingEffect(3))),
- PURPLE_SWEETS(new Food(new int[] {4561}, new HealingEffect(0))),
- PURPLE_SWEETS_STACKABLE(new Food(new int[] {10476}, new MultiEffect(new EnergyEffect(10), new RandomHealthEffect(1, 3)), "The sugary goodness heals some energy.", "The sugary goodness is yummy.")),
- FIELD_RATION(new Food(new int[] {7934}, new HealingEffect(10))),
- ROLL(new Food(new int[] {6963}, new HealingEffect(6))),
- TCHIKI_MONKEY_NUTS(new Food(new int[] {7573}, new HealingEffect(5), "You eat the Tchiki monkey nuts. They taste nutty.")),
- TCHIKI_MONKEY_PASTE(new Food(new int[] {7575}, new HealingEffect(5), "You eat the Tchiki monkey nut paste. It sticks to the roof of your mouth.")),
- OOMLIE_WRAP(new Food(new int[] {Items.COOKED_OOMLIE_WRAP_2343}, new MultiEffect(new HealingEffect(14), new AchievementEffect(DiaryType.KARAMJA, 2, 2)))),
- ROE(new Food(new int[]{11324}, new HealingEffect(3))),
- EQUA_LEAVES(new Food(new int[]{2128}, new HealingEffect(1))),
- CHOC_ICE(new Food(new int[]{6794}, new HealingEffect(6))),
- EDIBLE_SEAWEED(new Food(new int[] {403}, new HealingEffect(4))),
-
- /** Special Events */
- PUMPKIN(new Food(new int[] {1959}, new HealingEffect(14))),
- EASTER_EGG(new Food(new int[] {1961}, new HealingEffect(14))),
-
- /** Potions */
- STRENGTH(new Potion(new int[] {113, 115, 117, 119}, new SkillEffect(Skills.STRENGTH, 3, 0.1))),
- ATTACK(new Potion(new int[] {2428, 121, 123, 125}, new SkillEffect(Skills.ATTACK, 3, 0.1))),
- DEFENCE(new Potion(new int[] {2432, 133, 135, 137}, new SkillEffect(Skills.DEFENCE, 3, 0.1))),
- RANGING(new Potion(new int[] {2444, 169, 171, 173}, new SkillEffect(Skills.RANGE, 3, 0.1))),
- MAGIC(new Potion(new int[] {3040, 3042, 3044, 3046}, new SkillEffect(Skills.MAGIC, 3, 0.1))),
- SUPER_STRENGTH(new Potion(new int[] {2440, 157, 159, 161}, new SkillEffect(Skills.STRENGTH, 3, 0.2))),
- SUPER_ATTACK(new Potion(new int[] {2436, 145, 147, 149}, new SkillEffect(Skills.ATTACK, 3, 0.2))),
- SUPER_DEFENCE(new Potion(new int[] {2442, 163, 165, 167}, new SkillEffect(Skills.DEFENCE, 3, 0.2))),
- ANTIPOISON(new Potion(new int[] {2446, 175, 177, 179}, new MultiEffect(new SetAttributeEffect("poison:immunity", 143), new RemoveStateEffect(EntityState.POISONED.ordinal())))),
- ANTIPOISON_(new Potion(new int[] {5943, 5945, 5947, 5949}, new MultiEffect(new SetAttributeEffect("poison:immunity", 863), new RemoveStateEffect(EntityState.POISONED.ordinal())))),
- ANTIPOISON__(new Potion(new int[] {5952, 5954, 5956, 5958}, new MultiEffect(new SetAttributeEffect("poison:immunity", 2000), new RemoveStateEffect(EntityState.POISONED.ordinal())))),
- SUPER_ANTIP(new Potion(new int[] {2448, 181, 183, 185}, new MultiEffect(new SetAttributeEffect("poison:immunity", 1000), new RemoveStateEffect(EntityState.POISONED.ordinal())))),
- RELICYM(new Potion(new int[] {4842, 4844, 4846, 4848}, new MultiEffect(new SetAttributeEffect("disease:immunity", 300), new RemoveStateEffect("disease")))),
- AGILITY(new Potion(new int[] {3032, 3034, 3036, 3038}, new SkillEffect(Skills.AGILITY, 3, 0))),
- HUNTER(new Potion(new int[] {9998, 10000, 10002, 10004}, new SkillEffect(Skills.HUNTER, 3, 0))),
- RESTORE(new Potion(new int[] {2430, 127, 129, 131}, new RestoreEffect(10, 0.3))),
- SARA_BREW(new Potion(new int[] {6685, 6687, 6689, 6691}, new MultiEffect(new PercentHeal(2, .15), new SkillEffect(Skills.ATTACK, 0, -0.10), new SkillEffect(Skills.STRENGTH, 0, -0.10), new SkillEffect(Skills.MAGIC, 0, -0.10), new SkillEffect(Skills.RANGE, 0, -0.10), new SkillEffect(Skills.DEFENCE, 2, 0.2)))),
- SUMMONING(new Potion(new int[] {12140, 12142, 12144, 12146}, new MultiEffect(new RestoreSummoningSpecial(), new SummoningEffect(7, 0.25)))),
- COMBAT(new Potion(new int[] {9739, 9741, 9743, 9745}, new MultiEffect(new SkillEffect(Skills.STRENGTH, 3, .1), new SkillEffect(Skills.ATTACK, 3, .1)))),
- ENERGY(new Potion(new int[] {3008, 3010, 3012, 3014}, new MultiEffect(new EnergyEffect(10), new HealingEffect(3)))),
- FISHING(new Potion(new int[] {2438, 151, 153, 155}, new SkillEffect(Skills.FISHING, 3, 0))),
- PRAYER(new Potion(new int[] {2434, 139, 141, 143}, new PrayerEffect(7, 0.25))),
- SUPER_RESTO(new Potion(new int[] {3024, 3026, 3028, 3030}, new MultiEffect(new RestoreEffect(8, 0.25), new PrayerEffect(8, 0.25), new SummoningEffect(8, 0.25)))),
- ZAMMY_BREW(new Potion(new int[] {2450, 189, 191, 193}, new MultiEffect(new DamageEffect(10, true), new SkillEffect(Skills.ATTACK, 0, 0.15), new SkillEffect(Skills.STRENGTH, 0, 0.25), new SkillEffect(Skills.DEFENCE, 0, -0.1), new RandomPrayerEffect(0, 10)))),
- ANTIFIRE(new Potion(new int[] {2452, 2454, 2456, 2458}, new SetAttributeEffect("fire:immune", 600, true))),
- GUTH_REST(new Potion(new int[] {4417, 4419, 4421, 4423}, new MultiEffect(new RemoveStateEffect(EntityState.POISONED.ordinal()), new EnergyEffect(5), new HealingEffect(5)))),
- MAGIC_ESS(new Potion(new int[] {11491, 11489}, new SkillEffect(Skills.MAGIC,3,0))),
- SANFEW(new Potion(new int[] {10925, 10927, 10929, 10931}, new MultiEffect(new RestoreEffect(8,0.25), new PrayerEffect(8,0.25), new RemoveStateEffect(EntityState.POISONED.ordinal()), new RemoveStateEffect("disease")))),
- SUPER_ENERGY(new Potion(new int[] {3016, 3018, 3020, 3022}, new EnergyEffect(20))),
- BLAMISH_OIL(new FakeConsumable(1582, new String[] {"You know... I'd really rather not."})),
-
- /** Barbarian Mixes */
- PRAYERMIX(new BarbarianMix(new int[] {11465, 11467}, new MultiEffect(new PrayerEffect(7, 0.25), new HealingEffect(6)))),
- ZAMMY_MIX(new BarbarianMix(new int[] {11521, 11523}, new MultiEffect(new DamageEffect(10, true), new SkillEffect(Skills.ATTACK, 0, 0.15), new SkillEffect(Skills.STRENGTH, 0, 0.25), new SkillEffect(Skills.DEFENCE, 0, -0.1), new RandomPrayerEffect(0, 10)))),
- ATT_MIX(new BarbarianMix(new int[] {11429, 11431}, new MultiEffect(new SkillEffect(Skills.ATTACK, 3, 0.1), new HealingEffect(3)))),
- ANTIP_MIX(new BarbarianMix(new int[] {11433, 11435}, new MultiEffect(new RemoveStateEffect(EntityState.POISONED.ordinal()), new SetAttributeEffect("poison:immunity", 143), new HealingEffect(3)))),
- RELIC_MIX(new BarbarianMix(new int[] {11437, 11439}, new MultiEffect(new RemoveStateEffect("disease"), new SetAttributeEffect("disease:immunity", 300), new HealingEffect(3)))),
- STR_MIX(new BarbarianMix(new int[] {11443, 11441}, new MultiEffect(new SkillEffect(Skills.STRENGTH, 3, 0.1), new HealingEffect(3)))),
- RESTO_MIX(new BarbarianMix(new int[] {11449, 11451}, new MultiEffect(new RestoreEffect(10, 0.3), new HealingEffect(3)))),
- ENERGY_MIX(new BarbarianMix(new int[] {11453, 11455}, new MultiEffect(new EnergyEffect(10), new HealingEffect(6)))),
- DEF_MIX(new BarbarianMix(new int[] {11457, 11459}, new MultiEffect(new SkillEffect(Skills.DEFENCE, 3, 0.1), new HealingEffect(6)))),
- AGIL_MIX(new BarbarianMix(new int[] {11461, 11463}, new MultiEffect(new SkillEffect(Skills.AGILITY, 3, 0), new HealingEffect(6)))),
- COMBAT_MIX(new BarbarianMix(new int[] {11445, 11447}, new MultiEffect(new SkillEffect(Skills.ATTACK, 3, 0.1), new SkillEffect(Skills.STRENGTH, 3, 0.1), new HealingEffect(6)))),
- SUPER_ATT_MIX(new BarbarianMix(new int[] {11469, 11471}, new MultiEffect(new SkillEffect(Skills.ATTACK, 5, 0.15), new HealingEffect(6)))),
- FISH_MIX(new BarbarianMix(new int[] {11477, 11479}, new MultiEffect(new SkillEffect(Skills.FISHING, 3, 0), new HealingEffect(6)))),
- SUPER_ENERGY_MIX(new BarbarianMix(new int[] {11481, 11483}, new MultiEffect(new EnergyEffect(20), new HealingEffect(6)))),
- HUNTING_MIX(new BarbarianMix(new int[] {11517, 11519}, new MultiEffect(new SkillEffect(Skills.HUNTER, 3, 0), new HealingEffect(6)))),
- SUPER_STR_MIX(new BarbarianMix(new int[] {11485, 11487}, new MultiEffect(new SkillEffect(Skills.STRENGTH, 5, 0.15), new HealingEffect(6)))),
-
- /** Stealing creation potions */
- SC_PRAYER(new Potion(new int[] {14207, 14209, 14211, 14213, 14215}, new PrayerEffect(7, 0.25))),
- SC_ENERGY(new Potion(new int[] {14217, 14219, 14221, 14223, 14225}, new EnergyEffect(20))),
- SC_ATTACK(new Potion(new int[] {14227, 14229, 14231, 14233, 14235}, new SkillEffect(Skills.ATTACK, 3, 0.2))),
- SC_STRENGTH(new Potion(new int[] {14237, 14239, 14241, 14243, 14245}, new SkillEffect(Skills.STRENGTH, 3, 0.2))),
- SC_RANGE(new Potion(new int[] {14247, 14249, 14251, 14253, 14255}, new SkillEffect(Skills.RANGE, 3, 0.1))),
- SC_DEFENCE(new Potion(new int[] {14257, 14259, 14261, 14263, 14265}, new SkillEffect(Skills.DEFENCE, 3, 0.1))),
- SC_MAGIC(new Potion(new int[] {14267, 14269, 14271, 14273, 14275}, new SkillEffect(Skills.MAGIC, 3, 0.1))),
- SC_SUMMONING(new Potion(new int[] {14277, 14279, 14281, 14283, 14285}, new SummoningEffect(7, 0.25)));
-
- public static HashMap consumables = new HashMap<>();
-
- private final Consumable consumable;
-
- Consumables(Consumable consumable) {
- this.consumable = consumable;
- }
-
- public Consumable getConsumable() {
- return consumable;
- }
-
- public static Consumable getConsumableById(final int itemId) {
- return consumables.get(itemId);
- }
-
- public static void add(final Consumable consumable) {
- for (int id : consumable.getIds()) {
- consumables.putIfAbsent(id, consumable);
- }
- }
-
- /*
- Static modifier used to populate search engine lists.
- */
- static {
- for (Consumables consumable : Consumables.values()) {
- add(consumable.consumable);
- }
- }
-}
+package content.data.consumables;
+
+import content.data.consumables.effects.*;
+import core.game.consumable.*;
+import org.rs09.consts.Items;
+import core.game.node.entity.player.link.diary.DiaryType;
+import core.game.node.entity.state.EntityState;
+import core.game.world.update.flag.context.Animation;
+import core.game.node.entity.skill.Skills;
+import content.data.consumables.effects.KegOfBeerEffect;
+
+import java.util.HashMap;
+
+/**
+ * Represents a repository of active consumables in the framework.
+ */
+public enum Consumables {
+
+ /** Meats */
+ COOKED_MEAT(new Food(new int[] {2142}, new HealingEffect(3))),
+ SHRIMPS(new Food(new int[] {315}, new HealingEffect(3))),
+ COOKED_CHICKEN(new Food(new int[] {2140}, new HealingEffect(3))),
+ COOKED_RABBIT(new Food(new int[] {3228}, new HealingEffect(5))),
+ ANCHOVIES(new Food(new int[] {319}, new HealingEffect(1))),
+ SARDINE(new Food(new int[] {325}, new HealingEffect(4))),
+ POISON_KARAMBWAN(new Food(new int[] {3146}, new PoisonKarambwanEffect())),
+ UGTHANKI_MEAT(new Food(new int[] {1861}, new HealingEffect(3))),
+ HERRING(new Food(new int[] {347}, new HealingEffect(5))),
+ MACKEREL(new Food(new int[] {355}, new HealingEffect(6))),
+ ROAST_BIRD_MEAT(new Food(new int[] {9980}, new HealingEffect(6))),
+ THIN_SNAIL(new Food(new int[] {3369}, new HealingEffect(5))),
+ TROUT(new Food(new int[] {333}, new HealingEffect(7))),
+ SPIDER_ON_STICK(new Food(new int[] {6297, 6305}, new HealingEffect(7))),
+ SPIDER_ON_SHAFT(new Food(new int[] {6299}, new HealingEffect(7))),
+ ROAST_RABBIT(new Food(new int[] {7223}, new HealingEffect(7))),
+ LEAN_SNAIL(new Food(new int[] {3371}, new HealingEffect(8))),
+ COD(new Food(new int[] {339}, new HealingEffect(7))),
+ PIKE(new Food(new int[] {351}, new HealingEffect(8))),
+ ROAST_BEAST_MEAT(new Food(new int[] {9988}, new HealingEffect(8))),
+ COOKED_CRAB_MEAT(new Food(new int[] {7521, 7523, 7524, 7525, 7526}, new HealingEffect(2))),
+ FAT_SNAIL(new Food(new int[] {3373}, new HealingEffect(9))),
+ SALMON(new Food(new int[] {329}, new HealingEffect(9))),
+ SLIMY_EEL(new Food(new int[] {3381}, new HealingEffect(6))),
+ TUNA(new Food(new int[] {361}, new HealingEffect(10))),
+ COOKED_KARAMBWAN(new Food(new int[] {3144}, new HealingEffect(18))),
+ COOKED_CHOMPY(new Food(new int[] {2878}, new HealingEffect(10))),
+ RAINBOW_FISH(new Food(new int[] {10136}, new HealingEffect(11))),
+ CAVE_EEL(new Food(new int[] {5003}, new HealingEffect(7))),
+ LOBSTER(new Food(new int[] {379}, new HealingEffect(12))),
+ COOKED_JUBBLY(new Food(new int[] {7568}, new HealingEffect(15))),
+ BASS(new Food(new int[] {365}, new HealingEffect(13))),
+ SWORDFISH(new Food(new int[] {373}, new HealingEffect(14))),
+ LAVA_EEL(new Food(new int[] {2149}, new HealingEffect(14))),
+ MONKFISH(new Food(new int[] {7946}, new HealingEffect(16))),
+ SHARK(new Food(new int[] {385}, new HealingEffect(20))),
+ SEA_TURTLE(new Food(new int[] {397}, new HealingEffect(21))),
+ MANTA_RAY(new Food(new int[] {391}, new HealingEffect(22))),
+ KARAMBWANJI(new Food(new int[] {3151}, new HealingEffect(3))),
+ STUFFED_SNAKE(new Food(new int[] {7579}, new HealingEffect(20), "You eat the stuffed snake-it's quite a meal! It tastes like chicken.")),
+ CRAYFISH(new Food(new int[] {13433}, new HealingEffect(2))),
+ GIANT_FROG_LEGS(new Food(new int [] {4517}, new HealingEffect(6))),
+
+ /** Breads */
+ BREAD(new Food(new int[] {2309}, new HealingEffect(5))),
+ BAGUETTE(new Food(new int[] {6961}, new HealingEffect(6))),
+
+ /** Sandwiches */
+ TRIANGLE_SANDWICH(new Food(new int[] {6962}, new HealingEffect(6))),
+ SQUARE_SANDWICH(new Food(new int[] {6965}, new HealingEffect(6))),
+ SEAWEED_SANDWICH(new FakeConsumable(3168, new String[] {"You really, really do not want to eat that."})),
+ FROGBURGER(new Food(new int[] {10962}, new HealingEffect(2))),
+
+ /** Kebabs */
+ UGTHANKI_KEBAB(new Food(new int[] {1883}, new UgthankiKebabEffect())),
+ UGTHANKI_KEBAB_SMELLING(new Food(new int[] {1885}, new SmellingUgthankiKebabEffect())),
+ KEBAB(new Food(new int[] {1971}, new KebabEffect())),
+ SUPER_KEBAB(new Food(new int[] {4608}, new SuperKebabEffect())),
+
+ /** Pies */
+ REDBERRY_PIE(new HalfableFood(new int[] {2325, 2333, 2313}, new HealingEffect(5))),
+ MEAT_PIE(new HalfableFood(new int[] {2327, 2331, 2313}, new HealingEffect(6))),
+ APPLE_PIE(new HalfableFood(new int[] {2323, 2335, 2313}, new HealingEffect(7))),
+ GARDEN_PIE(new HalfableFood(new int[] {7178, 7180, 2313}, new MultiEffect(new HealingEffect(6), new SkillEffect(Skills.FARMING, 3, 0)))),
+ FISH_PIE(new HalfableFood(new int[] {7188, 7190, 2313}, new MultiEffect(new HealingEffect(6), new SkillEffect(Skills.FISHING, 3, 0)))),
+ ADMIRAL_PIE(new HalfableFood(new int[] {7198, 7200, 2313}, new MultiEffect(new HealingEffect(8), new SkillEffect(Skills.FISHING, 5, 0)))),
+ WILD_PIE(new HalfableFood(new int[] {7208, 7210, 2313}, new MultiEffect(new SkillEffect(Skills.SLAYER, 5, 0), new SkillEffect(Skills.RANGE, 4, 0), new HealingEffect(11)))),
+ SUMMER_PIE(new HalfableFood(new int[] {7218, 7220, 2313}, new MultiEffect(new HealingEffect(11), new SkillEffect(Skills.AGILITY, 5, 0), new EnergyEffect(10)))),
+
+ /** Stews */
+ STEW(new Food(new int[] {2003, 1923}, new HealingEffect(11))),
+ SPICY_STEW(new Food(new int[] {7479, 1923}, new HealingEffect(11))),
+ CURRY(new Food(new int[] {2011, 1923}, new HealingEffect(19))),
+ BANANA_STEW(new Food(new int[] {4016, 1923}, new HealingEffect(11))),
+
+ /** Pizzas */
+ PLAIN_PIZZA(new HalfableFood(new int[] {2289, 2291}, new HealingEffect(7))),
+ MEAT_PIZZA(new HalfableFood(new int[] {2293, 2295}, new HealingEffect(8))),
+ ANCHOVY_PIZZA(new HalfableFood(new int[] {2297, 2299}, new HealingEffect(9))),
+ PINEAPPLE_PIZZA(new HalfableFood(new int[] {2301, 2303}, new HealingEffect(11))),
+
+ /** Cakes */
+ CAKE(new Cake(new int[] {1891, 1893, 1895}, new HealingEffect(4), "You eat part of the cake.", "You eat some more cake.", "You eat the slice of cake.")),
+ CHOCOLATE_CAKE(new Cake(new int[] {1897, 1899, 1901}, new HealingEffect(5), "You eat part of the chocolate cake.", "You eat some more of the chocolate cake.", "You eat the slice of cake.")),
+ ROCK_CAKE(new Food(new int[] {2379}, new RockCakeEffect(), "The rock cake resists all attempts to eat it.")),
+ DWARVEN_ROCK_CAKE(new Food(new int[] {7510, 7510}, new DwarvenRockCakeEffect(), "Ow! You nearly broke a tooth!", "The rock cake resists all attempts to eat it.")),
+ HOT_DWARVEN_ROCK_CAKE(new Food(new int[] {7509, 7509}, new DwarvenRockCakeEffect(), "Ow! You nearly broke a tooth!", "The rock cake resists all attempts to eat it.")),
+ COOKED_FISHCAKE(new Food(new int[] {7530}, new HealingEffect(11))),
+ MINT_CAKE(new Food(new int[] {9475}, new EnergyEffect(50))),
+
+ /** Vegetables */
+ POTATO(new Food(new int[] {1942}, new HealingEffect(1))),
+ BAKED_POTATO(new Food(new int[] {6701}, new HealingEffect(2))),
+ SPICY_SAUCE(new Food(new int[] {7072, 1923}, new HealingEffect(2))),
+ CHILLI_CON_CARNE(new Food(new int[] {7062, 1923}, new HealingEffect(5))),
+ SCRAMBLED_EGG(new Food(new int[] {7078, 1923}, new HealingEffect(5))),
+ EGG_AND_TOMATO(new Food(new int[] {7064, 1923}, new HealingEffect(8))),
+ SWEET_CORN(new Food(new int[] {5988}, new MultiEffect(new HealingEffect(1), new PercentageHealthEffect(10)))),
+ SWEETCORN_BOWL(new Food(new int[] {7088, 1923}, new MultiEffect(new HealingEffect(1), new PercentageHealthEffect(10)))),
+ POTATO_WITH_BUTTER(new Food(new int[] {6703}, new HealingEffect(7))),
+ CHILLI_POTATO(new Food(new int[] {7054}, new HealingEffect(14))),
+ FRIED_ONIONS(new Food(new int[] {7084, 1923}, new HealingEffect(5))),
+ FRIED_MUSHROOMS(new Food(new int[] {7082, 1923}, new HealingEffect(5))),
+ POTATO_WITH_CHEESE(new Food(new int[] {6705}, new HealingEffect(16))),
+ EGG_POTATO(new Food(new int[] {7056}, new HealingEffect(11))),
+ MUSHROOMS_AND_ONIONS(new Food(new int[] {7066, 1923}, new HealingEffect(11))),
+ MUSHROOM_POTATO(new Food(new int[] {7058}, new HealingEffect(20))),
+ TUNA_AND_CORN(new Food(new int[] {7068, 1923}, new HealingEffect(13))),
+ TUNA_POTATO(new Food(new int[] {7060}, new HealingEffect(22))),
+ ONION(new Food(new int[] {1957}, new HealingEffect(2), "It's always sad to see a grown man/woman cry.")),
+ CABBAGE(new Food(new int[] {1965}, new HealingEffect(2), "You eat the cabbage. Yuck!")),
+ DRAYNOR_CABBAGE(new Food(new int[] {1967}, new DraynorCabbageEffect(), "You eat the cabbage.", "It seems to taste nicer than normal.")),
+ EVIL_TURNIP(new Food(new int[] {12134, 12136, 12138}, new HealingEffect(6))),
+ SPINACH_ROLL(new Food(new int[] {1969}, new HealingEffect(2))),
+
+ /** Dairies */
+ POT_OF_CREAM(new Food(new int[] {2130}, new HealingEffect(1))),
+ CHEESE(new Food(new int[] {1985}, new HealingEffect(2))),
+ CHOCOLATEY_MILK(new Drink(new int[] {1977, 1925}, new HealingEffect(4))),
+
+ /** Fruits */
+ BANANA(new Food(new int[] {1963}, new HealingEffect(2))),
+ SLICED_BANANA(new Food(new int[] {3162}, new HealingEffect(2))),
+ RED_BANANA(new Food(new int[] {7572}, new HealingEffect(5), "You eat the red banana. It's tastier than your average banana.")),
+ SLICED_RED_BANANA(new Food(new int[] {7574}, new HealingEffect(5), "You eat the sliced red banana. Yum.")),
+ ORANGE(new Food(new int[] {2108}, new HealingEffect(2))),
+ ORANGE_CHUNKS(new Food(new int[] {2110}, new HealingEffect(2))),
+ ORANGE_SLICES(new Food(new int[] {2112}, new HealingEffect(2))),
+ PAPAYA_FRUIT(new Food(new int[] {5972}, new HealingEffect(2))),
+ TENTI_PINEAPPLE(new FakeConsumable(1851, new String[] {"Try using a knife to slice it into pieces."})),
+ PINEAPPLE(new FakeConsumable(2114, new String[] {"Try using a knife to slice it into pieces."})),
+ PINEAPPLE_CHUNKS(new Food(new int[] {2116}, new HealingEffect(2))),
+ PINEAPPLE_RING(new Food(new int[] {2118}, new HealingEffect(2))),
+ DWELLBERRIES(new Food(new int[] {2126}, new HealingEffect(2))),
+ JANGERBERRIES(new Food(new int[] {247}, new MultiEffect(new SkillEffect(Skills.ATTACK, 2, 0), new SkillEffect(Skills.STRENGTH, 1, 0), new PrayerEffect(1, 0), new SkillEffect(Skills.DEFENCE, -1, 0)))),
+ STRAWBERRY(new Food(new int[] {5504}, new MultiEffect(new HealingEffect(1), new PercentageHealthEffect(6)))),
+ TOMATO(new Food(new int[] {1982}, new HealingEffect(2))),
+ WATERMELON(new FakeConsumable(5982, new String[] {"Try using a knife to slice it into pieces."})),
+ WATERMELON_SLICE(new Food(new int[] {5984}, new PercentageHealthEffect(5))),
+ LEMON(new Food(new int[] {2102}, new HealingEffect(2))),
+ LEMON_CHUNKS(new Food(new int[] {2104}, new HealingEffect(2))),
+ LEMON_SLICES(new Food(new int[] {2106}, new HealingEffect(2))),
+ LIME(new Food(new int[] {2120}, new HealingEffect(2))),
+ LIME_CHUNKS(new Food(new int[] {2122}, new HealingEffect(2))),
+ LIME_SLICES(new Food(new int[] {2124}, new HealingEffect(2))),
+ PEACH(new Food(new int[] {6883}, new HealingEffect(8))),
+ WHITE_TREE_FRUIT(new Food(new int[] {6469}, new MultiEffect(new RandomEnergyEffect(5, 10), new HealingEffect(3)))),
+ STRANGE_FRUIT(new Food(new int[] {464}, new MultiEffect(new RemoveStateEffect(EntityState.POISONED.ordinal()), new EnergyEffect(30)))),
+
+ /** Gnome Cooking */
+ TOAD_CRUNCHIES(new Food(new int[] {2217}, new HealingEffect(12))),
+ PREMADE_TD_CRUNCH(new Food(new int[] {2243}, new HealingEffect(12))),
+ SPICY_CRUNCHIES(new Food(new int[] {2213}, new HealingEffect(7))),
+ PREMADE_SY_CRUNCH(new Food(new int[] {2241}, new HealingEffect(7))),
+ WORM_CRUNCHIES(new Food(new int[] {2205}, new HealingEffect(8))),
+ PREMADE_WM_CRUNC(new Food(new int[] {2237}, new HealingEffect(8))),
+ CHOCCHIP_CRUNCHIES(new Food(new int[] {2209}, new HealingEffect(7))),
+ PREMADE_CH_CRUNCH(new Food(new int[] {2239}, new HealingEffect(7))),
+ FRUIT_BATTA(new Food(new int[] {2277}, new HealingEffect(11))),
+ PREMADE_FRT_BATTA(new Food(new int[] {2225}, new HealingEffect(11))),
+ TOAD_BATTA(new Food(new int[] {2255}, new HealingEffect(11))),
+ PREMADE_TD_BATTA(new Food(new int[] {2221}, new HealingEffect(11))),
+ WORM_BATTA(new Food(new int[] {2253}, new HealingEffect(11))),
+ PREMADE_WM_BATTA(new Food(new int[] {2219}, new HealingEffect(11))),
+ VEGETABLE_BATTA(new Food(new int[] {2281}, new HealingEffect(11))),
+ PREMADE_VEG_BATTA(new Food(new int[] {2227}, new HealingEffect(11))),
+ CHEESE_AND_TOMATOES_BATTA(new Food(new int[] {2259}, new HealingEffect(11))),
+ PREMADE_CT_BATTA(new Food(new int[] {2223}, new HealingEffect(11))),
+ WORM_HOLE(new Food(new int[] {2191}, new HealingEffect(12))),
+ PREMADE_WORM_HOLE(new Food(new int[] {2233}, new HealingEffect(12))),
+ VEG_BALL(new Food(new int[] {2195}, new HealingEffect(12))),
+ PREMADE_VEG_BALL(new Food(new int[] {2235}, new HealingEffect(12))),
+ TANGLED_TOADS_LEGS(new Food(new int[] {2187}, new HealingEffect(15))),
+ PREMADE_TTL(new Food(new int[] {2231}, new HealingEffect(15))),
+ CHOCOLATE_BOMB(new Food(new int[] {2195}, new HealingEffect(15))),
+ PREMADE_CHOC_BOMB(new Food(new int[] {2229}, new HealingEffect(15))),
+ TOAD_LEGS(new Food(new int[] {2152}, new HealingEffect(3))),
+ KING_WORM(new Food(new int[] {2162}, new HealingEffect(2))),
+
+ /** Ales */
+ ASGOLDIAN_ALE(new FakeConsumable(7508, new String[] {"I don't think I'd like gold in beer thanks. Leave it for the dwarves."})),
+ ASGARNIAN_ALE(new Drink(new int[] {1905, 1919}, new MultiEffect(new HealingEffect(2), new SkillEffect(Skills.STRENGTH, 2, 0), new SkillEffect(Skills.ATTACK, -4, 0)), "You drink the ale. You feel slightly reinvigorated...", "...and slightly dizzy too.")),
+ ASGARNIAN_ALE_KEG(new Drink(new int[] {5785, 5783, 5781, 5779, 5769}, new MultiEffect(new SkillEffect(Skills.STRENGTH, 2, 0), new SkillEffect(Skills.ATTACK, -4, 0)), new Animation(2289), "You drink the ale. You feel slightly reinvigorated...", "...and slightly dizzy too.")),
+ ASGARNIAN_ALE_M(new Drink(new int[] {5739, 1919}, new MultiEffect(new SkillEffect(Skills.STRENGTH, 3, 0), new SkillEffect(Skills.ATTACK, -6, 0)))),
+ ASGARNIAN_ALE_M_KEG(new Drink(new int[] {5865, 5863, 5861, 5859, 5769}, new MultiEffect(new SkillEffect(Skills.STRENGTH, 3, 0), new SkillEffect(Skills.ATTACK, -6, 0)), new Animation(2289))),
+ AXEMANS_FOLLY(new Drink(new int[] {5751, 1919}, new MultiEffect(new SkillEffect(Skills.WOODCUTTING, 1, 0), new HealingEffect(1), new SkillEffect(Skills.STRENGTH, -3, 0), new SkillEffect(Skills.ATTACK, -3, 0)))),
+ AXEMANS_FOLLY_KEG(new Drink(new int[] {5825, 5823, 5821, 5819, 5769}, new MultiEffect(new SkillEffect(Skills.WOODCUTTING, 1, 0), new HealingEffect(1), new SkillEffect(Skills.STRENGTH, -3, 0), new SkillEffect(Skills.ATTACK, -3, 0)), new Animation(2289))),
+ AXEMANS_FOLLY_M(new Drink(new int[] {5753, 1919}, new MultiEffect(new SkillEffect(Skills.WOODCUTTING, 2, 0), new HealingEffect(2), new SkillEffect(Skills.STRENGTH, -4, 0), new SkillEffect(Skills.ATTACK, -4, 0)))),
+ AXEMANS_FOLLY_M_KEG(new Drink(new int[] {5905, 5903, 5901, 5899, 5769}, new MultiEffect(new SkillEffect(Skills.WOODCUTTING, 2, 0), new HealingEffect(2), new SkillEffect(Skills.STRENGTH, -4, 0), new SkillEffect(Skills.ATTACK, -4, 0)), new Animation(2289))),
+ BANDITS_BREW(new Drink(new int[] {4627, 1919}, new MultiEffect(new SkillEffect(Skills.THIEVING, 1, 0), new SkillEffect(Skills.ATTACK, 1, 0), new SkillEffect(Skills.STRENGTH, -1, 0), new SkillEffect(Skills.DEFENCE, -6, 0), new HealingEffect(1)), "You drink the beer. You feel slightly reinvigorated...", "...and slightly dizzy too.")),
+ BEER(new Drink(new int[] {1917, 1919}, new MultiEffect(new HealingEffect(1), new SkillEffect(Skills.STRENGTH, 0, 0.04), new SkillEffect(Skills.ATTACK, 0, -0.07)), "You drink the beer. You feel slightly reinvigorated...", "...and slightly dizzy too.")),
+ BEER_TANKARD(new Drink(new int[] {3803, 3805}, new MultiEffect(new SkillEffect(Skills.ATTACK, -9, 0), new SkillEffect(Skills.STRENGTH, 4, 0)), "You quaff the beer. You feel slightly reinvigorated...", "...but very dizzy too.")),
+ KEG_OF_BEER(new Drink(new int[] {3801}, new KegOfBeerEffect(), new Animation(1330), "You chug the keg. You feel reinvigorated...", "...but extremely drunk too.")),
+ CHEFS_DELIGHT(new Drink(new int[] {5755, 1919}, new MultiEffect(new SkillEffect(Skills.COOKING, 1, 0.05), new HealingEffect(1), new SkillEffect(Skills.ATTACK, -2, 0), new SkillEffect(Skills.STRENGTH, -2, 0)))),
+ CHEFS_DELIGHT_KEG(new Drink(new int[] {5833, 5831, 5829, 5827, 5769}, new MultiEffect(new SkillEffect(Skills.COOKING, 1, 0.05), new HealingEffect(1), new SkillEffect(Skills.ATTACK, -2, 0), new SkillEffect(Skills.STRENGTH, -2, 0)), new Animation(2289))),
+ CHEFS_DELIGHT_M(new Drink(new int[] {5757, 1919}, new MultiEffect(new SkillEffect(Skills.COOKING, 2, 0.05), new HealingEffect(2), new SkillEffect(Skills.ATTACK, -3, 0), new SkillEffect(Skills.STRENGTH, -3, 0)))),
+ CHEFS_DELIGHT_M_KEG(new Drink(new int[] {5913, 5911, 5909, 5907, 5769}, new MultiEffect(new SkillEffect(Skills.COOKING, 2, 0.05), new HealingEffect(2), new SkillEffect(Skills.ATTACK, -3, 0), new SkillEffect(Skills.STRENGTH, -3, 0)), new Animation(2289))),
+ CIDER(new Drink(new int[] {5763, 1919}, new MultiEffect(new MultiEffect(new HealingEffect(2), new SkillEffect(Skills.FARMING, 1, 0), new SkillEffect(Skills.ATTACK, -2, 0), new SkillEffect(Skills.STRENGTH, -2, 0))))),
+ CIDER_KEG(new Drink(new int[] {5849, 5847, 5845, 5843, 5769}, new MultiEffect(new MultiEffect(new HealingEffect(2), new SkillEffect(Skills.FARMING, 1, 0), new SkillEffect(Skills.ATTACK, -2, 0), new SkillEffect(Skills.STRENGTH, -2, 0))), new Animation(2289))),
+ MATURE_CIDER(new Drink(new int[] {5765, 1919}, new MultiEffect(new MultiEffect(new HealingEffect(2), new SkillEffect(Skills.FARMING, 2, 0), new SkillEffect(Skills.ATTACK, -5, 0), new SkillEffect(Skills.STRENGTH, -5, 0))))),
+ CIDER_M_KEG(new Drink(new int[] {5929, 5927, 5925, 5923, 5769}, new MultiEffect(new MultiEffect(new HealingEffect(2), new SkillEffect(Skills.FARMING, 2, 0), new SkillEffect(Skills.ATTACK, -5, 0), new SkillEffect(Skills.STRENGTH, -5, 0))), new Animation(2289))),
+ DRAGON_BITTER(new Drink(new int[] {1911, 1919}, new MultiEffect(new HealingEffect(1), new SkillEffect(Skills.STRENGTH, 2, 0), new SkillEffect(Skills.ATTACK, -4, 0)))),
+ DRAGON_BITTER_KEG(new Drink(new int[] {5809, 5807, 5805, 5803, 5769}, new MultiEffect(new HealingEffect(1), new SkillEffect(Skills.STRENGTH, 2, 0), new SkillEffect(Skills.ATTACK, -4, 0)), new Animation(2289))),
+ DRAGON_BITTER_M(new Drink(new int[] {5745, 1919}, new MultiEffect(new HealingEffect(2), new SkillEffect(Skills.STRENGTH, 3, 0), new SkillEffect(Skills.ATTACK, -6, 0)))),
+ DRAGON_BITTER_M_KEG(new Drink(new int[] {5889, 5887, 5885, 5883, 5769}, new MultiEffect(new HealingEffect(2), new SkillEffect(Skills.STRENGTH, 3, 0), new SkillEffect(Skills.ATTACK, -6, 0)), new Animation(2289))),
+ DWARVEN_STOUT(new Drink(new int[] {1913, 1919}, new MultiEffect(new SkillEffect(Skills.MINING, 1, 0), new SkillEffect(Skills.SMITHING, 1 ,0), new SkillEffect(Skills.ATTACK, -2, 0), new SkillEffect(Skills.STRENGTH, -2, 0), new SkillEffect(Skills.DEFENCE, -2, 0), new HealingEffect(1)), "You drink the Dwarven Stout. It tastes foul.", "It tastes pretty strong too.")),
+ DWARVEN_STOUT_KEG(new Drink(new int[] {5777, 5775, 5773, 5771, 5769}, new MultiEffect(new SkillEffect(Skills.MINING, 1, 0), new SkillEffect(Skills.SMITHING, 1 ,0), new SkillEffect(Skills.ATTACK, -2, 0), new SkillEffect(Skills.STRENGTH, -2, 0), new SkillEffect(Skills.DEFENCE, -2, 0), new HealingEffect(1)), new Animation(2289), "You drink the Dwarven Stout. It tastes foul.", "It tastes pretty strong too.")),
+ DWARVEN_STOUT_M(new Drink(new int[] {5747, 1919}, new MultiEffect(new SkillEffect(Skills.MINING, 2, 0), new SkillEffect(Skills.SMITHING, 2 ,0), new SkillEffect(Skills.ATTACK, -7, 0), new SkillEffect(Skills.STRENGTH, -7, 0), new SkillEffect(Skills.DEFENCE, -7, 0), new HealingEffect(1)))),
+ DWARVEN_STOUT_M_KEG(new Drink(new int[] {5857, 5855, 5853, 5851, 5769}, new MultiEffect(new SkillEffect(Skills.MINING, 2, 0), new SkillEffect(Skills.SMITHING, 2 ,0), new SkillEffect(Skills.ATTACK, -7, 0), new SkillEffect(Skills.STRENGTH, -7, 0), new SkillEffect(Skills.DEFENCE, -7, 0), new HealingEffect(1)), new Animation(2289))),
+ GREENMANS_ALE(new Drink(new int[] {1909, 1919}, new MultiEffect(new HealingEffect(1), new SkillEffect(Skills.HERBLORE, 1, 0), new SkillEffect(Skills.ATTACK, -3, 0), new SkillEffect(Skills.STRENGTH, -3, 0), new SkillEffect(Skills.DEFENCE, -3, 0)))),
+ GREENMANS_ALE_KEG(new Drink(new int[] {5793, 5791, 5789, 5787, 5769}, new MultiEffect(new HealingEffect(1), new SkillEffect(Skills.HERBLORE, 1, 0), new SkillEffect(Skills.ATTACK, -3, 0), new SkillEffect(Skills.STRENGTH, -3, 0), new SkillEffect(Skills.DEFENCE, -3, 0)), new Animation(2289))),
+ GREENMANS_ALE_M(new Drink(new int[] {5743, 1919}, new MultiEffect(new HealingEffect(1), new SkillEffect(Skills.HERBLORE, 2, 0), new SkillEffect(Skills.ATTACK, -2, 0), new SkillEffect(Skills.STRENGTH, -2, 0)))),
+ GREENMANS_ALE_M_KEG(new Drink(new int[] {5873, 5871, 5869, 5867, 5769}, new MultiEffect(new HealingEffect(1), new SkillEffect(Skills.HERBLORE, 2, 0), new SkillEffect(Skills.ATTACK, -2, 0), new SkillEffect(Skills.STRENGTH, -2, 0)), new Animation(2289))),
+ GROG(new Drink(new int[] {1915, 1919}, new MultiEffect(new SkillEffect(Skills.STRENGTH, 3, 0), new SkillEffect(Skills.ATTACK, -6, 0)))),
+ MOONLIGHT_MEAD(new Drink(new int[] {2955, 1919}, new HealingEffect(4), "It tastes like something just died in your mouth.")),
+ MOONLIGHT_MEAD_KEG(new Drink(new int[] {5817, 5815, 5813, 5811, 5769}, new HealingEffect(4), new Animation(2289), "It tastes like something just died in your mouth.")),
+ MOONLIGHT_MEAD_M(new Drink(new int[] {5749, 1919}, new HealingEffect(6))),
+ MOONLIGHT_MEAD_M_KEG(new Drink(new int[] {5897, 5895, 5893, 5891, 5769}, new HealingEffect(6), new Animation(2289))),
+ SLAYERS_RESPITE(new Drink(new int[] {5759, 1919}, new MultiEffect(new HealingEffect(1), new SkillEffect(Skills.SLAYER, 2, 0), new SkillEffect(Skills.ATTACK, -2, 0), new SkillEffect(Skills.STRENGTH, -2, 0)))),
+ SLAYERS_RESPITE_KEG(new Drink(new int[] {5841, 5839, 5837, 5835, 5769}, new MultiEffect(new HealingEffect(1), new SkillEffect(Skills.SLAYER, 2, 0), new SkillEffect(Skills.ATTACK, -2, 0), new SkillEffect(Skills.STRENGTH, -2, 0)), new Animation(2289))),
+ SLAYERS_RESPITE_M(new Drink(new int[] {5761, 1919}, new MultiEffect(new HealingEffect(1), new SkillEffect(Skills.SLAYER, 4, 0), new SkillEffect(Skills.ATTACK, -2, 0), new SkillEffect(Skills.STRENGTH, -2, 0)))),
+ SLAYERS_RESPITE_M_KEG(new Drink(new int[] {5841, 5839, 5837, 5835, 5769}, new MultiEffect(new HealingEffect(1), new SkillEffect(Skills.SLAYER, 4, 0), new SkillEffect(Skills.ATTACK, -2, 0), new SkillEffect(Skills.STRENGTH, -2, 0)), new Animation(2289))),
+ WIZARDS_MIND_BOMB(new Drink(new int[] {1907, 1919}, new WizardsMindBombEffect(), "You drink the Wizard's Mind Bomb.", "You feel very strange.")),
+ MATURE_WMB(new Drink(new int[] {5741, 1919}, new MatureWmbEffect())),
+
+ /** Cocktails */
+ FRUIT_BLAST(new Drink(new int[] {2084, 2026}, new HealingEffect(9))),
+ PREMADE_FR_BLAST(new Food(new int[] {2034, 2026}, new HealingEffect(9))),
+ PINEAPPLE_PUNCH(new Drink(new int[] {2048, 2026}, new HealingEffect(9), "You drink the cocktail. It tastes great.")),
+ PREMADE_P_PUNCH(new Drink(new int[] {2036, 2026}, new HealingEffect(9), "You drink the cocktail. It tastes great.")),
+ WIZARD_BLIZZARD(new Drink(new int[] {2054, 2026}, new MultiEffect(new HealingEffect(5), new SkillEffect(Skills.STRENGTH, 6, 0), new SkillEffect(Skills.ATTACK, -4, 0)))),
+ PREMADE_WIZ_BLZD(new Drink(new int[] {2040, 2026}, new MultiEffect(new HealingEffect(5), new SkillEffect(Skills.STRENGTH, 6, 0), new SkillEffect(Skills.ATTACK, -4, 0)))),
+ SHORT_GREEN_GUY(new Drink(new int[] {2080, 2026}, new MultiEffect(new HealingEffect(5), new SkillEffect(Skills.STRENGTH, 4, 0), new SkillEffect(Skills.ATTACK, -3, 0)))),
+ PREMADE_SGG(new Drink(new int[] {2038, 2026}, new MultiEffect(new HealingEffect(5), new SkillEffect(Skills.STRENGTH, 4, 0), new SkillEffect(Skills.ATTACK, -3, 0)))),
+ DRUNK_DRAGON(new Drink(new int[] {2092, 2026}, new MultiEffect(new HealingEffect(5), new SkillEffect(Skills.STRENGTH, 7, 0), new SkillEffect(Skills.ATTACK, -4, 0)))),
+ PREMADE_DR_DRAGON(new Drink(new int[] {2032, 2026}, new MultiEffect(new HealingEffect(5), new SkillEffect(Skills.STRENGTH, 7, 0), new SkillEffect(Skills.ATTACK, -4, 0)))),
+ CHOC_SATURDAY(new Drink(new int[] {2074, 2026}, new MultiEffect(new HealingEffect(5), new SkillEffect(Skills.STRENGTH, 7, 0), new SkillEffect(Skills.ATTACK, -4, 0)))),
+ PREMADE_CHOC_SDY(new Drink(new int[] {2030, 2026}, new MultiEffect(new HealingEffect(5), new SkillEffect(Skills.STRENGTH, 7, 0), new SkillEffect(Skills.ATTACK, -4, 0)))),
+ BLURBERRY_SPECIAL(new Drink(new int[] {2064, 2026}, new MultiEffect(new HealingEffect(6), new SkillEffect(Skills.STRENGTH, 6, 0), new SkillEffect(Skills.ATTACK, -4, 0)))),
+ PREMADE_BLURB_SP(new Drink(new int[] {2028, 2026}, new MultiEffect(new HealingEffect(6), new SkillEffect(Skills.STRENGTH, 6, 0), new SkillEffect(Skills.ATTACK, -4, 0)))),
+
+ /** Bottled Drinks */
+ KARAMJAN_RUM(new Drink(new int[] {431}, new MultiEffect(new HealingEffect(5), new SkillEffect(Skills.STRENGTH, 5, 0), new SkillEffect(Skills.ATTACK, -4, 0)))),
+ BRAINDEATH_RUM(new Drink(new int[] {7157}, new MultiEffect(new SkillEffect(Skills.DEFENCE, 0, -0.1), new SkillEffect(Skills.ATTACK, 0, -0.05), new SkillEffect(Skills.PRAYER, 0, -0.05), new SkillEffect(Skills.RANGE, 0, -0.05), new SkillEffect(Skills.MAGIC, 0, -0.05), new SkillEffect(Skills.HERBLORE, 0, -0.05), new SkillEffect(Skills.STRENGTH, 3, 0), new SkillEffect(Skills.MINING, 1, 0)), "With a sense of impending doom you drink the 'rum'. You try very hard not to die.")),
+ RUM_TROUBLE_BREWING_RED(new Drink(new int[] {8940, 8940}, new TroubleBrewingRumEffect("Oh gods! It tastes like burning!"), new Animation(9605))),
+ RUM_TROUBLE_BREWING_BLUE(new Drink(new int[] {8941, 8941}, new TroubleBrewingRumEffect("My Liver! My Liver is melting!"), new Animation(9604))),
+ VODKA(new Drink(new int[] {2015}, new MultiEffect(new SkillEffect(Skills.STRENGTH, 3, 0), new SkillEffect(Skills.ATTACK, -3, 0)))),
+ GIN(new Drink(new int[] {2019}, new MultiEffect(new SkillEffect(Skills.STRENGTH, 1, 0), new SkillEffect(Skills.ATTACK, 4, 0), new RandomHealthEffect(3, 4)))),
+ BRANDY(new Drink(new int[] {2021}, new MultiEffect(new HealingEffect(5), new SkillEffect(Skills.ATTACK, 4, 0)))),
+ WHISKY(new Drink(new int[] {2017}, new MultiEffect(new HealingEffect(5), new SkillEffect(Skills.STRENGTH, 3, 0), new SkillEffect(Skills.ATTACK, -4, 0)))),
+ BOTTLE_OF_WINE(new Drink(new int[] {2015, 7921}, new MultiEffect(new HealingEffect(14), new SkillEffect(Skills.ATTACK, -3, 0)))),
+
+ /** Wine */
+ JUG_OF_WINE(new Drink(new int[] {1993, 1935}, new MultiEffect(new HealingEffect(11), new SkillEffect(Skills.ATTACK, -2, 0)))),
+ HALF_FULL_WINE_JUG(new Drink(new int[] {1989, 1935}, new HealingEffect(7))),
+
+ /** Tea */
+ CUP_OF_TEA(new Drink(new int[] {712, 1980}, new MultiEffect(new HealingEffect(3), new SkillEffect(Skills.ATTACK, 3, 0)), "Aaah, nothing like a nice cuppa tea!")),
+ CUP_OF_TEA_NETTLE(new Drink(new int[] {4242, 1980}, new EnergyEffect(10))),
+ CUP_OF_TEA_MILKY_NETTLE(new Drink(new int[] {4243, 1980}, new EnergyEffect(10))),
+ NETTLE_TEA(new Drink(new int[] {4239, 1980}, new NettleTeaEffect())),
+ NETTLE_TEA_MILKY(new Drink(new int[] {4240, 1980}, new NettleTeaEffect())),
+ CUP_OF_TEA_CLAY(new Drink(new int[] {7730, 7728}, new SkillEffect(Skills.CONSTRUCTION, 1, 0), "You feel refreshed and ready for more building.")),
+ CUP_OF_TEA_CLAY_MILKY(new Drink(new int[] {7731, 7728}, new SkillEffect(Skills.CONSTRUCTION, 1, 0))),
+ CUP_OF_TEA_WHITE(new Drink(new int[] {7733, 7732}, new SkillEffect(Skills.CONSTRUCTION, 2, 0), "You feel refreshed and ready for more building.")),
+ CUP_OF_TEA_WHITE_MILKY(new Drink(new int[] {7734, 7732}, new SkillEffect(Skills.CONSTRUCTION, 2, 0))),
+ CUP_OF_TEA_GOLD(new Drink(new int[] {7736, 7735}, new SkillEffect(Skills.CONSTRUCTION, 3, 0), "You feel refreshed and ready for more building.")),
+ CUP_OF_TEA_GOLD_MILKY(new Drink(new int[] {7737, 7735}, new SkillEffect(Skills.CONSTRUCTION, 3, 0))),
+
+ /** Miscellaneous */
+ CHOCOLATE_BAR(new Food(new int[] {1973}, new HealingEffect(3))),
+ PURPLE_SWEETS(new Food(new int[] {4561}, new HealingEffect(0))),
+ PURPLE_SWEETS_STACKABLE(new Food(new int[] {10476}, new MultiEffect(new EnergyEffect(10), new RandomHealthEffect(1, 3)), "The sugary goodness heals some energy.", "The sugary goodness is yummy.")),
+ FIELD_RATION(new Food(new int[] {7934}, new HealingEffect(10))),
+ ROLL(new Food(new int[] {6963}, new HealingEffect(6))),
+ TCHIKI_MONKEY_NUTS(new Food(new int[] {7573}, new HealingEffect(5), "You eat the Tchiki monkey nuts. They taste nutty.")),
+ TCHIKI_MONKEY_PASTE(new Food(new int[] {7575}, new HealingEffect(5), "You eat the Tchiki monkey nut paste. It sticks to the roof of your mouth.")),
+ OOMLIE_WRAP(new Food(new int[] {Items.COOKED_OOMLIE_WRAP_2343}, new MultiEffect(new HealingEffect(14), new AchievementEffect(DiaryType.KARAMJA, 2, 2)))),
+ ROE(new Food(new int[]{11324}, new HealingEffect(3))),
+ EQUA_LEAVES(new Food(new int[]{2128}, new HealingEffect(1))),
+ CHOC_ICE(new Food(new int[]{6794}, new HealingEffect(6))),
+ EDIBLE_SEAWEED(new Food(new int[] {403}, new HealingEffect(4))),
+
+ /** Special Events */
+ PUMPKIN(new Food(new int[] {1959}, new HealingEffect(14))),
+ EASTER_EGG(new Food(new int[] {1961}, new HealingEffect(14))),
+
+ /** Potions */
+ STRENGTH(new Potion(new int[] {113, 115, 117, 119}, new SkillEffect(Skills.STRENGTH, 3, 0.1))),
+ ATTACK(new Potion(new int[] {2428, 121, 123, 125}, new SkillEffect(Skills.ATTACK, 3, 0.1))),
+ DEFENCE(new Potion(new int[] {2432, 133, 135, 137}, new SkillEffect(Skills.DEFENCE, 3, 0.1))),
+ RANGING(new Potion(new int[] {2444, 169, 171, 173}, new SkillEffect(Skills.RANGE, 3, 0.1))),
+ MAGIC(new Potion(new int[] {3040, 3042, 3044, 3046}, new SkillEffect(Skills.MAGIC, 3, 0.1))),
+ SUPER_STRENGTH(new Potion(new int[] {2440, 157, 159, 161}, new SkillEffect(Skills.STRENGTH, 3, 0.2))),
+ SUPER_ATTACK(new Potion(new int[] {2436, 145, 147, 149}, new SkillEffect(Skills.ATTACK, 3, 0.2))),
+ SUPER_DEFENCE(new Potion(new int[] {2442, 163, 165, 167}, new SkillEffect(Skills.DEFENCE, 3, 0.2))),
+ ANTIPOISON(new Potion(new int[] {2446, 175, 177, 179}, new MultiEffect(new SetAttributeEffect("poison:immunity", 143), new RemoveStateEffect(EntityState.POISONED.ordinal())))),
+ ANTIPOISON_(new Potion(new int[] {5943, 5945, 5947, 5949}, new MultiEffect(new SetAttributeEffect("poison:immunity", 863), new RemoveStateEffect(EntityState.POISONED.ordinal())))),
+ ANTIPOISON__(new Potion(new int[] {5952, 5954, 5956, 5958}, new MultiEffect(new SetAttributeEffect("poison:immunity", 2000), new RemoveStateEffect(EntityState.POISONED.ordinal())))),
+ SUPER_ANTIP(new Potion(new int[] {2448, 181, 183, 185}, new MultiEffect(new SetAttributeEffect("poison:immunity", 1000), new RemoveStateEffect(EntityState.POISONED.ordinal())))),
+ RELICYM(new Potion(new int[] {4842, 4844, 4846, 4848}, new MultiEffect(new SetAttributeEffect("disease:immunity", 300), new RemoveStateEffect("disease")))),
+ AGILITY(new Potion(new int[] {3032, 3034, 3036, 3038}, new SkillEffect(Skills.AGILITY, 3, 0))),
+ HUNTER(new Potion(new int[] {9998, 10000, 10002, 10004}, new SkillEffect(Skills.HUNTER, 3, 0))),
+ RESTORE(new Potion(new int[] {2430, 127, 129, 131}, new RestoreEffect(10, 0.3))),
+ SARA_BREW(new Potion(new int[] {6685, 6687, 6689, 6691}, new MultiEffect(new PercentHeal(2, .15), new SkillEffect(Skills.ATTACK, 0, -0.10), new SkillEffect(Skills.STRENGTH, 0, -0.10), new SkillEffect(Skills.MAGIC, 0, -0.10), new SkillEffect(Skills.RANGE, 0, -0.10), new SkillEffect(Skills.DEFENCE, 2, 0.2)))),
+ SUMMONING(new Potion(new int[] {12140, 12142, 12144, 12146}, new MultiEffect(new RestoreSummoningSpecial(), new SummoningEffect(7, 0.25)))),
+ COMBAT(new Potion(new int[] {9739, 9741, 9743, 9745}, new MultiEffect(new SkillEffect(Skills.STRENGTH, 3, .1), new SkillEffect(Skills.ATTACK, 3, .1)))),
+ ENERGY(new Potion(new int[] {3008, 3010, 3012, 3014}, new MultiEffect(new EnergyEffect(10), new HealingEffect(3)))),
+ FISHING(new Potion(new int[] {2438, 151, 153, 155}, new SkillEffect(Skills.FISHING, 3, 0))),
+ PRAYER(new Potion(new int[] {2434, 139, 141, 143}, new PrayerEffect(7, 0.25))),
+ SUPER_RESTO(new Potion(new int[] {3024, 3026, 3028, 3030}, new MultiEffect(new RestoreEffect(8, 0.25), new PrayerEffect(8, 0.25), new SummoningEffect(8, 0.25)))),
+ ZAMMY_BREW(new Potion(new int[] {2450, 189, 191, 193}, new MultiEffect(new DamageEffect(10, true), new SkillEffect(Skills.ATTACK, 0, 0.15), new SkillEffect(Skills.STRENGTH, 0, 0.25), new SkillEffect(Skills.DEFENCE, 0, -0.1), new RandomPrayerEffect(0, 10)))),
+ ANTIFIRE(new Potion(new int[] {2452, 2454, 2456, 2458}, new SetAttributeEffect("fire:immune", 600, true))),
+ GUTH_REST(new Potion(new int[] {4417, 4419, 4421, 4423}, new MultiEffect(new RemoveStateEffect(EntityState.POISONED.ordinal()), new EnergyEffect(5), new HealingEffect(5)))),
+ MAGIC_ESS(new Potion(new int[] {11491, 11489}, new SkillEffect(Skills.MAGIC,3,0))),
+ SANFEW(new Potion(new int[] {10925, 10927, 10929, 10931}, new MultiEffect(new RestoreEffect(8,0.25), new PrayerEffect(8,0.25), new RemoveStateEffect(EntityState.POISONED.ordinal()), new RemoveStateEffect("disease")))),
+ SUPER_ENERGY(new Potion(new int[] {3016, 3018, 3020, 3022}, new EnergyEffect(20))),
+ BLAMISH_OIL(new FakeConsumable(1582, new String[] {"You know... I'd really rather not."})),
+
+ /** Barbarian Mixes */
+ PRAYERMIX(new BarbarianMix(new int[] {11465, 11467}, new MultiEffect(new PrayerEffect(7, 0.25), new HealingEffect(6)))),
+ ZAMMY_MIX(new BarbarianMix(new int[] {11521, 11523}, new MultiEffect(new DamageEffect(10, true), new SkillEffect(Skills.ATTACK, 0, 0.15), new SkillEffect(Skills.STRENGTH, 0, 0.25), new SkillEffect(Skills.DEFENCE, 0, -0.1), new RandomPrayerEffect(0, 10)))),
+ ATT_MIX(new BarbarianMix(new int[] {11429, 11431}, new MultiEffect(new SkillEffect(Skills.ATTACK, 3, 0.1), new HealingEffect(3)))),
+ ANTIP_MIX(new BarbarianMix(new int[] {11433, 11435}, new MultiEffect(new RemoveStateEffect(EntityState.POISONED.ordinal()), new SetAttributeEffect("poison:immunity", 143), new HealingEffect(3)))),
+ RELIC_MIX(new BarbarianMix(new int[] {11437, 11439}, new MultiEffect(new RemoveStateEffect("disease"), new SetAttributeEffect("disease:immunity", 300), new HealingEffect(3)))),
+ STR_MIX(new BarbarianMix(new int[] {11443, 11441}, new MultiEffect(new SkillEffect(Skills.STRENGTH, 3, 0.1), new HealingEffect(3)))),
+ RESTO_MIX(new BarbarianMix(new int[] {11449, 11451}, new MultiEffect(new RestoreEffect(10, 0.3), new HealingEffect(3)))),
+ ENERGY_MIX(new BarbarianMix(new int[] {11453, 11455}, new MultiEffect(new EnergyEffect(10), new HealingEffect(6)))),
+ DEF_MIX(new BarbarianMix(new int[] {11457, 11459}, new MultiEffect(new SkillEffect(Skills.DEFENCE, 3, 0.1), new HealingEffect(6)))),
+ AGIL_MIX(new BarbarianMix(new int[] {11461, 11463}, new MultiEffect(new SkillEffect(Skills.AGILITY, 3, 0), new HealingEffect(6)))),
+ COMBAT_MIX(new BarbarianMix(new int[] {11445, 11447}, new MultiEffect(new SkillEffect(Skills.ATTACK, 3, 0.1), new SkillEffect(Skills.STRENGTH, 3, 0.1), new HealingEffect(6)))),
+ SUPER_ATT_MIX(new BarbarianMix(new int[] {11469, 11471}, new MultiEffect(new SkillEffect(Skills.ATTACK, 5, 0.15), new HealingEffect(6)))),
+ FISH_MIX(new BarbarianMix(new int[] {11477, 11479}, new MultiEffect(new SkillEffect(Skills.FISHING, 3, 0), new HealingEffect(6)))),
+ SUPER_ENERGY_MIX(new BarbarianMix(new int[] {11481, 11483}, new MultiEffect(new EnergyEffect(20), new HealingEffect(6)))),
+ HUNTING_MIX(new BarbarianMix(new int[] {11517, 11519}, new MultiEffect(new SkillEffect(Skills.HUNTER, 3, 0), new HealingEffect(6)))),
+ SUPER_STR_MIX(new BarbarianMix(new int[] {11485, 11487}, new MultiEffect(new SkillEffect(Skills.STRENGTH, 5, 0.15), new HealingEffect(6)))),
+
+ /** Stealing creation potions */
+ SC_PRAYER(new Potion(new int[] {14207, 14209, 14211, 14213, 14215}, new PrayerEffect(7, 0.25))),
+ SC_ENERGY(new Potion(new int[] {14217, 14219, 14221, 14223, 14225}, new EnergyEffect(20))),
+ SC_ATTACK(new Potion(new int[] {14227, 14229, 14231, 14233, 14235}, new SkillEffect(Skills.ATTACK, 3, 0.2))),
+ SC_STRENGTH(new Potion(new int[] {14237, 14239, 14241, 14243, 14245}, new SkillEffect(Skills.STRENGTH, 3, 0.2))),
+ SC_RANGE(new Potion(new int[] {14247, 14249, 14251, 14253, 14255}, new SkillEffect(Skills.RANGE, 3, 0.1))),
+ SC_DEFENCE(new Potion(new int[] {14257, 14259, 14261, 14263, 14265}, new SkillEffect(Skills.DEFENCE, 3, 0.1))),
+ SC_MAGIC(new Potion(new int[] {14267, 14269, 14271, 14273, 14275}, new SkillEffect(Skills.MAGIC, 3, 0.1))),
+ SC_SUMMONING(new Potion(new int[] {14277, 14279, 14281, 14283, 14285}, new SummoningEffect(7, 0.25)));
+
+ public static HashMap consumables = new HashMap<>();
+
+ private final Consumable consumable;
+
+ Consumables(Consumable consumable) {
+ this.consumable = consumable;
+ }
+
+ public Consumable getConsumable() {
+ return consumable;
+ }
+
+ public static Consumable getConsumableById(final int itemId) {
+ return consumables.get(itemId);
+ }
+
+ public static void add(final Consumable consumable) {
+ for (int id : consumable.getIds()) {
+ consumables.putIfAbsent(id, consumable);
+ }
+ }
+
+ /*
+ Static modifier used to populate search engine lists.
+ */
+ static {
+ for (Consumables consumable : Consumables.values()) {
+ add(consumable.consumable);
+ }
+ }
+}
diff --git a/Server/src/main/java/core/game/content/consumable/effects/AchievementEffect.java b/Server/src/main/content/data/consumables/effects/AchievementEffect.java
similarity index 84%
rename from Server/src/main/java/core/game/content/consumable/effects/AchievementEffect.java
rename to Server/src/main/content/data/consumables/effects/AchievementEffect.java
index fcff49f2d..402e0b540 100644
--- a/Server/src/main/java/core/game/content/consumable/effects/AchievementEffect.java
+++ b/Server/src/main/content/data/consumables/effects/AchievementEffect.java
@@ -1,8 +1,8 @@
-package core.game.content.consumable.effects;
+package content.data.consumables.effects;
import core.game.node.entity.player.Player;
import core.game.node.entity.player.link.diary.DiaryType;
-import core.game.content.consumable.ConsumableEffect;
+import core.game.consumable.ConsumableEffect;
public class AchievementEffect extends ConsumableEffect {
private final DiaryType diary;
diff --git a/Server/src/main/java/core/game/content/consumable/effects/DamageEffect.java b/Server/src/main/content/data/consumables/effects/DamageEffect.java
similarity index 88%
rename from Server/src/main/java/core/game/content/consumable/effects/DamageEffect.java
rename to Server/src/main/content/data/consumables/effects/DamageEffect.java
index e615dbe15..c4573306b 100644
--- a/Server/src/main/java/core/game/content/consumable/effects/DamageEffect.java
+++ b/Server/src/main/content/data/consumables/effects/DamageEffect.java
@@ -1,8 +1,8 @@
-package core.game.content.consumable.effects;
+package content.data.consumables.effects;
+import core.game.consumable.ConsumableEffect;
import core.game.node.entity.combat.ImpactHandler;
import core.game.node.entity.player.Player;
-import core.game.content.consumable.ConsumableEffect;
public class DamageEffect extends ConsumableEffect {
final double amt;
diff --git a/Server/src/main/java/core/game/content/consumable/effects/DraynorCabbageEffect.java b/Server/src/main/content/data/consumables/effects/DraynorCabbageEffect.java
similarity index 82%
rename from Server/src/main/java/core/game/content/consumable/effects/DraynorCabbageEffect.java
rename to Server/src/main/content/data/consumables/effects/DraynorCabbageEffect.java
index 96a260e9c..a58794c12 100644
--- a/Server/src/main/java/core/game/content/consumable/effects/DraynorCabbageEffect.java
+++ b/Server/src/main/content/data/consumables/effects/DraynorCabbageEffect.java
@@ -1,7 +1,7 @@
-package core.game.content.consumable.effects;
+package content.data.consumables.effects;
import core.game.node.entity.player.Player;
-import core.game.content.consumable.ConsumableEffect;
+import core.game.consumable.ConsumableEffect;
import core.game.node.entity.skill.Skills;
public class DraynorCabbageEffect extends ConsumableEffect {
diff --git a/Server/src/main/java/core/game/content/consumable/effects/DwarvenRockCakeEffect.java b/Server/src/main/content/data/consumables/effects/DwarvenRockCakeEffect.java
similarity index 82%
rename from Server/src/main/java/core/game/content/consumable/effects/DwarvenRockCakeEffect.java
rename to Server/src/main/content/data/consumables/effects/DwarvenRockCakeEffect.java
index bd7bd887a..90febe9b7 100644
--- a/Server/src/main/java/core/game/content/consumable/effects/DwarvenRockCakeEffect.java
+++ b/Server/src/main/content/data/consumables/effects/DwarvenRockCakeEffect.java
@@ -1,7 +1,7 @@
-package core.game.content.consumable.effects;
+package content.data.consumables.effects;
+import core.game.consumable.ConsumableEffect;
import core.game.node.entity.player.Player;
-import core.game.content.consumable.ConsumableEffect;
public class DwarvenRockCakeEffect extends ConsumableEffect {
diff --git a/Server/src/main/java/core/game/content/consumable/effects/EnergyEffect.java b/Server/src/main/content/data/consumables/effects/EnergyEffect.java
similarity index 74%
rename from Server/src/main/java/core/game/content/consumable/effects/EnergyEffect.java
rename to Server/src/main/content/data/consumables/effects/EnergyEffect.java
index 6ffb4987c..75e23b422 100644
--- a/Server/src/main/java/core/game/content/consumable/effects/EnergyEffect.java
+++ b/Server/src/main/content/data/consumables/effects/EnergyEffect.java
@@ -1,7 +1,7 @@
-package core.game.content.consumable.effects;
+package content.data.consumables.effects;
+import core.game.consumable.ConsumableEffect;
import core.game.node.entity.player.Player;
-import core.game.content.consumable.ConsumableEffect;
public class EnergyEffect extends ConsumableEffect {
double amt;
diff --git a/Server/src/main/java/core/game/content/consumable/effects/HealingEffect.java b/Server/src/main/content/data/consumables/effects/HealingEffect.java
similarity index 78%
rename from Server/src/main/java/core/game/content/consumable/effects/HealingEffect.java
rename to Server/src/main/content/data/consumables/effects/HealingEffect.java
index f6e81469e..96512e6a8 100644
--- a/Server/src/main/java/core/game/content/consumable/effects/HealingEffect.java
+++ b/Server/src/main/content/data/consumables/effects/HealingEffect.java
@@ -1,7 +1,7 @@
-package core.game.content.consumable.effects;
+package content.data.consumables.effects;
import core.game.node.entity.player.Player;
-import core.game.content.consumable.ConsumableEffect;
+import core.game.consumable.ConsumableEffect;
public class HealingEffect extends ConsumableEffect {
int amt;
diff --git a/Server/src/main/java/core/game/content/consumable/effects/KebabEffect.java b/Server/src/main/content/data/consumables/effects/KebabEffect.java
similarity index 97%
rename from Server/src/main/java/core/game/content/consumable/effects/KebabEffect.java
rename to Server/src/main/content/data/consumables/effects/KebabEffect.java
index d3851d2e0..6b4f5c390 100644
--- a/Server/src/main/java/core/game/content/consumable/effects/KebabEffect.java
+++ b/Server/src/main/content/data/consumables/effects/KebabEffect.java
@@ -1,8 +1,8 @@
-package core.game.content.consumable.effects;
+package content.data.consumables.effects;
+import core.game.consumable.ConsumableEffect;
import core.game.node.entity.player.Player;
import core.tools.RandomFunction;
-import core.game.content.consumable.ConsumableEffect;
import core.game.node.entity.skill.Skills;
/**
diff --git a/Server/src/main/kotlin/rs09/game/content/consumable/effects/KegOfBeerEffect.kt b/Server/src/main/content/data/consumables/effects/KegOfBeerEffect.kt
similarity index 56%
rename from Server/src/main/kotlin/rs09/game/content/consumable/effects/KegOfBeerEffect.kt
rename to Server/src/main/content/data/consumables/effects/KegOfBeerEffect.kt
index dcb8a5e6a..89232abee 100644
--- a/Server/src/main/kotlin/rs09/game/content/consumable/effects/KegOfBeerEffect.kt
+++ b/Server/src/main/content/data/consumables/effects/KegOfBeerEffect.kt
@@ -1,9 +1,6 @@
-package rs09.game.content.consumable.effects
+package content.data.consumables.effects
-import core.game.content.consumable.ConsumableEffect
-import core.game.content.consumable.effects.HealingEffect
-import core.game.content.consumable.effects.MultiEffect
-import core.game.content.consumable.effects.SkillEffect
+import core.game.consumable.ConsumableEffect
import core.game.node.entity.player.Player
import core.game.node.entity.skill.Skills
diff --git a/Server/src/main/java/core/game/content/consumable/effects/MatureWmbEffect.java b/Server/src/main/content/data/consumables/effects/MatureWmbEffect.java
similarity index 87%
rename from Server/src/main/java/core/game/content/consumable/effects/MatureWmbEffect.java
rename to Server/src/main/content/data/consumables/effects/MatureWmbEffect.java
index 66e7c6936..d2c5a98ed 100644
--- a/Server/src/main/java/core/game/content/consumable/effects/MatureWmbEffect.java
+++ b/Server/src/main/content/data/consumables/effects/MatureWmbEffect.java
@@ -1,7 +1,7 @@
-package core.game.content.consumable.effects;
+package content.data.consumables.effects;
+import core.game.consumable.ConsumableEffect;
import core.game.node.entity.player.Player;
-import core.game.content.consumable.ConsumableEffect;
import core.game.node.entity.skill.Skills;
public class MatureWmbEffect extends ConsumableEffect {
diff --git a/Server/src/main/java/core/game/content/consumable/effects/MultiEffect.java b/Server/src/main/content/data/consumables/effects/MultiEffect.java
similarity index 85%
rename from Server/src/main/java/core/game/content/consumable/effects/MultiEffect.java
rename to Server/src/main/content/data/consumables/effects/MultiEffect.java
index 3b9b8e5ff..228c7fac6 100644
--- a/Server/src/main/java/core/game/content/consumable/effects/MultiEffect.java
+++ b/Server/src/main/content/data/consumables/effects/MultiEffect.java
@@ -1,7 +1,7 @@
-package core.game.content.consumable.effects;
+package content.data.consumables.effects;
+import core.game.consumable.ConsumableEffect;
import core.game.node.entity.player.Player;
-import core.game.content.consumable.ConsumableEffect;
public class MultiEffect extends ConsumableEffect {
private ConsumableEffect[] effects;
diff --git a/Server/src/main/java/core/game/content/consumable/effects/NettleTeaEffect.java b/Server/src/main/content/data/consumables/effects/NettleTeaEffect.java
similarity index 84%
rename from Server/src/main/java/core/game/content/consumable/effects/NettleTeaEffect.java
rename to Server/src/main/content/data/consumables/effects/NettleTeaEffect.java
index 068422de6..8f20e8c33 100644
--- a/Server/src/main/java/core/game/content/consumable/effects/NettleTeaEffect.java
+++ b/Server/src/main/content/data/consumables/effects/NettleTeaEffect.java
@@ -1,7 +1,7 @@
-package core.game.content.consumable.effects;
+package content.data.consumables.effects;
+import core.game.consumable.ConsumableEffect;
import core.game.node.entity.player.Player;
-import core.game.content.consumable.ConsumableEffect;
public class NettleTeaEffect extends ConsumableEffect {
diff --git a/Server/src/main/java/core/game/content/consumable/effects/PercentHeal.java b/Server/src/main/content/data/consumables/effects/PercentHeal.java
similarity index 86%
rename from Server/src/main/java/core/game/content/consumable/effects/PercentHeal.java
rename to Server/src/main/content/data/consumables/effects/PercentHeal.java
index 22711403a..d1d36145f 100644
--- a/Server/src/main/java/core/game/content/consumable/effects/PercentHeal.java
+++ b/Server/src/main/content/data/consumables/effects/PercentHeal.java
@@ -1,7 +1,7 @@
-package core.game.content.consumable.effects;
+package content.data.consumables.effects;
+import core.game.consumable.ConsumableEffect;
import core.game.node.entity.player.Player;
-import core.game.content.consumable.ConsumableEffect;
public class PercentHeal extends ConsumableEffect {
int base = 0;
diff --git a/Server/src/main/java/core/game/content/consumable/effects/PercentageHealthEffect.java b/Server/src/main/content/data/consumables/effects/PercentageHealthEffect.java
similarity index 85%
rename from Server/src/main/java/core/game/content/consumable/effects/PercentageHealthEffect.java
rename to Server/src/main/content/data/consumables/effects/PercentageHealthEffect.java
index 41383eec4..cd39cb57e 100644
--- a/Server/src/main/java/core/game/content/consumable/effects/PercentageHealthEffect.java
+++ b/Server/src/main/content/data/consumables/effects/PercentageHealthEffect.java
@@ -1,7 +1,7 @@
-package core.game.content.consumable.effects;
+package content.data.consumables.effects;
import core.game.node.entity.player.Player;
-import core.game.content.consumable.ConsumableEffect;
+import core.game.consumable.ConsumableEffect;
public class PercentageHealthEffect extends ConsumableEffect {
diff --git a/Server/src/main/java/core/game/content/consumable/effects/PoisonEffect.java b/Server/src/main/content/data/consumables/effects/PoisonEffect.java
similarity index 83%
rename from Server/src/main/java/core/game/content/consumable/effects/PoisonEffect.java
rename to Server/src/main/content/data/consumables/effects/PoisonEffect.java
index 26e50dbd2..82adbeb81 100644
--- a/Server/src/main/java/core/game/content/consumable/effects/PoisonEffect.java
+++ b/Server/src/main/content/data/consumables/effects/PoisonEffect.java
@@ -1,8 +1,8 @@
-package core.game.content.consumable.effects;
+package content.data.consumables.effects;
+import core.game.consumable.ConsumableEffect;
import core.game.node.entity.combat.ImpactHandler;
import core.game.node.entity.player.Player;
-import core.game.content.consumable.ConsumableEffect;
public class PoisonEffect extends ConsumableEffect {
diff --git a/Server/src/main/java/core/game/content/consumable/effects/PoisonKarambwanEffect.java b/Server/src/main/content/data/consumables/effects/PoisonKarambwanEffect.java
similarity index 80%
rename from Server/src/main/java/core/game/content/consumable/effects/PoisonKarambwanEffect.java
rename to Server/src/main/content/data/consumables/effects/PoisonKarambwanEffect.java
index f2ed9cb46..ceea78062 100644
--- a/Server/src/main/java/core/game/content/consumable/effects/PoisonKarambwanEffect.java
+++ b/Server/src/main/content/data/consumables/effects/PoisonKarambwanEffect.java
@@ -1,7 +1,7 @@
-package core.game.content.consumable.effects;
+package content.data.consumables.effects;
+import core.game.consumable.ConsumableEffect;
import core.game.node.entity.player.Player;
-import core.game.content.consumable.ConsumableEffect;
public class PoisonKarambwanEffect extends ConsumableEffect {
diff --git a/Server/src/main/java/core/game/content/consumable/effects/PrayerEffect.java b/Server/src/main/content/data/consumables/effects/PrayerEffect.java
similarity index 83%
rename from Server/src/main/java/core/game/content/consumable/effects/PrayerEffect.java
rename to Server/src/main/content/data/consumables/effects/PrayerEffect.java
index 0c87c5933..65d5516aa 100644
--- a/Server/src/main/java/core/game/content/consumable/effects/PrayerEffect.java
+++ b/Server/src/main/content/data/consumables/effects/PrayerEffect.java
@@ -1,7 +1,7 @@
-package core.game.content.consumable.effects;
+package content.data.consumables.effects;
+import core.game.consumable.ConsumableEffect;
import core.game.node.entity.player.Player;
-import core.game.content.consumable.ConsumableEffect;
import core.game.node.entity.skill.Skills;
public class PrayerEffect extends ConsumableEffect {
diff --git a/Server/src/main/java/core/game/content/consumable/effects/RandomEnergyEffect.java b/Server/src/main/content/data/consumables/effects/RandomEnergyEffect.java
similarity index 81%
rename from Server/src/main/java/core/game/content/consumable/effects/RandomEnergyEffect.java
rename to Server/src/main/content/data/consumables/effects/RandomEnergyEffect.java
index ee8fe238f..cab047a1c 100644
--- a/Server/src/main/java/core/game/content/consumable/effects/RandomEnergyEffect.java
+++ b/Server/src/main/content/data/consumables/effects/RandomEnergyEffect.java
@@ -1,8 +1,8 @@
-package core.game.content.consumable.effects;
+package content.data.consumables.effects;
+import core.game.consumable.ConsumableEffect;
import core.game.node.entity.player.Player;
import core.tools.RandomFunction;
-import core.game.content.consumable.ConsumableEffect;
public class RandomEnergyEffect extends ConsumableEffect {
diff --git a/Server/src/main/java/core/game/content/consumable/effects/RandomHealthEffect.java b/Server/src/main/content/data/consumables/effects/RandomHealthEffect.java
similarity index 88%
rename from Server/src/main/java/core/game/content/consumable/effects/RandomHealthEffect.java
rename to Server/src/main/content/data/consumables/effects/RandomHealthEffect.java
index 59e00df59..76e4c6514 100644
--- a/Server/src/main/java/core/game/content/consumable/effects/RandomHealthEffect.java
+++ b/Server/src/main/content/data/consumables/effects/RandomHealthEffect.java
@@ -1,8 +1,8 @@
-package core.game.content.consumable.effects;
+package content.data.consumables.effects;
+import core.game.consumable.ConsumableEffect;
import core.game.node.entity.player.Player;
import core.tools.RandomFunction;
-import core.game.content.consumable.ConsumableEffect;
public class RandomHealthEffect extends ConsumableEffect {
diff --git a/Server/src/main/java/core/game/content/consumable/effects/RandomPrayerEffect.java b/Server/src/main/content/data/consumables/effects/RandomPrayerEffect.java
similarity index 81%
rename from Server/src/main/java/core/game/content/consumable/effects/RandomPrayerEffect.java
rename to Server/src/main/content/data/consumables/effects/RandomPrayerEffect.java
index ab29251a3..0d669a4df 100644
--- a/Server/src/main/java/core/game/content/consumable/effects/RandomPrayerEffect.java
+++ b/Server/src/main/content/data/consumables/effects/RandomPrayerEffect.java
@@ -1,8 +1,8 @@
-package core.game.content.consumable.effects;
+package content.data.consumables.effects;
import core.game.node.entity.player.Player;
import core.tools.RandomFunction;
-import core.game.content.consumable.ConsumableEffect;
+import core.game.consumable.ConsumableEffect;
public class RandomPrayerEffect extends ConsumableEffect {
diff --git a/Server/src/main/java/core/game/content/consumable/effects/RandomSkillEffect.java b/Server/src/main/content/data/consumables/effects/RandomSkillEffect.java
similarity index 83%
rename from Server/src/main/java/core/game/content/consumable/effects/RandomSkillEffect.java
rename to Server/src/main/content/data/consumables/effects/RandomSkillEffect.java
index d2a5fea6b..3c7c11c23 100644
--- a/Server/src/main/java/core/game/content/consumable/effects/RandomSkillEffect.java
+++ b/Server/src/main/content/data/consumables/effects/RandomSkillEffect.java
@@ -1,8 +1,8 @@
-package core.game.content.consumable.effects;
+package content.data.consumables.effects;
+import core.game.consumable.ConsumableEffect;
import core.game.node.entity.player.Player;
import core.tools.RandomFunction;
-import core.game.content.consumable.ConsumableEffect;
public class RandomSkillEffect extends ConsumableEffect {
diff --git a/Server/src/main/java/core/game/content/consumable/effects/RemoveStateEffect.java b/Server/src/main/content/data/consumables/effects/RemoveStateEffect.java
similarity index 85%
rename from Server/src/main/java/core/game/content/consumable/effects/RemoveStateEffect.java
rename to Server/src/main/content/data/consumables/effects/RemoveStateEffect.java
index f6a64af83..7c2d5040a 100644
--- a/Server/src/main/java/core/game/content/consumable/effects/RemoveStateEffect.java
+++ b/Server/src/main/content/data/consumables/effects/RemoveStateEffect.java
@@ -1,8 +1,8 @@
-package core.game.content.consumable.effects;
+package content.data.consumables.effects;
+import core.game.consumable.ConsumableEffect;
import core.game.node.entity.player.Player;
import core.game.node.entity.state.EntityState;
-import core.game.content.consumable.ConsumableEffect;
public class RemoveStateEffect extends ConsumableEffect {
int state = -1;
diff --git a/Server/src/main/java/core/game/content/consumable/effects/RestoreEffect.java b/Server/src/main/content/data/consumables/effects/RestoreEffect.java
similarity index 88%
rename from Server/src/main/java/core/game/content/consumable/effects/RestoreEffect.java
rename to Server/src/main/content/data/consumables/effects/RestoreEffect.java
index f49c40e49..3b57acabf 100644
--- a/Server/src/main/java/core/game/content/consumable/effects/RestoreEffect.java
+++ b/Server/src/main/content/data/consumables/effects/RestoreEffect.java
@@ -1,7 +1,7 @@
-package core.game.content.consumable.effects;
+package content.data.consumables.effects;
import core.game.node.entity.player.Player;
-import core.game.content.consumable.ConsumableEffect;
+import core.game.consumable.ConsumableEffect;
import core.game.node.entity.skill.Skills;
public class RestoreEffect extends ConsumableEffect {
diff --git a/Server/src/main/kotlin/rs09/game/content/consumable/effects/RestoreSummoningSpecial.kt b/Server/src/main/content/data/consumables/effects/RestoreSummoningSpecial.kt
similarity index 69%
rename from Server/src/main/kotlin/rs09/game/content/consumable/effects/RestoreSummoningSpecial.kt
rename to Server/src/main/content/data/consumables/effects/RestoreSummoningSpecial.kt
index 491d55a1a..51b727dab 100644
--- a/Server/src/main/kotlin/rs09/game/content/consumable/effects/RestoreSummoningSpecial.kt
+++ b/Server/src/main/content/data/consumables/effects/RestoreSummoningSpecial.kt
@@ -1,6 +1,6 @@
-package rs09.game.content.consumable.effects
+package content.data.consumables.effects
-import core.game.content.consumable.ConsumableEffect
+import core.game.consumable.ConsumableEffect
import core.game.node.entity.player.Player
class RestoreSummoningSpecial : ConsumableEffect(){
diff --git a/Server/src/main/java/core/game/content/consumable/effects/RockCakeEffect.java b/Server/src/main/content/data/consumables/effects/RockCakeEffect.java
similarity index 82%
rename from Server/src/main/java/core/game/content/consumable/effects/RockCakeEffect.java
rename to Server/src/main/content/data/consumables/effects/RockCakeEffect.java
index 54d6c0afa..eb2ed364b 100644
--- a/Server/src/main/java/core/game/content/consumable/effects/RockCakeEffect.java
+++ b/Server/src/main/content/data/consumables/effects/RockCakeEffect.java
@@ -1,7 +1,7 @@
-package core.game.content.consumable.effects;
+package content.data.consumables.effects;
+import core.game.consumable.ConsumableEffect;
import core.game.node.entity.player.Player;
-import core.game.content.consumable.ConsumableEffect;
public class RockCakeEffect extends ConsumableEffect {
diff --git a/Server/src/main/java/core/game/content/consumable/effects/SetAttributeEffect.java b/Server/src/main/content/data/consumables/effects/SetAttributeEffect.java
similarity index 86%
rename from Server/src/main/java/core/game/content/consumable/effects/SetAttributeEffect.java
rename to Server/src/main/content/data/consumables/effects/SetAttributeEffect.java
index 6a2b6776c..b00296143 100644
--- a/Server/src/main/java/core/game/content/consumable/effects/SetAttributeEffect.java
+++ b/Server/src/main/content/data/consumables/effects/SetAttributeEffect.java
@@ -1,8 +1,8 @@
-package core.game.content.consumable.effects;
+package content.data.consumables.effects;
+import core.game.consumable.ConsumableEffect;
import core.game.node.entity.player.Player;
-import rs09.game.world.GameWorld;
-import core.game.content.consumable.ConsumableEffect;
+import core.game.world.GameWorld;
public class SetAttributeEffect extends ConsumableEffect {
String attrString;
diff --git a/Server/src/main/java/core/game/content/consumable/effects/SkillEffect.java b/Server/src/main/content/data/consumables/effects/SkillEffect.java
similarity index 87%
rename from Server/src/main/java/core/game/content/consumable/effects/SkillEffect.java
rename to Server/src/main/content/data/consumables/effects/SkillEffect.java
index d6498e222..56c6b59f3 100644
--- a/Server/src/main/java/core/game/content/consumable/effects/SkillEffect.java
+++ b/Server/src/main/content/data/consumables/effects/SkillEffect.java
@@ -1,7 +1,7 @@
-package core.game.content.consumable.effects;
+package content.data.consumables.effects;
+import core.game.consumable.ConsumableEffect;
import core.game.node.entity.player.Player;
-import core.game.content.consumable.ConsumableEffect;
import core.game.node.entity.skill.Skills;
public class SkillEffect extends ConsumableEffect {
diff --git a/Server/src/main/java/core/game/content/consumable/effects/SmellingUgthankiKebabEffect.java b/Server/src/main/content/data/consumables/effects/SmellingUgthankiKebabEffect.java
similarity index 89%
rename from Server/src/main/java/core/game/content/consumable/effects/SmellingUgthankiKebabEffect.java
rename to Server/src/main/content/data/consumables/effects/SmellingUgthankiKebabEffect.java
index c80c191e1..ab0f07319 100644
--- a/Server/src/main/java/core/game/content/consumable/effects/SmellingUgthankiKebabEffect.java
+++ b/Server/src/main/content/data/consumables/effects/SmellingUgthankiKebabEffect.java
@@ -1,8 +1,8 @@
-package core.game.content.consumable.effects;
+package content.data.consumables.effects;
+import core.game.consumable.ConsumableEffect;
import core.game.node.entity.player.Player;
import core.tools.RandomFunction;
-import core.game.content.consumable.ConsumableEffect;
/**
* According to the OSRS wiki, the smelling ugthanki kebab will usually heal nothing when eaten, but sometimes heals for 9.
diff --git a/Server/src/main/java/core/game/content/consumable/effects/SummoningEffect.java b/Server/src/main/content/data/consumables/effects/SummoningEffect.java
similarity index 84%
rename from Server/src/main/java/core/game/content/consumable/effects/SummoningEffect.java
rename to Server/src/main/content/data/consumables/effects/SummoningEffect.java
index d1ea42804..be7d0b07f 100644
--- a/Server/src/main/java/core/game/content/consumable/effects/SummoningEffect.java
+++ b/Server/src/main/content/data/consumables/effects/SummoningEffect.java
@@ -1,7 +1,7 @@
-package core.game.content.consumable.effects;
+package content.data.consumables.effects;
+import core.game.consumable.ConsumableEffect;
import core.game.node.entity.player.Player;
-import core.game.content.consumable.ConsumableEffect;
import core.game.node.entity.skill.Skills;
public class SummoningEffect extends ConsumableEffect {
diff --git a/Server/src/main/java/core/game/content/consumable/effects/SuperKebabEffect.java b/Server/src/main/content/data/consumables/effects/SuperKebabEffect.java
similarity index 89%
rename from Server/src/main/java/core/game/content/consumable/effects/SuperKebabEffect.java
rename to Server/src/main/content/data/consumables/effects/SuperKebabEffect.java
index 127fd63e8..79f800594 100644
--- a/Server/src/main/java/core/game/content/consumable/effects/SuperKebabEffect.java
+++ b/Server/src/main/content/data/consumables/effects/SuperKebabEffect.java
@@ -1,8 +1,8 @@
-package core.game.content.consumable.effects;
+package content.data.consumables.effects;
+import core.game.consumable.ConsumableEffect;
import core.game.node.entity.player.Player;
import core.tools.RandomFunction;
-import core.game.content.consumable.ConsumableEffect;
import core.game.node.entity.skill.Skills;
diff --git a/Server/src/main/java/core/game/content/consumable/effects/TroubleBrewingRumEffect.java b/Server/src/main/content/data/consumables/effects/TroubleBrewingRumEffect.java
similarity index 91%
rename from Server/src/main/java/core/game/content/consumable/effects/TroubleBrewingRumEffect.java
rename to Server/src/main/content/data/consumables/effects/TroubleBrewingRumEffect.java
index c9fa70b82..56cd91a24 100644
--- a/Server/src/main/java/core/game/content/consumable/effects/TroubleBrewingRumEffect.java
+++ b/Server/src/main/content/data/consumables/effects/TroubleBrewingRumEffect.java
@@ -1,9 +1,9 @@
-package core.game.content.consumable.effects;
+package content.data.consumables.effects;
+import core.game.consumable.ConsumableEffect;
import core.game.node.entity.player.Player;
import core.game.system.task.Pulse;
import core.game.world.map.Location;
-import core.game.content.consumable.ConsumableEffect;
public class TroubleBrewingRumEffect extends ConsumableEffect {
diff --git a/Server/src/main/java/core/game/content/consumable/effects/UgthankiKebabEffect.java b/Server/src/main/content/data/consumables/effects/UgthankiKebabEffect.java
similarity index 84%
rename from Server/src/main/java/core/game/content/consumable/effects/UgthankiKebabEffect.java
rename to Server/src/main/content/data/consumables/effects/UgthankiKebabEffect.java
index d141d365f..dd8e35d84 100644
--- a/Server/src/main/java/core/game/content/consumable/effects/UgthankiKebabEffect.java
+++ b/Server/src/main/content/data/consumables/effects/UgthankiKebabEffect.java
@@ -1,7 +1,7 @@
-package core.game.content.consumable.effects;
+package content.data.consumables.effects;
+import core.game.consumable.ConsumableEffect;
import core.game.node.entity.player.Player;
-import core.game.content.consumable.ConsumableEffect;
public class UgthankiKebabEffect extends ConsumableEffect {
diff --git a/Server/src/main/java/core/game/content/consumable/effects/WizardsMindBombEffect.java b/Server/src/main/content/data/consumables/effects/WizardsMindBombEffect.java
similarity index 87%
rename from Server/src/main/java/core/game/content/consumable/effects/WizardsMindBombEffect.java
rename to Server/src/main/content/data/consumables/effects/WizardsMindBombEffect.java
index c40e61480..52a0e4229 100644
--- a/Server/src/main/java/core/game/content/consumable/effects/WizardsMindBombEffect.java
+++ b/Server/src/main/content/data/consumables/effects/WizardsMindBombEffect.java
@@ -1,7 +1,7 @@
-package core.game.content.consumable.effects;
+package content.data.consumables.effects;
+import core.game.consumable.ConsumableEffect;
import core.game.node.entity.player.Player;
-import core.game.content.consumable.ConsumableEffect;
import core.game.node.entity.skill.Skills;
public class WizardsMindBombEffect extends ConsumableEffect {
diff --git a/Server/src/main/java/core/game/content/global/SkillcapePerks.java b/Server/src/main/content/data/skill/SkillcapePerks.java
similarity index 96%
rename from Server/src/main/java/core/game/content/global/SkillcapePerks.java
rename to Server/src/main/content/data/skill/SkillcapePerks.java
index 25bb0b3f9..d9109a18f 100644
--- a/Server/src/main/java/core/game/content/global/SkillcapePerks.java
+++ b/Server/src/main/content/data/skill/SkillcapePerks.java
@@ -1,4 +1,4 @@
-package core.game.content.global;
+package content.data.skill;
/**
* Handles the skillcape perks.
diff --git a/Server/src/main/java/core/game/content/global/SkillingPets.java b/Server/src/main/content/data/skill/SkillingPets.java
similarity index 96%
rename from Server/src/main/java/core/game/content/global/SkillingPets.java
rename to Server/src/main/content/data/skill/SkillingPets.java
index 8c34f7d0c..4ea03edd9 100644
--- a/Server/src/main/java/core/game/content/global/SkillingPets.java
+++ b/Server/src/main/content/data/skill/SkillingPets.java
@@ -1,9 +1,9 @@
-package core.game.content.global;
+package content.data.skill;
import core.game.node.entity.skill.Skills;
import core.game.node.entity.player.Player;
import core.game.node.item.Item;
-import rs09.game.world.repository.Repository;
+import core.game.world.repository.Repository;
/**
* Represents the skilling pets obtained randomly.
diff --git a/Server/src/main/java/core/game/node/entity/skill/gather/SkillingTool.java b/Server/src/main/content/data/skill/SkillingTool.java
similarity index 99%
rename from Server/src/main/java/core/game/node/entity/skill/gather/SkillingTool.java
rename to Server/src/main/content/data/skill/SkillingTool.java
index a77366987..cb0b7565f 100644
--- a/Server/src/main/java/core/game/node/entity/skill/gather/SkillingTool.java
+++ b/Server/src/main/content/data/skill/SkillingTool.java
@@ -1,4 +1,4 @@
-package core.game.node.entity.skill.gather;
+package content.data.skill;
import core.game.node.entity.player.Player;
import core.game.node.entity.skill.Skills;
diff --git a/Server/src/main/java/core/game/node/entity/npc/drop/AllotmentSeedDropTable.java b/Server/src/main/content/data/tables/AllotmentSeedDropTable.java
similarity index 93%
rename from Server/src/main/java/core/game/node/entity/npc/drop/AllotmentSeedDropTable.java
rename to Server/src/main/content/data/tables/AllotmentSeedDropTable.java
index 71c3c9d07..4523be955 100644
--- a/Server/src/main/java/core/game/node/entity/npc/drop/AllotmentSeedDropTable.java
+++ b/Server/src/main/content/data/tables/AllotmentSeedDropTable.java
@@ -1,6 +1,6 @@
-package core.game.node.entity.npc.drop;
+package content.data.tables;
-import api.StartupListener;
+import core.api.StartupListener;
import core.game.node.item.Item;
import core.game.node.item.WeightedChanceItem;
import core.tools.RandomFunction;
@@ -8,8 +8,8 @@ import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
-import rs09.ServerConstants;
-import rs09.game.system.SystemLogger;
+import core.ServerConstants;
+import core.tools.SystemLogger;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
@@ -18,7 +18,7 @@ import java.io.File;
import java.util.ArrayList;
import java.util.List;
-import static rs09.game.system.SystemLogger.logInfo;
+import static core.tools.SystemLogger.logInfo;
/**
* Handles the allotment seed drop table.
diff --git a/Server/src/main/java/core/game/content/global/BirdNest.java b/Server/src/main/content/data/tables/BirdNest.java
similarity index 99%
rename from Server/src/main/java/core/game/content/global/BirdNest.java
rename to Server/src/main/content/data/tables/BirdNest.java
index 6470c0309..929ca3adc 100644
--- a/Server/src/main/java/core/game/content/global/BirdNest.java
+++ b/Server/src/main/content/data/tables/BirdNest.java
@@ -1,4 +1,4 @@
-package core.game.content.global;
+package content.data.tables;
import org.rs09.consts.Items;
import core.game.node.entity.npc.drop.NPCDropTables;
diff --git a/Server/src/main/java/core/game/node/entity/npc/drop/CELEMinorTable.java b/Server/src/main/content/data/tables/CELEMinorTable.java
similarity index 91%
rename from Server/src/main/java/core/game/node/entity/npc/drop/CELEMinorTable.java
rename to Server/src/main/content/data/tables/CELEMinorTable.java
index 5364d3b74..bb19629f7 100644
--- a/Server/src/main/java/core/game/node/entity/npc/drop/CELEMinorTable.java
+++ b/Server/src/main/content/data/tables/CELEMinorTable.java
@@ -1,96 +1,96 @@
-package core.game.node.entity.npc.drop;
-
-import api.StartupListener;
-import rs09.ServerConstants;
-import core.game.node.item.Item;
-import core.game.node.item.WeightedChanceItem;
-import rs09.game.system.SystemLogger;
-import core.tools.RandomFunction;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-import static rs09.game.system.SystemLogger.logInfo;
-
-/**
- * Handles the Chaos Elemental's minor drop table. It is supposed to roll this table alongside its standard major drops on the main table.
- * @author Crash
- */
-public final class CELEMinorTable implements StartupListener {
-
- /**
- * The item id of the item representing the C. Ele minor drop table slot in a drop
- * table.
- */
- public static final int SLOT_ITEM_ID = 799; // Crash: Item ID 799 is currently a null, blank paper note object. Unsure if used for cutscene/cutscene items, but hijacking this as C.Ele's item container as it'll never be dropped or obtained in normal gameplay.
-
- /**
- * The rare drop table.
- */
- private static final List TABLE = new ArrayList<>(20);
-
-
- /**
- * Initialize needed objects for xml reading/writing
- */
- static DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- static DocumentBuilder builder;
-
- static {
- try {
- builder = factory.newDocumentBuilder();
- } catch (ParserConfigurationException e) {
- e.printStackTrace();
- }
- }
-
- public CELEMinorTable() throws ParserConfigurationException {}
-
- @Override
- public void startup() {
- if(ServerConstants.CELEDT_DATA_PATH != null && !new File(ServerConstants.CELEDT_DATA_PATH).exists()){
- SystemLogger.logErr(this.getClass(), "Can't locate CELEDT file at " + ServerConstants.CELEDT_DATA_PATH);
- return;
- }
- parse(ServerConstants.CELEDT_DATA_PATH);
- logInfo(this.getClass(), "Loaded up Chaos Elemental drop table from " + ServerConstants.CELEDT_DATA_PATH);
- }
-
- /**
- * Parses the xml file for the CELEDT.
- * @param file the .xml file containing the CELEDT.
- */
- public static void parse(String file){
- try {
- Document doc = builder.parse(file);
-
- NodeList itemNodes = doc.getElementsByTagName("item");
- for(int i = 0; i < itemNodes.getLength(); i++){
- Node itemNode = itemNodes.item(i);
- if(itemNode.getNodeType() == Node.ELEMENT_NODE){
- Element item = (Element) itemNode;
- int itemId = Integer.parseInt(item.getAttribute("id"));
- int minAmt = Integer.parseInt(item.getAttribute("minAmt"));
- int maxAmt = Integer.parseInt(item.getAttribute("maxAmt"));
- int weight = Integer.parseInt(item.getAttribute("weight"));
-
- TABLE.add(new WeightedChanceItem(itemId,minAmt,maxAmt,weight));
- }
- }
- } catch (Exception e){
- e.printStackTrace();
- }
- }
-
- public static Item retrieve(){
- return RandomFunction.rollWeightedChanceTable(TABLE);
- }
+package content.data.tables;
+
+import core.api.StartupListener;
+import core.ServerConstants;
+import core.game.node.item.Item;
+import core.game.node.item.WeightedChanceItem;
+import core.tools.SystemLogger;
+import core.tools.RandomFunction;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import static core.tools.SystemLogger.logInfo;
+
+/**
+ * Handles the Chaos Elemental's minor drop table. It is supposed to roll this table alongside its standard major drops on the main table.
+ * @author Crash
+ */
+public final class CELEMinorTable implements StartupListener {
+
+ /**
+ * The item id of the item representing the C. Ele minor drop table slot in a drop
+ * table.
+ */
+ public static final int SLOT_ITEM_ID = 799; // Crash: Item ID 799 is currently a null, blank paper note object. Unsure if used for cutscene/cutscene items, but hijacking this as C.Ele's item container as it'll never be dropped or obtained in normal gameplay.
+
+ /**
+ * The rare drop table.
+ */
+ private static final List TABLE = new ArrayList<>(20);
+
+
+ /**
+ * Initialize needed objects for xml reading/writing
+ */
+ static DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+ static DocumentBuilder builder;
+
+ static {
+ try {
+ builder = factory.newDocumentBuilder();
+ } catch (ParserConfigurationException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public CELEMinorTable() throws ParserConfigurationException {}
+
+ @Override
+ public void startup() {
+ if(ServerConstants.CELEDT_DATA_PATH != null && !new File(ServerConstants.CELEDT_DATA_PATH).exists()){
+ SystemLogger.logErr(this.getClass(), "Can't locate CELEDT file at " + ServerConstants.CELEDT_DATA_PATH);
+ return;
+ }
+ parse(ServerConstants.CELEDT_DATA_PATH);
+ logInfo(this.getClass(), "Loaded up Chaos Elemental drop table from " + ServerConstants.CELEDT_DATA_PATH);
+ }
+
+ /**
+ * Parses the xml file for the CELEDT.
+ * @param file the .xml file containing the CELEDT.
+ */
+ public static void parse(String file){
+ try {
+ Document doc = builder.parse(file);
+
+ NodeList itemNodes = doc.getElementsByTagName("item");
+ for(int i = 0; i < itemNodes.getLength(); i++){
+ Node itemNode = itemNodes.item(i);
+ if(itemNode.getNodeType() == Node.ELEMENT_NODE){
+ Element item = (Element) itemNode;
+ int itemId = Integer.parseInt(item.getAttribute("id"));
+ int minAmt = Integer.parseInt(item.getAttribute("minAmt"));
+ int maxAmt = Integer.parseInt(item.getAttribute("maxAmt"));
+ int weight = Integer.parseInt(item.getAttribute("weight"));
+
+ TABLE.add(new WeightedChanceItem(itemId,minAmt,maxAmt,weight));
+ }
+ }
+ } catch (Exception e){
+ e.printStackTrace();
+ }
+ }
+
+ public static Item retrieve(){
+ return RandomFunction.rollWeightedChanceTable(TABLE);
+ }
}
\ No newline at end of file
diff --git a/Server/src/main/java/core/game/node/entity/npc/drop/GemDropTable.java b/Server/src/main/content/data/tables/GemDropTable.java
similarity index 93%
rename from Server/src/main/java/core/game/node/entity/npc/drop/GemDropTable.java
rename to Server/src/main/content/data/tables/GemDropTable.java
index 9c8b287ee..8ec051d64 100644
--- a/Server/src/main/java/core/game/node/entity/npc/drop/GemDropTable.java
+++ b/Server/src/main/content/data/tables/GemDropTable.java
@@ -1,6 +1,6 @@
-package core.game.node.entity.npc.drop;
+package content.data.tables;
-import api.StartupListener;
+import core.api.StartupListener;
import core.game.node.item.Item;
import core.game.node.item.WeightedChanceItem;
import core.tools.RandomFunction;
@@ -8,8 +8,8 @@ import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
-import rs09.ServerConstants;
-import rs09.game.system.SystemLogger;
+import core.ServerConstants;
+import core.tools.SystemLogger;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
@@ -18,7 +18,7 @@ import java.io.File;
import java.util.ArrayList;
import java.util.List;
-import static rs09.game.system.SystemLogger.logInfo;
+import static core.tools.SystemLogger.logInfo;
/**
* Handles the gem drop table.
diff --git a/Server/src/main/java/core/game/node/entity/npc/drop/HerbDropTable.java b/Server/src/main/content/data/tables/HerbDropTable.java
similarity index 93%
rename from Server/src/main/java/core/game/node/entity/npc/drop/HerbDropTable.java
rename to Server/src/main/content/data/tables/HerbDropTable.java
index a40ca0971..063444231 100644
--- a/Server/src/main/java/core/game/node/entity/npc/drop/HerbDropTable.java
+++ b/Server/src/main/content/data/tables/HerbDropTable.java
@@ -1,6 +1,6 @@
-package core.game.node.entity.npc.drop;
+package content.data.tables;
-import api.StartupListener;
+import core.api.StartupListener;
import core.game.node.item.Item;
import core.game.node.item.WeightedChanceItem;
import core.tools.RandomFunction;
@@ -8,8 +8,8 @@ import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
-import rs09.ServerConstants;
-import rs09.game.system.SystemLogger;
+import core.ServerConstants;
+import core.tools.SystemLogger;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
@@ -18,7 +18,7 @@ import java.io.File;
import java.util.ArrayList;
import java.util.List;
-import static rs09.game.system.SystemLogger.logInfo;
+import static core.tools.SystemLogger.logInfo;
/**
* Handles the herb drop table.
diff --git a/Server/src/main/java/core/game/node/entity/npc/drop/RareDropTable.java b/Server/src/main/content/data/tables/RareDropTable.java
similarity index 93%
rename from Server/src/main/java/core/game/node/entity/npc/drop/RareDropTable.java
rename to Server/src/main/content/data/tables/RareDropTable.java
index c0bbe3742..4bb6b060a 100644
--- a/Server/src/main/java/core/game/node/entity/npc/drop/RareDropTable.java
+++ b/Server/src/main/content/data/tables/RareDropTable.java
@@ -1,10 +1,10 @@
-package core.game.node.entity.npc.drop;
+package content.data.tables;
-import api.StartupListener;
-import rs09.ServerConstants;
+import core.api.StartupListener;
+import core.ServerConstants;
import core.game.node.item.Item;
import core.game.node.item.WeightedChanceItem;
-import rs09.game.system.SystemLogger;
+import core.tools.SystemLogger;
import core.tools.RandomFunction;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -18,7 +18,7 @@ import java.io.File;
import java.util.ArrayList;
import java.util.List;
-import static rs09.game.system.SystemLogger.logInfo;
+import static core.tools.SystemLogger.logInfo;
/**
* Handles the rare drop table.
diff --git a/Server/src/main/java/core/game/node/entity/npc/drop/RareSeedDropTable.java b/Server/src/main/content/data/tables/RareSeedDropTable.java
similarity index 93%
rename from Server/src/main/java/core/game/node/entity/npc/drop/RareSeedDropTable.java
rename to Server/src/main/content/data/tables/RareSeedDropTable.java
index cd84abe38..39c83efe1 100644
--- a/Server/src/main/java/core/game/node/entity/npc/drop/RareSeedDropTable.java
+++ b/Server/src/main/content/data/tables/RareSeedDropTable.java
@@ -1,6 +1,6 @@
-package core.game.node.entity.npc.drop;
+package content.data.tables;
-import api.StartupListener;
+import core.api.StartupListener;
import core.game.node.item.Item;
import core.game.node.item.WeightedChanceItem;
import core.tools.RandomFunction;
@@ -8,8 +8,8 @@ import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
-import rs09.ServerConstants;
-import rs09.game.system.SystemLogger;
+import core.ServerConstants;
+import core.tools.SystemLogger;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
@@ -18,7 +18,7 @@ import java.io.File;
import java.util.ArrayList;
import java.util.List;
-import static rs09.game.system.SystemLogger.logInfo;
+import static core.tools.SystemLogger.logInfo;
/**
* Handles the rare seed drop table.
diff --git a/Server/src/main/java/core/game/node/entity/npc/drop/UncommonSeedDropTable.java b/Server/src/main/content/data/tables/UncommonSeedDropTable.java
similarity index 93%
rename from Server/src/main/java/core/game/node/entity/npc/drop/UncommonSeedDropTable.java
rename to Server/src/main/content/data/tables/UncommonSeedDropTable.java
index 226372138..cf4537ece 100644
--- a/Server/src/main/java/core/game/node/entity/npc/drop/UncommonSeedDropTable.java
+++ b/Server/src/main/content/data/tables/UncommonSeedDropTable.java
@@ -1,6 +1,6 @@
-package core.game.node.entity.npc.drop;
+package content.data.tables;
-import api.StartupListener;
+import core.api.StartupListener;
import core.game.node.item.Item;
import core.game.node.item.WeightedChanceItem;
import core.tools.RandomFunction;
@@ -8,8 +8,8 @@ import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
-import rs09.ServerConstants;
-import rs09.game.system.SystemLogger;
+import core.ServerConstants;
+import core.tools.SystemLogger;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
@@ -18,7 +18,7 @@ import java.io.File;
import java.util.ArrayList;
import java.util.List;
-import static rs09.game.system.SystemLogger.logInfo;
+import static core.tools.SystemLogger.logInfo;
/**
* Handles the uncommon seed drop table.
diff --git a/Server/src/main/kotlin/rs09/game/content/jobs/CancelJobDialogueFile.kt b/Server/src/main/content/global/activity/jobs/CancelJobDialogueFile.kt
similarity index 74%
rename from Server/src/main/kotlin/rs09/game/content/jobs/CancelJobDialogueFile.kt
rename to Server/src/main/content/global/activity/jobs/CancelJobDialogueFile.kt
index 8ee6aceb3..62238ad76 100644
--- a/Server/src/main/kotlin/rs09/game/content/jobs/CancelJobDialogueFile.kt
+++ b/Server/src/main/content/global/activity/jobs/CancelJobDialogueFile.kt
@@ -1,23 +1,23 @@
-package rs09.game.content.jobs
+package content.global.activity.jobs
-import api.*
-import rs09.game.content.jobs.impl.GatheringJobs
-import rs09.game.content.jobs.impl.SlayingJobs
-import core.game.content.dialogue.FacialExpression
+import core.api.*
+import content.global.activity.jobs.impl.GatheringJobs
+import content.global.activity.jobs.impl.SlayingJobs
+import core.game.dialogue.FacialExpression
import core.game.node.entity.npc.NPC
import core.game.node.item.Item
import org.rs09.consts.Items
-import rs09.game.content.dialogue.DialogueFile
-import rs09.game.content.dialogue.Topic
-import rs09.tools.END_DIALOGUE
-import rs09.tools.START_DIALOGUE
+import core.game.dialogue.DialogueFile
+import core.game.dialogue.Topic
+import core.tools.END_DIALOGUE
+import core.tools.START_DIALOGUE
class CancelJobDialogueFile : DialogueFile() {
override fun handle(componentID: Int, buttonID: Int) {
when (stage) {
START_DIALOGUE -> showTopics(
- Topic(FacialExpression.HALF_ASKING, "How am I doing on my job?", 1),
- Topic(FacialExpression.HALF_GUILTY, "I'd like to cancel my job.", 10)
+ Topic(core.game.dialogue.FacialExpression.HALF_ASKING, "How am I doing on my job?", 1),
+ Topic(core.game.dialogue.FacialExpression.HALF_GUILTY, "I'd like to cancel my job.", 10)
)
1 -> {
@@ -49,8 +49,8 @@ class CancelJobDialogueFile : DialogueFile() {
.also { stage++ }
11 -> showTopics(
- Topic(FacialExpression.HAPPY, "Yes, please.", 20),
- Topic(FacialExpression.NEUTRAL, "No, thanks.", 30)
+ Topic(core.game.dialogue.FacialExpression.HAPPY, "Yes, please.", 20),
+ Topic(core.game.dialogue.FacialExpression.NEUTRAL, "No, thanks.", 30)
)
20 -> npc("Alright then, hand over the money.")
@@ -68,7 +68,7 @@ class CancelJobDialogueFile : DialogueFile() {
stage = END_DIALOGUE
} else {
player(
- FacialExpression.HALF_WORRIED,
+ core.game.dialogue.FacialExpression.HALF_WORRIED,
"Oh, I don't seem to have the money..."
).also { stage++ }
}
diff --git a/Server/src/main/kotlin/rs09/game/content/jobs/JobManager.kt b/Server/src/main/content/global/activity/jobs/JobManager.kt
similarity index 93%
rename from Server/src/main/kotlin/rs09/game/content/jobs/JobManager.kt
rename to Server/src/main/content/global/activity/jobs/JobManager.kt
index e652a582e..cfeac8b51 100644
--- a/Server/src/main/kotlin/rs09/game/content/jobs/JobManager.kt
+++ b/Server/src/main/content/global/activity/jobs/JobManager.kt
@@ -1,15 +1,15 @@
-package rs09.game.content.jobs
+package content.global.activity.jobs
-import api.*
-import rs09.game.content.jobs.impl.GatheringJobs
-import rs09.game.content.jobs.impl.SlayingJobs
+import core.api.*
+import content.global.activity.jobs.impl.GatheringJobs
+import content.global.activity.jobs.impl.SlayingJobs
import core.game.node.entity.npc.NPC
import core.game.node.entity.player.Player
import core.game.node.item.Item
import org.json.simple.JSONObject
import org.rs09.consts.Items
-import rs09.ServerStore
-import rs09.ServerStore.Companion.getInt
+import core.ServerStore
+import core.ServerStore.Companion.getInt
object JobManager {
@JvmStatic
diff --git a/Server/src/main/kotlin/rs09/game/content/jobs/JobType.kt b/Server/src/main/content/global/activity/jobs/JobType.kt
similarity index 57%
rename from Server/src/main/kotlin/rs09/game/content/jobs/JobType.kt
rename to Server/src/main/content/global/activity/jobs/JobType.kt
index d5e407f9b..fc1c6bb65 100644
--- a/Server/src/main/kotlin/rs09/game/content/jobs/JobType.kt
+++ b/Server/src/main/content/global/activity/jobs/JobType.kt
@@ -1,4 +1,4 @@
-package rs09.game.content.jobs
+package content.global.activity.jobs
enum class JobType {
GATHERING,
diff --git a/Server/src/main/kotlin/rs09/game/content/jobs/WorkForInteractionListener.kt b/Server/src/main/content/global/activity/jobs/WorkForInteractionListener.kt
similarity index 93%
rename from Server/src/main/kotlin/rs09/game/content/jobs/WorkForInteractionListener.kt
rename to Server/src/main/content/global/activity/jobs/WorkForInteractionListener.kt
index 9c99d4b8b..ad987feea 100644
--- a/Server/src/main/kotlin/rs09/game/content/jobs/WorkForInteractionListener.kt
+++ b/Server/src/main/content/global/activity/jobs/WorkForInteractionListener.kt
@@ -1,22 +1,21 @@
-package rs09.game.content.jobs
+package content.global.activity.jobs
-import rs09.game.content.jobs.impl.GatheringJobs
-import rs09.game.content.jobs.impl.SlayingJobs
-import api.*
-import api.events.EventHook
-import api.events.JobAssignmentEvent
-import api.events.NPCKillEvent
-import core.game.content.dialogue.FacialExpression
+import content.global.activity.jobs.impl.GatheringJobs
+import content.global.activity.jobs.impl.SlayingJobs
+import core.api.*
+import core.game.event.EventHook
+import core.game.event.JobAssignmentEvent
+import core.game.event.NPCKillEvent
import core.game.node.entity.Entity
import core.game.node.entity.npc.NPC
import core.game.node.entity.player.Player
import core.game.node.item.Item
import org.rs09.consts.Items
import org.rs09.consts.NPCs
-import rs09.ServerStore.Companion.getInt
-import rs09.game.Event
-import rs09.game.interaction.InteractionListener
-import rs09.game.interaction.IntType
+import core.ServerStore.Companion.getInt
+import core.api.Event
+import core.game.interaction.InteractionListener
+import core.game.interaction.IntType
/**
* Handles the work-for actions for the NPCs
@@ -143,7 +142,7 @@ class WorkForInteractionListener : InteractionListener, LoginListener {
player,
node.id,
"I'm sorry, I don't currently have any jobs that you're qualified for.",
- FacialExpression.HALF_THINKING
+ core.game.dialogue.FacialExpression.HALF_THINKING
)
return@on true
}
diff --git a/Server/src/main/kotlin/rs09/game/content/jobs/impl/GatheringJobs.kt b/Server/src/main/content/global/activity/jobs/impl/GatheringJobs.kt
similarity index 98%
rename from Server/src/main/kotlin/rs09/game/content/jobs/impl/GatheringJobs.kt
rename to Server/src/main/content/global/activity/jobs/impl/GatheringJobs.kt
index 7bd8bda1b..ddb4c0973 100644
--- a/Server/src/main/kotlin/rs09/game/content/jobs/impl/GatheringJobs.kt
+++ b/Server/src/main/content/global/activity/jobs/impl/GatheringJobs.kt
@@ -1,4 +1,4 @@
-package rs09.game.content.jobs.impl
+package content.global.activity.jobs.impl
import core.game.node.entity.skill.Skills
import core.tools.RandomFunction
diff --git a/Server/src/main/kotlin/rs09/game/content/jobs/impl/SlayingJobs.kt b/Server/src/main/content/global/activity/jobs/impl/SlayingJobs.kt
similarity index 92%
rename from Server/src/main/kotlin/rs09/game/content/jobs/impl/SlayingJobs.kt
rename to Server/src/main/content/global/activity/jobs/impl/SlayingJobs.kt
index e0d3a5095..5afdbf90b 100644
--- a/Server/src/main/kotlin/rs09/game/content/jobs/impl/SlayingJobs.kt
+++ b/Server/src/main/content/global/activity/jobs/impl/SlayingJobs.kt
@@ -1,4 +1,4 @@
-package rs09.game.content.jobs.impl
+package content.global.activity.jobs.impl
import core.tools.RandomFunction
diff --git a/Server/src/main/kotlin/rs09/game/content/global/worldevents/penguinhns/LarryHandler.kt b/Server/src/main/content/global/activity/penguinhns/LarryHandler.kt
similarity index 87%
rename from Server/src/main/kotlin/rs09/game/content/global/worldevents/penguinhns/LarryHandler.kt
rename to Server/src/main/content/global/activity/penguinhns/LarryHandler.kt
index e9d72ae14..842e85e83 100644
--- a/Server/src/main/kotlin/rs09/game/content/global/worldevents/penguinhns/LarryHandler.kt
+++ b/Server/src/main/content/global/activity/penguinhns/LarryHandler.kt
@@ -1,21 +1,18 @@
-package rs09.game.content.global.worldevents.penguinhns
+package content.global.activity.penguinhns
-import api.*
+import core.api.*
import core.game.component.Component
-import core.game.content.dialogue.DialoguePlugin
-import core.game.content.dialogue.FacialExpression
import core.game.node.entity.player.Player
import core.game.node.item.Item
import core.game.system.task.Pulse
-import rs09.game.world.GameWorld
-import rs09.tools.END_DIALOGUE
+import core.tools.END_DIALOGUE
-class LarryHandler(player: Player? = null) : DialoguePlugin(player){
+class LarryHandler(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){
override fun open(vararg args: Any?): Boolean {
options("Can I have a spy notebook?","Can I have a hint?","I'd like to turn in my points.").also { stage = 0; return true }
}
- override fun newInstance(player: Player?): DialoguePlugin {
+ override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin {
return LarryHandler(player)
}
@@ -43,7 +40,7 @@ class LarryHandler(player: Player? = null) : DialoguePlugin(player){
11 -> {
val hint = Penguin.values()[PenguinManager.penguins.random()].hint
- npcl(FacialExpression.FRIENDLY, "One is $hint")
+ npcl(core.game.dialogue.FacialExpression.FRIENDLY, "One is $hint")
stage = END_DIALOGUE
}
diff --git a/Server/src/main/kotlin/rs09/game/content/global/worldevents/penguinhns/NotebookHandler.kt b/Server/src/main/content/global/activity/penguinhns/NotebookHandler.kt
similarity index 91%
rename from Server/src/main/kotlin/rs09/game/content/global/worldevents/penguinhns/NotebookHandler.kt
rename to Server/src/main/content/global/activity/penguinhns/NotebookHandler.kt
index 40424ea68..15462eefe 100644
--- a/Server/src/main/kotlin/rs09/game/content/global/worldevents/penguinhns/NotebookHandler.kt
+++ b/Server/src/main/content/global/activity/penguinhns/NotebookHandler.kt
@@ -1,4 +1,4 @@
-package rs09.game.content.global.worldevents.penguinhns
+package content.global.activity.penguinhns
import core.cache.def.impl.ItemDefinition
import core.game.interaction.OptionHandler
diff --git a/Server/src/main/kotlin/rs09/game/content/global/worldevents/penguinhns/PenguinHNSEvent.kt b/Server/src/main/content/global/activity/penguinhns/PenguinHNSEvent.kt
similarity index 76%
rename from Server/src/main/kotlin/rs09/game/content/global/worldevents/penguinhns/PenguinHNSEvent.kt
rename to Server/src/main/content/global/activity/penguinhns/PenguinHNSEvent.kt
index 38f68a8da..b88d5d38f 100644
--- a/Server/src/main/kotlin/rs09/game/content/global/worldevents/penguinhns/PenguinHNSEvent.kt
+++ b/Server/src/main/content/global/activity/penguinhns/PenguinHNSEvent.kt
@@ -1,12 +1,10 @@
-package rs09.game.content.global.worldevents.penguinhns
+package content.global.activity.penguinhns
-import core.game.system.task.Pulse
import org.json.simple.JSONObject
-import rs09.ServerStore
-import rs09.game.content.global.worldevents.PluginSet
-import rs09.game.content.global.worldevents.WorldEvent
-import rs09.game.content.global.worldevents.WorldEvents
-import rs09.game.world.GameWorld
+import core.ServerStore
+import core.game.worldevents.PluginSet
+import core.game.worldevents.WorldEvent
+import core.game.world.GameWorld
class PenguinHNSEvent : WorldEvent("penguin-hns"){
val manager = PenguinManager()
diff --git a/Server/src/main/kotlin/rs09/game/content/global/worldevents/penguinhns/PenguinManager.kt b/Server/src/main/content/global/activity/penguinhns/PenguinManager.kt
similarity index 94%
rename from Server/src/main/kotlin/rs09/game/content/global/worldevents/penguinhns/PenguinManager.kt
rename to Server/src/main/content/global/activity/penguinhns/PenguinManager.kt
index 55fc568c6..51cdcdecc 100644
--- a/Server/src/main/kotlin/rs09/game/content/global/worldevents/penguinhns/PenguinManager.kt
+++ b/Server/src/main/content/global/activity/penguinhns/PenguinManager.kt
@@ -1,12 +1,12 @@
-package rs09.game.content.global.worldevents.penguinhns
+package content.global.activity.penguinhns
import core.game.node.entity.npc.NPC
import core.game.node.entity.player.Player
-import rs09.game.system.SystemLogger
+import core.tools.SystemLogger
import core.game.world.map.Location
import org.json.simple.JSONArray
import org.json.simple.JSONObject
-import rs09.ServerStore.Companion.toJSONArray
+import core.ServerStore.Companion.toJSONArray
import java.util.*
class PenguinManager{
diff --git a/Server/src/main/kotlin/rs09/game/content/global/worldevents/penguinhns/PenguinSpawner.kt b/Server/src/main/content/global/activity/penguinhns/PenguinSpawner.kt
similarity index 94%
rename from Server/src/main/kotlin/rs09/game/content/global/worldevents/penguinhns/PenguinSpawner.kt
rename to Server/src/main/content/global/activity/penguinhns/PenguinSpawner.kt
index ebcfec2a1..d19b9a82a 100644
--- a/Server/src/main/kotlin/rs09/game/content/global/worldevents/penguinhns/PenguinSpawner.kt
+++ b/Server/src/main/content/global/activity/penguinhns/PenguinSpawner.kt
@@ -1,9 +1,9 @@
-package rs09.game.content.global.worldevents.penguinhns
+package content.global.activity.penguinhns
import core.game.node.entity.npc.NPC
import core.game.world.map.Location
import org.rs09.consts.NPCs
-import rs09.game.content.global.worldevents.WorldEvents
+import core.game.worldevents.WorldEvents
class PenguinSpawner {
@@ -16,7 +16,7 @@ class PenguinSpawner {
availableOrdinals.remove(peng.ordinal)
spawnedOrdinals.add(peng.ordinal)
NPC(peng.id,peng.location)
- .also {PenguinManager.npcs.add(it);it.isNeverWalks = true; it.isWalks = false}.init()
+ .also { PenguinManager.npcs.add(it);it.isNeverWalks = true; it.isWalks = false}.init()
counter++
}
return spawnedOrdinals
diff --git a/Server/src/main/kotlin/rs09/game/content/global/worldevents/penguinhns/PenguinSpyingHandler.kt b/Server/src/main/content/global/activity/penguinhns/PenguinSpyingHandler.kt
similarity index 71%
rename from Server/src/main/kotlin/rs09/game/content/global/worldevents/penguinhns/PenguinSpyingHandler.kt
rename to Server/src/main/content/global/activity/penguinhns/PenguinSpyingHandler.kt
index 3000954da..f39b9e41f 100644
--- a/Server/src/main/kotlin/rs09/game/content/global/worldevents/penguinhns/PenguinSpyingHandler.kt
+++ b/Server/src/main/content/global/activity/penguinhns/PenguinSpyingHandler.kt
@@ -1,23 +1,17 @@
-package rs09.game.content.global.worldevents.penguinhns
+package content.global.activity.penguinhns
-import core.game.interaction.DestinationFlag
-import core.game.interaction.MovementPulse
-import core.game.interaction.Option
import core.game.node.entity.npc.NPC
import core.game.node.entity.player.Player
import core.game.system.task.Pulse
-import rs09.game.world.GameWorld
+import core.game.world.GameWorld
import core.game.world.update.flag.context.Animation
-import core.plugin.Plugin
-import core.game.content.quest.PluginInteraction
-import core.game.content.quest.PluginInteractionManager
-import rs09.game.interaction.InteractionListener
-import rs09.game.interaction.IntType
+import core.game.interaction.InteractionListener
+import core.game.interaction.IntType
-class PenguinSpyingHandler : InteractionListener{
+class PenguinSpyingHandler : InteractionListener {
override fun defineListeners() {
- on(PENGUINS, IntType.NPC, "spy-on"){player, node ->
+ on(PENGUINS, IntType.NPC, "spy-on"){ player, node ->
val npc = node.asNpc()
if(PenguinManager.hasTagged(player, npc.location)){
player.sendMessage("You've already tagged this penguin.")
diff --git a/Server/src/main/kotlin/rs09/game/content/global/worldevents/shootingstar/ShootingStar.kt b/Server/src/main/content/global/activity/shootingstar/ShootingStar.kt
similarity index 96%
rename from Server/src/main/kotlin/rs09/game/content/global/worldevents/shootingstar/ShootingStar.kt
rename to Server/src/main/content/global/activity/shootingstar/ShootingStar.kt
index 7b4bbe274..1ea776e49 100644
--- a/Server/src/main/kotlin/rs09/game/content/global/worldevents/shootingstar/ShootingStar.kt
+++ b/Server/src/main/content/global/activity/shootingstar/ShootingStar.kt
@@ -1,16 +1,16 @@
-package rs09.game.content.global.worldevents.shootingstar
+package content.global.activity.shootingstar
import core.game.node.scenery.Scenery
import core.game.node.scenery.SceneryBuilder
import core.game.node.entity.npc.NPC
import core.game.node.entity.player.Player
import core.game.world.map.Location
-import rs09.ServerStore.Companion.getBoolean
-import rs09.ServerStore.Companion.getInt
-import rs09.ServerStore.Companion.getString
+import core.ServerStore.Companion.getBoolean
+import core.ServerStore.Companion.getInt
+import core.ServerStore.Companion.getString
-import rs09.game.ai.general.scriptrepository.ShootingStarBot
-import rs09.game.world.repository.Repository
+import content.global.bots.ShootingStarBot
+import core.game.world.repository.Repository
/**
* Represents a shooting star object (Only ever initialized once) (ideally)
@@ -101,7 +101,7 @@ class ShootingStar(var level: ShootingStarType = ShootingStarType.values().rando
starObject = newStar
}
- private fun getNextType(): ShootingStarType{
+ private fun getNextType(): ShootingStarType {
return ShootingStarType.values()[level.ordinal - 1]
}
diff --git a/Server/src/main/kotlin/rs09/game/content/global/worldevents/shootingstar/ShootingStarMiningPulse.kt b/Server/src/main/content/global/activity/shootingstar/ShootingStarMiningPulse.kt
similarity index 95%
rename from Server/src/main/kotlin/rs09/game/content/global/worldevents/shootingstar/ShootingStarMiningPulse.kt
rename to Server/src/main/content/global/activity/shootingstar/ShootingStarMiningPulse.kt
index 1d49f14a4..6bfa6d2b0 100644
--- a/Server/src/main/kotlin/rs09/game/content/global/worldevents/shootingstar/ShootingStarMiningPulse.kt
+++ b/Server/src/main/content/global/activity/shootingstar/ShootingStarMiningPulse.kt
@@ -1,17 +1,17 @@
-package rs09.game.content.global.worldevents.shootingstar
+package content.global.activity.shootingstar
-import api.*
+import core.api.*
import core.game.node.scenery.Scenery
import core.game.node.entity.player.Player
import core.game.node.entity.skill.SkillPulse
import core.game.node.entity.skill.Skills
-import core.game.node.entity.skill.gather.SkillingTool
+import content.data.skill.SkillingTool
import core.game.node.item.Item
import core.tools.RandomFunction
import org.rs09.consts.Items
-import rs09.game.world.GameWorld
-import rs09.game.world.repository.Repository
-import rs09.tools.stringtools.colorize
+import core.game.world.GameWorld
+import core.game.world.repository.Repository
+import core.tools.colorize
/**
* The pulse used to handle mining shooting stars.
diff --git a/Server/src/main/kotlin/rs09/game/content/global/worldevents/shootingstar/ShootingStarPlugin.kt b/Server/src/main/content/global/activity/shootingstar/ShootingStarPlugin.kt
similarity index 92%
rename from Server/src/main/kotlin/rs09/game/content/global/worldevents/shootingstar/ShootingStarPlugin.kt
rename to Server/src/main/content/global/activity/shootingstar/ShootingStarPlugin.kt
index 2bc8588b2..fb8e1df9f 100644
--- a/Server/src/main/kotlin/rs09/game/content/global/worldevents/shootingstar/ShootingStarPlugin.kt
+++ b/Server/src/main/content/global/activity/shootingstar/ShootingStarPlugin.kt
@@ -1,21 +1,21 @@
-package rs09.game.content.global.worldevents.shootingstar
+package content.global.activity.shootingstar
-import api.*
+import core.api.*
import core.game.node.entity.player.Player
import core.game.node.entity.player.link.TeleportManager
import core.game.node.entity.skill.Skills
import org.json.simple.JSONObject
import org.rs09.consts.Items
import org.rs09.consts.Scenery
-import rs09.ServerStore
-import rs09.ServerStore.Companion.getBoolean
-import rs09.game.content.dialogue.DialogueFile
-import rs09.game.interaction.InteractionListener
-import rs09.game.interaction.IntType
-import rs09.game.system.SystemLogger
-import rs09.game.system.command.Privilege
-import rs09.game.world.GameWorld
-import rs09.tools.secondsToTicks
+import core.ServerStore
+import core.ServerStore.Companion.getBoolean
+import core.game.dialogue.DialogueFile
+import core.game.interaction.InteractionListener
+import core.game.interaction.IntType
+import core.tools.SystemLogger
+import core.game.system.command.Privilege
+import core.game.world.GameWorld
+import core.tools.secondsToTicks
class ShootingStarPlugin : LoginListener, InteractionListener, TickListener, Commands, StartupListener {
override fun login(player: Player) {
@@ -59,7 +59,7 @@ class ShootingStarPlugin : LoginListener, InteractionListener, TickListener, Com
return@on true
}
- on(RING, IntType.ITEM, "rub", "operate"){player, node ->
+ on(RING, IntType.ITEM, "rub", "operate"){ player, node ->
if(getRingStoreFile().getBoolean(player.username.toLowerCase())){
sendDialogue(player, "The ring is still recharging.")
return@on true
diff --git a/Server/src/main/kotlin/rs09/game/node/entity/state/newsys/states/ShootingStarState.kt b/Server/src/main/content/global/activity/shootingstar/ShootingStarState.kt
similarity index 87%
rename from Server/src/main/kotlin/rs09/game/node/entity/state/newsys/states/ShootingStarState.kt
rename to Server/src/main/content/global/activity/shootingstar/ShootingStarState.kt
index eed3442ee..0adbf564d 100644
--- a/Server/src/main/kotlin/rs09/game/node/entity/state/newsys/states/ShootingStarState.kt
+++ b/Server/src/main/content/global/activity/shootingstar/ShootingStarState.kt
@@ -1,10 +1,10 @@
-package rs09.game.node.entity.state.newsys.states
+package content.global.activity.shootingstar
import core.game.node.entity.player.Player
-import rs09.game.node.entity.state.newsys.PlayerState
-import rs09.game.node.entity.state.newsys.State
+import core.game.node.entity.state.PlayerState
+import core.game.node.entity.state.State
import core.game.system.task.Pulse
-import rs09.tools.ticksToSeconds
+import core.tools.ticksToSeconds
import org.json.simple.JSONObject
@PlayerState("shooting-star")
diff --git a/Server/src/main/java/core/game/content/global/worldevents/shootingstar/StarChartPlugin.java b/Server/src/main/content/global/activity/shootingstar/StarChartPlugin.java
similarity index 95%
rename from Server/src/main/java/core/game/content/global/worldevents/shootingstar/StarChartPlugin.java
rename to Server/src/main/content/global/activity/shootingstar/StarChartPlugin.java
index a6bd21964..9ab977822 100644
--- a/Server/src/main/java/core/game/content/global/worldevents/shootingstar/StarChartPlugin.java
+++ b/Server/src/main/content/global/activity/shootingstar/StarChartPlugin.java
@@ -1,4 +1,4 @@
-package core.game.content.global.worldevents.shootingstar;
+package content.global.activity.shootingstar;
import core.cache.def.impl.SceneryDefinition;
import core.game.component.Component;
@@ -8,7 +8,7 @@ import core.game.interaction.OptionHandler;
import core.game.node.Node;
import core.game.node.entity.player.Player;
import core.plugin.Plugin;
-import rs09.plugin.ClassScanner;
+import core.plugin.ClassScanner;
import core.plugin.PluginManifest;
@PluginManifest(name="ShootingStars")
diff --git a/Server/src/main/kotlin/rs09/game/content/global/worldevents/shootingstar/StarSpriteDialogue.kt b/Server/src/main/content/global/activity/shootingstar/StarSpriteDialogue.kt
similarity index 74%
rename from Server/src/main/kotlin/rs09/game/content/global/worldevents/shootingstar/StarSpriteDialogue.kt
rename to Server/src/main/content/global/activity/shootingstar/StarSpriteDialogue.kt
index 38b77f9c0..c1a1e6a75 100644
--- a/Server/src/main/kotlin/rs09/game/content/global/worldevents/shootingstar/StarSpriteDialogue.kt
+++ b/Server/src/main/content/global/activity/shootingstar/StarSpriteDialogue.kt
@@ -1,9 +1,7 @@
-package rs09.game.content.global.worldevents.shootingstar
+package content.global.activity.shootingstar
-import api.Container
-import api.*
-import core.game.content.dialogue.DialoguePlugin
-import core.game.content.dialogue.FacialExpression
+import core.api.Container
+import core.api.*
import core.game.node.entity.npc.NPC
import core.game.node.entity.player.Player
import core.game.node.item.Item
@@ -11,19 +9,18 @@ import core.plugin.Initializable
import core.tools.RandomFunction
import org.json.simple.JSONObject
import org.rs09.consts.Items
-import rs09.ServerStore
-import rs09.ServerStore.Companion.getBoolean
-import rs09.game.node.entity.state.newsys.states.ShootingStarState
-import rs09.tools.END_DIALOGUE
-import rs09.tools.secondsToTicks
-import rs09.tools.stringtools.colorize
+import core.ServerStore
+import core.ServerStore.Companion.getBoolean
+import core.tools.END_DIALOGUE
+import core.tools.secondsToTicks
+import core.tools.colorize
import java.util.concurrent.TimeUnit
/**
* Dialogue for the star sprite.
*/
@Initializable
-class StarSpriteDialogue(player: Player? = null) : DialoguePlugin(player) {
+class StarSpriteDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) {
/**
* The cosmic rune item id.
@@ -60,17 +57,17 @@ class StarSpriteDialogue(player: Player? = null) : DialoguePlugin(player) {
*/
}
- override fun newInstance(player: Player?): DialoguePlugin? {
+ override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin? {
return StarSpriteDialogue(player)
}
override fun open(vararg args: Any): Boolean {
npc = args[0] as NPC
if (inInventory(player, Items.ANCIENT_BLUEPRINT_14651) && !getAttribute(player, "star-ring:bp-shown", false)) {
- npcl(FacialExpression.NEUTRAL, "I see you got ahold of a blueprint of those silly old rings we used to make.")
+ npcl(core.game.dialogue.FacialExpression.NEUTRAL, "I see you got ahold of a blueprint of those silly old rings we used to make.")
stage = 1000
} else if (inInventory(player, Items.ANCIENT_BLUEPRINT_14651) && getAttribute(player, "star-ring:bp-shown", false)) {
- playerl(FacialExpression.HALF_ASKING, "So about those rings...")
+ playerl(core.game.dialogue.FacialExpression.HALF_ASKING, "So about those rings...")
stage = 2000
} else if (getStoreFile().getBoolean(player.username.toLowerCase()) || !player.getInventory().contains(ShootingStarPlugin.STAR_DUST, 1)) {
npc("Hello, strange creature.")
@@ -226,36 +223,36 @@ class StarSpriteDialogue(player: Player? = null) : DialoguePlugin(player) {
52 -> end()
//Inauthentic ring-based dialogue
- 1000 -> playerl(FacialExpression.ASKING, "Oh, you mean this?").also { stage++ }
+ 1000 -> playerl(core.game.dialogue.FacialExpression.ASKING, "Oh, you mean this?").also { stage++ }
1001 -> player.dialogueInterpreter.sendItemMessage(Items.ANCIENT_BLUEPRINT_14651, "You show the blueprint to the Star Sprite.").also { stage++ }
- 1002 -> npcl(FacialExpression.ASKING, "Yeah, that's the one, alright!").also { stage++ }
- 1003 -> npcl(FacialExpression.NEUTRAL, "I'll tell you what.. if you can get ahold of the resources needed to make one, I'm sure me or one of my kin would craft it for you.").also { stage++ }
- 1004 -> playerl(FacialExpression.ASKING, "You'd just do that for me? For free?").also { stage++ }
- 1005 -> npcl(FacialExpression.NEUTRAL, "I don't see why not. We used to make these for fun and hand them out to adventurers all the time.").also { stage++ }
- 1006 -> playerl(FacialExpression.ASKING, "Well, thanks! So.. what do we need to make one?").also { stage++ }
- 1007 -> npcl(FacialExpression.NEUTRAL, "Looking at the blueprint here...").also { stage++ }
- 1008 -> npcl(FacialExpression.NEUTRAL, "Yes, it seems we need a ring mould, a silver bar, a cut dragonstone and 200 stardust. Oh, and make sure to bring this blueprint with you.").also { stage++ }
- 1009 -> playerl(FacialExpression.FRIENDLY, "Thanks, I'll get right on it!").also { stage++ }
- 1010 -> playerl(FacialExpression.ASKING, "So just to make sure I've got it right, I need a ring mould, a silver bar, a cut dragonstone and 200 stardust, as well as this blueprint?").also { stage++ }
- 1011 -> npcl(FacialExpression.NEUTRAL, "Yeah, you've got it, human. Any of my kin should be able to do this for you.").also { stage++; setAttribute(player, "/save:star-ring:bp-shown", true) }
- 1012 -> playerl(FacialExpression.FRIENDLY, "Thanks!").also { stage = END_DIALOGUE }
+ 1002 -> npcl(core.game.dialogue.FacialExpression.ASKING, "Yeah, that's the one, alright!").also { stage++ }
+ 1003 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "I'll tell you what.. if you can get ahold of the resources needed to make one, I'm sure me or one of my kin would craft it for you.").also { stage++ }
+ 1004 -> playerl(core.game.dialogue.FacialExpression.ASKING, "You'd just do that for me? For free?").also { stage++ }
+ 1005 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "I don't see why not. We used to make these for fun and hand them out to adventurers all the time.").also { stage++ }
+ 1006 -> playerl(core.game.dialogue.FacialExpression.ASKING, "Well, thanks! So.. what do we need to make one?").also { stage++ }
+ 1007 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Looking at the blueprint here...").also { stage++ }
+ 1008 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Yes, it seems we need a ring mould, a silver bar, a cut dragonstone and 200 stardust. Oh, and make sure to bring this blueprint with you.").also { stage++ }
+ 1009 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "Thanks, I'll get right on it!").also { stage++ }
+ 1010 -> playerl(core.game.dialogue.FacialExpression.ASKING, "So just to make sure I've got it right, I need a ring mould, a silver bar, a cut dragonstone and 200 stardust, as well as this blueprint?").also { stage++ }
+ 1011 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Yeah, you've got it, human. Any of my kin should be able to do this for you.").also { stage++; setAttribute(player, "/save:star-ring:bp-shown", true) }
+ 1012 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "Thanks!").also { stage = END_DIALOGUE }
- 2000 -> npcl(FacialExpression.NEUTRAL, "Yes, did you bring the components to make it, human?").also { stage++ }
+ 2000 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Yes, did you bring the components to make it, human?").also { stage++ }
2001 -> if(inInventory(player, Items.DRAGONSTONE_1615,1) && inInventory(player, Items.RING_MOULD_1592, 1) && inInventory(player, Items.STARDUST_13727, 200) && inInventory(player, Items.SILVER_BAR_2355, 1)){
- playerl(FacialExpression.FRIENDLY, "Yes, I have them right here, friend.").also { stage++ }
+ playerl(core.game.dialogue.FacialExpression.FRIENDLY, "Yes, I have them right here, friend.").also { stage++ }
} else {
- playerl(FacialExpression.HALF_GUILTY, "I'm afraid not, what did I need again?").also { stage = 2100 }
+ playerl(core.game.dialogue.FacialExpression.HALF_GUILTY, "I'm afraid not, what did I need again?").also { stage = 2100 }
}
- 2002 -> npcl(FacialExpression.NEUTRAL, "Excellent, give me just a moment here...").also { stage++ }
+ 2002 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Excellent, give me just a moment here...").also { stage++ }
2003 -> sendDialogue("You watch as the Star Sprite casts some strange spell.").also { stage++ }
2004 -> if(removeItem(player, Items.SILVER_BAR_2355, Container.INVENTORY) && removeItem(player, Items.DRAGONSTONE_1615, Container.INVENTORY) && removeItem(player, Item(Items.STARDUST_13727, 200), Container.INVENTORY)){
addItem(player, Items.RING_OF_THE_STAR_SPRITE_14652)
player.dialogueInterpreter.sendItemMessage(Items.RING_OF_THE_STAR_SPRITE_14652, "The Star Sprite hands you a strange ring.").also { stage++ }
} else end()
- 2005 -> npcl(FacialExpression.NEUTRAL, "There you go, I hope you enjoy it!").also { stage++ }
- 2006 -> playerl(FacialExpression.FRIENDLY, "Thank you!").also { stage = END_DIALOGUE }
+ 2005 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "There you go, I hope you enjoy it!").also { stage++ }
+ 2006 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "Thank you!").also { stage = END_DIALOGUE }
- 2100 -> npcl(FacialExpression.NEUTRAL, "A ring mould, a cut dragonstone, a silver bar and 200 stardust.").also { stage = END_DIALOGUE }
+ 2100 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "A ring mould, a cut dragonstone, a silver bar and 200 stardust.").also { stage = END_DIALOGUE }
}
return true
}
diff --git a/Server/src/main/java/core/game/content/ttrail/ClueLevel.java b/Server/src/main/content/global/activity/ttrail/ClueLevel.java
similarity index 90%
rename from Server/src/main/java/core/game/content/ttrail/ClueLevel.java
rename to Server/src/main/content/global/activity/ttrail/ClueLevel.java
index 68934bdc1..1315ca010 100644
--- a/Server/src/main/java/core/game/content/ttrail/ClueLevel.java
+++ b/Server/src/main/content/global/activity/ttrail/ClueLevel.java
@@ -1,26 +1,22 @@
-package core.game.content.ttrail;
+package content.global.activity.ttrail;
-import core.game.component.CloseEvent;
import core.game.component.Component;
import core.game.container.access.InterfaceContainer;
-import core.game.node.entity.npc.drop.DropFrequency;
import core.game.node.entity.player.Player;
-import core.game.node.item.ChanceItem;
import core.game.node.item.Item;
-import core.game.node.item.WeightedChanceItem;
import org.rs09.consts.Items;
-import rs09.game.world.GameWorld;
+import core.game.world.GameWorld;
import core.tools.RandomFunction;
import java.text.NumberFormat;
import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
import java.util.List;
-import api.IfaceSettingsBuilder;
+import core.api.IfaceSettingsBuilder;
-import rs09.game.system.config.ClueRewardParser;
+import core.game.system.config.ClueRewardParser;
+
+import static core.api.ContentAPIKt.addItemOrDrop;
/**
* A clue scroll level.
@@ -74,7 +70,7 @@ public enum ClueLevel {
long rewardValue = 0L;
for (Item reward : rewards) {
- api.ContentAPIKt.addItemOrDrop(player, reward.getId(), reward.getAmount());
+ addItemOrDrop(player, reward.getId(), reward.getAmount());
rewardValue += reward.getValue();
}
diff --git a/Server/src/main/java/core/game/content/ttrail/ClueScrollPlugin.java b/Server/src/main/content/global/activity/ttrail/ClueScrollPlugin.java
similarity index 98%
rename from Server/src/main/java/core/game/content/ttrail/ClueScrollPlugin.java
rename to Server/src/main/content/global/activity/ttrail/ClueScrollPlugin.java
index f6127ff5d..5eeedb3c7 100644
--- a/Server/src/main/java/core/game/content/ttrail/ClueScrollPlugin.java
+++ b/Server/src/main/content/global/activity/ttrail/ClueScrollPlugin.java
@@ -1,9 +1,9 @@
-package core.game.content.ttrail;
+package content.global.activity.ttrail;
import core.game.component.Component;
import core.game.node.entity.player.Player;
import core.game.node.item.Item;
-import rs09.game.system.SystemLogger;
+import core.tools.SystemLogger;
import core.game.world.map.zone.MapZone;
import core.game.world.map.zone.ZoneBorders;
import core.game.world.map.zone.ZoneBuilder;
diff --git a/Server/src/main/java/core/game/content/ttrail/CoordinateCluePlugin.java b/Server/src/main/content/global/activity/ttrail/CoordinateCluePlugin.java
similarity index 99%
rename from Server/src/main/java/core/game/content/ttrail/CoordinateCluePlugin.java
rename to Server/src/main/content/global/activity/ttrail/CoordinateCluePlugin.java
index 6f7b48c5e..b09067d27 100644
--- a/Server/src/main/java/core/game/content/ttrail/CoordinateCluePlugin.java
+++ b/Server/src/main/content/global/activity/ttrail/CoordinateCluePlugin.java
@@ -1,4 +1,4 @@
-package core.game.content.ttrail;
+package content.global.activity.ttrail;
import core.game.world.map.Location;
import core.plugin.Plugin;
diff --git a/Server/src/main/java/core/game/content/ttrail/CoordinateClueScroll.java b/Server/src/main/content/global/activity/ttrail/CoordinateClueScroll.java
similarity index 98%
rename from Server/src/main/java/core/game/content/ttrail/CoordinateClueScroll.java
rename to Server/src/main/content/global/activity/ttrail/CoordinateClueScroll.java
index c3a4476ce..b3c43a196 100644
--- a/Server/src/main/java/core/game/content/ttrail/CoordinateClueScroll.java
+++ b/Server/src/main/content/global/activity/ttrail/CoordinateClueScroll.java
@@ -1,4 +1,4 @@
-package core.game.content.ttrail;
+package content.global.activity.ttrail;
import core.game.node.entity.npc.NPC;
import core.game.node.entity.player.Player;
diff --git a/Server/src/main/java/core/game/content/ttrail/EmoteCluePlugin.java b/Server/src/main/content/global/activity/ttrail/EmoteCluePlugin.java
similarity index 99%
rename from Server/src/main/java/core/game/content/ttrail/EmoteCluePlugin.java
rename to Server/src/main/content/global/activity/ttrail/EmoteCluePlugin.java
index fbedcc260..9a327e41a 100644
--- a/Server/src/main/java/core/game/content/ttrail/EmoteCluePlugin.java
+++ b/Server/src/main/content/global/activity/ttrail/EmoteCluePlugin.java
@@ -1,9 +1,9 @@
-package core.game.content.ttrail;
+package content.global.activity.ttrail;
import core.game.node.entity.player.link.emote.Emotes;
import core.game.world.map.zone.ZoneBorders;
import core.plugin.Plugin;
-import rs09.plugin.ClassScanner;
+import core.plugin.ClassScanner;
/**
* Initializes the emote clue plugins.
diff --git a/Server/src/main/java/core/game/content/ttrail/EmoteClueScroll.java b/Server/src/main/content/global/activity/ttrail/EmoteClueScroll.java
similarity index 98%
rename from Server/src/main/java/core/game/content/ttrail/EmoteClueScroll.java
rename to Server/src/main/content/global/activity/ttrail/EmoteClueScroll.java
index b559fae2f..e4e9100d8 100644
--- a/Server/src/main/java/core/game/content/ttrail/EmoteClueScroll.java
+++ b/Server/src/main/content/global/activity/ttrail/EmoteClueScroll.java
@@ -1,4 +1,4 @@
-package core.game.content.ttrail;
+package content.global.activity.ttrail;
import core.game.node.entity.npc.NPC;
import core.game.node.entity.player.Player;
diff --git a/Server/src/main/java/core/game/content/ttrail/MapCluePlugin.java b/Server/src/main/content/global/activity/ttrail/MapCluePlugin.java
similarity index 99%
rename from Server/src/main/java/core/game/content/ttrail/MapCluePlugin.java
rename to Server/src/main/content/global/activity/ttrail/MapCluePlugin.java
index c82e0343a..b1713ff8c 100644
--- a/Server/src/main/java/core/game/content/ttrail/MapCluePlugin.java
+++ b/Server/src/main/content/global/activity/ttrail/MapCluePlugin.java
@@ -1,4 +1,4 @@
-package core.game.content.ttrail;
+package content.global.activity.ttrail;
import core.game.world.map.Location;
import core.game.world.map.zone.ZoneBorders;
diff --git a/Server/src/main/java/core/game/content/ttrail/MapClueScroll.java b/Server/src/main/content/global/activity/ttrail/MapClueScroll.java
similarity index 95%
rename from Server/src/main/java/core/game/content/ttrail/MapClueScroll.java
rename to Server/src/main/content/global/activity/ttrail/MapClueScroll.java
index 67312590b..2b772e8ba 100644
--- a/Server/src/main/java/core/game/content/ttrail/MapClueScroll.java
+++ b/Server/src/main/content/global/activity/ttrail/MapClueScroll.java
@@ -1,7 +1,7 @@
-package core.game.content.ttrail;
+package content.global.activity.ttrail;
-import core.game.content.global.action.DigAction;
-import core.game.content.global.action.DigSpadeHandler;
+import core.game.global.action.DigAction;
+import core.game.global.action.DigSpadeHandler;
import core.game.interaction.Option;
import core.game.node.Node;
import core.game.node.entity.Entity;
diff --git a/Server/src/main/java/core/game/content/ttrail/SaradominWizardNPC.java b/Server/src/main/content/global/activity/ttrail/SaradominWizardNPC.java
similarity index 94%
rename from Server/src/main/java/core/game/content/ttrail/SaradominWizardNPC.java
rename to Server/src/main/content/global/activity/ttrail/SaradominWizardNPC.java
index 13c7aaab0..b2b357690 100644
--- a/Server/src/main/java/core/game/content/ttrail/SaradominWizardNPC.java
+++ b/Server/src/main/content/global/activity/ttrail/SaradominWizardNPC.java
@@ -1,7 +1,7 @@
-package core.game.content.ttrail;
+package content.global.activity.ttrail;
import core.game.node.entity.Entity;
-import core.game.node.entity.combat.CombatSpell;
+import core.game.node.entity.combat.spell.CombatSpell;
import core.game.node.entity.combat.CombatStyle;
import core.game.node.entity.combat.equipment.SwitchAttack;
import core.game.node.entity.npc.AbstractNPC;
@@ -10,8 +10,8 @@ import core.game.node.entity.player.link.SpellBookManager.SpellBook;
import core.game.world.map.Location;
import core.game.world.map.RegionManager;
import core.plugin.Plugin;
-import rs09.game.node.entity.combat.CombatSwingHandler;
-import rs09.game.node.entity.combat.handlers.MultiSwingHandler;
+import core.game.node.entity.combat.CombatSwingHandler;
+import core.game.node.entity.combat.MultiSwingHandler;
/**
* Handles saradomin npc.
diff --git a/Server/src/main/java/core/game/content/ttrail/TreasureTrailManager.java b/Server/src/main/content/global/activity/ttrail/TreasureTrailManager.java
similarity index 98%
rename from Server/src/main/java/core/game/content/ttrail/TreasureTrailManager.java
rename to Server/src/main/content/global/activity/ttrail/TreasureTrailManager.java
index 4a7083b7a..e9a68dd1b 100644
--- a/Server/src/main/java/core/game/content/ttrail/TreasureTrailManager.java
+++ b/Server/src/main/content/global/activity/ttrail/TreasureTrailManager.java
@@ -1,7 +1,7 @@
-package core.game.content.ttrail;
+package content.global.activity.ttrail;
-import api.LoginListener;
-import api.PersistPlayer;
+import core.api.LoginListener;
+import core.api.PersistPlayer;
import core.game.node.entity.player.Player;
import core.tools.RandomFunction;
@@ -9,8 +9,6 @@ import org.jetbrains.annotations.NotNull;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
-import java.nio.ByteBuffer;
-
/**
* Handles the treasure trail of a player.
* @author Vexia
diff --git a/Server/src/main/java/core/game/content/ttrail/TreasureTrailPlugin.java b/Server/src/main/content/global/activity/ttrail/TreasureTrailPlugin.java
similarity index 98%
rename from Server/src/main/java/core/game/content/ttrail/TreasureTrailPlugin.java
rename to Server/src/main/content/global/activity/ttrail/TreasureTrailPlugin.java
index 6379cf050..607eb169a 100644
--- a/Server/src/main/java/core/game/content/ttrail/TreasureTrailPlugin.java
+++ b/Server/src/main/content/global/activity/ttrail/TreasureTrailPlugin.java
@@ -1,4 +1,4 @@
-package core.game.content.ttrail;
+package content.global.activity.ttrail;
import core.cache.def.impl.ItemDefinition;
import core.cache.def.impl.SceneryDefinition;
@@ -9,7 +9,7 @@ import core.game.interaction.OptionHandler;
import core.game.node.Node;
import core.game.node.entity.npc.NPC;
import core.game.node.entity.player.Player;
-import core.game.node.entity.skill.agility.AgilityHandler;
+import content.global.skill.agility.AgilityHandler;
import core.game.node.item.GroundItem;
import core.game.node.item.Item;
import core.game.node.item.ItemPlugin;
@@ -17,7 +17,7 @@ import core.game.world.map.Location;
import core.game.world.update.flag.context.Animation;
import core.plugin.Initializable;
import core.plugin.Plugin;
-import rs09.plugin.ClassScanner;
+import core.plugin.ClassScanner;
/**
* Handles the clue scroll options.
diff --git a/Server/src/main/java/core/game/content/ttrail/UriNPC.java b/Server/src/main/content/global/activity/ttrail/UriNPC.java
similarity index 98%
rename from Server/src/main/java/core/game/content/ttrail/UriNPC.java
rename to Server/src/main/content/global/activity/ttrail/UriNPC.java
index 5e264071f..64f1b7ae4 100644
--- a/Server/src/main/java/core/game/content/ttrail/UriNPC.java
+++ b/Server/src/main/content/global/activity/ttrail/UriNPC.java
@@ -1,6 +1,6 @@
-package core.game.content.ttrail;
+package content.global.activity.ttrail;
-import core.game.content.dialogue.DialoguePlugin;
+import core.game.dialogue.DialoguePlugin;
import core.game.node.entity.Entity;
import core.game.node.entity.combat.CombatStyle;
import core.game.node.entity.npc.AbstractNPC;
@@ -9,7 +9,7 @@ import core.game.node.entity.player.Player;
import core.game.world.map.Location;
import core.game.world.map.RegionManager;
import core.plugin.Plugin;
-import rs09.plugin.ClassScanner;
+import core.plugin.ClassScanner;
import core.tools.RandomFunction;
/**
diff --git a/Server/src/main/java/core/game/content/ttrail/ZamorakWizardNPC.java b/Server/src/main/content/global/activity/ttrail/ZamorakWizardNPC.java
similarity index 97%
rename from Server/src/main/java/core/game/content/ttrail/ZamorakWizardNPC.java
rename to Server/src/main/content/global/activity/ttrail/ZamorakWizardNPC.java
index c4e6acd9e..3b1dae94c 100644
--- a/Server/src/main/java/core/game/content/ttrail/ZamorakWizardNPC.java
+++ b/Server/src/main/content/global/activity/ttrail/ZamorakWizardNPC.java
@@ -1,7 +1,7 @@
-package core.game.content.ttrail;
+package content.global.activity.ttrail;
import core.game.node.entity.Entity;
-import core.game.node.entity.combat.CombatSpell;
+import core.game.node.entity.combat.spell.CombatSpell;
import core.game.node.entity.combat.CombatStyle;
import core.game.node.entity.npc.AbstractNPC;
import core.game.node.entity.player.Player;
diff --git a/Server/src/main/kotlin/rs09/game/content/ame/RandomEventManager.kt b/Server/src/main/content/global/ame/RandomEventManager.kt
similarity index 60%
rename from Server/src/main/kotlin/rs09/game/content/ame/RandomEventManager.kt
rename to Server/src/main/content/global/ame/RandomEventManager.kt
index bc0c62847..24cb490ee 100644
--- a/Server/src/main/kotlin/rs09/game/content/ame/RandomEventManager.kt
+++ b/Server/src/main/content/global/ame/RandomEventManager.kt
@@ -1,31 +1,31 @@
-package rs09.game.content.ame
+package content.global.ame
-import api.Commands
-import api.LoginListener
-import api.events.EventHook
-import api.events.TickEvent
-import api.getAttribute
-import api.setAttribute
+import core.api.Commands
+import core.api.LoginListener
+import core.game.event.EventHook
+import core.game.event.TickEvent
+import core.api.getAttribute
+import core.api.setAttribute
import core.game.node.entity.Entity
import core.game.node.entity.player.Player
import core.game.world.map.zone.ZoneRestriction
import core.tools.RandomFunction
-import rs09.game.Event
-import rs09.game.system.SystemLogger
-import rs09.game.system.command.Privilege
-import rs09.game.world.GameWorld
-import rs09.game.world.repository.Repository
+import core.api.Event
+import core.tools.SystemLogger
+import core.game.system.command.Privilege
+import core.game.world.GameWorld
+import core.game.world.repository.Repository
import kotlin.random.Random
class RandomEventManager(val player: Player? = null) : LoginListener, EventHook, Commands {
- var event: RandomEventNPC? = null
+ var event: content.global.ame.RandomEventNPC? = null
var enabled: Boolean = false
var nextSpawn = 0
val skills = arrayOf("WoodcuttingSkillPulse","FishingPulse","MiningSkillPulse","BoneBuryingOptionPlugin")
override fun login(player: Player) {
if(player.isArtificial) return
- val instance = RandomEventManager(player)
+ val instance = content.global.ame.RandomEventManager(player)
player.hook(Event.Tick, instance)
setAttribute(player, "random-manager", instance)
instance.rollNextSpawn()
@@ -46,18 +46,18 @@ class RandomEventManager(val player: Player? = null) : LoginListener, EventHook<
nextSpawn = GameWorld.ticks + 3000
return
}
- if (getAttribute(player, "re-npc", null) != null) return
+ if (getAttribute(player, "re-npc", null) != null) return
val currentAction = player.pulseManager.current?.toString() ?: "None"
- val ame: RandomEvents = if(currentAction.contains("WoodcuttingSkillPulse") && Random.nextBoolean()){
- RandomEvents.TREE_SPIRIT
+ val ame: content.global.ame.RandomEvents = if(currentAction.contains("WoodcuttingSkillPulse") && Random.nextBoolean()){
+ content.global.ame.RandomEvents.TREE_SPIRIT
} else if(currentAction.contains("FishingPulse") && Random.nextBoolean()){
- RandomEvents.RIVER_TROLL
+ content.global.ame.RandomEvents.RIVER_TROLL
} else if(currentAction.contains("MiningSkillPulse") && Random.nextBoolean()){
- RandomEvents.ROCK_GOLEM
+ content.global.ame.RandomEvents.ROCK_GOLEM
} else if(currentAction.contains("BoneBuryingOptionPlugin") && Random.nextBoolean()){
- RandomEvents.SHADE
+ content.global.ame.RandomEvents.SHADE
} else {
- RandomEvents.values().filter { it.type != "skill" }.random()
+ content.global.ame.RandomEvents.values().filter { it.type != "skill" }.random()
}
event = ame.npc.create(player,ame.loot,ame.type)
if (event!!.spawnLocation == null) {
@@ -71,7 +71,7 @@ class RandomEventManager(val player: Player? = null) : LoginListener, EventHook<
}
private fun rollNextSpawn() {
- nextSpawn = GameWorld.ticks + RandomFunction.random(MIN_DELAY_TICKS, MAX_DELAY_TICKS)
+ nextSpawn = GameWorld.ticks + RandomFunction.random(content.global.ame.RandomEventManager.Companion.MIN_DELAY_TICKS, content.global.ame.RandomEventManager.Companion.MAX_DELAY_TICKS)
}
override fun defineCommands() {
@@ -82,16 +82,16 @@ class RandomEventManager(val player: Player? = null) : LoginListener, EventHook<
if (target == null)
reject(player, "Unable to find player $username!")
- getInstance(target!!)?.fireEvent()
+ content.global.ame.RandomEventManager.Companion.getInstance(target!!)?.fireEvent()
}
}
companion object {
const val AVG_DELAY_TICKS = 6000 // 60 minutes
- const val MIN_DELAY_TICKS = AVG_DELAY_TICKS / 2
- const val MAX_DELAY_TICKS = MIN_DELAY_TICKS + AVG_DELAY_TICKS // window of 60 min centered on 60 min (30 to 90 min)
+ const val MIN_DELAY_TICKS = content.global.ame.RandomEventManager.Companion.AVG_DELAY_TICKS / 2
+ const val MAX_DELAY_TICKS = content.global.ame.RandomEventManager.Companion.MIN_DELAY_TICKS + content.global.ame.RandomEventManager.Companion.AVG_DELAY_TICKS // window of 60 min centered on 60 min (30 to 90 min)
- @JvmStatic fun getInstance(player: Player): RandomEventManager?
+ @JvmStatic fun getInstance(player: Player): content.global.ame.RandomEventManager?
{
return getAttribute(player, "random-manager", null)
}
diff --git a/Server/src/main/kotlin/rs09/game/content/ame/RandomEventNPC.kt b/Server/src/main/content/global/ame/RandomEventNPC.kt
similarity index 91%
rename from Server/src/main/kotlin/rs09/game/content/ame/RandomEventNPC.kt
rename to Server/src/main/content/global/ame/RandomEventNPC.kt
index 82e8be15d..507f24a8a 100644
--- a/Server/src/main/kotlin/rs09/game/content/ame/RandomEventNPC.kt
+++ b/Server/src/main/content/global/ame/RandomEventNPC.kt
@@ -1,6 +1,7 @@
-package rs09.game.content.ame
+package content.global.ame
-import api.poofClear
+import content.global.ame.events.MysteriousOldManNPC
+import core.api.poofClear
import core.game.interaction.MovementPulse
import core.game.node.entity.impl.PulseType
import core.game.node.entity.npc.NPC
@@ -10,10 +11,9 @@ import core.game.world.map.Location
import core.game.world.map.RegionManager
import core.game.world.map.path.Pathfinder
import core.game.world.update.flag.context.Graphics
-import discord.Discord
-import rs09.game.content.ame.events.MysteriousOldManNPC
-import rs09.game.content.global.WeightBasedTable
-import rs09.tools.secondsToTicks
+import core.integrations.discord.Discord
+import core.api.utils.WeightBasedTable
+import core.tools.secondsToTicks
import kotlin.random.Random
import kotlin.reflect.full.createInstance
@@ -39,7 +39,7 @@ abstract class RandomEventNPC(id: Int) : NPC(id) {
open fun terminate() {
finalized = true
pulseManager.clear(PulseType.STANDARD)
- RandomEventManager.getInstance(player)?.event = null
+ content.global.ame.RandomEventManager.getInstance(player)?.event = null
if (initialized) {
poofClear(this)
}
diff --git a/Server/src/main/kotlin/rs09/game/content/ame/RandomEvents.kt b/Server/src/main/content/global/ame/RandomEvents.kt
similarity index 65%
rename from Server/src/main/kotlin/rs09/game/content/ame/RandomEvents.kt
rename to Server/src/main/content/global/ame/RandomEvents.kt
index 5bd7ba726..7c586596d 100644
--- a/Server/src/main/kotlin/rs09/game/content/ame/RandomEvents.kt
+++ b/Server/src/main/content/global/ame/RandomEvents.kt
@@ -1,25 +1,25 @@
-package rs09.game.content.ame
+package content.global.ame
import org.rs09.consts.Items
-import rs09.game.content.ame.events.MysteriousOldManNPC
-import rs09.game.content.ame.events.certer.CerterNPC
-import rs09.game.content.ame.events.drilldemon.SeargentDamienNPC
-import rs09.game.content.ame.events.evilchicken.EvilChickenNPC
-import rs09.game.content.ame.events.genie.GenieNPC
-import rs09.game.content.ame.events.rivertroll.RiverTrollRENPC
-import rs09.game.content.ame.events.rockgolem.RockGolemRENPC
-import rs09.game.content.ame.events.sandwichlady.SandwichLadyRENPC
-import rs09.game.content.ame.events.shade.ShadeRENPC
-import rs09.game.content.ame.events.treespirit.TreeSpiritRENPC
-import rs09.game.content.ame.events.zombie.ZombieRENPC
+import content.global.ame.events.MysteriousOldManNPC
+import content.global.ame.events.certer.CerterNPC
+import content.global.ame.events.drilldemon.SeargentDamienNPC
+import content.global.ame.events.evilchicken.EvilChickenNPC
+import content.global.ame.events.genie.GenieNPC
+import content.global.ame.events.rivertroll.RiverTrollRENPC
+import content.global.ame.events.rockgolem.RockGolemRENPC
+import content.global.ame.events.sandwichlady.SandwichLadyRENPC
+import content.global.ame.events.shade.ShadeRENPC
+import content.global.ame.events.treespirit.TreeSpiritRENPC
+import content.global.ame.events.zombie.ZombieRENPC
-import rs09.game.content.global.WeightBasedTable
-import rs09.game.content.global.WeightedItem
+import core.api.utils.WeightBasedTable
+import core.api.utils.WeightedItem
enum class RandomEvents(val npc: RandomEventNPC, val loot: WeightBasedTable? = null) {
SANDWICH_LADY(SandwichLadyRENPC()),
GENIE(GenieNPC()),
- CERTER(CerterNPC(),WeightBasedTable.create(
+ CERTER(CerterNPC(), WeightBasedTable.create(
WeightedItem(Items.UNCUT_SAPPHIRE_1623,1,1,3.4),
WeightedItem(Items.KEBAB_1971,1,1,1.7),
WeightedItem(Items.UNCUT_EMERALD_1621,1,1,1.7),
diff --git a/Server/src/main/kotlin/rs09/game/content/ame/events/MysteriousOldManDialogue.kt b/Server/src/main/content/global/ame/events/MysteriousOldManDialogue.kt
similarity index 72%
rename from Server/src/main/kotlin/rs09/game/content/ame/events/MysteriousOldManDialogue.kt
rename to Server/src/main/content/global/ame/events/MysteriousOldManDialogue.kt
index 5a1591a8b..5366ee17b 100644
--- a/Server/src/main/kotlin/rs09/game/content/ame/events/MysteriousOldManDialogue.kt
+++ b/Server/src/main/content/global/ame/events/MysteriousOldManDialogue.kt
@@ -1,9 +1,8 @@
-package rs09.game.content.ame.events
+package content.global.ame.events
import core.game.node.entity.player.Player
-import rs09.game.content.ame.RandomEventManager
-import rs09.game.content.ame.events.supriseexam.SurpriseExamUtils
-import rs09.game.content.dialogue.DialogueFile
+import content.global.ame.events.supriseexam.SurpriseExamUtils
+import core.game.dialogue.DialogueFile
class MysteriousOldManDialogue(val type: String) : DialogueFile() {
@@ -23,11 +22,11 @@ class MysteriousOldManDialogue(val type: String) : DialogueFile() {
1 -> {
end()
teleport(player!!,type)
- RandomEventManager.getInstance(player!!)?.event?.terminate()
+ content.global.ame.RandomEventManager.getInstance(player!!)?.event?.terminate()
}
2 -> {
end()
- RandomEventManager.getInstance(player!!)?.event?.terminate()
+ content.global.ame.RandomEventManager.getInstance(player!!)?.event?.terminate()
}
}
}
diff --git a/Server/src/main/kotlin/rs09/game/content/ame/events/MysteriousOldManNPC.kt b/Server/src/main/content/global/ame/events/MysteriousOldManNPC.kt
similarity index 85%
rename from Server/src/main/kotlin/rs09/game/content/ame/events/MysteriousOldManNPC.kt
rename to Server/src/main/content/global/ame/events/MysteriousOldManNPC.kt
index ce177eca3..3ed7289b1 100644
--- a/Server/src/main/kotlin/rs09/game/content/ame/events/MysteriousOldManNPC.kt
+++ b/Server/src/main/content/global/ame/events/MysteriousOldManNPC.kt
@@ -1,10 +1,10 @@
-package rs09.game.content.ame.events
+package content.global.ame.events
+import content.global.ame.RandomEventNPC
import core.game.node.entity.npc.NPC
import core.tools.RandomFunction
import org.rs09.consts.NPCs
-import rs09.game.content.ame.RandomEventNPC
-import rs09.game.content.global.WeightBasedTable
+import core.api.utils.WeightBasedTable
class MysteriousOldManNPC(var type: String = "", override var loot: WeightBasedTable? = null) : RandomEventNPC(NPCs.MYSTERIOUS_OLD_MAN_410) {
override fun init() {
diff --git a/Server/src/main/kotlin/rs09/game/content/ame/events/certer/CerterDialogue.kt b/Server/src/main/content/global/ame/events/certer/CerterDialogue.kt
similarity index 80%
rename from Server/src/main/kotlin/rs09/game/content/ame/events/certer/CerterDialogue.kt
rename to Server/src/main/content/global/ame/events/certer/CerterDialogue.kt
index 2de88c610..25ac73fdf 100644
--- a/Server/src/main/kotlin/rs09/game/content/ame/events/certer/CerterDialogue.kt
+++ b/Server/src/main/content/global/ame/events/certer/CerterDialogue.kt
@@ -1,12 +1,11 @@
-package rs09.game.content.ame.events.certer
+package content.global.ame.events.certer
-import api.addItemOrDrop
+import core.api.addItemOrDrop
import core.game.component.Component
import core.game.node.entity.impl.PulseType
import core.game.node.entity.player.link.emote.Emotes
-import rs09.game.content.ame.RandomEventManager
-import rs09.game.content.dialogue.DialogueFile
-import rs09.tools.END_DIALOGUE
+import core.game.dialogue.DialogueFile
+import core.tools.END_DIALOGUE
class CerterDialogue(val initial: Boolean) : DialogueFile() {
val CERTER_INTERFACE = 184
@@ -31,13 +30,13 @@ class CerterDialogue(val initial: Boolean) : DialogueFile() {
npc("Sorry, I don't think so.").also {
player!!.setAttribute("certer:reward", true)
stage = END_DIALOGUE
- RandomEventManager.getInstance(player!!)?.event?.terminate()
+ content.global.ame.RandomEventManager.getInstance(player!!)?.event?.terminate()
}
} else {
npc("Thank you, I hope you like your present. I must be", "leaving now though.").also {
player!!.setAttribute("certer:reward", true)
stage = END_DIALOGUE
- RandomEventManager.getInstance(player!!)!!.event!!.loot!!.roll().forEach { addItemOrDrop(player!!, it.id, it.amount) }
+ content.global.ame.RandomEventManager.getInstance(player!!)!!.event!!.loot!!.roll().forEach { addItemOrDrop(player!!, it.id, it.amount) }
}
}
}
@@ -52,7 +51,7 @@ class CerterDialogue(val initial: Boolean) : DialogueFile() {
// Wave goodbye
npc!!.animate(Emotes.WAVE.animation)
// Terminate the event
- RandomEventManager.getInstance(player!!)?.event?.terminate()
+ content.global.ame.RandomEventManager.getInstance(player!!)?.event?.terminate()
} else {
player!!.setAttribute("random:pause", false)
}
diff --git a/Server/src/main/kotlin/rs09/game/content/ame/events/certer/CerterEventInterface.kt b/Server/src/main/content/global/ame/events/certer/CerterEventInterface.kt
similarity index 95%
rename from Server/src/main/kotlin/rs09/game/content/ame/events/certer/CerterEventInterface.kt
rename to Server/src/main/content/global/ame/events/certer/CerterEventInterface.kt
index 9cfcef0ad..e64cf3403 100644
--- a/Server/src/main/kotlin/rs09/game/content/ame/events/certer/CerterEventInterface.kt
+++ b/Server/src/main/content/global/ame/events/certer/CerterEventInterface.kt
@@ -1,10 +1,10 @@
-package rs09.game.content.ame.events.certer
+package content.global.ame.events.certer
+import content.global.ame.RandomEventManager
import core.game.node.entity.player.Player
import core.game.node.item.Item
import org.rs09.consts.Items
-import rs09.game.content.ame.RandomEventManager
-import rs09.game.interaction.InterfaceListener
+import core.game.interaction.InterfaceListener
class CerterEventInterface : InterfaceListener {
val CERTER_INTERFACE = 184
diff --git a/Server/src/main/kotlin/rs09/game/content/ame/events/certer/CerterNPC.kt b/Server/src/main/content/global/ame/events/certer/CerterNPC.kt
similarity index 88%
rename from Server/src/main/kotlin/rs09/game/content/ame/events/certer/CerterNPC.kt
rename to Server/src/main/content/global/ame/events/certer/CerterNPC.kt
index 7f4fe4fdc..daf3bc822 100644
--- a/Server/src/main/kotlin/rs09/game/content/ame/events/certer/CerterNPC.kt
+++ b/Server/src/main/content/global/ame/events/certer/CerterNPC.kt
@@ -1,11 +1,12 @@
-package rs09.game.content.ame.events.certer
+package content.global.ame.events.certer
import core.game.node.entity.npc.NPC
import core.game.node.entity.player.link.emote.Emotes
import core.tools.RandomFunction
import org.rs09.consts.NPCs
-import rs09.game.content.ame.RandomEventNPC
-import rs09.game.content.global.WeightBasedTable
+import content.global.ame.RandomEventNPC
+import core.api.animate
+import core.api.utils.WeightBasedTable
class CerterNPC(override var loot: WeightBasedTable? = null) : RandomEventNPC(NPCs.GILES_2538) {
lateinit var pName: String
@@ -44,6 +45,6 @@ class CerterNPC(override var loot: WeightBasedTable? = null) : RandomEventNPC(NP
player.setAttribute("random:pause", false)
player.setAttribute("certer:reward", false)
sendChat(phrases[0])
- api.animate(this, Emotes.BOW.animation, true)
+ animate(this, Emotes.BOW.animation, true)
}
}
\ No newline at end of file
diff --git a/Server/src/main/kotlin/rs09/game/content/ame/events/drilldemon/DrillDemonListeners.kt b/Server/src/main/content/global/ame/events/drilldemon/DrillDemonListeners.kt
similarity index 93%
rename from Server/src/main/kotlin/rs09/game/content/ame/events/drilldemon/DrillDemonListeners.kt
rename to Server/src/main/content/global/ame/events/drilldemon/DrillDemonListeners.kt
index 7867a8a46..5f7881710 100644
--- a/Server/src/main/kotlin/rs09/game/content/ame/events/drilldemon/DrillDemonListeners.kt
+++ b/Server/src/main/content/global/ame/events/drilldemon/DrillDemonListeners.kt
@@ -1,10 +1,10 @@
-package rs09.game.content.ame.events.drilldemon
+package content.global.ame.events.drilldemon
import core.game.node.entity.npc.NPC
import core.game.system.task.Pulse
import org.rs09.consts.NPCs
-import rs09.game.interaction.InteractionListener
-import rs09.game.interaction.IntType
+import core.game.interaction.InteractionListener
+import core.game.interaction.IntType
class DrillDemonListeners : InteractionListener {
val MATS = intArrayOf(10076,10077,10078,10079)
diff --git a/Server/src/main/kotlin/rs09/game/content/ame/events/drilldemon/DrillDemonUtils.kt b/Server/src/main/content/global/ame/events/drilldemon/DrillDemonUtils.kt
similarity index 96%
rename from Server/src/main/kotlin/rs09/game/content/ame/events/drilldemon/DrillDemonUtils.kt
rename to Server/src/main/content/global/ame/events/drilldemon/DrillDemonUtils.kt
index c1398f00a..c1331420e 100644
--- a/Server/src/main/kotlin/rs09/game/content/ame/events/drilldemon/DrillDemonUtils.kt
+++ b/Server/src/main/content/global/ame/events/drilldemon/DrillDemonUtils.kt
@@ -1,7 +1,7 @@
-package rs09.game.content.ame.events.drilldemon
+package content.global.ame.events.drilldemon
-import api.*
-import core.game.content.dialogue.FacialExpression
+import core.api.*
+import core.game.dialogue.FacialExpression
import core.game.node.entity.player.Player
import core.game.node.item.GroundItemManager
import core.game.node.item.Item
@@ -53,7 +53,7 @@ object DrillDemonUtils {
player.varpManager.get(DD_SIGN_VARP).setVarbit(tempOffsetList[i],tempList[i]).send(player)
}
- player.dialogueInterpreter.sendDialogues(NPCs.SERGEANT_DAMIEN_2790,FacialExpression.OLD_NORMAL,when(task){
+ player.dialogueInterpreter.sendDialogues(NPCs.SERGEANT_DAMIEN_2790, core.game.dialogue.FacialExpression.OLD_NORMAL,when(task){
DD_SIGN_JOG -> "Get over there and jog in place!"
DD_SIGN_JUMP -> "I need 40 jumping jacks stat!"
DD_SIGN_PUSHUP -> "Get over there and give me 20 pushups!"
diff --git a/Server/src/main/kotlin/rs09/game/content/ame/events/drilldemon/SeargentDamienDefaultPlugin.kt b/Server/src/main/content/global/ame/events/drilldemon/SeargentDamienDefaultPlugin.kt
similarity index 63%
rename from Server/src/main/kotlin/rs09/game/content/ame/events/drilldemon/SeargentDamienDefaultPlugin.kt
rename to Server/src/main/content/global/ame/events/drilldemon/SeargentDamienDefaultPlugin.kt
index 2c409c896..67971e71b 100644
--- a/Server/src/main/kotlin/rs09/game/content/ame/events/drilldemon/SeargentDamienDefaultPlugin.kt
+++ b/Server/src/main/content/global/ame/events/drilldemon/SeargentDamienDefaultPlugin.kt
@@ -1,14 +1,14 @@
-package rs09.game.content.ame.events.drilldemon
+package content.global.ame.events.drilldemon
-import core.game.content.dialogue.DialoguePlugin
+import core.game.dialogue.DialoguePlugin
import core.game.node.entity.player.Player
import core.plugin.Initializable
import org.rs09.consts.NPCs
-import rs09.tools.END_DIALOGUE
+import core.tools.END_DIALOGUE
@Initializable
-class SeargentDamienDefaultPlugin(player: Player? = null) : DialoguePlugin(player) {
- override fun newInstance(player: Player?): DialoguePlugin {
+class SeargentDamienDefaultPlugin(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) {
+ override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin {
return SeargentDamienDefaultPlugin(player)
}
diff --git a/Server/src/main/kotlin/rs09/game/content/ame/events/drilldemon/SeargentDamienDialogue.kt b/Server/src/main/content/global/ame/events/drilldemon/SeargentDamienDialogue.kt
similarity index 54%
rename from Server/src/main/kotlin/rs09/game/content/ame/events/drilldemon/SeargentDamienDialogue.kt
rename to Server/src/main/content/global/ame/events/drilldemon/SeargentDamienDialogue.kt
index 477b7c2cf..6ab770f21 100644
--- a/Server/src/main/kotlin/rs09/game/content/ame/events/drilldemon/SeargentDamienDialogue.kt
+++ b/Server/src/main/content/global/ame/events/drilldemon/SeargentDamienDialogue.kt
@@ -1,18 +1,17 @@
-package rs09.game.content.ame.events.drilldemon
+package content.global.ame.events.drilldemon
-import core.game.content.dialogue.FacialExpression
+import core.game.dialogue.FacialExpression
import core.game.system.task.Pulse
-import rs09.game.content.ame.RandomEventManager
-import rs09.game.content.dialogue.DialogueFile
-import rs09.tools.END_DIALOGUE
-import rs09.tools.START_DIALOGUE
+import core.game.dialogue.DialogueFile
+import core.tools.END_DIALOGUE
+import core.tools.START_DIALOGUE
class SeargentDamienDialogue(val isCorrect: Boolean = false) : DialogueFile() {
override fun handle(componentID: Int, buttonID: Int) {
var correctAmt = player!!.getAttribute(DrillDemonUtils.DD_CORRECT_COUNTER,0)
- if(correctAmt == 4 && RandomEventManager.getInstance(player!!)!!.event == null) {
+ if(correctAmt == 4 && content.global.ame.RandomEventManager.getInstance(player!!)!!.event == null) {
when(stage){
- 0 -> npc(FacialExpression.OLD_NORMAL,"My god you actually did it, you limp","wristed worm-bodied MAGGOT! Take this","and get out of my sight.").also { stage++ }
+ 0 -> npc(core.game.dialogue.FacialExpression.OLD_NORMAL,"My god you actually did it, you limp","wristed worm-bodied MAGGOT! Take this","and get out of my sight.").also { stage++ }
1 -> {
end()
player!!.unlock()
@@ -25,9 +24,9 @@ class SeargentDamienDialogue(val isCorrect: Boolean = false) : DialogueFile() {
})
}
}
- } else if(RandomEventManager.getInstance(player!!)!!.event == null){
+ } else if(content.global.ame.RandomEventManager.getInstance(player!!)!!.event == null){
when(stage){
- START_DIALOGUE -> if(isCorrect) npc(FacialExpression.OLD_NORMAL,"Good! Now...").also { stage++ } else npc(FacialExpression.OLD_ANGRY1,"WRONG, MAGGOT!").also { stage++ }
+ START_DIALOGUE -> if(isCorrect) npc(core.game.dialogue.FacialExpression.OLD_NORMAL,"Good! Now...").also { stage++ } else npc(core.game.dialogue.FacialExpression.OLD_ANGRY1,"WRONG, MAGGOT!").also { stage++ }
1 -> {
end()
DrillDemonUtils.changeSignsAndAssignTask(player!!)
@@ -35,18 +34,18 @@ class SeargentDamienDialogue(val isCorrect: Boolean = false) : DialogueFile() {
}
} else {
when(stage){
- START_DIALOGUE -> npc(FacialExpression.OLD_NORMAL,"Would you like to come work out?").also { stage++ }
+ START_DIALOGUE -> npc(core.game.dialogue.FacialExpression.OLD_NORMAL,"Would you like to come work out?").also { stage++ }
1 -> options("Yes, please.", "No, thanks.").also { stage++ }
2 -> when(buttonID){
1 -> {
end()
DrillDemonUtils.teleport(player!!)
- RandomEventManager.getInstance(player!!)!!.event?.terminate()
+ content.global.ame.RandomEventManager.getInstance(player!!)!!.event?.terminate()
stage = END_DIALOGUE
}
2 -> {
end()
- RandomEventManager.getInstance(player!!)!!.event?.terminate()
+ content.global.ame.RandomEventManager.getInstance(player!!)!!.event?.terminate()
stage = END_DIALOGUE
}
}
diff --git a/Server/src/main/kotlin/rs09/game/content/ame/events/drilldemon/SeargentDamienNPC.kt b/Server/src/main/content/global/ame/events/drilldemon/SeargentDamienNPC.kt
similarity index 82%
rename from Server/src/main/kotlin/rs09/game/content/ame/events/drilldemon/SeargentDamienNPC.kt
rename to Server/src/main/content/global/ame/events/drilldemon/SeargentDamienNPC.kt
index e104e82a7..36d8cb9c5 100644
--- a/Server/src/main/kotlin/rs09/game/content/ame/events/drilldemon/SeargentDamienNPC.kt
+++ b/Server/src/main/content/global/ame/events/drilldemon/SeargentDamienNPC.kt
@@ -1,10 +1,10 @@
-package rs09.game.content.ame.events.drilldemon
+package content.global.ame.events.drilldemon
import core.game.node.entity.npc.NPC
import core.tools.RandomFunction
import org.rs09.consts.NPCs
-import rs09.game.content.ame.RandomEventNPC
-import rs09.game.content.global.WeightBasedTable
+import content.global.ame.RandomEventNPC
+import core.api.utils.WeightBasedTable
class SeargentDamienNPC(override var loot: WeightBasedTable? = null) : RandomEventNPC(NPCs.SERGEANT_DAMIEN_2790) {
diff --git a/Server/src/main/kotlin/rs09/game/content/ame/events/evilchicken/EvilChickenNPC.kt b/Server/src/main/content/global/ame/events/evilchicken/EvilChickenNPC.kt
similarity index 89%
rename from Server/src/main/kotlin/rs09/game/content/ame/events/evilchicken/EvilChickenNPC.kt
rename to Server/src/main/content/global/ame/events/evilchicken/EvilChickenNPC.kt
index fe9d31d7b..56131f8fb 100644
--- a/Server/src/main/kotlin/rs09/game/content/ame/events/evilchicken/EvilChickenNPC.kt
+++ b/Server/src/main/content/global/ame/events/evilchicken/EvilChickenNPC.kt
@@ -1,14 +1,14 @@
-package rs09.game.content.ame.events.evilchicken
+package content.global.ame.events.evilchicken
-import api.getWorldTicks
+import core.api.getWorldTicks
import core.game.node.entity.Entity
import core.game.node.entity.npc.NPC
import core.game.node.item.GroundItemManager
import core.game.node.item.Item
import core.tools.RandomFunction
import org.rs09.consts.Items
-import rs09.game.content.ame.RandomEventNPC
-import rs09.game.content.global.WeightBasedTable
+import content.global.ame.RandomEventNPC
+import core.api.utils.WeightBasedTable
import java.lang.Integer.max
val ids = 2463..2468
diff --git a/Server/src/main/content/global/ame/events/genie/GenieDialogue.kt b/Server/src/main/content/global/ame/events/genie/GenieDialogue.kt
new file mode 100644
index 000000000..829e0ecc4
--- /dev/null
+++ b/Server/src/main/content/global/ame/events/genie/GenieDialogue.kt
@@ -0,0 +1,16 @@
+package content.global.ame.events.genie
+
+import core.api.*
+import core.game.dialogue.FacialExpression
+import core.game.dialogue.DialogueFile
+import core.tools.END_DIALOGUE
+
+class GenieDialogue : DialogueFile() {
+ override fun handle(componentID: Int, buttonID: Int) {
+ val assigned = player!!.getAttribute("genie:item",0)
+ npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Ah, so you are there, ${player!!.name.capitalize()}. I'm so glad you summoned me. Please take this lamp and make your wish.")
+ addItemOrDrop(player!!, assigned)
+ content.global.ame.RandomEventManager.getInstance(player!!)!!.event?.terminate()
+ stage = END_DIALOGUE
+ }
+}
\ No newline at end of file
diff --git a/Server/src/main/kotlin/rs09/game/content/ame/events/genie/GenieNPC.kt b/Server/src/main/content/global/ame/events/genie/GenieNPC.kt
similarity index 85%
rename from Server/src/main/kotlin/rs09/game/content/ame/events/genie/GenieNPC.kt
rename to Server/src/main/content/global/ame/events/genie/GenieNPC.kt
index c111da800..1f1f270e8 100644
--- a/Server/src/main/kotlin/rs09/game/content/ame/events/genie/GenieNPC.kt
+++ b/Server/src/main/content/global/ame/events/genie/GenieNPC.kt
@@ -1,36 +1,36 @@
-package rs09.game.content.ame.events.genie
-
-import core.game.node.entity.npc.NPC
-import core.tools.RandomFunction
-import org.rs09.consts.Items
-import org.rs09.consts.NPCs
-import rs09.game.content.ame.RandomEventNPC
-import rs09.game.content.global.WeightBasedTable
-
-class GenieNPC(override var loot: WeightBasedTable? = null) : RandomEventNPC(NPCs.GENIE_409) {
- val phrases = arrayOf("Greetings, @name!","Ehem... Master @name?","Are you there, Master @name?","No one ignores me!")
- var assigned_item = 0
- val items = arrayOf(Items.LAMP_2528)
-
- override fun tick() {
- if(RandomFunction.random(1,15) == 5){
- sendChat(phrases.random().replace("@name",player.name.capitalize()))
- }
- super.tick()
- }
-
- override fun init() {
- super.init()
- assignItem()
- sendChat(phrases.random().replace("@name",player.name.capitalize()))
- }
-
- fun assignItem(){
- assigned_item = items.random()
- player.setAttribute("genie:item",assigned_item)
- }
-
- override fun talkTo(npc: NPC) {
- player.dialogueInterpreter.open(GenieDialogue(),npc)
- }
+package content.global.ame.events.genie
+
+import core.game.node.entity.npc.NPC
+import core.tools.RandomFunction
+import org.rs09.consts.Items
+import org.rs09.consts.NPCs
+import content.global.ame.RandomEventNPC
+import core.api.utils.WeightBasedTable
+
+class GenieNPC(override var loot: WeightBasedTable? = null) : RandomEventNPC(NPCs.GENIE_409) {
+ val phrases = arrayOf("Greetings, @name!","Ehem... Master @name?","Are you there, Master @name?","No one ignores me!")
+ var assigned_item = 0
+ val items = arrayOf(Items.LAMP_2528)
+
+ override fun tick() {
+ if(RandomFunction.random(1,15) == 5){
+ sendChat(phrases.random().replace("@name",player.name.capitalize()))
+ }
+ super.tick()
+ }
+
+ override fun init() {
+ super.init()
+ assignItem()
+ sendChat(phrases.random().replace("@name",player.name.capitalize()))
+ }
+
+ fun assignItem(){
+ assigned_item = items.random()
+ player.setAttribute("genie:item",assigned_item)
+ }
+
+ override fun talkTo(npc: NPC) {
+ player.dialogueInterpreter.open(GenieDialogue(),npc)
+ }
}
\ No newline at end of file
diff --git a/Server/src/main/kotlin/rs09/game/content/ame/events/rivertroll/RiverTrollRENPC.kt b/Server/src/main/content/global/ame/events/rivertroll/RiverTrollRENPC.kt
similarity index 86%
rename from Server/src/main/kotlin/rs09/game/content/ame/events/rivertroll/RiverTrollRENPC.kt
rename to Server/src/main/content/global/ame/events/rivertroll/RiverTrollRENPC.kt
index b1f69a2e6..b69ec7abe 100644
--- a/Server/src/main/kotlin/rs09/game/content/ame/events/rivertroll/RiverTrollRENPC.kt
+++ b/Server/src/main/content/global/ame/events/rivertroll/RiverTrollRENPC.kt
@@ -1,9 +1,9 @@
-package rs09.game.content.ame.events.rivertroll
+package content.global.ame.events.rivertroll
import core.game.node.entity.Entity
import core.game.node.entity.npc.NPC
-import rs09.game.content.ame.RandomEventNPC
-import rs09.game.content.global.WeightBasedTable
+import content.global.ame.RandomEventNPC
+import core.api.utils.WeightBasedTable
import java.lang.Integer.max
diff --git a/Server/src/main/kotlin/rs09/game/content/ame/events/rockgolem/RockGolemRENPC.kt b/Server/src/main/content/global/ame/events/rockgolem/RockGolemRENPC.kt
similarity index 67%
rename from Server/src/main/kotlin/rs09/game/content/ame/events/rockgolem/RockGolemRENPC.kt
rename to Server/src/main/content/global/ame/events/rockgolem/RockGolemRENPC.kt
index 207c6fca0..82fda9bf4 100644
--- a/Server/src/main/kotlin/rs09/game/content/ame/events/rockgolem/RockGolemRENPC.kt
+++ b/Server/src/main/content/global/ame/events/rockgolem/RockGolemRENPC.kt
@@ -1,17 +1,9 @@
-package rs09.game.content.ame.events.rockgolem
+package content.global.ame.events.rockgolem
-import api.addItemOrDrop
-import api.getWorldTicks
-import api.produceGroundItem
import core.game.node.entity.Entity
import core.game.node.entity.npc.NPC
-import core.game.node.item.GroundItemManager
-import core.game.node.item.Item
-import core.tools.RandomFunction
-import org.rs09.consts.Items
-import rs09.game.content.ame.RandomEventNPC
-import rs09.game.content.global.WeightBasedTable
-import rs09.game.content.global.WeightedItem
+import content.global.ame.RandomEventNPC
+import core.api.utils.WeightBasedTable
import kotlin.math.max
diff --git a/Server/src/main/kotlin/rs09/game/content/ame/events/sandwichlady/SandwichLadyDialogue.kt b/Server/src/main/content/global/ame/events/sandwichlady/SandwichLadyDialogue.kt
similarity index 80%
rename from Server/src/main/kotlin/rs09/game/content/ame/events/sandwichlady/SandwichLadyDialogue.kt
rename to Server/src/main/content/global/ame/events/sandwichlady/SandwichLadyDialogue.kt
index 96e1a76e1..7cfc456ea 100644
--- a/Server/src/main/kotlin/rs09/game/content/ame/events/sandwichlady/SandwichLadyDialogue.kt
+++ b/Server/src/main/content/global/ame/events/sandwichlady/SandwichLadyDialogue.kt
@@ -1,13 +1,12 @@
-package rs09.game.content.ame.events.sandwichlady
+package content.global.ame.events.sandwichlady
import core.cache.def.impl.ItemDefinition
import core.game.component.Component
import core.game.node.entity.combat.ImpactHandler
import core.game.node.item.GroundItemManager
import core.game.node.item.Item
-import rs09.game.content.ame.RandomEventManager
-import rs09.game.content.dialogue.DialogueFile
-import rs09.tools.END_DIALOGUE
+import core.game.dialogue.DialogueFile
+import core.tools.END_DIALOGUE
class SandwichLadyDialogue(val isChoice: Boolean) : DialogueFile() {
val SANDWICH_INTERFACE = 297
@@ -27,13 +26,13 @@ class SandwichLadyDialogue(val isChoice: Boolean) : DialogueFile() {
0 -> if(choice != assigned){
npc!!.sendChat("That's not what I said you could have!")
player!!.impactHandler.manualHit(npc,3,ImpactHandler.HitsplatType.NORMAL)
- RandomEventManager.getInstance(player!!)!!.event?.terminate()
+ content.global.ame.RandomEventManager.getInstance(player!!)!!.event?.terminate()
} else {
npc("Here you are, dear. I hope you enjoy it!")
if(!player!!.inventory.add(Item(assigned))){
GroundItemManager.create(Item(assigned),player)
}
- RandomEventManager.getInstance(player!!)!!.event?.terminate()
+ content.global.ame.RandomEventManager.getInstance(player!!)!!.event?.terminate()
stage = END_DIALOGUE
}
}
diff --git a/Server/src/main/kotlin/rs09/game/content/ame/events/sandwichlady/SandwichLadyInterface.kt b/Server/src/main/content/global/ame/events/sandwichlady/SandwichLadyInterface.kt
similarity index 81%
rename from Server/src/main/kotlin/rs09/game/content/ame/events/sandwichlady/SandwichLadyInterface.kt
rename to Server/src/main/content/global/ame/events/sandwichlady/SandwichLadyInterface.kt
index a28bb31fe..9b3c607df 100644
--- a/Server/src/main/kotlin/rs09/game/content/ame/events/sandwichlady/SandwichLadyInterface.kt
+++ b/Server/src/main/content/global/ame/events/sandwichlady/SandwichLadyInterface.kt
@@ -1,11 +1,10 @@
-package rs09.game.content.ame.events.sandwichlady
+package content.global.ame.events.sandwichlady
import core.game.node.item.Item
import org.rs09.consts.Items
-import rs09.game.content.ame.RandomEventManager
-import rs09.game.interaction.InterfaceListener
+import core.game.interaction.InterfaceListener
-class SandwichLadyInterface : InterfaceListener{
+class SandwichLadyInterface : InterfaceListener {
val SANDWICH_INTERFACE = 297
val baguette = Items.BAGUETTE_6961
@@ -32,7 +31,7 @@ class SandwichLadyInterface : InterfaceListener{
player.setAttribute("sandwich-lady:choice",item.id)
player.interfaceManager.close()
- player.dialogueInterpreter.open(SandwichLadyDialogue(true), RandomEventManager.getInstance(player)!!.event)
+ player.dialogueInterpreter.open(SandwichLadyDialogue(true), content.global.ame.RandomEventManager.getInstance(player)!!.event)
return@on true
}
}
diff --git a/Server/src/main/kotlin/rs09/game/content/ame/events/sandwichlady/SandwichLadyRENPC.kt b/Server/src/main/content/global/ame/events/sandwichlady/SandwichLadyRENPC.kt
similarity index 90%
rename from Server/src/main/kotlin/rs09/game/content/ame/events/sandwichlady/SandwichLadyRENPC.kt
rename to Server/src/main/content/global/ame/events/sandwichlady/SandwichLadyRENPC.kt
index dd30aac19..0eef0f2f0 100644
--- a/Server/src/main/kotlin/rs09/game/content/ame/events/sandwichlady/SandwichLadyRENPC.kt
+++ b/Server/src/main/content/global/ame/events/sandwichlady/SandwichLadyRENPC.kt
@@ -1,11 +1,11 @@
-package rs09.game.content.ame.events.sandwichlady
+package content.global.ame.events.sandwichlady
import core.game.node.entity.npc.NPC
import core.tools.RandomFunction
import org.rs09.consts.Items
import org.rs09.consts.NPCs
-import rs09.game.content.ame.RandomEventNPC
-import rs09.game.content.global.WeightBasedTable
+import content.global.ame.RandomEventNPC
+import core.api.utils.WeightBasedTable
class SandwichLadyRENPC(override var loot: WeightBasedTable? = null) : RandomEventNPC(NPCs.SANDWICH_LADY_3117) {
val phrases = arrayOf("Hello, @name, can you hear me?","Sandwiches, @name!","Are you ignoring me @name??","Yoohoo! Sandwiches, @name!","Hello, @name?", "Come get your sandwiches @name!", "How could you ignore me like this @name?!", "Do you even want your sandwiches, @name?")
diff --git a/Server/src/main/kotlin/rs09/game/content/ame/events/shade/ShadeRENPC.kt b/Server/src/main/content/global/ame/events/shade/ShadeRENPC.kt
similarity index 67%
rename from Server/src/main/kotlin/rs09/game/content/ame/events/shade/ShadeRENPC.kt
rename to Server/src/main/content/global/ame/events/shade/ShadeRENPC.kt
index 12de174fe..8fecda80c 100644
--- a/Server/src/main/kotlin/rs09/game/content/ame/events/shade/ShadeRENPC.kt
+++ b/Server/src/main/content/global/ame/events/shade/ShadeRENPC.kt
@@ -1,17 +1,9 @@
-package rs09.game.content.ame.events.shade
+package content.global.ame.events.shade
-import api.addItemOrDrop
-import api.getWorldTicks
-import api.produceGroundItem
import core.game.node.entity.Entity
import core.game.node.entity.npc.NPC
-import core.game.node.item.GroundItemManager
-import core.game.node.item.Item
-import core.tools.RandomFunction
-import org.rs09.consts.Items
-import rs09.game.content.ame.RandomEventNPC
-import rs09.game.content.global.WeightBasedTable
-import rs09.game.content.global.WeightedItem
+import content.global.ame.RandomEventNPC
+import core.api.utils.WeightBasedTable
val ids = 425..430
diff --git a/Server/src/main/kotlin/rs09/game/content/ame/events/supriseexam/MordautDialogue.kt b/Server/src/main/content/global/ame/events/supriseexam/MordautDialogue.kt
similarity index 90%
rename from Server/src/main/kotlin/rs09/game/content/ame/events/supriseexam/MordautDialogue.kt
rename to Server/src/main/content/global/ame/events/supriseexam/MordautDialogue.kt
index 278f2b4f4..652055335 100644
--- a/Server/src/main/kotlin/rs09/game/content/ame/events/supriseexam/MordautDialogue.kt
+++ b/Server/src/main/content/global/ame/events/supriseexam/MordautDialogue.kt
@@ -1,9 +1,9 @@
-package rs09.game.content.ame.events.supriseexam
+package content.global.ame.events.supriseexam
import core.game.component.Component
-import core.game.content.dialogue.FacialExpression
-import rs09.game.content.dialogue.DialogueFile
-import rs09.tools.END_DIALOGUE
+import core.game.dialogue.FacialExpression
+import core.game.dialogue.DialogueFile
+import core.tools.END_DIALOGUE
class MordautDialogue(val examComplete: Boolean, val questionCorrect: Boolean = false, val fromInterface: Boolean = false) : DialogueFile() {
override fun handle(componentID: Int, buttonID: Int) {
@@ -60,6 +60,6 @@ class MordautDialogue(val examComplete: Boolean, val questionCorrect: Boolean =
}
override fun npc(vararg messages: String?): Component? {
- return super.npc(FacialExpression.OLD_NORMAL,*messages)
+ return super.npc(core.game.dialogue.FacialExpression.OLD_NORMAL,*messages)
}
}
\ No newline at end of file
diff --git a/Server/src/main/kotlin/rs09/game/content/ame/events/supriseexam/SEDoorDialogue.kt b/Server/src/main/content/global/ame/events/supriseexam/SEDoorDialogue.kt
similarity index 75%
rename from Server/src/main/kotlin/rs09/game/content/ame/events/supriseexam/SEDoorDialogue.kt
rename to Server/src/main/content/global/ame/events/supriseexam/SEDoorDialogue.kt
index 4f63efa48..3fffea71b 100644
--- a/Server/src/main/kotlin/rs09/game/content/ame/events/supriseexam/SEDoorDialogue.kt
+++ b/Server/src/main/content/global/ame/events/supriseexam/SEDoorDialogue.kt
@@ -1,7 +1,7 @@
-package rs09.game.content.ame.events.supriseexam
+package content.global.ame.events.supriseexam
-import rs09.game.content.dialogue.DialogueFile
-import rs09.tools.END_DIALOGUE
+import core.game.dialogue.DialogueFile
+import core.tools.END_DIALOGUE
class SEDoorDialogue(val preExam: Boolean) : DialogueFile() {
override fun handle(componentID: Int, buttonID: Int) {
diff --git a/Server/src/main/kotlin/rs09/game/content/ame/events/supriseexam/SEPatternInterface.kt b/Server/src/main/content/global/ame/events/supriseexam/SEPatternInterface.kt
similarity index 92%
rename from Server/src/main/kotlin/rs09/game/content/ame/events/supriseexam/SEPatternInterface.kt
rename to Server/src/main/content/global/ame/events/supriseexam/SEPatternInterface.kt
index 3175b9e1b..e445c5145 100644
--- a/Server/src/main/kotlin/rs09/game/content/ame/events/supriseexam/SEPatternInterface.kt
+++ b/Server/src/main/content/global/ame/events/supriseexam/SEPatternInterface.kt
@@ -1,9 +1,9 @@
-package rs09.game.content.ame.events.supriseexam
+package content.global.ame.events.supriseexam
import core.game.node.entity.npc.NPC
import org.rs09.consts.Components
import org.rs09.consts.NPCs
-import rs09.game.interaction.InterfaceListener
+import core.game.interaction.InterfaceListener
class SEPatternInterface : InterfaceListener {
diff --git a/Server/src/main/kotlin/rs09/game/content/ame/events/supriseexam/SupriseExamListeners.kt b/Server/src/main/content/global/ame/events/supriseexam/SupriseExamListeners.kt
similarity index 83%
rename from Server/src/main/kotlin/rs09/game/content/ame/events/supriseexam/SupriseExamListeners.kt
rename to Server/src/main/content/global/ame/events/supriseexam/SupriseExamListeners.kt
index 2640691fe..6629982fa 100644
--- a/Server/src/main/kotlin/rs09/game/content/ame/events/supriseexam/SupriseExamListeners.kt
+++ b/Server/src/main/content/global/ame/events/supriseexam/SupriseExamListeners.kt
@@ -1,4 +1,4 @@
-package rs09.game.content.ame.events.supriseexam
+package content.global.ame.events.supriseexam
import core.game.component.Component
import core.game.node.entity.player.Player
@@ -6,16 +6,16 @@ import core.game.node.item.Item
import core.game.world.map.Location
import org.rs09.consts.Items
import org.rs09.consts.NPCs
-import rs09.game.interaction.InteractionListener
-import rs09.game.interaction.IntType
-import rs09.game.interaction.inter.ExperienceInterface
+import core.game.interaction.InteractionListener
+import core.game.interaction.IntType
+import content.global.handlers.iface.ExperienceInterface
class SupriseExamListeners : InteractionListener {
val MORDAUT = NPCs.MR_MORDAUT_6117
val BOOK_OF_KNOWLEDGE = Items.BOOK_OF_KNOWLEDGE_11640
override fun defineListeners() {
- on(MORDAUT, IntType.NPC, "talk-to"){player, node ->
+ on(MORDAUT, IntType.NPC, "talk-to"){ player, node ->
player.faceLocation(Location.create(1886, 5024, 0))
val examComplete = player.getAttribute(SurpriseExamUtils.SE_KEY_CORRECT,0) == 3
player.dialogueInterpreter.open(MordautDialogue(examComplete),node.asNpc())
@@ -39,7 +39,7 @@ class SupriseExamListeners : InteractionListener {
return@on true
}
- on(BOOK_OF_KNOWLEDGE, IntType.ITEM, "read"){player, _ ->
+ on(BOOK_OF_KNOWLEDGE, IntType.ITEM, "read"){ player, _ ->
player.setAttribute("caller"){skill: Int,p: Player ->
if(p.inventory.remove(Item(BOOK_OF_KNOWLEDGE))) {
val level = p.skills.getStaticLevel(skill)
@@ -54,7 +54,7 @@ class SupriseExamListeners : InteractionListener {
}
override fun defineDestinationOverrides() {
- setDest(IntType.NPC,MORDAUT){_,_ ->
+ setDest(IntType.NPC,MORDAUT){ _, _ ->
return@setDest Location.create(1886, 5025, 0)
}
}
diff --git a/Server/src/main/kotlin/rs09/game/content/ame/events/supriseexam/SurpriseExamUtils.kt b/Server/src/main/content/global/ame/events/supriseexam/SurpriseExamUtils.kt
similarity index 98%
rename from Server/src/main/kotlin/rs09/game/content/ame/events/supriseexam/SurpriseExamUtils.kt
rename to Server/src/main/content/global/ame/events/supriseexam/SurpriseExamUtils.kt
index 86f8892bc..eabb3d60c 100644
--- a/Server/src/main/kotlin/rs09/game/content/ame/events/supriseexam/SurpriseExamUtils.kt
+++ b/Server/src/main/content/global/ame/events/supriseexam/SurpriseExamUtils.kt
@@ -1,6 +1,6 @@
-package rs09.game.content.ame.events.supriseexam
+package content.global.ame.events.supriseexam
-import api.*
+import core.api.*
import core.game.node.entity.impl.PulseType
import core.game.node.entity.player.Player
import core.game.node.item.GroundItemManager
diff --git a/Server/src/main/kotlin/rs09/game/content/ame/events/treespirit/TreeSpiritRENPC.kt b/Server/src/main/content/global/ame/events/treespirit/TreeSpiritRENPC.kt
similarity index 68%
rename from Server/src/main/kotlin/rs09/game/content/ame/events/treespirit/TreeSpiritRENPC.kt
rename to Server/src/main/content/global/ame/events/treespirit/TreeSpiritRENPC.kt
index a99c12398..2e4fb3436 100644
--- a/Server/src/main/kotlin/rs09/game/content/ame/events/treespirit/TreeSpiritRENPC.kt
+++ b/Server/src/main/content/global/ame/events/treespirit/TreeSpiritRENPC.kt
@@ -1,17 +1,9 @@
-package rs09.game.content.ame.events.treespirit
+package content.global.ame.events.treespirit
-import api.addItemOrDrop
-import api.getWorldTicks
-import api.produceGroundItem
import core.game.node.entity.Entity
import core.game.node.entity.npc.NPC
-import core.game.node.item.GroundItemManager
-import core.game.node.item.Item
-import core.tools.RandomFunction
-import org.rs09.consts.Items
-import rs09.game.content.ame.RandomEventNPC
-import rs09.game.content.global.WeightBasedTable
-import rs09.game.content.global.WeightedItem
+import content.global.ame.RandomEventNPC
+import core.api.utils.WeightBasedTable
import kotlin.math.max
diff --git a/Server/src/main/kotlin/rs09/game/content/ame/events/zombie/ZombieRENPC.kt b/Server/src/main/content/global/ame/events/zombie/ZombieRENPC.kt
similarity index 66%
rename from Server/src/main/kotlin/rs09/game/content/ame/events/zombie/ZombieRENPC.kt
rename to Server/src/main/content/global/ame/events/zombie/ZombieRENPC.kt
index e4511e99d..1fed431b9 100644
--- a/Server/src/main/kotlin/rs09/game/content/ame/events/zombie/ZombieRENPC.kt
+++ b/Server/src/main/content/global/ame/events/zombie/ZombieRENPC.kt
@@ -1,17 +1,9 @@
-package rs09.game.content.ame.events.zombie
+package content.global.ame.events.zombie
-import api.addItemOrDrop
-import api.getWorldTicks
-import api.produceGroundItem
import core.game.node.entity.Entity
import core.game.node.entity.npc.NPC
-import core.game.node.item.GroundItemManager
-import core.game.node.item.Item
-import core.tools.RandomFunction
-import org.rs09.consts.Items
-import rs09.game.content.ame.RandomEventNPC
-import rs09.game.content.global.WeightBasedTable
-import rs09.game.content.global.WeightedItem
+import content.global.ame.RandomEventNPC
+import core.api.utils.WeightBasedTable
val ids = 419..424
diff --git a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/Adventurer.kt b/Server/src/main/content/global/bots/Adventurer.kt
similarity index 95%
rename from Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/Adventurer.kt
rename to Server/src/main/content/global/bots/Adventurer.kt
index d4b783b61..d47e23145 100644
--- a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/Adventurer.kt
+++ b/Server/src/main/content/global/bots/Adventurer.kt
@@ -1,4 +1,4 @@
-package rs09.game.ai.general.scriptrepository
+package content.global.bots
import core.game.interaction.DestinationFlag
import core.game.interaction.MovementPulse
@@ -7,7 +7,7 @@ import core.game.node.entity.combat.CombatStyle
import core.game.node.entity.skill.Skills
import core.game.node.item.Item
import core.game.system.task.Pulse
-import rs09.game.world.GameWorld
+import core.game.world.GameWorld
import core.game.world.map.Location
import core.game.world.map.RegionManager
import core.game.world.map.zone.ZoneBorders
@@ -15,11 +15,12 @@ import core.game.world.update.flag.*
import core.tools.RandomFunction
import org.json.simple.JSONArray
import org.json.simple.JSONObject
-import rs09.ServerConstants
-import rs09.game.ai.AIRepository
-import rs09.game.ai.pvmbots.CombatBotAssembler
-import rs09.game.interaction.IntType
-import rs09.game.interaction.InteractionListeners
+import core.ServerConstants
+import core.game.bots.AIRepository
+import core.game.bots.CombatBotAssembler
+import core.game.bots.Script
+import core.game.interaction.IntType
+import core.game.interaction.InteractionListeners
import java.io.File
import java.io.FileReader
import java.time.LocalDateTime
@@ -88,7 +89,8 @@ class Adventurer(val style: CombatStyle): Script() {
//TODO: Optimise and adjust how bots handle picking up ground items further.
fun immerse() {
- if (counter++ == 180) {state = State.TELEPORTING}
+ if (counter++ == 180) {state = State.TELEPORTING
+ }
val items = AIRepository.groundItems[bot]
if (Random.nextBoolean()) {
if (items.isNullOrEmpty()) {
@@ -127,7 +129,7 @@ class Adventurer(val style: CombatStyle): Script() {
if(resource != null){
if(resource.name.contains("ocks")) InteractionListeners.run(resource.id,
IntType.SCENERY,"mine",bot,resource)
- else InteractionListeners.run(resource.id,IntType.SCENERY,"chop down",bot,resource)
+ else InteractionListeners.run(resource.id, IntType.SCENERY,"chop down",bot,resource)
}
}
}
@@ -238,15 +240,15 @@ class Adventurer(val style: CombatStyle): Script() {
if (RandomFunction.random(1000) <= 50 && poi){
val roamDistancePoi = when(poiloc){
- teakfarm,crawlinghands -> 5
+ teakfarm, crawlinghands -> 5
treegnome -> 50
isafdar -> 40
eaglespeek -> 40
keldagrimout -> 30
teak1 -> 30
miningguild -> 5
- magics,coal -> 7
- gemrocks,chaosnpc,chaosnpc2 -> 1
+ magics, coal -> 7
+ gemrocks, chaosnpc, chaosnpc2 -> 1
else -> 60
}
scriptAPI.randomWalkTo(poiloc,roamDistancePoi)
@@ -540,14 +542,14 @@ class Adventurer(val style: CombatStyle): Script() {
draynor, rimmington, lumbridge, ge, ge2, edgeville)
val pois = listOf(
- karamja,karamja,alkharid,
- alkharid,feldiphills,feldiphills,
- isafdar,eaglespeek,eaglespeek,
- canafis,treegnome,treegnome,
- teak1,teakfarm,keldagrimout,
- miningguild,coal,crawlinghands,
- magics,gemrocks,chaosnpc,chaosnpc,
- chaosnpc2,taverly)
+ karamja, karamja, alkharid,
+ alkharid, feldiphills, feldiphills,
+ isafdar, eaglespeek, eaglespeek,
+ canafis, treegnome, treegnome,
+ teak1, teakfarm, keldagrimout,
+ miningguild, coal, crawlinghands,
+ magics, gemrocks, chaosnpc, chaosnpc,
+ chaosnpc2, taverly)
private val whiteWolfMountainTop = Location(2850, 3496, 0)
private val catherbyToTopOfWhiteWolf = arrayOf(Location(2856, 3442, 0), Location(2848, 3455, 0), Location(2848, 3471, 0), Location(2848, 3487, 0))
diff --git a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/ChickenKiller.kt b/Server/src/main/content/global/bots/ChickenKiller.kt
similarity index 97%
rename from Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/ChickenKiller.kt
rename to Server/src/main/content/global/bots/ChickenKiller.kt
index d462bf565..b74c18ab7 100644
--- a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/ChickenKiller.kt
+++ b/Server/src/main/content/global/bots/ChickenKiller.kt
@@ -1,10 +1,10 @@
-package rs09.game.ai.general.scriptrepository
+package content.global.bots
+import core.game.bots.*
import core.game.node.item.Item
import core.game.world.map.Location
import core.game.world.map.zone.ZoneBorders
import org.rs09.consts.Items
-import rs09.game.ai.general.ScriptAPI
@PlayerCompatible
@ScriptName("Chicken Killer")
diff --git a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/CoalMiner.kt b/Server/src/main/content/global/bots/CoalMiner.kt
similarity index 94%
rename from Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/CoalMiner.kt
rename to Server/src/main/content/global/bots/CoalMiner.kt
index 84bfa4d70..9bbf13b08 100644
--- a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/CoalMiner.kt
+++ b/Server/src/main/content/global/bots/CoalMiner.kt
@@ -1,4 +1,4 @@
-package rs09.game.ai.general.scriptrepository
+package content.global.bots
import core.game.interaction.DestinationFlag
@@ -8,12 +8,10 @@ import core.game.node.entity.skill.Skills
import core.game.node.item.Item
import core.game.world.map.zone.ZoneBorders
import org.rs09.consts.Items
-import rs09.game.ai.general.ScriptAPI
-import rs09.game.ai.skillingbot.SkillingBotAssembler
-import rs09.game.interaction.InteractionListener
-import rs09.game.interaction.IntType
-import rs09.game.interaction.InteractionListeners
-import api.*
+import core.game.interaction.IntType
+import core.game.interaction.InteractionListeners
+import core.api.*
+import core.game.bots.*
@PlayerCompatible
@ScriptName("Falador Coal Miner")
diff --git a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/CowKiller.kt b/Server/src/main/content/global/bots/CowKiller.kt
similarity index 97%
rename from Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/CowKiller.kt
rename to Server/src/main/content/global/bots/CowKiller.kt
index dfce3b703..ac15edb28 100644
--- a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/CowKiller.kt
+++ b/Server/src/main/content/global/bots/CowKiller.kt
@@ -1,4 +1,4 @@
-package rs09.game.ai.general.scriptrepository
+package content.global.bots
import core.game.interaction.DestinationFlag
import core.game.interaction.MovementPulse
@@ -6,7 +6,8 @@ import core.game.system.task.Pulse
import core.game.world.map.Location
import core.game.world.map.zone.ZoneBorders
import org.rs09.consts.Items
-import rs09.game.ai.pvmbots.CombatBotAssembler
+import core.game.bots.CombatBotAssembler
+import core.game.bots.Script
class CowKiller : Script() {
var state = State.KILLING
@@ -147,7 +148,7 @@ class CowKiller : Script() {
override fun newInstance(): Script {
val script = CowKiller()
- script.bot = CombatBotAssembler().produce(CombatBotAssembler.Type.values().random(),CombatBotAssembler.Tier.LOW,spawnZone.randomLoc)
+ script.bot = CombatBotAssembler().produce(CombatBotAssembler.Type.values().random(), CombatBotAssembler.Tier.LOW,spawnZone.randomLoc)
script.state = State.KILLING
return script
}
diff --git a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/DoublingMoney.kt b/Server/src/main/content/global/bots/DoublingMoney.kt
similarity index 97%
rename from Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/DoublingMoney.kt
rename to Server/src/main/content/global/bots/DoublingMoney.kt
index a45035c1f..c230879ea 100644
--- a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/DoublingMoney.kt
+++ b/Server/src/main/content/global/bots/DoublingMoney.kt
@@ -1,4 +1,4 @@
-package rs09.game.ai.general.scriptrepository
+package content.global.bots
import core.game.container.Container
import core.game.interaction.Option._P_TRADE
@@ -10,17 +10,18 @@ import core.game.world.map.Location
import core.game.world.map.RegionManager
import core.game.world.update.flag.context.ChatMessage
import core.game.world.update.flag.player.ChatFlag
-import discord.Discord
+import core.integrations.discord.Discord
import org.json.simple.JSONArray
import org.json.simple.JSONObject
import org.json.simple.parser.JSONParser
import org.rs09.consts.Items
-import rs09.ServerConstants
-import rs09.game.ai.AIRepository
-import rs09.game.ai.general.scriptrepository.Adventurer.Companion.lumbridge
-import rs09.game.interaction.IntType
-import rs09.game.interaction.InteractionListeners
-import rs09.game.world.ImmerseWorld
+import core.ServerConstants
+import core.game.bots.AIRepository
+import content.global.bots.Adventurer.Companion.lumbridge
+import core.game.bots.Script
+import core.game.interaction.IntType
+import core.game.interaction.InteractionListeners
+import core.game.world.ImmerseWorld
import java.io.File
import java.io.FileReader
import java.util.Random
diff --git a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/DraynorFisher.kt b/Server/src/main/content/global/bots/DraynorFisher.kt
similarity index 95%
rename from Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/DraynorFisher.kt
rename to Server/src/main/content/global/bots/DraynorFisher.kt
index a59f2d672..e8434f906 100644
--- a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/DraynorFisher.kt
+++ b/Server/src/main/content/global/bots/DraynorFisher.kt
@@ -1,4 +1,4 @@
-package rs09.game.ai.general.scriptrepository
+package content.global.bots
import core.game.interaction.DestinationFlag
import core.game.interaction.MovementPulse
@@ -6,7 +6,8 @@ import core.game.node.item.Item
import core.game.world.map.Location
import core.game.world.map.zone.ZoneBorders
import org.rs09.consts.Items
-import rs09.game.ai.skillingbot.SkillingBotAssembler
+import core.game.bots.SkillingBotAssembler
+import core.game.bots.Script
class DraynorFisher : Script() {
val fishingZone = ZoneBorders(3085, 3223,3089, 3233)
diff --git a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/DraynorWillows.kt b/Server/src/main/content/global/bots/DraynorWillows.kt
similarity index 94%
rename from Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/DraynorWillows.kt
rename to Server/src/main/content/global/bots/DraynorWillows.kt
index f5273b543..67d23669b 100644
--- a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/DraynorWillows.kt
+++ b/Server/src/main/content/global/bots/DraynorWillows.kt
@@ -1,4 +1,5 @@
-package rs09.game.ai.general.scriptrepository
+package content.global.bots
+import core.game.bots.*
import core.game.component.Component
import core.game.interaction.DestinationFlag
import core.game.interaction.MovementPulse
@@ -6,9 +7,9 @@ import core.game.node.entity.skill.Skills
import core.game.node.item.Item
import core.game.world.map.zone.ZoneBorders
import org.rs09.consts.Items
-import rs09.game.interaction.IntType
-import rs09.game.interaction.InteractionListeners
-import rs09.tools.stringtools.colorize
+import core.game.interaction.IntType
+import core.game.interaction.InteractionListeners
+import core.tools.colorize
@PlayerCompatible
@ScriptName("Draynor Willows")
diff --git a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/FarmerThiever.kt b/Server/src/main/content/global/bots/FarmerThiever.kt
similarity index 91%
rename from Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/FarmerThiever.kt
rename to Server/src/main/content/global/bots/FarmerThiever.kt
index aeea0a4b0..bf3deb1ff 100644
--- a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/FarmerThiever.kt
+++ b/Server/src/main/content/global/bots/FarmerThiever.kt
@@ -1,12 +1,13 @@
-package rs09.game.ai.general.scriptrepository
+package content.global.bots
import core.game.world.map.zone.ZoneBorders
-import rs09.game.ai.skillingbot.SkillingBotAssembler
+import core.game.bots.SkillingBotAssembler
import core.game.node.entity.skill.Skills
import core.game.node.item.Item
import org.rs09.consts.Items
import org.rs09.consts.NPCs
-import rs09.game.interaction.IntType
-import rs09.game.interaction.InteractionListeners
+import core.game.bots.Script
+import core.game.interaction.IntType
+import core.game.interaction.InteractionListeners
class FarmerThiever : Script() {
val pickpocketZone = ZoneBorders(3074,3245,3086,3255)
diff --git a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/FletchingBankstander.kt b/Server/src/main/content/global/bots/FletchingBankstander.kt
similarity index 79%
rename from Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/FletchingBankstander.kt
rename to Server/src/main/content/global/bots/FletchingBankstander.kt
index 7c30fa253..201dd6f00 100644
--- a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/FletchingBankstander.kt
+++ b/Server/src/main/content/global/bots/FletchingBankstander.kt
@@ -1,11 +1,12 @@
-package rs09.game.ai.general.scriptrepository
+package content.global.bots
import core.game.node.entity.skill.Skills
-import core.game.node.entity.skill.fletching.Fletching
-import core.game.node.entity.skill.fletching.FletchingPulse
+import content.global.skill.fletching.Fletching
+import content.global.skill.fletching.FletchingPulse
import core.game.node.item.Item
import org.rs09.consts.Items
-import rs09.game.ai.skillingbot.SkillingBotAssembler
+import core.game.bots.SkillingBotAssembler
+import core.game.bots.Script
class FletchingBankstander : Script(){
var state = State.FLETCHING
@@ -16,7 +17,7 @@ class FletchingBankstander : Script(){
State.FLETCHING -> {
bot.inventory.add(Item(Items.KNIFE_946))
bot.inventory.add(Item(Items.LOGS_1511,27))
- bot.pulseManager.run(FletchingPulse(bot, Item(Items.LOGS_1511),27,Fletching.FletchingItems.ARROW_SHAFT))
+ bot.pulseManager.run(FletchingPulse(bot, Item(Items.LOGS_1511),27, Fletching.FletchingItems.ARROW_SHAFT))
State.BANKING
}
diff --git a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/GenericSlayerBot.kt b/Server/src/main/content/global/bots/GenericSlayerBot.kt
similarity index 97%
rename from Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/GenericSlayerBot.kt
rename to Server/src/main/content/global/bots/GenericSlayerBot.kt
index b6a11872c..2ee9d2b1d 100644
--- a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/GenericSlayerBot.kt
+++ b/Server/src/main/content/global/bots/GenericSlayerBot.kt
@@ -1,4 +1,4 @@
-package rs09.game.ai.general.scriptrepository
+package content.global.bots
import core.game.interaction.DestinationFlag
import core.game.interaction.MovementPulse
@@ -9,7 +9,8 @@ import core.game.world.map.Location
import core.game.world.map.zone.ZoneBorders
import core.tools.RandomFunction
import org.rs09.consts.Items
-import rs09.game.ai.AIRepository
+import core.game.bots.AIRepository
+import core.game.bots.Script
/**
* A bot that does various random slayer tasks throughout the game and sells the loot on the GE.
@@ -239,7 +240,7 @@ class GenericSlayerBot : Script() {
* List of tasks that this bot can receive
*/
enum class Task(val npc_name: String, val minAmt: Int, val maxAmt: Int, val hub: TaskHub, val borders: ZoneBorders) {
- CAVE_CRAWLER("Cave crawler",20,100,TaskHub.FREMENNIK_CAVE, ZoneBorders(2778, 9988,2798, 10002))
+ CAVE_CRAWLER("Cave crawler",20,100, TaskHub.FREMENNIK_CAVE, ZoneBorders(2778, 9988,2798, 10002))
}
/**
diff --git a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/GlassBlowingBankstander.kt b/Server/src/main/content/global/bots/GlassBlowingBankstander.kt
similarity index 79%
rename from Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/GlassBlowingBankstander.kt
rename to Server/src/main/content/global/bots/GlassBlowingBankstander.kt
index b55d00d0e..ac1635748 100644
--- a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/GlassBlowingBankstander.kt
+++ b/Server/src/main/content/global/bots/GlassBlowingBankstander.kt
@@ -1,11 +1,12 @@
-package rs09.game.ai.general.scriptrepository
+package content.global.bots
-import core.game.interaction.inter.GlassInterface
+import content.global.handlers.iface.GlassInterface
import core.game.node.entity.skill.Skills
-import core.game.node.entity.skill.crafting.GlassProduct
+import content.global.skill.crafting.GlassProduct
import core.game.node.item.Item
import org.rs09.consts.Items
-import rs09.game.ai.skillingbot.SkillingBotAssembler
+import core.game.bots.SkillingBotAssembler
+import core.game.bots.Script
class GlassBlowingBankstander : Script(){
var state = State.BLOWING
@@ -16,7 +17,7 @@ class GlassBlowingBankstander : Script(){
State.BLOWING -> {
bot.inventory.add(Item(Items.GLASSBLOWING_PIPE_1785))
bot.inventory.add(Item(Items.MOLTEN_GLASS_1775,27))
- GlassInterface.make(bot,GlassProduct.ORB,27)
+ GlassInterface.make(bot, GlassProduct.ORB,27)
State.BANKING
}
diff --git a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/GnomeAgility.kt b/Server/src/main/content/global/bots/GnomeAgility.kt
similarity index 95%
rename from Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/GnomeAgility.kt
rename to Server/src/main/content/global/bots/GnomeAgility.kt
index 4323d532f..7341ff4dd 100644
--- a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/GnomeAgility.kt
+++ b/Server/src/main/content/global/bots/GnomeAgility.kt
@@ -1,12 +1,7 @@
-package rs09.game.ai.general.scriptrepository
+package content.global.bots
-import api.*
+import core.game.bots.*
import core.game.world.map.zone.ZoneBorders
-import rs09.game.ai.general.ScriptAPI
-import rs09.game.ai.skillingbot.SkillingBotAssembler
-import rs09.game.interaction.InteractionListener
-import rs09.game.interaction.IntType
-import rs09.game.interaction.InteractionListeners
@PlayerCompatible
diff --git a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/GnomeBowstring.kt b/Server/src/main/content/global/bots/GnomeBowstring.kt
similarity index 95%
rename from Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/GnomeBowstring.kt
rename to Server/src/main/content/global/bots/GnomeBowstring.kt
index a44190a3f..ae1d99555 100644
--- a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/GnomeBowstring.kt
+++ b/Server/src/main/content/global/bots/GnomeBowstring.kt
@@ -1,16 +1,16 @@
-package rs09.game.ai.general.scriptrepository
+package content.global.bots
-import api.*
+import core.api.*
import core.game.interaction.DestinationFlag
import core.game.interaction.MovementPulse
-import core.game.node.entity.skill.crafting.spinning.SpinningItem
-import core.game.node.entity.skill.crafting.spinning.SpinningPulse
+import content.global.skill.crafting.spinning.SpinningItem
+import content.global.skill.crafting.spinning.SpinningPulse
+import core.game.bots.*
import core.game.node.item.Item
import core.game.world.map.Location
import core.game.world.map.path.Pathfinder
import core.game.world.map.zone.ZoneBorders
import org.rs09.consts.Items
-import rs09.game.ai.general.ScriptAPI
@PlayerCompatible
@ScriptName("Gnome Stronghold Bowstring")
@@ -90,7 +90,7 @@ class GnomeBowstring : Script() {
}
State.SPINNING -> {
- bot.pulseManager.run(SpinningPulse(bot, Item(Items.FLAX_1779),bot.inventory.getAmount(Items.FLAX_1779),SpinningItem.FLAX))
+ bot.pulseManager.run(SpinningPulse(bot, Item(Items.FLAX_1779),bot.inventory.getAmount(Items.FLAX_1779), SpinningItem.FLAX))
sLadderSwitch = true
state = State.FIND_BANK
}
diff --git a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/GreenDragonKiller.kt b/Server/src/main/content/global/bots/GreenDragonKiller.kt
similarity index 94%
rename from Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/GreenDragonKiller.kt
rename to Server/src/main/content/global/bots/GreenDragonKiller.kt
index 3414dce32..6c8dcd82e 100644
--- a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/GreenDragonKiller.kt
+++ b/Server/src/main/content/global/bots/GreenDragonKiller.kt
@@ -1,6 +1,5 @@
-package rs09.game.ai.general.scriptrepository
+package content.global.bots
-import core.game.ge.OfferState
import core.game.interaction.DestinationFlag
import core.game.interaction.MovementPulse
import core.game.node.entity.Entity
@@ -8,8 +7,7 @@ import core.game.node.entity.combat.CombatStyle
import core.game.node.entity.combat.InteractionType
import core.game.node.entity.player.Player
import core.game.node.entity.skill.Skills
-import core.game.node.entity.skill.prayer.BoneBuryingOptionPlugin
-import core.game.node.entity.state.EntityState
+import content.global.skill.prayer.BoneBuryingOptionPlugin
import core.game.node.item.Item
import core.game.system.task.Pulse
import core.game.world.map.Location
@@ -18,14 +16,13 @@ import core.game.world.map.zone.ZoneBorders
import core.game.world.map.zone.impl.WildernessZone
import core.tools.RandomFunction
import org.rs09.consts.Items
-import rs09.game.ai.AIRepository
-import rs09.game.ai.pvmbots.CombatBotAssembler
-import rs09.game.interaction.IntType
-import rs09.game.interaction.InteractionListeners
-import rs09.game.node.entity.combat.CombatSwingHandler
-import rs09.game.node.entity.combat.handlers.MagicSwingHandler
-import rs09.game.node.entity.combat.handlers.MeleeSwingHandler
-import rs09.game.node.entity.combat.handlers.RangeSwingHandler
+import core.game.bots.AIRepository
+import core.game.bots.CombatBotAssembler
+import core.game.bots.Script
+import core.game.interaction.IntType
+import core.game.interaction.InteractionListeners
+import core.game.node.entity.combat.CombatSwingHandler
+import core.game.node.entity.combat.MeleeSwingHandler
import kotlin.random.Random
/**
diff --git a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/Idler.kt b/Server/src/main/content/global/bots/Idler.kt
similarity index 68%
rename from Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/Idler.kt
rename to Server/src/main/content/global/bots/Idler.kt
index d7e08dce5..684f4240e 100644
--- a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/Idler.kt
+++ b/Server/src/main/content/global/bots/Idler.kt
@@ -1,4 +1,6 @@
-package rs09.game.ai.general.scriptrepository
+package content.global.bots
+
+import core.game.bots.Script
class Idler : Script(){
override fun tick() {
diff --git a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/LobsterCatcher.kt b/Server/src/main/content/global/bots/LobsterCatcher.kt
similarity index 94%
rename from Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/LobsterCatcher.kt
rename to Server/src/main/content/global/bots/LobsterCatcher.kt
index dacae6e3c..1f3a494a1 100644
--- a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/LobsterCatcher.kt
+++ b/Server/src/main/content/global/bots/LobsterCatcher.kt
@@ -1,5 +1,6 @@
-package rs09.game.ai.general.scriptrepository
+package content.global.bots
+import core.game.bots.*
import core.game.interaction.DestinationFlag
import core.game.interaction.MovementPulse
import core.game.node.entity.skill.Skills
@@ -11,12 +12,9 @@ import core.game.world.update.flag.context.Animation
import core.game.world.update.flag.context.Graphics
import core.tools.RandomFunction
import org.rs09.consts.Items
-import rs09.game.ai.AIPlayer
-import rs09.game.ai.general.ScriptAPI
-import rs09.game.interaction.InteractionListener
-import rs09.game.interaction.IntType
-import rs09.game.interaction.InteractionListeners
-import rs09.game.world.GameWorld
+import core.game.interaction.IntType
+import core.game.interaction.InteractionListeners
+import core.game.world.GameWorld
import kotlin.random.Random
@PlayerCompatible
@@ -75,7 +73,7 @@ class LobsterCatcher : Script() {
if(spot == null){
state = State.IDLE
} else {
- InteractionListeners.run(spot.id,IntType.NPC,"cage",bot,spot)
+ InteractionListeners.run(spot.id, IntType.NPC,"cage",bot,spot)
}
if(bot.inventory.isFull){
state = State.FIND_BANK
diff --git a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/ManThiever.kt b/Server/src/main/content/global/bots/ManThiever.kt
similarity index 76%
rename from Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/ManThiever.kt
rename to Server/src/main/content/global/bots/ManThiever.kt
index e1e54a268..25a2638c2 100644
--- a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/ManThiever.kt
+++ b/Server/src/main/content/global/bots/ManThiever.kt
@@ -1,9 +1,10 @@
-package rs09.game.ai.general.scriptrepository
+package content.global.bots
import core.game.node.item.Item
-import rs09.game.ai.skillingbot.SkillingBotAssembler
-import rs09.game.interaction.IntType
-import rs09.game.interaction.InteractionListeners
+import core.game.bots.SkillingBotAssembler
+import core.game.bots.Script
+import core.game.interaction.IntType
+import core.game.interaction.InteractionListeners
import java.util.*
class ManThiever : Script() {
diff --git a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/NonBankingMiner.kt b/Server/src/main/content/global/bots/NonBankingMiner.kt
similarity index 85%
rename from Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/NonBankingMiner.kt
rename to Server/src/main/content/global/bots/NonBankingMiner.kt
index fa66c4112..0d99c11d3 100644
--- a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/NonBankingMiner.kt
+++ b/Server/src/main/content/global/bots/NonBankingMiner.kt
@@ -1,12 +1,13 @@
-package rs09.game.ai.general.scriptrepository
+package content.global.bots
-import api.produceGroundItem
+import core.api.produceGroundItem
import core.game.node.entity.skill.Skills
import core.game.node.item.Item
import org.rs09.consts.Items
-import rs09.game.ai.skillingbot.SkillingBotAssembler
-import rs09.game.interaction.IntType
-import rs09.game.interaction.InteractionListeners
+import core.game.bots.SkillingBotAssembler
+import core.game.bots.Script
+import core.game.interaction.IntType
+import core.game.interaction.InteractionListeners
class NonBankingMiner : Script() {
override fun tick() {
diff --git a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/SeersFlax.kt b/Server/src/main/content/global/bots/SeersFlax.kt
similarity index 95%
rename from Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/SeersFlax.kt
rename to Server/src/main/content/global/bots/SeersFlax.kt
index b0365f4a4..30d8ffee3 100644
--- a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/SeersFlax.kt
+++ b/Server/src/main/content/global/bots/SeersFlax.kt
@@ -1,15 +1,16 @@
-package rs09.game.ai.general.scriptrepository
+package content.global.bots
import core.game.interaction.DestinationFlag
import core.game.interaction.MovementPulse
import core.game.node.entity.skill.Skills
-import core.game.node.entity.skill.crafting.spinning.SpinningItem
-import core.game.node.entity.skill.crafting.spinning.SpinningPulse
+import content.global.skill.crafting.spinning.SpinningItem
+import content.global.skill.crafting.spinning.SpinningPulse
import core.game.node.item.Item
import core.game.world.map.Location
import core.game.world.map.path.Pathfinder
import org.rs09.consts.Items
-import rs09.game.ai.skillingbot.SkillingBotAssembler
+import core.game.bots.SkillingBotAssembler
+import core.game.bots.Script
class SeersFlax : Script(){
var state = State.PICKING
@@ -57,7 +58,7 @@ class SeersFlax : Script(){
}
State.SPINNING -> {
- bot.pulseManager.run(SpinningPulse(bot, Item(Items.FLAX_1779),bot.inventory.getAmount(Items.FLAX_1779),SpinningItem.FLAX))
+ bot.pulseManager.run(SpinningPulse(bot, Item(Items.FLAX_1779),bot.inventory.getAmount(Items.FLAX_1779), SpinningItem.FLAX))
state = State.FIND_BANK
}
diff --git a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/SeersMagicTrees.kt b/Server/src/main/content/global/bots/SeersMagicTrees.kt
similarity index 93%
rename from Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/SeersMagicTrees.kt
rename to Server/src/main/content/global/bots/SeersMagicTrees.kt
index 403c58cec..c3e338404 100644
--- a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/SeersMagicTrees.kt
+++ b/Server/src/main/content/global/bots/SeersMagicTrees.kt
@@ -1,5 +1,6 @@
-package rs09.game.ai.general.scriptrepository
+package content.global.bots
+import core.game.bots.*
import core.game.interaction.DestinationFlag
import core.game.interaction.MovementPulse
import core.game.node.entity.skill.Skills
@@ -8,11 +9,8 @@ import core.game.world.map.Location
import core.game.world.map.zone.ZoneBorders
import core.tools.RandomFunction
import org.rs09.consts.Items
-import rs09.game.ai.general.ScriptAPI
-import rs09.game.ai.skillingbot.SkillingBotAssembler
-import rs09.game.interaction.InteractionListener
-import rs09.game.interaction.IntType
-import rs09.game.interaction.InteractionListeners
+import core.game.interaction.IntType
+import core.game.interaction.InteractionListeners
@PlayerCompatible
@ScriptName("Seers Magics")
diff --git a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/SharkCatcher.kt b/Server/src/main/content/global/bots/SharkCatcher.kt
similarity index 96%
rename from Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/SharkCatcher.kt
rename to Server/src/main/content/global/bots/SharkCatcher.kt
index 6062d7135..f7fa50e2e 100644
--- a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/SharkCatcher.kt
+++ b/Server/src/main/content/global/bots/SharkCatcher.kt
@@ -1,5 +1,6 @@
-package rs09.game.ai.general.scriptrepository
+package content.global.bots
+import core.game.bots.*
import core.game.interaction.DestinationFlag
import core.game.interaction.MovementPulse
import core.game.node.entity.skill.Skills
@@ -7,11 +8,8 @@ import core.game.node.item.Item
import core.game.world.map.Location
import core.tools.RandomFunction
import org.rs09.consts.Items
-import rs09.game.ai.AIPlayer
-import rs09.game.ai.general.ScriptAPI
-import rs09.game.interaction.InteractionListener
-import rs09.game.interaction.IntType
-import rs09.game.interaction.InteractionListeners
+import core.game.interaction.IntType
+import core.game.interaction.InteractionListeners
import kotlin.random.Random
/*
diff --git a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/ShootingStarBot.kt b/Server/src/main/content/global/bots/ShootingStarBot.kt
similarity index 89%
rename from Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/ShootingStarBot.kt
rename to Server/src/main/content/global/bots/ShootingStarBot.kt
index d8d7b33fc..5e990b82f 100644
--- a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/ShootingStarBot.kt
+++ b/Server/src/main/content/global/bots/ShootingStarBot.kt
@@ -1,14 +1,15 @@
-package rs09.game.ai.general.scriptrepository
+package content.global.bots
import core.game.node.entity.skill.Skills
import core.game.node.item.Item
import core.game.world.map.Location
import core.tools.RandomFunction
import org.rs09.consts.Items
-import rs09.game.ai.general.GeneralBotCreator
-import rs09.game.content.global.worldevents.shootingstar.ShootingStarPlugin
-import rs09.game.interaction.IntType
-import rs09.game.interaction.InteractionListeners
+import core.game.bots.GeneralBotCreator
+import content.global.activity.shootingstar.ShootingStarPlugin
+import core.game.bots.Script
+import core.game.interaction.IntType
+import core.game.interaction.InteractionListeners
class ShootingStarBot : Script() {
private var state = State.FULL_IDLE
diff --git a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/VarrockEssenceMiner.kt b/Server/src/main/content/global/bots/VarrockEssenceMiner.kt
similarity index 94%
rename from Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/VarrockEssenceMiner.kt
rename to Server/src/main/content/global/bots/VarrockEssenceMiner.kt
index cbc488db3..3dafd687f 100644
--- a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/VarrockEssenceMiner.kt
+++ b/Server/src/main/content/global/bots/VarrockEssenceMiner.kt
@@ -1,14 +1,13 @@
-package rs09.game.ai.general.scriptrepository
+package content.global.bots
+import core.game.bots.*
import core.game.interaction.DestinationFlag
import core.game.interaction.MovementPulse
import core.game.world.map.Location
import core.game.world.map.zone.ZoneBorders
import org.rs09.consts.Items
-import rs09.game.ai.skillingbot.SkillingBotAssembler
-import rs09.game.interaction.InteractionListener
-import rs09.game.interaction.IntType
-import rs09.game.interaction.InteractionListeners
+import core.game.interaction.IntType
+import core.game.interaction.InteractionListeners
@PlayerCompatible
@ScriptDescription("Start in varrock bank with rune mysteries complete and a pickaxe equipped/in inventory")
diff --git a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/VarrockSmither.kt b/Server/src/main/content/global/bots/VarrockSmither.kt
similarity index 91%
rename from Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/VarrockSmither.kt
rename to Server/src/main/content/global/bots/VarrockSmither.kt
index 75f977627..0d252503c 100644
--- a/Server/src/main/kotlin/rs09/game/ai/general/scriptrepository/VarrockSmither.kt
+++ b/Server/src/main/content/global/bots/VarrockSmither.kt
@@ -1,15 +1,16 @@
-package rs09.game.ai.general.scriptrepository
+package content.global.bots
import core.game.interaction.DestinationFlag
import core.game.interaction.MovementPulse
import core.game.node.entity.skill.Skills
-import core.game.node.entity.skill.smithing.Bars
-import core.game.node.entity.skill.smithing.SmithingPulse
+import content.global.skill.smithing.Bars
+import content.global.skill.smithing.SmithingPulse
import core.game.node.item.Item
import core.game.world.map.Location
import core.tools.RandomFunction
import org.rs09.consts.Items
-import rs09.game.ai.skillingbot.SkillingBotAssembler
+import core.game.bots.SkillingBotAssembler
+import core.game.bots.Script
class VarrockSmither : Script() {
var state = State.SMITHING
diff --git a/Server/src/main/kotlin/rs09/game/content/dialogue/region/worldwide/bank/BankDepositDialogue.kt b/Server/src/main/content/global/dialogue/BankDepositDialogue.kt
similarity index 86%
rename from Server/src/main/kotlin/rs09/game/content/dialogue/region/worldwide/bank/BankDepositDialogue.kt
rename to Server/src/main/content/global/dialogue/BankDepositDialogue.kt
index cd3c87005..add635877 100644
--- a/Server/src/main/kotlin/rs09/game/content/dialogue/region/worldwide/bank/BankDepositDialogue.kt
+++ b/Server/src/main/content/global/dialogue/BankDepositDialogue.kt
@@ -1,10 +1,10 @@
-package rs09.game.content.dialogue.region.worldwide.bank
+package content.global.dialogue
-import api.dumpBeastOfBurden
-import api.dumpContainer
-import api.sendMessage
-import rs09.game.content.dialogue.DialogueFile
-import rs09.tools.START_DIALOGUE
+import core.api.dumpBeastOfBurden
+import core.api.dumpContainer
+import core.api.sendMessage
+import core.game.dialogue.DialogueFile
+import core.tools.START_DIALOGUE
/**
* Represents the dialogue shown when the user presses
diff --git a/Server/src/main/kotlin/rs09/game/content/dialogue/region/worldwide/bank/BankHelpDialogue.kt b/Server/src/main/content/global/dialogue/BankHelpDialogue.kt
similarity index 86%
rename from Server/src/main/kotlin/rs09/game/content/dialogue/region/worldwide/bank/BankHelpDialogue.kt
rename to Server/src/main/content/global/dialogue/BankHelpDialogue.kt
index 9d3373b2a..ca8c6453a 100644
--- a/Server/src/main/kotlin/rs09/game/content/dialogue/region/worldwide/bank/BankHelpDialogue.kt
+++ b/Server/src/main/content/global/dialogue/BankHelpDialogue.kt
@@ -1,13 +1,13 @@
-package rs09.game.content.dialogue.region.worldwide.bank
+package content.global.dialogue
-import api.openInterface
-import api.sendDialogue
-import api.sendItemDialogue
+import core.api.openInterface
+import core.api.sendDialogue
+import core.api.sendItemDialogue
import core.game.node.item.Item
import org.rs09.consts.Components
import org.rs09.consts.Items
-import rs09.game.content.dialogue.DialogueFile
-import rs09.tools.START_DIALOGUE
+import core.game.dialogue.DialogueFile
+import core.tools.START_DIALOGUE
/**
* Represents the dialogue shown when the user presses
diff --git a/Server/src/main/kotlin/rs09/game/content/dialogue/region/worldwide/bank/BankerDialogue.kt b/Server/src/main/content/global/dialogue/BankerDialogue.kt
similarity index 72%
rename from Server/src/main/kotlin/rs09/game/content/dialogue/region/worldwide/bank/BankerDialogue.kt
rename to Server/src/main/content/global/dialogue/BankerDialogue.kt
index 09339b407..e913ce4f0 100644
--- a/Server/src/main/kotlin/rs09/game/content/dialogue/region/worldwide/bank/BankerDialogue.kt
+++ b/Server/src/main/content/global/dialogue/BankerDialogue.kt
@@ -1,25 +1,23 @@
-package rs09.game.content.dialogue.region.worldwide.bank
+package content.global.dialogue
-import api.*
-import core.game.content.dialogue.DialoguePlugin
-import core.game.content.dialogue.FacialExpression
+import core.api.*
import core.game.node.entity.player.Player
import core.game.node.entity.player.link.IronmanMode
import core.plugin.Initializable
-import rs09.game.content.dialogue.IfTopic
-import rs09.game.content.dialogue.Topic
-import rs09.game.node.entity.npc.BankerNPC
-import rs09.tools.END_DIALOGUE
-import rs09.tools.START_DIALOGUE
+import core.game.dialogue.IfTopic
+import core.game.dialogue.Topic
+import content.global.handlers.npc.BankerNPC
+import core.tools.END_DIALOGUE
+import core.tools.START_DIALOGUE
@Initializable
-class BankerDialogue(player: Player? = null) : DialoguePlugin(player) {
+class BankerDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when (stage) {
START_DIALOGUE -> when {
hasIronmanRestriction(player, IronmanMode.ULTIMATE) -> {
npcl(
- FacialExpression.ANNOYED,
+ core.game.dialogue.FacialExpression.ANNOYED,
"My apologies, dear ${if (player.isMale) "sir" else "madam"}, " +
"our services are not available for Ultimate ${if (player.isMale) "Ironmen" else "Ironwomen"}"
).also { stage = END_DIALOGUE }
@@ -27,7 +25,7 @@ class BankerDialogue(player: Player? = null) : DialoguePlugin(player) {
else -> {
npcl(
- FacialExpression.FRIENDLY,
+ core.game.dialogue.FacialExpression.FRIENDLY,
"Good day, how may I help you?"
).also {
if (hasAwaitingGrandExchangeCollections(player)) {
@@ -40,42 +38,42 @@ class BankerDialogue(player: Player? = null) : DialoguePlugin(player) {
}
1 -> npcl(
- FacialExpression.FRIENDLY,
+ core.game.dialogue.FacialExpression.FRIENDLY,
"Before we go any further, I should inform you that you " +
"have items ready for collection from the Grand Exchange."
).also { stage++ }
2 -> showTopics(
- Topic(FacialExpression.FRIENDLY, "I'd like to access my bank account, please.", 10),
+ Topic(core.game.dialogue.FacialExpression.FRIENDLY, "I'd like to access my bank account, please.", 10),
IfTopic(
- FacialExpression.FRIENDLY,
+ core.game.dialogue.FacialExpression.FRIENDLY,
"I'd like to switch to my ${getBankAccountName(player, true)} bank account.",
13,
hasActivatedSecondaryBankAccount(player)
),
IfTopic(
- FacialExpression.FRIENDLY,
+ core.game.dialogue.FacialExpression.FRIENDLY,
"I'd like to open a secondary bank account.",
20,
!hasActivatedSecondaryBankAccount(player)
),
- Topic(FacialExpression.FRIENDLY, "I'd like to check my PIN settings.", 11),
- Topic(FacialExpression.FRIENDLY, "I'd like to collect items.", 12),
- Topic(FacialExpression.ASKING, "What is this place?", 3),
+ Topic(core.game.dialogue.FacialExpression.FRIENDLY, "I'd like to check my PIN settings.", 11),
+ Topic(core.game.dialogue.FacialExpression.FRIENDLY, "I'd like to collect items.", 12),
+ Topic(core.game.dialogue.FacialExpression.ASKING, "What is this place?", 3),
)
3 -> npcl(
- FacialExpression.FRIENDLY,
+ core.game.dialogue.FacialExpression.FRIENDLY,
"This is a branch of the Bank of Gielinor. We have branches in many towns."
).also { stage++ }
4 -> playerl(
- FacialExpression.ASKING,
+ core.game.dialogue.FacialExpression.ASKING,
"And what do you do?"
).also { stage++ }
5 -> npcl(
- FacialExpression.FRIENDLY,
+ core.game.dialogue.FacialExpression.FRIENDLY,
"We will look after your items and money for you. " +
"Leave your valuables with us if you want to keep them safe."
).also { stage = END_DIALOGUE }
@@ -99,51 +97,51 @@ class BankerDialogue(player: Player? = null) : DialoguePlugin(player) {
toggleBankAccount(player)
npcl(
- FacialExpression.FRIENDLY,
+ core.game.dialogue.FacialExpression.FRIENDLY,
"Your active bank account has been switched. " +
"You can now access your ${getBankAccountName(player)} account."
).also { stage = 2 }
}
20 -> npcl(
- FacialExpression.FRIENDLY,
+ core.game.dialogue.FacialExpression.FRIENDLY,
"Certainly. We offer secondary accounts to all our customers."
).also { stage++ }
21 -> npcl(
- FacialExpression.FRIENDLY,
+ core.game.dialogue.FacialExpression.FRIENDLY,
"The secondary account comes with a standard fee of 5,000,000 coins. The fee is non-refundable " +
"and account activation is permanent."
).also { stage++ }
22 -> npcl(
- FacialExpression.FRIENDLY,
+ core.game.dialogue.FacialExpression.FRIENDLY,
"If your inventory does not contain enough money to cover the costs, we will complement " +
"the amount with the money inside your primary bank account."
).also { stage++ }
23 -> npcl(
- FacialExpression.ASKING,
+ core.game.dialogue.FacialExpression.ASKING,
"Knowing all this, would you like to proceed with opening your secondary bank account?"
).also { stage++ }
24 -> showTopics(
- Topic(FacialExpression.HAPPY, "Yes, I am still interested.", 25),
- Topic(FacialExpression.ANNOYED, "Actually, I've changed my mind.", 26)
+ Topic(core.game.dialogue.FacialExpression.HAPPY, "Yes, I am still interested.", 25),
+ Topic(core.game.dialogue.FacialExpression.ANNOYED, "Actually, I've changed my mind.", 26)
)
25 -> {
when (activateSecondaryBankAccount(player)) {
SecondaryBankAccountActivationResult.ALREADY_ACTIVE -> {
npcl(
- FacialExpression.FRIENDLY,
+ core.game.dialogue.FacialExpression.FRIENDLY,
"Your bank account was already activated, there is no need to pay twice."
).also { stage = END_DIALOGUE }
}
SecondaryBankAccountActivationResult.INTERNAL_FAILURE -> {
npcl(
- FacialExpression.ANNOYED,
+ core.game.dialogue.FacialExpression.ANNOYED,
"I must apologize, the transaction was not successful. Please check your " +
"primary bank account and your inventory - if there's money missing, please " +
"screenshot your chat box and contact the game developers."
@@ -152,7 +150,7 @@ class BankerDialogue(player: Player? = null) : DialoguePlugin(player) {
SecondaryBankAccountActivationResult.NOT_ENOUGH_MONEY -> {
npcl(
- FacialExpression.ANNOYED,
+ core.game.dialogue.FacialExpression.ANNOYED,
"It appears that you do not have the money necessary to cover the costs " +
"associated with opening a secondary bank account. I will be waiting here " +
"until you do."
@@ -161,7 +159,7 @@ class BankerDialogue(player: Player? = null) : DialoguePlugin(player) {
SecondaryBankAccountActivationResult.SUCCESS -> {
npcl(
- FacialExpression.FRIENDLY,
+ core.game.dialogue.FacialExpression.FRIENDLY,
"Your secondary bank account has been opened and can be accessed through any " +
"of the Bank of Gielinor's employees. Thank you for choosing our services."
).also { stage = END_DIALOGUE }
@@ -170,7 +168,7 @@ class BankerDialogue(player: Player? = null) : DialoguePlugin(player) {
}
26 -> npcl(
- FacialExpression.FRIENDLY,
+ core.game.dialogue.FacialExpression.FRIENDLY,
"Very well. Should you decide a secondary bank account is needed, do not hesitate to " +
"contact any of the Bank of Gielinor's stationary employees. We will be happy to help."
).also { stage = END_DIALOGUE }
diff --git a/Server/src/main/java/core/game/content/dialogue/FurTradePlugin.java b/Server/src/main/content/global/dialogue/FurTradePlugin.java
similarity index 92%
rename from Server/src/main/java/core/game/content/dialogue/FurTradePlugin.java
rename to Server/src/main/content/global/dialogue/FurTradePlugin.java
index fa8791505..b079a3b87 100644
--- a/Server/src/main/java/core/game/content/dialogue/FurTradePlugin.java
+++ b/Server/src/main/content/global/dialogue/FurTradePlugin.java
@@ -1,5 +1,7 @@
-package core.game.content.dialogue;
+package content.global.dialogue;
+import core.game.dialogue.DialoguePlugin;
+import core.game.dialogue.FacialExpression;
import core.game.node.entity.npc.NPC;
import core.plugin.Initializable;
import core.game.node.entity.player.Player;
diff --git a/Server/src/main/kotlin/rs09/game/content/dialogue/region/worldwide/GardenerDialoguePlugin.kt b/Server/src/main/content/global/dialogue/GardenerDialoguePlugin.kt
similarity index 94%
rename from Server/src/main/kotlin/rs09/game/content/dialogue/region/worldwide/GardenerDialoguePlugin.kt
rename to Server/src/main/content/global/dialogue/GardenerDialoguePlugin.kt
index 23153a3a4..3fa655c5d 100644
--- a/Server/src/main/kotlin/rs09/game/content/dialogue/region/worldwide/GardenerDialoguePlugin.kt
+++ b/Server/src/main/content/global/dialogue/GardenerDialoguePlugin.kt
@@ -1,19 +1,18 @@
-package rs09.game.content.dialogue.region.worldwide
+package content.global.dialogue
-import core.game.content.dialogue.DialoguePlugin
+import content.global.skill.farming.FarmerPayOptionDialogue
+import content.global.skill.farming.Farmers
+import content.global.skill.farming.FarmingPatch
import core.game.node.entity.npc.NPC
import core.game.node.entity.player.Player
import core.game.node.item.Item
import core.plugin.Initializable
import org.rs09.consts.Items
-import rs09.game.node.entity.skill.farming.FarmerPayOptionDialogue
-import rs09.game.node.entity.skill.farming.Farmers
-import rs09.game.node.entity.skill.farming.FarmingPatch
-import rs09.tools.END_DIALOGUE
+import core.tools.END_DIALOGUE
@Initializable
-class GardenerDialoguePlugin(player: Player? = null) : DialoguePlugin(player) {
- override fun newInstance(player: Player?): DialoguePlugin {
+class GardenerDialoguePlugin(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) {
+ override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin {
return GardenerDialoguePlugin(player)
}
diff --git a/Server/src/main/java/core/game/content/dialogue/ManDialoguePlugin.java b/Server/src/main/content/global/dialogue/ManDialoguePlugin.java
similarity index 96%
rename from Server/src/main/java/core/game/content/dialogue/ManDialoguePlugin.java
rename to Server/src/main/content/global/dialogue/ManDialoguePlugin.java
index f6e7d5514..36785504e 100644
--- a/Server/src/main/java/core/game/content/dialogue/ManDialoguePlugin.java
+++ b/Server/src/main/content/global/dialogue/ManDialoguePlugin.java
@@ -1,115 +1,117 @@
-package core.game.content.dialogue;
-
-import core.plugin.Initializable;
-import org.rs09.consts.Items;
-import core.game.node.entity.npc.NPC;
-import core.game.node.entity.player.Player;
-import core.game.node.entity.player.link.diary.DiaryType;
-import core.game.node.item.Item;
-import core.tools.RandomFunction;
-
-/**
- * Handles the man dialogues.
- *
- * @author 'Vexia
- */
-@Initializable
-public class ManDialoguePlugin extends DialoguePlugin {
- private static final Item CIDER = new Item(Items.CIDER_5763);
-
- /**
- * The NPC ids that use this dialogue plugin.
- */
- private static final int[] NPC_IDS = {1, 2, 3, 4, 5, 6, 16, 24, 25, 170, 351, 352, 353, 354, 359, 360, 361, 362, 363, 726, 727, 728, 729, 730, 1086, 2675, 2776, 3224, 3225, 3227, 5923, 5924,};
-
- public ManDialoguePlugin() {
- }
-
- public ManDialoguePlugin(Player player) {
- super(player);
- }
-
- @Override
- public DialoguePlugin newInstance(Player player) {
- return new ManDialoguePlugin(player);
- }
-
- @Override
- public boolean open(Object... args) {
- npc = (NPC) args[0];
- if (npc == null)
- return false;
- if (args.length > 1
- && args[1] instanceof Item
- && ((Item) args[1]).equals(CIDER)
- && player.getInventory().remove(CIDER)) {
-
- // Seers achievement diary
- if (!player.getAchievementDiaryManager().getDiary(DiaryType.SEERS_VILLAGE).isComplete(0, 6)) {
- if (player.getAttribute("diary:seers:pub-cider", 0) >= 4) {
- player.setAttribute("/save:diary:seers:pub-cider", 5);
- player.getAchievementDiaryManager().getDiary(DiaryType.SEERS_VILLAGE).updateTask(player, 0, 6, true);
- } else {
- player.setAttribute("/save:diary:seers:pub-cider", player.getAttribute("diary:seers:pub-cider", 0) + 1);
- }
- }
-
- npc("Ah, a glass of cider, that's very generous of you. I", "don't mind if I do. Thanks!");
- stage = 999;
- return true;
- }
- interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Hello, how's it going?");
- stage = RandomFunction.random(0, 5);
- if (stage == 1) {
- stage = 0;
- }
- return true;
- }
-
- @Override
- public boolean handle(int interfaceId, int buttonId) {
- switch (stage) {
- case 0:
- interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "I'm very well thank you.");
- stage = 999;
- break;
- case 999:
- end();
- break;
- case 2:
- interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Who are you?");
- stage = 20;
- break;
- case 3:
- interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "I'm fine, how are you?");
- stage = 30;
- break;
- case 4:
- interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "No, I don't want to buy anything!");
- stage = 999;
- break;
- case 5:
- interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "I think we need a new king. The one we've got isn't", "very good.");
- stage = 999;
- break;
- case 20:
- interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "I'm a bold adventurer.");
- stage = 21;
- break;
- case 21:
- interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Ah, a very noble profession.");
- stage = 999;
- break;
- case 30:
- interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Very well thank you.");
- stage = 999;
- break;
- }
- return true;
- }
-
- @Override
- public int[] getIds() {
- return NPC_IDS;
- }
-}
+package content.global.dialogue;
+
+import core.game.dialogue.DialoguePlugin;
+import core.game.dialogue.FacialExpression;
+import core.plugin.Initializable;
+import org.rs09.consts.Items;
+import core.game.node.entity.npc.NPC;
+import core.game.node.entity.player.Player;
+import core.game.node.entity.player.link.diary.DiaryType;
+import core.game.node.item.Item;
+import core.tools.RandomFunction;
+
+/**
+ * Handles the man dialogues.
+ *
+ * @author 'Vexia
+ */
+@Initializable
+public class ManDialoguePlugin extends DialoguePlugin {
+ private static final Item CIDER = new Item(Items.CIDER_5763);
+
+ /**
+ * The NPC ids that use this dialogue plugin.
+ */
+ private static final int[] NPC_IDS = {1, 2, 3, 4, 5, 6, 16, 24, 25, 170, 351, 352, 353, 354, 359, 360, 361, 362, 363, 726, 727, 728, 729, 730, 1086, 2675, 2776, 3224, 3225, 3227, 5923, 5924,};
+
+ public ManDialoguePlugin() {
+ }
+
+ public ManDialoguePlugin(Player player) {
+ super(player);
+ }
+
+ @Override
+ public DialoguePlugin newInstance(Player player) {
+ return new ManDialoguePlugin(player);
+ }
+
+ @Override
+ public boolean open(Object... args) {
+ npc = (NPC) args[0];
+ if (npc == null)
+ return false;
+ if (args.length > 1
+ && args[1] instanceof Item
+ && ((Item) args[1]).equals(CIDER)
+ && player.getInventory().remove(CIDER)) {
+
+ // Seers achievement diary
+ if (!player.getAchievementDiaryManager().getDiary(DiaryType.SEERS_VILLAGE).isComplete(0, 6)) {
+ if (player.getAttribute("diary:seers:pub-cider", 0) >= 4) {
+ player.setAttribute("/save:diary:seers:pub-cider", 5);
+ player.getAchievementDiaryManager().getDiary(DiaryType.SEERS_VILLAGE).updateTask(player, 0, 6, true);
+ } else {
+ player.setAttribute("/save:diary:seers:pub-cider", player.getAttribute("diary:seers:pub-cider", 0) + 1);
+ }
+ }
+
+ npc("Ah, a glass of cider, that's very generous of you. I", "don't mind if I do. Thanks!");
+ stage = 999;
+ return true;
+ }
+ interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Hello, how's it going?");
+ stage = RandomFunction.random(0, 5);
+ if (stage == 1) {
+ stage = 0;
+ }
+ return true;
+ }
+
+ @Override
+ public boolean handle(int interfaceId, int buttonId) {
+ switch (stage) {
+ case 0:
+ interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "I'm very well thank you.");
+ stage = 999;
+ break;
+ case 999:
+ end();
+ break;
+ case 2:
+ interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Who are you?");
+ stage = 20;
+ break;
+ case 3:
+ interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "I'm fine, how are you?");
+ stage = 30;
+ break;
+ case 4:
+ interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "No, I don't want to buy anything!");
+ stage = 999;
+ break;
+ case 5:
+ interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "I think we need a new king. The one we've got isn't", "very good.");
+ stage = 999;
+ break;
+ case 20:
+ interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "I'm a bold adventurer.");
+ stage = 21;
+ break;
+ case 21:
+ interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Ah, a very noble profession.");
+ stage = 999;
+ break;
+ case 30:
+ interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Very well thank you.");
+ stage = 999;
+ break;
+ }
+ return true;
+ }
+
+ @Override
+ public int[] getIds() {
+ return NPC_IDS;
+ }
+}
diff --git a/Server/src/main/java/core/game/content/dialogue/ShopkeeperDialogue.java b/Server/src/main/content/global/dialogue/ShopkeeperDialogue.java
similarity index 92%
rename from Server/src/main/java/core/game/content/dialogue/ShopkeeperDialogue.java
rename to Server/src/main/content/global/dialogue/ShopkeeperDialogue.java
index 053cd4fa4..e132605d4 100644
--- a/Server/src/main/java/core/game/content/dialogue/ShopkeeperDialogue.java
+++ b/Server/src/main/content/global/dialogue/ShopkeeperDialogue.java
@@ -1,5 +1,7 @@
-package core.game.content.dialogue;
+package content.global.dialogue;
+import core.game.dialogue.DialoguePlugin;
+import core.game.dialogue.FacialExpression;
import core.game.node.entity.npc.NPC;
import core.plugin.Initializable;
import core.game.node.entity.player.Player;
diff --git a/Server/src/main/java/core/game/content/dialogue/TownCrierDialogue.java b/Server/src/main/content/global/dialogue/TownCrierDialogue.java
similarity index 98%
rename from Server/src/main/java/core/game/content/dialogue/TownCrierDialogue.java
rename to Server/src/main/content/global/dialogue/TownCrierDialogue.java
index 821533502..ae4e258c7 100644
--- a/Server/src/main/java/core/game/content/dialogue/TownCrierDialogue.java
+++ b/Server/src/main/content/global/dialogue/TownCrierDialogue.java
@@ -1,10 +1,11 @@
-package core.game.content.dialogue;
+package content.global.dialogue;
+import core.game.dialogue.DialoguePlugin;
import core.game.node.entity.npc.NPC;
import core.game.node.entity.player.Player;
import core.game.node.entity.player.link.diary.DiaryType;
import core.game.system.task.Pulse;
-import rs09.game.world.GameWorld;
+import core.game.world.GameWorld;
import core.game.world.update.flag.context.Animation;
import core.plugin.Initializable;
import core.tools.RandomFunction;
diff --git a/Server/src/main/java/core/game/interaction/inter/AgilityTicketInterface.java b/Server/src/main/content/global/handlers/iface/AgilityTicketInterface.java
similarity index 98%
rename from Server/src/main/java/core/game/interaction/inter/AgilityTicketInterface.java
rename to Server/src/main/content/global/handlers/iface/AgilityTicketInterface.java
index aefb9e933..368849e95 100644
--- a/Server/src/main/java/core/game/interaction/inter/AgilityTicketInterface.java
+++ b/Server/src/main/content/global/handlers/iface/AgilityTicketInterface.java
@@ -1,4 +1,4 @@
-package core.game.interaction.inter;
+package content.global.handlers.iface;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
diff --git a/Server/src/main/java/core/game/interaction/inter/AutocastSelectPlugin.java b/Server/src/main/content/global/handlers/iface/AutocastSelectPlugin.java
similarity index 96%
rename from Server/src/main/java/core/game/interaction/inter/AutocastSelectPlugin.java
rename to Server/src/main/content/global/handlers/iface/AutocastSelectPlugin.java
index b3711bf82..a010c7bb5 100644
--- a/Server/src/main/java/core/game/interaction/inter/AutocastSelectPlugin.java
+++ b/Server/src/main/content/global/handlers/iface/AutocastSelectPlugin.java
@@ -1,4 +1,4 @@
-package core.game.interaction.inter;
+package content.global.handlers.iface;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
diff --git a/Server/src/main/java/core/game/interaction/inter/BoltEnchantingInterface.java b/Server/src/main/content/global/handlers/iface/BoltEnchantingInterface.java
similarity index 98%
rename from Server/src/main/java/core/game/interaction/inter/BoltEnchantingInterface.java
rename to Server/src/main/content/global/handlers/iface/BoltEnchantingInterface.java
index 37056b445..de8c22f87 100644
--- a/Server/src/main/java/core/game/interaction/inter/BoltEnchantingInterface.java
+++ b/Server/src/main/content/global/handlers/iface/BoltEnchantingInterface.java
@@ -1,12 +1,12 @@
-package core.game.interaction.inter;
+package content.global.handlers.iface;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
import core.game.component.ComponentPlugin;
import core.plugin.Initializable;
import core.game.node.entity.skill.Skills;
-import core.game.node.entity.skill.magic.MagicStaff;
-import core.game.node.entity.skill.magic.Runes;
+import core.game.node.entity.combat.spell.MagicStaff;
+import core.game.node.entity.combat.spell.Runes;
import core.game.node.entity.player.Player;
import core.game.node.item.Item;
import core.game.system.task.Pulse;
diff --git a/Server/src/main/java/core/game/interaction/inter/CharacterDesignInterface.java b/Server/src/main/content/global/handlers/iface/CharacterDesignInterface.java
similarity index 88%
rename from Server/src/main/java/core/game/interaction/inter/CharacterDesignInterface.java
rename to Server/src/main/content/global/handlers/iface/CharacterDesignInterface.java
index 91649baec..62c8657bb 100644
--- a/Server/src/main/java/core/game/interaction/inter/CharacterDesignInterface.java
+++ b/Server/src/main/content/global/handlers/iface/CharacterDesignInterface.java
@@ -1,9 +1,9 @@
-package core.game.interaction.inter;
+package content.global.handlers.iface;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
import core.game.component.ComponentPlugin;
-import core.game.content.quest.tutorials.tutorialisland.CharacterDesign;
+import content.region.misc.tutisland.handlers.iface.CharacterDesign;
import core.game.node.entity.player.Player;
import core.plugin.Initializable;
import core.plugin.Plugin;
diff --git a/Server/src/main/kotlin/rs09/game/interaction/inter/ChocatriceIncubationInterface.kt b/Server/src/main/content/global/handlers/iface/ChocatriceIncubationInterface.kt
similarity index 96%
rename from Server/src/main/kotlin/rs09/game/interaction/inter/ChocatriceIncubationInterface.kt
rename to Server/src/main/content/global/handlers/iface/ChocatriceIncubationInterface.kt
index 91c763a48..d086cd95c 100644
--- a/Server/src/main/kotlin/rs09/game/interaction/inter/ChocatriceIncubationInterface.kt
+++ b/Server/src/main/content/global/handlers/iface/ChocatriceIncubationInterface.kt
@@ -1,4 +1,4 @@
-package rs09.game.interaction.inter
+package content.global.handlers.iface
import core.game.component.Component
import core.game.component.ComponentDefinition
diff --git a/Server/src/main/java/core/game/interaction/inter/ClanInterfacePlugin.java b/Server/src/main/content/global/handlers/iface/ClanInterfacePlugin.java
similarity index 97%
rename from Server/src/main/java/core/game/interaction/inter/ClanInterfacePlugin.java
rename to Server/src/main/content/global/handlers/iface/ClanInterfacePlugin.java
index c00fdef2e..1ad3857e8 100644
--- a/Server/src/main/java/core/game/interaction/inter/ClanInterfacePlugin.java
+++ b/Server/src/main/content/global/handlers/iface/ClanInterfacePlugin.java
@@ -1,4 +1,4 @@
-package core.game.interaction.inter;
+package content.global.handlers.iface;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
@@ -14,8 +14,8 @@ import core.plugin.Plugin;
import core.tools.StringUtils;
import kotlin.Unit;
-import static api.ContentAPIKt.sendInputDialogue;
-import static api.ContentAPIKt.setInterfaceText;
+import static core.api.ContentAPIKt.sendInputDialogue;
+import static core.api.ContentAPIKt.setInterfaceText;
/**
* Represents the plugin used to handle the clan interfaces.
diff --git a/Server/src/main/java/core/game/interaction/inter/CombatTabInterface.java b/Server/src/main/content/global/handlers/iface/CombatTabInterface.java
similarity index 95%
rename from Server/src/main/java/core/game/interaction/inter/CombatTabInterface.java
rename to Server/src/main/content/global/handlers/iface/CombatTabInterface.java
index 11e01665c..bd3938d5c 100644
--- a/Server/src/main/java/core/game/interaction/inter/CombatTabInterface.java
+++ b/Server/src/main/content/global/handlers/iface/CombatTabInterface.java
@@ -1,15 +1,15 @@
-package core.game.interaction.inter;
+package content.global.handlers.iface;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
import core.game.component.ComponentPlugin;
import core.game.node.entity.combat.CombatStyle;
-import rs09.game.node.entity.combat.CombatSwingHandler;
+import core.game.node.entity.combat.CombatSwingHandler;
import core.game.node.entity.combat.equipment.WeaponInterface;
import core.game.node.entity.combat.equipment.WeaponInterface.WeaponInterfaces;
import core.game.node.entity.player.Player;
import core.game.system.task.Pulse;
-import rs09.game.world.GameWorld;
+import core.game.world.GameWorld;
import core.plugin.Initializable;
import core.plugin.Plugin;
diff --git a/Server/src/main/kotlin/rs09/game/interaction/inter/CreditShopInterface.kt b/Server/src/main/content/global/handlers/iface/CreditShopInterface.kt
similarity index 92%
rename from Server/src/main/kotlin/rs09/game/interaction/inter/CreditShopInterface.kt
rename to Server/src/main/content/global/handlers/iface/CreditShopInterface.kt
index 9ecf360ec..e45f3ef74 100644
--- a/Server/src/main/kotlin/rs09/game/interaction/inter/CreditShopInterface.kt
+++ b/Server/src/main/content/global/handlers/iface/CreditShopInterface.kt
@@ -1,80 +1,80 @@
-package rs09.game.interaction.inter
-
-import api.*
-import core.game.node.entity.player.Player
-import core.game.node.item.Item
-import org.rs09.consts.Components
-import org.rs09.consts.Items
-import rs09.game.interaction.InterfaceListener
-
-class CreditShopInterface : InterfaceListener {
-
- val CREDIT_SHOP = Components.CREDIT_SHOP
- val TEXT_CHILD = 39
-
- override fun defineInterfaceListeners() {
- on(CREDIT_SHOP){player, component, opcode, buttonID, slot, itemID ->
- val item = getItem(buttonID)
-
- if(opcode == 155){
- sendDialogue(player, "This item costs ${item.price} credits.")
- return@on true
- }
-
- if(buttonID == 14 || buttonID == 21){
- val specific = when(opcode){
- 196 -> if(buttonID == 14) Items.RED_PARTYHAT_1038 else Items.RED_HWEEN_MASK_1057
- 124 -> if(buttonID == 14) Items.GREEN_PARTYHAT_1044 else Items.GREEN_HWEEN_MASK_1053
- 199 -> if(buttonID == 14) Items.BLUE_PARTYHAT_1042 else Items.BLUE_HWEEN_MASK_1055
- 234 -> Items.YELLOW_PARTYHAT_1040
- 168 -> Items.PURPLE_PARTYHAT_1046
- 166 -> Items.WHITE_PARTYHAT_1048
- else -> Items.DWARF_WEED_SEED_5303
- }
- attemptPurchase(player,specific,item.price)
- } else {
- attemptPurchase(player,item.id,item.price)
- }
- return@on true
- }
-
- onOpen(CREDIT_SHOP){player, component ->
- sendCredits(player)
- return@onOpen true
- }
- }
-
- private fun getItem(buttonID: Int): ShopItem{
- return when(buttonID){
- 14 -> ShopItem(Items.BLUE_PARTYHAT_1042,75)
- 18 -> ShopItem(Items.SCYTHE_1419,100)
- 20 -> ShopItem(Items.JANGLES_THE_MONKEY_14648,200)
- 17 -> ShopItem(Items.CHRISTMAS_CRACKER_962,65)
- 21 -> ShopItem(Items.BLUE_HWEEN_MASK_1055,65)
- 16 -> ShopItem(Items.SANTA_HAT_1050,65)
- 19 -> ShopItem(Items.BUNNY_EARS_1037,150)
- 15 -> ShopItem(Items.EASTER_RING_7927,100)
- else -> ShopItem(0,0)
- }
- }
-
- fun sendCredits(player: Player){
- setInterfaceText(player, "You have ${player.details.credits} credits to spend.", CREDIT_SHOP, TEXT_CHILD)
- }
-
- fun attemptPurchase(player: Player, item: Int, price: Int){
- if(player.details.credits < price){
- sendDialogue(player, "You don't have enough credits for that.")
- return
- }
-
- if(player.inventory.add(Item(item))){
- player.details.credits -= price
- } else {
- sendDialogue(player, "You don't have enough inventory space for that.")
- }
- sendCredits(player)
- }
-
- internal class ShopItem(val id: Int, val price: Int)
+package content.global.handlers.iface
+
+import core.api.*
+import core.game.node.entity.player.Player
+import core.game.node.item.Item
+import org.rs09.consts.Components
+import org.rs09.consts.Items
+import core.game.interaction.InterfaceListener
+
+class CreditShopInterface : InterfaceListener {
+
+ val CREDIT_SHOP = Components.CREDIT_SHOP
+ val TEXT_CHILD = 39
+
+ override fun defineInterfaceListeners() {
+ on(CREDIT_SHOP){player, component, opcode, buttonID, slot, itemID ->
+ val item = getItem(buttonID)
+
+ if(opcode == 155){
+ sendDialogue(player, "This item costs ${item.price} credits.")
+ return@on true
+ }
+
+ if(buttonID == 14 || buttonID == 21){
+ val specific = when(opcode){
+ 196 -> if(buttonID == 14) Items.RED_PARTYHAT_1038 else Items.RED_HWEEN_MASK_1057
+ 124 -> if(buttonID == 14) Items.GREEN_PARTYHAT_1044 else Items.GREEN_HWEEN_MASK_1053
+ 199 -> if(buttonID == 14) Items.BLUE_PARTYHAT_1042 else Items.BLUE_HWEEN_MASK_1055
+ 234 -> Items.YELLOW_PARTYHAT_1040
+ 168 -> Items.PURPLE_PARTYHAT_1046
+ 166 -> Items.WHITE_PARTYHAT_1048
+ else -> Items.DWARF_WEED_SEED_5303
+ }
+ attemptPurchase(player,specific,item.price)
+ } else {
+ attemptPurchase(player,item.id,item.price)
+ }
+ return@on true
+ }
+
+ onOpen(CREDIT_SHOP){player, component ->
+ sendCredits(player)
+ return@onOpen true
+ }
+ }
+
+ private fun getItem(buttonID: Int): ShopItem {
+ return when(buttonID){
+ 14 -> ShopItem(Items.BLUE_PARTYHAT_1042,75)
+ 18 -> ShopItem(Items.SCYTHE_1419,100)
+ 20 -> ShopItem(Items.JANGLES_THE_MONKEY_14648,200)
+ 17 -> ShopItem(Items.CHRISTMAS_CRACKER_962,65)
+ 21 -> ShopItem(Items.BLUE_HWEEN_MASK_1055,65)
+ 16 -> ShopItem(Items.SANTA_HAT_1050,65)
+ 19 -> ShopItem(Items.BUNNY_EARS_1037,150)
+ 15 -> ShopItem(Items.EASTER_RING_7927,100)
+ else -> ShopItem(0,0)
+ }
+ }
+
+ fun sendCredits(player: Player){
+ setInterfaceText(player, "You have ${player.details.credits} credits to spend.", CREDIT_SHOP, TEXT_CHILD)
+ }
+
+ fun attemptPurchase(player: Player, item: Int, price: Int){
+ if(player.details.credits < price){
+ sendDialogue(player, "You don't have enough credits for that.")
+ return
+ }
+
+ if(player.inventory.add(Item(item))){
+ player.details.credits -= price
+ } else {
+ sendDialogue(player, "You don't have enough inventory space for that.")
+ }
+ sendCredits(player)
+ }
+
+ internal class ShopItem(val id: Int, val price: Int)
}
\ No newline at end of file
diff --git a/Server/src/main/java/core/game/interaction/inter/CrystalKeyChestPlugin.java b/Server/src/main/content/global/handlers/iface/CrystalKeyChestPlugin.java
similarity index 97%
rename from Server/src/main/java/core/game/interaction/inter/CrystalKeyChestPlugin.java
rename to Server/src/main/content/global/handlers/iface/CrystalKeyChestPlugin.java
index 69656ef8b..852eb4997 100644
--- a/Server/src/main/java/core/game/interaction/inter/CrystalKeyChestPlugin.java
+++ b/Server/src/main/content/global/handlers/iface/CrystalKeyChestPlugin.java
@@ -1,4 +1,4 @@
-package core.game.interaction.inter;
+package content.global.handlers.iface;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
diff --git a/Server/src/main/java/core/game/interaction/inter/DeathInterfacePlugin.java b/Server/src/main/content/global/handlers/iface/DeathInterfacePlugin.java
similarity index 95%
rename from Server/src/main/java/core/game/interaction/inter/DeathInterfacePlugin.java
rename to Server/src/main/content/global/handlers/iface/DeathInterfacePlugin.java
index 44139de63..5b57c3078 100644
--- a/Server/src/main/java/core/game/interaction/inter/DeathInterfacePlugin.java
+++ b/Server/src/main/content/global/handlers/iface/DeathInterfacePlugin.java
@@ -1,4 +1,4 @@
-package core.game.interaction.inter;
+package content.global.handlers.iface;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
diff --git a/Server/src/main/java/core/game/interaction/inter/EllisDialogue.java b/Server/src/main/content/global/handlers/iface/EllisDialogue.java
similarity index 95%
rename from Server/src/main/java/core/game/interaction/inter/EllisDialogue.java
rename to Server/src/main/content/global/handlers/iface/EllisDialogue.java
index 80e8dd455..099ac46f4 100644
--- a/Server/src/main/java/core/game/interaction/inter/EllisDialogue.java
+++ b/Server/src/main/content/global/handlers/iface/EllisDialogue.java
@@ -1,7 +1,7 @@
-package core.game.interaction.inter;
+package content.global.handlers.iface;
-import core.game.content.dialogue.DialoguePlugin;
-import core.game.node.entity.skill.crafting.TanningProduct;
+import core.game.dialogue.DialoguePlugin;
+import content.global.skill.crafting.TanningProduct;
import core.game.node.entity.npc.NPC;
import core.game.node.entity.player.Player;
import core.plugin.Initializable;
diff --git a/Server/src/main/java/core/game/interaction/inter/EmoteTabInterface.java b/Server/src/main/content/global/handlers/iface/EmoteTabInterface.java
similarity index 95%
rename from Server/src/main/java/core/game/interaction/inter/EmoteTabInterface.java
rename to Server/src/main/content/global/handlers/iface/EmoteTabInterface.java
index 63a541aab..7506f5fcb 100644
--- a/Server/src/main/java/core/game/interaction/inter/EmoteTabInterface.java
+++ b/Server/src/main/content/global/handlers/iface/EmoteTabInterface.java
@@ -1,4 +1,4 @@
-package core.game.interaction.inter;
+package content.global.handlers.iface;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
diff --git a/Server/src/main/java/core/game/interaction/inter/EquipmentInterface.java b/Server/src/main/content/global/handlers/iface/EquipmentInterface.java
similarity index 96%
rename from Server/src/main/java/core/game/interaction/inter/EquipmentInterface.java
rename to Server/src/main/content/global/handlers/iface/EquipmentInterface.java
index daa9796f9..3461a0236 100644
--- a/Server/src/main/java/core/game/interaction/inter/EquipmentInterface.java
+++ b/Server/src/main/content/global/handlers/iface/EquipmentInterface.java
@@ -1,4 +1,4 @@
-package core.game.interaction.inter;
+package content.global.handlers.iface;
import core.cache.def.impl.ItemDefinition;
import core.game.component.Component;
@@ -20,10 +20,10 @@ import core.net.packet.context.ContainerContext;
import core.net.packet.out.ContainerPacket;
import core.plugin.Initializable;
import core.plugin.Plugin;
-import rs09.game.content.global.action.EquipHandler;
-import rs09.game.interaction.IntType;
-import rs09.game.interaction.InteractionListeners;
-import rs09.game.world.GameWorld;
+import core.game.global.action.EquipHandler;
+import core.game.interaction.IntType;
+import core.game.interaction.InteractionListeners;
+import core.game.world.GameWorld;
/**
* Represents the equipment interface.
diff --git a/Server/src/main/kotlin/rs09/game/interaction/inter/ExperienceInterface.kt b/Server/src/main/content/global/handlers/iface/ExperienceInterface.kt
similarity index 97%
rename from Server/src/main/kotlin/rs09/game/interaction/inter/ExperienceInterface.kt
rename to Server/src/main/content/global/handlers/iface/ExperienceInterface.kt
index 17544b257..9e93c3cef 100644
--- a/Server/src/main/kotlin/rs09/game/interaction/inter/ExperienceInterface.kt
+++ b/Server/src/main/content/global/handlers/iface/ExperienceInterface.kt
@@ -1,6 +1,6 @@
-package rs09.game.interaction.inter
+package content.global.handlers.iface
-import api.*
+import core.api.*
import core.game.component.Component
import core.game.component.ComponentDefinition
import core.game.component.ComponentPlugin
@@ -9,7 +9,7 @@ import core.game.node.entity.player.link.audio.Audio
import core.game.node.entity.skill.Skills
import core.plugin.Initializable
import core.plugin.Plugin
-import rs09.game.system.SystemLogger
+import core.tools.SystemLogger
/**
* Represents the experience interface.
diff --git a/Server/src/main/kotlin/rs09/game/interaction/inter/FairyRingInterface.kt b/Server/src/main/content/global/handlers/iface/FairyRingInterface.kt
similarity index 96%
rename from Server/src/main/kotlin/rs09/game/interaction/inter/FairyRingInterface.kt
rename to Server/src/main/content/global/handlers/iface/FairyRingInterface.kt
index 22df6abba..f580ba099 100644
--- a/Server/src/main/kotlin/rs09/game/interaction/inter/FairyRingInterface.kt
+++ b/Server/src/main/content/global/handlers/iface/FairyRingInterface.kt
@@ -1,17 +1,16 @@
-package rs09.game.interaction.inter
+package content.global.handlers.iface
-import api.*
-import api.events.FairyRingDialEvent
+import core.api.*
+import core.game.event.FairyRingDialEvent
import core.game.component.Component
-import core.game.content.dialogue.FacialExpression
import core.game.node.entity.player.Player
import core.game.node.entity.player.link.TeleportManager
import core.game.system.task.Pulse
import core.game.world.map.Location
import core.game.world.map.RegionManager
import core.tools.RandomFunction
-import rs09.game.interaction.InterfaceListener
-import rs09.game.world.GameWorld
+import core.game.interaction.InterfaceListener
+import core.game.world.GameWorld
val RING_1 = arrayOf('a','d','c','b')
val RING_2 = arrayOf('i','l','k','j')
@@ -21,7 +20,7 @@ val RING_3 = arrayOf('p','s','r','q')
* Handles the fairy ring interface
* @author Ceikry
*/
-class FairyRingInterface : InterfaceListener{
+class FairyRingInterface : InterfaceListener {
val RINGS = 734
val TRAVEL_LOG = 735
@@ -129,7 +128,7 @@ class FairyRingInterface : InterfaceListener{
}
GameWorld.Pulser.submit(object : Pulse(4, player) {
override fun pulse(): Boolean {
- sendPlayerDialogue(player, "Wow, fairy magic sure is useful, I hardly moved at all!", FacialExpression.AMAZED)
+ sendPlayerDialogue(player, "Wow, fairy magic sure is useful, I hardly moved at all!", core.game.dialogue.FacialExpression.AMAZED)
return true
}
})
diff --git a/Server/src/main/kotlin/rs09/game/interaction/inter/FurClothingInterface.kt b/Server/src/main/content/global/handlers/iface/FurClothingInterface.kt
similarity index 91%
rename from Server/src/main/kotlin/rs09/game/interaction/inter/FurClothingInterface.kt
rename to Server/src/main/content/global/handlers/iface/FurClothingInterface.kt
index e915f25b3..1020b6247 100644
--- a/Server/src/main/kotlin/rs09/game/interaction/inter/FurClothingInterface.kt
+++ b/Server/src/main/content/global/handlers/iface/FurClothingInterface.kt
@@ -1,6 +1,6 @@
-package rs09.game.interaction.inter
+package content.global.handlers.iface
-import api.*
+import core.api.*
import core.game.component.Component
import core.game.component.ComponentDefinition
import core.game.component.ComponentPlugin
@@ -9,9 +9,9 @@ import core.game.node.entity.player.Player
import core.game.node.item.Item
import core.plugin.Initializable
import core.plugin.Plugin
+import core.tools.colorize
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
-import rs09.tools.stringtools.colorize
private const val FUR_CLOTHING_COMPONENT_ID = 477
@@ -60,16 +60,16 @@ private val OPTIONS = arrayOf("Buy 10","Buy 5","Buy 1","Value")
//Like holy what the fuck j*gex
private val ITEMS = arrayOf(
null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
- null,POLAR_CAMO_TOP, null,null, POLAR_CAMO_LEGS,null,null,null,null,
- null,WOOD_CAMO_TOP, null,null, WOOD_CAMO_LEGS,null,null,null,
- null,JUNGLE_CAMO_TOP,null,null, JUNGLE_CAMO_LEGS,null,null,null,
- null,DESERT_CAMO_TOP,null,null, DESERT_CAMO_LEGS,null,null,null,null,
+ null, POLAR_CAMO_TOP, null,null, POLAR_CAMO_LEGS,null,null,null,null,
+ null, WOOD_CAMO_TOP, null,null, WOOD_CAMO_LEGS,null,null,null,
+ null, JUNGLE_CAMO_TOP,null,null, JUNGLE_CAMO_LEGS,null,null,null,
+ null, DESERT_CAMO_TOP,null,null, DESERT_CAMO_LEGS,null,null,null,null,
null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
- LARUPIA_HAT,null,null,LARUPIA_TOP,null,null,LARUPIA_LEGS,null,null,null,null,
- GRAAHK_HEADDRESS,null,null,GRAAHK_TOP,null,null,GRAAHK_LEGS,null,null,null,null,null,
- KYATT_HAT,null,null,KYATT_TOP,null,null,KYATT_LEGS, null,null,null,
+ LARUPIA_HAT,null,null, LARUPIA_TOP,null,null, LARUPIA_LEGS,null,null,null,null,
+ GRAAHK_HEADDRESS,null,null, GRAAHK_TOP,null,null, GRAAHK_LEGS,null,null,null,null,null,
+ KYATT_HAT,null,null, KYATT_TOP,null,null, KYATT_LEGS, null,null,null,
null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
@@ -162,8 +162,8 @@ class FurClothingInterface : ComponentPlugin(){
return
}
- removeItem(player, requiredFur, api.Container.INVENTORY)
- removeItem(player, coins, api.Container.INVENTORY)
+ removeItem(player, requiredFur, Container.INVENTORY)
+ removeItem(player, coins, Container.INVENTORY)
addItem(player, clothing.product.id, amount)
}
diff --git a/Server/src/main/java/core/game/interaction/inter/GameInterface.java b/Server/src/main/content/global/handlers/iface/GameInterface.java
similarity index 98%
rename from Server/src/main/java/core/game/interaction/inter/GameInterface.java
rename to Server/src/main/content/global/handlers/iface/GameInterface.java
index 36d580aa0..0c8754f29 100644
--- a/Server/src/main/java/core/game/interaction/inter/GameInterface.java
+++ b/Server/src/main/content/global/handlers/iface/GameInterface.java
@@ -1,4 +1,4 @@
-package core.game.interaction.inter;
+package content.global.handlers.iface;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
@@ -8,7 +8,7 @@ import core.game.node.entity.combat.equipment.WeaponInterface;
import core.game.node.entity.combat.equipment.WeaponInterface.WeaponInterfaces;
import core.game.node.entity.player.Player;
import core.game.node.entity.player.info.Rights;
-import rs09.game.world.GameWorld;
+import core.game.world.GameWorld;
import core.plugin.Plugin;
/**
diff --git a/Server/src/main/java/core/game/interaction/inter/GlassInterface.java b/Server/src/main/content/global/handlers/iface/GlassInterface.java
similarity index 94%
rename from Server/src/main/java/core/game/interaction/inter/GlassInterface.java
rename to Server/src/main/content/global/handlers/iface/GlassInterface.java
index 663beab2d..eedf8158d 100644
--- a/Server/src/main/java/core/game/interaction/inter/GlassInterface.java
+++ b/Server/src/main/content/global/handlers/iface/GlassInterface.java
@@ -1,13 +1,12 @@
-package core.game.interaction.inter;
+package content.global.handlers.iface;
-import static api.ContentAPIKt.*;
+import static core.api.ContentAPIKt.*;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
import core.game.component.ComponentPlugin;
import core.game.node.entity.player.Player;
-import core.game.node.entity.player.link.RunScript;
import core.game.node.entity.skill.Skills;
-import core.game.node.entity.skill.crafting.GlassProduct;
+import content.global.skill.crafting.GlassProduct;
import core.game.node.item.Item;
import core.game.system.task.Pulse;
import core.game.world.update.flag.context.Animation;
diff --git a/Server/src/main/java/core/game/interaction/inter/GliderInterface.java b/Server/src/main/content/global/handlers/iface/GliderInterface.java
similarity index 82%
rename from Server/src/main/java/core/game/interaction/inter/GliderInterface.java
rename to Server/src/main/content/global/handlers/iface/GliderInterface.java
index c67df24f8..08459cefe 100644
--- a/Server/src/main/java/core/game/interaction/inter/GliderInterface.java
+++ b/Server/src/main/content/global/handlers/iface/GliderInterface.java
@@ -1,11 +1,11 @@
-package core.game.interaction.inter;
+package content.global.handlers.iface;
-import static api.ContentAPIKt.*;
+import static core.api.ContentAPIKt.*;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
import core.game.component.ComponentPlugin;
-import core.game.content.global.travel.glider.GliderPulse;
-import core.game.content.global.travel.glider.Gliders;
+import content.global.travel.glider.GliderPulse;
+import content.global.travel.glider.Gliders;
import core.game.node.entity.player.Player;
import core.plugin.Initializable;
import core.plugin.Plugin;
diff --git a/Server/src/main/kotlin/rs09/game/interaction/inter/HairDresserInterface.kt b/Server/src/main/content/global/handlers/iface/HairDresserInterface.kt
similarity index 95%
rename from Server/src/main/kotlin/rs09/game/interaction/inter/HairDresserInterface.kt
rename to Server/src/main/content/global/handlers/iface/HairDresserInterface.kt
index 755f01796..1d7eca270 100644
--- a/Server/src/main/kotlin/rs09/game/interaction/inter/HairDresserInterface.kt
+++ b/Server/src/main/content/global/handlers/iface/HairDresserInterface.kt
@@ -1,10 +1,10 @@
-package rs09.game.interaction.inter
+package content.global.handlers.iface
-import api.*
+import core.api.*
import core.game.component.Component
import core.game.component.ComponentDefinition
import core.game.component.ComponentPlugin
-import core.game.content.dialogue.FacialExpression
+import core.game.dialogue.FacialExpression
import core.game.node.entity.player.Player
import core.game.node.item.Item
import core.plugin.Initializable
@@ -90,7 +90,7 @@ private const val M_COMB_OVER = 253
//Array of male hairstyles in the same order as the interface
-val MALE_HAIR_STYLES = intArrayOf(M_BALD,M_DREAD,M_LONG, M_MEDIUM, M_MONK, M_SHORT, M_CLOSE_CROP, M_WILD_SPIKE, M_SPIKE, M_MOHAWK, M_WIND_BRAID, M_QUIFF, M_SAMURAI, M_PRINCE, M_CURTAINS, M_LONG_CURTAINS, M_SIDE_PART_SPIKE, M_TOP_KNOT, M_PONYTAIL_SPIKEY, M_LONG_SWEPT_FRINGE, M_EVANSTYLE, M_DRAGON, M_WARRIOR_CURTAINS, M_COMB_OVER)
+val MALE_HAIR_STYLES = intArrayOf(M_BALD, M_DREAD, M_LONG, M_MEDIUM, M_MONK, M_SHORT, M_CLOSE_CROP, M_WILD_SPIKE, M_SPIKE, M_MOHAWK, M_WIND_BRAID, M_QUIFF, M_SAMURAI, M_PRINCE, M_CURTAINS, M_LONG_CURTAINS, M_SIDE_PART_SPIKE, M_TOP_KNOT, M_PONYTAIL_SPIKEY, M_LONG_SWEPT_FRINGE, M_EVANSTYLE, M_DRAGON, M_WARRIOR_CURTAINS, M_COMB_OVER)
//Male Facial Hairs
@@ -144,7 +144,7 @@ class HairDresserInterface : ComponentPlugin(){
}
sendPlayerOnInterface(player, usedInterface, player_model_child)
sendPlayerOnInterface(player, usedInterface, player_head_child)
- sendAnimationOnInterface(player, FacialExpression.HAPPY.animationId, usedInterface, player_head_child)
+ sendAnimationOnInterface(player, core.game.dialogue.FacialExpression.HAPPY.animationId, usedInterface, player_head_child)
player.toggleWardrobe(true)
component?.setCloseEvent{pl,_ ->
diff --git a/Server/src/main/java/core/game/interaction/inter/JewelleryInterface.java b/Server/src/main/content/global/handlers/iface/JewelleryInterface.java
similarity index 93%
rename from Server/src/main/java/core/game/interaction/inter/JewelleryInterface.java
rename to Server/src/main/content/global/handlers/iface/JewelleryInterface.java
index 1e65fb72f..11eb23415 100644
--- a/Server/src/main/java/core/game/interaction/inter/JewelleryInterface.java
+++ b/Server/src/main/content/global/handlers/iface/JewelleryInterface.java
@@ -1,21 +1,21 @@
-package core.game.interaction.inter;
+package content.global.handlers.iface;
-import static api.ContentAPIKt.*;
+import static core.api.ContentAPIKt.*;
+
+import content.global.skill.slayer.SlayerManager;
import core.cache.def.impl.ItemDefinition;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
import core.game.component.ComponentPlugin;
import core.game.node.entity.skill.Skills;
-import core.game.node.entity.skill.crafting.jewellery.JewelleryCrafting;
-import core.game.node.entity.skill.crafting.jewellery.JewelleryCrafting.JewelleryItem;
+import content.global.skill.crafting.jewellery.JewelleryCrafting;
+import content.global.skill.crafting.jewellery.JewelleryCrafting.JewelleryItem;
import core.game.node.entity.player.Player;
-import core.game.node.entity.player.link.RunScript;
import core.game.node.item.Item;
import core.plugin.Plugin;
import core.plugin.Initializable;
import core.tools.StringUtils;
import kotlin.Unit;
-import rs09.game.node.entity.skill.slayer.SlayerManager;
/**
* Represents the interface plugin used for jewellery crafting.
diff --git a/Server/src/main/java/core/game/interaction/inter/LeatherCraftInterface.java b/Server/src/main/content/global/handlers/iface/LeatherCraftInterface.java
similarity index 84%
rename from Server/src/main/java/core/game/interaction/inter/LeatherCraftInterface.java
rename to Server/src/main/content/global/handlers/iface/LeatherCraftInterface.java
index d265a0ac9..e4b700a1a 100644
--- a/Server/src/main/java/core/game/interaction/inter/LeatherCraftInterface.java
+++ b/Server/src/main/content/global/handlers/iface/LeatherCraftInterface.java
@@ -1,13 +1,12 @@
-package core.game.interaction.inter;
+package content.global.handlers.iface;
-import static api.ContentAPIKt.*;
+import static core.api.ContentAPIKt.*;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
import core.game.component.ComponentPlugin;
-import core.game.node.entity.skill.crafting.armour.LeatherCrafting;
-import core.game.node.entity.skill.crafting.armour.SoftCraftPulse;
+import content.global.skill.crafting.armour.LeatherCrafting;
+import content.global.skill.crafting.armour.SoftCraftPulse;
import core.game.node.entity.player.Player;
-import core.game.node.entity.player.link.RunScript;
import core.game.node.item.Item;
import core.plugin.Initializable;
import core.plugin.Plugin;
diff --git a/Server/src/main/java/core/game/interaction/inter/LeatherCraftPlugin.java b/Server/src/main/content/global/handlers/iface/LeatherCraftPlugin.java
similarity index 87%
rename from Server/src/main/java/core/game/interaction/inter/LeatherCraftPlugin.java
rename to Server/src/main/content/global/handlers/iface/LeatherCraftPlugin.java
index ae1cd2e7c..e0b297824 100644
--- a/Server/src/main/java/core/game/interaction/inter/LeatherCraftPlugin.java
+++ b/Server/src/main/content/global/handlers/iface/LeatherCraftPlugin.java
@@ -1,8 +1,8 @@
-package core.game.interaction.inter;
+package content.global.handlers.iface;
import core.plugin.Initializable;
-import core.game.node.entity.skill.crafting.armour.LeatherCrafting;
-import core.game.node.entity.skill.crafting.armour.LeatherCrafting.SoftLeather;
+import content.global.skill.crafting.armour.LeatherCrafting;
+import content.global.skill.crafting.armour.LeatherCrafting.SoftLeather;
import core.game.interaction.NodeUsageEvent;
import core.game.interaction.UseWithHandler;
import core.plugin.Plugin;
diff --git a/Server/src/main/java/core/game/interaction/inter/LoginInterfacePlugin.java b/Server/src/main/content/global/handlers/iface/LoginInterfacePlugin.java
similarity index 96%
rename from Server/src/main/java/core/game/interaction/inter/LoginInterfacePlugin.java
rename to Server/src/main/content/global/handlers/iface/LoginInterfacePlugin.java
index 9149bb56c..f91a3000e 100644
--- a/Server/src/main/java/core/game/interaction/inter/LoginInterfacePlugin.java
+++ b/Server/src/main/content/global/handlers/iface/LoginInterfacePlugin.java
@@ -1,4 +1,4 @@
-package core.game.interaction.inter;
+package content.global.handlers.iface;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
diff --git a/Server/src/main/java/core/game/interaction/inter/LogoutInterface.java b/Server/src/main/content/global/handlers/iface/LogoutInterface.java
similarity index 93%
rename from Server/src/main/java/core/game/interaction/inter/LogoutInterface.java
rename to Server/src/main/content/global/handlers/iface/LogoutInterface.java
index 9a37ab1e7..ba1784c8f 100644
--- a/Server/src/main/java/core/game/interaction/inter/LogoutInterface.java
+++ b/Server/src/main/content/global/handlers/iface/LogoutInterface.java
@@ -1,10 +1,10 @@
-package core.game.interaction.inter;
+package content.global.handlers.iface;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
import core.game.component.ComponentPlugin;
import core.game.node.entity.player.Player;
-import rs09.game.world.GameWorld;
+import core.game.world.GameWorld;
import core.plugin.Initializable;
import core.plugin.Plugin;
diff --git a/Server/src/main/java/core/game/interaction/inter/MagicBookInterface.java b/Server/src/main/content/global/handlers/iface/MagicBookInterface.java
similarity index 80%
rename from Server/src/main/java/core/game/interaction/inter/MagicBookInterface.java
rename to Server/src/main/content/global/handlers/iface/MagicBookInterface.java
index 78dac7236..e29e7f114 100644
--- a/Server/src/main/java/core/game/interaction/inter/MagicBookInterface.java
+++ b/Server/src/main/content/global/handlers/iface/MagicBookInterface.java
@@ -1,17 +1,17 @@
-package core.game.interaction.inter;
+package content.global.handlers.iface;
-import api.events.SpellCastEvent;
+import content.global.skill.magic.SpellListener;
+import content.global.skill.magic.SpellListeners;
+import content.global.skill.magic.SpellUtils;
+import core.game.event.SpellCastEvent;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
import core.game.component.ComponentPlugin;
import core.plugin.Initializable;
-import core.game.node.entity.skill.magic.MagicSpell;
+import core.game.node.entity.combat.spell.MagicSpell;
import core.game.node.entity.player.Player;
import core.game.node.entity.player.link.SpellBookManager.SpellBook;
-import rs09.game.node.entity.skill.magic.SpellListener;
-import rs09.game.node.entity.skill.magic.SpellListeners;
-import rs09.game.node.entity.skill.magic.SpellUtils;
-import rs09.game.world.GameWorld;
+import core.game.world.GameWorld;
import core.plugin.Plugin;
/**
diff --git a/Server/src/main/kotlin/rs09/game/interaction/inter/MainGameInterface.kt b/Server/src/main/content/global/handlers/iface/MainGameInterface.kt
similarity index 96%
rename from Server/src/main/kotlin/rs09/game/interaction/inter/MainGameInterface.kt
rename to Server/src/main/content/global/handlers/iface/MainGameInterface.kt
index 5b8a6cbaf..243337f4e 100644
--- a/Server/src/main/kotlin/rs09/game/interaction/inter/MainGameInterface.kt
+++ b/Server/src/main/content/global/handlers/iface/MainGameInterface.kt
@@ -1,6 +1,6 @@
-package rs09.game.interaction.inter
+package content.global.handlers.iface
-import api.*
+import core.api.*
import core.game.component.CloseEvent
import core.game.component.Component
import core.game.node.entity.combat.equipment.WeaponInterface
@@ -8,8 +8,8 @@ import core.game.node.entity.combat.equipment.WeaponInterface.WeaponInterfaces
import core.game.node.entity.player.Player
import core.game.node.entity.player.info.Rights
import org.rs09.consts.Components
-import rs09.game.interaction.InterfaceListener
-import rs09.game.world.GameWorld.settings
+import core.game.interaction.InterfaceListener
+import core.game.world.GameWorld.settings
class MainGameInterface : InterfaceListener {
val TOPLEVEL = Components.TOPLEVEL_548
diff --git a/Server/src/main/kotlin/rs09/game/interaction/inter/MakeOverInterface.kt b/Server/src/main/content/global/handlers/iface/MakeOverInterface.kt
similarity index 92%
rename from Server/src/main/kotlin/rs09/game/interaction/inter/MakeOverInterface.kt
rename to Server/src/main/content/global/handlers/iface/MakeOverInterface.kt
index 92eeb1dd6..9c911007d 100644
--- a/Server/src/main/kotlin/rs09/game/interaction/inter/MakeOverInterface.kt
+++ b/Server/src/main/content/global/handlers/iface/MakeOverInterface.kt
@@ -1,9 +1,9 @@
-package rs09.game.interaction.inter
+package content.global.handlers.iface
import core.game.component.Component
import core.game.component.ComponentDefinition
import core.game.component.ComponentPlugin
-import core.game.content.dialogue.FacialExpression
+import core.game.dialogue.FacialExpression
import core.game.node.entity.player.Player
import core.game.node.entity.player.link.appearance.Gender
import core.game.node.item.Item
@@ -33,8 +33,8 @@ class MakeOverInterface : ComponentPlugin(){
player.packetDispatch.sendNpcOnInterface(1,component.id, MALE_CHILD_ID)
player.packetDispatch.sendNpcOnInterface(5,component.id, FEMALE_CHILD_ID)
//Send chathead animations to interface
- player.packetDispatch.sendAnimationInterface(FacialExpression.SILENT.animationId,component.id, MALE_CHILD_ID)
- player.packetDispatch.sendAnimationInterface(FacialExpression.SILENT.animationId,component.id, FEMALE_CHILD_ID)
+ player.packetDispatch.sendAnimationInterface(core.game.dialogue.FacialExpression.SILENT.animationId,component.id, MALE_CHILD_ID)
+ player.packetDispatch.sendAnimationInterface(core.game.dialogue.FacialExpression.SILENT.animationId,component.id, FEMALE_CHILD_ID)
//Check for makeover voucher and then change interface text if it's there
if(player.inventory.containsAtLeastOneItem(Items.MAKEOVER_VOUCHER_5606)){
diff --git a/Server/src/main/java/core/game/interaction/inter/MusicTabInterface.java b/Server/src/main/content/global/handlers/iface/MusicTabInterface.java
similarity index 97%
rename from Server/src/main/java/core/game/interaction/inter/MusicTabInterface.java
rename to Server/src/main/content/global/handlers/iface/MusicTabInterface.java
index 112092586..579607fe5 100644
--- a/Server/src/main/java/core/game/interaction/inter/MusicTabInterface.java
+++ b/Server/src/main/content/global/handlers/iface/MusicTabInterface.java
@@ -1,4 +1,4 @@
-package core.game.interaction.inter;
+package content.global.handlers.iface;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
diff --git a/Server/src/main/java/core/game/interaction/inter/MysticStaffEnchantingPlugin.java b/Server/src/main/content/global/handlers/iface/MysticStaffEnchantingPlugin.java
similarity index 99%
rename from Server/src/main/java/core/game/interaction/inter/MysticStaffEnchantingPlugin.java
rename to Server/src/main/content/global/handlers/iface/MysticStaffEnchantingPlugin.java
index 011a360b2..af798008d 100644
--- a/Server/src/main/java/core/game/interaction/inter/MysticStaffEnchantingPlugin.java
+++ b/Server/src/main/content/global/handlers/iface/MysticStaffEnchantingPlugin.java
@@ -1,4 +1,4 @@
-package core.game.interaction.inter;
+package content.global.handlers.iface;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
diff --git a/Server/src/main/kotlin/rs09/game/interaction/inter/NPCContactInterface.kt b/Server/src/main/content/global/handlers/iface/NPCContactInterface.kt
similarity index 96%
rename from Server/src/main/kotlin/rs09/game/interaction/inter/NPCContactInterface.kt
rename to Server/src/main/content/global/handlers/iface/NPCContactInterface.kt
index 7f49bbe5f..ebe4a6d54 100644
--- a/Server/src/main/kotlin/rs09/game/interaction/inter/NPCContactInterface.kt
+++ b/Server/src/main/content/global/handlers/iface/NPCContactInterface.kt
@@ -1,11 +1,11 @@
-package rs09.game.interaction.inter
+package content.global.handlers.iface
import core.game.node.entity.npc.NPC
import core.game.world.map.Location
import core.tools.RandomFunction
import org.rs09.consts.NPCs
-import rs09.game.content.dialogue.DialogueFile
-import rs09.game.interaction.InterfaceListener
+import core.game.dialogue.DialogueFile
+import core.game.interaction.InterfaceListener
class NPCContactInterface : InterfaceListener {
val contactNPCs = arrayOf(NPCs.HONEST_JIMMY_4362, NPCs.BERT_3108, NPCs.ADVISOR_GHRIM_1375, NPCs.TURAEL_8273, NPCs.LANTHUS_1526, NPCs.SUMONA_7780, NPCs.MAZCHNA_8274, NPCs.DURADEL_8275, NPCs.VANNAKA_1597, NPCs.DARK_MAGE_2262, NPCs.CHAELDAR_1598, NPCs.CYRISUS_432, NPCs.LARRY_5424)
diff --git a/Server/src/main/java/core/game/interaction/inter/OrbViewingInterface.java b/Server/src/main/content/global/handlers/iface/OrbViewingInterface.java
similarity index 98%
rename from Server/src/main/java/core/game/interaction/inter/OrbViewingInterface.java
rename to Server/src/main/content/global/handlers/iface/OrbViewingInterface.java
index a6b2670ee..aa21b7cce 100644
--- a/Server/src/main/java/core/game/interaction/inter/OrbViewingInterface.java
+++ b/Server/src/main/content/global/handlers/iface/OrbViewingInterface.java
@@ -1,6 +1,6 @@
-package core.game.interaction.inter;
+package content.global.handlers.iface;
-import rs09.ServerConstants;
+import core.ServerConstants;
import core.cache.def.impl.SceneryDefinition;
import core.game.component.CloseEvent;
import core.game.component.Component;
@@ -13,7 +13,7 @@ import core.game.system.task.Pulse;
import core.game.world.map.Location;
import core.plugin.Initializable;
import core.plugin.Plugin;
-import rs09.plugin.ClassScanner;
+import core.plugin.ClassScanner;
/**
* Handles an orb viewing interface.
diff --git a/Server/src/main/java/core/game/interaction/inter/PlayerExamineInterfacePlugin.java b/Server/src/main/content/global/handlers/iface/PlayerExamineInterfacePlugin.java
similarity index 98%
rename from Server/src/main/java/core/game/interaction/inter/PlayerExamineInterfacePlugin.java
rename to Server/src/main/content/global/handlers/iface/PlayerExamineInterfacePlugin.java
index 0009ec3c6..8a944752c 100644
--- a/Server/src/main/java/core/game/interaction/inter/PlayerExamineInterfacePlugin.java
+++ b/Server/src/main/content/global/handlers/iface/PlayerExamineInterfacePlugin.java
@@ -1,4 +1,4 @@
-package core.game.interaction.inter;
+package content.global.handlers.iface;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
diff --git a/Server/src/main/java/core/game/interaction/inter/PrayerTabInterface.java b/Server/src/main/content/global/handlers/iface/PrayerTabInterface.java
similarity index 95%
rename from Server/src/main/java/core/game/interaction/inter/PrayerTabInterface.java
rename to Server/src/main/content/global/handlers/iface/PrayerTabInterface.java
index 22c16313a..b1c9de0db 100644
--- a/Server/src/main/java/core/game/interaction/inter/PrayerTabInterface.java
+++ b/Server/src/main/content/global/handlers/iface/PrayerTabInterface.java
@@ -1,4 +1,4 @@
-package core.game.interaction.inter;
+package content.global.handlers.iface;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
diff --git a/Server/src/main/kotlin/rs09/game/interaction/inter/PuppyInterfacePlugin.kt b/Server/src/main/content/global/handlers/iface/PuppyInterfacePlugin.kt
similarity index 97%
rename from Server/src/main/kotlin/rs09/game/interaction/inter/PuppyInterfacePlugin.kt
rename to Server/src/main/content/global/handlers/iface/PuppyInterfacePlugin.kt
index 80c98cd94..3df8d0c56 100644
--- a/Server/src/main/kotlin/rs09/game/interaction/inter/PuppyInterfacePlugin.kt
+++ b/Server/src/main/content/global/handlers/iface/PuppyInterfacePlugin.kt
@@ -1,4 +1,4 @@
-package rs09.game.interaction.inter
+package content.global.handlers.iface
import core.game.component.Component
import core.game.component.ComponentDefinition
diff --git a/Server/src/main/java/core/game/interaction/inter/QuestTabInterface.java b/Server/src/main/content/global/handlers/iface/QuestTabInterface.java
similarity index 98%
rename from Server/src/main/java/core/game/interaction/inter/QuestTabInterface.java
rename to Server/src/main/content/global/handlers/iface/QuestTabInterface.java
index 0703b87b6..313e98b30 100644
--- a/Server/src/main/java/core/game/interaction/inter/QuestTabInterface.java
+++ b/Server/src/main/content/global/handlers/iface/QuestTabInterface.java
@@ -1,4 +1,4 @@
-package core.game.interaction.inter;
+package content.global.handlers.iface;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
diff --git a/Server/src/main/java/core/game/interaction/inter/RequestAssistInterface.java b/Server/src/main/content/global/handlers/iface/RequestAssistInterface.java
similarity index 97%
rename from Server/src/main/java/core/game/interaction/inter/RequestAssistInterface.java
rename to Server/src/main/content/global/handlers/iface/RequestAssistInterface.java
index 53059f691..952a0bf16 100644
--- a/Server/src/main/java/core/game/interaction/inter/RequestAssistInterface.java
+++ b/Server/src/main/content/global/handlers/iface/RequestAssistInterface.java
@@ -1,4 +1,4 @@
-package core.game.interaction.inter;
+package content.global.handlers.iface;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
diff --git a/Server/src/main/kotlin/rs09/game/interaction/inter/RulesAndInfo.kt b/Server/src/main/content/global/handlers/iface/RulesAndInfo.kt
similarity index 94%
rename from Server/src/main/kotlin/rs09/game/interaction/inter/RulesAndInfo.kt
rename to Server/src/main/content/global/handlers/iface/RulesAndInfo.kt
index 4b6219177..f52b725e6 100644
--- a/Server/src/main/kotlin/rs09/game/interaction/inter/RulesAndInfo.kt
+++ b/Server/src/main/content/global/handlers/iface/RulesAndInfo.kt
@@ -1,10 +1,9 @@
-package rs09.game.interaction.inter
+package content.global.handlers.iface
-import api.*
+import core.api.*
import core.game.node.entity.player.Player
import core.tools.RandomFunction
-import rs09.game.interaction.InterfaceListener
-import rs09.game.system.SystemLogger
+import core.game.interaction.InterfaceListener
object RulesAndInfo {
val RULES = arrayOf(
diff --git a/Server/src/main/java/core/game/interaction/inter/SawmillPlankInterface.java b/Server/src/main/content/global/handlers/iface/SawmillPlankInterface.java
similarity index 98%
rename from Server/src/main/java/core/game/interaction/inter/SawmillPlankInterface.java
rename to Server/src/main/content/global/handlers/iface/SawmillPlankInterface.java
index e5e3b3784..00957533d 100644
--- a/Server/src/main/java/core/game/interaction/inter/SawmillPlankInterface.java
+++ b/Server/src/main/content/global/handlers/iface/SawmillPlankInterface.java
@@ -1,6 +1,6 @@
-package core.game.interaction.inter;
+package content.global.handlers.iface;
-import static api.ContentAPIKt.*;
+import static core.api.ContentAPIKt.*;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
import core.game.component.ComponentPlugin;
diff --git a/Server/src/main/java/core/game/interaction/inter/SettingTabInterface.java b/Server/src/main/content/global/handlers/iface/SettingTabInterface.java
similarity index 98%
rename from Server/src/main/java/core/game/interaction/inter/SettingTabInterface.java
rename to Server/src/main/content/global/handlers/iface/SettingTabInterface.java
index 93f7a975e..9c660554b 100644
--- a/Server/src/main/java/core/game/interaction/inter/SettingTabInterface.java
+++ b/Server/src/main/content/global/handlers/iface/SettingTabInterface.java
@@ -1,4 +1,4 @@
-package core.game.interaction.inter;
+package content.global.handlers.iface;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
diff --git a/Server/src/main/java/core/game/interaction/inter/ShoppingPlugin.java b/Server/src/main/content/global/handlers/iface/ShoppingPlugin.java
similarity index 98%
rename from Server/src/main/java/core/game/interaction/inter/ShoppingPlugin.java
rename to Server/src/main/content/global/handlers/iface/ShoppingPlugin.java
index 64787fc23..6f05c691f 100644
--- a/Server/src/main/java/core/game/interaction/inter/ShoppingPlugin.java
+++ b/Server/src/main/content/global/handlers/iface/ShoppingPlugin.java
@@ -1,7 +1,7 @@
/*
package core.game.interaction.inter;
-import static api.ContentAPIKt.*;
+import static core.api.ContentAPIKt.*;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
import core.game.component.ComponentPlugin;
diff --git a/Server/src/main/java/core/game/interaction/inter/SkillInterface.java b/Server/src/main/content/global/handlers/iface/SkillInterface.java
similarity index 95%
rename from Server/src/main/java/core/game/interaction/inter/SkillInterface.java
rename to Server/src/main/content/global/handlers/iface/SkillInterface.java
index adecfbc25..b9d5e5da4 100644
--- a/Server/src/main/java/core/game/interaction/inter/SkillInterface.java
+++ b/Server/src/main/content/global/handlers/iface/SkillInterface.java
@@ -1,4 +1,4 @@
-package core.game.interaction.inter;
+package content.global.handlers.iface;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
diff --git a/Server/src/main/java/core/game/interaction/inter/SkillTabInterface.java b/Server/src/main/content/global/handlers/iface/SkillTabInterface.java
similarity index 96%
rename from Server/src/main/java/core/game/interaction/inter/SkillTabInterface.java
rename to Server/src/main/content/global/handlers/iface/SkillTabInterface.java
index cf4275a7b..f2255d97c 100644
--- a/Server/src/main/java/core/game/interaction/inter/SkillTabInterface.java
+++ b/Server/src/main/content/global/handlers/iface/SkillTabInterface.java
@@ -1,14 +1,12 @@
-package core.game.interaction.inter;
+package content.global.handlers.iface;
-import api.ContentAPIKt.*;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
import core.game.component.ComponentPlugin;
import core.game.node.entity.skill.LevelUp;
import core.game.node.entity.skill.Skills;
import core.game.node.entity.player.Player;
-import core.game.node.entity.player.link.RunScript;
-import rs09.game.world.GameWorld;
+import core.game.world.GameWorld;
import core.plugin.Initializable;
import core.plugin.Plugin;
diff --git a/Server/src/main/java/core/game/interaction/inter/SmeltingInterface.java b/Server/src/main/content/global/handlers/iface/SmeltingInterface.java
similarity index 92%
rename from Server/src/main/java/core/game/interaction/inter/SmeltingInterface.java
rename to Server/src/main/content/global/handlers/iface/SmeltingInterface.java
index 31af38dcc..4032ff524 100644
--- a/Server/src/main/java/core/game/interaction/inter/SmeltingInterface.java
+++ b/Server/src/main/content/global/handlers/iface/SmeltingInterface.java
@@ -1,14 +1,13 @@
-package core.game.interaction.inter;
+package content.global.handlers.iface;
-import static api.ContentAPIKt.*;
+import static core.api.ContentAPIKt.*;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
import core.game.component.ComponentPlugin;
import core.plugin.Initializable;
-import core.game.node.entity.skill.smithing.smelting.Bar;
-import core.game.node.entity.skill.smithing.smelting.SmeltingPulse;
+import content.global.skill.smithing.smelting.Bar;
+import content.global.skill.smithing.smelting.SmeltingPulse;
import core.game.node.entity.player.Player;
-import core.game.node.entity.player.link.RunScript;
import core.plugin.Plugin;
import kotlin.Unit;
diff --git a/Server/src/main/java/core/game/interaction/inter/SmithingInterface.java b/Server/src/main/content/global/handlers/iface/SmithingInterface.java
similarity index 81%
rename from Server/src/main/java/core/game/interaction/inter/SmithingInterface.java
rename to Server/src/main/content/global/handlers/iface/SmithingInterface.java
index d1064874e..3256736be 100644
--- a/Server/src/main/java/core/game/interaction/inter/SmithingInterface.java
+++ b/Server/src/main/content/global/handlers/iface/SmithingInterface.java
@@ -1,16 +1,15 @@
-package core.game.interaction.inter;
+package content.global.handlers.iface;
-import static api.ContentAPIKt.*;
+import static core.api.ContentAPIKt.*;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
import core.game.component.ComponentPlugin;
import core.plugin.Initializable;
-import core.game.node.entity.skill.smithing.BarType;
-import core.game.node.entity.skill.smithing.Bars;
-import core.game.node.entity.skill.smithing.SmithingPulse;
-import core.game.node.entity.skill.smithing.SmithingType;
+import content.global.skill.smithing.BarType;
+import content.global.skill.smithing.Bars;
+import content.global.skill.smithing.SmithingPulse;
+import content.global.skill.smithing.SmithingType;
import core.game.node.entity.player.Player;
-import core.game.node.entity.player.link.RunScript;
import core.game.node.item.Item;
import core.plugin.Plugin;
import kotlin.Unit;
diff --git a/Server/src/main/java/core/game/interaction/inter/SpinningInterface.java b/Server/src/main/content/global/handlers/iface/SpinningInterface.java
similarity index 86%
rename from Server/src/main/java/core/game/interaction/inter/SpinningInterface.java
rename to Server/src/main/content/global/handlers/iface/SpinningInterface.java
index 777887f36..8ee642e73 100644
--- a/Server/src/main/java/core/game/interaction/inter/SpinningInterface.java
+++ b/Server/src/main/content/global/handlers/iface/SpinningInterface.java
@@ -1,14 +1,13 @@
-package core.game.interaction.inter;
+package content.global.handlers.iface;
-import static api.ContentAPIKt.*;
+import static core.api.ContentAPIKt.*;
import core.cache.def.impl.ItemDefinition;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
import core.game.component.ComponentPlugin;
-import core.game.node.entity.skill.crafting.spinning.SpinningItem;
-import core.game.node.entity.skill.crafting.spinning.SpinningPulse;
+import content.global.skill.crafting.spinning.SpinningItem;
+import content.global.skill.crafting.spinning.SpinningPulse;
import core.game.node.entity.player.Player;
-import core.game.node.entity.player.link.RunScript;
import core.game.node.item.Item;
import core.plugin.Initializable;
import core.plugin.Plugin;
diff --git a/Server/src/main/java/core/game/interaction/inter/TanningInterface.java b/Server/src/main/content/global/handlers/iface/TanningInterface.java
similarity index 90%
rename from Server/src/main/java/core/game/interaction/inter/TanningInterface.java
rename to Server/src/main/content/global/handlers/iface/TanningInterface.java
index 5c1952984..aa15e4b11 100644
--- a/Server/src/main/java/core/game/interaction/inter/TanningInterface.java
+++ b/Server/src/main/content/global/handlers/iface/TanningInterface.java
@@ -1,12 +1,11 @@
-package core.game.interaction.inter;
+package content.global.handlers.iface;
-import static api.ContentAPIKt.*;
+import static core.api.ContentAPIKt.*;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
import core.game.component.ComponentPlugin;
-import core.game.node.entity.skill.crafting.TanningProduct;
+import content.global.skill.crafting.TanningProduct;
import core.game.node.entity.player.Player;
-import core.game.node.entity.player.link.RunScript;
import core.game.node.item.Item;
import core.plugin.Initializable;
import core.plugin.Plugin;
diff --git a/Server/src/main/kotlin/rs09/game/interaction/inter/TeleotherInterface.kt b/Server/src/main/content/global/handlers/iface/TeleotherInterface.kt
similarity index 89%
rename from Server/src/main/kotlin/rs09/game/interaction/inter/TeleotherInterface.kt
rename to Server/src/main/content/global/handlers/iface/TeleotherInterface.kt
index 53d2589e4..051bc041b 100644
--- a/Server/src/main/kotlin/rs09/game/interaction/inter/TeleotherInterface.kt
+++ b/Server/src/main/content/global/handlers/iface/TeleotherInterface.kt
@@ -1,10 +1,10 @@
-package rs09.game.interaction.inter
+package content.global.handlers.iface
import core.game.node.entity.player.link.TeleportManager.TeleportType
import core.game.world.update.flag.context.Animation
import core.game.world.update.flag.context.Graphics
import org.rs09.consts.Components
-import rs09.game.interaction.InterfaceListener
+import core.game.interaction.InterfaceListener
class TeleotherInterface : InterfaceListener {
val IFACE = Components.TELEPORT_OTHER_326
diff --git a/Server/src/main/kotlin/rs09/game/interaction/inter/ThessaliaInterface.kt b/Server/src/main/content/global/handlers/iface/ThessaliaInterface.kt
similarity index 94%
rename from Server/src/main/kotlin/rs09/game/interaction/inter/ThessaliaInterface.kt
rename to Server/src/main/content/global/handlers/iface/ThessaliaInterface.kt
index 35df3f662..ec6dcf98e 100644
--- a/Server/src/main/kotlin/rs09/game/interaction/inter/ThessaliaInterface.kt
+++ b/Server/src/main/content/global/handlers/iface/ThessaliaInterface.kt
@@ -1,4 +1,4 @@
-package rs09.game.interaction.inter
+package content.global.handlers.iface
import core.game.component.Component
import core.game.component.ComponentDefinition
@@ -174,25 +174,25 @@ class ThessaliaInterface : ComponentPlugin(){
else -> when(component?.id){
THESSALIA_MALE_COMPONENT -> {
when(button){
- 182 -> player.setAttribute("thes-type",colorType.TORSO)
- 183 -> player.setAttribute("thes-type",colorType.ARMS)
- 184 -> player.setAttribute("thes-type",colorType.LEGS)
+ 182 -> player.setAttribute("thes-type", colorType.TORSO)
+ 183 -> player.setAttribute("thes-type", colorType.ARMS)
+ 184 -> player.setAttribute("thes-type", colorType.LEGS)
}
if(maleArmsButtonRange.contains(button)) updateArms(player,button,true)
if(maleTorsoButtonRange.contains(button)) updateTop(player,button,true)
if(maleLegsButtonRange.contains(button)) updateLegs(player,button,true)
- if(maleColorButtonRange.contains(button)) updateColor(player,button,true,player.getAttribute("thes-type",colorType.TORSO))
+ if(maleColorButtonRange.contains(button)) updateColor(player,button,true,player.getAttribute("thes-type", colorType.TORSO))
}
THESSALIA_FEMALE_COMPONENT -> {
when(button){
- 183 -> player.setAttribute("thes-type",colorType.TORSO)
- 184 -> player.setAttribute("thes-type",colorType.ARMS)
- 185 -> player.setAttribute("thes-type",colorType.LEGS)
+ 183 -> player.setAttribute("thes-type", colorType.TORSO)
+ 184 -> player.setAttribute("thes-type", colorType.ARMS)
+ 185 -> player.setAttribute("thes-type", colorType.LEGS)
}
if(femaleArmsButtonRange.contains(button)) updateArms(player,button,false)
if(femaleTorsoButtonRange.contains(button)) updateTop(player,button,false)
if(femaleLegsButtonRange.contains(button)) updateLegs(player,button,false)
- if(femaleColorButtonRange.contains(button)) updateColor(player,button,false,player.getAttribute("thes-type",colorType.TORSO))
+ if(femaleColorButtonRange.contains(button)) updateColor(player,button,false,player.getAttribute("thes-type", colorType.TORSO))
}
}
}
diff --git a/Server/src/main/java/core/game/interaction/inter/TradeInterfacePlugin.java b/Server/src/main/content/global/handlers/iface/TradeInterfacePlugin.java
similarity index 97%
rename from Server/src/main/java/core/game/interaction/inter/TradeInterfacePlugin.java
rename to Server/src/main/content/global/handlers/iface/TradeInterfacePlugin.java
index 4537fb0fa..1d3568715 100644
--- a/Server/src/main/java/core/game/interaction/inter/TradeInterfacePlugin.java
+++ b/Server/src/main/content/global/handlers/iface/TradeInterfacePlugin.java
@@ -1,6 +1,6 @@
-package core.game.interaction.inter;
+package content.global.handlers.iface;
-import static api.ContentAPIKt.*;
+import static core.api.ContentAPIKt.*;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
import core.game.component.ComponentPlugin;
diff --git a/Server/src/main/java/core/game/interaction/inter/WorldMapInterface.java b/Server/src/main/content/global/handlers/iface/WorldMapInterface.java
similarity index 96%
rename from Server/src/main/java/core/game/interaction/inter/WorldMapInterface.java
rename to Server/src/main/content/global/handlers/iface/WorldMapInterface.java
index b7f8f6759..756600db3 100644
--- a/Server/src/main/java/core/game/interaction/inter/WorldMapInterface.java
+++ b/Server/src/main/content/global/handlers/iface/WorldMapInterface.java
@@ -1,4 +1,4 @@
-package core.game.interaction.inter;
+package content.global.handlers.iface;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
diff --git a/Server/src/main/kotlin/rs09/game/interaction/inter/bank/BankChargeInterface.kt b/Server/src/main/content/global/handlers/iface/bank/BankChargeInterface.kt
similarity index 94%
rename from Server/src/main/kotlin/rs09/game/interaction/inter/bank/BankChargeInterface.kt
rename to Server/src/main/content/global/handlers/iface/bank/BankChargeInterface.kt
index 5ba257d33..cdf582f43 100644
--- a/Server/src/main/kotlin/rs09/game/interaction/inter/bank/BankChargeInterface.kt
+++ b/Server/src/main/content/global/handlers/iface/bank/BankChargeInterface.kt
@@ -1,14 +1,13 @@
-package rs09.game.interaction.inter.bank
+package content.global.handlers.iface.bank
-import api.*
+import core.api.*
import core.game.component.Component
-import core.game.content.dialogue.FacialExpression
import core.game.node.entity.player.Player
import core.game.node.item.Item
import org.rs09.consts.Components
import org.rs09.consts.Items
import org.rs09.consts.NPCs
-import rs09.game.interaction.InterfaceListener
+import core.game.interaction.InterfaceListener
/**
* Handles bank charge interface for Eniola at ZMI altar.
@@ -76,7 +75,7 @@ class BankChargeInterface : InterfaceListener {
"I'm afraid you don't have the necessary runes with you at this time, so " +
"I can't allow you to access your account. Please bring 20 runes of one type " +
"and you'll be able to open your bank.",
- FacialExpression.NEUTRAL
+ core.game.dialogue.FacialExpression.NEUTRAL
)
return true
diff --git a/Server/src/main/kotlin/rs09/game/interaction/inter/bank/BankDepositBoxInterface.kt b/Server/src/main/content/global/handlers/iface/bank/BankDepositBoxInterface.kt
similarity index 91%
rename from Server/src/main/kotlin/rs09/game/interaction/inter/bank/BankDepositBoxInterface.kt
rename to Server/src/main/content/global/handlers/iface/bank/BankDepositBoxInterface.kt
index c4982b8f2..e190a8dde 100644
--- a/Server/src/main/kotlin/rs09/game/interaction/inter/bank/BankDepositBoxInterface.kt
+++ b/Server/src/main/content/global/handlers/iface/bank/BankDepositBoxInterface.kt
@@ -1,15 +1,14 @@
-package rs09.game.interaction.inter.bank
+package content.global.handlers.iface.bank
-import api.animate
-import api.dumpBeastOfBurden
-import api.runWorldTask
-import api.sendMessage
+import core.api.animate
+import core.api.dumpBeastOfBurden
+import core.api.runWorldTask
+import core.api.sendMessage
import core.game.component.Component
import core.game.node.entity.player.Player
import org.rs09.consts.Animations
import org.rs09.consts.Components
-import rs09.game.interaction.InterfaceListener
-import rs09.game.interaction.util.BankUtils
+import core.game.interaction.InterfaceListener
/**
* Allows the user to interact with the
diff --git a/Server/src/main/kotlin/rs09/game/interaction/inter/bank/BankInterface.kt b/Server/src/main/content/global/handlers/iface/bank/BankInterface.kt
similarity index 95%
rename from Server/src/main/kotlin/rs09/game/interaction/inter/bank/BankInterface.kt
rename to Server/src/main/content/global/handlers/iface/bank/BankInterface.kt
index 6475475fb..bb55b6d2e 100644
--- a/Server/src/main/kotlin/rs09/game/interaction/inter/bank/BankInterface.kt
+++ b/Server/src/main/content/global/handlers/iface/bank/BankInterface.kt
@@ -1,18 +1,15 @@
-package rs09.game.interaction.inter.bank
+package content.global.handlers.iface.bank
-import api.*
+import core.api.*
import core.game.component.Component
import core.game.container.Container
import core.game.node.entity.player.Player
-import core.game.node.item.Item
-import core.tools.StringUtils
import org.rs09.consts.Components
import org.rs09.consts.Items
-import rs09.ServerConstants
-import rs09.game.content.dialogue.region.worldwide.bank.BankDepositDialogue
-import rs09.game.content.dialogue.region.worldwide.bank.BankHelpDialogue
-import rs09.game.interaction.InterfaceListener
-import rs09.game.interaction.util.BankUtils
+import core.ServerConstants
+import content.global.dialogue.BankDepositDialogue
+import content.global.dialogue.BankHelpDialogue
+import core.game.interaction.InterfaceListener
/**
* Allows the user to interact with the Bank Interface.
diff --git a/Server/src/main/java/core/game/interaction/inter/BankPinInterface.java b/Server/src/main/content/global/handlers/iface/bank/BankPinInterface.java
similarity index 97%
rename from Server/src/main/java/core/game/interaction/inter/BankPinInterface.java
rename to Server/src/main/content/global/handlers/iface/bank/BankPinInterface.java
index 8b44885c0..7c70b88a3 100644
--- a/Server/src/main/java/core/game/interaction/inter/BankPinInterface.java
+++ b/Server/src/main/content/global/handlers/iface/bank/BankPinInterface.java
@@ -1,4 +1,4 @@
-package core.game.interaction.inter;
+package content.global.handlers.iface.bank;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
diff --git a/Server/src/main/kotlin/rs09/game/interaction/util/BankUtils.kt b/Server/src/main/content/global/handlers/iface/bank/BankUtils.kt
similarity index 84%
rename from Server/src/main/kotlin/rs09/game/interaction/util/BankUtils.kt
rename to Server/src/main/content/global/handlers/iface/bank/BankUtils.kt
index 0f6ab9160..2a056fee2 100644
--- a/Server/src/main/kotlin/rs09/game/interaction/util/BankUtils.kt
+++ b/Server/src/main/content/global/handlers/iface/bank/BankUtils.kt
@@ -1,8 +1,7 @@
-package rs09.game.interaction.util
+package content.global.handlers.iface.bank
-import api.InputType
-import api.sendInputDialogue
-import api.sendMessage
+import core.api.InputType
+import core.api.sendInputDialogue
import core.game.node.entity.player.Player
object BankUtils {
diff --git a/Server/src/main/kotlin/rs09/game/interaction/inter/ge/ExchangeItemSets.kt b/Server/src/main/content/global/handlers/iface/ge/ExchangeItemSets.kt
similarity index 93%
rename from Server/src/main/kotlin/rs09/game/interaction/inter/ge/ExchangeItemSets.kt
rename to Server/src/main/content/global/handlers/iface/ge/ExchangeItemSets.kt
index 51c1150ef..8547bf3c4 100644
--- a/Server/src/main/kotlin/rs09/game/interaction/inter/ge/ExchangeItemSets.kt
+++ b/Server/src/main/content/global/handlers/iface/ge/ExchangeItemSets.kt
@@ -1,8 +1,8 @@
-package rs09.game.interaction.inter.ge
+package content.global.handlers.iface.ge
-import api.getAttribute
-import api.openInterface
-import api.setAttribute
+import core.api.getAttribute
+import core.api.openInterface
+import core.api.setAttribute
import core.game.component.Component
import core.game.container.Container
import core.game.container.ContainerEvent
@@ -11,7 +11,7 @@ import core.game.container.access.InterfaceContainer
import core.game.ge.GEItemSet
import core.game.node.entity.player.Player
import org.rs09.consts.Components
-import rs09.game.interaction.InterfaceListener
+import core.game.interaction.InterfaceListener
class ExchangeItemSets : InterfaceListener {
override fun defineInterfaceListeners() {
diff --git a/Server/src/main/java/core/game/interaction/inter/GrandExchangeInterface.java b/Server/src/main/content/global/handlers/iface/ge/GrandExchangeInterface.java
similarity index 94%
rename from Server/src/main/java/core/game/interaction/inter/GrandExchangeInterface.java
rename to Server/src/main/content/global/handlers/iface/ge/GrandExchangeInterface.java
index 8f6809de5..a6fa904c9 100644
--- a/Server/src/main/java/core/game/interaction/inter/GrandExchangeInterface.java
+++ b/Server/src/main/content/global/handlers/iface/ge/GrandExchangeInterface.java
@@ -1,6 +1,5 @@
-package core.game.interaction.inter;
+package content.global.handlers.iface.ge;
-import static api.ContentAPIKt.*;
import core.cache.def.impl.CS2Mapping;
import core.cache.def.impl.ItemDefinition;
import core.game.component.Component;
@@ -8,7 +7,6 @@ import core.game.component.ComponentDefinition;
import core.game.component.ComponentPlugin;
import core.game.ge.GEGuidePrice;
import core.game.ge.GEItemSet;
-import core.game.ge.OfferState;
import core.game.node.entity.player.Player;
import core.game.node.entity.player.link.audio.Audio;
import core.game.node.item.Item;
@@ -18,13 +16,10 @@ import core.net.packet.context.ContainerContext;
import core.net.packet.out.ContainerPacket;
import core.plugin.Initializable;
import core.plugin.Plugin;
-import kotlin.Unit;
-import rs09.game.ge.GrandExchange;
-import rs09.game.ge.GrandExchangeOffer;
-import rs09.game.ge.GrandExchangeRecords;
-import rs09.game.interaction.inter.ge.StockMarket;
-import rs09.game.interaction.npc.BogrogPouchSwapper;
-import rs09.game.world.GameWorld;
+import core.game.ge.GrandExchangeOffer;
+import core.game.ge.GrandExchangeRecords;
+import content.region.kandarin.feldip.gutanoth.handlers.BogrogPouchSwapper;
+import core.game.world.GameWorld;
/**
* Handles the Grand Exchange interface options.
diff --git a/Server/src/main/kotlin/rs09/game/interaction/inter/ge/StockMarket.kt b/Server/src/main/content/global/handlers/iface/ge/StockMarket.kt
similarity index 98%
rename from Server/src/main/kotlin/rs09/game/interaction/inter/ge/StockMarket.kt
rename to Server/src/main/content/global/handlers/iface/ge/StockMarket.kt
index b3e71a9a8..c952e9086 100644
--- a/Server/src/main/kotlin/rs09/game/interaction/inter/ge/StockMarket.kt
+++ b/Server/src/main/content/global/handlers/iface/ge/StockMarket.kt
@@ -1,6 +1,6 @@
-package rs09.game.interaction.inter.ge
+package content.global.handlers.iface.ge
-import api.*
+import core.api.*
import core.game.component.Component
import core.game.ge.OfferState
import core.game.node.entity.player.Player
@@ -12,12 +12,12 @@ import core.net.packet.context.ContainerContext
import core.net.packet.out.Config
import core.net.packet.out.ContainerPacket
import org.rs09.consts.Components
-import rs09.game.ge.GrandExchange
-import rs09.game.ge.GrandExchangeOffer
-import rs09.game.ge.GrandExchangeRecords
-import rs09.game.ge.PriceIndex
-import rs09.game.interaction.InterfaceListener
-import rs09.game.system.SystemLogger
+import core.game.ge.GrandExchange
+import core.game.ge.GrandExchangeOffer
+import core.game.ge.GrandExchangeRecords
+import core.game.ge.PriceIndex
+import core.game.interaction.InterfaceListener
+import core.tools.SystemLogger
/**
* Handles the grand exchange interface (Stock Market)
diff --git a/Server/src/main/java/core/game/interaction/item/BirdNestPlugin.java b/Server/src/main/content/global/handlers/item/BirdNestPlugin.java
similarity index 91%
rename from Server/src/main/java/core/game/interaction/item/BirdNestPlugin.java
rename to Server/src/main/content/global/handlers/item/BirdNestPlugin.java
index 19b2a3cf9..30d4e64de 100644
--- a/Server/src/main/java/core/game/interaction/item/BirdNestPlugin.java
+++ b/Server/src/main/content/global/handlers/item/BirdNestPlugin.java
@@ -1,6 +1,6 @@
-package core.game.interaction.item;
+package content.global.handlers.item;
-import core.game.content.global.BirdNest;
+import content.data.tables.BirdNest;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
import core.game.node.entity.player.Player;
diff --git a/Server/src/main/java/core/game/interaction/item/BookreadOption.java b/Server/src/main/content/global/handlers/item/BookreadOption.java
similarity index 98%
rename from Server/src/main/java/core/game/interaction/item/BookreadOption.java
rename to Server/src/main/content/global/handlers/item/BookreadOption.java
index 92bb0be88..02ad8f1a8 100644
--- a/Server/src/main/java/core/game/interaction/item/BookreadOption.java
+++ b/Server/src/main/content/global/handlers/item/BookreadOption.java
@@ -1,4 +1,4 @@
-package core.game.interaction.item;
+package content.global.handlers.item;
import core.cache.def.impl.ItemDefinition;
import core.game.interaction.OptionHandler;
diff --git a/Server/src/main/kotlin/rs09/game/interaction/item/BraceletOfClayPlugin.kt b/Server/src/main/content/global/handlers/item/BraceletOfClayPlugin.kt
similarity index 77%
rename from Server/src/main/kotlin/rs09/game/interaction/item/BraceletOfClayPlugin.kt
rename to Server/src/main/content/global/handlers/item/BraceletOfClayPlugin.kt
index 1d445752b..26fd23008 100644
--- a/Server/src/main/kotlin/rs09/game/interaction/item/BraceletOfClayPlugin.kt
+++ b/Server/src/main/content/global/handlers/item/BraceletOfClayPlugin.kt
@@ -1,9 +1,9 @@
-package rs09.game.interaction.item
+package content.global.handlers.item
-import api.*
+import core.api.*
import org.rs09.consts.Items
-import rs09.game.interaction.InteractionListener
-import rs09.game.interaction.IntType
+import core.game.interaction.InteractionListener
+import core.game.interaction.IntType
/**
* Handles the bracelet of clay operate option.
diff --git a/Server/src/main/kotlin/rs09/game/interaction/item/CadavaPotionListener.kt b/Server/src/main/content/global/handlers/item/CadavaPotionListener.kt
similarity index 82%
rename from Server/src/main/kotlin/rs09/game/interaction/item/CadavaPotionListener.kt
rename to Server/src/main/content/global/handlers/item/CadavaPotionListener.kt
index fafeccd97..35c3fa472 100644
--- a/Server/src/main/kotlin/rs09/game/interaction/item/CadavaPotionListener.kt
+++ b/Server/src/main/content/global/handlers/item/CadavaPotionListener.kt
@@ -1,9 +1,9 @@
package rs09.game.interaction.`object`
-import api.sendItemDialogue
+import core.api.sendItemDialogue
import org.rs09.consts.Items
-import rs09.game.interaction.InteractionListener
-import rs09.game.interaction.IntType
+import core.game.interaction.InteractionListener
+import core.game.interaction.IntType
/**
* @author bushtail
diff --git a/Server/src/main/java/core/game/interaction/item/CasketPlugin.java b/Server/src/main/content/global/handlers/item/CasketPlugin.java
similarity index 93%
rename from Server/src/main/java/core/game/interaction/item/CasketPlugin.java
rename to Server/src/main/content/global/handlers/item/CasketPlugin.java
index a5888d9cd..23a80ff53 100644
--- a/Server/src/main/java/core/game/interaction/item/CasketPlugin.java
+++ b/Server/src/main/content/global/handlers/item/CasketPlugin.java
@@ -1,9 +1,9 @@
-package core.game.interaction.item;
+package content.global.handlers.item;
import java.util.ArrayList;
import java.util.List;
-import static api.ContentAPIKt.*;
+import static core.api.ContentAPIKt.*;
import core.cache.def.impl.ItemDefinition;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
@@ -15,8 +15,8 @@ import core.plugin.Plugin;
import core.tools.RandomFunction;
import core.tools.StringUtils;
import org.rs09.consts.Items;
-import rs09.game.content.global.WeightBasedTable;
-import rs09.game.content.global.WeightedItem;
+import core.api.utils.WeightBasedTable;
+import core.api.utils.WeightedItem;
/**
* Represents the casket handling plugin.
diff --git a/Server/src/main/java/core/game/interaction/item/ConsumableOptionPlugin.java b/Server/src/main/content/global/handlers/item/ConsumableOptionPlugin.java
similarity index 91%
rename from Server/src/main/java/core/game/interaction/item/ConsumableOptionPlugin.java
rename to Server/src/main/content/global/handlers/item/ConsumableOptionPlugin.java
index 577874124..1eff2635b 100644
--- a/Server/src/main/java/core/game/interaction/item/ConsumableOptionPlugin.java
+++ b/Server/src/main/content/global/handlers/item/ConsumableOptionPlugin.java
@@ -1,7 +1,9 @@
-package core.game.interaction.item;
+package content.global.handlers.item;
import core.cache.def.impl.ItemDefinition;
-import core.game.content.consumable.*;
+import core.game.consumable.Consumable;
+import content.data.consumables.Consumables;
+import core.game.consumable.Potion;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
import core.game.node.entity.player.Player;
diff --git a/Server/src/main/java/core/game/content/dialogue/DestroyItemPlugin.java b/Server/src/main/content/global/handlers/item/DestroyItemPlugin.java
similarity index 94%
rename from Server/src/main/java/core/game/content/dialogue/DestroyItemPlugin.java
rename to Server/src/main/content/global/handlers/item/DestroyItemPlugin.java
index 9825f1231..ced363027 100644
--- a/Server/src/main/java/core/game/content/dialogue/DestroyItemPlugin.java
+++ b/Server/src/main/content/global/handlers/item/DestroyItemPlugin.java
@@ -1,5 +1,6 @@
-package core.game.content.dialogue;
+package content.global.handlers.item;
+import core.game.dialogue.DialoguePlugin;
import core.game.node.entity.player.Player;
import core.game.node.entity.player.link.audio.Audio;
import core.plugin.Initializable;
diff --git a/Server/src/main/java/core/game/interaction/item/DiangoItemPlugin.java b/Server/src/main/content/global/handlers/item/DiangoItemPlugin.java
similarity index 97%
rename from Server/src/main/java/core/game/interaction/item/DiangoItemPlugin.java
rename to Server/src/main/content/global/handlers/item/DiangoItemPlugin.java
index 5a570c886..a1ef85b6d 100644
--- a/Server/src/main/java/core/game/interaction/item/DiangoItemPlugin.java
+++ b/Server/src/main/content/global/handlers/item/DiangoItemPlugin.java
@@ -1,4 +1,4 @@
-package core.game.interaction.item;
+package content.global.handlers.item;
import core.cache.def.impl.ItemDefinition;
import core.game.interaction.OptionHandler;
diff --git a/Server/src/main/java/core/game/interaction/item/DragonfireShieldPlugin.java b/Server/src/main/content/global/handlers/item/DragonfireShieldPlugin.java
similarity index 95%
rename from Server/src/main/java/core/game/interaction/item/DragonfireShieldPlugin.java
rename to Server/src/main/content/global/handlers/item/DragonfireShieldPlugin.java
index 32ae59fbb..c2ada0374 100644
--- a/Server/src/main/java/core/game/interaction/item/DragonfireShieldPlugin.java
+++ b/Server/src/main/content/global/handlers/item/DragonfireShieldPlugin.java
@@ -1,4 +1,4 @@
-package core.game.interaction.item;
+package content.global.handlers.item;
import core.cache.def.impl.ItemDefinition;
import core.game.container.impl.EquipmentContainer;
@@ -8,7 +8,7 @@ import core.game.node.entity.Entity;
import core.game.node.entity.combat.BattleState;
import core.game.node.entity.combat.InteractionType;
import core.game.node.entity.combat.equipment.SwitchAttack;
-import core.game.node.entity.combat.handlers.DragonfireSwingHandler;
+import content.global.handlers.item.equipment.special.DragonfireSwingHandler;
import core.game.node.entity.impl.Projectile;
import core.game.node.entity.player.Player;
import core.game.node.item.Item;
@@ -17,9 +17,9 @@ import core.game.world.update.flag.context.Animation;
import core.game.world.update.flag.context.Graphics;
import core.plugin.Initializable;
import core.plugin.Plugin;
-import rs09.game.node.entity.combat.CombatPulse;
-import rs09.game.world.GameWorld;
-import rs09.plugin.ClassScanner;
+import core.game.node.entity.combat.CombatPulse;
+import core.game.world.GameWorld;
+import core.plugin.ClassScanner;
import java.util.concurrent.TimeUnit;
diff --git a/Server/src/main/kotlin/rs09/game/interaction/item/DrinkBlamishOilListener.kt b/Server/src/main/content/global/handlers/item/DrinkBlamishOilListener.kt
similarity index 53%
rename from Server/src/main/kotlin/rs09/game/interaction/item/DrinkBlamishOilListener.kt
rename to Server/src/main/content/global/handlers/item/DrinkBlamishOilListener.kt
index 1a009bece..0e6c423b1 100644
--- a/Server/src/main/kotlin/rs09/game/interaction/item/DrinkBlamishOilListener.kt
+++ b/Server/src/main/content/global/handlers/item/DrinkBlamishOilListener.kt
@@ -1,14 +1,14 @@
-package rs09.game.interaction.item
+package content.global.handlers.item
-import api.*
+import core.api.*
import org.rs09.consts.Items
-import rs09.game.interaction.InteractionListener
-import rs09.game.interaction.IntType
+import core.game.interaction.InteractionListener
+import core.game.interaction.IntType
class DrinkBlamishOilListener : InteractionListener {
override fun defineListeners() {
- on(Items.BLAMISH_OIL_1582, IntType.ITEM, "drink"){player, _ ->
+ on(Items.BLAMISH_OIL_1582, IntType.ITEM, "drink"){ player, _ ->
sendPlayerDialogue(player, "You know... I'd really rather not.")
return@on true
}
diff --git a/Server/src/main/java/core/game/interaction/item/DustHandPlugin.java b/Server/src/main/content/global/handlers/item/DustHandPlugin.java
similarity index 96%
rename from Server/src/main/java/core/game/interaction/item/DustHandPlugin.java
rename to Server/src/main/content/global/handlers/item/DustHandPlugin.java
index 4c414cb61..8e4728040 100644
--- a/Server/src/main/java/core/game/interaction/item/DustHandPlugin.java
+++ b/Server/src/main/content/global/handlers/item/DustHandPlugin.java
@@ -1,4 +1,4 @@
-package core.game.interaction.item;
+package content.global.handlers.item;
import core.cache.def.impl.ItemDefinition;
import core.game.interaction.OptionHandler;
diff --git a/Server/src/main/java/core/game/interaction/item/EmptyOptionPlugin.java b/Server/src/main/content/global/handlers/item/EmptyOptionPlugin.java
similarity index 99%
rename from Server/src/main/java/core/game/interaction/item/EmptyOptionPlugin.java
rename to Server/src/main/content/global/handlers/item/EmptyOptionPlugin.java
index 6292c7c1c..f5e8f9624 100644
--- a/Server/src/main/java/core/game/interaction/item/EmptyOptionPlugin.java
+++ b/Server/src/main/content/global/handlers/item/EmptyOptionPlugin.java
@@ -1,4 +1,4 @@
-package core.game.interaction.item;
+package content.global.handlers.item;
import core.cache.def.impl.ItemDefinition;
import core.game.interaction.OptionHandler;
diff --git a/Server/src/main/kotlin/rs09/game/interaction/item/EnchantJewelleryTabOption.kt b/Server/src/main/content/global/handlers/item/EnchantJewelleryTabOption.kt
similarity index 98%
rename from Server/src/main/kotlin/rs09/game/interaction/item/EnchantJewelleryTabOption.kt
rename to Server/src/main/content/global/handlers/item/EnchantJewelleryTabOption.kt
index a4cfb3547..987b32a5c 100644
--- a/Server/src/main/kotlin/rs09/game/interaction/item/EnchantJewelleryTabOption.kt
+++ b/Server/src/main/content/global/handlers/item/EnchantJewelleryTabOption.kt
@@ -1,4 +1,4 @@
-package rs09.game.interaction.item
+package content.global.handlers.item
import core.cache.def.impl.ItemDefinition
import core.game.interaction.OptionHandler
@@ -11,7 +11,7 @@ import core.plugin.Plugin
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
import org.rs09.consts.Items
-import rs09.game.system.SystemLogger
+import core.tools.SystemLogger
private val LVL_1_ENCHANT = mapOf(
Items.SAPPHIRE_RING_1637 to Item(Items.RING_OF_RECOIL_2550),
diff --git a/Server/src/main/content/global/handlers/item/EnchantedGemListener.kt b/Server/src/main/content/global/handlers/item/EnchantedGemListener.kt
new file mode 100644
index 000000000..584b5d88c
--- /dev/null
+++ b/Server/src/main/content/global/handlers/item/EnchantedGemListener.kt
@@ -0,0 +1,66 @@
+package content.global.handlers.item
+
+import core.api.*
+import content.global.skill.slayer.Tasks
+import org.rs09.consts.Items
+import core.game.dialogue.DialogueFile
+import core.game.dialogue.IfTopic
+import core.game.dialogue.Topic
+import core.game.interaction.InteractionListener
+import core.game.interaction.IntType
+import core.tools.END_DIALOGUE
+
+class EnchantedGemListener : InteractionListener {
+ override fun defineListeners() {
+ on(Items.ENCHANTED_GEM_4155, IntType.ITEM, "activate") { player, _ ->
+ openDialogue(player, EnchantedGemDialogue())
+ return@on true
+ }
+ }
+}
+
+class EnchantedGemDialogue() : DialogueFile() {
+ var firstRun = true
+ override fun handle(interfaceId: Int, buttonId: Int) {
+ npc = getSlayerMaster(player!!)
+ when(stage) {
+ 0 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Hello there ${player!!.username}, what can I help you with?").also { stage++ }
+ 1 -> showTopics(
+ Topic(core.game.dialogue.FacialExpression.ASKING, "How am I doing so far?", 100),
+ Topic(core.game.dialogue.FacialExpression.HALF_ASKING, "Who are you?", 200),
+ Topic(core.game.dialogue.FacialExpression.HALF_ASKING, "Where are you?", 300),
+ Topic(core.game.dialogue.FacialExpression.FRIENDLY, "Got any tips for me?", 400),
+ IfTopic(core.game.dialogue.FacialExpression.FRIENDLY, "Nothing really.", END_DIALOGUE, firstRun),
+ IfTopic(core.game.dialogue.FacialExpression.HAPPY, "That's all thanks.", END_DIALOGUE, !firstRun)
+ )
+ 100 -> {
+ firstRun = false
+ if(!hasSlayerTask(player!!)) {
+ npcl(core.game.dialogue.FacialExpression.HALF_THINKING, "You need something new to hunt. Come and see me when you can and I'll give you a new task.").also { stage = 1 }
+ } else {
+ if(getSlayerTask(player!!) == Tasks.JAD) {
+ npcl(core.game.dialogue.FacialExpression.FRIENDLY, "You're currently assigned to kill TzTok-Jad!")
+ } else {
+ npcl(core.game.dialogue.FacialExpression.FRIENDLY, "You're currently assigned to kill ${getSlayerTaskName(player!!)}s; only ${getSlayerTaskKillsRemaining(player!!)} more to go.")
+ }
+ setVarbit(player!!, 2502, 0, getSlayerTaskFlags(player!!) shr 4)
+ stage = 1
+ }
+ }
+ 200 -> {
+ firstRun = false
+ npcl(core.game.dialogue.FacialExpression.HAPPY, "My name's ${getSlayerMaster(player!!).name}, I'm the Slayer Master best able to train you.").also { stage = 1 }
+ }
+ 300 -> {
+ firstRun = false
+ npcl(core.game.dialogue.FacialExpression.HAPPY, "You'll find me in ${getSlayerMasterLocation(player!!)}, I'll be here when you need a new task.").also { stage = 1 }
+ }
+ 400 -> {
+ firstRun = false
+ npc(core.game.dialogue.FacialExpression.FRIENDLY, *getSlayerTip(player!!))
+ stage++
+ }
+ 401 -> player(core.game.dialogue.FacialExpression.HAPPY, "Great, thanks!").also { stage = 1 }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Server/src/main/kotlin/rs09/game/interaction/item/EnchantedJewelleryListener.kt b/Server/src/main/content/global/handlers/item/EnchantedJewelleryListener.kt
similarity index 87%
rename from Server/src/main/kotlin/rs09/game/interaction/item/EnchantedJewelleryListener.kt
rename to Server/src/main/content/global/handlers/item/EnchantedJewelleryListener.kt
index 32480e8b7..47947ec57 100644
--- a/Server/src/main/kotlin/rs09/game/interaction/item/EnchantedJewelleryListener.kt
+++ b/Server/src/main/content/global/handlers/item/EnchantedJewelleryListener.kt
@@ -1,16 +1,16 @@
-package rs09.game.interaction.item
+package content.global.handlers.item
-import api.openDialogue
-import api.sendMessage
+import core.api.openDialogue
+import core.api.sendMessage
import core.game.node.Node
import core.game.node.entity.impl.PulseType
import core.game.node.entity.player.Player
import core.game.node.item.Item
-import rs09.game.content.dialogue.DialogueFile
-import rs09.game.content.global.EnchantedJewellery
-import rs09.game.interaction.InteractionListener
-import rs09.game.interaction.IntType
-import rs09.tools.START_DIALOGUE
+import core.game.dialogue.DialogueFile
+import content.data.EnchantedJewellery
+import core.game.interaction.InteractionListener
+import core.game.interaction.IntType
+import core.tools.START_DIALOGUE
/**
* Listener for enchanted jewellery options
diff --git a/Server/src/main/java/core/game/interaction/item/ExplorersRingPlugin.kt b/Server/src/main/content/global/handlers/item/ExplorersRingPlugin.kt
similarity index 81%
rename from Server/src/main/java/core/game/interaction/item/ExplorersRingPlugin.kt
rename to Server/src/main/content/global/handlers/item/ExplorersRingPlugin.kt
index a0d326f77..912045136 100644
--- a/Server/src/main/java/core/game/interaction/item/ExplorersRingPlugin.kt
+++ b/Server/src/main/content/global/handlers/item/ExplorersRingPlugin.kt
@@ -1,20 +1,20 @@
-package core.game.interaction.item
+package content.global.handlers.item
-import api.hasLevelStat
-import api.sendMessage
-import api.teleport
-import api.visualize
+import core.api.hasLevelStat
+import core.api.sendMessage
+import core.api.teleport
+import core.api.visualize
import core.game.node.entity.player.Player
import core.game.node.entity.player.link.TeleportManager.TeleportType
import core.game.node.entity.skill.Skills
import core.game.world.map.Location
import org.json.simple.JSONObject
import org.rs09.consts.Items
-import rs09.ServerStore
-import rs09.ServerStore.Companion.getBoolean
-import rs09.ServerStore.Companion.getInt
-import rs09.game.interaction.IntType
-import rs09.game.interaction.InteractionListener
+import core.ServerStore
+import core.ServerStore.Companion.getBoolean
+import core.ServerStore.Companion.getInt
+import core.game.interaction.IntType
+import core.game.interaction.InteractionListener
/**
* Handles the explorers ring.
@@ -28,7 +28,7 @@ class ExplorersRingPlugin : InteractionListener {
override fun defineListeners() {
- on(RINGS, IntType.ITEM, "run-replenish"){player, node ->
+ on(RINGS, IntType.ITEM, "run-replenish"){ player, node ->
val charges = getStoreFile().getInt(player.username.toLowerCase() + ":run")
if (charges >= getRingLevel(node.id)) {
sendMessage(player,"You have used all the charges you can for one day.")
@@ -44,7 +44,7 @@ class ExplorersRingPlugin : InteractionListener {
return@on true
}
- on(RINGS, IntType.ITEM, "low-alchemy"){player, _ ->
+ on(RINGS, IntType.ITEM, "low-alchemy"){ player, _ ->
if (!hasLevelStat(player, Skills.MAGIC, 21)) {
sendMessage(player,"You need a Magic level of 21 in order to do that.")
return@on true
@@ -60,12 +60,12 @@ class ExplorersRingPlugin : InteractionListener {
return@on true
}
- on(RINGS, IntType.ITEM, "cabbage-port"){player, node ->
+ on(RINGS, IntType.ITEM, "cabbage-port"){ player, node ->
teleport(player)
return@on true
}
- on(RINGS, IntType.ITEM, "operate", "rub"){player, node ->
+ on(RINGS, IntType.ITEM, "operate", "rub"){ player, node ->
if(getRingLevel(node.id) < 3){
sendMessage(player, "This item can not be operated.")
return@on true
diff --git a/Server/src/main/java/core/game/interaction/item/FaladorShieldPlugin.java b/Server/src/main/content/global/handlers/item/FaladorShieldPlugin.java
similarity index 96%
rename from Server/src/main/java/core/game/interaction/item/FaladorShieldPlugin.java
rename to Server/src/main/content/global/handlers/item/FaladorShieldPlugin.java
index 60fed09f0..4cebc31c7 100644
--- a/Server/src/main/java/core/game/interaction/item/FaladorShieldPlugin.java
+++ b/Server/src/main/content/global/handlers/item/FaladorShieldPlugin.java
@@ -1,14 +1,14 @@
-package core.game.interaction.item;
+package content.global.handlers.item;
import java.util.concurrent.TimeUnit;
import core.cache.def.impl.ItemDefinition;
import core.game.node.entity.Entity;
import core.game.system.task.Pulse;
-import rs09.game.world.GameWorld;
+import core.game.world.GameWorld;
import core.game.world.update.flag.context.Animation;
import core.game.world.update.flag.context.Graphics;
-import core.game.content.consumable.effects.PrayerEffect;
+import content.data.consumables.effects.PrayerEffect;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
import core.game.node.entity.player.Player;
diff --git a/Server/src/main/java/core/game/interaction/item/FishbowlPlugin.java b/Server/src/main/content/global/handlers/item/FishbowlPlugin.java
similarity index 98%
rename from Server/src/main/java/core/game/interaction/item/FishbowlPlugin.java
rename to Server/src/main/content/global/handlers/item/FishbowlPlugin.java
index fc15a0a55..86f1112bc 100644
--- a/Server/src/main/java/core/game/interaction/item/FishbowlPlugin.java
+++ b/Server/src/main/content/global/handlers/item/FishbowlPlugin.java
@@ -1,4 +1,4 @@
-package core.game.interaction.item;
+package content.global.handlers.item;
import core.Util;
import core.cache.def.impl.ItemDefinition;
@@ -15,10 +15,10 @@ import core.game.node.item.WeightedChanceItem;
import core.game.world.update.flag.context.Animation;
import core.plugin.Initializable;
import core.plugin.Plugin;
-import rs09.plugin.ClassScanner;
+import core.plugin.ClassScanner;
import core.tools.RandomFunction;
-import core.game.content.dialogue.DialogueInterpreter;
-import core.game.content.dialogue.DialoguePlugin;
+import core.game.dialogue.DialogueInterpreter;
+import core.game.dialogue.DialoguePlugin;
import core.game.node.entity.skill.Skills;
// Sources:
diff --git a/Server/src/main/java/core/game/interaction/item/GnomeCopterPlugin.java b/Server/src/main/content/global/handlers/item/GnomeCopterPlugin.java
similarity index 96%
rename from Server/src/main/java/core/game/interaction/item/GnomeCopterPlugin.java
rename to Server/src/main/content/global/handlers/item/GnomeCopterPlugin.java
index 3f30cd574..f3522b247 100644
--- a/Server/src/main/java/core/game/interaction/item/GnomeCopterPlugin.java
+++ b/Server/src/main/content/global/handlers/item/GnomeCopterPlugin.java
@@ -1,4 +1,4 @@
-package core.game.interaction.item;
+package content.global.handlers.item;
import core.cache.def.impl.ItemDefinition;
import core.game.container.impl.EquipmentContainer;
diff --git a/Server/src/main/java/core/game/interaction/item/GnomecopterTicket.java b/Server/src/main/content/global/handlers/item/GnomecopterTicket.java
similarity index 96%
rename from Server/src/main/java/core/game/interaction/item/GnomecopterTicket.java
rename to Server/src/main/content/global/handlers/item/GnomecopterTicket.java
index 049b1989e..49075853f 100644
--- a/Server/src/main/java/core/game/interaction/item/GnomecopterTicket.java
+++ b/Server/src/main/content/global/handlers/item/GnomecopterTicket.java
@@ -1,4 +1,4 @@
-package core.game.interaction.item;
+package content.global.handlers.item;
import core.cache.def.impl.ItemDefinition;
import core.game.component.Component;
diff --git a/Server/src/main/kotlin/rs09/game/interaction/item/GodBookListeners.kt b/Server/src/main/content/global/handlers/item/GodBookListeners.kt
similarity index 95%
rename from Server/src/main/kotlin/rs09/game/interaction/item/GodBookListeners.kt
rename to Server/src/main/content/global/handlers/item/GodBookListeners.kt
index c02f92e45..7e86ef581 100644
--- a/Server/src/main/kotlin/rs09/game/interaction/item/GodBookListeners.kt
+++ b/Server/src/main/content/global/handlers/item/GodBookListeners.kt
@@ -1,14 +1,13 @@
-package rs09.game.interaction.item
+package content.global.handlers.item
-import api.*
+import core.api.*
import core.game.node.entity.player.Player
import core.game.system.task.Pulse
import core.game.world.update.flag.context.Animation
import org.rs09.consts.Items
-import rs09.game.content.dialogue.DialogueFile
-import rs09.game.interaction.InteractionListener
-import rs09.game.interaction.IntType
-import rs09.tools.END_DIALOGUE
+import core.game.dialogue.DialogueFile
+import core.game.interaction.InteractionListener
+import core.game.interaction.IntType
class GodBookListeners : InteractionListener {
@@ -17,7 +16,7 @@ class GodBookListeners : InteractionListener {
val GB_GUTHIX = Items.BOOK_OF_BALANCE_3844
override fun defineListeners() {
- on(GB_SARADOMIN, IntType.ITEM, "preach"){player, _ ->
+ on(GB_SARADOMIN, IntType.ITEM, "preach"){ player, _ ->
openDialogue(player, HOLY_DIALOGUE(BOOK.SARA))
return@on true
}
diff --git a/Server/src/main/java/core/game/interaction/item/GodBookPlugin.java b/Server/src/main/content/global/handlers/item/GodBookPlugin.java
similarity index 93%
rename from Server/src/main/java/core/game/interaction/item/GodBookPlugin.java
rename to Server/src/main/content/global/handlers/item/GodBookPlugin.java
index 776172cf1..6bdae37f1 100644
--- a/Server/src/main/java/core/game/interaction/item/GodBookPlugin.java
+++ b/Server/src/main/content/global/handlers/item/GodBookPlugin.java
@@ -1,195 +1,195 @@
-package core.game.interaction.item;
-
-import core.game.content.dialogue.DialogueAction;
-import core.game.content.global.GodBook;
-import core.game.node.entity.skill.Skills;
-import core.game.interaction.NodeUsageEvent;
-import core.game.interaction.OptionHandler;
-import core.game.interaction.UseWithHandler;
-import core.game.node.Node;
-import core.game.node.entity.player.Player;
-import core.game.node.item.GroundItem;
-import core.game.node.item.Item;
-import core.game.node.item.ItemPlugin;
-import core.plugin.Plugin;
-import core.plugin.Initializable;
-import rs09.plugin.ClassScanner;
-
-/**
- * Handles the god books.
- * @author Vexia
- */
-@Initializable
-public class GodBookPlugin extends OptionHandler {
-
- @Override
- public Plugin