Transaction Action of GS2-Script

VerifyAction

ConsumeAction

AcquireAction

Gs2Script:InvokeScript

Execute the script

Actions for which quantity can be specified: NO

Reversible action: NO

TypeDescription
scriptIdstringScript GRN
userIdstringSet #{userId} to replace the currently logged in user ID.
argsstringArguments (JSON Format)
randomStatusRandomStatusRandom number status
timeOffsetTokenstringTime offset token
{
    "action": "Gs2Script:InvokeScript",
    "request": {
        "scriptId": "[string]Script GRN",
        "userId": "[string]User Id",
        "args": "[string]Arguments (JSON Format)",
        "randomStatus": {
            "seed": "[long]Random seed",
            "used": [
                {
                    "category": "[long]Category",
                    "used": "[long]Used random number"
                }
            ]
        },
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Script:InvokeScript
request:
  scriptId: "[string]Script GRN"
  userId: "[string]User Id"
  args: "[string]Arguments (JSON Format)"
  randomStatus: 
    seed: "[long]Random seed"
    used: 
      - category: "[long]Category"
        used: "[long]Used random number"
  timeOffsetToken: "[string]Time offset token"
transaction.service("script").acquire.invoke_script({
    scriptId="[string]Script GRN",
    userId="[string]User Id",
    args="[string]Arguments (JSON Format)",
    randomStatus={
        seed="[long]Random seed",
        used={
                {
                    category="[long]Category",
                    used="[long]Used random number"
                }
            }
    },
    timeOffsetToken="[string]Time offset token",
})