RuneHive-Game
Loading...
Searching...
No Matches
PorazdirUtility.java
Go to the documentation of this file.
1package com.runehive.game.world.entity.combat.strategy.npc.boss.magearena;
2
3import com.runehive.game.world.World;
4import com.runehive.game.world.entity.mob.Direction;
5import com.runehive.game.world.entity.mob.npc.Npc;
6import com.runehive.game.world.entity.mob.player.Player;
7import com.runehive.game.world.position.Position;
8import com.runehive.util.Utility;
9
10/**
11 * Created by TJ#6732
12 */
13public class PorazdirUtility {
14
15 public static Npc generatePorazdirSpawn() {
17 Npc Porazdir = new Npc(7860, spawn.position, 10, Direction.NORTH);
18 World.sendMessage("<col=8714E6> Porazdir has just spawned! He is located at " + spawn.location + "!");
19 World.sendBroadcast(1, "The Porazdir boss has spawned!" + spawn.location + "!", true);
20 Porazdir.register();
21 Porazdir.definition.setRespawnTime(-1);
22 Porazdir.definition.setAggressive(true);
23 Porazdir.speak("Darkness is here to penetrate your souls!");
24 return Porazdir;
25 }
26
27 public static void defeated(Npc jusiticar, Player player) {
28
29 boolean hasClan = player.clanChannel != null;
30
31 if (hasClan) {
32 World.sendMessage("<col=8714E6> jusiticar has been defeated by " + player.getName() + "!");
33 } else {
34 World.sendMessage("<col=8714E6> jusiticar has been defeated by " + player.getName()
35 + ", a solo individual with balls of steel!");
36 }
37
38 jusiticar.unregister();
39 }
40
41 public enum SpawnData {
42 LEVEL_19("lvl 15 wild west dark warrior's fortress", new Position(2988, 3636, 0)),
43 LEVEL_28("lvl 19 wild near wilderness ruins", new Position(2964, 3670, 0)),
44 LEVEL_41("lvl 10 wild south of dark Warriors", new Position(3016, 3591, 0)),
45 LEVEL_52("North of edgeville in the wilderness", new Position(3100, 3528, 0)),
46 LEVEL_53("lvl 19 wild west of graveyard of shadows", new Position(3138, 3670, 0));
47
48 public final String location;
49 public final Position position;
50
52 this.location = location;
53 this.position = position;
54 }
55
56 public static SpawnData generate() {
57 return Utility.randomElement(values());
58 }
59 }
60}
Represents the game world.
Definition World.java:46
static void sendBroadcast(int time, String message, boolean countdown)
Sends a game message.
Definition World.java:420
static void sendMessage(String... messages)
Sends a global message.
Definition World.java:396
Represents a non-player character in the in-game world.
Definition Npc.java:29
void unregister()
Unregisters an entity from the World.
Definition Npc.java:126
This class represents a character controlled by a player.
Definition Player.java:125
Represents a single tile on the game world.
Definition Position.java:14
Handles miscellaneous methods.
Definition Utility.java:27
static< T > T randomElement(Collection< T > collection)
Picks a random element out of any array type.
Definition Utility.java:248
Represents the enumerated directions an entity can walk or face.