RuneHive-Game
Loading...
Searching...
No Matches
InfernoBoss.java
Go to the documentation of this file.
1package com.runehive.content.activity.inferno;
2
3import com.runehive.game.Animation;
4import com.runehive.game.task.Task;
5import com.runehive.game.world.World;
6import com.runehive.game.world.entity.mob.npc.Npc;
7import com.runehive.game.world.entity.mob.player.Player;
8import com.runehive.game.world.position.Position;
9import com.runehive.net.packet.out.SendMessage;
10
11public class InfernoBoss extends Task {
12
13 private int tick;
14
15 public InfernoBoss() {
16 super(1);
17 this.tick = 0;
18 // TODO Auto-generated constructor stub
19 }
20
21 public void spawnbosswave(Player player) {
22
23 Npc mager = new Npc(7703, new Position(2264, 5351, 0));
24 Npc ranger = new Npc(7702, new Position(2271, 5350, 0));
25 Npc Jad = new Npc(7700, new Position(2269, 5345, 0));
26 Npc Healer = new Npc(7750, new Position(2276, 5363, 0));
27 Npc Healer1 = new Npc(7750, new Position(2280, 5363, 0));
28 Npc Healer2 = new Npc(7750, new Position(2266, 5363, 0));
29 Npc Healer3 = new Npc(7750, new Position(2262, 5363, 0));
30 Npc Glyph = new Npc(7707, new Position(2270, 5363, 0));
31 Npc TzKalZuk = new Npc(7706, new Position(2268, 5362, 0));
32
33 player.send(new SendMessage("@red@ Inferno Boss Wave has begun!"));
34 // World.sendMessage("@red@" + player.getName() + " has just Started the Inferno!!");
35 World.schedule(new Task(1) {
36
37 @Override
38 protected void execute() {
39 // when does the
40 // my code for it is broken aswell feelsbad
41 switch (tick) {
42 case 0:
43 Glyph.register();
44 Glyph.face(new Position(2271, 1));
45 break;
46 case 1:
47 TzKalZuk.register();
48 TzKalZuk.animate(new Animation(7563));
49 TzKalZuk.face(new Position(2271, 1));
50 break;
51 case 2:
52
53 Glyph.walkExactlyTo(new Position(2257, 5361, 0), () -> {
54 System.err.println("WALKING GLYPH TO SET POSITION!");
55 });
56
57 // for(int i = 0; i > Glyph.getCurrentHealth(); i++) {
58
59 // }
60 break;
61 case 3:
62 mager.register();
63 ranger.register();
64 if (Glyph.getCurrentHealth() <= 10) {
65 mager.attack(Glyph);
66 ranger.attack(Glyph);
67 } else {
68 mager.attack(player);
69 ranger.attack(player);
70 }
71 break;
72 }
73 tick++;
74 }
75 });
76 }
77
78 protected void execute() {
79 // TODO Auto-generated method stub
80
81 }
82
83}
void execute()
A function representing the unit of work that will be carried out.
Class that models a single animation used by an entity.
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
void face(GameObject object)
Sets the client update flag to face a certain direction.
Definition Mob.java:289
void walkExactlyTo(Position position)
Definition Mob.java:384
Represents a non-player character in the in-game world.
Definition Npc.java:29
void register()
Registers an entity to the World.
Definition Npc.java:112
This class represents a character controlled by a player.
Definition Player.java:125
Represents a single tile on the game world.
Definition Position.java:14
The OutgoingPacket that sends a message to a Players chatbox in the client.