Feat/depositboxlocation#1784
Conversation
Release 2.6.2
Merge development into main
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughThis pull request adds a new deposit box location, 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/depositbox/DepositBoxLocation.java`:
- Around line 83-84: In DepositBoxLocation.hasRequirements(), add a specific
case for SACRED_GROVE so it no longer falls through to the default true; check
the player's quest state with Rs2Player.getQuestState(Quest.THE_RED_REEF) ==
QuestState.FINISHED (and optionally require Rs2Player.isMember() like other
member-only locations) and return the result for SACRED_GROVE; this ensures
Rs2DepositBox.getNearestDepositBox() will not return the Sacred Grove for
players who haven't completed The Red Reef.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 00aeba41-2687-4290-b333-d2301565a280
📒 Files selected for processing (1)
runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/depositbox/DepositBoxLocation.java
| ZANARIS(new WorldPoint(2382, 4462, 0)), | ||
| SACRED_GROVE(new WorldPoint(3201, 2467, 0)); |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Search for Sacred Grove references to understand access requirements
# Search for Sacred Grove related quest or access logic
rg -i "sacred.grove" --type java -C 3
# Check if there are any quest constants related to Sacred Grove
rg -i "TAIL.*TWO.*CATS|ICTHLARIN" --type java -C 2Repository: chsami/Microbot
Length of output: 50371
🏁 Script executed:
#!/bin/bash
set -euo pipefail
FILE="runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/depositbox/DepositBoxLocation.java"
# Show enum constants area around where SACRED_GROVE was added
echo "=== Enum constants (around 60-120) ==="
sed -n '60,120p' "$FILE" | nl -ba -w2 -s':'
# Show hasRequirements switch area around the alleged line 256 default
echo
echo "=== hasRequirements() (around 200-320) ==="
# Find hasRequirements definition line number
grep -n "hasRequirements" -n "$FILE" | head -n 20
HAS_REQ_LINE=$(grep -n "hasRequirements" "$FILE" | head -n 1 | cut -d: -f1)
START=$((HAS_REQ_LINE-60))
END=$((HAS_REQ_LINE+120))
sed -n "${START},${END}p" "$FILE" | nl -ba -w2 -s':'
# Find Rs2DepositBox.getNearestDepositBox usage of hasRequirements
echo
echo "=== Rs2DepositBox.getNearestDepositBox() filtering ==="
rg -n "class Rs2DepositBox|getNearestDepositBox" -S --type java runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/depositbox || true
RS2="runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/depositbox/Rs2DepositBox.java"
if [ -f "$RS2" ]; then
rg -n "getNearestDepositBox" "$RS2" || true
# Print around the method
METHOD_LINE=$(rg -n "getNearestDepositBox" "$RS2" | head -n 1 | cut -d: -f1 || echo "")
if [ -n "${METHOD_LINE:-}" ]; then
START2=$((METHOD_LINE-80))
END2=$((METHOD_LINE+140))
sed -n "${START2},${END2}p" "$RS2" | nl -ba -w2 -s':'
fi
fiRepository: chsami/Microbot
Length of output: 159
🏁 Script executed:
#!/bin/bash
set -euo pipefail
FILE="runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/depositbox/DepositBoxLocation.java"
echo "=== Enum constants (around 60-120) ==="
sed -n '60,120p' "$FILE" | cat -n -w2 -s' '
echo
echo "=== hasRequirements() (around definition) ==="
HAS_REQ_LINE=$(grep -n "hasRequirements" "$FILE" | head -n 1 | cut -d: -f1)
START=$((HAS_REQ_LINE-60))
END=$((HAS_REQ_LINE+140))
sed -n "${START},${END}p" "$FILE" | cat -n -w2 -s' '
echo
echo "=== Rs2DepositBox.getNearestDepositBox() filtering ==="
RS2="runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/depositbox/Rs2DepositBox.java"
if [ -f "$RS2" ]; then
sed -n '1,200p' "$RS2" | rg -n "getNearestDepositBox|hasRequirements" || true
METHOD_LINE=$(rg -n "getNearestDepositBox" "$RS2" | head -n 1 | cut -d: -f1 || true)
if [ -n "${METHOD_LINE:-}" ]; then
START2=$((METHOD_LINE-60))
END2=$((METHOD_LINE+160))
sed -n "${START2},${END2}p" "$RS2" | cat -n -w2 -s' '
else
rg -n "getNearestDepositBox" "$RS2" || true
fi
else
echo "Missing file: $RS2"
fiRepository: chsami/Microbot
Length of output: 182
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Locate files
DEP_FILE=$(fd -t f -g 'DepositBoxLocation.java' . | head -n 1 || true)
RS2_FILE=$(fd -t f -g 'Rs2DepositBox.java' . | head -n 1 || true)
echo "DepositBoxLocation file: ${DEP_FILE:-NOT_FOUND}"
echo "Rs2DepositBox file: ${RS2_FILE:-NOT_FOUND}"
echo
if [ -z "${DEP_FILE:-}" ] || [ -z "${RS2_FILE:-}" ]; then
exit 1
fi
print_range () {
local file="$1"
local start="$2"
local end="$3"
awk -v s="$start" -v e="$end" 'NR>=s && NR<=e {printf "%5d:%s\n", NR, $0}' "$file"
}
# Enum/constants area: find SACRED_GROVE line number
SAC_LINE=$(rg -n "SACRED_GROVE" "$DEP_FILE" | head -n 1 | cut -d: -f1)
echo "SACRED_GROVE line in DepositBoxLocation.java: $SAC_LINE"
echo
print_range "$DEP_FILE" $((SAC_LINE-20)) $((SAC_LINE+20))
echo
# hasRequirements area: find method line and default
HAS_LINE=$(rg -n "boolean hasRequirements" "$DEP_FILE" | head -n 1 | cut -d: -f1 || true)
if [ -z "${HAS_LINE:-}" ]; then
HAS_LINE=$(rg -n "hasRequirements\\(" "$DEP_FILE" | head -n 1 | cut -d: -f1 || true)
fi
echo "hasRequirements line in DepositBoxLocation.java: $HAS_LINE"
echo
print_range "$DEP_FILE" $((HAS_LINE-80)) $((HAS_LINE+200))
echo
# Rs2DepositBox: inspect getNearestDepositBox
GET_LINE=$(rg -n "getNearestDepositBox" "$RS2_FILE" | head -n 1 | cut -d: -f1 || true)
echo "getNearestDepositBox line in Rs2DepositBox.java: ${GET_LINE:-N/A}"
echo
print_range "$RS2_FILE" $((GET_LINE-80)) $((GET_LINE+220))Repository: chsami/Microbot
Length of output: 32438
🌐 Web query:
OSRS Sacred Grove access requirements members free to play
💡 Result:
Access to OSRS “The Sacred Grove” requires completing the quest The Red Reef; if you try to enter before completing it, Elder Katt forcibly removes you from the grove. [1][2] Member vs free-to-play: The Red Reef quest unlocks access to the Sacred Grove (“Full access to the Sacred Grove”), and OSRS quests like The Red Reef are members content; therefore free-to-play characters cannot normally access the Sacred Grove—access requires a membership (i.e., membership play or completing membership-restricted content). [3][4] Quest requirement details (for the unlock): The Red Reef requires completion of Troubled Tortugans and has skill requirements of Level 52 Sailing and 48 Smithing. [3] Answer to the user’s specific query: - OSRS Sacred Grove access requirements: complete The Red Reef quest (which itself requires Troubled Tortugans + 52 Sailing + 48 Smithing). [3][1] - Members/free-to-play: it’s effectively members-only; free-to-play cannot access it unless you have membership and can complete the required quest. [3][4]
Citations:
- 1: https://oldschool.runescape.wiki/w/The_Sacred_Grove
- 2: https://oldschool.runescape.wiki/w/Transcript:Elder_Katt
- 3: https://secure.runescape.com/m=news/the-red-reef-is-out-today?oldschool=1
- 4: https://oldschool.runescape.wiki/w/Free-to-play
🏁 Script executed:
#!/bin/bash
set -euo pipefail
rg -n "RED_REEF|RED REEF|Red Reef|THE_RED_REEF|THE RED REEF" --type java runelite-client/src/main/java runelite-api/src/main/javaRepository: chsami/Microbot
Length of output: 3938
Add proper quest gating for SACRED_GROVE in hasRequirements()
SACRED_GROVE falls through to the default branch in DepositBoxLocation.hasRequirements() (returns true), but OSRS access to the Sacred Grove requires completing The Red Reef quest (Quest.THE_RED_REEF). Since Rs2DepositBox.getNearestDepositBox() filters by hasRequirements(), this can cause F2P players to be directed to an inaccessible deposit box—add a case SACRED_GROVE that checks Rs2Player.getQuestState(Quest.THE_RED_REEF) == QuestState.FINISHED (optionally also gate with isMember() to match other members-only patterns).
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In
`@runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/depositbox/DepositBoxLocation.java`
around lines 83 - 84, In DepositBoxLocation.hasRequirements(), add a specific
case for SACRED_GROVE so it no longer falls through to the default true; check
the player's quest state with Rs2Player.getQuestState(Quest.THE_RED_REEF) ==
QuestState.FINISHED (and optionally require Rs2Player.isMember() like other
member-only locations) and return the result for SACRED_GROVE; this ensures
Rs2DepositBox.getNearestDepositBox() will not return the Sacred Grove for
players who haven't completed The Red Reef.
feat(depositbox): add SACRED_GROVE location to DepositBoxLocation