1package com.runehive.content;
3import com.runehive.content.skill.impl.magic.teleport.Teleportation;
4import com.runehive.content.skill.impl.magic.teleport.TeleportationData;
5import com.runehive.content.writer.InterfaceWriter;
6import com.runehive.content.writer.impl.ObeliskWriter;
7import com.runehive.game.task.Task;
8import com.runehive.game.task.impl.ObjectReplacementEvent;
9import com.runehive.game.world.World;
10import com.runehive.game.world.entity.mob.player.Player;
11import com.runehive.game.world.entity.mob.player.PlayerRight;
12import com.runehive.game.world.object.GameObject;
13import com.runehive.game.world.position.Boundary;
14import com.runehive.game.world.position.Position;
15import com.runehive.net.packet.out.SendMessage;
16import com.runehive.net.packet.out.SendString;
17import com.runehive.util.Utility;
26 private static Map<Integer, Boolean>
state =
new HashMap<>();
34 for (ObeliskData location : ObeliskData.values()) {
35 state.put(location.objectId,
false);
47 player.
send(
new SendString(
"Click on the obelisk you would like to teleport too", 51003));
62 boolean active =
state.get(objectId);
65 player.
send(
new SendMessage(
"The obelisk is already active, please wait."));
69 state.put(objectId,
true);
84 protected void execute() {
89 if (players.size() > 0) {
135 ArrayList<ObeliskData> locations =
new ArrayList<>(Arrays.asList(values()));
136 locations.remove(exclude);
Created by Daniel on 2017-11-24.
boolean activate(Player player, int objectId)
static Map< Integer, Boolean > state
void open(Player player, int obj)
boolean activate(Player player, int objectId, ObeliskData destination)
final DialogueFactory execute()
Retrieves the next dialogue in the chain and executes it.
final DialogueFactory sendStatement(String... lines)
Appends a StatementDialogue to the current dialogue chain.
Handles a player teleporting.
static void activateOverride(Mob mob, Position position, TeleportationData teleport)
Handles writing on an itemcontainer.
static void write(InterfaceWriter writer)
Class handles writing on the obelisk itemcontainer.
A game representing a cyclic unit of work.
An randomevent which replaces an object with another object.
Represents the game world.
static void schedule(Task task)
Submits a new event.
static RegionManager getRegions()
final GenericAttributes attributes
void open(int identification)
Opens an interface for the player.
This class represents a character controlled by a player.
DialogueFactory dialogueFactory
final InterfaceManager interfaceManager
void send(OutgoingPacket encoder)
Created by Daniel on 2017-11-24.
static List< Player > getPlayers(Boundary boundary)
Represents a single tile on the game world.
GameObject getGameObject(int id, Position position)
Region getRegion(Position position)
Gets a region by position.
The OutgoingPacket that sends a message to a Players chatbox in the client.
The OutgoingPacket that sends a string to a Players itemcontainer in the client.
Handles miscellaneous methods.
static int random(int bound)
public< K, E > void set(K key, E attribute)
Sets a generic attribute.
static ObeliskData getRandom(ObeliskData exclude)
ObeliskData(int objectId, Boundary boundary)
static ObeliskData forObject(int objectId)
Created by Daniel on 2018-02-07.
Holds all the player right data.
static boolean isSuper(Player player)
Checks if the player has super donator status.
Represents a game object.