Trigger Reference of GS2-Quest Script

startQuest

Event trigger to call GS2-Script before the quest begins.

Request

TypeDescription
namespaceNamespaceNamespace
questGroupModelQuestGroupModelQuest Group Model
questModelQuestModelQuest Model
randomSeedlongrandom number seed
rewardsReward[]Maximum rewards earned from quests
configConfig[]Set values to be applied to stamp sheet variables

Result

TypeRequireDefaultLimitationDescription
permitboolAllow the quest to begin
overrideRandomSeedlong~ 9223372036854775805Random number seed
overrideRewardsReward[][]~ 1000 itemsMaximum rewards earned from quests

Implementation Example

namespace = args.namespace
questGroupModel = args.questGroupModel
questModel = args.questModel
randomSeed = args.randomSeed
rewards = args.rewards
config = args.config

result = {
  permit=permit,
  overrideRandomSeed=overrideRandomSeed,
  overrideRewards=overrideRewards
}

startQuestDone

GS2-Script called after the quest begins.

Request

TypeDescription
namespaceNamespaceNamespace
questGroupModelQuestGroupModelQuest Group Model
questModelQuestModelQuest Model
progressProgressQuest Progress
configConfig[]Set values to be applied to stamp sheet variables

Result

TypeRequireDefaultLimitationDescription

Implementation Example

namespace = args.namespace
questGroupModel = args.questGroupModel
questModel = args.questModel
progress = args.progress
config = args.config

result = {
}

completeQuest

Event trigger to call GS2-Script before the quest is cleared.

Request

TypeDescription
namespaceNamespaceNamespace
questGroupModelQuestGroupModelQuest Group Model
questModelQuestModelQuest Model
rewardsReward[]Rewards earned from quests
progressProgressQuest Progress
configConfig[]Set values to be applied to stamp sheet variables

Result

TypeRequireDefaultLimitationDescription
permitboolAllow quests to be cleared
overrideRewardsReward[][]~ 1000 itemsMaximum rewards earned from quests

Implementation Example

namespace = args.namespace
questGroupModel = args.questGroupModel
questModel = args.questModel
rewards = args.rewards
progress = args.progress
config = args.config

result = {
  permit=permit,
  overrideRewards=overrideRewards
}

completeQuestDone

GS2-Script called after the quest is cleared.

Request

TypeDescription
namespaceNamespaceNamespace
questGroupModelQuestGroupModelQuest Group Model
questModelQuestModelQuest Model
rewardsReward[]Rewards earned from quests
progressProgressQuest Progress
configConfig[]Set values to be applied to stamp sheet variables

Result

TypeRequireDefaultLimitationDescription

Implementation Example

namespace = args.namespace
questGroupModel = args.questGroupModel
questModel = args.questModel
rewards = args.rewards
progress = args.progress
config = args.config

result = {
}

failedQuest

Event trigger to call GS2-Script before the quest fails.

Request

TypeDescription
namespaceNamespaceNamespace
questGroupModelQuestGroupModelQuest Group Model
questModelQuestModelQuest Model
rewardsReward[]Rewards earned from quests
configConfig[]Set values to be applied to stamp sheet variables

Result

TypeRequireDefaultLimitationDescription
permitboolAllow quests to fail
overrideRewardsReward[][]~ 1000 itemsMaximum rewards earned from quests

Implementation Example

namespace = args.namespace
questGroupModel = args.questGroupModel
questModel = args.questModel
rewards = args.rewards
config = args.config

result = {
  permit=permit,
  overrideRewards=overrideRewards
}

failedQuestDone

GS2-Script called after the quest fails.

Request

TypeDescription
namespaceNamespaceNamespace
questGroupModelQuestGroupModelQuest Group Model
questModelQuestModelQuest Model
rewardsReward[]Rewards earned from quests
configConfig[]Set values to be applied to stamp sheet variables

Result

TypeRequireDefaultLimitationDescription

Implementation Example

namespace = args.namespace
questGroupModel = args.questGroupModel
questModel = args.questModel
rewards = args.rewards
config = args.config

result = {
}