RuneHive-Tarnish
Neural OSRS Enhancement Framework
Loading...
Searching...
No Matches
LMSGameEvent.java
1
package
com.osroyale.content.lms;
2
3
import
com.osroyale.content.lms.crate.LMSCrate;
4
import
com.osroyale.content.lms.lobby.LMSLobby;
5
import
com.osroyale.game.task.Task;
6
26
27
public
class
LMSGameEvent
extends
Task
{
28
29
public
LMSGameEvent() {
30
super(1);
31
}
32
33
@Override
34
protected
void
execute
() {
35
if
(!
LMSGame
.
gameInProgress
)
return
;
36
37
LMSGame
.
updateInterface
();
38
LMSGame
.
gamePlayers
.stream().forEach(player ->
LMSGame
.
processPlayer
(player));
39
40
LMSGame
.
gameTicks
++;
41
LMSGame
.
crateTicks
++;
42
43
if
(
LMSGame
.
crateTicks
== 300) {
44
LMSGame.crateTicks
= 0;
45
if
(
LMSGame
.
lmsCrate
==
null
)
46
LMSGame.lmsCrate
=
new
LMSCrate
();
47
}
48
49
if
(
LMSGame
.
gameTicks
== 100)
50
LMSGame
.
setupSafezone
();
51
52
if
(
LMSGame
.
gameTicks
>= 100)
53
LMSGame
.
handleFog
();
54
55
if
(--
LMSGame
.
startingTicks
>= 0) {
56
if
(
LMSGame
.
startingTicks
> 0)
57
LMSGame
.
gamePlayers
.stream().forEach(player -> player.speak(
LMSGame
.
startingTicks
+
".."
));
58
else
if
(
LMSGame
.
startingTicks
== 0) {
59
LMSGame
.
gamePlayers
.stream().forEach(player -> player.speak(
"FIGHT!"
));
60
LMSGame.canAttack
=
true
;
61
}
62
}
63
}
64
65
}
com.osroyale.content.lms.LMSGameEvent.execute
void execute()
Definition
LMSGameEvent.java:34
com.osroyale.content.lms.LMSGame
Definition
LMSGame.java:75
com.osroyale.content.lms.LMSGame.handleFog
static void handleFog()
Definition
LMSGame.java:576
com.osroyale.content.lms.LMSGame.updateInterface
static void updateInterface()
Definition
LMSGame.java:597
com.osroyale.content.lms.LMSGame.gamePlayers
static List< Player > gamePlayers
Definition
LMSGame.java:80
com.osroyale.content.lms.LMSGame.gameTicks
static int gameTicks
Definition
LMSGame.java:102
com.osroyale.content.lms.LMSGame.setupSafezone
static void setupSafezone()
Definition
LMSGame.java:501
com.osroyale.content.lms.LMSGame.processPlayer
static void processPlayer(Player player)
Definition
LMSGame.java:535
com.osroyale.content.lms.LMSGame.gameInProgress
static boolean gameInProgress
Definition
LMSGame.java:85
com.osroyale.content.lms.LMSGame.crateTicks
static int crateTicks
Definition
LMSGame.java:112
com.osroyale.content.lms.LMSGame.canAttack
static boolean canAttack
Definition
LMSGame.java:90
com.osroyale.content.lms.LMSGame.startingTicks
static int startingTicks
Definition
LMSGame.java:107
com.osroyale.content.lms.LMSGame.lmsCrate
static LMSCrate lmsCrate
Definition
LMSGame.java:117
com.osroyale.content.lms.crate.LMSCrate
Definition
LMSCrate.java:36
com.osroyale.game.task.Task.Task
Task(boolean instant, int delay)
Definition
Task.java:75