RuneHive-Tarnish
Neural OSRS Enhancement Framework
Loading...
Searching...
No Matches
JusticarUtility.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
57
58public class JusticarUtility {
59
60 public static SpawnData2 spawn;
61
62 public static boolean activated = false;
63
64 public static boolean justicarbutton;
65
66 public static Npc generateSpawn() {
67 activated = true;
68 spawn = SpawnData2.generate();
69 Npc jusiticar = new Npc(7858, spawn.position, 10, Direction.NORTH);
70 World.sendMessage("<col=8714E6> Justicar has just spawned! He is located at " + spawn.location + "!");
71 World.sendBroadcast(1, "The Justicar boss has spawned!" + spawn.location + "!", true);
72 jusiticar.register();
73 jusiticar.definition.setRespawnTime(-1);
74 jusiticar.definition.setAggressive(true);
75 jusiticar.speak("Darkness is here to penetrate your souls!");
76 return jusiticar;
77 }
78
80
81 public static int[] ALWAYSLOOT = { 1, 1, 1, 1, 1, 2, 3, 4, 5 };
82 public static int[] COMMONLOOT = { 6199, 989, 3140, 4087, 11732, 989, 12878, 6585, 4675 };
83 public static int[] RARELOOT = { 11834, 11832, 11828, 11830, 11836, 11773, 13239, 13237, 13235, 11772, 11771, 11770,
84 20143, 20002 };
85 public static int[] SUPERRARELOOT = { 11862, 12817, 12825, 12821, 20997, 13652, 11802, 13576, 11785, 19481, 11791,
86 12904, };
87
88 public static void defeated(Npc justicar, Player player) {
89 boolean hasClan = player.clanChannel != null;
90
91 if (hasClan) {
92 World.sendMessage("<col=8714E6> Skotizo has been defeated by " + player.getName() + " !");
93 } else {
94 World.sendMessage("<col=8714E6> Skotizo has been defeated by " + player.getName()
95 + ", a solo individual with balls of steel!");
96 }
97
98 justicar.unregister();
99 activated = false;
100 }
101
102public enum SpawnData2 {
103 LEVEL_46("lvl 46 wild near Spider Hill", new Position(3135, 3888, 0), new Position(3132, 3881, 0)),
104 LEVEL_16("lvl 16 wild near Bone Yard", new Position(3273, 3648, 0), new Position(3267, 3654, 0)),
105 LEVEL_51("lvl 51 wild near Rogues Castle", new Position(3266, 3924, 0), new Position(3266, 3927, 0)),
106 LEVEL_41("lvl 19 wild near graveyard of shadows", new Position(3197, 3670, 0), new Position(3194, 3666, 0)),
107 LEVEL_47("lvl 47 wild near obelisk", new Position(3308, 3892, 0), new Position(3305, 3888, 0)),
108 LEVEL_53("lvl 53 wild near scorpia's cave entrance", new Position(3211, 3944, 0), new Position(3208, 3940, 0));
109
110 public final String location;
111 public final Position position;
112 public final Position tsunami;
113
114 SpawnData2(String location, Position position, Position tsunami) {
115 this.location = location;
116 this.position = position;
117 this.tsunami = tsunami;
118 }
119
120 public static SpawnData2 generate() {
121 return Utility.randomElement(values());
122 }
123
124 public String getLocation() {
125 return location;
126 }
127
128 public Position getPosition() {
129 return position;
130 }
131
132 public Position getTsunami() {
133 return tsunami;
134 }
135
136 }
137
138}
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