RuneHive-Tarnish
Neural OSRS Enhancement Framework
Loading...
Searching...
No Matches
DerwenUtility.java
1package com.osroyale.game.world.entity.combat.strategy.npc.boss.magearena;
2
3import com.osroyale.game.world.World;
4import com.osroyale.game.world.entity.mob.Direction;
5import com.osroyale.game.world.entity.mob.npc.Npc;
6import com.osroyale.game.world.entity.mob.player.Player;
7import com.osroyale.game.world.position.Position;
8import com.osroyale.util.Utility;
9
47
48public class DerwenUtility {
49
50 public static Npc generatederwenSpawn() {
51 SpawnData spawn = SpawnData.generate();
52 Npc derwen = new Npc(7859, spawn.position, 10, Direction.NORTH);
53 World.sendMessage("<col=8714E6> Derwen has just spawned! He is located at " + spawn.location + "!");
54 World.sendBroadcast(1, "The Derwen boss has spawned!" + spawn.location + "!", true);
55 derwen.register();
56 derwen.definition.setRespawnTime(-1);
57 derwen.definition.setAggressive(true);
58 derwen.speak("Darkness is here to penetrate your souls!");
59 return derwen;
60 }
61
62 public static void defeated(Npc jusiticar, Player player) {
63
64 boolean hasClan = player.clanChannel != null;
65
66 if (hasClan) {
67 World.sendMessage("<col=8714E6> Derwen has been defeated by " + player.getName() + "!");
68 } else {
69 World.sendMessage("<col=8714E6> Derwen has been defeated by " + player.getName()
70 + ", a solo individual with balls of steel!");
71 }
72
73 jusiticar.unregister();
74 }
75
76public enum SpawnData {
77 LEVEL_19("lvl 15 wild near dark warrior's fortress", new Position(3009, 3637, 0)),
78 LEVEL_28("lvl 54 wild near wilderness resource area", new Position(3184, 3948, 0)),
79 LEVEL_41("lvl 52 wild near Rouges Castle", new Position(3270, 3933, 0)),
80 LEVEL_53("lvl 19 wild near graveyard of shadows", new Position(3146, 3672, 0));
81
82 public final String location;
83 public final Position position;
84
85 SpawnData(String location, Position position) {
86 this.location = location;
87 this.position = position;
88 }
89
90 public static SpawnData generate() {
91 return Utility.randomElement(values());
92 }
93 }
94}
static void sendMessage(String... messages)
Definition World.java:433
static void sendBroadcast(int time, String message, boolean countdown)
Definition World.java:455
void speak(String forceChat)
Definition Mob.java:164
static< T > T randomElement(Collection< T > collection)
Definition Utility.java:285