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
TypeDescription
namespaceNamespaceNamespace
experienceModelExperienceModelExperience Model
userIdstringUser ID
propertyIdstringProperty ID
Result
TypeRequiredDefaultValue LimitsDescription
rankCaplong
0 ~ 2147483645rank 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
TypeDescription
namespaceNamespaceNamespace
experienceModelExperienceModelExperience Model
statusStatusStatus before change
afterStatusStatusStatus after change
Result
TypeRequiredDefaultValue LimitsDescription
permitbool
Whether to allow experience change
overrideExperienceValuelong
0 ~ 2147483645Amount 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
TypeDescription
namespaceNamespaceNamespace
experienceModelExperienceModelExperience Model
oldStatusStatusStatus before change
statusStatusStatus
Result
TypeRequiredDefaultValue LimitsDescription
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
TypeDescription
namespaceNamespaceNamespace
experienceModelExperienceModelExperience Model
statusStatusStatus before change
afterStatusStatusStatus after change
Result
TypeRequiredDefaultValue LimitsDescription
permitbool
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
TypeDescription
namespaceNamespaceNamespace
experienceModelExperienceModelExperience Model
oldStatusStatusStatus before change
statusStatusStatus
Result
TypeRequiredDefaultValue LimitsDescription
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
TypeDescription
namespaceNamespaceNamespace
experienceModelExperienceModelExperience Model
statusStatusStatus before change
afterStatusStatusStatus after change
Result
TypeRequiredDefaultValue LimitsDescription
permitbool
Whether to allow rank cap change
overrideRankCapValuelong
0 ~ 2147483645New 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
TypeDescription
namespaceNamespaceNamespace
experienceModelExperienceModelExperience Model
statusStatusStatus
Result
TypeRequiredDefaultValue LimitsDescription
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
TypeDescription
namespaceNamespaceNamespace
experienceModelExperienceModelExperience Model
statusStatusStatus
overflowExperienceValuelongExperience overflow value
Result
TypeRequiredDefaultValue LimitsDescription
permitbool
Whether to allow experience overflow
Implementation Example
namespace = args.namespace
experienceModel = args.experienceModel
status = args.status
overflowExperienceValue = args.overflowExperienceValue

result = {
  permit=permit
}