Script Trigger Reference of GS2-Enhance
Reference of event triggers that call extended scripts
Trigger
enhance
enhancement execution
Synchronous Execution Script
The script is executed synchronously before the enhancement execution process.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| rateModel | RateModel | Enhanced Rate Model |
| targetItemSetId | string | GRN for the enhanced Item Set (item quantity per expiration date) |
| bonusRate | float | Experience bonus multiplier (1.0 = no bonus) |
| experienceValue | long | Amount of experience gained |
Result
| Type | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|
| permit | bool | ✓ | Whether to allow enhancement execution | ||
| overrideExperienceValue | long | 0 ~ 2147483645 | Amount of gained experience to override |
Implementation Example
namespace = args.namespace
rateModel = args.rateModel
targetItemSetId = args.targetItemSetId
bonusRate = args.bonusRate
experienceValue = args.experienceValue
result = {
permit=permit,
overrideExperienceValue=overrideExperienceValue
}Asynchronous Execution Script
The script executes asynchronously after the enhancement execution.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| rateModel | RateModel | Enhanced Rate Model |
| targetItemSetId | string | GRN for the enhanced Item Set (item quantity per expiration date) |
| bonusRate | float | Experience bonus multiplier (1.0 = no bonus) |
| experienceValue | long | Amount of experience gained |
Implementation Example
namespace = args.namespace
rateModel = args.rateModel
targetItemSetId = args.targetItemSetId
bonusRate = args.bonusRate
experienceValue = args.experienceValue
result = {
}