1package com.runehive.content.skill.impl.runecrafting;
3import com.runehive.Config;
4import com.runehive.content.achievement.AchievementHandler;
5import com.runehive.content.achievement.AchievementKey;
6import com.runehive.content.activity.randomevent.RandomEventHandler;
7import com.runehive.content.clanchannel.content.ClanTaskKey;
8import com.runehive.content.event.impl.ItemInteractionEvent;
9import com.runehive.content.event.impl.ObjectInteractionEvent;
10import com.runehive.content.pet.PetData;
11import com.runehive.content.pet.Pets;
12import com.runehive.game.Animation;
13import com.runehive.game.Graphic;
14import com.runehive.game.world.World;
15import com.runehive.game.world.entity.mob.player.Player;
16import com.runehive.game.world.entity.skill.Skill;
17import com.runehive.game.world.items.Item;
18import com.runehive.game.world.object.GameObject;
19import com.runehive.net.packet.out.SendMessage;
20import com.runehive.util.Utility;
40 Item item =
event.getItem();
48 int opcode =
event.getOpcode();
64 if (
event.getOpcode() != 0) {
70 if (
click(player,
object)) {
103 for (
int index = 0; index < amount; index++) {
122 craft(player, essence, amount, rune);
165 System.out.println(
"reached here");
The class that contains setting-related constants for the server.
static final double RUNECRAFTING_MODIFICATION
The experience modification for runecrafting.
Handles the achievements.
static void activate(Player player, AchievementKey achievement)
Activates the achievement for the individual player.
static void trigger(Player player)
Handles spawning, rewarding and picking up of pets.
static void onReward(Player player, int item, int chance)
Handles calculating the chance of a player receiving a skilling pet.
void craft(Player player, int essence, int amount, RunecraftData rune)
boolean clickItem(Player player, ItemInteractionEvent event)
boolean click(Player player, GameObject object)
Handles teleporting to various runecrafting altars.
int getEssence(Player player)
Gets the essence identification from player.
int multiplier(Player player, RunecraftData rune)
The runecrafting multiplier.
boolean clickObject(Player player, ObjectInteractionEvent event)
Runecraft(int level, double experience)
void deposit(RunecraftPouchData pouch)
Deposits essence into the player's runecraft pouch.
void withdraw(RunecraftPouchData pouch)
Withdraws essence from the player's rune essence pouch.
Class that models a single animation used by an entity.
Represents a single graphic that can be used by entities.
Represents the game world.
static void schedule(Task task)
Submits a new event.
final SkillManager skills
void animate(int animation)
void move(Position position)
Moves the mob to a set position.
Optional< Graphic > graphic
void activateSkilling(int amount)
This class represents a character controlled by a player.
final Inventory inventory
void forClan(Consumer< ClanChannel > action)
String getName()
Gets the name of this entity.
void send(OutgoingPacket encoder)
final PlayerAssistant playerAssistant
final RunecraftPouch runecraftPouch
double experience
The current skill experience.
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.
int getLevel(int id)
Gets the level of a 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.
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< T > T randomElement(Collection< T > collection)
Picks a random element out of any array type.
Holds the runecrafting data -.
double getExperience()
Gets the experience rewarded.
static Optional< RunecraftData > forId(int id)
Gets the runecrafting data based on the object.
int getLevel()
Gets the level required.
int[] getMultiplier()
Gets the multiplier.
int getRunes()
Gets the runes obtained.
Holds the runecrafting pouch data.
static RunecraftPouchData forItem(int item)
Gets the runecrafting pouch data based on the item identification.
Holds the runecrafting teleport data -.
static Optional< RunecraftTeleport > forId(int id)
Gets the runecrafting teleport data based on the object identification.
Represents a game object.