This script runs automatically in the background and accepts any quest proposed in your party. You will never miss a quest again!
javascript
function autoAcceptQuests() {
var habId = "PASTE_YOUR_USER_ID_HERE";
var habToken = "PASTE_YOUR_API_TOKEN_HERE";
var params = {
"method": "GET",
"headers": {
"x-api-user": habId,
"x-api-key": habToken,
"x-client": habId + "-AutoAcceptQuests"
}
};
var response = UrlFetchApp.fetch("<https://habitica.com/api/v3/groups/party>", params);
var partyData = JSON.parse(response.getContentText());
if (partyData.data.quest && partyData.data.quest.key && !partyData.data.quest.active) {
var acceptParams = {
"method": "POST",
"headers": {
"x-api-user": habId,
"x-api-key": habToken,
"x-client": habId + "-AutoAcceptQuests"
}
};
UrlFetchApp.fetch("<https://habitica.com/api/v3/groups/party/quests/accept>", acceptParams);
}
}
PASTE_YOUR_USER_ID_HERE and replace it with your actual User ID.PASTE_YOUR_API_TOKEN_HERE and replace it with your actual API Token.Ctrl+S to save the project. Name it (e.g., "Habitica Auto-Accept").