1package com.runehive.content.activity.impl.barrows;
3import com.runehive.content.ActivityLog;
4import com.runehive.content.achievement.AchievementHandler;
5import com.runehive.content.achievement.AchievementKey;
6import com.runehive.content.collectionlog.CollectionLog;
7import com.runehive.content.collectionlog.CollectionLogData;
8import com.runehive.game.task.impl.CeillingCollapseTask;
9import com.runehive.game.world.World;
10import com.runehive.game.world.entity.mob.player.Player;
11import com.runehive.game.world.items.Item;
12import com.runehive.net.packet.out.SendItemOnInterface;
13import com.runehive.net.packet.out.SendMessage;
14import com.runehive.net.packet.out.SendString;
15import com.runehive.util.Utility;
17import java.util.ArrayList;
18import java.util.HashSet;
35 public static int BARROWS[] = {4708, 4710, 4712, 4714, 4708, 4710, 4712, 4714, 4716, 4718, 4720,
36 4722, 4724, 4718, 4720,
37 4722, 4724, 4718, 4720,
38 4722, 4724, 4726, 4728, 4730, 4732, 4734, 4736, 4738, 4745, 4747,
39 4749, 4751, 4753, 4755, 4757, 4759};
42 {4708, 4860}, {4710, 4866},
43 {4712, 4872}, {4714, 4878}, {4716, 4884}, {4720, 4896},
44 {4718, 4890}, {4720, 4896}, {4722, 4902}, {4732, 4932},
45 {4734, 4938}, {4736, 4944}, {4738, 4950}, {4724, 4908},
46 {4726, 4914}, {4728, 4920}, {4730, 4926}, {4745, 4956},
47 {4747, 4926}, {4749, 4968}, {4751, 4994}, {4753, 4980},
48 {4755, 4986}, {4757, 4992}, {4759, 4998}};
54 player.
move(brother.getCryptPosition());
55 player.
send(
new SendMessage(
"You dig a hole and fall into " + brother.name().toLowerCase() +
"s crypt!"));
63 List<BrotherData> brother =
new ArrayList<>();
64 for (
int i = 0; i < player.
barrowKills.length; i++) {
73 Set<Item> rewards =
new HashSet<>();
79 if (junk.
getId() == 995) {
100 for (
Item item : rewards) {
101 value += item.getValue() * item.getAmount();
102 rewardDisplay[count] = item;
110 rewards.forEach(player.inventory::addOrDrop);
void add(ActivityLog log)
Handles the achievements.
static void activate(Player player, AchievementKey achievement)
Activates the achievement for the individual player.
static void generateRewards(Player player)
static int RUNES_AND_AMMUNITION[]
static final int[][] BROKEN_BARROWS
static BrotherData getHiddenBrother(Player player)
static boolean teleportPlayer(Player player)
static void logItem(Player player, CollectionLogData data, int item, int amount)
static void increaseCounter(Player player, CollectionLogData data)
Represents the game world.
static void schedule(Task task)
Submits a new event.
void move(Position position)
Moves the mob to a set position.
void open(int identification)
Opens an interface for the player.
This class represents a character controlled by a player.
final InterfaceManager interfaceManager
final ActivityLogger activityLogger
void send(OutgoingPacket encoder)
The container class that represents an item that can be interacted with.
final void setAmount(int amount)
Sets the quantity of this item.
final int getId()
Gets the identification of this item.
final int getAmount()
Gets the quantity of this item.
boolean inLocation(Position southWest, Position northEast, boolean inclusive)
The OutgoingPacket that sends a message to a Players chatbox in the client.
The OutgoingPacket that sends a string to a Players itemcontainer in the client.
Handles miscellaneous methods.
static int random(int bound)
static String formatDigits(final int amount)
Formats digits for integers.
static< T > T randomElement(Collection< T > collection)
Picks a random element out of any array type.