Skip to content

feat(WineMaker): add antiban support and out-of-materials hardening#508

Merged
chsami merged 32 commits into
chsami:developmentfrom
mdp18:feat/winemaker-antiban
Jul 2, 2026
Merged

feat(WineMaker): add antiban support and out-of-materials hardening#508
chsami merged 32 commits into
chsami:developmentfrom
mdp18:feat/winemaker-antiban

Conversation

@mdp18

@mdp18 mdp18 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Nate's Wine Maker previously had no antiban at all — a fixed 1000ms loop with no cooldowns, breaks, or mouse humanization. This PR wires in the standard Rs2Antiban framework and hardens the out-of-materials shutdown path.

Antiban (WineScript)

  • Apply the cooking antiban template on start (applyCookingSetup()): play-style profile, fatigue/attention-span simulation, behavioral variability, non-linear intervals, natural mouse
  • Enable random mouse movement as a script default
  • Overlay the user's saved antiban panel settings (Rs2AntibanSettings.loadFromProfile()) after the template, so anything the user toggled in the antiban panel (micro breaks, simulate mistakes, natural mouse, etc.) always wins over the template
  • Early-return in the main loop while an action cooldown or micro break is active
  • Trigger actionCooldown() and (if enabled) takeMicroBreakByChance() after each craft batch (same pattern as FletchingScript)
  • Reset antiban settings on shutdown so they don't leak into other scripts

Out-of-materials handling (WineScript)

  • Previously the script stopped when the bank held fewer than 14 of either material, abandoning a final partial batch — now it withdraws min(14, remaining) and only stops when grapes or jugs of water are actually gone
  • Shutdown sequence now confirms the bank closed before logging out, waits for the logout to complete, sets Microbot.status with the reason, and returns immediately after shutdown() instead of falling through to further bank calls

Version

  • 1.1.11.2.0

Testing

  • ./gradlew compileNatewinemakerJava passes
  • Built and sideloaded against a local microbot-2.6.12.jar client

chsami and others added 29 commits May 10, 2026 18:24
fix(auto-smelting): rewrite bail-on-transient-state checks (chsami#433)
…egressions

The X-based center-line check (CENTER_X=3047) only works near the boats.
South of the boats the fishing areas converge — east-side fish spots,
spirit pool, and fires all have X < 3047, so the filter excluded them.

- Remove isOnOurSide from fish spots (distanceTo rangePoint already scopes)
- Remove isOnOurSide from spirit pool (use distanceTo spiritPoolPoint ≤ 15)
- Remove isOnOurSide from fires, tighten fire range from 35 to 5 tiles
- Remove broken inCloud filter from fish spots (was no-op before cloud fix)
- Fix walkToSpiritPool spam: use distance ≤ 2 instead of exact equality
- Fix client-thread NPEs (Rs2Player.getWorldLocation, fightFiresInPath)
- Remove all isInteracting gates (unreliable), use target-identity checks
- Remove blocking waits, add isMoving guards for non-blocking loop
- Add cloud dodge via LocalPoint comparison (fix coordinate space mismatch)
- Lock tether target on wave tick to prevent oscillation
- Add runtime counter to overlay
- Sort item fetching by proximity
- Use walkFastCanvas/walkFastLocal instead of blocking Rs2Walker.walkTo
Filter out fishing spots where the player's fishing position (adjacent
tile) would be under a fire cloud. Uses inCloud radius 1 which covers
2 tiles from the spot center — enough to detect clouds on any adjacent
tile the player would stand on.
… during incoming waves

The client thread was being saturated with ~20+ invoke() round-trips per
300ms script iteration during waves — inventory queries from
areItemsMissing(), live State.getAllFish()/getTotalAvailableFishSlots()
calls in handleStateLoop(), and state.isComplete() in onGameTick all
dispatched to the client thread while it was at peak load processing
wave NPC spawns. On Mac this stalled rendering for seconds.

During a wave the only valid action is tethering, so the script loop
now short-circuits to handleTether() immediately. onGameTick also
returns early during waves. Additional fixes:

- Replace live State method calls in handleStateLoop with cached values
- Replace live isInMinigame() in overlays with cachedInMinigame
- Remove dead Rs2WorldPoint allocation per fish spot per frame
- Remove pathfinding (distanceToPath) from overlay render loop
- Move state transitions and inventory queries out of overlay render
- Add fire-adjacent fish spot detection and douse-before-fish logic
- Enable fire handling in both solo and mass modes
- Fix fire search radius (35 for solo, 5 for mass)
- Remove Rs2Camera.turnTo before tether, click tether immediately
- Add JVM args and javaLauncher to runDebug task for Mac JDK 11
…gions

All distance checks, fire detection, work area determination, and NPC
lookups now use LocalPoint instead of WorldPoint to avoid template vs
instanced coordinate mismatches. Fixes wrong-side boat pathing, broken
fire detection/dousing, ammo crate not found, and spirit pool spam.
… resilience

All sleepUntil calls in item gathering break immediately on incoming wave
so the script can tether. Removed forfeit-on-fire from item gathering to
prevent skipping items when fires are near crates. Reduced ammo crate
cloud filter radius from 1-2 tiles to 0 (only skip if cloud is directly
on crate). Stale fish spot reference cleared when spot despawns.
Convert finishGame, fetchMissingItems, isOnStartingBoat, FILL ammo crate
sorting, and handleDamagedMast/Totem to use LocalPoint. Slow tether
retries with Rs2Random gaussian. No template-vs-instanced comparisons
remain in functional code.
feat(FarmTreeRun): compost type selection, leprechaun support, and bu…
…c log spam

- Gate item fetching to CATCH states only — handleMinigame was interrupting
  cooking by walking to the water pump when buckets were empty
- Fall back to Rs2Walker.walkTo when LocalPoint.fromWorld returns null
  (player too far for canvas click) in all walk methods
- Move harpoon spec code entirely inside enableHarpoonSpec config check
  so no spec logs emit when the option is disabled
- Prevent fish spot switching while moving to a valid target
- Widen Leave NPC search radius to 40 tiles
- Add wave-break to fire douse sleepUntil in fightFiresInPath
- Reduce fire douse timeout from 10s to 5s
- Use Rs2Random.randomGaussian for tether retry delay
- Add spirit pool coordinate logging for random walk diagnosis
…cking, fire responsiveness

- Simplify CATCH guard: return if animating/moving, allow double spot switch
- Per-game randomized thresholds via fancyNormalSample for all energy/intensity checks
- Repair sleepUntil blocks until mast/totem is actually fixed
- Remove doused fires from sortedFires immediately, validate NPC in adjacency checks
- Drop boat-anchor filter in finishGame, pick nearest Leave NPC to player
- Gate item fetching to CATCH states only (no cooking interruption)
- Tether retry uses fancyNormalSample(1200, 2800)
- Config tooltips explain gameplay effects
- Clean up spirit pool spam logging, add NPC coordinate logging
- Rs2Walker fallback for all walk methods when LocalPoint is null
* Feat/butterfly catcher plugin (chsami#448)

* fix(combat-hotkeys): move prayer toggles off key event thread

Prayer hotkeys were calling Rs2Prayer.toggle() directly on the key
listener thread, causing focus loss and input lag on every press.
Replaced runOnSeperateThread (silently drops calls when the shared
ClientThread future is busy) with a plugin-owned ExecutorService.
Also added a debug overlay panel toggled via config. Bump to v1.1.2.

* feat(butterfly-catcher): add Butterfly Catcher plugin v1.0.0

Automates butterfly and moth catching for Hunter XP.
Supports Ruby Harvest through Moonlight Moth (Varlamore).
Barehanded and butterfly net modes with level/equipment checks on startup.

---------

Co-authored-by: chsami <aintaro@proton.me>

* fix(combat-hotkeys): move prayer toggles off key event thread (chsami#447)

Prayer hotkeys were calling Rs2Prayer.toggle() directly on the key
listener thread, causing focus loss and input lag on every press.
Replaced runOnSeperateThread (silently drops calls when the shared
ClientThread future is busy) with a plugin-owned ExecutorService.
Also added a debug overlay panel toggled via config. Bump to v1.1.2.

Co-authored-by: chsami <aintaro@proton.me>

* feat(birdhouse): disable teleports on Fossil Island, force southern rowboat, chain seaweed plugin (chsami#446)

- Set Rs2Walker.disableTeleports=true once on Fossil Island so the
  digsite pendant is only consumed once (for the initial teleport)
- Walk to southern rowboat before banking to avoid the longer northern route
- Wire up "Start Giant Seaweed after run" config to launch
  GiantSeaweedFarmerPlugin on birdhouse run completion
- Fix withdrawSeeds false warning: use real stack quantity instead of
  Rs2Inventory.count() slot count, and fail fast if <40 seeds
- Add debug section with override start state for testing
- Bump version to 1.1.2

Co-authored-by: runsonmypc <runsonmypc@users.noreply.github.com>

* fix(GiantSeaweedFarmer): broken state detection, stale state, unclean shutdown (chsami#445)

* fix(GiantSeaweedFarmer): replace broken varbit state detection with action+name approach

getSeaweedPatchState() read the varbit from the impostor composition
instead of the base object, returning garbage values that always mapped
to "Weeds" regardless of actual patch state. This caused infinite loops
after harvesting.

Replace with getPatchState() that checks the impostor's actions and name:
Pick→Harvestable, Rake→Weeds, Clear→Dead, Cure→Diseased,
"Seaweed patch" (no Rake)→Empty, "Seaweed"→Growing.

Also fixes: Harvestable case sleepUntil waited for "Empty" (varbit 3)
but post-harvest patches go to Weeds first, causing 20s timeouts every
cycle. Now waits for not-Harvestable which resolves immediately.

* fix(GiantSeaweedFarmer): reset all state on plugin restart

BankSuccess, GSF_Running, and other fields were not reset in run(),
so restarting the plugin reused stale state from the previous run
(e.g. BankSuccess=true skipped banking entirely).

* fix(GiantSeaweedFarmer): clean shutdown via Microbot.stopPlugin

shutdownSequence() now calls Microbot.stopPlugin() which toggles the
plugin off in the client UI, stops both the farmer and spore scripts,
and removes the overlay — instead of just cancelling the script future
while leaving everything else running.

Also: reset BankSuccess in shutdown(), remove dead safetyCheck() method,
remove redundant GSF_Running assignment in plugin startUp().

* fix(GiantSeaweedFarmer): fix typo and wrong description in override config

---------

Co-authored-by: runsonmypc <runsonmypc@users.noreply.github.com>

* fix(FarmTreeRun): remove isAnimating, shared leprechaun helper, withdrawal bugfix (chsami#444)

* fix(FarmTreeRun): remove isAnimating checks, delete planning docs, bump version

- Remove all Rs2Player.isAnimating() checks from the script — they
  cause stalls and are unreliable for gating plugin logic.
- Replace animation waits in handleRakeAction/handleClearAction with
  waitForXpDrop(Skill.FARMING) which is the actual completion signal.
- Replace animation wait in bank() with sleepUntil(Rs2Bank::isOpen).
- Delete docs/superpowers/ planning artifacts accidentally committed.
- Bump plugin version to 1.2.0.

* feat(FarmTreeRun): category toggles, proper shutdown, rake fix

- Add "Run trees", "Run fruit trees", "Run hardwood trees" toggles in
  the sapling selection section to skip entire tree categories at once.
- Plugin properly disables itself via Microbot.stopPlugin() on shutdown.
- Increase rake XP drop wait to 10s and drop weeds immediately after
  raking instead of in the general drop loop.

* feat(FarmTreeRun): shared Rs2Leprechaun helper, fix duplicate-item withdrawal bug

Extract leprechaun compost withdrawal into shared Rs2Leprechaun utility
(included in every plugin JAR alongside PluginConstants). Merge duplicate
itemId entries before bank withdrawal so overlapping protection payments
(e.g. Willow + Banana both needing baskets of apples) sum correctly.

---------

Co-authored-by: runsonmypc <runsonmypc@users.noreply.github.com>

---------

Co-authored-by: stonksCode <99895926+stonksCode@users.noreply.github.com>
Co-authored-by: runsonmypc <45095641+runsonmypc@users.noreply.github.com>
Co-authored-by: runsonmypc <runsonmypc@users.noreply.github.com>
- Two-phase repair sleep: wait for animation start (3s), then wait for
  completion (10s) — prevents premature timeout when walking to repair
- Spirit pool query now requires "Harpoon" action, filtering out inactive
  pools that caused recurring error log spam
Major version bump reflecting the comprehensive rewrite of coordinate
handling, state machine, fire detection, and humanization systems.
…into fix/tempoross

# Conflicts:
#	src/test/java/net/runelite/client/Microbot.java
* fix/geflipper: adapt to FlippingCopilot suggestion type enum change (chsami#467)

- Replace String-based type checks with reflection helpers
- Collapse modify_buy/modify_sell into single isModify path
- Add null guards for highlightOverlays and widget actions/text
- Bump version to 1.2.4

Co-authored-by: afss0 <125560943@users.noreply.github.com>

* fix(BlueDragons): banking, spam loop, combat loop, loot config (chsami#466)

* fix(BlueDragons): banking deposits all, spam loop, safe spot, loot config

- Banking uses depositAllExcept to keep dusty key, runes, rune pouch
- Skip banking on startup when inventory already has food and no loot
- Cancel existing scheduler before starting new one (orphaned futures)
- Increase polling interval from 100ms to 600ms (game tick rate)
- Enforce safe spot before loot check in fighting handler
- Passive loot detection via Rs2GroundItem.exists() instead of looting
- Loot list respects config toggles (dragonhide, ensouled head)
- Replace isAnimating(5000) with Rs2Combat.inCombat() for attack check
- Add loot untradables config option
- Remove broken logOnceToChat dedup, use direct Microbot.log()
- Version bump 1.1.3 → 1.2.0

* fix(BlueDragons): simplify combat loop, safe spot lure, loot config fixes

- Collapse FIGHTING/LOOTING/ESCAPE into single non-blocking COMBAT state
- One action per tick (AIO Fighter pattern): eat → loot → safe spot → attack
- 2.4s grace period after clicks to prevent botlike rapid-fire bouncing
- Wait-for-loot option: detect dragon death animation, wait for drops
- Eat-for-loot option: eat food to free inventory space for loot
- Filter dead dragons from attack targets (no spam-clicking death animation)
- Only attack from safe spot; natural lure pattern emerges from tick logic
- Value-based loot respects dragonhide toggle via ignored names
- Change lootDragonhide default to false
- Skip banking on startup/combat when inventory is full of food (no loot)

---------

Co-authored-by: runsonmypc <runsonmypc@users.noreply.github.com>

* Feature/pitfall (chsami#460)

* Start to Pitfall

* Shitty working start

* MVP

* Pitfall

* More improvements

* Functional

---------

Co-authored-by: chsami <aintaro@proton.me>
Co-authored-by: stonksCode <99895926+stonksCode@users.noreply.github.com>
Co-authored-by: runsonmypc <45095641+runsonmypc@users.noreply.github.com>
Co-authored-by: runsonmypc <runsonmypc@users.noreply.github.com>
Co-authored-by: Bender <admin@newgeneng.com>

---------

Co-authored-by: afss0 <125560943+afss0@users.noreply.github.com>
Co-authored-by: afss0 <125560943@users.noreply.github.com>
Co-authored-by: runsonmypc <45095641+runsonmypc@users.noreply.github.com>
Co-authored-by: runsonmypc <runsonmypc@users.noreply.github.com>
Co-authored-by: Tanner <10541121+TannerIsBender@users.noreply.github.com>
Co-authored-by: stonksCode <99895926+stonksCode@users.noreply.github.com>
Co-authored-by: Bender <admin@newgeneng.com>
fix(autofishing): improve banking with Rs2Bank API, fix cooking spam clicks, added logout on, out of materials, level checks, and interrupt guards (chsami#470
- Raise eat threshold from ~30% to ~60% HP (Gaussian-randomized) so the
  bot eats sooner and survives longer between kills.
- Never bank mid-kill: only restock food before animating the next suit,
  when fewer than two food remain. Prevents losing the suit to a bank trip
  in the middle of a fight.
- Add an emergency mid-fight bank as a last resort only (food empty AND
  HP <= ~20%) to avoid dying outright.
- Rework armoury navigation: walk with a distance tolerance instead of an
  exact tile (the slow, re-pathing invocation), with an explicit door-open
  fallback (IDs 24309/24306) if the walker stalls on the wrong side.
- Guard armour-stand targeting on arrival distance and null-guard
  getWorldLocation() so we re-walk instead of failing the lookup.
- Eat opportunistically during the animate delay, one tick after the
  animate click, when it won't overheal (missing HP >= the food's heal).
- Handle InterruptedException in the loop: restore the flag and exit
  quietly instead of logging a misleading ERROR on stop/restart.
- Adopt the queryable cache API (Rs2TileObjectModel.click()) for the
  armour stand; bump plugin version 1.0.1 -> 1.0.2.
…ck hammer)

The Slayer plugin lacked the ability to use finishing items on monsters
that require them (desert lizards, rockslugs, gargoyles). This adds:

- Item-on-NPC finishing during combat when monsters reach low HP
- Automatic withdrawal of finishing items from bank (quantity = remaining kills)
- Banking trigger when finishing items are depleted
- Vanilla autokill varbit checks to skip when player has auto-finish enabled
- Inventory-full guard with log warning
Reviewed for critical/security issues, malicious code, and plugin version bump. No blocking issues found.
…tems

Reviewed for critical/security issues, malicious code, and plugin version bump. No blocking issues found.
Development Build is green; merging development into main.
Promote the current development branch, including the agility mark-of-grace looting fix and QoL camera yaw API compatibility fix.
chore: promote development to main
- Wire in Rs2Antiban with the cooking setup template (play style,
  fatigue/attention simulation, natural mouse, action cooldowns)
- Enable micro breaks and random mouse movement
- Trigger action cooldown / micro break chance after each craft batch
- Reset antiban settings on shutdown
- Use up remaining partial batches instead of stopping at <14 materials
- Confirm bank close and logout before stopping the plugin when out
  of grapes or jugs of water
- Bump version to 1.2.0
@mdp18 mdp18 force-pushed the feat/winemaker-antiban branch from 307a0e8 to bb2b37f Compare July 1, 2026 20:57
@mdp18 mdp18 changed the base branch from main to development July 1, 2026 20:58
@chsami chsami merged commit 1486d5e into chsami:development Jul 2, 2026
1 check passed
@chsami chsami mentioned this pull request Jul 2, 2026
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.

3 participants