Repository reorganisation

Unified kotlin and java into just src/main
Unified the rs09 and core packages
Took all content out of the core package, and placed it into the new content package
Reorganised all source code relating to content to be easier to find and explore
This commit is contained in:
Ceikry
2023-01-26 13:59:28 +00:00
committed by Ryan
parent e4b799c44a
commit a100affda2
3156 changed files with 24205 additions and 30585 deletions
+6 -5
View File
@@ -5,7 +5,7 @@
<artifactId>server</artifactId> <artifactId>server</artifactId>
<version>1.0.0</version> <version>1.0.0</version>
<properties> <properties>
<project.mainClassName>rs09.Server</project.mainClassName> <project.mainClassName>core.Server</project.mainClassName>
<kotlin.compiler.incremental>true</kotlin.compiler.incremental> <kotlin.compiler.incremental>true</kotlin.compiler.incremental>
<kotlin.version>1.6.21</kotlin.version> <kotlin.version>1.6.21</kotlin.version>
<kotlin.comipler.jvmTarget>1.6</kotlin.comipler.jvmTarget> <kotlin.comipler.jvmTarget>1.6</kotlin.comipler.jvmTarget>
@@ -93,6 +93,8 @@
</dependencies> </dependencies>
<build> <build>
<sourceDirectory>src/main</sourceDirectory>
<testSourceDirectory>src/test</testSourceDirectory>
<plugins> <plugins>
<!-- Installs our local dependencies (const/extension libraries) to a local maven repo) --> <!-- Installs our local dependencies (const/extension libraries) to a local maven repo) -->
@@ -173,8 +175,7 @@
</goals> </goals>
<configuration> <configuration>
<sourceDirs> <sourceDirs>
<sourceDir>${project.basedir}/src/main/kotlin</sourceDir> <sourceDir>${project.basedir}/src/main</sourceDir>
<sourceDir>${project.basedir}/src/main/java</sourceDir>
</sourceDirs> </sourceDirs>
</configuration> </configuration>
</execution> </execution>
@@ -258,7 +259,7 @@
<artifactId>exec-maven-plugin</artifactId> <artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version> <version>1.2.1</version>
<configuration> <configuration>
<mainClass>rs09.Server</mainClass> <mainClass>core.Server</mainClass>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
@@ -278,7 +279,7 @@
classname="io.gitlab.arturbosch.detekt.cli.Main" classname="io.gitlab.arturbosch.detekt.cli.Main"
classpathref="maven.plugin.classpath"> classpathref="maven.plugin.classpath">
<arg value="--input"/> <arg value="--input"/>
<arg value="${basedir}/src/main/kotlin"/> <arg value="${basedir}/src/main"/>
<arg value="--excludes"/> <arg value="--excludes"/>
<arg value="**/special/package/internal/**"/> <arg value="**/special/package/internal/**"/>
<arg value="--report"/> <arg value="--report"/>
@@ -1,4 +1,4 @@
package core.game.content.global; package content.data;
import core.game.node.entity.player.Player; import core.game.node.entity.player.Player;
@@ -1,4 +1,4 @@
package core.game.content.global; package content.data;
import core.game.node.item.Item; import core.game.node.item.Item;
@@ -1,8 +1,9 @@
package rs09.game.content.global package content.data
import api.* import content.global.skill.magic.TeleportMethod
import api.events.TeleportEvent import content.global.skill.slayer.SlayerManager.Companion.getInstance
import core.game.content.dialogue.FacialExpression import core.api.*
import core.game.event.TeleportEvent
import core.game.node.entity.player.Player import core.game.node.entity.player.Player
import core.game.node.entity.player.link.TeleportManager import core.game.node.entity.player.link.TeleportManager
import core.game.node.entity.player.link.audio.Audio 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.Animation
import core.game.world.update.flag.context.Graphics import core.game.world.update.flag.context.Graphics
import org.rs09.consts.Items import org.rs09.consts.Items
import rs09.game.node.entity.skill.magic.TeleportMethod import core.game.world.GameWorld.Pulser
import rs09.game.node.entity.skill.slayer.SlayerManager.Companion.getInstance
import rs09.game.world.GameWorld.Pulser
import java.util.* import java.util.*
/** /**
@@ -275,12 +274,12 @@ enum class EnchantedJewellery(
val slayerManager = getInstance(player) val slayerManager = getInstance(player)
if (!slayerManager.hasTask()) { if (!slayerManager.hasTask()) {
sendNPCDialogue(player, slayerManager.master!!.npc, "You need something new to hunt. Come and " + 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 return
} }
sendNPCDialogue(player, slayerManager.master!!.npc, "You're currently " + sendNPCDialogue(player, slayerManager.master!!.npc, "You're currently " +
"assigned to kill ${getSlayerTaskName(player).lowercase(Locale.getDefault())}'s; " + "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 // Slayer tracker UI
setVarbit(player, 2502, 0, slayerManager.flags.taskFlags shr 4) setVarbit(player, 2502, 0, slayerManager.flags.taskFlags shr 4)
} }
@@ -1,4 +1,4 @@
package core.game.content.global; package content.data;
import core.game.node.entity.player.Player; import core.game.node.entity.player.Player;
import core.game.node.item.Item; import core.game.node.item.Item;
@@ -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.entity.player.Player;
import core.game.node.item.GroundItem; import core.game.node.item.GroundItem;
import core.game.node.item.GroundItemManager; import core.game.node.item.GroundItemManager;
import core.game.node.item.Item; import core.game.node.item.Item;
import core.game.node.scenery.Scenery; import core.game.node.scenery.Scenery;
import core.game.system.task.Pulse; 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.Location;
import core.game.world.update.flag.context.Animation; import core.game.world.update.flag.context.Animation;
import core.tools.StringUtils; import core.tools.StringUtils;
@@ -1,4 +1,4 @@
package core.game.content.global; package content.data;
import core.game.node.item.Item; import core.game.node.item.Item;
@@ -1,4 +1,4 @@
package core.game.content.global; package content.data;
import core.game.node.entity.player.Player; import core.game.node.entity.player.Player;
import core.game.node.item.Item; import core.game.node.item.Item;
@@ -1,6 +1,4 @@
package core.game.content.global package content.data
import java.util.ArrayList
enum class MeatState { enum class MeatState {
INEDIBLE_RAW, INEDIBLE_RAW,
@@ -1,4 +1,4 @@
package core.game.content.global; package content.data;
import core.game.node.item.Item; import core.game.node.item.Item;
@@ -1,397 +1,397 @@
package core.game.content.consumable; package content.data.consumables;
import org.rs09.consts.Items; import content.data.consumables.effects.*;
import core.game.node.entity.player.link.diary.DiaryType; import core.game.consumable.*;
import core.game.node.entity.state.EntityState; import org.rs09.consts.Items;
import core.game.world.update.flag.context.Animation; import core.game.node.entity.player.link.diary.DiaryType;
import core.game.content.consumable.effects.*; import core.game.node.entity.state.EntityState;
import core.game.node.entity.skill.Skills; import core.game.world.update.flag.context.Animation;
import rs09.game.content.consumable.effects.KegOfBeerEffect; import core.game.node.entity.skill.Skills;
import rs09.game.content.consumable.effects.RestoreSummoningSpecial; import content.data.consumables.effects.KegOfBeerEffect;
import java.util.HashMap; import java.util.HashMap;
/** /**
* Represents a repository of active consumables in the framework. * Represents a repository of active consumables in the framework.
*/ */
public enum Consumables { public enum Consumables {
/** Meats */ /** Meats */
COOKED_MEAT(new Food(new int[] {2142}, new HealingEffect(3))), COOKED_MEAT(new Food(new int[] {2142}, new HealingEffect(3))),
SHRIMPS(new Food(new int[] {315}, new HealingEffect(3))), SHRIMPS(new Food(new int[] {315}, new HealingEffect(3))),
COOKED_CHICKEN(new Food(new int[] {2140}, new HealingEffect(3))), COOKED_CHICKEN(new Food(new int[] {2140}, new HealingEffect(3))),
COOKED_RABBIT(new Food(new int[] {3228}, new HealingEffect(5))), COOKED_RABBIT(new Food(new int[] {3228}, new HealingEffect(5))),
ANCHOVIES(new Food(new int[] {319}, new HealingEffect(1))), ANCHOVIES(new Food(new int[] {319}, new HealingEffect(1))),
SARDINE(new Food(new int[] {325}, new HealingEffect(4))), SARDINE(new Food(new int[] {325}, new HealingEffect(4))),
POISON_KARAMBWAN(new Food(new int[] {3146}, new PoisonKarambwanEffect())), POISON_KARAMBWAN(new Food(new int[] {3146}, new PoisonKarambwanEffect())),
UGTHANKI_MEAT(new Food(new int[] {1861}, new HealingEffect(3))), UGTHANKI_MEAT(new Food(new int[] {1861}, new HealingEffect(3))),
HERRING(new Food(new int[] {347}, new HealingEffect(5))), HERRING(new Food(new int[] {347}, new HealingEffect(5))),
MACKEREL(new Food(new int[] {355}, new HealingEffect(6))), MACKEREL(new Food(new int[] {355}, new HealingEffect(6))),
ROAST_BIRD_MEAT(new Food(new int[] {9980}, new HealingEffect(6))), ROAST_BIRD_MEAT(new Food(new int[] {9980}, new HealingEffect(6))),
THIN_SNAIL(new Food(new int[] {3369}, new HealingEffect(5))), THIN_SNAIL(new Food(new int[] {3369}, new HealingEffect(5))),
TROUT(new Food(new int[] {333}, new HealingEffect(7))), TROUT(new Food(new int[] {333}, new HealingEffect(7))),
SPIDER_ON_STICK(new Food(new int[] {6297, 6305}, 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))), SPIDER_ON_SHAFT(new Food(new int[] {6299}, new HealingEffect(7))),
ROAST_RABBIT(new Food(new int[] {7223}, new HealingEffect(7))), ROAST_RABBIT(new Food(new int[] {7223}, new HealingEffect(7))),
LEAN_SNAIL(new Food(new int[] {3371}, new HealingEffect(8))), LEAN_SNAIL(new Food(new int[] {3371}, new HealingEffect(8))),
COD(new Food(new int[] {339}, new HealingEffect(7))), COD(new Food(new int[] {339}, new HealingEffect(7))),
PIKE(new Food(new int[] {351}, new HealingEffect(8))), PIKE(new Food(new int[] {351}, new HealingEffect(8))),
ROAST_BEAST_MEAT(new Food(new int[] {9988}, 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))), 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))), FAT_SNAIL(new Food(new int[] {3373}, new HealingEffect(9))),
SALMON(new Food(new int[] {329}, new HealingEffect(9))), SALMON(new Food(new int[] {329}, new HealingEffect(9))),
SLIMY_EEL(new Food(new int[] {3381}, new HealingEffect(6))), SLIMY_EEL(new Food(new int[] {3381}, new HealingEffect(6))),
TUNA(new Food(new int[] {361}, new HealingEffect(10))), TUNA(new Food(new int[] {361}, new HealingEffect(10))),
COOKED_KARAMBWAN(new Food(new int[] {3144}, new HealingEffect(18))), COOKED_KARAMBWAN(new Food(new int[] {3144}, new HealingEffect(18))),
COOKED_CHOMPY(new Food(new int[] {2878}, new HealingEffect(10))), COOKED_CHOMPY(new Food(new int[] {2878}, new HealingEffect(10))),
RAINBOW_FISH(new Food(new int[] {10136}, new HealingEffect(11))), RAINBOW_FISH(new Food(new int[] {10136}, new HealingEffect(11))),
CAVE_EEL(new Food(new int[] {5003}, new HealingEffect(7))), CAVE_EEL(new Food(new int[] {5003}, new HealingEffect(7))),
LOBSTER(new Food(new int[] {379}, new HealingEffect(12))), LOBSTER(new Food(new int[] {379}, new HealingEffect(12))),
COOKED_JUBBLY(new Food(new int[] {7568}, new HealingEffect(15))), COOKED_JUBBLY(new Food(new int[] {7568}, new HealingEffect(15))),
BASS(new Food(new int[] {365}, new HealingEffect(13))), BASS(new Food(new int[] {365}, new HealingEffect(13))),
SWORDFISH(new Food(new int[] {373}, new HealingEffect(14))), SWORDFISH(new Food(new int[] {373}, new HealingEffect(14))),
LAVA_EEL(new Food(new int[] {2149}, new HealingEffect(14))), LAVA_EEL(new Food(new int[] {2149}, new HealingEffect(14))),
MONKFISH(new Food(new int[] {7946}, new HealingEffect(16))), MONKFISH(new Food(new int[] {7946}, new HealingEffect(16))),
SHARK(new Food(new int[] {385}, new HealingEffect(20))), SHARK(new Food(new int[] {385}, new HealingEffect(20))),
SEA_TURTLE(new Food(new int[] {397}, new HealingEffect(21))), SEA_TURTLE(new Food(new int[] {397}, new HealingEffect(21))),
MANTA_RAY(new Food(new int[] {391}, new HealingEffect(22))), MANTA_RAY(new Food(new int[] {391}, new HealingEffect(22))),
KARAMBWANJI(new Food(new int[] {3151}, new HealingEffect(3))), 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.")), 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))), CRAYFISH(new Food(new int[] {13433}, new HealingEffect(2))),
GIANT_FROG_LEGS(new Food(new int [] {4517}, new HealingEffect(6))), GIANT_FROG_LEGS(new Food(new int [] {4517}, new HealingEffect(6))),
/** Breads */ /** Breads */
BREAD(new Food(new int[] {2309}, new HealingEffect(5))), BREAD(new Food(new int[] {2309}, new HealingEffect(5))),
BAGUETTE(new Food(new int[] {6961}, new HealingEffect(6))), BAGUETTE(new Food(new int[] {6961}, new HealingEffect(6))),
/** Sandwiches */ /** Sandwiches */
TRIANGLE_SANDWICH(new Food(new int[] {6962}, new HealingEffect(6))), TRIANGLE_SANDWICH(new Food(new int[] {6962}, new HealingEffect(6))),
SQUARE_SANDWICH(new Food(new int[] {6965}, 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."})), 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))), FROGBURGER(new Food(new int[] {10962}, new HealingEffect(2))),
/** Kebabs */ /** Kebabs */
UGTHANKI_KEBAB(new Food(new int[] {1883}, new UgthankiKebabEffect())), UGTHANKI_KEBAB(new Food(new int[] {1883}, new UgthankiKebabEffect())),
UGTHANKI_KEBAB_SMELLING(new Food(new int[] {1885}, new SmellingUgthankiKebabEffect())), UGTHANKI_KEBAB_SMELLING(new Food(new int[] {1885}, new SmellingUgthankiKebabEffect())),
KEBAB(new Food(new int[] {1971}, new KebabEffect())), KEBAB(new Food(new int[] {1971}, new KebabEffect())),
SUPER_KEBAB(new Food(new int[] {4608}, new SuperKebabEffect())), SUPER_KEBAB(new Food(new int[] {4608}, new SuperKebabEffect())),
/** Pies */ /** Pies */
REDBERRY_PIE(new HalfableFood(new int[] {2325, 2333, 2313}, new HealingEffect(5))), REDBERRY_PIE(new HalfableFood(new int[] {2325, 2333, 2313}, new HealingEffect(5))),
MEAT_PIE(new HalfableFood(new int[] {2327, 2331, 2313}, new HealingEffect(6))), MEAT_PIE(new HalfableFood(new int[] {2327, 2331, 2313}, new HealingEffect(6))),
APPLE_PIE(new HalfableFood(new int[] {2323, 2335, 2313}, new HealingEffect(7))), 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)))), 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)))), 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)))), 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)))), 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)))), SUMMER_PIE(new HalfableFood(new int[] {7218, 7220, 2313}, new MultiEffect(new HealingEffect(11), new SkillEffect(Skills.AGILITY, 5, 0), new EnergyEffect(10)))),
/** Stews */ /** Stews */
STEW(new Food(new int[] {2003, 1923}, new HealingEffect(11))), STEW(new Food(new int[] {2003, 1923}, new HealingEffect(11))),
SPICY_STEW(new Food(new int[] {7479, 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))), CURRY(new Food(new int[] {2011, 1923}, new HealingEffect(19))),
BANANA_STEW(new Food(new int[] {4016, 1923}, new HealingEffect(11))), BANANA_STEW(new Food(new int[] {4016, 1923}, new HealingEffect(11))),
/** Pizzas */ /** Pizzas */
PLAIN_PIZZA(new HalfableFood(new int[] {2289, 2291}, new HealingEffect(7))), PLAIN_PIZZA(new HalfableFood(new int[] {2289, 2291}, new HealingEffect(7))),
MEAT_PIZZA(new HalfableFood(new int[] {2293, 2295}, new HealingEffect(8))), MEAT_PIZZA(new HalfableFood(new int[] {2293, 2295}, new HealingEffect(8))),
ANCHOVY_PIZZA(new HalfableFood(new int[] {2297, 2299}, new HealingEffect(9))), ANCHOVY_PIZZA(new HalfableFood(new int[] {2297, 2299}, new HealingEffect(9))),
PINEAPPLE_PIZZA(new HalfableFood(new int[] {2301, 2303}, new HealingEffect(11))), PINEAPPLE_PIZZA(new HalfableFood(new int[] {2301, 2303}, new HealingEffect(11))),
/** Cakes */ /** 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.")), 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.")), 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.")), 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.")), 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.")), 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))), COOKED_FISHCAKE(new Food(new int[] {7530}, new HealingEffect(11))),
MINT_CAKE(new Food(new int[] {9475}, new EnergyEffect(50))), MINT_CAKE(new Food(new int[] {9475}, new EnergyEffect(50))),
/** Vegetables */ /** Vegetables */
POTATO(new Food(new int[] {1942}, new HealingEffect(1))), POTATO(new Food(new int[] {1942}, new HealingEffect(1))),
BAKED_POTATO(new Food(new int[] {6701}, new HealingEffect(2))), BAKED_POTATO(new Food(new int[] {6701}, new HealingEffect(2))),
SPICY_SAUCE(new Food(new int[] {7072, 1923}, 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))), CHILLI_CON_CARNE(new Food(new int[] {7062, 1923}, new HealingEffect(5))),
SCRAMBLED_EGG(new Food(new int[] {7078, 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))), 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)))), 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)))), 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))), POTATO_WITH_BUTTER(new Food(new int[] {6703}, new HealingEffect(7))),
CHILLI_POTATO(new Food(new int[] {7054}, new HealingEffect(14))), CHILLI_POTATO(new Food(new int[] {7054}, new HealingEffect(14))),
FRIED_ONIONS(new Food(new int[] {7084, 1923}, new HealingEffect(5))), FRIED_ONIONS(new Food(new int[] {7084, 1923}, new HealingEffect(5))),
FRIED_MUSHROOMS(new Food(new int[] {7082, 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))), POTATO_WITH_CHEESE(new Food(new int[] {6705}, new HealingEffect(16))),
EGG_POTATO(new Food(new int[] {7056}, new HealingEffect(11))), EGG_POTATO(new Food(new int[] {7056}, new HealingEffect(11))),
MUSHROOMS_AND_ONIONS(new Food(new int[] {7066, 1923}, 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))), MUSHROOM_POTATO(new Food(new int[] {7058}, new HealingEffect(20))),
TUNA_AND_CORN(new Food(new int[] {7068, 1923}, new HealingEffect(13))), TUNA_AND_CORN(new Food(new int[] {7068, 1923}, new HealingEffect(13))),
TUNA_POTATO(new Food(new int[] {7060}, new HealingEffect(22))), 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.")), 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!")), 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.")), 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))), EVIL_TURNIP(new Food(new int[] {12134, 12136, 12138}, new HealingEffect(6))),
SPINACH_ROLL(new Food(new int[] {1969}, new HealingEffect(2))), SPINACH_ROLL(new Food(new int[] {1969}, new HealingEffect(2))),
/** Dairies */ /** Dairies */
POT_OF_CREAM(new Food(new int[] {2130}, new HealingEffect(1))), POT_OF_CREAM(new Food(new int[] {2130}, new HealingEffect(1))),
CHEESE(new Food(new int[] {1985}, new HealingEffect(2))), CHEESE(new Food(new int[] {1985}, new HealingEffect(2))),
CHOCOLATEY_MILK(new Drink(new int[] {1977, 1925}, new HealingEffect(4))), CHOCOLATEY_MILK(new Drink(new int[] {1977, 1925}, new HealingEffect(4))),
/** Fruits */ /** Fruits */
BANANA(new Food(new int[] {1963}, new HealingEffect(2))), BANANA(new Food(new int[] {1963}, new HealingEffect(2))),
SLICED_BANANA(new Food(new int[] {3162}, 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.")), 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.")), 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(new Food(new int[] {2108}, new HealingEffect(2))),
ORANGE_CHUNKS(new Food(new int[] {2110}, new HealingEffect(2))), ORANGE_CHUNKS(new Food(new int[] {2110}, new HealingEffect(2))),
ORANGE_SLICES(new Food(new int[] {2112}, new HealingEffect(2))), ORANGE_SLICES(new Food(new int[] {2112}, new HealingEffect(2))),
PAPAYA_FRUIT(new Food(new int[] {5972}, 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."})), 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(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_CHUNKS(new Food(new int[] {2116}, new HealingEffect(2))),
PINEAPPLE_RING(new Food(new int[] {2118}, new HealingEffect(2))), PINEAPPLE_RING(new Food(new int[] {2118}, new HealingEffect(2))),
DWELLBERRIES(new Food(new int[] {2126}, 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)))), 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)))), STRAWBERRY(new Food(new int[] {5504}, new MultiEffect(new HealingEffect(1), new PercentageHealthEffect(6)))),
TOMATO(new Food(new int[] {1982}, new HealingEffect(2))), 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(new FakeConsumable(5982, new String[] {"Try using a knife to slice it into pieces."})),
WATERMELON_SLICE(new Food(new int[] {5984}, new PercentageHealthEffect(5))), WATERMELON_SLICE(new Food(new int[] {5984}, new PercentageHealthEffect(5))),
LEMON(new Food(new int[] {2102}, new HealingEffect(2))), LEMON(new Food(new int[] {2102}, new HealingEffect(2))),
LEMON_CHUNKS(new Food(new int[] {2104}, new HealingEffect(2))), LEMON_CHUNKS(new Food(new int[] {2104}, new HealingEffect(2))),
LEMON_SLICES(new Food(new int[] {2106}, new HealingEffect(2))), LEMON_SLICES(new Food(new int[] {2106}, new HealingEffect(2))),
LIME(new Food(new int[] {2120}, new HealingEffect(2))), LIME(new Food(new int[] {2120}, new HealingEffect(2))),
LIME_CHUNKS(new Food(new int[] {2122}, new HealingEffect(2))), LIME_CHUNKS(new Food(new int[] {2122}, new HealingEffect(2))),
LIME_SLICES(new Food(new int[] {2124}, new HealingEffect(2))), LIME_SLICES(new Food(new int[] {2124}, new HealingEffect(2))),
PEACH(new Food(new int[] {6883}, new HealingEffect(8))), 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)))), 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)))), STRANGE_FRUIT(new Food(new int[] {464}, new MultiEffect(new RemoveStateEffect(EntityState.POISONED.ordinal()), new EnergyEffect(30)))),
/** Gnome Cooking */ /** Gnome Cooking */
TOAD_CRUNCHIES(new Food(new int[] {2217}, new HealingEffect(12))), TOAD_CRUNCHIES(new Food(new int[] {2217}, new HealingEffect(12))),
PREMADE_TD_CRUNCH(new Food(new int[] {2243}, new HealingEffect(12))), PREMADE_TD_CRUNCH(new Food(new int[] {2243}, new HealingEffect(12))),
SPICY_CRUNCHIES(new Food(new int[] {2213}, new HealingEffect(7))), SPICY_CRUNCHIES(new Food(new int[] {2213}, new HealingEffect(7))),
PREMADE_SY_CRUNCH(new Food(new int[] {2241}, new HealingEffect(7))), PREMADE_SY_CRUNCH(new Food(new int[] {2241}, new HealingEffect(7))),
WORM_CRUNCHIES(new Food(new int[] {2205}, new HealingEffect(8))), WORM_CRUNCHIES(new Food(new int[] {2205}, new HealingEffect(8))),
PREMADE_WM_CRUNC(new Food(new int[] {2237}, new HealingEffect(8))), PREMADE_WM_CRUNC(new Food(new int[] {2237}, new HealingEffect(8))),
CHOCCHIP_CRUNCHIES(new Food(new int[] {2209}, new HealingEffect(7))), CHOCCHIP_CRUNCHIES(new Food(new int[] {2209}, new HealingEffect(7))),
PREMADE_CH_CRUNCH(new Food(new int[] {2239}, new HealingEffect(7))), PREMADE_CH_CRUNCH(new Food(new int[] {2239}, new HealingEffect(7))),
FRUIT_BATTA(new Food(new int[] {2277}, new HealingEffect(11))), FRUIT_BATTA(new Food(new int[] {2277}, new HealingEffect(11))),
PREMADE_FRT_BATTA(new Food(new int[] {2225}, new HealingEffect(11))), PREMADE_FRT_BATTA(new Food(new int[] {2225}, new HealingEffect(11))),
TOAD_BATTA(new Food(new int[] {2255}, new HealingEffect(11))), TOAD_BATTA(new Food(new int[] {2255}, new HealingEffect(11))),
PREMADE_TD_BATTA(new Food(new int[] {2221}, new HealingEffect(11))), PREMADE_TD_BATTA(new Food(new int[] {2221}, new HealingEffect(11))),
WORM_BATTA(new Food(new int[] {2253}, new HealingEffect(11))), WORM_BATTA(new Food(new int[] {2253}, new HealingEffect(11))),
PREMADE_WM_BATTA(new Food(new int[] {2219}, new HealingEffect(11))), PREMADE_WM_BATTA(new Food(new int[] {2219}, new HealingEffect(11))),
VEGETABLE_BATTA(new Food(new int[] {2281}, new HealingEffect(11))), VEGETABLE_BATTA(new Food(new int[] {2281}, new HealingEffect(11))),
PREMADE_VEG_BATTA(new Food(new int[] {2227}, 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))), CHEESE_AND_TOMATOES_BATTA(new Food(new int[] {2259}, new HealingEffect(11))),
PREMADE_CT_BATTA(new Food(new int[] {2223}, new HealingEffect(11))), PREMADE_CT_BATTA(new Food(new int[] {2223}, new HealingEffect(11))),
WORM_HOLE(new Food(new int[] {2191}, new HealingEffect(12))), WORM_HOLE(new Food(new int[] {2191}, new HealingEffect(12))),
PREMADE_WORM_HOLE(new Food(new int[] {2233}, new HealingEffect(12))), PREMADE_WORM_HOLE(new Food(new int[] {2233}, new HealingEffect(12))),
VEG_BALL(new Food(new int[] {2195}, new HealingEffect(12))), VEG_BALL(new Food(new int[] {2195}, new HealingEffect(12))),
PREMADE_VEG_BALL(new Food(new int[] {2235}, 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))), TANGLED_TOADS_LEGS(new Food(new int[] {2187}, new HealingEffect(15))),
PREMADE_TTL(new Food(new int[] {2231}, new HealingEffect(15))), PREMADE_TTL(new Food(new int[] {2231}, new HealingEffect(15))),
CHOCOLATE_BOMB(new Food(new int[] {2195}, new HealingEffect(15))), CHOCOLATE_BOMB(new Food(new int[] {2195}, new HealingEffect(15))),
PREMADE_CHOC_BOMB(new Food(new int[] {2229}, new HealingEffect(15))), PREMADE_CHOC_BOMB(new Food(new int[] {2229}, new HealingEffect(15))),
TOAD_LEGS(new Food(new int[] {2152}, new HealingEffect(3))), TOAD_LEGS(new Food(new int[] {2152}, new HealingEffect(3))),
KING_WORM(new Food(new int[] {2162}, new HealingEffect(2))), KING_WORM(new Food(new int[] {2162}, new HealingEffect(2))),
/** Ales */ /** Ales */
ASGOLDIAN_ALE(new FakeConsumable(7508, new String[] {"I don't think I'd like gold in beer thanks. Leave it for the dwarves."})), 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(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_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(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))), 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(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_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(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))), 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.")), 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(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.")), 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.")), 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(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_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(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))), 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(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))), 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))))), 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))), 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(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_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(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))), 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(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_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(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))), 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(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_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(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))), 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)))), 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(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_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(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))), 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(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_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(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))), 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.")), 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())), MATURE_WMB(new Drink(new int[] {5741, 1919}, new MatureWmbEffect())),
/** Cocktails */ /** Cocktails */
FRUIT_BLAST(new Drink(new int[] {2084, 2026}, new HealingEffect(9))), FRUIT_BLAST(new Drink(new int[] {2084, 2026}, new HealingEffect(9))),
PREMADE_FR_BLAST(new Food(new int[] {2034, 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.")), 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.")), 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)))), 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)))), 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)))), 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)))), 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)))), 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)))), 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)))), 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)))), 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)))), 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)))), 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 */ /** 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)))), 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.")), 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_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))), 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)))), 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)))), 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)))), 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)))), 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)))), BOTTLE_OF_WINE(new Drink(new int[] {2015, 7921}, new MultiEffect(new HealingEffect(14), new SkillEffect(Skills.ATTACK, -3, 0)))),
/** Wine */ /** Wine */
JUG_OF_WINE(new Drink(new int[] {1993, 1935}, new MultiEffect(new HealingEffect(11), new SkillEffect(Skills.ATTACK, -2, 0)))), 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))), HALF_FULL_WINE_JUG(new Drink(new int[] {1989, 1935}, new HealingEffect(7))),
/** Tea */ /** 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(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_NETTLE(new Drink(new int[] {4242, 1980}, new EnergyEffect(10))),
CUP_OF_TEA_MILKY_NETTLE(new Drink(new int[] {4243, 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(new Drink(new int[] {4239, 1980}, new NettleTeaEffect())),
NETTLE_TEA_MILKY(new Drink(new int[] {4240, 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(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_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(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_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(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))), CUP_OF_TEA_GOLD_MILKY(new Drink(new int[] {7737, 7735}, new SkillEffect(Skills.CONSTRUCTION, 3, 0))),
/** Miscellaneous */ /** Miscellaneous */
CHOCOLATE_BAR(new Food(new int[] {1973}, new HealingEffect(3))), CHOCOLATE_BAR(new Food(new int[] {1973}, new HealingEffect(3))),
PURPLE_SWEETS(new Food(new int[] {4561}, new HealingEffect(0))), 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.")), 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))), FIELD_RATION(new Food(new int[] {7934}, new HealingEffect(10))),
ROLL(new Food(new int[] {6963}, new HealingEffect(6))), 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_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.")), 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)))), 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))), ROE(new Food(new int[]{11324}, new HealingEffect(3))),
EQUA_LEAVES(new Food(new int[]{2128}, new HealingEffect(1))), EQUA_LEAVES(new Food(new int[]{2128}, new HealingEffect(1))),
CHOC_ICE(new Food(new int[]{6794}, new HealingEffect(6))), CHOC_ICE(new Food(new int[]{6794}, new HealingEffect(6))),
EDIBLE_SEAWEED(new Food(new int[] {403}, new HealingEffect(4))), EDIBLE_SEAWEED(new Food(new int[] {403}, new HealingEffect(4))),
/** Special Events */ /** Special Events */
PUMPKIN(new Food(new int[] {1959}, new HealingEffect(14))), PUMPKIN(new Food(new int[] {1959}, new HealingEffect(14))),
EASTER_EGG(new Food(new int[] {1961}, new HealingEffect(14))), EASTER_EGG(new Food(new int[] {1961}, new HealingEffect(14))),
/** Potions */ /** Potions */
STRENGTH(new Potion(new int[] {113, 115, 117, 119}, new SkillEffect(Skills.STRENGTH, 3, 0.1))), 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))), 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))), 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))), 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))), 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_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_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))), 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[] {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[] {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())))), 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())))), 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")))), 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))), 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))), 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))), 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)))), 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)))), 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)))), 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)))), 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))), 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))), 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)))), 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)))), 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))), 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)))), 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))), 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")))), 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))), 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."})), BLAMISH_OIL(new FakeConsumable(1582, new String[] {"You know... I'd really rather not."})),
/** Barbarian Mixes */ /** Barbarian Mixes */
PRAYERMIX(new BarbarianMix(new int[] {11465, 11467}, new MultiEffect(new PrayerEffect(7, 0.25), new HealingEffect(6)))), 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)))), 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)))), 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)))), 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)))), 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)))), 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)))), 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)))), 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)))), 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)))), 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)))), 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)))), 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)))), 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)))), 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)))), 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)))), SUPER_STR_MIX(new BarbarianMix(new int[] {11485, 11487}, new MultiEffect(new SkillEffect(Skills.STRENGTH, 5, 0.15), new HealingEffect(6)))),
/** Stealing creation potions */ /** Stealing creation potions */
SC_PRAYER(new Potion(new int[] {14207, 14209, 14211, 14213, 14215}, new PrayerEffect(7, 0.25))), 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_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_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_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_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_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_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))); SC_SUMMONING(new Potion(new int[] {14277, 14279, 14281, 14283, 14285}, new SummoningEffect(7, 0.25)));
public static HashMap<Integer,Consumable> consumables = new HashMap<>(); public static HashMap<Integer,Consumable> consumables = new HashMap<>();
private final Consumable consumable; private final Consumable consumable;
Consumables(Consumable consumable) { Consumables(Consumable consumable) {
this.consumable = consumable; this.consumable = consumable;
} }
public Consumable getConsumable() { public Consumable getConsumable() {
return consumable; return consumable;
} }
public static Consumable getConsumableById(final int itemId) { public static Consumable getConsumableById(final int itemId) {
return consumables.get(itemId); return consumables.get(itemId);
} }
public static void add(final Consumable consumable) { public static void add(final Consumable consumable) {
for (int id : consumable.getIds()) { for (int id : consumable.getIds()) {
consumables.putIfAbsent(id, consumable); consumables.putIfAbsent(id, consumable);
} }
} }
/* /*
Static modifier used to populate search engine lists. Static modifier used to populate search engine lists.
*/ */
static { static {
for (Consumables consumable : Consumables.values()) { for (Consumables consumable : Consumables.values()) {
add(consumable.consumable); add(consumable.consumable);
} }
} }
} }
@@ -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.Player;
import core.game.node.entity.player.link.diary.DiaryType; 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 { public class AchievementEffect extends ConsumableEffect {
private final DiaryType diary; private final DiaryType diary;
@@ -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.combat.ImpactHandler;
import core.game.node.entity.player.Player; import core.game.node.entity.player.Player;
import core.game.content.consumable.ConsumableEffect;
public class DamageEffect extends ConsumableEffect { public class DamageEffect extends ConsumableEffect {
final double amt; final double amt;
@@ -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.node.entity.player.Player;
import core.game.content.consumable.ConsumableEffect; import core.game.consumable.ConsumableEffect;
import core.game.node.entity.skill.Skills; import core.game.node.entity.skill.Skills;
public class DraynorCabbageEffect extends ConsumableEffect { public class DraynorCabbageEffect extends ConsumableEffect {
@@ -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.node.entity.player.Player;
import core.game.content.consumable.ConsumableEffect;
public class DwarvenRockCakeEffect extends ConsumableEffect { public class DwarvenRockCakeEffect extends ConsumableEffect {
@@ -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.node.entity.player.Player;
import core.game.content.consumable.ConsumableEffect;
public class EnergyEffect extends ConsumableEffect { public class EnergyEffect extends ConsumableEffect {
double amt; double amt;
@@ -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.node.entity.player.Player;
import core.game.content.consumable.ConsumableEffect; import core.game.consumable.ConsumableEffect;
public class HealingEffect extends ConsumableEffect { public class HealingEffect extends ConsumableEffect {
int amt; int amt;
@@ -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.player.Player;
import core.tools.RandomFunction; import core.tools.RandomFunction;
import core.game.content.consumable.ConsumableEffect;
import core.game.node.entity.skill.Skills; import core.game.node.entity.skill.Skills;
/** /**
@@ -1,9 +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.content.consumable.effects.HealingEffect
import core.game.content.consumable.effects.MultiEffect
import core.game.content.consumable.effects.SkillEffect
import core.game.node.entity.player.Player import core.game.node.entity.player.Player
import core.game.node.entity.skill.Skills import core.game.node.entity.skill.Skills
@@ -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.node.entity.player.Player;
import core.game.content.consumable.ConsumableEffect;
import core.game.node.entity.skill.Skills; import core.game.node.entity.skill.Skills;
public class MatureWmbEffect extends ConsumableEffect { public class MatureWmbEffect extends ConsumableEffect {
@@ -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.node.entity.player.Player;
import core.game.content.consumable.ConsumableEffect;
public class MultiEffect extends ConsumableEffect { public class MultiEffect extends ConsumableEffect {
private ConsumableEffect[] effects; private ConsumableEffect[] effects;
@@ -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.node.entity.player.Player;
import core.game.content.consumable.ConsumableEffect;
public class NettleTeaEffect extends ConsumableEffect { public class NettleTeaEffect extends ConsumableEffect {
@@ -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.node.entity.player.Player;
import core.game.content.consumable.ConsumableEffect;
public class PercentHeal extends ConsumableEffect { public class PercentHeal extends ConsumableEffect {
int base = 0; int base = 0;
@@ -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.node.entity.player.Player;
import core.game.content.consumable.ConsumableEffect; import core.game.consumable.ConsumableEffect;
public class PercentageHealthEffect extends ConsumableEffect { public class PercentageHealthEffect extends ConsumableEffect {
@@ -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.combat.ImpactHandler;
import core.game.node.entity.player.Player; import core.game.node.entity.player.Player;
import core.game.content.consumable.ConsumableEffect;
public class PoisonEffect extends ConsumableEffect { public class PoisonEffect extends ConsumableEffect {
@@ -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.node.entity.player.Player;
import core.game.content.consumable.ConsumableEffect;
public class PoisonKarambwanEffect extends ConsumableEffect { public class PoisonKarambwanEffect extends ConsumableEffect {
@@ -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.node.entity.player.Player;
import core.game.content.consumable.ConsumableEffect;
import core.game.node.entity.skill.Skills; import core.game.node.entity.skill.Skills;
public class PrayerEffect extends ConsumableEffect { public class PrayerEffect extends ConsumableEffect {
@@ -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.player.Player;
import core.tools.RandomFunction; import core.tools.RandomFunction;
import core.game.content.consumable.ConsumableEffect;
public class RandomEnergyEffect extends ConsumableEffect { public class RandomEnergyEffect extends ConsumableEffect {
@@ -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.player.Player;
import core.tools.RandomFunction; import core.tools.RandomFunction;
import core.game.content.consumable.ConsumableEffect;
public class RandomHealthEffect extends ConsumableEffect { public class RandomHealthEffect extends ConsumableEffect {
@@ -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.Player;
import core.tools.RandomFunction; import core.tools.RandomFunction;
import core.game.content.consumable.ConsumableEffect; import core.game.consumable.ConsumableEffect;
public class RandomPrayerEffect extends ConsumableEffect { public class RandomPrayerEffect extends ConsumableEffect {
@@ -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.player.Player;
import core.tools.RandomFunction; import core.tools.RandomFunction;
import core.game.content.consumable.ConsumableEffect;
public class RandomSkillEffect extends ConsumableEffect { public class RandomSkillEffect extends ConsumableEffect {
@@ -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.player.Player;
import core.game.node.entity.state.EntityState; import core.game.node.entity.state.EntityState;
import core.game.content.consumable.ConsumableEffect;
public class RemoveStateEffect extends ConsumableEffect { public class RemoveStateEffect extends ConsumableEffect {
int state = -1; int state = -1;
@@ -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.node.entity.player.Player;
import core.game.content.consumable.ConsumableEffect; import core.game.consumable.ConsumableEffect;
import core.game.node.entity.skill.Skills; import core.game.node.entity.skill.Skills;
public class RestoreEffect extends ConsumableEffect { public class RestoreEffect extends ConsumableEffect {
@@ -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 import core.game.node.entity.player.Player
class RestoreSummoningSpecial : ConsumableEffect(){ class RestoreSummoningSpecial : ConsumableEffect(){
@@ -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.node.entity.player.Player;
import core.game.content.consumable.ConsumableEffect;
public class RockCakeEffect extends ConsumableEffect { public class RockCakeEffect extends ConsumableEffect {
@@ -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.player.Player;
import rs09.game.world.GameWorld; import core.game.world.GameWorld;
import core.game.content.consumable.ConsumableEffect;
public class SetAttributeEffect extends ConsumableEffect { public class SetAttributeEffect extends ConsumableEffect {
String attrString; String attrString;
@@ -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.node.entity.player.Player;
import core.game.content.consumable.ConsumableEffect;
import core.game.node.entity.skill.Skills; import core.game.node.entity.skill.Skills;
public class SkillEffect extends ConsumableEffect { public class SkillEffect extends ConsumableEffect {
@@ -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.player.Player;
import core.tools.RandomFunction; 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. * According to the OSRS wiki, the smelling ugthanki kebab will usually heal nothing when eaten, but sometimes heals for 9.
@@ -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.node.entity.player.Player;
import core.game.content.consumable.ConsumableEffect;
import core.game.node.entity.skill.Skills; import core.game.node.entity.skill.Skills;
public class SummoningEffect extends ConsumableEffect { public class SummoningEffect extends ConsumableEffect {
@@ -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.player.Player;
import core.tools.RandomFunction; import core.tools.RandomFunction;
import core.game.content.consumable.ConsumableEffect;
import core.game.node.entity.skill.Skills; import core.game.node.entity.skill.Skills;
@@ -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.node.entity.player.Player;
import core.game.system.task.Pulse; import core.game.system.task.Pulse;
import core.game.world.map.Location; import core.game.world.map.Location;
import core.game.content.consumable.ConsumableEffect;
public class TroubleBrewingRumEffect extends ConsumableEffect { public class TroubleBrewingRumEffect extends ConsumableEffect {
@@ -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.node.entity.player.Player;
import core.game.content.consumable.ConsumableEffect;
public class UgthankiKebabEffect extends ConsumableEffect { public class UgthankiKebabEffect extends ConsumableEffect {
@@ -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.node.entity.player.Player;
import core.game.content.consumable.ConsumableEffect;
import core.game.node.entity.skill.Skills; import core.game.node.entity.skill.Skills;
public class WizardsMindBombEffect extends ConsumableEffect { public class WizardsMindBombEffect extends ConsumableEffect {
@@ -1,4 +1,4 @@
package core.game.content.global; package content.data.skill;
/** /**
* Handles the skillcape perks. * Handles the skillcape perks.
@@ -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.skill.Skills;
import core.game.node.entity.player.Player; import core.game.node.entity.player.Player;
import core.game.node.item.Item; import core.game.node.item.Item;
import rs09.game.world.repository.Repository; import core.game.world.repository.Repository;
/** /**
* Represents the skilling pets obtained randomly. * Represents the skilling pets obtained randomly.
@@ -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.player.Player;
import core.game.node.entity.skill.Skills; import core.game.node.entity.skill.Skills;
@@ -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.Item;
import core.game.node.item.WeightedChanceItem; import core.game.node.item.WeightedChanceItem;
import core.tools.RandomFunction; import core.tools.RandomFunction;
@@ -8,8 +8,8 @@ import org.w3c.dom.Document;
import org.w3c.dom.Element; import org.w3c.dom.Element;
import org.w3c.dom.Node; import org.w3c.dom.Node;
import org.w3c.dom.NodeList; import org.w3c.dom.NodeList;
import rs09.ServerConstants; import core.ServerConstants;
import rs09.game.system.SystemLogger; import core.tools.SystemLogger;
import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.DocumentBuilderFactory;
@@ -18,7 +18,7 @@ import java.io.File;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import static rs09.game.system.SystemLogger.logInfo; import static core.tools.SystemLogger.logInfo;
/** /**
* Handles the allotment seed drop table. * Handles the allotment seed drop table.
@@ -1,4 +1,4 @@
package core.game.content.global; package content.data.tables;
import org.rs09.consts.Items; import org.rs09.consts.Items;
import core.game.node.entity.npc.drop.NPCDropTables; import core.game.node.entity.npc.drop.NPCDropTables;
@@ -1,96 +1,96 @@
package core.game.node.entity.npc.drop; package content.data.tables;
import api.StartupListener; import core.api.StartupListener;
import rs09.ServerConstants; import core.ServerConstants;
import core.game.node.item.Item; import core.game.node.item.Item;
import core.game.node.item.WeightedChanceItem; import core.game.node.item.WeightedChanceItem;
import rs09.game.system.SystemLogger; import core.tools.SystemLogger;
import core.tools.RandomFunction; import core.tools.RandomFunction;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.w3c.dom.Element; import org.w3c.dom.Element;
import org.w3c.dom.Node; import org.w3c.dom.Node;
import org.w3c.dom.NodeList; import org.w3c.dom.NodeList;
import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.ParserConfigurationException;
import java.io.File; import java.io.File;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import static rs09.game.system.SystemLogger.logInfo; 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. * 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 * @author Crash
*/ */
public final class CELEMinorTable implements StartupListener { public final class CELEMinorTable implements StartupListener {
/** /**
* The item id of the item representing the C. Ele minor drop table slot in a drop * The item id of the item representing the C. Ele minor drop table slot in a drop
* table. * 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. 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. * The rare drop table.
*/ */
private static final List<WeightedChanceItem> TABLE = new ArrayList<>(20); private static final List<WeightedChanceItem> TABLE = new ArrayList<>(20);
/** /**
* Initialize needed objects for xml reading/writing * Initialize needed objects for xml reading/writing
*/ */
static DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); static DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
static DocumentBuilder builder; static DocumentBuilder builder;
static { static {
try { try {
builder = factory.newDocumentBuilder(); builder = factory.newDocumentBuilder();
} catch (ParserConfigurationException e) { } catch (ParserConfigurationException e) {
e.printStackTrace(); e.printStackTrace();
} }
} }
public CELEMinorTable() throws ParserConfigurationException {} public CELEMinorTable() throws ParserConfigurationException {}
@Override @Override
public void startup() { public void startup() {
if(ServerConstants.CELEDT_DATA_PATH != null && !new File(ServerConstants.CELEDT_DATA_PATH).exists()){ 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); SystemLogger.logErr(this.getClass(), "Can't locate CELEDT file at " + ServerConstants.CELEDT_DATA_PATH);
return; return;
} }
parse(ServerConstants.CELEDT_DATA_PATH); parse(ServerConstants.CELEDT_DATA_PATH);
logInfo(this.getClass(), "Loaded up Chaos Elemental drop table from " + 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. * Parses the xml file for the CELEDT.
* @param file the .xml file containing the CELEDT. * @param file the .xml file containing the CELEDT.
*/ */
public static void parse(String file){ public static void parse(String file){
try { try {
Document doc = builder.parse(file); Document doc = builder.parse(file);
NodeList itemNodes = doc.getElementsByTagName("item"); NodeList itemNodes = doc.getElementsByTagName("item");
for(int i = 0; i < itemNodes.getLength(); i++){ for(int i = 0; i < itemNodes.getLength(); i++){
Node itemNode = itemNodes.item(i); Node itemNode = itemNodes.item(i);
if(itemNode.getNodeType() == Node.ELEMENT_NODE){ if(itemNode.getNodeType() == Node.ELEMENT_NODE){
Element item = (Element) itemNode; Element item = (Element) itemNode;
int itemId = Integer.parseInt(item.getAttribute("id")); int itemId = Integer.parseInt(item.getAttribute("id"));
int minAmt = Integer.parseInt(item.getAttribute("minAmt")); int minAmt = Integer.parseInt(item.getAttribute("minAmt"));
int maxAmt = Integer.parseInt(item.getAttribute("maxAmt")); int maxAmt = Integer.parseInt(item.getAttribute("maxAmt"));
int weight = Integer.parseInt(item.getAttribute("weight")); int weight = Integer.parseInt(item.getAttribute("weight"));
TABLE.add(new WeightedChanceItem(itemId,minAmt,maxAmt,weight)); TABLE.add(new WeightedChanceItem(itemId,minAmt,maxAmt,weight));
} }
} }
} catch (Exception e){ } catch (Exception e){
e.printStackTrace(); e.printStackTrace();
} }
} }
public static Item retrieve(){ public static Item retrieve(){
return RandomFunction.rollWeightedChanceTable(TABLE); return RandomFunction.rollWeightedChanceTable(TABLE);
} }
} }
@@ -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.Item;
import core.game.node.item.WeightedChanceItem; import core.game.node.item.WeightedChanceItem;
import core.tools.RandomFunction; import core.tools.RandomFunction;
@@ -8,8 +8,8 @@ import org.w3c.dom.Document;
import org.w3c.dom.Element; import org.w3c.dom.Element;
import org.w3c.dom.Node; import org.w3c.dom.Node;
import org.w3c.dom.NodeList; import org.w3c.dom.NodeList;
import rs09.ServerConstants; import core.ServerConstants;
import rs09.game.system.SystemLogger; import core.tools.SystemLogger;
import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.DocumentBuilderFactory;
@@ -18,7 +18,7 @@ import java.io.File;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import static rs09.game.system.SystemLogger.logInfo; import static core.tools.SystemLogger.logInfo;
/** /**
* Handles the gem drop table. * Handles the gem drop table.
@@ -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.Item;
import core.game.node.item.WeightedChanceItem; import core.game.node.item.WeightedChanceItem;
import core.tools.RandomFunction; import core.tools.RandomFunction;
@@ -8,8 +8,8 @@ import org.w3c.dom.Document;
import org.w3c.dom.Element; import org.w3c.dom.Element;
import org.w3c.dom.Node; import org.w3c.dom.Node;
import org.w3c.dom.NodeList; import org.w3c.dom.NodeList;
import rs09.ServerConstants; import core.ServerConstants;
import rs09.game.system.SystemLogger; import core.tools.SystemLogger;
import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.DocumentBuilderFactory;
@@ -18,7 +18,7 @@ import java.io.File;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import static rs09.game.system.SystemLogger.logInfo; import static core.tools.SystemLogger.logInfo;
/** /**
* Handles the herb drop table. * Handles the herb drop table.
@@ -1,10 +1,10 @@
package core.game.node.entity.npc.drop; package content.data.tables;
import api.StartupListener; import core.api.StartupListener;
import rs09.ServerConstants; import core.ServerConstants;
import core.game.node.item.Item; import core.game.node.item.Item;
import core.game.node.item.WeightedChanceItem; import core.game.node.item.WeightedChanceItem;
import rs09.game.system.SystemLogger; import core.tools.SystemLogger;
import core.tools.RandomFunction; import core.tools.RandomFunction;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.w3c.dom.Element; import org.w3c.dom.Element;
@@ -18,7 +18,7 @@ import java.io.File;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import static rs09.game.system.SystemLogger.logInfo; import static core.tools.SystemLogger.logInfo;
/** /**
* Handles the rare drop table. * Handles the rare drop table.
@@ -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.Item;
import core.game.node.item.WeightedChanceItem; import core.game.node.item.WeightedChanceItem;
import core.tools.RandomFunction; import core.tools.RandomFunction;
@@ -8,8 +8,8 @@ import org.w3c.dom.Document;
import org.w3c.dom.Element; import org.w3c.dom.Element;
import org.w3c.dom.Node; import org.w3c.dom.Node;
import org.w3c.dom.NodeList; import org.w3c.dom.NodeList;
import rs09.ServerConstants; import core.ServerConstants;
import rs09.game.system.SystemLogger; import core.tools.SystemLogger;
import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.DocumentBuilderFactory;
@@ -18,7 +18,7 @@ import java.io.File;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import static rs09.game.system.SystemLogger.logInfo; import static core.tools.SystemLogger.logInfo;
/** /**
* Handles the rare seed drop table. * Handles the rare seed drop table.
@@ -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.Item;
import core.game.node.item.WeightedChanceItem; import core.game.node.item.WeightedChanceItem;
import core.tools.RandomFunction; import core.tools.RandomFunction;
@@ -8,8 +8,8 @@ import org.w3c.dom.Document;
import org.w3c.dom.Element; import org.w3c.dom.Element;
import org.w3c.dom.Node; import org.w3c.dom.Node;
import org.w3c.dom.NodeList; import org.w3c.dom.NodeList;
import rs09.ServerConstants; import core.ServerConstants;
import rs09.game.system.SystemLogger; import core.tools.SystemLogger;
import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.DocumentBuilderFactory;
@@ -18,7 +18,7 @@ import java.io.File;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import static rs09.game.system.SystemLogger.logInfo; import static core.tools.SystemLogger.logInfo;
/** /**
* Handles the uncommon seed drop table. * Handles the uncommon seed drop table.
@@ -1,23 +1,23 @@
package rs09.game.content.jobs package content.global.activity.jobs
import api.* import core.api.*
import rs09.game.content.jobs.impl.GatheringJobs import content.global.activity.jobs.impl.GatheringJobs
import rs09.game.content.jobs.impl.SlayingJobs import content.global.activity.jobs.impl.SlayingJobs
import core.game.content.dialogue.FacialExpression import core.game.dialogue.FacialExpression
import core.game.node.entity.npc.NPC import core.game.node.entity.npc.NPC
import core.game.node.item.Item import core.game.node.item.Item
import org.rs09.consts.Items import org.rs09.consts.Items
import rs09.game.content.dialogue.DialogueFile import core.game.dialogue.DialogueFile
import rs09.game.content.dialogue.Topic import core.game.dialogue.Topic
import rs09.tools.END_DIALOGUE import core.tools.END_DIALOGUE
import rs09.tools.START_DIALOGUE import core.tools.START_DIALOGUE
class CancelJobDialogueFile : DialogueFile() { class CancelJobDialogueFile : DialogueFile() {
override fun handle(componentID: Int, buttonID: Int) { override fun handle(componentID: Int, buttonID: Int) {
when (stage) { when (stage) {
START_DIALOGUE -> showTopics( START_DIALOGUE -> showTopics(
Topic(FacialExpression.HALF_ASKING, "How am I doing on my job?", 1), Topic(core.game.dialogue.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_GUILTY, "I'd like to cancel my job.", 10)
) )
1 -> { 1 -> {
@@ -49,8 +49,8 @@ class CancelJobDialogueFile : DialogueFile() {
.also { stage++ } .also { stage++ }
11 -> showTopics( 11 -> showTopics(
Topic(FacialExpression.HAPPY, "Yes, please.", 20), Topic(core.game.dialogue.FacialExpression.HAPPY, "Yes, please.", 20),
Topic(FacialExpression.NEUTRAL, "No, thanks.", 30) Topic(core.game.dialogue.FacialExpression.NEUTRAL, "No, thanks.", 30)
) )
20 -> npc("Alright then, hand over the money.") 20 -> npc("Alright then, hand over the money.")
@@ -68,7 +68,7 @@ class CancelJobDialogueFile : DialogueFile() {
stage = END_DIALOGUE stage = END_DIALOGUE
} else { } else {
player( player(
FacialExpression.HALF_WORRIED, core.game.dialogue.FacialExpression.HALF_WORRIED,
"Oh, I don't seem to have the money..." "Oh, I don't seem to have the money..."
).also { stage++ } ).also { stage++ }
} }
@@ -1,15 +1,15 @@
package rs09.game.content.jobs package content.global.activity.jobs
import api.* import core.api.*
import rs09.game.content.jobs.impl.GatheringJobs import content.global.activity.jobs.impl.GatheringJobs
import rs09.game.content.jobs.impl.SlayingJobs import content.global.activity.jobs.impl.SlayingJobs
import core.game.node.entity.npc.NPC import core.game.node.entity.npc.NPC
import core.game.node.entity.player.Player import core.game.node.entity.player.Player
import core.game.node.item.Item import core.game.node.item.Item
import org.json.simple.JSONObject import org.json.simple.JSONObject
import org.rs09.consts.Items import org.rs09.consts.Items
import rs09.ServerStore import core.ServerStore
import rs09.ServerStore.Companion.getInt import core.ServerStore.Companion.getInt
object JobManager { object JobManager {
@JvmStatic @JvmStatic
@@ -1,4 +1,4 @@
package rs09.game.content.jobs package content.global.activity.jobs
enum class JobType { enum class JobType {
GATHERING, GATHERING,
@@ -1,22 +1,21 @@
package rs09.game.content.jobs package content.global.activity.jobs
import rs09.game.content.jobs.impl.GatheringJobs import content.global.activity.jobs.impl.GatheringJobs
import rs09.game.content.jobs.impl.SlayingJobs import content.global.activity.jobs.impl.SlayingJobs
import api.* import core.api.*
import api.events.EventHook import core.game.event.EventHook
import api.events.JobAssignmentEvent import core.game.event.JobAssignmentEvent
import api.events.NPCKillEvent import core.game.event.NPCKillEvent
import core.game.content.dialogue.FacialExpression
import core.game.node.entity.Entity import core.game.node.entity.Entity
import core.game.node.entity.npc.NPC import core.game.node.entity.npc.NPC
import core.game.node.entity.player.Player import core.game.node.entity.player.Player
import core.game.node.item.Item import core.game.node.item.Item
import org.rs09.consts.Items import org.rs09.consts.Items
import org.rs09.consts.NPCs import org.rs09.consts.NPCs
import rs09.ServerStore.Companion.getInt import core.ServerStore.Companion.getInt
import rs09.game.Event import core.api.Event
import rs09.game.interaction.InteractionListener import core.game.interaction.InteractionListener
import rs09.game.interaction.IntType import core.game.interaction.IntType
/** /**
* Handles the work-for actions for the NPCs * Handles the work-for actions for the NPCs
@@ -143,7 +142,7 @@ class WorkForInteractionListener : InteractionListener, LoginListener {
player, player,
node.id, node.id,
"I'm sorry, I don't currently have any jobs that you're qualified for.", "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 return@on true
} }
@@ -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.game.node.entity.skill.Skills
import core.tools.RandomFunction import core.tools.RandomFunction
@@ -1,4 +1,4 @@
package rs09.game.content.jobs.impl package content.global.activity.jobs.impl
import core.tools.RandomFunction import core.tools.RandomFunction
@@ -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.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.entity.player.Player
import core.game.node.item.Item import core.game.node.item.Item
import core.game.system.task.Pulse import core.game.system.task.Pulse
import rs09.game.world.GameWorld import core.tools.END_DIALOGUE
import rs09.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 { 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 } 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) return LarryHandler(player)
} }
@@ -43,7 +40,7 @@ class LarryHandler(player: Player? = null) : DialoguePlugin(player){
11 -> { 11 -> {
val hint = Penguin.values()[PenguinManager.penguins.random()].hint 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 stage = END_DIALOGUE
} }
@@ -1,4 +1,4 @@
package rs09.game.content.global.worldevents.penguinhns package content.global.activity.penguinhns
import core.cache.def.impl.ItemDefinition import core.cache.def.impl.ItemDefinition
import core.game.interaction.OptionHandler import core.game.interaction.OptionHandler
@@ -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 org.json.simple.JSONObject
import rs09.ServerStore import core.ServerStore
import rs09.game.content.global.worldevents.PluginSet import core.game.worldevents.PluginSet
import rs09.game.content.global.worldevents.WorldEvent import core.game.worldevents.WorldEvent
import rs09.game.content.global.worldevents.WorldEvents import core.game.world.GameWorld
import rs09.game.world.GameWorld
class PenguinHNSEvent : WorldEvent("penguin-hns"){ class PenguinHNSEvent : WorldEvent("penguin-hns"){
val manager = PenguinManager() val manager = PenguinManager()
@@ -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.npc.NPC
import core.game.node.entity.player.Player import core.game.node.entity.player.Player
import rs09.game.system.SystemLogger import core.tools.SystemLogger
import core.game.world.map.Location import core.game.world.map.Location
import org.json.simple.JSONArray import org.json.simple.JSONArray
import org.json.simple.JSONObject import org.json.simple.JSONObject
import rs09.ServerStore.Companion.toJSONArray import core.ServerStore.Companion.toJSONArray
import java.util.* import java.util.*
class PenguinManager{ class PenguinManager{
@@ -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.node.entity.npc.NPC
import core.game.world.map.Location import core.game.world.map.Location
import org.rs09.consts.NPCs import org.rs09.consts.NPCs
import rs09.game.content.global.worldevents.WorldEvents import core.game.worldevents.WorldEvents
class PenguinSpawner { class PenguinSpawner {
@@ -16,7 +16,7 @@ class PenguinSpawner {
availableOrdinals.remove(peng.ordinal) availableOrdinals.remove(peng.ordinal)
spawnedOrdinals.add(peng.ordinal) spawnedOrdinals.add(peng.ordinal)
NPC(peng.id,peng.location) 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++ counter++
} }
return spawnedOrdinals return spawnedOrdinals
@@ -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.npc.NPC
import core.game.node.entity.player.Player import core.game.node.entity.player.Player
import core.game.system.task.Pulse 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.Animation
import core.plugin.Plugin import core.game.interaction.InteractionListener
import core.game.content.quest.PluginInteraction import core.game.interaction.IntType
import core.game.content.quest.PluginInteractionManager
import rs09.game.interaction.InteractionListener
import rs09.game.interaction.IntType
class PenguinSpyingHandler : InteractionListener{ class PenguinSpyingHandler : InteractionListener {
override fun defineListeners() { override fun defineListeners() {
on(PENGUINS, IntType.NPC, "spy-on"){player, node -> on(PENGUINS, IntType.NPC, "spy-on"){ player, node ->
val npc = node.asNpc() val npc = node.asNpc()
if(PenguinManager.hasTagged(player, npc.location)){ if(PenguinManager.hasTagged(player, npc.location)){
player.sendMessage("You've already tagged this penguin.") player.sendMessage("You've already tagged this penguin.")
@@ -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.Scenery
import core.game.node.scenery.SceneryBuilder import core.game.node.scenery.SceneryBuilder
import core.game.node.entity.npc.NPC import core.game.node.entity.npc.NPC
import core.game.node.entity.player.Player import core.game.node.entity.player.Player
import core.game.world.map.Location import core.game.world.map.Location
import rs09.ServerStore.Companion.getBoolean import core.ServerStore.Companion.getBoolean
import rs09.ServerStore.Companion.getInt import core.ServerStore.Companion.getInt
import rs09.ServerStore.Companion.getString import core.ServerStore.Companion.getString
import rs09.game.ai.general.scriptrepository.ShootingStarBot import content.global.bots.ShootingStarBot
import rs09.game.world.repository.Repository import core.game.world.repository.Repository
/** /**
* Represents a shooting star object (Only ever initialized once) (ideally) * Represents a shooting star object (Only ever initialized once) (ideally)
@@ -101,7 +101,7 @@ class ShootingStar(var level: ShootingStarType = ShootingStarType.values().rando
starObject = newStar starObject = newStar
} }
private fun getNextType(): ShootingStarType{ private fun getNextType(): ShootingStarType {
return ShootingStarType.values()[level.ordinal - 1] return ShootingStarType.values()[level.ordinal - 1]
} }
@@ -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.scenery.Scenery
import core.game.node.entity.player.Player import core.game.node.entity.player.Player
import core.game.node.entity.skill.SkillPulse import core.game.node.entity.skill.SkillPulse
import core.game.node.entity.skill.Skills 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.game.node.item.Item
import core.tools.RandomFunction import core.tools.RandomFunction
import org.rs09.consts.Items import org.rs09.consts.Items
import rs09.game.world.GameWorld import core.game.world.GameWorld
import rs09.game.world.repository.Repository import core.game.world.repository.Repository
import rs09.tools.stringtools.colorize import core.tools.colorize
/** /**
* The pulse used to handle mining shooting stars. * The pulse used to handle mining shooting stars.
@@ -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.Player
import core.game.node.entity.player.link.TeleportManager import core.game.node.entity.player.link.TeleportManager
import core.game.node.entity.skill.Skills import core.game.node.entity.skill.Skills
import org.json.simple.JSONObject import org.json.simple.JSONObject
import org.rs09.consts.Items import org.rs09.consts.Items
import org.rs09.consts.Scenery import org.rs09.consts.Scenery
import rs09.ServerStore import core.ServerStore
import rs09.ServerStore.Companion.getBoolean import core.ServerStore.Companion.getBoolean
import rs09.game.content.dialogue.DialogueFile import core.game.dialogue.DialogueFile
import rs09.game.interaction.InteractionListener import core.game.interaction.InteractionListener
import rs09.game.interaction.IntType import core.game.interaction.IntType
import rs09.game.system.SystemLogger import core.tools.SystemLogger
import rs09.game.system.command.Privilege import core.game.system.command.Privilege
import rs09.game.world.GameWorld import core.game.world.GameWorld
import rs09.tools.secondsToTicks import core.tools.secondsToTicks
class ShootingStarPlugin : LoginListener, InteractionListener, TickListener, Commands, StartupListener { class ShootingStarPlugin : LoginListener, InteractionListener, TickListener, Commands, StartupListener {
override fun login(player: Player) { override fun login(player: Player) {
@@ -59,7 +59,7 @@ class ShootingStarPlugin : LoginListener, InteractionListener, TickListener, Com
return@on true 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())){ if(getRingStoreFile().getBoolean(player.username.toLowerCase())){
sendDialogue(player, "The ring is still recharging.") sendDialogue(player, "The ring is still recharging.")
return@on true return@on true
@@ -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 core.game.node.entity.player.Player
import rs09.game.node.entity.state.newsys.PlayerState import core.game.node.entity.state.PlayerState
import rs09.game.node.entity.state.newsys.State import core.game.node.entity.state.State
import core.game.system.task.Pulse import core.game.system.task.Pulse
import rs09.tools.ticksToSeconds import core.tools.ticksToSeconds
import org.json.simple.JSONObject import org.json.simple.JSONObject
@PlayerState("shooting-star") @PlayerState("shooting-star")
@@ -1,4 +1,4 @@
package core.game.content.global.worldevents.shootingstar; package content.global.activity.shootingstar;
import core.cache.def.impl.SceneryDefinition; import core.cache.def.impl.SceneryDefinition;
import core.game.component.Component; import core.game.component.Component;
@@ -8,7 +8,7 @@ import core.game.interaction.OptionHandler;
import core.game.node.Node; import core.game.node.Node;
import core.game.node.entity.player.Player; import core.game.node.entity.player.Player;
import core.plugin.Plugin; import core.plugin.Plugin;
import rs09.plugin.ClassScanner; import core.plugin.ClassScanner;
import core.plugin.PluginManifest; import core.plugin.PluginManifest;
@PluginManifest(name="ShootingStars") @PluginManifest(name="ShootingStars")
@@ -1,9 +1,7 @@
package rs09.game.content.global.worldevents.shootingstar package content.global.activity.shootingstar
import api.Container import core.api.Container
import api.* import core.api.*
import core.game.content.dialogue.DialoguePlugin
import core.game.content.dialogue.FacialExpression
import core.game.node.entity.npc.NPC import core.game.node.entity.npc.NPC
import core.game.node.entity.player.Player import core.game.node.entity.player.Player
import core.game.node.item.Item import core.game.node.item.Item
@@ -11,19 +9,18 @@ import core.plugin.Initializable
import core.tools.RandomFunction import core.tools.RandomFunction
import org.json.simple.JSONObject import org.json.simple.JSONObject
import org.rs09.consts.Items import org.rs09.consts.Items
import rs09.ServerStore import core.ServerStore
import rs09.ServerStore.Companion.getBoolean import core.ServerStore.Companion.getBoolean
import rs09.game.node.entity.state.newsys.states.ShootingStarState import core.tools.END_DIALOGUE
import rs09.tools.END_DIALOGUE import core.tools.secondsToTicks
import rs09.tools.secondsToTicks import core.tools.colorize
import rs09.tools.stringtools.colorize
import java.util.concurrent.TimeUnit import java.util.concurrent.TimeUnit
/** /**
* Dialogue for the star sprite. * Dialogue for the star sprite.
*/ */
@Initializable @Initializable
class StarSpriteDialogue(player: Player? = null) : DialoguePlugin(player) { class StarSpriteDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) {
/** /**
* The cosmic rune item id. * 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) return StarSpriteDialogue(player)
} }
override fun open(vararg args: Any): Boolean { override fun open(vararg args: Any): Boolean {
npc = args[0] as NPC npc = args[0] as NPC
if (inInventory(player, Items.ANCIENT_BLUEPRINT_14651) && !getAttribute(player, "star-ring:bp-shown", false)) { 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 stage = 1000
} else if (inInventory(player, Items.ANCIENT_BLUEPRINT_14651) && getAttribute(player, "star-ring:bp-shown", false)) { } 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 stage = 2000
} else if (getStoreFile().getBoolean(player.username.toLowerCase()) || !player.getInventory().contains(ShootingStarPlugin.STAR_DUST, 1)) { } else if (getStoreFile().getBoolean(player.username.toLowerCase()) || !player.getInventory().contains(ShootingStarPlugin.STAR_DUST, 1)) {
npc("Hello, strange creature.") npc("Hello, strange creature.")
@@ -226,36 +223,36 @@ class StarSpriteDialogue(player: Player? = null) : DialoguePlugin(player) {
52 -> end() 52 -> end()
//Inauthentic ring-based dialogue //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++ } 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++ } 1002 -> npcl(core.game.dialogue.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++ } 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(FacialExpression.ASKING, "You'd just do that for me? For free?").also { stage++ } 1004 -> playerl(core.game.dialogue.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++ } 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(FacialExpression.ASKING, "Well, thanks! So.. what do we need to make one?").also { stage++ } 1006 -> playerl(core.game.dialogue.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++ } 1007 -> npcl(core.game.dialogue.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++ } 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(FacialExpression.FRIENDLY, "Thanks, I'll get right on it!").also { stage++ } 1009 -> playerl(core.game.dialogue.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++ } 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(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) } 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(FacialExpression.FRIENDLY, "Thanks!").also { stage = END_DIALOGUE } 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)){ 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 { } 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++ } 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)){ 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) 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++ } player.dialogueInterpreter.sendItemMessage(Items.RING_OF_THE_STAR_SPRITE_14652, "The Star Sprite hands you a strange ring.").also { stage++ }
} else end() } else end()
2005 -> npcl(FacialExpression.NEUTRAL, "There you go, I hope you enjoy it!").also { stage++ } 2005 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "There you go, I hope you enjoy it!").also { stage++ }
2006 -> playerl(FacialExpression.FRIENDLY, "Thank you!").also { stage = END_DIALOGUE } 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 return true
} }
@@ -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.component.Component;
import core.game.container.access.InterfaceContainer; 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.entity.player.Player;
import core.game.node.item.ChanceItem;
import core.game.node.item.Item; import core.game.node.item.Item;
import core.game.node.item.WeightedChanceItem;
import org.rs09.consts.Items; import org.rs09.consts.Items;
import rs09.game.world.GameWorld; import core.game.world.GameWorld;
import core.tools.RandomFunction; import core.tools.RandomFunction;
import java.text.NumberFormat; import java.text.NumberFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List; 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. * A clue scroll level.
@@ -74,7 +70,7 @@ public enum ClueLevel {
long rewardValue = 0L; long rewardValue = 0L;
for (Item reward : rewards) { for (Item reward : rewards) {
api.ContentAPIKt.addItemOrDrop(player, reward.getId(), reward.getAmount()); addItemOrDrop(player, reward.getId(), reward.getAmount());
rewardValue += reward.getValue(); rewardValue += reward.getValue();
} }
@@ -1,9 +1,9 @@
package core.game.content.ttrail; package content.global.activity.ttrail;
import core.game.component.Component; import core.game.component.Component;
import core.game.node.entity.player.Player; import core.game.node.entity.player.Player;
import core.game.node.item.Item; 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.MapZone;
import core.game.world.map.zone.ZoneBorders; import core.game.world.map.zone.ZoneBorders;
import core.game.world.map.zone.ZoneBuilder; import core.game.world.map.zone.ZoneBuilder;
@@ -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.Location;
import core.plugin.Plugin; import core.plugin.Plugin;
@@ -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.npc.NPC;
import core.game.node.entity.player.Player; import core.game.node.entity.player.Player;
@@ -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.node.entity.player.link.emote.Emotes;
import core.game.world.map.zone.ZoneBorders; import core.game.world.map.zone.ZoneBorders;
import core.plugin.Plugin; import core.plugin.Plugin;
import rs09.plugin.ClassScanner; import core.plugin.ClassScanner;
/** /**
* Initializes the emote clue plugins. * Initializes the emote clue plugins.
@@ -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.npc.NPC;
import core.game.node.entity.player.Player; import core.game.node.entity.player.Player;
@@ -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.Location;
import core.game.world.map.zone.ZoneBorders; import core.game.world.map.zone.ZoneBorders;
@@ -1,7 +1,7 @@
package core.game.content.ttrail; package content.global.activity.ttrail;
import core.game.content.global.action.DigAction; import core.game.global.action.DigAction;
import core.game.content.global.action.DigSpadeHandler; import core.game.global.action.DigSpadeHandler;
import core.game.interaction.Option; import core.game.interaction.Option;
import core.game.node.Node; import core.game.node.Node;
import core.game.node.entity.Entity; import core.game.node.entity.Entity;
@@ -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.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.CombatStyle;
import core.game.node.entity.combat.equipment.SwitchAttack; import core.game.node.entity.combat.equipment.SwitchAttack;
import core.game.node.entity.npc.AbstractNPC; 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.Location;
import core.game.world.map.RegionManager; import core.game.world.map.RegionManager;
import core.plugin.Plugin; import core.plugin.Plugin;
import rs09.game.node.entity.combat.CombatSwingHandler; import core.game.node.entity.combat.CombatSwingHandler;
import rs09.game.node.entity.combat.handlers.MultiSwingHandler; import core.game.node.entity.combat.MultiSwingHandler;
/** /**
* Handles saradomin npc. * Handles saradomin npc.
@@ -1,7 +1,7 @@
package core.game.content.ttrail; package content.global.activity.ttrail;
import api.LoginListener; import core.api.LoginListener;
import api.PersistPlayer; import core.api.PersistPlayer;
import core.game.node.entity.player.Player; import core.game.node.entity.player.Player;
import core.tools.RandomFunction; import core.tools.RandomFunction;
@@ -9,8 +9,6 @@ import org.jetbrains.annotations.NotNull;
import org.json.simple.JSONArray; import org.json.simple.JSONArray;
import org.json.simple.JSONObject; import org.json.simple.JSONObject;
import java.nio.ByteBuffer;
/** /**
* Handles the treasure trail of a player. * Handles the treasure trail of a player.
* @author Vexia * @author Vexia
@@ -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.ItemDefinition;
import core.cache.def.impl.SceneryDefinition; import core.cache.def.impl.SceneryDefinition;
@@ -9,7 +9,7 @@ import core.game.interaction.OptionHandler;
import core.game.node.Node; import core.game.node.Node;
import core.game.node.entity.npc.NPC; import core.game.node.entity.npc.NPC;
import core.game.node.entity.player.Player; 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.GroundItem;
import core.game.node.item.Item; import core.game.node.item.Item;
import core.game.node.item.ItemPlugin; 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.game.world.update.flag.context.Animation;
import core.plugin.Initializable; import core.plugin.Initializable;
import core.plugin.Plugin; import core.plugin.Plugin;
import rs09.plugin.ClassScanner; import core.plugin.ClassScanner;
/** /**
* Handles the clue scroll options. * Handles the clue scroll options.
@@ -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.Entity;
import core.game.node.entity.combat.CombatStyle; import core.game.node.entity.combat.CombatStyle;
import core.game.node.entity.npc.AbstractNPC; 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.Location;
import core.game.world.map.RegionManager; import core.game.world.map.RegionManager;
import core.plugin.Plugin; import core.plugin.Plugin;
import rs09.plugin.ClassScanner; import core.plugin.ClassScanner;
import core.tools.RandomFunction; import core.tools.RandomFunction;
/** /**
@@ -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.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.CombatStyle;
import core.game.node.entity.npc.AbstractNPC; import core.game.node.entity.npc.AbstractNPC;
import core.game.node.entity.player.Player; import core.game.node.entity.player.Player;
@@ -1,31 +1,31 @@
package rs09.game.content.ame package content.global.ame
import api.Commands import core.api.Commands
import api.LoginListener import core.api.LoginListener
import api.events.EventHook import core.game.event.EventHook
import api.events.TickEvent import core.game.event.TickEvent
import api.getAttribute import core.api.getAttribute
import api.setAttribute import core.api.setAttribute
import core.game.node.entity.Entity import core.game.node.entity.Entity
import core.game.node.entity.player.Player import core.game.node.entity.player.Player
import core.game.world.map.zone.ZoneRestriction import core.game.world.map.zone.ZoneRestriction
import core.tools.RandomFunction import core.tools.RandomFunction
import rs09.game.Event import core.api.Event
import rs09.game.system.SystemLogger import core.tools.SystemLogger
import rs09.game.system.command.Privilege import core.game.system.command.Privilege
import rs09.game.world.GameWorld import core.game.world.GameWorld
import rs09.game.world.repository.Repository import core.game.world.repository.Repository
import kotlin.random.Random import kotlin.random.Random
class RandomEventManager(val player: Player? = null) : LoginListener, EventHook<TickEvent>, Commands { class RandomEventManager(val player: Player? = null) : LoginListener, EventHook<TickEvent>, Commands {
var event: RandomEventNPC? = null var event: content.global.ame.RandomEventNPC? = null
var enabled: Boolean = false var enabled: Boolean = false
var nextSpawn = 0 var nextSpawn = 0
val skills = arrayOf("WoodcuttingSkillPulse","FishingPulse","MiningSkillPulse","BoneBuryingOptionPlugin") val skills = arrayOf("WoodcuttingSkillPulse","FishingPulse","MiningSkillPulse","BoneBuryingOptionPlugin")
override fun login(player: Player) { override fun login(player: Player) {
if(player.isArtificial) return if(player.isArtificial) return
val instance = RandomEventManager(player) val instance = content.global.ame.RandomEventManager(player)
player.hook(Event.Tick, instance) player.hook(Event.Tick, instance)
setAttribute(player, "random-manager", instance) setAttribute(player, "random-manager", instance)
instance.rollNextSpawn() instance.rollNextSpawn()
@@ -46,18 +46,18 @@ class RandomEventManager(val player: Player? = null) : LoginListener, EventHook<
nextSpawn = GameWorld.ticks + 3000 nextSpawn = GameWorld.ticks + 3000
return return
} }
if (getAttribute<RandomEventNPC?>(player, "re-npc", null) != null) return if (getAttribute<content.global.ame.RandomEventNPC?>(player, "re-npc", null) != null) return
val currentAction = player.pulseManager.current?.toString() ?: "None" val currentAction = player.pulseManager.current?.toString() ?: "None"
val ame: RandomEvents = if(currentAction.contains("WoodcuttingSkillPulse") && Random.nextBoolean()){ val ame: content.global.ame.RandomEvents = if(currentAction.contains("WoodcuttingSkillPulse") && Random.nextBoolean()){
RandomEvents.TREE_SPIRIT content.global.ame.RandomEvents.TREE_SPIRIT
} else if(currentAction.contains("FishingPulse") && Random.nextBoolean()){ } else if(currentAction.contains("FishingPulse") && Random.nextBoolean()){
RandomEvents.RIVER_TROLL content.global.ame.RandomEvents.RIVER_TROLL
} else if(currentAction.contains("MiningSkillPulse") && Random.nextBoolean()){ } else if(currentAction.contains("MiningSkillPulse") && Random.nextBoolean()){
RandomEvents.ROCK_GOLEM content.global.ame.RandomEvents.ROCK_GOLEM
} else if(currentAction.contains("BoneBuryingOptionPlugin") && Random.nextBoolean()){ } else if(currentAction.contains("BoneBuryingOptionPlugin") && Random.nextBoolean()){
RandomEvents.SHADE content.global.ame.RandomEvents.SHADE
} else { } 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) event = ame.npc.create(player,ame.loot,ame.type)
if (event!!.spawnLocation == null) { if (event!!.spawnLocation == null) {
@@ -71,7 +71,7 @@ class RandomEventManager(val player: Player? = null) : LoginListener, EventHook<
} }
private fun rollNextSpawn() { 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() { override fun defineCommands() {
@@ -82,16 +82,16 @@ class RandomEventManager(val player: Player? = null) : LoginListener, EventHook<
if (target == null) if (target == null)
reject(player, "Unable to find player $username!") reject(player, "Unable to find player $username!")
getInstance(target!!)?.fireEvent() content.global.ame.RandomEventManager.Companion.getInstance(target!!)?.fireEvent()
} }
} }
companion object { companion object {
const val AVG_DELAY_TICKS = 6000 // 60 minutes const val AVG_DELAY_TICKS = 6000 // 60 minutes
const val MIN_DELAY_TICKS = AVG_DELAY_TICKS / 2 const val MIN_DELAY_TICKS = content.global.ame.RandomEventManager.Companion.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 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) return getAttribute(player, "random-manager", null)
} }
@@ -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.interaction.MovementPulse
import core.game.node.entity.impl.PulseType import core.game.node.entity.impl.PulseType
import core.game.node.entity.npc.NPC 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.RegionManager
import core.game.world.map.path.Pathfinder import core.game.world.map.path.Pathfinder
import core.game.world.update.flag.context.Graphics import core.game.world.update.flag.context.Graphics
import discord.Discord import core.integrations.discord.Discord
import rs09.game.content.ame.events.MysteriousOldManNPC import core.api.utils.WeightBasedTable
import rs09.game.content.global.WeightBasedTable import core.tools.secondsToTicks
import rs09.tools.secondsToTicks
import kotlin.random.Random import kotlin.random.Random
import kotlin.reflect.full.createInstance import kotlin.reflect.full.createInstance
@@ -39,7 +39,7 @@ abstract class RandomEventNPC(id: Int) : NPC(id) {
open fun terminate() { open fun terminate() {
finalized = true finalized = true
pulseManager.clear(PulseType.STANDARD) pulseManager.clear(PulseType.STANDARD)
RandomEventManager.getInstance(player)?.event = null content.global.ame.RandomEventManager.getInstance(player)?.event = null
if (initialized) { if (initialized) {
poofClear(this) poofClear(this)
} }
@@ -1,25 +1,25 @@
package rs09.game.content.ame package content.global.ame
import org.rs09.consts.Items import org.rs09.consts.Items
import rs09.game.content.ame.events.MysteriousOldManNPC import content.global.ame.events.MysteriousOldManNPC
import rs09.game.content.ame.events.certer.CerterNPC import content.global.ame.events.certer.CerterNPC
import rs09.game.content.ame.events.drilldemon.SeargentDamienNPC import content.global.ame.events.drilldemon.SeargentDamienNPC
import rs09.game.content.ame.events.evilchicken.EvilChickenNPC import content.global.ame.events.evilchicken.EvilChickenNPC
import rs09.game.content.ame.events.genie.GenieNPC import content.global.ame.events.genie.GenieNPC
import rs09.game.content.ame.events.rivertroll.RiverTrollRENPC import content.global.ame.events.rivertroll.RiverTrollRENPC
import rs09.game.content.ame.events.rockgolem.RockGolemRENPC import content.global.ame.events.rockgolem.RockGolemRENPC
import rs09.game.content.ame.events.sandwichlady.SandwichLadyRENPC import content.global.ame.events.sandwichlady.SandwichLadyRENPC
import rs09.game.content.ame.events.shade.ShadeRENPC import content.global.ame.events.shade.ShadeRENPC
import rs09.game.content.ame.events.treespirit.TreeSpiritRENPC import content.global.ame.events.treespirit.TreeSpiritRENPC
import rs09.game.content.ame.events.zombie.ZombieRENPC import content.global.ame.events.zombie.ZombieRENPC
import rs09.game.content.global.WeightBasedTable import core.api.utils.WeightBasedTable
import rs09.game.content.global.WeightedItem import core.api.utils.WeightedItem
enum class RandomEvents(val npc: RandomEventNPC, val loot: WeightBasedTable? = null) { enum class RandomEvents(val npc: RandomEventNPC, val loot: WeightBasedTable? = null) {
SANDWICH_LADY(SandwichLadyRENPC()), SANDWICH_LADY(SandwichLadyRENPC()),
GENIE(GenieNPC()), GENIE(GenieNPC()),
CERTER(CerterNPC(),WeightBasedTable.create( CERTER(CerterNPC(), WeightBasedTable.create(
WeightedItem(Items.UNCUT_SAPPHIRE_1623,1,1,3.4), WeightedItem(Items.UNCUT_SAPPHIRE_1623,1,1,3.4),
WeightedItem(Items.KEBAB_1971,1,1,1.7), WeightedItem(Items.KEBAB_1971,1,1,1.7),
WeightedItem(Items.UNCUT_EMERALD_1621,1,1,1.7), WeightedItem(Items.UNCUT_EMERALD_1621,1,1,1.7),
@@ -1,9 +1,8 @@
package rs09.game.content.ame.events package content.global.ame.events
import core.game.node.entity.player.Player import core.game.node.entity.player.Player
import rs09.game.content.ame.RandomEventManager import content.global.ame.events.supriseexam.SurpriseExamUtils
import rs09.game.content.ame.events.supriseexam.SurpriseExamUtils import core.game.dialogue.DialogueFile
import rs09.game.content.dialogue.DialogueFile
class MysteriousOldManDialogue(val type: String) : DialogueFile() { class MysteriousOldManDialogue(val type: String) : DialogueFile() {
@@ -23,11 +22,11 @@ class MysteriousOldManDialogue(val type: String) : DialogueFile() {
1 -> { 1 -> {
end() end()
teleport(player!!,type) teleport(player!!,type)
RandomEventManager.getInstance(player!!)?.event?.terminate() content.global.ame.RandomEventManager.getInstance(player!!)?.event?.terminate()
} }
2 -> { 2 -> {
end() end()
RandomEventManager.getInstance(player!!)?.event?.terminate() content.global.ame.RandomEventManager.getInstance(player!!)?.event?.terminate()
} }
} }
} }
@@ -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.game.node.entity.npc.NPC
import core.tools.RandomFunction import core.tools.RandomFunction
import org.rs09.consts.NPCs import org.rs09.consts.NPCs
import rs09.game.content.ame.RandomEventNPC import core.api.utils.WeightBasedTable
import rs09.game.content.global.WeightBasedTable
class MysteriousOldManNPC(var type: String = "", override var loot: WeightBasedTable? = null) : RandomEventNPC(NPCs.MYSTERIOUS_OLD_MAN_410) { class MysteriousOldManNPC(var type: String = "", override var loot: WeightBasedTable? = null) : RandomEventNPC(NPCs.MYSTERIOUS_OLD_MAN_410) {
override fun init() { override fun init() {
@@ -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.component.Component
import core.game.node.entity.impl.PulseType import core.game.node.entity.impl.PulseType
import core.game.node.entity.player.link.emote.Emotes import core.game.node.entity.player.link.emote.Emotes
import rs09.game.content.ame.RandomEventManager import core.game.dialogue.DialogueFile
import rs09.game.content.dialogue.DialogueFile import core.tools.END_DIALOGUE
import rs09.tools.END_DIALOGUE
class CerterDialogue(val initial: Boolean) : DialogueFile() { class CerterDialogue(val initial: Boolean) : DialogueFile() {
val CERTER_INTERFACE = 184 val CERTER_INTERFACE = 184
@@ -31,13 +30,13 @@ class CerterDialogue(val initial: Boolean) : DialogueFile() {
npc("Sorry, I don't think so.").also { npc("Sorry, I don't think so.").also {
player!!.setAttribute("certer:reward", true) player!!.setAttribute("certer:reward", true)
stage = END_DIALOGUE stage = END_DIALOGUE
RandomEventManager.getInstance(player!!)?.event?.terminate() content.global.ame.RandomEventManager.getInstance(player!!)?.event?.terminate()
} }
} else { } else {
npc("Thank you, I hope you like your present. I must be", "leaving now though.").also { npc("Thank you, I hope you like your present. I must be", "leaving now though.").also {
player!!.setAttribute("certer:reward", true) player!!.setAttribute("certer:reward", true)
stage = END_DIALOGUE 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 // Wave goodbye
npc!!.animate(Emotes.WAVE.animation) npc!!.animate(Emotes.WAVE.animation)
// Terminate the event // Terminate the event
RandomEventManager.getInstance(player!!)?.event?.terminate() content.global.ame.RandomEventManager.getInstance(player!!)?.event?.terminate()
} else { } else {
player!!.setAttribute("random:pause", false) player!!.setAttribute("random:pause", false)
} }
@@ -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.entity.player.Player
import core.game.node.item.Item import core.game.node.item.Item
import org.rs09.consts.Items import org.rs09.consts.Items
import rs09.game.content.ame.RandomEventManager import core.game.interaction.InterfaceListener
import rs09.game.interaction.InterfaceListener
class CerterEventInterface : InterfaceListener { class CerterEventInterface : InterfaceListener {
val CERTER_INTERFACE = 184 val CERTER_INTERFACE = 184
@@ -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.npc.NPC
import core.game.node.entity.player.link.emote.Emotes import core.game.node.entity.player.link.emote.Emotes
import core.tools.RandomFunction import core.tools.RandomFunction
import org.rs09.consts.NPCs import org.rs09.consts.NPCs
import rs09.game.content.ame.RandomEventNPC import content.global.ame.RandomEventNPC
import rs09.game.content.global.WeightBasedTable import core.api.animate
import core.api.utils.WeightBasedTable
class CerterNPC(override var loot: WeightBasedTable? = null) : RandomEventNPC(NPCs.GILES_2538) { class CerterNPC(override var loot: WeightBasedTable? = null) : RandomEventNPC(NPCs.GILES_2538) {
lateinit var pName: String lateinit var pName: String
@@ -44,6 +45,6 @@ class CerterNPC(override var loot: WeightBasedTable? = null) : RandomEventNPC(NP
player.setAttribute("random:pause", false) player.setAttribute("random:pause", false)
player.setAttribute("certer:reward", false) player.setAttribute("certer:reward", false)
sendChat(phrases[0]) sendChat(phrases[0])
api.animate(this, Emotes.BOW.animation, true) animate(this, Emotes.BOW.animation, true)
} }
} }
@@ -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.node.entity.npc.NPC
import core.game.system.task.Pulse import core.game.system.task.Pulse
import org.rs09.consts.NPCs import org.rs09.consts.NPCs
import rs09.game.interaction.InteractionListener import core.game.interaction.InteractionListener
import rs09.game.interaction.IntType import core.game.interaction.IntType
class DrillDemonListeners : InteractionListener { class DrillDemonListeners : InteractionListener {
val MATS = intArrayOf(10076,10077,10078,10079) val MATS = intArrayOf(10076,10077,10078,10079)
@@ -1,7 +1,7 @@
package rs09.game.content.ame.events.drilldemon package content.global.ame.events.drilldemon
import api.* import core.api.*
import core.game.content.dialogue.FacialExpression import core.game.dialogue.FacialExpression
import core.game.node.entity.player.Player import core.game.node.entity.player.Player
import core.game.node.item.GroundItemManager import core.game.node.item.GroundItemManager
import core.game.node.item.Item 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.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_JOG -> "Get over there and jog in place!"
DD_SIGN_JUMP -> "I need 40 jumping jacks stat!" DD_SIGN_JUMP -> "I need 40 jumping jacks stat!"
DD_SIGN_PUSHUP -> "Get over there and give me 20 pushups!" DD_SIGN_PUSHUP -> "Get over there and give me 20 pushups!"
@@ -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.game.node.entity.player.Player
import core.plugin.Initializable import core.plugin.Initializable
import org.rs09.consts.NPCs import org.rs09.consts.NPCs
import rs09.tools.END_DIALOGUE import core.tools.END_DIALOGUE
@Initializable @Initializable
class SeargentDamienDefaultPlugin(player: Player? = null) : DialoguePlugin(player) { class SeargentDamienDefaultPlugin(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) {
override fun newInstance(player: Player?): DialoguePlugin { override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin {
return SeargentDamienDefaultPlugin(player) return SeargentDamienDefaultPlugin(player)
} }
@@ -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 core.game.system.task.Pulse
import rs09.game.content.ame.RandomEventManager import core.game.dialogue.DialogueFile
import rs09.game.content.dialogue.DialogueFile import core.tools.END_DIALOGUE
import rs09.tools.END_DIALOGUE import core.tools.START_DIALOGUE
import rs09.tools.START_DIALOGUE
class SeargentDamienDialogue(val isCorrect: Boolean = false) : DialogueFile() { class SeargentDamienDialogue(val isCorrect: Boolean = false) : DialogueFile() {
override fun handle(componentID: Int, buttonID: Int) { override fun handle(componentID: Int, buttonID: Int) {
var correctAmt = player!!.getAttribute(DrillDemonUtils.DD_CORRECT_COUNTER,0) 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){ 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 -> { 1 -> {
end() end()
player!!.unlock() 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){ 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 -> { 1 -> {
end() end()
DrillDemonUtils.changeSignsAndAssignTask(player!!) DrillDemonUtils.changeSignsAndAssignTask(player!!)
@@ -35,18 +34,18 @@ class SeargentDamienDialogue(val isCorrect: Boolean = false) : DialogueFile() {
} }
} else { } else {
when(stage){ 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++ } 1 -> options("Yes, please.", "No, thanks.").also { stage++ }
2 -> when(buttonID){ 2 -> when(buttonID){
1 -> { 1 -> {
end() end()
DrillDemonUtils.teleport(player!!) DrillDemonUtils.teleport(player!!)
RandomEventManager.getInstance(player!!)!!.event?.terminate() content.global.ame.RandomEventManager.getInstance(player!!)!!.event?.terminate()
stage = END_DIALOGUE stage = END_DIALOGUE
} }
2 -> { 2 -> {
end() end()
RandomEventManager.getInstance(player!!)!!.event?.terminate() content.global.ame.RandomEventManager.getInstance(player!!)!!.event?.terminate()
stage = END_DIALOGUE stage = END_DIALOGUE
} }
} }
@@ -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.node.entity.npc.NPC
import core.tools.RandomFunction import core.tools.RandomFunction
import org.rs09.consts.NPCs import org.rs09.consts.NPCs
import rs09.game.content.ame.RandomEventNPC import content.global.ame.RandomEventNPC
import rs09.game.content.global.WeightBasedTable import core.api.utils.WeightBasedTable
class SeargentDamienNPC(override var loot: WeightBasedTable? = null) : RandomEventNPC(NPCs.SERGEANT_DAMIEN_2790) { class SeargentDamienNPC(override var loot: WeightBasedTable? = null) : RandomEventNPC(NPCs.SERGEANT_DAMIEN_2790) {
@@ -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.Entity
import core.game.node.entity.npc.NPC import core.game.node.entity.npc.NPC
import core.game.node.item.GroundItemManager import core.game.node.item.GroundItemManager
import core.game.node.item.Item import core.game.node.item.Item
import core.tools.RandomFunction import core.tools.RandomFunction
import org.rs09.consts.Items import org.rs09.consts.Items
import rs09.game.content.ame.RandomEventNPC import content.global.ame.RandomEventNPC
import rs09.game.content.global.WeightBasedTable import core.api.utils.WeightBasedTable
import java.lang.Integer.max import java.lang.Integer.max
val ids = 2463..2468 val ids = 2463..2468
@@ -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
}
}

Some files were not shown because too many files have changed in this diff Show More