Trigger Reference of GS2-AdReward Script

Reference for event triggers that call extended scripts, as defined in GS2-AdReward

acquirePoint

Event trigger to call GS2-Script before Acquire Point.

Request

TypeDescription
namespaceNamespaceNamespace
pointPointPoint before acquisition processing
acquirePointValuelongAmount of points to be acquired

Result

TypeRequireDefaultLimitationDescription
permitboolAllow point acquisition
overridePointValuelong~ 2147483645Amount of points to be acquired by overwriting

Implementation Example

namespace = args.namespace
point = args.point
acquirePointValue = args.acquirePointValue

result = {
  permit=permit,
  overridePointValue=overridePointValue
}

acquirePointDone

GS2-Script called after Acquire Point.

Request

TypeDescription
namespaceNamespaceNamespace
pointPointPoint before acquisition processing
afterPointPointPoint after acquisition processing
acquirePointValuelongAmount of points to be acquired

Result

TypeRequireDefaultLimitationDescription

Implementation Example

namespace = args.namespace
point = args.point
afterPoint = args.afterPoint
acquirePointValue = args.acquirePointValue

result = {
}

consumePoint

Event trigger to call GS2-Script before Consume Point.

Request

TypeDescription
namespaceNamespaceNamespace
pointPointPoint before acquisition processing
consumePointValuelongAmount of points to be consumed

Result

TypeRequireDefaultLimitationDescription
permitboolAllow point acquisition
overridePointValuelong~ 2147483645Amount of points to be acquired by overwriting

Implementation Example

namespace = args.namespace
point = args.point
consumePointValue = args.consumePointValue

result = {
  permit=permit,
  overridePointValue=overridePointValue
}

consumePointDone

GS2-Script called after Consume Point.

Request

TypeDescription
namespaceNamespaceNamespace
pointPointPoint before acquisition processing
afterPointPointPoint after acquisition processing
consumePointValuelongAmount of points to be consumed

Result

TypeRequireDefaultLimitationDescription

Implementation Example

namespace = args.namespace
point = args.point
afterPoint = args.afterPoint
consumePointValue = args.consumePointValue

result = {
}