Skip to content

Added Witch Queen's Atelier Merge - #135

Open
seolyam wants to merge 3 commits into
auqw:Skuafrom
seolyam:Skua
Open

Added Witch Queen's Atelier Merge#135
seolyam wants to merge 3 commits into
auqw:Skuafrom
seolyam:Skua

Conversation

@seolyam

@seolyam seolyam commented Aug 10, 2026

Copy link
Copy Markdown

Summary by Sourcery

Add an automated merge-shop farming script for Witch Queen's Atelier to obtain all items from the Birgitta Spire merge shop.

New Features:

  • Introduce WitchQueensAtelierMerge script to farm and purchase items from the Witch Queen's Atelier merge shop in Birgitta Spire.
  • Add configurable selection options for specific Witch Queen and Starlight Chaser cosmetic items to be bought by the script.

Enhancements:

  • Extend core banking blacklist to cover Witch Queen's Atelier-related items and gold vouchers for smoother automated farming.

@sourcery-ai

sourcery-ai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Reviewer's Guide

Implements a new merge shop farming script for Witch Queen’s Atelier that integrates with core bot frameworks, configures options, and defines ingredient acquisition logic for specific shop items.

Sequence diagram for Witch Queen's Atelier merge farming flow

sequenceDiagram
    actor User
    participant WitchQueensAtelierMerge
    participant CoreBots
    participant CoreAdvanced
    participant CoreFarms
    participant IScriptInterface

    User->>WitchQueensAtelierMerge: ScriptMain(IScriptInterface)
    WitchQueensAtelierMerge->>CoreBots: SetOptions()
    WitchQueensAtelierMerge->>CoreAdvanced: StartBuyAllMerge("birgittaspire", 2751, findIngredients, buyOnlyThis, buyMode)
    CoreAdvanced-->>WitchQueensAtelierMerge: invoke findIngredients()
    WitchQueensAtelierMerge->>IScriptInterface: TempInv.GetQuantity(req.Name) / Inventory.GetQuantity(req.Name)

    alt [req.Name == Witch Princess' Hat]
        WitchQueensAtelierMerge->>CoreBots: FarmingLogger(req.Name, quant)
        WitchQueensAtelierMerge->>CoreBots: EquipClass(ClassType.Solo)
        WitchQueensAtelierMerge->>CoreBots: RegisterQuests(10824)
        loop until CheckInventory(req.Name, quant)
            WitchQueensAtelierMerge->>CoreBots: KillMonster("birgittaspire", "r2", "Left", "Witch Queen Talia", req.Name)
            CoreBots->>IScriptInterface: Wait.ForPickup(req.Name)
        end
        WitchQueensAtelierMerge->>CoreBots: CancelRegisteredQuests()
    else [req.Name == Crystalized Darkovian Tear or Witch Princess' Astrolabe]
        WitchQueensAtelierMerge->>CoreBots: FarmingLogger(req.Name, quant)
        WitchQueensAtelierMerge->>CoreBots: EquipClass(ClassType.Solo)
        loop until CheckInventory(req.Name, quant)
            WitchQueensAtelierMerge->>CoreBots: KillMonster("birgittaspire", "r2", "Left", "Witch Queen Talia", req.Name)
            CoreBots->>IScriptInterface: Wait.ForPickup(req.Name)
        end
    else [req.Name == Gold Voucher 100k]
        WitchQueensAtelierMerge->>CoreFarms: Voucher(req.Name, quant)
    else [unhandled ingredient]
        WitchQueensAtelierMerge->>CoreBots: Logger("The bot hasn't been taught how to get " + req.Name)
    end

    WitchQueensAtelierMerge->>CoreBots: SetOptions(false)
Loading

File-Level Changes

Change Details Files
Added a new Witch Queen's Atelier merge shop automation script that hooks into existing CoreBots/CoreFarms/CoreAdvanced utilities and defines item acquisition logic via a local ingredient finder.
  • Created WitchQueensAtelierMerge class with CoreBots, CoreFarms, and CoreAdvanced dependencies and script options wiring, including generic and select options storage.
  • Implemented ScriptMain to blacklist relevant items from banking, configure bot options, and invoke the merge purchase routine.
  • Implemented BuyAllMerge to call StartBuyAllMerge for map 'birgittaspire' and shop ID 2751, supplying a nested findIngredients function that routes ingredient acquisition by item name.
  • Added ingredient farming logic for Witch Princess' Hat via quest 10824 and Witch Queen Talia solo combat, and direct kill-based farming for Crystalized Darkovian Tear and Witch Princess' Astrolabe.
  • Hooked Gold Voucher 100k acquisition into CoreFarms.Voucher helper and added select-mode options for multiple merge shop items like Galilera and Starlight Chaser gear.
Other/MergeShops/WitchQueensAtelierMerge.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

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've found 1 issue, and left some high level feedback:

  • In findIngredients, req.Temp and req.Name are accessed before the null check on req, which can cause a null reference; move the null check immediately after ItemBase req = Adv.externalItem and before any other use of req.
  • The currentQuant variable in findIngredients is computed but never used; consider removing it or using it to short‑circuit when the required quantity is already met.
  • The solo farming logic for "Witch Queen Talia" is duplicated across multiple cases; consider extracting this into a helper method that accepts the target item name to reduce repetition and make future maintenance easier.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In `findIngredients`, `req.Temp` and `req.Name` are accessed before the null check on `req`, which can cause a null reference; move the null check immediately after `ItemBase req = Adv.externalItem` and before any other use of `req`.
- The `currentQuant` variable in `findIngredients` is computed but never used; consider removing it or using it to short‑circuit when the required quantity is already met.
- The solo farming logic for "Witch Queen Talia" is duplicated across multiple cases; consider extracting this into a helper method that accepts the target item name to reduce repetition and make future maintenance easier.

## Individual Comments

### Comment 1
<location path="Other/MergeShops/WitchQueensAtelierMerge.cs" line_range="49-52" />
<code_context>
+        #region Dont edit this part
+        void findIngredients()
+        {
+            ItemBase req = Adv.externalItem;
+            int quant = Adv.externalQuant;
+            int currentQuant = req.Temp ? Bot.TempInv.GetQuantity(req.Name) : Bot.Inventory.GetQuantity(req.Name);
+            if (req == null)
+            {
+                Core.Logger("req is NULL");
</code_context>
<issue_to_address>
**issue (bug_risk):** Possible null dereference of `req` before the null check.

`req.Temp` is used to compute `currentQuant` before verifying `req` is non-null, so a null `Adv.externalItem` would cause a runtime exception. Move the null check before any dereference of `req`, or use a null-conditional approach to safely access its members.
</issue_to_address>

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.

Comment on lines +49 to +52
ItemBase req = Adv.externalItem;
int quant = Adv.externalQuant;
int currentQuant = req.Temp ? Bot.TempInv.GetQuantity(req.Name) : Bot.Inventory.GetQuantity(req.Name);
if (req == null)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

issue (bug_risk): Possible null dereference of req before the null check.

req.Temp is used to compute currentQuant before verifying req is non-null, so a null Adv.externalItem would cause a runtime exception. Move the null check before any dereference of req, or use a null-conditional approach to safely access its members.

@l0newolf12

Copy link
Copy Markdown
Collaborator

go to the discord, make a post at #skua-script-reports, and @tato if you want this merged. make sure you explain why and such

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