Trigger Reference of GS2-Experience Script
Reference of event triggers that call extended scripts
Trigger
rankCapScript
obtaining rank caps
Synchronous Execution Script
Script and obtaining rank caps are executed synchronously in that order.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| experienceModel | ExperienceModel | Experience Model |
| userId | string | User ID |
| propertyId | string | Property ID |
Result
| Type | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|
| rankCap | long | ✓ | 0 ~ 2147483645 | rank cap |
Implementation Example
namespace = args.namespace
experienceModel = args.experienceModel
userId = args.userId
propertyId = args.propertyId
result = {
rankCap=rankCap
}changeExperience
experience changes
Synchronous Execution Script
Script and experience changes are executed synchronously in that order.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| experienceModel | ExperienceModel | Experience Model |
| status | Status | Status before change |
| afterStatus | Status | Status after change |
Result
| Type | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|
| permit | bool | ✓ | Whether to allow experience change | ||
| overrideExperienceValue | long | ✓ | 0 ~ 2147483645 | Amount of experience change |
Implementation Example
namespace = args.namespace
experienceModel = args.experienceModel
status = args.status
afterStatus = args.afterStatus
result = {
permit=permit,
overrideExperienceValue=overrideExperienceValue
}Asynchronous Execution Script
The script will run after the experience changes is executed.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| experienceModel | ExperienceModel | Experience Model |
| oldStatus | Status | Status before change |
| status | Status | Status |
Result
| Type | Required | Default | Value Limits | Description |
|---|
Implementation Example
namespace = args.namespace
experienceModel = args.experienceModel
oldStatus = args.oldStatus
status = args.status
result = {
}changeRank
rank changes
Synchronous Execution Script
Script and rank changes are executed synchronously in that order.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| experienceModel | ExperienceModel | Experience Model |
| status | Status | Status before change |
| afterStatus | Status | Status after change |
Result
| Type | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|
| permit | bool | ✓ | Whether to allow experience change |
Implementation Example
namespace = args.namespace
experienceModel = args.experienceModel
status = args.status
afterStatus = args.afterStatus
result = {
permit=permit
}Asynchronous Execution Script
The script will run after the rank changes is executed.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| experienceModel | ExperienceModel | Experience Model |
| oldStatus | Status | Status before change |
| status | Status | Status |
Result
| Type | Required | Default | Value Limits | Description |
|---|
Implementation Example
namespace = args.namespace
experienceModel = args.experienceModel
oldStatus = args.oldStatus
status = args.status
result = {
}changeRankCap
rank cap changes
Synchronous Execution Script
Script and rank cap changes are executed synchronously in that order.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| experienceModel | ExperienceModel | Experience Model |
| status | Status | Status before change |
| afterStatus | Status | Status after change |
Result
| Type | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|
| permit | bool | ✓ | Whether to allow rank cap change | ||
| overrideRankCapValue | long | ✓ | 0 ~ 2147483645 | New rank cap |
Implementation Example
namespace = args.namespace
experienceModel = args.experienceModel
status = args.status
afterStatus = args.afterStatus
result = {
permit=permit,
overrideRankCapValue=overrideRankCapValue
}Asynchronous Execution Script
The script will run after the rank cap changes is executed.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| experienceModel | ExperienceModel | Experience Model |
| status | Status | Status |
Result
| Type | Required | Default | Value Limits | Description |
|---|
Implementation Example
namespace = args.namespace
experienceModel = args.experienceModel
status = args.status
result = {
}overflowExperience
experience overflow occurs
Synchronous Execution Script
Script and experience overflow occurs are executed synchronously in that order.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| experienceModel | ExperienceModel | Experience Model |
| status | Status | Status |
| overflowExperienceValue | long | Experience overflow value |
Result
| Type | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|
| permit | bool | ✓ | Whether to allow experience overflow |
Implementation Example
namespace = args.namespace
experienceModel = args.experienceModel
status = args.status
overflowExperienceValue = args.overflowExperienceValue
result = {
permit=permit
}