# Equipment Repair NPC Script Introduction
## Script Overview
RepairNpcAll.cs is an equipment repair NPC script for UO (Ultima Online) servers, providing a comprehensive equipment repair system that allows players to either repair all equipment with one click or selectively repair individual items.
## Main Features
**Comprehensive Equipment Inspection:**
- Automatically scans all equipped items (including weapons, armor, jewelry, etc.)
- Checks durability status for each piece of equipment
**Intelligent Repair System:**
- Calculates repair costs based on material and damage level
- Offers "One-click Repair All" functionality
- Supports individual item repairs
**Flexible Payment Options:**
- Deducts gold from player's backpack
- Automatically withdraws remaining gold from bank if backpack funds are insufficient
**User-friendly GUI Interface:**
- Displays all equipment status via Gump
- Color-coded durability indicators (Red = severely damaged, Green = intact)
- Clean two-column layout for equipment display
## Technical Features
**Equipment Type Support:**
- BaseWeapon (Weapons)
- BaseArmor (Armor)
- BaseJewel (Jewelry)
- BaseClothing (Clothing)
**Material-based Pricing System:**
- Different materials have different repair costs (e.g., Valorite costs more than DullCopper)
- Supports various materials including metals, woods, leathers
**Reflection Mechanism:**
- Uses reflection to access HitPoints and MaxHitPoints properties
- Ensures compatibility with custom equipment types
**NPC Interaction:**
- Includes dedicated repair NPC (RepairNPCAll)
- Features unique NPC appearance and interaction logic
## Usage Instructions
1. Double-click NPC to open repair interface
2. Interface displays all equipment and their durability status
3. Options:
- Click "One-click Repair All" to repair all damaged equipment
- Click individual item buttons to repair specific items
4. System automatically deducts gold (first from backpack, then from bank if needed)
## Extensibility
- Easily add support for new equipment types
- Material pricing adjustable via GetMaterialCost method
- Interface layout and style customizable