RuneHive-Tarnish
Neural OSRS Enhancement Framework
Loading...
Searching...
No Matches
SpadeAction.java
1package com.osroyale.game.action.impl;
2
3import com.osroyale.net.packet.out.SendMessage;
4import com.osroyale.game.Animation;
5import com.osroyale.game.action.Action;
6import com.osroyale.game.action.policy.WalkablePolicy;
7import com.osroyale.game.world.entity.mob.player.Player;
8import com.osroyale.content.activity.impl.barrows.BarrowsUtility;
9
15public final class SpadeAction extends Action<Player> {
16
17 public SpadeAction(Player player) {
18 super(player, 2, false);
19 }
20
21 @Override
22 protected void onSchedule() {
23 getMob().movement.reset();
24 getMob().animate(new Animation(830));
25 getMob().send(new SendMessage("You start digging..."));
26 }
27
28 @Override
29 public void execute() {
30 boolean found = false;
31
32 if (BarrowsUtility.teleportPlayer(getMob()))
33 found = true;
34
35 if (!found)
36 getMob().send(new SendMessage("You found nothing of interest."));
37 cancel();
38 }
39
40 @Override
43
44
45 @Override
46 public boolean prioritized() {
47 return false;
48 }
49
50 @Override
51 public String getName() {
52 return "Spade Action";
53 }
54}
Action(T mob, int delay, boolean instant)
Definition Action.java:24
synchronized final void cancel()
Definition Task.java:147