GS2-Account Script Trigger Reference
Trigger
createAccount
Account creation
Synchronous Execution Script
The script is executed synchronously before the account creation process.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| account | Account | Game Player Account |
Result
| Type | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|
| permit | bool | ✓ | Whether to allow account creation |
Implementation Example
-- Request
local namespace = args.namespace
local account = args.account
-- Business logic:
local permit = true
-- Result
result = {
permit=permit
}Asynchronous Execution Script
The script is executed asynchronously after the account creation process.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| account | Account | Game Player Account |
Implementation Example
-- Request
local namespace = args.namespace
local account = args.account
-- Asynchronous scripts typically do not affect the API response.
-- Use for logging, analytics, external notifications, etc.
result = {
}authentication
Account authentication
Synchronous Execution Script
The script is executed synchronously before the account authentication process.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| account | Account | Game Player Account |
| elapsedHours | int | Elapsed time since last login |
Result
| Type | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|
| permit | bool | ✓ | Whether to allow account authentication | ||
| force | bool | false | Whether to allow authentication even if password authentication fails |
Implementation Example
-- Request
local namespace = args.namespace
local account = args.account
local elapsedHours = args.elapsedHours
-- Business logic:
local permit = true
local force = false
-- Result
result = {
permit=permit,
force=force
}Asynchronous Execution Script
The script is executed asynchronously after the account authentication process.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| account | Account | Game Player Account |
| elapsedHours | int | Elapsed time since last login |
Implementation Example
-- Request
local namespace = args.namespace
local account = args.account
local elapsedHours = args.elapsedHours
-- Asynchronous scripts typically do not affect the API response.
-- Use for logging, analytics, external notifications, etc.
result = {
}ban
Account Ban registration
Synchronous Execution Script
The script is executed synchronously before the account ban registration process.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| account | Account | Game Player Account |
| addBanStatus | BanStatus | Account Ban Status to be added |
Result
| Type | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|
| permit | bool | ✓ | Whether to allow Account Ban registration |
Implementation Example
-- Request
local namespace = args.namespace
local account = args.account
local addBanStatus = args.addBanStatus
-- Business logic:
local permit = true
-- Result
result = {
permit=permit
}Asynchronous Execution Script
The script is executed asynchronously after the account ban registration process.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| account | Account | Game Player Account |
| addBanStatus | BanStatus | Account Ban Status to add |
Implementation Example
-- Request
local namespace = args.namespace
local account = args.account
local addBanStatus = args.addBanStatus
-- Asynchronous scripts typically do not affect the API response.
-- Use for logging, analytics, external notifications, etc.
result = {
}unBan
Account Ban removal
Synchronous Execution Script
The script is executed synchronously before the account ban removal process.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| account | Account | Game Player Account |
Result
| Type | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|
| permit | bool | ✓ | Whether to allow Account Ban removal |
Implementation Example
-- Request
local namespace = args.namespace
local account = args.account
-- Business logic:
local permit = true
-- Result
result = {
permit=permit
}Asynchronous Execution Script
The script is executed asynchronously after the account ban removal process.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| account | Account | Game Player Account |
Implementation Example
-- Request
local namespace = args.namespace
local account = args.account
-- Asynchronous scripts typically do not affect the API response.
-- Use for logging, analytics, external notifications, etc.
result = {
}createTakeOver
Registration of Takeover Information
Synchronous Execution Script
The script is executed synchronously before the registration of takeover information process.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| takeOver | TakeOver | Takeover Information |
| account | Account | Game Player Account |
Result
| Type | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|
| permit | bool | ✓ | Whether to allow registration of Takeover Information |
Implementation Example
-- Request
local namespace = args.namespace
local takeOver = args.takeOver
local account = args.account
-- Business logic:
local permit = true
-- Result
result = {
permit=permit
}Asynchronous Execution Script
The script is executed asynchronously after the registration of takeover information process.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| takeOver | TakeOver | Takeover Information |
| account | Account | Game Player Account |
Implementation Example
-- Request
local namespace = args.namespace
local takeOver = args.takeOver
local account = args.account
-- Asynchronous scripts typically do not affect the API response.
-- Use for logging, analytics, external notifications, etc.
result = {
}doTakeOver
Takeover execution
Synchronous Execution Script
The script is executed synchronously before the takeover execution process.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| account | Account | Game Player Account |
| takeOver | TakeOver | Takeover Setting |
Result
| Type | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|
| permit | bool | ✓ | Whether to allow takeover execution | ||
| force | bool | false | Whether to allow authentication even if password authentication fails |
Implementation Example
-- Request
local namespace = args.namespace
local account = args.account
local takeOver = args.takeOver
-- Business logic:
local permit = true
local force = false
-- Result
result = {
permit=permit,
force=force
}Asynchronous Execution Script
The script is executed asynchronously after the takeover execution process.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| account | Account | Game Player Account |
| takeOver | TakeOver | Takeover Setting |
Implementation Example
-- Request
local namespace = args.namespace
local account = args.account
local takeOver = args.takeOver
-- Asynchronous scripts typically do not affect the API response.
-- Use for logging, analytics, external notifications, etc.
result = {
}