Script Trigger Reference of GS2-Limit

Reference of event triggers that call extended scripts

Trigger

countUp

Count up

Synchronous Execution Script

The script is executed synchronously before the count up process.

Request
TypeDescription
namespaceNamespaceNamespace
limitModelLimitModelLimit model
counterCounterCounter
userIdstringUser ID
countUpValueintAmount to count up
maxValueintMaximum value allowed to count up
Result
TypeRequiredDefaultValue LimitsDescription
permitbool
Whether to allow count up
Implementation Example
namespace = args.namespace
limitModel = args.limitModel
counter = args.counter
userId = args.userId
countUpValue = args.countUpValue
maxValue = args.maxValue

result = {
  permit=permit
}

Asynchronous Execution Script

The script executes asynchronously after the Count up.

Request
TypeDescription
namespaceNamespaceNamespace
limitModelLimitModelLimit model
oldCounterCounterCounter before update
newCounterCounterCounter after update
userIdstringUser ID
countUpValueintAmount to count up
maxValueintMaximum value allowed to count up
Implementation Example
namespace = args.namespace
limitModel = args.limitModel
oldCounter = args.oldCounter
newCounter = args.newCounter
userId = args.userId
countUpValue = args.countUpValue
maxValue = args.maxValue

result = {
}