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
| Type | Description |
---|
namespace | Namespace | Namespace |
point | Point | Point before acquisition processing |
acquirePointValue | long | Amount of points to be acquired |
Result
| Type | Require | Default | Limitation | Description |
---|
permit | bool | ✓ | | | Allow point acquisition |
overridePointValue | long | | | ~ 2147483645 | Amount 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
| Type | Description |
---|
namespace | Namespace | Namespace |
point | Point | Point before acquisition processing |
afterPoint | Point | Point after acquisition processing |
acquirePointValue | long | Amount of points to be acquired |
Result
| Type | Require | Default | Limitation | Description |
---|
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
| Type | Description |
---|
namespace | Namespace | Namespace |
point | Point | Point before acquisition processing |
consumePointValue | long | Amount of points to be consumed |
Result
| Type | Require | Default | Limitation | Description |
---|
permit | bool | ✓ | | | Allow point acquisition |
overridePointValue | long | | | ~ 2147483645 | Amount 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
| Type | Description |
---|
namespace | Namespace | Namespace |
point | Point | Point before acquisition processing |
afterPoint | Point | Point after acquisition processing |
consumePointValue | long | Amount of points to be consumed |
Result
| Type | Require | Default | Limitation | Description |
---|
Implementation Example
namespace = args.namespace
point = args.point
afterPoint = args.afterPoint
consumePointValue = args.consumePointValue
result = {
}