1package com.runehive.content.skill.impl.prayer;
3import com.runehive.Config;
4import com.runehive.content.skillcape.SkillCape;
5import com.runehive.content.activity.randomevent.RandomEventHandler;
6import com.runehive.content.dialogue.ChatBoxItemDialogue;
7import com.runehive.content.event.impl.ItemInteractionEvent;
8import com.runehive.content.event.impl.ItemOnObjectInteractionEvent;
9import com.runehive.game.Animation;
10import com.runehive.game.Graphic;
11import com.runehive.game.action.Action;
12import com.runehive.game.action.impl.BuryBoneAction;
13import com.runehive.game.action.impl.ScatterAshAction;
14import com.runehive.game.action.policy.WalkablePolicy;
15import com.runehive.game.world.World;
16import com.runehive.game.world.entity.mob.player.Player;
17import com.runehive.game.world.entity.skill.Skill;
18import com.runehive.game.world.items.Item;
19import com.runehive.game.world.items.ItemDefinition;
20import com.runehive.game.world.object.GameObject;
21import com.runehive.game.world.position.Position;
22import com.runehive.net.packet.out.SendInputAmount;
23import com.runehive.net.packet.out.SendMessage;
24import com.runehive.util.Utility;
44 if (
event.getOpcode() != 0)
46 Item item =
event.getItem();
47 int slot =
event.getSlot();
62 Item item =
event.getItem();
64 if (
object.getId() != 409 &&
object.getId() != 411) {
77 public void firstOption(
Player player) {
82 public void secondOption(
Player player) {
87 public void thirdOption(
Player player) {
88 player.
send(
new SendInputAmount(
"Enter the amount of bones you would like to sacrifice", 10, input -> player.
action.
execute(
sacrifice(player,
object.getPosition(), bone, Integer.parseInt(input)),
true)));
92 public void fourthOption(
Player player) {
105 public void execute() {
120 player.
message(
"You've saved a bone due to sacrificing in the wilderness..");
133 if (++ticks == amount) {
140 return "Bone sacrifice";
144 public boolean prioritized() {
The class that contains setting-related constants for the server.
static final double PRAYER_MODIFICATION
The experience modification for prayer.
static void trigger(Player player)
static void sendInterface(Player player, int interfaceId, Item item, int zoom)
final void start()
Attempts to start the skill.
boolean useItem(Player player, ItemOnObjectInteractionEvent event)
Action< Player > sacrifice(Player player, Position position, BoneData bone, int amount)
BoneSacrifice(int level, double experience)
boolean clickItem(Player player, ItemInteractionEvent event)
Class that models a single animation used by an entity.
Represents a single graphic that can be used by entities.
Represents an action an entity can execute.
public< A extends Action<?> > void execute(A action)
Represents the game world.
static void sendGraphic(Graphic graphic, Position position, int instance)
Sends a graphic to the world.
final SkillManager skills
void animate(int animation)
This class represents a character controlled by a player.
final Inventory inventory
void message(String message)
void send(OutgoingPacket encoder)
static String getName(int skill)
Gets the name for a skill id.
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.
Represents all of an in-game Item's attributes.
static ItemDefinition get(int id)
Gets an item definition.
String getName()
Gets the item name.
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 contains(int id)
Determines if this container contains id.
Represents a single tile on the game world.
boolean inLocation(Position southWest, Position northEast, boolean inclusive)
static Position create(int x, int y, int z)
Creates a location.
The OutgoingPacket that sends a message to a Players chatbox in the client.
Handles miscellaneous methods.
static int random(int bound)
static Optional< AshData > forId(int id)
static Optional< BoneData > forId(int id)
Gets the bone data based on the item.
int getId()
Gets the id of the bone.
double getExperience()
Gets the experience of the bone.
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.
Represents a game object.