Skip to content

Add Good REP 2 (Loyalty Rewarded) farm script#90

Open
Bludvikk wants to merge 3 commits intoauqw:Skuafrom
Bludvikk:add-goodrep2
Open

Add Good REP 2 (Loyalty Rewarded) farm script#90
Bludvikk wants to merge 3 commits intoauqw:Skuafrom
Bludvikk:add-goodrep2

Conversation

@Bludvikk
Copy link
Copy Markdown

@Bludvikk Bludvikk commented Mar 30, 2026

Summary

  • Adds Farm/REP/GoodRep2.cs, a faster Good reputation farm using quest 1952 (Loyalty Rewarded, Wounds Salved) in PoisonForest
  • Automatically handles prerequisites (Manor story + PoisonForest quests 1948-1951) if not yet completed
  • Stays in a single private room to avoid room-switching
  • Uses RegisterQuests for background accept/complete; kills Burning Loyalist in a tight loop
  • Faster than the castle undead method in the existing GoodREP.cs

Test plan

  • Run on a character without Manor/PoisonForest story done - verify prerequisites auto-complete
  • Run on a character with story already done - verify it skips to the farm loop
  • Confirm bot stays in one private room throughout
  • Confirm Good rep increments and script stops at rank 10

Generated with Claude Code

Summary by Sourcery

Add a new Good reputation farming script that optimizes REP gain using the Loyalty Rewarded quest in PoisonForest while auto-completing required story prerequisites.

New Features:

  • Introduce GoodRep2 script to farm Good reputation via quest 1952 in PoisonForest with Burning Loyalist kills.
  • Automatically complete Manor and PoisonForest storylines as prerequisites for the Good reputation farm when needed.

Enhancements:

  • Ensure the Good reputation farm runs in a fixed private PoisonForest room with background quest turn-ins and reputation boosts for faster, uninterrupted farming.

Faster Good rep method using quest 1952 (Loyalty Rewarded, Wounds Salved)
in PoisonForest. Automatically runs Manor + PoisonForest story prerequisites
if not yet completed. Uses RegisterQuests + private room to stay in one
instance and avoid room-switching.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai bot commented Mar 30, 2026

Reviewer's Guide

Adds a new Good reputation farming script that uses quest 1952 in PoisonForest, automatically runs Manor/PoisonForest prerequisite storylines if needed, and optimizes for single-room, boosted Good rep farming up to a target rank.

Sequence diagram for GoodRep2 DoGoodRep2 farming flow

sequenceDiagram
    actor Player
    participant Script as GoodRep2
    participant Bot as IScriptInterface
    participant Core as CoreBots
    participant Farm as CoreFarms
    participant PForest as PoisonForest

    Player->>Script: ScriptMain(bot)
    Script->>Core: SetOptions()
    Script->>Script: DoGoodRep2(rank)

    Script->>Farm: FactionRank(Good)
    alt Rank already >= target
        Script-->>Core: SetOptions(false)
        Core-->>Player: Script ends
    else Rank below target
        Script->>Core: isCompletedBefore(1955)
        alt Prerequisites not completed
            Script->>Core: Logger(Running prerequisites...)
            Script->>PForest: StoryLine()
        end

        Script->>Farm: FactionRank(Good)
        alt Rank now >= target
            Script-->>Core: SetOptions(false)
        else Continue farming setup
            Script->>Core: ChangeAlignment(Good)
            Script->>Core: EquipClass(Farm)
            Script->>Core: PrivateRooms = true
            Script->>Core: SavedState(true, PoisonForest)
            Script->>Farm: ToggleBoost(Reputation)
            Script->>Core: Logger(Farming Good rank...)
            Script->>Core: RegisterQuests(1952)

            loop Until rank >= target or Bot.ShouldExit
                Script->>Core: CheckSaveState()
                alt Save state needed
                    Script->>Core: ExecuteSaveState()
                end
                Script->>Core: HuntMonster(PoisonForest, Burning Loyalist)
                Script->>Farm: FactionRank(Good)
            end

            Script->>Core: CancelRegisteredQuests()
            Script->>Farm: ToggleBoost(Reputation, false)
            Script->>Core: SavedState(false)
            Script->>Core: PrivateRooms = false
            Script->>Core: SetOptions(false)
        end
    end
    Core-->>Player: Script complete
Loading

Class diagram for new GoodRep2 farming script

classDiagram
    class GoodRep2 {
        +IScriptInterface Bot
        +CoreBots Core
        -static CoreFarms _Farm
        -static CoreAdvanced _Adv
        -static PoisonForest _PForest
        +CoreFarms Farm
        +CoreAdvanced Adv
        +PoisonForest PForest
        +void ScriptMain(IScriptInterface bot)
        +void DoGoodRep2(int rank)
    }

    class IScriptInterface {
        <<interface>>
        +bool ShouldExit
        +static IScriptInterface Instance
    }

    class CoreBots {
        +static CoreBots Instance
        +void SetOptions(bool changeToDefaults)
        +void SetOptions()
        +void ChangeAlignment(Alignment alignment)
        +void EquipClass(ClassType classType)
        +void Logger(string message)
        +bool isCompletedBefore(int questId)
        +bool PrivateRooms
        +void SavedState(bool enable)
        +void SavedState(bool enable, string map)
        +bool CheckSaveState()
        +void ExecuteSaveState()
        +void RegisterQuests(int questId)
        +void CancelRegisteredQuests()
        +void HuntMonster(string map, string monster)
    }

    class CoreFarms {
        +int FactionRank(string faction)
        +void ToggleBoost(BoostType boostType)
        +void ToggleBoost(BoostType boostType, bool enable)
    }

    class CoreAdvanced {
    }

    class PoisonForest {
        +void StoryLine()
    }

    class Alignment {
        <<enumeration>>
        Good
    }

    class ClassType {
        <<enumeration>>
        Farm
    }

    class BoostType {
        <<enumeration>>
        Reputation
    }

    GoodRep2 --> IScriptInterface : uses
    GoodRep2 --> CoreBots : uses
    GoodRep2 --> CoreFarms : uses
    GoodRep2 --> CoreAdvanced : uses
    GoodRep2 --> PoisonForest : uses
    CoreBots ..> Alignment : uses
    CoreBots ..> ClassType : uses
    CoreFarms ..> BoostType : uses
Loading

File-Level Changes

Change Details Files
Introduce a dedicated Good reputation farm using Loyalty Rewarded (quest 1952) with automated prerequisites and room-stable, boosted farming.
  • Create GoodRep2 script class with ScriptMain entry that wraps setup/teardown via Core.SetOptions
  • Add DoGoodRep2 method that exits early if the target Good rank is already met
  • Integrate Manor/PoisonForest prerequisite handling via PoisonForest.StoryLine when quest 1955 is not yet completed
  • Enforce Good alignment, farming class, private-room usage, and reputation boost before starting the farm loop
  • Use Core.RegisterQuests for quest 1952 and a tight HuntMonster loop on Burning Loyalist until the desired Good rank is reached
  • Clean up by cancelling registered quests, disabling boosts, and resetting saved state/private room flags
Farm/REP/GoodRep2.cs

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • The prerequisite handling comment mentions running both Manor and PoisonForest storylines, but only PoisonForest.StoryLine() is actually invoked; either call the Manor storyline explicitly or update the comment to reflect the real behavior to avoid confusion.
  • The script mutates global-like settings (PrivateRooms, SavedState, reputation boost) without protection; consider wrapping the main farming logic in a try/finally so these settings are reliably restored even if the script exits early or throws.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The prerequisite handling comment mentions running both Manor and PoisonForest storylines, but only `PoisonForest.StoryLine()` is actually invoked; either call the Manor storyline explicitly or update the comment to reflect the real behavior to avoid confusion.
- The script mutates global-like settings (`PrivateRooms`, `SavedState`, reputation boost) without protection; consider wrapping the main farming logic in a `try/finally` so these settings are reliably restored even if the script exits early or throws.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Bludvikk and others added 2 commits March 30, 2026 11:29
- Clarify prerequisite comment: PForest.StoryLine() internally calls
  Manor.StoryLine(), so both storylines are covered by the single call
- Wrap farm loop in try/finally to guarantee PrivateRooms, SavedState,
  and rep boost are always restored on early exit or exception

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove PrivateRooms (handled by CBO settings automatically)
- Remove ChangeAlignment (quest 1952 gives Good rep regardless)
- Remove try/finally (not used in other rep farm scripts)
- Keep SavedState with PoisonForest as the return-to map

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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