RuneHive-Game
Loading...
Searching...
No Matches
SkotizoUtility.java
Go to the documentation of this file.
1package com.runehive.game.world.entity.combat.strategy.npc.boss.skotizo;
2
3import com.runehive.game.world.World;
4import com.runehive.game.world.entity.mob.Direction;
5import com.runehive.game.world.entity.mob.Mob;
6import com.runehive.game.world.entity.mob.npc.Npc;
7import com.runehive.game.world.entity.mob.player.Player;
8import com.runehive.game.world.position.Position;
9import com.runehive.util.Utility;
10
11/**
12 * Created by Daniel on 2017-12-20.
13 */
14public class SkotizoUtility {
15
16 static Npc skotizo = null;
17 private static SpawnData data;
18
19 static Npc generateSpawn() {
21 skotizo = new Npc(7286, data.position, 10, Mob.DEFAULT_INSTANCE, Direction.NORTH);
22 skotizo.register();
23 skotizo.definition.setRespawnTime(-1);
24 skotizo.definition.setAggressive(true);
25 skotizo.speak("Darkness is here to penetrate your souls!");
26 World.sendMessage("<icon=6><col=8714E6> Skotizo has just spawned! He is located at " + data.location + "!");
27 // DiscordPlugin.sendSimpleMessage("Skotizo has entered the wilderness! He is located at " + data.location + "!");
28 return skotizo;
29 }
30
31 public static String getInformation() {
32 return (skotizo == null || skotizo.isDead()) ? "Not Active" : data.location;
33 }
34
35 public static void defeated(Npc npc, Player player) {
36 if (skotizo != null && skotizo.isRegistered()) {
37 skotizo.unregister();
38 }
39
40 skotizo = null;
41 }
42
43 public enum SpawnData {
44 LEVEL_18("Near boneyard hunter", new Position(3307, 3668, 0)),
45 LEVEL_19("North of chaos altar", new Position(3222, 3658, 0)),
46 LEVEL_28("Near vennenatis", new Position(3308, 3737, 0)),
47 LEVEL_41("Near callisto", new Position(3270, 3843, 0)),
48 LEVEL_52("Near rogue's castle", new Position(3304, 3929, 0)),
49 LEVEL_53("Near scorpia's cave", new Position(3211, 3944, 0));
50
51 public final String location;
52 public final Position position;
53
55 this.location = location;
56 this.position = position;
57 }
58
59 public static SpawnData generate() {
60 return Utility.randomElement(values());
61 }
62 }
63}
Represents the game world.
Definition World.java:46
static void sendMessage(String... messages)
Sends a global message.
Definition World.java:396
Handles the mob class.
Definition Mob.java:66
Represents a non-player character in the in-game world.
Definition Npc.java:29
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.