Trigger Reference of GS2-AdReward Script

Reference of event triggers that call extended scripts

Trigger

acquirePoint

Point acquisition

Synchronous Execution Script

Script and Point acquisition are executed synchronously in that order.

Request
TypeDescription
namespaceNamespaceNamespace
pointPointPoint before acquisition processing
acquirePointValuelongAmount of points to be acquired
Result
TypeRequiredDefaultValue LimitsDescription
permitbool
Whether to allow point acquisition
overridePointValuelong0 ~ 2147483645Amount of points to be acquired by overwriting
Implementation Example
namespace = args.namespace
point = args.point
acquirePointValue = args.acquirePointValue

result = {
  permit=permit,
  overridePointValue=overridePointValue
}

Asynchronous Execution Script

The script executes asynchronously after the Point acquisition.

Request
TypeDescription
namespaceNamespaceNamespace
pointPointPoint before acquisition processing
afterPointPointPoint after acquisition processing
acquirePointValuelongAmount of points to be acquired
Result
TypeRequiredDefaultValue LimitsDescription
Implementation Example
namespace = args.namespace
point = args.point
afterPoint = args.afterPoint
acquirePointValue = args.acquirePointValue

result = {
}

consumePoint

Point consumption

Synchronous Execution Script

Script and Point consumption are executed synchronously in that order.

Request
TypeDescription
namespaceNamespaceNamespace
pointPointPoint before consumption processing
consumePointValuelongAmount of points to be consumed
Result
TypeRequiredDefaultValue LimitsDescription
permitbool
Whether to allow point consumption
overridePointValuelong0 ~ 2147483645Amount of points consumed for overwriting
Implementation Example
namespace = args.namespace
point = args.point
consumePointValue = args.consumePointValue

result = {
  permit=permit,
  overridePointValue=overridePointValue
}

Asynchronous Execution Script

The script executes asynchronously after the Point consumption.

Request
TypeDescription
namespaceNamespaceNamespace
pointPointPoint before consumption processing
afterPointPointPoint after acquisition processing
consumePointValuelongAmount of points to be consumed
Result
TypeRequiredDefaultValue LimitsDescription
Implementation Example
namespace = args.namespace
point = args.point
afterPoint = args.afterPoint
consumePointValue = args.consumePointValue

result = {
}