1package com.runehive.content.skill.impl.crafting.impl;
3import com.runehive.Config;
4import com.runehive.net.packet.out.SendInputAmount;
5import com.runehive.net.packet.out.SendMessage;
6import com.runehive.game.Animation;
7import com.runehive.game.action.Action;
8import com.runehive.game.action.policy.WalkablePolicy;
9import com.runehive.game.world.entity.mob.player.Player;
10import com.runehive.content.dialogue.ChatBoxItemDialogue;
11import com.runehive.content.dialogue.DialogueFactory;
12import com.runehive.game.world.entity.skill.Skill;
13import com.runehive.game.world.items.Item;
14import com.runehive.util.Utility;
76 factory.
sendOption(
"Ball of wool (wool)", () -> {
80 },
"Bow string (flax)", () -> {
84 },
"Rope (yak hair)", () -> {
88 },
"Nevermind", () -> {
115 public void firstOption(
Player player) {
120 public void secondOption(
Player player) {
125 public void thirdOption(
Player player) {
130 public void fourthOption(
Player player) {
150 public void execute() {
153 player.
send(
new SendMessage(
"<col=369>You have run out of materials."));
163 if (++ticks == amount) {
170 public String getName() {
The class that contains setting-related constants for the server.
static final double CRAFTING_MODIFICATION
The experience modification for crafting.
static void sendInterface(Player player, int interfaceId, Item item, int zoom)
Represents a factory class that contains important functions for building dialogues.
final DialogueFactory execute()
Retrieves the next dialogue in the chain and executes it.
void clear()
Clears the current dialogue chain.
final DialogueFactory onAction(Runnable action)
Sets an action so this action can be executed after dialogues are done.
final DialogueFactory sendStatement(String... lines)
Appends a StatementDialogue to the current dialogue chain.
final DialogueFactory sendOption(String option1, Runnable action1, String option2, Runnable action2)
Appends the OptionDialogue onto the current dialogue chain.
Handles spinning items on the spinning wheel.
static Action< Player > spin(Player player, Spinnable spinnable, int amount)
The spinnable action.
static void open(Player player)
Handles opening the spinning dialogue.
static void click(Player player, Spinnable spinnable)
Opens the spinnable dialogue.
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 close(int interfaceId)
This class represents a character controlled by a player.
final Inventory inventory
DialogueFactory dialogueFactory
final InterfaceManager interfaceManager
void send(OutgoingPacket encoder)
Represents a trainable and usable skill.
static final int CRAFTING
The crafting skill id.
void addExperience(int id, double experience)
Adds experience to a given skill.
int getMaxLevel(int id)
Gets the highest possible level of a skill.
The container class that represents an item that can be interacted with.
boolean remove(Item item)
Attempts to withdraw item from this container.
boolean add(Item item)
Attempts to deposit item into this container.
boolean contains(int id)
Determines if this container contains id.
The OutgoingPacket that sends a message to a Players chatbox in the client.
Handles miscellaneous methods.
static String getAOrAn(String nextWord)
A or an.
Item item
The spinnable item.
Item outcome
The spinnable outcome item.
double experience
The spinnable experience.
int requiredLevel
The level required to spin.
Spinnable(Item item, Item outcome, double experience, int requiredLevel)
Constructs a new Spinnable.
A queue policy determines whether the action can occur while walking.
NON_WALKABLE
This indicates actions cannot occur while walking.