Boost Indicator
IntermediateDisplayShows which skills are currently boosted above their base level. Displays boost amounts and remaining time.
15 min read
What It Does
Shows which skills are currently boosted above their base level. Displays boost amounts and remaining time.
Source Code
java
1package com.example;
2
3import net.runelite.api.Client;
4import net.runelite.api.Skill;
5import net.runelite.client.ui.overlay.Overlay;
6import net.runelite.client.ui.overlay.OverlayManager;
7import net.runelite.client.plugins.Plugin;
8import net.runelite.client.plugins.PluginDescriptor;
9import javax.inject.Inject;
10import java.awt.*;
11
12@PluginDescriptor(
13 name = "Boost Indicator",
14 description = "Shows skill boosts"
15)
16public class BoostIndicatorPlugin extends Plugin {
17 @Inject
18 private Client client;
19
20 @Inject
21 private OverlayManager overlayManager;
22
23 private final Overlay overlay = new Overlay() {
24 @Override
25 public Dimension render(Graphics2D graphics) {
26 graphics.setColor(Color.WHITE);
27 int y = 20;
28
29 for (Skill skill : Skill.values()) {
30 int realLevel = client.getRealSkillLevel(skill);
31 int boostedLevel = client.getBoostedSkillLevel(skill);
32 int boost = boostedLevel - realLevel;
33
34 if (boost != 0) {
35 Color color = boost > 0 ? Color.GREEN : Color.RED;
36 graphics.setColor(color);
37 graphics.drawString(
38 skill.getName() + ": " + boost,
39 10, y
40 );
41 y += 15;
42 }
43 }
44
45 return new Dimension(150, y);
46 }
47 };
48
49 @Override
50 protected void startUp() {
51 overlayManager.add(overlay);
52 }
53
54 @Override
55 protected void shutDown() {
56 overlayManager.remove(overlay);
57 }
58}Code Annotations
Line 28
Iterate through all skills
Line 30
Get real and boosted levels
Line 31
Calculate boost amount
Line 34
Only show skills with boosts