Skip to content

Exposed stamina pot usage and auto run settings inside the main microbot setting menu#1789

Open
Besevse wants to merge 3 commits into
chsami:mainfrom
Besevse:chore/expose-microbot-settings
Open

Exposed stamina pot usage and auto run settings inside the main microbot setting menu#1789
Besevse wants to merge 3 commits into
chsami:mainfrom
Besevse:chore/expose-microbot-settings

Conversation

@Besevse
Copy link
Copy Markdown

@Besevse Besevse commented May 29, 2026

Adds two toggles to the Microbot plugin config panel under a new Movement section:

  • Enable auto run — controls whether run is automatically toggled on when the player has energy
  • Use stamina potions — controls whether stamina/energy potions are automatically used when run energy is low

Why?
To give the user more control over this behaviour without needing to install any additional plugins - the logic for this is inside (https://github.com/chsami/Microbot/blob/main/runelite-client/src/main/java/net/runelite/client/plugins/microbot/Script.java#L96) the client and it automatically triggers and some users may wonder whats causing this despite all plugins being disabled, it also gives user feedback on whether a specific plugin has enabled/disabled it without needing seperate UI for it in the plugin.

How it works

Both settings map to the existing Microbot.enableAutoRunOn and Microbot.useStaminaPotsIfNeeded static fields that plugins in the hub already read/write. The config is kept in sync with the runtime state on every script tick, so if a plugin overrides either value the checkbox in the UI will reflect that automatically.

Notes

  • Some have pointed out that this is already solved in QoL plugin on the hub but since client controls the logic for it it should also be modifiable from the client without needing any external plugins
  • Many hub plugins set these flags directly (e.g. disabling auto run for stationary skilling scripts, enabling it for
    combat/agility). This PR doesn't change that behaviour — it just makes the current state visible to the user.
  • The Movement section description notes that plugins may override these values and that changes will be reflected in the UI.
  • Auto-login logic was intentionally excluded from this PR as it warrants separate discussion.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 29, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 426e4a36-415f-40df-8599-d339a99165fc

📥 Commits

Reviewing files that changed from the base of the PR and between 204c4bd and 76bf77e.

📒 Files selected for processing (3)
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/MicrobotConfig.java
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/MicrobotPlugin.java
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/Script.java

Walkthrough

This PR adds a new Movement configuration section to MicrobotConfig with two boolean settings: enableAutoRunOn and useStaminaPotsIfNeeded, both defaulting to true. MicrobotPlugin initializes these flags from configuration on startup and updates Microbot runtime state when the settings change. The Script class then synchronizes the current runtime values back to the configuration manager during execution.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: exposing stamina pot and auto-run settings in the Microbot config menu through a new Movement section.
Description check ✅ Passed The description is well-related to the changeset, explaining the two new toggles, their purpose, implementation details, and rationale for the changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant