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
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| point | Point | Point before acquisition processing |
| acquirePointValue | long | Amount of points to be acquired |
Result
| Type | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|
| permit | bool | ✓ | Whether to allow point acquisition | ||
| overridePointValue | long | 0 ~ 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
}Asynchronous Execution Script
The script executes asynchronously after the Point acquisition.
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 | Required | Default | Value Limits | Description |
|---|
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
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| point | Point | Point before consumption processing |
| consumePointValue | long | Amount of points to be consumed |
Result
| Type | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|
| permit | bool | ✓ | Whether to allow point consumption | ||
| overridePointValue | long | 0 ~ 2147483645 | Amount 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
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| point | Point | Point before consumption processing |
| afterPoint | Point | Point after acquisition processing |
| consumePointValue | long | Amount of points to be consumed |
Result
| Type | Required | Default | Value Limits | Description |
|---|
Implementation Example
namespace = args.namespace
point = args.point
afterPoint = args.afterPoint
consumePointValue = args.consumePointValue
result = {
}