RuneHive-Game
Loading...
Searching...
No Matches
FlameWalk.java
Go to the documentation of this file.
1package com.runehive.content.wintertodt.actions;
2
3import com.runehive.game.action.Action;
4import com.runehive.game.action.policy.WalkablePolicy;
5import com.runehive.game.world.entity.mob.npc.Npc;
6import com.runehive.game.world.position.Position;
7
8public class FlameWalk extends Action<Npc> {
9
10 public FlameWalk(Npc mob) {
11 super(mob, 1);
12 }
13
14 @Override
18
19 @Override
20 public String getName() {
21 return "Walk flame";
22 }
23
24 @Override
25 protected void execute() {
26 if(getMob().getPosition().equals(new Position(1630, 4006)) || getMob().getPosition().equals(new Position(1629, 4007)) || getMob().getPosition().equals(new Position(1631, 4007))) {
27 getMob().action.getCurrentAction().cancel();
28 getMob().unregister();
29 }
30 }
31}
void execute()
A function representing the unit of work that will be carried out.
String getName()
Gets the name of this action.
WalkablePolicy getWalkablePolicy()
Gets the WalkablePolicy of this action.
T getMob()
Gets the player.
Definition Action.java:44
final T mob
The Mob associated with this ActionEvent.
Definition Action.java:15
Action(T mob, int delay, boolean instant)
Creates a new Action randomevent.
Definition Action.java:24
Represents a non-player character in the in-game world.
Definition Npc.java:29
Represents a single tile on the game world.
Definition Position.java:14
A queue policy determines whether the action can occur while walking.
WALKABLE
This indicates actions may occur while walking.