기능
플레이어가 채팅 명령어로 아이템을 코인으로 교환합니다:
/bless 50: Jewel of Bless 50개를 교환합니다 (겹쳐 쌓이는 아이템 종류마다 명령어가 하나씩 있음)./exchange: 장비 규칙에 맞는 인벤토리의 모든 아이템을 교환합니다.
아이템당 코인 수는 계정의 VIP 등급에 따라 다릅니다. 시스템은 아이템을 먼저 회수한 뒤 코인을 지급하므로, 아이템을 회수하지 못하면 코인은 지급되지 않습니다. 착용 중인 아이템과 사용 기한이 있는 아이템은 교환되지 않습니다.
활성화 방법
Data\Commands\LuaCommands.xml의<CommandSystem>안에 명령어를 추가합니다:
교환 명령어의 이름은 자유롭게 정해도 되지만,<Command ID="3001" name="bless" Description="Jewel of Bless exchange" Authority="0"/> <Command ID="3002" name="soul" Description="Jewel of Soul exchange" Authority="0"/> <Command ID="3003" name="life" Description="Jewel of Life exchange" Authority="0"/> <Command ID="3004" name="creation" Description="Jewel of Creation exchange" Authority="0"/> <Command ID="3005" name="chaos" Description="Jewel of Chaos exchange" Authority="0"/> <Command ID="3006" name="guardian" Description="Jewel of Guardian exchange" Authority="0"/> <Command ID="3007" name="harmony" Description="Jewel of Harmony exchange" Authority="0"/> <Command ID="3008" name="greaterstone" Description="Greater Spirit Stone exchange" Authority="0"/> <Command ID="3009" name="topstone" Description="Top Grade Spirit Stone exchange" Authority="0"/> <Command ID="3010" name="exchange" Description="Equipment exchange" Authority="0"/>ID는Config.lua의Command값과 일치해야 합니다.Main.lua에서LoadModule("CustomItemExchange\\CustomItemExchange")앞의--를 제거합니다.Includes\CustomItemExchange\Config.lua를 수정합니다.- LuaAPI 다시 불러오기를 누릅니다.
SQL은 필요하지 않습니다. 모듈은 OnCommandManager에 연결됩니다.
설정 (Config.lua)
| 키 | 값 | 의미 |
|---|---|---|
Enable | true / false | 모듈 켜기 / 끄기. |
Items | 테이블 | 각 줄은 겹쳐 쌓이는 아이템 하나: Command(LuaCommands.xml의 명령어 ID), Item = { group, index }(Data\Item\ItemList.xml 기준), Name(플레이어에게 표시되는 이름), Coin(COIN_WCOIN, COIN_GOBLIN_POINT 또는 COIN_RUUD), Rate, Enable(선택 사항; false = 이 줄을 끔). |
Rate (각 줄 안) | 테이블 | VIP 등급별 아이템당 코인 수. 예: { [-1] = 6, [1] = 10, [2] = 16 }. -1 = VIP 아님. 테이블에 없는 VIP 등급은 -1의 값을 사용합니다. |
EquipmentCommand | 숫자 | 장비 교환 명령어 ID (기본값 3010). |
Equipment | 규칙 테이블 | 각 장비는 처음으로 일치하는 규칙을 사용합니다. 필드: Item(생략 = 모든 아이템; Item이 있는 규칙을 먼저 검사), MinLevel, MaxLevel, Skill(0/1), Luck(0/1), ExcCount(Excellent 옵션 줄 수), Ancient(0/1), Coin, Rate. |
Text | 테이블 | 알림 문구 (Title, Done, NotEnough, Usage, Busy, EquipTitle, EquipDone, EquipNothing). |
CustomItemExchangeConfig.Items = {
{ Command = 3001, Item = { 14, 13 }, Name = "Jewel of Bless", Coin = COIN_RUUD,
Rate = { [-1] = 6, [1] = 10, [2] = 16, [3] = 20, [4] = 30 } },
}