1package com.runehive.content.activity.impl.zulrah;
3import com.runehive.game.Animation;
4import com.runehive.game.Projectile;
5import com.runehive.game.UpdatePriority;
6import com.runehive.game.task.impl.ObjectPlacementEvent;
7import com.runehive.game.world.World;
8import com.runehive.game.world.entity.mob.npc.Npc;
9import com.runehive.game.world.entity.mob.player.Player;
10import com.runehive.game.world.object.CustomGameObject;
11import com.runehive.game.world.position.Position;
12import com.runehive.net.packet.out.SendCameraReset;
13import com.runehive.net.packet.out.SendMessage;
14import com.runehive.util.RandomUtils;
15import com.runehive.util.Utility;
17import java.util.concurrent.TimeUnit;
33 }
else if (count == 1) {
34 activity.zulrah =
new Npc(2042,
new Position(2266, 3073));
36 activity.zulrah.definition.setRetaliate(
false);
37 activity.zulrah.definition.setAggressive(
false);
38 activity.zulrah.canAttack =
false;
39 activity.zulrah.blockInteract =
true;
40 activity.zulrah.owner = player;
44 }
else if (count == 2) {
45 activity.zulrah.blockInteract =
false;
61 int index = activity.count / 3;
62 int stage = activity.count % 3;
66 activity.phase =
DIVE;
74 }
else if (stage == 1) {
77 }
else if (stage == 2) {
95 }
else if (count == 3) {
99 }
else if (count == 5) {
104 activity.phase =
activity.nextPhase();
118 if (!
zulrah.definition.isAggressive() || !
zulrah.definition.isRetaliate() || !
zulrah.canAttack) {
119 zulrah.definition.setAggressive(
true);
120 zulrah.canAttack =
true;
121 zulrah.definition.setRetaliate(
true);
126 activity.phase =
DIVE;
127 zulrah.definition.setAggressive(
false);
128 activity.zulrah.definition.setRetaliate(
false);
129 zulrah.canAttack =
false;
144 activity.target =
activity.getCloudPosition();
149 activity.phase =
DIVE;
154 int stage = activity.count % 3;
158 }
else if (stage == 1) {
161 }
else if (stage == 2) {
165 activity.target =
null;
178 activity.target =
activity.getSnakelingPosition();
183 activity.phase =
DIVE;
188 int stage = activity.count % 3;
192 }
else if (stage == 1) {
195 }
else if (stage == 2) {
200 activity.target =
null;
Holds all the zulrah constants.
static final Position[] CLOUD_POSITIONS
All the possible positions zulrah can spawn his clouds for.
static final int MAXIMUM_CLOUDS
The maximum amount of clouds that zulrah can spawn at a time.
static final Position[] LOCATIONS
All the possible positions zulrah can move to.
static final int MAXIMUM_SNAKELINGS
The maximum amount of snakelings that zulrah can spawn at a time.
Class that models a single animation used by an entity.
An randomevent which places a temporary object.
Represents the game world.
static void schedule(Task task)
Submits a new event.
static void sendProjectile(Projectile projectile, Position position, int instance, int lock, byte offsetX, byte offsetY)
Sends a world projectile.
Represents a non-player character in the in-game world.
Combat< Npc > getCombat()
The combat of the mob.
This class represents a character controlled by a player.
void send(OutgoingPacket encoder)
Represents a static game object loaded from the map fs.
Represents a single tile on the game world.
The OutgoingPacket resets the camera position for Player.
The OutgoingPacket that sends a message to a Players chatbox in the client.
A static-util class that provides additional functionality for generating pseudo-random numbers.
static< T > T randomExclude(T[] array, T exclude)
Returns a pseudo-random int value between inclusive min and inclusive max excluding the specified num...
Handles miscellaneous methods.
static int random(int bound)
Handles all the activity phases for zulrah.
Represents different priorities for updating.
VERY_HIGH
A very high priority.
The Zulrah phase interface.
void execute(final T activity)