1package com.runehive.game.action.impl;
3import com.runehive.Config;
4import com.runehive.content.skillcape.SkillCape;
5import com.runehive.content.achievement.AchievementHandler;
6import com.runehive.content.achievement.AchievementKey;
7import com.runehive.content.skill.SkillAction;
8import com.runehive.content.skill.impl.prayer.BoneData;
9import com.runehive.game.Animation;
10import com.runehive.game.action.policy.WalkablePolicy;
11import com.runehive.game.world.entity.mob.player.Player;
12import com.runehive.game.world.entity.skill.Skill;
13import com.runehive.game.world.items.Item;
14import com.runehive.net.packet.out.SendMessage;
16import java.util.Optional;
29 super(player, Optional.empty(),
true);
37 return getMob().skills.getSkills()[
skill()].stopwatch.elapsed(1200);
58 if (current < maximum) {
59 int points =
bone.getBoneAmulet();
61 if (current + points > maximum) {
62 points = maximum - current;
76 getMob().skills.getSkills()[
skill()].stopwatch.reset();
81 return Optional.empty();
The class that contains setting-related constants for the server.
static final double PRAYER_MODIFICATION
The experience modification for prayer.
Handles the achievements.
static void activate(Player player, AchievementKey achievement)
Activates the achievement for the individual player.
SkillAction(Mob mob, Optional< Position > position, int delay, boolean instant)
Creates a new Action randomevent.
Class that models a single animation used by an entity.
T getMob()
Gets the player.
int skill()
The skill we should hand to experience to.
double experience()
The experience given from this action.
void onCancel(boolean logout)
A function executed on cancellation.
boolean prioritized()
Determines if this action is prioritized.
boolean canInit()
Determines if this action can be initialized.
WalkablePolicy getWalkablePolicy()
Gets the WalkablePolicy of this action.
void init()
Any functionality that should be handled when this action is submitted.
String getName()
Gets the name of this action.
Optional< SkillAnimation > animation()
The skill animation to execute.
void onExecute()
The method which is called on intervals of the specified #delay;.
BuryBoneAction(Player player, BoneData bone, int slot)
synchronized final void cancel()
Cancels all subsequent executions.
final SkillManager skills
This class represents a character controlled by a player.
final Inventory inventory
void message(String message)
final Equipment equipment
void send(OutgoingPacket encoder)
Represents a trainable and usable skill.
static final int PRAYER
The prayer skill id.
void addLevel(int amount)
Adds levels to this skill by the given amount.
void addExperience(int id, double experience)
Adds experience to a given skill.
int getLevel(int id)
Gets the level of a skill.
int getMaxLevel(int id)
Gets the highest possible level of a skill.
Skill get(int id)
Gets the skill for an id.
void refresh()
Refreshes all the skills for the mob.
The container class that represents an item that can be interacted with.
final int getId()
Gets the identification of this item.
boolean remove(Item item)
Attempts to withdraw item from this container.
final Item get(int index)
Gets the Item located on index.
The OutgoingPacket that sends a message to a Players chatbox in the client.
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.