Skip to main content

Custom Quests

First register your custom quest

{ name = "farm_apples", label = "Farm Apples", description = "Farm 10 apples", xp = 2500, premium = false, untilAvailable = 0, showProgress = true }

Find the function in your script where the action is executed (e.g. when a player farms an apple) and add the AddPlayerQuestProgress export to update the quest progress:

function farmApple(src) 
giveItemToPlayer(src, "apple")
exports['sky_battlepass']:AddPlayerQuestProgress(src, "farm_apples", 10)
end

Here, the 10 represents the percentage of the quest progress to add. In this example, the player is given 10% progress towards the farm_apples quest every time they farm an apple. Once the player has farmed 10 apples and reaches 100% progress, the quest is considered complete and the player earns the XP reward.