📚 CLEAR INVENTORY SYSTEM
Quick Description​
The Clear Inventory System allows players to quickly delete all items from their inventories with a simple command! Supports clearing Main Inventory, Extended Inventory, Event Inventory, and Muun Inventory. Features double confirmation to prevent accidents, Account Level restrictions, and both in-game UI and command support.
How it works​
- Players use commands like
/clearinvto clear their inventory - Double confirmation required - prevents accidental deletion
- First use: Warning message + 10 second confirmation window
- Second use: Type
CONFIRMto complete deletion - Supports 4 inventory types (Main, Extended, Event, Muun)
- Can be used via commands or Game Util UI
- Account Level restrictions (AL0-AL3) per inventory type
- Multi-language support (English, Portuguese, Spanish)
Main features​
- 4 inventory types - Main, Extended, Event, Muun
- Double confirmation - Prevents accidental deletion
- 10-second window - Must confirm within 10 seconds
- Two access modes - Commands + UI or UI only
- Instant cleanup - All items deleted immediately
Quick config (ClearInventoryConfig.lua)​
Config = {
Switch = true, -- Enable/disable system
UseCommand = false, -- false = UI only, true = Commands + UI
-- Command configurations
Commands = {
-- Main Inventory (64 slots)
MainInventory = {
AccountLevel = {true, true, true, true}, -- [AL0, AL1, AL2, AL3]
Name = {
"Main Inventory", -- English
"Inventário Principal", -- Portuguese
"Inventário Principal" -- Spanish
},
StringInfo = "/clearinv" -- Command to use
},
-- Extended Inventory (additional slots)
ExtendInventory = {
AccountLevel = {true, true, true, true},
Name = {
"Extend Inventory",
"Inventário Estendido",
"Inventário Estendido"
},
StringInfo = "/clearinvext"
},
-- Event Inventory (special items)
EventInventory = {
AccountLevel = {true, true, true, true},
Name = {
"Event Inventory",
"Inventário de Evento",
"Inventário de Evento"
},
StringInfo = "/clearinvevent"
},
-- Muun Inventory (Muun pets)
MuunInventory = {
AccountLevel = {true, true, true, true},
Name = {
"Muun Inventory",
"Inventário de Muuns",
"Inventário de Muuns"
},
StringInfo = "/clearinvmuun"
},
},
}
How to use (Player perspective)​
Step 1: Close all windows​
❌ Close: Shop, Trade, Storage, Chaos Machine, etc.
âś… Ready: Character standing idle with no windows open
If windows open:
[Clear Inventory] Close all windows to use this command
Step 2: Use clear command​
Command: /clearinv
Response:
[Clear Inventory] This command will delete all items from Main Inventory
[Clear Inventory] Type /clearinv again within 10 s to confirm clearing your Main Inventory
Step 3: Confirm within 10 seconds​
Command: /clearinv
Response:
[Clear Inventory] Type < /clearinv CONFIRM > to complete the cleanup
Step 4: Final confirmation​
Command: /clearinv CONFIRM
Response:
[Clear Inventory] Confirmed! Now clearing your Main Inventory...
[Clear Inventory] Main Inventory Clear
âś… All items deleted!
Available commands​
Main Inventory​
/clearinv
/clearinv CONFIRM
Extended Inventory​
/clearinvext
/clearinvext CONFIRM
Event Inventory​
/clearinvevent
/clearinvevent CONFIRM
Muun Inventory​
/clearinvmuun
/clearinvmuun CONFIRM
Confirmation flow​
Step 1: /clearinv
├─ Warning message shown
├─ 10 second timer starts
└─ Must type command again
Step 2: /clearinv (within 10 seconds)
├─ Final confirmation prompt
└─ Must type "CONFIRM"
Step 3: /clearinv CONFIRM
├─ Items are deleted
└─ Success message shown
Timeout: If 10 seconds pass
└─ Must start over from Step 1
Account Level restrictions​
Control which VIP levels can use each inventory clear:
AccountLevel = {true, true, true, true}
-- AL0 AL1 AL2 AL3
-- Free VIP1 VIP2 VIP3
Examples:​
Allow everyone:
AccountLevel = {true, true, true, true}
VIP only (AL1+):
AccountLevel = {false, true, true, true}
-- ^^^^^ Free players blocked
VIP2+ only:
AccountLevel = {false, false, true, true}
-- ^^^^^ ^^^^^ Free and VIP1 blocked
VIP3 only (exclusive):
AccountLevel = {false, false, false, true}
-- ^^^^^ ^^^^^ ^^^^^ Only highest VIP
Nobody can use (disabled):
AccountLevel = {false, false, false, false}
Access modes​
Mode 1: UI Only (UseCommand = false)​
UseCommand = false, -- Only accessible through Game Util UI
Features:
- Players must open Game Util interface
- No commands needed in chat
- Cleaner chat window
- More visual/intuitive
Best for:
- Servers with many custom commands
- Cleaner UI experience
- Less command clutter
Mode 2: Commands + UI (UseCommand = true)​
UseCommand = true, -- Both commands and UI work
Features:
- Players can use
/clearinvcommands - Also accessible through UI
- Maximum flexibility
- Faster for experienced players
Best for:
- Power users who prefer commands
- Flexibility for all player types
- Quick access without UI navigation
Multi-language messages​
Each message supports 3 languages:
Message_Name = {
"English text",
"Texto em PortuguĂŞs",
"Texto en Español",
MessageType, -- 0 = Center, 1 = Blue, 3 = Red
}
Example messages:​
Warning message:
Inv = {
'This command will delete all items from %s',
'Este comando vai deletar todos os itens do %s',
'Este comando va a eliminar todos los items de %s',
1 -- Blue system message
}
Confirmation required:
CommandAgain = {
'Type %s again within 10 s to confirm clearing your %s',
'Digite %s novamente dentro de 10 s para confirmar a limpeza do seu %s',
'Escriba %s nuevamente dentro de 10 s para confirmar la limpieza de su %s',
1
}
Success message:
InvClear = {
'%s Clear',
'%s Limpo',
'%s Limpo',
1
}
Safety features​
1. Double confirmation requirement​
User: /clearinv
System: Confirm within 10 seconds
User: /clearinv (too early/too late)
System: Must type CONFIRM
User: /clearinv CONFIRM
System: âś… Inventory cleared
2. 10-second timeout window​
00:00 - User types /clearinv
00:05 - User types /clearinv again (OK âś…)
00:11 - Timeout! Must start over
3. Window check​
CheckInterface = {
"Close all windows to use this command",
"Feche todas as janelas para usar esse",
"Cerrar todas las ventanas para usar el comando",
1
}
Blocked windows:
- Shop/Store
- Trade window
- Personal Store
- Warehouse/Vault
- Chaos Machine
- Party interface
- Guild interface
- Any NPC dialog
4. Account Level restrictions​
Free player (AL0): /clearinvmuun
System: You can't use this command
(If AccountLevel[0] = false for Muun Inventory)
Message type options​
1 -- Message type parameter
Available types:
0= Center of screen (big announcement)1= System message [Blue]3= System message [Red]100= System white (accepts HTML tags)
Examples with different types:​
Warning (Red):
Inv = {
'This command will delete all items from %s',
'Este comando vai deletar todos os itens do %s',
'Este comando va a eliminar todos los items de %s',
3 -- Red warning message
}
Success (Center screen):
InvClear = {
'%s Clear',
'%s Limpo',
'%s Limpo',
0 -- Big center screen message
}
Error (Red):
NotAllowed = {
"You can't use this command",
'VocĂŞ nĂŁo pode usar esse comando',
'No puedes usar este comando',
3 -- Red error message
}
Configuration examples​
Example 1: Free for all​
Commands = {
MainInventory = {
AccountLevel = {true, true, true, true}, -- Everyone
StringInfo = "/clearinv"
},
ExtendInventory = {
AccountLevel = {true, true, true, true}, -- Everyone
StringInfo = "/clearinvext"
},
EventInventory = {
AccountLevel = {true, true, true, true}, -- Everyone
StringInfo = "/clearinvevent"
},
MuunInventory = {
AccountLevel = {true, true, true, true}, -- Everyone
StringInfo = "/clearinvmuun"
},
}
Example 2: Tiered access​
Commands = {
MainInventory = {
AccountLevel = {true, true, true, true}, -- Everyone (basic feature)
StringInfo = "/clearinv"
},
ExtendInventory = {
AccountLevel = {false, true, true, true}, -- VIP+ only
StringInfo = "/clearinvext"
},
EventInventory = {
AccountLevel = {false, false, true, true}, -- VIP2+ only
StringInfo = "/clearinvevent"
},
MuunInventory = {
AccountLevel = {false, false, false, true}, -- VIP3 only
StringInfo = "/clearinvmuun"
},
}
Example 3: VIP exclusive (monetization)​
Commands = {
MainInventory = {
AccountLevel = {false, true, true, true}, -- VIP feature
StringInfo = "/clearinv"
},
ExtendInventory = {
AccountLevel = {false, true, true, true}, -- VIP feature
StringInfo = "/clearinvext"
},
EventInventory = {
AccountLevel = {false, true, true, true}, -- VIP feature
StringInfo = "/clearinvevent"
},
MuunInventory = {
AccountLevel = {false, true, true, true}, -- VIP feature
StringInfo = "/clearinvmuun"
},
}
Example 4: Custom commands​
Commands = {
MainInventory = {
AccountLevel = {true, true, true, true},
StringInfo = "/clear" -- Shorter command
},
ExtendInventory = {
AccountLevel = {true, true, true, true},
StringInfo = "/clearext" -- Shorter
},
EventInventory = {
AccountLevel = {true, true, true, true},
StringInfo = "/clearevent" -- Shorter
},
MuunInventory = {
AccountLevel = {true, true, true, true},
StringInfo = "/clearmuun" -- Shorter
},
}
Custom message examples​
Friendly messages​
Inv = {
'Warning! This will delete ALL items from your %s!',
'Atenção! Isso vai deletar TODOS os itens do seu %s!',
'¡Atención! ¡Esto eliminará TODOS los elementos de tu %s!',
3 -- Red warning
}
InvClear = {
'Success! Your %s has been cleared!',
'Sucesso! Seu %s foi limpo!',
'¡Éxito! ¡Tu %s ha sido limpiado!',
0 -- Center screen success
}
Formal messages​
Inv = {
'[System] Inventory clear requested for %s',
'[Sistema] Limpeza de inventário solicitada para %s',
'[Sistema] Limpieza de inventario solicitada para %s',
1
}
InvClear = {
'[System] %s has been successfully cleared',
'[Sistema] %s foi limpo com sucesso',
'[Sistema] %s ha sido limpiado exitosamente',
1
}
Humorous messages​
Inv = {
'Spring cleaning time! This will delete everything from %s!',
'Hora da faxina! Isso vai deletar tudo do %s!',
'¡Hora de limpiar! ¡Esto borrará todo de %s!',
1
}
Clearing = {
'Cleaning in progress... Your %s is getting sparkly clean!',
'Limpeza em progresso... Seu %s está ficando limpinho!',
'Limpieza en progreso... ¡Tu %s está quedando reluciente!',
1
}
Tips for configuration​
âś… Enable for quality of life
Switch = true, -- Modern servers should have this
âś… UI-only for cleaner experience
UseCommand = false, -- Less command spam in chat
âś… Allow main inventory for everyone
MainInventory = {
AccountLevel = {true, true, true, true}, -- Basic feature
}
âś… Gate premium inventories
MuunInventory = {
AccountLevel = {false, false, false, true}, -- VIP3 exclusive
}
âś… Use warning colors
Inv = {
'Warning message',
'Mensagem de aviso',
'Mensaje de advertencia',
3 -- Red for warnings
}
âś… Clear success messages
InvClear = {
'âś… %s Clear',
'âś… %s Limpo',
'âś… %s Limpo',
0 -- Center screen for visibility
}
Integration with CommandManager.txt​
Add these entries to your CommandManager.txt:
// Clear Inventory Commands
100 /clearinv 0 0 0 0 // Main Inventory
101 /clearinvext 0 0 0 0 // Extended Inventory
102 /clearinvevent 0 0 0 0 // Event Inventory
103 /clearinvmuun 0 0 0 0 // Muun Inventory
Format:
CommandID /command MinLevel MaxReset MaxMasterReset GMLevel
Safety warnings for players​
⚠️ IMPORTANT WARNINGS:
- Deletion is permanent - Items cannot be recovered
- No confirmation for valuable items - System treats all items equally
- Cannot undo - Once confirmed, deletion is instant
- Works on equipped items - May delete equipped gear (server dependent)
- No selective deletion - Deletes ALL items, not specific ones
Player checklist before clearing:
âś… Moved valuable items to warehouse
âś… Checked for bound/character-specific items
âś… Confirmed which inventory I'm clearing
âś… Double-checked the command
âś… Ready for complete deletion
See
ClearInventoryConfig.luafor all configuration options and message customization.