Trigger Reference of GS2-Mission Script

missionComplete

Event trigger to call GS2-Script before a mission is completed.

Request

TypeDescription
namespaceNamespaceNamespace
missionGroupModelMissionGroupModelMission Group
oldCompleteCompleteBefore status of achievement
newCompleteCompleteAfter status of achievement
completeTaskNamesstring[]List of completed task names

Result

TypeRequireDefaultLimitationDescription
permitboolAllow mission accomplishment

Implementation Example

namespace = args.namespace
missionGroupModel = args.missionGroupModel
oldComplete = args.oldComplete
newComplete = args.newComplete
completeTaskNames = args.completeTaskNames

result = {
  permit=permit
}

missionCompleteDone

GS2-Script called after a mission is completed.

Request

TypeDescription
namespaceNamespaceNamespace
missionGroupModelMissionGroupModelMission Group
completeCompleteStatus of achievement
completeTaskNamesstring[]List of completed task names

Result

TypeRequireDefaultLimitationDescription

Implementation Example

namespace = args.namespace
missionGroupModel = args.missionGroupModel
complete = args.complete
completeTaskNames = args.completeTaskNames

result = {
}

counterIncrement

Event trigger to call GS2-Script before the counter rises.

Request

TypeDescription
namespaceNamespaceNamespace
counterModelCounterModelCounter Model
oldCounterCounterBefore Counter
newCounterCounterAfter Counter

Result

TypeRequireDefaultLimitationDescription
permitboolAllow counter rise

Implementation Example

namespace = args.namespace
counterModel = args.counterModel
oldCounter = args.oldCounter
newCounter = args.newCounter

result = {
  permit=permit
}

counterIncrementDone

GS2-Script called after the counter rises.

Request

TypeDescription
namespaceNamespaceNamespace
counterModelCounterModelCounter Model
counterCounterCounter

Result

TypeRequireDefaultLimitationDescription

Implementation Example

namespace = args.namespace
counterModel = args.counterModel
counter = args.counter

result = {
}

receiveRewards

Event trigger to call GS2-Script before GS2-Script to be executed upon receipt of reward.

Request

TypeDescription
namespaceNamespaceNamespace
missionGroupModelMissionGroupModelMission Group
missionTaskModelMissionTaskModelMission Task
oldCompleteCompleteBefore status of achievement
newCompleteCompleteAfter status of achievement

Result

TypeRequireDefaultLimitationDescription
permitboolAllow counter rise

Implementation Example

namespace = args.namespace
missionGroupModel = args.missionGroupModel
missionTaskModel = args.missionTaskModel
oldComplete = args.oldComplete
newComplete = args.newComplete

result = {
  permit=permit
}

receiveRewardsDone

GS2-Script called after GS2-Script to be executed upon receipt of reward.

Request

TypeDescription
namespaceNamespaceNamespace
missionGroupModelMissionGroupModelMission Group
missionTaskModelMissionTaskModelMission Task
completeCompletestatus of achievement

Result

TypeRequireDefaultLimitationDescription

Implementation Example

namespace = args.namespace
missionGroupModel = args.missionGroupModel
missionTaskModel = args.missionTaskModel
complete = args.complete

result = {
}