Trigger Reference of GS2-Quest Script
startQuest
Event trigger to call GS2-Script before the quest begins.
Request
Type | Description | |
---|
namespace | Namespace | Namespace |
questGroupModel | QuestGroupModel | Quest Group Model |
questModel | QuestModel | Quest Model |
randomSeed | long | random number seed |
rewards | Reward[] | Maximum rewards earned from quests |
config | Config[] | Set values to be applied to stamp sheet variables |
Result
Type | Require | Default | Limitation | Description | |
---|
permit | bool | ✓ | | | Allow the quest to begin |
overrideRandomSeed | long | | | ~ 9223372036854775805 | Random number seed |
overrideRewards | Reward[] | | [] | ~ 1000 items | Maximum 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
Type | Description | |
---|
namespace | Namespace | Namespace |
questGroupModel | QuestGroupModel | Quest Group Model |
questModel | QuestModel | Quest Model |
progress | Progress | Quest Progress |
config | Config[] | Set values to be applied to stamp sheet variables |
Result
Type | Require | Default | Limitation | Description | |
---|
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
Type | Description | |
---|
namespace | Namespace | Namespace |
questGroupModel | QuestGroupModel | Quest Group Model |
questModel | QuestModel | Quest Model |
rewards | Reward[] | Rewards earned from quests |
progress | Progress | Quest Progress |
config | Config[] | Set values to be applied to stamp sheet variables |
Result
Type | Require | Default | Limitation | Description | |
---|
permit | bool | ✓ | | | Allow quests to be cleared |
overrideRewards | Reward[] | | [] | ~ 1000 items | Maximum 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
Type | Description | |
---|
namespace | Namespace | Namespace |
questGroupModel | QuestGroupModel | Quest Group Model |
questModel | QuestModel | Quest Model |
rewards | Reward[] | Rewards earned from quests |
progress | Progress | Quest Progress |
config | Config[] | Set values to be applied to stamp sheet variables |
Result
Type | Require | Default | Limitation | Description | |
---|
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
Type | Description | |
---|
namespace | Namespace | Namespace |
questGroupModel | QuestGroupModel | Quest Group Model |
questModel | QuestModel | Quest Model |
rewards | Reward[] | Rewards earned from quests |
config | Config[] | Set values to be applied to stamp sheet variables |
Result
Type | Require | Default | Limitation | Description | |
---|
permit | bool | ✓ | | | Allow quests to fail |
overrideRewards | Reward[] | | [] | ~ 1000 items | Maximum 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
Type | Description | |
---|
namespace | Namespace | Namespace |
questGroupModel | QuestGroupModel | Quest Group Model |
questModel | QuestModel | Quest Model |
rewards | Reward[] | Rewards earned from quests |
config | Config[] | Set values to be applied to stamp sheet variables |
Result
Type | Require | Default | Limitation | Description | |
---|
Implementation Example
namespace = args.namespace
questGroupModel = args.questGroupModel
questModel = args.questModel
rewards = args.rewards
config = args.config
result = {
}