Repository navigation
fix(antiban): stop full inventory from freezing the action cooldown - #2270
Conversation
The farming, prayer and construction categories counted a full inventory as busy. Under universal antiban the cooldown pauses scripts and only counts down while the category is not busy, so a full inventory held the pause open forever and the paused script could never free a slot. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. WalkthroughThe farming, prayer, and construction categories now report busy only while the player is animating. A new test checks universal cooldown behavior for these activities with a full inventory. It verifies that cooldowns do not decrement during animation, then reach zero and end after animation stops. Merge Risk:
|
Problem
In-client bug report MB-6MCFX8, reported against the Hub plugin HerbrunPlugin 1.2.3 on client 2.6.57. Still present on
developmentat c6c08fb.With universal antiban enabled, Herb runner stops at a herb patch once the inventory is full and never continues. The action cooldown starts, the script is paused, and the cooldown never counts down, so the pause is never released. Nothing tells the player why the script is standing still, and the Antiban panel keeps showing the player as busy.
Root cause
SKILLING_FARMING,SKILLING_PRAYERandSKILLING_CONSTRUCTIONinCategory.javareported the category as busy whenRs2Player.isAnimating() || Rs2Inventory.isFull().AntibanPlugin.performActionBreakonly decrements the cooldown timeout while the category is not busy, and only releases a busy pause for combat categories. A paused script cannot empty its inventory, so a full inventory kept the category busy, the timeout frozen and the scripts paused forever.Change
Dropped the inventory-full term from those three categories. They are now busy only while the player is animating, so the cooldown counts down once the picking animation ends and the pause is released as usual.
AntibanPlugin.javais unchanged.Validation
universalCooldownCountsDownWithFullInventoryInInventorySkillingCategoriestoRs2AntibanActionCooldownTest. For farming, prayer and construction with a full inventory it checks that the cooldown holds while animating, then reaches 0, clearsactionCooldownActiveand releasespauseAllScriptsonce the animation stops../gradlew :client:runUnitTests --tests '*Rs2AntibanActionCooldownTest': BUILD SUCCESSFUL, 15/15 tests passed including the new one.Known gaps
Category.SKILLING(busy whenever the player is not animating or the inventory is not full) is a different inverted check, used only byActivity.KILLING_ZALCANO, and is untouched.SKILLING_RUNECRAFTis busy while the inventory contains essence and is reachable throughActivity.fromSkill(RUNECRAFT). A cooldown that starts while essence is in the inventory could freeze in the same way. A central alternative would be forAntibanPlugin.performActionBreakto count down whenever scripts are already paused by the cooldown, instead of relying on each category's busy check.🤖 Generated with Claude Code