Skip to content

fix(TitheFarming): use instance-aware walking for deposit sack#499

Merged
chsami merged 1 commit into
chsami:developmentfrom
tmnlbus:fix/tithe-farm-deposit-sack-instance-coords
Jun 25, 2026
Merged

fix(TitheFarming): use instance-aware walking for deposit sack#499
chsami merged 1 commit into
chsami:developmentfrom
tmnlbus:fix/tithe-farm-deposit-sack-instance-coords

Conversation

@tmnlbus

@tmnlbus tmnlbus commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Bug

When the deposit fruit threshold is reached inside the Tithe Farm minigame, the character teleports out instead of depositing fruits into the sack.

Root Cause

depositSack() called interactWithObject(ObjectID.TITHE_SACK_OF_FRUIT_EMPTY, null) which uses raw WorldLocation coordinates for its distance check. Inside the instanced Tithe Farm, the sack's world coordinates are ~12,542 tiles away from the player's actual position. This causes the 51-tile distance threshold in interactWithObject() to fail, which then calls Rs2Walker.walkTo() — a web-walker that route-plans the character out of the minigame via teleport.

Logs showing the issue:

Storing fruits into sack for experience...
Object id 27431 is 12542 tiles away, walking...
[WebWalk] goal=WorldPoint(x=11116, y=16036, plane=0) at=WorldPoint(x=1814, y=3494, plane=0)

Fix

Replace interactWithObject() with the same instance-safe pattern already used by walkToBarrel() and coreLoop():

  • Query the sack object
  • Check distanceTo2D against the player's actual world location
  • Use walkMiniMap() for local movement (stays within the instance)
  • Click the sack directly

The depositSack() method used interactWithObject() which calculates
distance using raw WorldLocation coordinates. In the instanced Tithe
Farm minigame, the sack object's world coordinates are ~12500 tiles
away from the player's actual position, causing the 51-tile distance
check in interactWithObject() to fail and Rs2Walker.walkTo() to
web-walk the character out of the minigame via teleport.

Replace interactWithObject() with the same instance-safe pattern used
by walkToBarrel() and coreLoop(): query the sack, check distanceTo2D
against the player's actual world location, use walkMiniMap() for local
movement, then click directly.
@tmnlbus tmnlbus force-pushed the fix/tithe-farm-deposit-sack-instance-coords branch from 95db587 to da2a59d Compare June 22, 2026 17:36
@tmnlbus tmnlbus changed the base branch from development to main June 22, 2026 17:49
@chsami chsami changed the base branch from main to development June 25, 2026 15:40
@chsami chsami merged commit 12895cc into chsami:development Jun 25, 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.

2 participants