> For the complete documentation index, see [llms.txt](/llms.txt)

# GS2-Enhance 스크립트 트리거 레퍼런스

확장 스크립트를 호출하는 이벤트 트리거의 레퍼런스



## 트리거

### enhance



**관련 메서드:**
directEnhance - 강화를 실행
directEnhanceByUserId - 사용자 ID를 지정하여 강화를 실행


#### 동기 실행 스크립트

 처리 전에, 스크립트가 동기 실행됩니다.

##### Request

| | 타입 | 설명 |
| --- | --- | --- |
| namespace | [Namespace](../sdk/#namespace) | 네임스페이스 |
| rateModel | [RateModel](../sdk/#ratemodel) | 강화 레이트 모델 |
| targetItemSetId | string | 강화 대상 아이템 세트의 GRN |
| bonusRate | float | 경험치 보너스 배율(1.0=보너스 없음) |
| experienceValue | long | 획득 경험치량 |

##### Result

|  | 타입 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- |
| permit | bool | ✓ |  |  | 강화 실행을 허용할지 여부 |
| overrideExperienceValue | long |  |  | 0 ~ 2147483645 | 덮어쓸 획득 경험치량 |

##### 구현 예제


**Lua**
```lua

-- Request
local namespace = args.namespace
local rateModel = args.rateModel
local targetItemSetId = args.targetItemSetId
local bonusRate = args.bonusRate
local experienceValue = args.experienceValue

-- Business logic:
local permit = true
local overrideExperienceValue = 0

-- Result
result = {
  permit=permit,
  overrideExperienceValue=overrideExperienceValue
}
```


#### 비동기 실행 스크립트

 처리 후에, 스크립트가 비동기 실행됩니다.

##### Request

| | 타입 | 설명 |
| --- | --- | --- |
| namespace | [Namespace](../sdk/#namespace) | 네임스페이스 |
| rateModel | [RateModel](../sdk/#ratemodel) | 강화 레이트 모델 |
| targetItemSetId | string | 강화 대상 아이템 세트의 GRN |
| bonusRate | float | 경험치 보너스 배율(1.0=보너스 없음) |
| experienceValue | long | 획득 경험치량 |


##### 구현 예제


**Lua**
```lua

-- Request
local namespace = args.namespace
local rateModel = args.rateModel
local targetItemSetId = args.targetItemSetId
local bonusRate = args.bonusRate
local experienceValue = args.experienceValue

-- 비동기 스크립트는 일반적으로 API 응답에 영향을 주지 않습니다.
-- 로그 출력이나 분석, 외부 알림 등에 사용됩니다.

result = {
}
```


---
  



