RuneHive-Tarnish
Neural OSRS Enhancement Framework
Loading...
Searching...
No Matches
FletchKindling.java
1
package
com.osroyale.content.wintertodt.actions;
2
3
import
com.osroyale.Config;
4
import
com.osroyale.content.wintertodt.Wintertodt;
5
import
com.osroyale.content.wintertodt.WintertodtAction;
6
import
com.osroyale.game.world.entity.mob.player.Player;
7
import
com.osroyale.game.world.entity.skill.Skill;
8
import
com.osroyale.game.world.items.Item;
9
28
29
public
class
FletchKindling
extends
WintertodtAction {
30
31
int
tick, amount;
32
33
public
FletchKindling(
Player
player,
int
amount) {
34
super(player);
35
this.amount = amount;
36
}
37
38
@Override
39
protected
void
execute
() {
40
41
if
(!
getMob
().inventory.contains(
Wintertodt
.
BRUMA_ROOT
)) {
42
getMob
().animate(65535);
43
getMob
().action.getCurrentAction().cancel();
44
return
;
45
}
46
47
if
(tick % 3 == 0) {
48
getMob
().animate(1248);
49
50
getMob
().inventory.remove(
new
Item(
Wintertodt
.
BRUMA_ROOT
));
51
getMob
().inventory.add(
new
Item(
Wintertodt
.BRUMA_KINDLING));
52
getMob
().inventory.refresh();
53
double
xp =
Skill
.
getLevelForExperience
(
getMob
().skills.get(
Skill
.
FLETCHING
).getExperience()) * 0.6;
54
if
(xp > 0)
getMob
().skills.addExperience(
Skill
.
FLETCHING
, xp *
Config
.
FLETCHING_MODIFICATION
);
55
56
amount--;
57
if
(amount <= 0) {
58
getMob
().animate(65535);
59
getMob
().action.getCurrentAction().cancel();
60
return
;
61
}
62
}
63
tick++;
64
}
65
66
}
com.osroyale.Config
Definition
Config.java:61
com.osroyale.Config.FLETCHING_MODIFICATION
static final double FLETCHING_MODIFICATION
Definition
Config.java:301
com.osroyale.content.wintertodt.Wintertodt
Definition
Wintertodt.java:68
com.osroyale.content.wintertodt.Wintertodt.BRUMA_ROOT
static final int BRUMA_ROOT
Definition
Wintertodt.java:90
com.osroyale.content.wintertodt.actions.FletchKindling.execute
void execute()
Definition
FletchKindling.java:39
com.osroyale.game.action.Action.getMob
T getMob()
Definition
Action.java:44
com.osroyale.game.world.entity.mob.player.Player
Definition
Player.java:162
com.osroyale.game.world.entity.skill.Skill
Definition
Skill.java:55
com.osroyale.game.world.entity.skill.Skill.FLETCHING
static final int FLETCHING
Definition
Skill.java:85
com.osroyale.game.world.entity.skill.Skill.getLevelForExperience
static final byte getLevelForExperience(double experience)
Definition
Skill.java:483