Trigger Reference of GS2-Idle Script

receive

Event trigger to call GS2-Script before Receive Rewards.

Request

TypeDescription
namespaceNamespaceNamespace
categoryCategoryModelShowcase model
userIdstringUser ID performing the idle
acquireActionsAcquireAction[]Rewards
configConfig[]Set values to be applied to stamp sheet variables

Result

TypeRequireDefaultLimitationDescription
permitboolAllow receive
ratefloat1.0~ 1000Acquisition quantity rate

Implementation Example

namespace = args.namespace
category = args.category
userId = args.userId
acquireActions = args.acquireActions
config = args.config

result = {
  permit=permit,
  rate=rate
}

receiveDone

GS2-Script called after Receive Rewards.

Request

TypeDescription
namespaceNamespaceNamespace
categoryCategoryModelShowcase model
userIdstringUser ID performing the idle
acquireActionsAcquireAction[]Rewards
configConfig[]Set values to be applied to stamp sheet variables

Result

TypeRequireDefaultLimitationDescription

Implementation Example

namespace = args.namespace
category = args.category
userId = args.userId
acquireActions = args.acquireActions
config = args.config

result = {
}