Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ We implemented some of the following features.
- Looping of Lotto to Gift Box for much easier management.
- Long Press on Lotto for faster opening of boxes.
- Find Appends on Support
- NP Level Detection
- NP Level Detection(Finally reliable thanks to PaddleOCR)
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

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

Missing space after "Detection" before the opening parenthesis. Should be "Detection (Finally" not "Detection(Finally".

Suggested change
- NP Level Detection(Finally reliable thanks to PaddleOCR)
- NP Level Detection (Finally reliable thanks to PaddleOCR)

Copilot uses AI. Check for mistakes.
- Auto Send of Friend Request after clearing a quest.
- Auto on/off toggle of Teapots.
- Stop script upon reaching certain bond level.
Expand Down Expand Up @@ -66,7 +66,7 @@ We implemented some of the following features.
### Improved Support Selection

- Support Appends
- NP Level Detection
- NP Level Detection(a bit more reliable with PaddleOCR)
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

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

Missing space after "Detection" before the opening parenthesis. Should be "Detection (a bit" not "Detection(a bit".

Suggested change
- NP Level Detection(a bit more reliable with PaddleOCR)
- NP Level Detection (a bit more reliable with PaddleOCR)

Copilot uses AI. Check for mistakes.
- Support for Grand Servant system

![Improved Support Selection](https://github.com/user-attachments/assets/00ec91c8-6d8e-4670-b9e1-ba6e66674f58)
Expand All @@ -75,7 +75,7 @@ We implemented some of the following features.

Current things being worked on

1. [ ] Migration from hilt to kotlin-inject/metro
1. [X] Migration from hilt to kotlin-inject/metro

2. [ ] Migrate Battle Configs from prefs to FGA folder.

Expand Down
Binary file added docs/assets/scripts/CE EXP Bomb Dialog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/scripts/CE EXP Bomb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/scripts/Friend Point Gacha.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/scripts/Gift Box.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/scripts/Level Append Dialog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/scripts/Level Append Extended.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/scripts/Level Append Old.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/scripts/Level CE Dialog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/scripts/Level CE.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/scripts/Level Servant Dialog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/scripts/Level Servant with auto.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/scripts/Level Servant.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/scripts/Level Skill Dialog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/scripts/Level Skill Limited.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/scripts/Level Skill.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/scripts/Lottery.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
114 changes: 112 additions & 2 deletions docs/other-scripts/friend-point-gacha.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,113 @@
# Auto Friend Point Gacha
# Friend Point Gacha

Currently work-in-progress.
Automatically performs Friend Point (FP) summons in the Friend Point gacha screen.

## Overview

The Friend Point Gacha script continuously triggers 10x summons using Friend Points. It handles inventory management and can redirect to selling or CE enhancement when the inventory becomes full.

## How to Start

1. Navigate to the **Friend Point Summon** screen in the game
2. The script will automatically detect the FP summon screen when you see:
- The "Friend Summon" banner on the initial summon screen
- The continue summon button after your first summon

## Workflow

```text
┌─────────────────────────────────────────┐
│ Start FP Gacha Script │
└─────────────────────┬───────────────────┘
┌─────────────────────────────────────────┐
│ Check for Daily Free Summon Banner │
│ (First time only) │
└─────────────────────┬───────────────────┘
┌─────────────────────────────────────────┐
│ Perform Initial 10x Summon │
└─────────────────────┬───────────────────┘
┌─────────────────────────┐
│ Main Summon Loop │◄──────┐
└─────────────┬───────────┘ │
│ │
▼ │
┌─────────────────────────┐ │
│ Check Current State │ │
└─────────────┬───────────┘ │
│ │
┌────────────┼────────────┐ │
│ │ │ │
▼ ▼ ▼ │
┌─────────┐ ┌──────────┐ ┌─────────┐ │
│Inventory│ │ Summon │ │ Out of │ │
│ Full │ │ Continue │ │ FP │ │
└────┬────┘ └────┬─────┘ └────┬────┘ │
│ │ │ │
▼ │ ▼ │
Handle Full │ Exit Script │
Inventory │ │
│ └────────────────────┘
┌─────────────────────────────────────┐
│ Redirect to CE Bomb or Sell Menu │
└─────────────────────────────────────┘
```

## Key Features

### Summon Limit

- **Optional FP limit**: Set a maximum number of summons to perform
- Once the limit is reached, the script can either stop or redirect to the sell menu

![FP Limit](<../assets/scripts/Friend Point Gacha.png>)

### Inventory Full Handling

When the inventory becomes full, the script can:

1. **Redirect to CE Enhancement** - Create CE bombs with the summoned CEs
2. **Redirect to Sell Menu** - Sell unwanted cards
3. **Stop the script** - Exit with an inventory full notification

![FP to CE EXP Bomb](<../assets/scripts/Friend Point Gacha To CE EXP Bomb.png>)

### Connection Retry

- Automatically handles connection issues
- Retries when network errors occur

## Settings

| Setting | Description |
|---------|-------------|
| Limit FP | Enable/disable summon limit |
| FP Limit Count | Maximum number of summons before stopping |
| Redirect to Sell | Navigate to sell menu when limit reached or inventory full |
| Create CE Bomb | Redirect to CE enhancement when inventory is full |

## Exit Reasons

The script will stop and notify you when any of these conditions occur:

| Exit Reason | Description |
|-------------|-------------|
| **Inventory Full** | Your inventory is full and no redirect option is enabled |
| **Run Out of Friend Points** | No more Friend Points available for summoning |
| **Summon Limit Reached** | The configured summon limit has been reached |
| **Reached Sell Banner** | Successfully navigated to the sell menu |
| **Unable to Verify CE Enhancement Menu** | Failed to navigate to CE enhancement after inventory full |
| **Sell Banner Not Visible** | Expected to see sell menu but could not detect it |

## Tips for Best Results

1. **Clear inventory space** before starting for longer runs
2. **Enable redirect options** to maximize summoning efficiency
3. **Set appropriate limits** if you want controlled summon sessions
4. **Ensure stable connection** for uninterrupted summoning
177 changes: 175 additions & 2 deletions docs/other-scripts/gift-box.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,176 @@
# Auto Gift Box
# Auto Gift Box (Present Box)

Currently work-in-progress.
Automatically collects embers from the gift box (present box) with intelligent filtering.

## Overview

The Gift Box script automatically selects and collects gold embers from your present box. It uses OCR to read stack sizes and filter based on your preferences, ensuring you only collect what you need.

## How to Start

1. Navigate to the **Present Box** screen in the game
2. The script will automatically detect the gift box screen when:
- Gold XP cards (embers) are visible in the list
- Silver XP cards are visible
- 5-star gold XP cards are visible
3. Make sure the gift box has items to collect

## Workflow

```text
┌─────────────────────────────────────────┐
│ Start Gift Box Script │
└─────────────────────┬───────────────────┘
┌─────────────────────────────────────────┐
│ Locate Ember Pattern Position │
│ (Gold, Silver, or 5-Star XP) │
└─────────────────────┬───────────────────┘
┌─────────────────────────┐
│ Selection Iteration │◄──────┐
└─────────────┬───────────┘ │
│ │
▼ │
┌─────────────────────────┐ │
│ Scan Visible Items │ │
└─────────────┬───────────┘ │
│ │
▼ │
┌─────────────────────────┐ │
│ For Each Checkbox: │ │
│ • Check if ember type │ │
│ • Read stack count │ │
│ • Apply size filter │ │
│ • Select if valid │ │
└─────────────┬───────────┘ │
│ │
▼ │
┌─────────────────────────┐ │
│ Scroll Down List │ │
└─────────────┬───────────┘ │
│ │
▼ │
┌─────────────────────────┐ │
│ Check End of List │ │
└─────────────┬───────────┘ │
│ │
┌────────────┴────────────┐ │
│ End │ More │
▼ └──────┘
┌─────────────────────────────────────────┐
│ Receive Selected Items │
└─────────────────────┬───────────────────┘
┌─────────────────────────────────────────┐
│ Check if Can Select More Items │
└─────────────────────┬───────────────────┘
Exit or Return to Lottery
```

## Key Features

### Intelligent Ember Detection

- Identifies gold 4-star embers
- Identifies silver 3-star embers
- Identifies gold 5-star embers
- Uses OCR to read stack sizes (e.g., "x50")

### Stack Size Filtering

- Only selects stacks within your configured maximum size
- Prevents selecting large stacks you want to keep

### Gold Ember Counting

- Tracks total gold embers selected
- Stops when reaching your configured limit

### Server-Specific Adjustments

- Adjusts detection regions based on game server
- Supports JP, EN, KR, TW, and CN servers

## Settings

| Setting | Description |
|---------|-------------|
| Max Gold Ember Stack Size | Maximum stack size to select (larger stacks skipped) |
| Max Gold Ember Total Count | Maximum total gold embers to collect |
| Loop Into Lottery After Present Box | Return to lottery after collection (when called from lottery) |

![Gift Box Dialog](<../assets/scripts/Gift Box.png>)

## Exit Reasons

The script will stop and notify you when any of these conditions occur:

| Exit Reason | Description |
|-------------|-------------|
| **No Embers Found** | Could not locate any embers in the gift box |
| **Cannot Select Any More** | Reached selection limit or no more valid items |
| **Return to Lottery** | Successfully collected embers and returning to lottery script |

## Selection Algorithm

For each item in the gift box:

```text
┌─────────────────────────────────────────┐
│ Is Item Checkbox Visible? │
└─────────────────────┬───────────────────┘
│ Yes
┌─────────────────────────────────────────┐
│ Check Icon Region for Ember Type │
│ • Gold 4★ XP? │
│ • Silver 3★ XP? │
│ • Gold 5★ XP? │
└─────────────────────┬───────────────────┘
│ Ember Found
┌─────────────────────────────────────────┐
│ Read Stack Count Using OCR │
│ (Extract number from "x50" etc.) │
└─────────────────────┬───────────────────┘
┌─────────────────────────────────────────┐
│ Is Stack Size ≤ Max Stack Size? │
└─────────────────────┬───────────────────┘
│ Yes
┌─────────────────────────────────────────┐
│ Select Item and Add to Count │
└─────────────────────────────────────────┘
```

## Usage with Lottery

When the lottery script detects a full present box, it can automatically invoke the Gift Box script:

1. **Lottery detects present box full**
2. **Navigates to gift box**
3. **Gift Box script collects embers**
4. **Returns to lottery** (if enabled)
5. **Continues spinning**

## Tips for Best Results

1. **Set appropriate stack size limits** to skip large stacks you want to keep
2. **Configure gold ember limits** to avoid excessive collection
3. **Clear non-ember items manually** if they're blocking embers
4. **Ensure embers are visible** at the start of the gift box list

## Technical Notes

- Maximum 99 items can be selected per batch
- Uses 3 consecutive null checks to detect end of list
- Scrolls through the list to find all valid items
- Handles connection retries automatically
Loading