RuneHive-Game
Loading...
Searching...
No Matches
SkotizoEvent.java
Go to the documentation of this file.
1package com.runehive.game.world.entity.combat.strategy.npc.boss.skotizo;
2
3import com.runehive.game.task.Task;
4import com.runehive.game.world.World;
5import com.runehive.util.Stopwatch;
6
7import java.util.concurrent.TimeUnit;
8
9public class SkotizoEvent extends Task {
10 private boolean initial;
12
13 public SkotizoEvent() {
14 super(false, 100);
15 this.initial = true;
16 }
17
18 @Override
19 public void execute() {
21 initial = true;
22 stopwatch.reset();
23 }
24
25 if (initial) {
26 if (stopwatch.elapsedTime(TimeUnit.MINUTES) >= 120) {
28 initial = false;
29 stopwatch.reset();
30 }
31 return;
32 }
33
34 if (stopwatch.elapsedTime(TimeUnit.MINUTES) >= 20) {
35 initial = true;
36 stopwatch.reset();
37 if (SkotizoUtility.skotizo != null) {
38 SkotizoUtility. skotizo.speak("Pathetic humans could not kill me! Muhahaha");
40 }
41 World.sendMessage("<icon=6><col=8714E6> Skotizo has disappeared! He will return in 60 minutes.");
42 }
43 }
44}
Task(boolean instant, int delay)
Creates a new Task.
Definition Task.java:41
Represents the game world.
Definition World.java:46
static void schedule(Task task)
Submits a new event.
Definition World.java:247
static void sendMessage(String... messages)
Sends a global message.
Definition World.java:396
void execute()
A function representing the unit of work that will be carried out.
void unregister()
Unregisters an entity from the World.
Definition Npc.java:126
static Stopwatch start()