Upkeep
Upkeep is a disabled-by-default automation plugin that monitors vital player attributes and automatically consumes pre-configured items (food, potions, hearts) when stats or timers degrade below user-defined thresholds.
It adapts the observation models from RuneLite's packaged BoostsPlugin (for tracking real vs. boosted levels, boost deltas, and stat drain ticks) and TimersAndBuffsPlugin (for tracking antifire, venom/poison immunity, stamina, and divine potion timers), coupling them with n3 automation (Api, InventoryActions, TabActions, BreakHandler, and 3-tick consumable pacing).
Supported Monitors
-
Health Monitor:
- Triggers when current HP % falls below the configured threshold.
- Respects optional overheal protection to prevent consuming food when already at maximum health.
- Configurable food and brew supplies (e.g. Shark, Cooked karambwan, Saradomin brew).
-
Prayer Monitor:
- Triggers when current prayer points fall below the configured threshold.
- Automatically resolves all dose variants (4, 3, 2, 1) and prioritizes lowest dose first.
- Configurable prayer restoratives (e.g. Prayer potion, Super restore, Moonlight potion).
-
Run Energy Monitor:
- Triggers when run energy falls below the configured threshold.
- Optional setting to only consume energy supplies while moving.
- Configurable energy restoratives (e.g. Stamina potion, Super energy, Energy potion).
-
Antifire Monitor:
- Tracks active antifire and super antifire duration via game varbits.
- Triggers when remaining duration falls below the configured threshold in seconds.
- Configurable antifire potions (e.g. Extended super antifire, Super antifire, Antifire potion).
-
Venom & Poison Monitor:
- Detects active venom or poison via player varps and immediately cures.
- Tracks immunity duration and refreshes immunity when remaining seconds fall below the configured threshold.
- Configurable cures (e.g. Anti-venom+, Anti-venom, Antipoison, Superantipoison, Sanfew serum).
-
Combat Boost Monitors (Melee, Ranged, Magic):
- Melee Boost: Tracks Attack, Strength, or Defence (configurable: lowest of Attack/Strength, Attack only, Strength only) and re-pots when boost delta (
boosted - real) degrades to or below the configured threshold. Synchronizes with active divine combat potion timers. - Ranged Boost: Tracks Ranged boost delta and re-pots when boost degrades to or below the configured threshold. Synchronizes with divine ranging and divine bastion potion timers.
- Magic Boost: Tracks Magic boost delta and re-pots or uses Imbued/Saturated Heart when boost degrades to or below the configured threshold. Dynamically uses the "Invigorate" action for hearts and checks heart cooldowns.
- Melee Boost: Tracks Attack, Strength, or Defence (configurable: lowest of Attack/Strength, Attack only, Strength only) and re-pots when boost delta (
Execution and Safety Boundaries
- Priority Hierarchy: When multiple attributes require restoration on the same tick, Upkeep follows a strict priority order:
Health$\rightarrow$Venom/Poison$\rightarrow$Prayer$\rightarrow$Antifire$\rightarrow$Melee Boost$\rightarrow$Ranged Boost$\rightarrow$Magic Boost$\rightarrow$Run Energy. - Consumable Pacing: Enforces a 3-tick (1.8s) action cooldown between consumables to match game engine limits and prevent double-drinking before server synchronization.
- Safety Pausing: Pauses automation while the bank, deposit box, or active dialogue interfaces are open.
- Break Handler Integration: Registers on startup, tracks only while active, and pauses on scheduled breaks.
- Inventory Tab Management: When
autoOpenInventoryTabis enabled and supplies require consumption while another tab is active, Upkeep queries the background inventory container to verify item availability. If candidate supplies exist, it switches to the Inventory tab and waits one tick for interface widgets to render before consuming. - Tag-Stripping Supply Resolution: Strips RuneLite color tags (
<col=...>and</col>) from widget names and action strings during supply resolution, matching canonical item names, wildcards, and dose patterns regardless of client text styling. - HUD Overlay: Renders an on-screen status overlay showing enabled monitors, current values, thresholds, remaining timer countdowns, and active cooldowns.