Quests

Overview

Pick one of three quests (Forest patrol, Cave expedition, Dragon hunt), start it, and clear it for a reward. Starting a quest spends stamina, and clearing it pays free coins, with a bonus on top the first time only. Only one quest can be in progress at a time.

How to try it

  1. Check each quest’s cost and reward under Pick a quest (one at a time). Forest patrol, for example, costs 10 stamina and pays 10 coins, plus 100 more on the first clear.
  2. Press Start on a quest. Stamina in Your stamina drops by the quest’s cost, and the running quest appears under Running, as in Running: Forest patrol (10 stamina spent).
  3. While a quest is running, pressing Start on another quest is refused by GS2.
  4. Press Complete under Your quest in progress. The clear reward and the first-clear bonus are paid into Free balance under Where the coins land, and the quest is marked Cleared.
  5. Start and clear the same quest again: this time only the clear reward is paid, with no first-clear bonus. If you run short of stamina, Recover restores 5.

Stamina tops out at 50 and recovers 5 every minute on its own. Dragon hunt costs 30 stamina.

GS2 services used

  • GS2-Quest: The GS2-Quest group main defines the three quests with their start cost in stamina, clear reward and first-clear reward. Start and Complete are GS2-Quest’s own client calls; it keeps one progress per player and records which quests have been cleared.
  • GS2-Stamina: GS2-Stamina holds the stamina meter (50 at most, recovering 5 every minute); starting a quest deducts its cost through Gs2Stamina:ConsumeStaminaByUserId.
  • GS2-Money2: A GS2-Money2 wallet receives the reward coins; clear and first-clear rewards are paid in as free coins through Gs2Money2:DepositByUserId.
  • GS2-Exchange: A GS2-Exchange rate model defines Recover, a transaction that restores 5 stamina.

Use it in GS2 Studio

In GS2 Studio’s Simple mode, open Add features and press Add on Quests to bring this feature into your own project. To point at the package directly, choose Add from GitHub and enter the package below.

https://github.com/gs2io/gs2-studio-package/tree/main/micro-economy-quest/packages/micro-economy-quest
  • Owner: gs2io
  • Repository: gs2-studio-package
  • Subdirectory: micro-economy-quest/packages/micro-economy-quest

Source code