Costume Converter
Costume Master Script
NPC Information
- NPC Name:** Costume Master
- Location:** prt_in, coordinates (95, 66)
- Sprite:** `4_4job_leticia`
This NPC provides a service to convert equipped top headgear into costume items or revert costume items back to their original form. The process involves specific requirements and conditions.
---
- Features
1. **Convert to Costume:**
- Converts equipped top headgear into a costume item. - Requires **100 TCG Cards** (`Item ID: 7227`). - Removes all stats and refinements from the headgear. - Does not work if the headgear contains any cards.
2. **Convert Back to Headgear:**
- Reverts a costume back to its original headgear form. - Deletes the costume item and provides the original headgear.
3. **Cancel:**
- Allows the player to exit the dialogue without making changes.
---
- Dialogue Options
- **Convert to Costume** - **Convert Back to Headgear** - **Cancel**
---
- Process Breakdown
- Convert to Costume
1. The NPC explains the conversion requirements:
- Requires **100 TCG Cards**. - Removes all stats and refinements from the headgear. - Does not work on headgear with cards.
2. Performs the following checks:
- The player has at least **100 TCG Cards**. - The top headgear is equipped. - The headgear has no cards or refinements.
3. If all checks are passed:
- Deducts **100 TCG Cards**. - Converts the top headgear into a costume using the `costume()` function. - Displays a success or failure message.
- Convert Back to Headgear
1. The NPC explains the reversion process:
- Reverts a costume item back to its original headgear form. - Deletes the costume item and provides the original headgear.
2. Checks the player’s inventory for costume items. 3. If costume items are found:
- The player selects the item to revert from a dynamically generated menu. - Deletes the costume item. - Adds the original headgear to the player’s inventory.
4. Displays a success message upon completion.
- Cancel
1. The NPC ends the dialogue with a message: "Alright, come back anytime."
---
- Requirements for Conversion
- **Convert to Costume:**
- Top headgear must be equipped. - The headgear must not have any cards or refinements. - Player must have at least **100 TCG Cards** in inventory.
- **Convert Back to Headgear:**
- Costume items must exist in the player's inventory.
---
- Error Messages
- "You don't have enough TCG Cards."
Triggered when the player does not meet the 100 TCG Card requirement.
- "Your headgear contains cards. I cannot convert an item with cards."
Triggered when the equipped top headgear has cards slotted.
- "Your headgear is refined. I cannot convert a refined item."
Triggered when the equipped top headgear has refinements.
- "You do not have a top headgear equipped."
Triggered when no top headgear is equipped.
- "No valid costume items were found in your inventory."
Triggered when the player has no costume items to revert.
---
- Developer Notes
- **Script Functions Used:**
- `mes`: Displays NPC dialogue. - `select`: Creates a menu for player choices. - `countitem`: Checks the player’s inventory for a specific item. - `getinventorylist`: Retrieves the player’s inventory details. - `delitem`: Removes a specified item from the player’s inventory. - `getitem`: Adds a specified item to the player’s inventory. - `costume()`: Converts an equipped item into a costume item.
- **Conditions Checked:**
- Equipped item is a top headgear. - No cards or refinements on the item. - Sufficient TCG Cards for the operation.