RuneHive-Tarnish
Neural OSRS Enhancement Framework
Loading...
Searching...
No Matches
PestControlLobby.java
1package com.osroyale.content.activity.impl.pestcontrol;
2
3import com.osroyale.content.activity.lobby.LobbyManager;
4import com.osroyale.content.activity.lobby.LobbyNode;
5import com.osroyale.game.world.entity.mob.player.Player;
6import com.osroyale.game.world.position.Position;
7
50
51public class PestControlLobby extends LobbyManager {
52
54 private static final PestControlLobby PEST_CONTROL = new PestControlLobby();
55
57 private static final int GAME_CAPACITY = 1;
58
60 private static final int PLAYER_CAPACITY = 25;
61
63 private static final int LOBBY_COOLDOWN = 50;
64
66 private static final int GAME_COOLDOWN = 1000;
67
69 private static final int MINIMUM_PLAYERS = 3;
70
72 private static final Position INSIDE_BOAT_POSITION = new Position(2661, 2639);
73
75 private PestControlLobby() {
76 super(GAME_CAPACITY, PLAYER_CAPACITY, MINIMUM_PLAYERS, LOBBY_COOLDOWN, GAME_COOLDOWN);
77 }
78
84 public static void joinBoat(Player player) {
85 PEST_CONTROL.enter(player);
86 }
87
89 public static void sequence() {
90 PEST_CONTROL.sequenceActive();
91 }
92
93 @Override
94 protected void onEnter(Player player) {
95 player.move(INSIDE_BOAT_POSITION);
96 player.message(true, "You have entered the pest control boat.");
97 }
98
99 @Override
100 protected void onLeave(Player player) {
101 player.message(true, "You have left the pest control waiting boat.");
102 }
103
104 @Override
105 protected void exceededPlayerCapacity(Player player) {
106 player.message("This boat doesn't need any more players.");
107 }
108
109 @Override
110 protected void exceededGameCapacity(Player player) {
111 player.message("A game is already active. Please wait for the next boat to depart.");
112 }
113
114 @Override
115 protected LobbyNode createLobby() {
116 return new PestControlGame(PEST_CONTROL);
117 }
118
119}
void move(Position position)
Definition Mob.java:377