Costume Converter: Difference between revisions

From VanRO Ragnarok Online
(Created page with "== 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...")
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
== Costume Master Script ==
[[File:Costume converter2.png|thumb|589x589px]]


=== NPC Information ===
== Costume Master ==
**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.
'''Location:''' prt_in, coordinates (95, 66) 
'''NPC Sprite:''' 4_4job_leticia 
 
The Costume Master NPC allows players to
1. Convert equipped top headgear into a costume
2. Revert costume items back to their original headgear.


---
---


### Features
=== Features ===
1. **Convert to Costume:**  
 
  - Converts equipped top headgear into a costume item.
* '''Convert to Costume:'''  
  - Requires **100 TCG Cards** (`Item ID: 7227`).
  - Converts equipped top headgear into a costume.
  - Removes all stats and refinements from the headgear.
  - Requires **100 TCG Cards** (`Item ID: 7227`).
  - Does not work if the headgear contains any cards.
  - Removes all stats and refinements.
  - Does not work on items with cards.


2. **Convert Back to Headgear:**  
* '''Convert Back to Headgear:'''  
  - Reverts a costume back to its original headgear form.
  - Reverts costume items to their original form.
  - Deletes the costume item and provides the original headgear.
  - Deletes the costume and provides the original headgear.


3. **Cancel:**  
* '''Cancel:'''  
  - Allows the player to exit the dialogue without making changes.
  - Exits the dialogue without making any changes.


---
---


### Dialogue Options
=== Dialogue Options ===
- **Convert to Costume**
 
- **Convert Back to Headgear**
1. Convert to Costume
- **Cancel**
2. Convert Back to Headgear
3. Cancel


---
---


### Process Breakdown
=== Conversion Process ===
 
==== 1. Convert to Costume ====
 
* Requirements: 
  - Top headgear must be equipped. 
  - The headgear must have no cards or refinements. 
  - Player must have at least **100 TCG Cards**. 


#### Convert to Costume
* NPC Process: 
1. The NPC explains the conversion requirements:
  1. Checks if the player meets all requirements
  - Requires **100 TCG Cards**.
  2. Deducts 100 TCG Cards from the player's inventory.
  - Removes all stats and refinements from the headgear.
  3. Converts the equipped headgear into a costume.
  - Does not work on headgear with cards.
  4. Displays a success or failure message.
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
* Error Messages:
1. The NPC explains the reversion process:
  - "You don't have enough TCG Cards.
  - Reverts a costume item back to its original headgear form.
  - "Your headgear contains cards. I cannot convert an item with cards.
  - Deletes the costume item and provides the original headgear.
  - "Your headgear is refined. I cannot convert a refined item.
2. Checks the player’s inventory for costume items.
  - "You do not have a top headgear equipped."
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."


---
==== 2. Convert Back to Headgear ====


### Requirements for Conversion
* Requirements:
- **Convert to Costume:**
   - Player must have costume items in their inventory.
  - 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:**
* NPC Process:
   - Costume items must exist in the player's inventory.
  1. Checks the player’s inventory for costume items. 
   2. If valid items are found, a menu is displayed for the player to select the item to revert. 
  3. Deletes the costume item. 
  4. Adds the original headgear to the player’s inventory.
  5. Displays a success message. 


---
* Error Messages: 
  - "No valid costume items were found in your inventory." 
  - "An error occurred while selecting the item. Please try again." 


### 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." 
=== Example NPC Messages ===
  Triggered when the equipped top headgear has refinements.


- "You do not have a top headgear equipped."   
* '''Success Messages:''' 
   Triggered when no top headgear is equipped.
  - "Your top headgear has been successfully converted into a costume!"   
   - "The costume item has been successfully reverted back into a regular headgear!" 


- "No valid costume items were found in your inventory."   
* '''Failure Messages:''' 
   Triggered when the player has no costume items to revert.
  - "Failed to convert your top headgear. Returning it to your inventory..."   
   - "You don't have enough TCG Cards.


---
---


### Developer Notes
=== Developer Notes ===
- **Script Functions Used:**
 
   - `mes`: Displays NPC dialogue.
* Uses the following key script functions:
  - `select`: Creates a menu for player choices.
   - `mes`, `select`, `countitem`, `getitem`, `delitem`, `costume()`
  - `countitem`: Checks the player’s inventory for a specific item.
* Key Conditions Checked:
  - `getinventorylist`: Retrieves the player’s inventory details.
   - Equipped item is a top headgear.
  - `delitem`: Removes a specified item from the player’s inventory.
   - No cards or refinements on the item.
  - `getitem`: Adds a specified item to the player’s inventory.
   - Player has sufficient TCG Cards.
  - `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.

Latest revision as of 15:10, 21 November 2024

Costume converter2.png

Costume Master

Location: prt_in, coordinates (95, 66) NPC Sprite: 4_4job_leticia

The Costume Master NPC allows players to: 1. Convert equipped top headgear into a costume. 2. Revert costume items back to their original headgear.

---

Features

  • Convert to Costume:
 - Converts equipped top headgear into a costume.  
 - Requires **100 TCG Cards** (`Item ID: 7227`).  
 - Removes all stats and refinements.  
 - Does not work on items with cards.  
  • Convert Back to Headgear:
 - Reverts costume items to their original form.  
 - Deletes the costume and provides the original headgear.  
  • Cancel:
 - Exits the dialogue without making any changes.  

---

Dialogue Options

1. Convert to Costume 2. Convert Back to Headgear 3. Cancel

---

Conversion Process

1. Convert to Costume

  • Requirements:
 - Top headgear must be equipped.  
 - The headgear must have no cards or refinements.  
 - Player must have at least **100 TCG Cards**.  
  • NPC Process:
 1. Checks if the player meets all requirements.  
 2. Deducts 100 TCG Cards from the player's inventory.  
 3. Converts the equipped headgear into a costume.  
 4. Displays a success or failure message.  
  • Error Messages:
 - "You don't have enough TCG Cards."  
 - "Your headgear contains cards. I cannot convert an item with cards."  
 - "Your headgear is refined. I cannot convert a refined item."  
 - "You do not have a top headgear equipped."

2. Convert Back to Headgear

  • Requirements:
 - Player must have costume items in their inventory.  
  • NPC Process:
 1. Checks the player’s inventory for costume items.  
 2. If valid items are found, a menu is displayed for the player to select the item to revert.  
 3. Deletes the costume item.  
 4. Adds the original headgear to the player’s inventory.  
 5. Displays a success message.  
  • Error Messages:
 - "No valid costume items were found in your inventory."  
 - "An error occurred while selecting the item. Please try again."  

Example NPC Messages

  • Success Messages:
 - "Your top headgear has been successfully converted into a costume!"  
 - "The costume item has been successfully reverted back into a regular headgear!"  
  • Failure Messages:
 - "Failed to convert your top headgear. Returning it to your inventory..."  
 - "You don't have enough TCG Cards."  

---

Developer Notes

  • Uses the following key script functions:
 - `mes`, `select`, `countitem`, `getitem`, `delitem`, `costume()`  
  • Key Conditions Checked:
 - Equipped item is a top headgear.  
 - No cards or refinements on the item.  
 - Player has sufficient TCG Cards.