1package com.osroyale.content.activity.impl.recipefordisaster;
3import com.osroyale.content.activity.Activity;
4import com.osroyale.content.activity.ActivityDeathType;
5import com.osroyale.content.activity.ActivityType;
6import com.osroyale.content.activity.panel.ActivityPanel;
7import com.osroyale.game.Animation;
8import com.osroyale.game.Graphic;
9import com.osroyale.game.world.World;
10import com.osroyale.game.world.entity.mob.Mob;
11import com.osroyale.game.world.entity.mob.npc.Npc;
12import com.osroyale.game.world.entity.mob.npc.NpcDeath;
13import com.osroyale.game.world.entity.mob.player.Player;
14import com.osroyale.game.world.items.Item;
15import com.osroyale.game.world.items.ground.GroundItem;
16import com.osroyale.game.world.position.Area;
17import com.osroyale.game.world.position.Position;
18import com.osroyale.net.packet.out.SendEntityHintArrow;
19import com.osroyale.net.packet.out.SendMessage;
20import com.osroyale.util.RandomUtils;
21import com.osroyale.util.Utility;
66public class RecipeForDisaster
extends Activity {
69 private final Player player;
78 private RecipeForDisaster(
Player player,
int instance) {
85 RecipeForDisaster minigame =
new RecipeForDisaster(player, player.playerAssistant.instance());
86 ActivityPanel.
update(player, -1,
"Recipe For Disaster",
"Good Luck, " + player.getName() +
"!",
"Wave starting in 6 seconds");
87 player.move(
new Position(1899, 5356, 2));
89 player.message(
"Ice gloves have been dropped for you to fight Flambleed!");
90 player.gameRecord.start();
91 player.playerAssistant.restore();
105 int display = 7453 + wave.gloves;
106 String npc = monster ==
null ?
"" : monster.getName();
107 ActivityPanel.
update(player, progress,
"Recipe For Disaster",
new Item(display),
"</col>Wave: <col=FF5500>" + wave.ordinal() +
"/" +
RecipeForDisasterData.values().length,
"</col>Boss: <col=FF5500>" + npc,
"</col>Time: <col=FF5500>" +
Utility.
getTime(System.currentTimeMillis() - player.gameRecord.time));
116 if (player.locking.locked()) {
122 Npc npc =
new Npc(wave.npc, RandomUtils.random(boundaries));
127 monster.getCombat().attack(player);
136 long time = player.gameRecord.end(
ActivityType.RECIPE_FOR_DISASTER);
138 player.send(
new SendMessage(
"You have completed the Recipe For Disaster activity. Final time: @red@" +
Utility.
getTime(time) +
"</col>."));
140 reward = wave.gloves;
143 if (reward > player.glovesTier) {
144 player.glovesTier = reward;
146 player.move(
new Position(3080, 3498, 0));
147 player.dialogueFactory.sendNpcChat(6526,
"You have been rewarded for your efforts.",
"Check my store to see your available gloves.").execute();
153 if (monster !=
null) {
167 if (!
Area.inRFD(player)) {
174 public boolean canUsePrayer(
Player player) {
175 player.message(
"You can not use prayers here!");
197 mob.graphic(
Graphic.RESET,
true);
203 wave = wave.getNext();
final void resetCooldown()
final void finishCooldown()
Activity(int cooldown, int instance)
static RecipeForDisaster create(Player player)
void onRegionChange(Player player)
void onLogout(Player player)
boolean canTeleport(Player player)
static void clear(Player player)
static void update(Player player, int amount, String title, String footer, String... strings)
static void schedule(Task task)
void move(Position position)
static GroundItem create(Player player, Item item)
static double getPercentageAmount(int progress, int total)