1package com.runehive.content.skill.impl.herblore;
3import com.runehive.Config;
4import com.runehive.content.skillcape.SkillCape;
5import com.runehive.content.activity.randomevent.RandomEventHandler;
6import com.runehive.content.clanchannel.content.ClanTaskKey;
7import com.runehive.net.packet.out.SendInputAmount;
8import com.runehive.game.Animation;
9import com.runehive.game.action.Action;
10import com.runehive.game.action.policy.WalkablePolicy;
11import com.runehive.game.world.entity.mob.player.Player;
12import com.runehive.content.achievement.AchievementHandler;
13import com.runehive.content.achievement.AchievementKey;
14import com.runehive.content.dialogue.ChatBoxItemDialogue;
15import com.runehive.content.event.impl.ItemInteractionEvent;
16import com.runehive.content.event.impl.ItemOnItemInteractionEvent;
17import com.runehive.game.world.entity.skill.Skill;
18import com.runehive.game.world.items.Item;
19import com.runehive.util.StringUtils;
20import com.runehive.util.Utility;
41 final int slot =
event.getSlot();
74 if (use ==
null || with ==
null) {
92 player.
inventory.
set(useSlot < withSlot ? withSlot : useSlot,
null,
true);
98 public void firstOption(
Player player) {
103 public void secondOption(
Player player) {
108 public void thirdOption(
Player player) {
113 public void fourthOption(
Player player) {
127 public void execute() {
135 if (!saveIngredient) {
148 if (++ticks == amount) {
155 return "Herblore mix";
159 public boolean prioritized() {
The class that contains setting-related constants for the server.
static final double HERBLORE_MODIFICATION
The experience modification for herblore.
Handles the achievements.
static void activate(Player player, AchievementKey achievement)
Activates the achievement for the individual player.
static void trigger(Player player)
static void sendInterface(Player player, int interfaceId, Item item, int zoom)
final DialogueFactory execute()
Retrieves the next dialogue in the chain and executes it.
final DialogueFactory sendStatement(String... lines)
Appends a StatementDialogue to the current dialogue chain.
boolean useItem(Player player, ItemOnItemInteractionEvent e)
Herblore(int level, double experience)
Constructs a new Herblore.
boolean clickItem(Player player, ItemInteractionEvent event)
Action< Player > mix(Player player, Potion potion, int amount)
Handles the potion mixing action.
Class that models a single animation used by an entity.
Represents an action an entity can execute.
public< A extends Action<?> > void execute(A action)
final SkillManager skills
void animate(int animation)
void activateSkilling(int amount)
This class represents a character controlled by a player.
final Inventory inventory
DialogueFactory dialogueFactory
void send(OutgoingPacket encoder)
final PlayerAssistant playerAssistant
static String getName(int skill)
Gets the name for a skill id.
double experience
The current skill experience.
int getLevel()
Gets the current skill level.
int level
The current level of the skill.
Skill(int skill, int level, double experience)
Constructs a new Skill.
void addExperience(int id, double experience)
Adds experience to a given skill.
The container class that represents an item that can be interacted with.
final int getId()
Gets the identification of this item.
final int computeAmountForId(int id)
Computes the total quantity of the Items in this container with id.
boolean remove(Item item)
Attempts to withdraw item from this container.
final Item get(int index)
Gets the Item located on index.
boolean add(Item item)
Attempts to deposit item into this container.
final void set(Item[] toSet)
boolean removeAll(Collection<? extends Item > items)
Attempts to withdraw items in bulk from this container.
final boolean containsAll(int... identifiers)
Determines if this container contains all identifiers.
void addOrDrop(List< Item > items)
Attempts to deposit an item to the players inventory, if there is no space it'll bank the item instea...
static String getAOrAn(String nextWord)
Handles miscellaneous methods.
static int random(int bound)
static String getAOrAn(String nextWord)
A or an.
Holds all the finished potion data.
static FinishedPotion get(Item use, Item with)
Gets the finished potion data.
Holds all the grimy herb data.
double getExperience()
Gets the experience for cleaning a herb.
int getLevel()
Gets the level to clean the herb.
Item getGrimy()
Gets the grimy herb.
Item getClean()
Gets the clean herb.
static Optional< GrimyHerb > forId(int id)
Gets the herb data from the item identification.
static UnfinishedPotion get(Item use, Item with)
static boolean isEquipped(Player player, SkillCape cape)
A queue policy determines whether the action can occur while walking.
NON_WALKABLE
This indicates actions cannot occur while walking.
The potion making itemcontainer.
Item getProduct()
Gets the potion product.
int getAnimation()
Gets the potion animation.
Item[] getIngredients()
Gets the ingredients required for the potion.
double getExperience()
Gets the experience rewarded.
int getLevel()
Gets the level required for making the potion.