Are you tired of running out of health?
Would you like to have bought a health potion earlier?
Do you wish you had remembered to use that healer skill?
Would you like to help your party stay alive even when you're not online?
Don't despair! Using the Stayin' Alive Script you can forget about these worries and focus on your tasks!
This script will try to keep you alive by any means possible, either by using healer skills or buying health potions.
If you are not a healer or you don't have enough mana to cast healer skills it will try to buy a health potion for you.
Whether you're a brother or whether you're a mother
You're stayin' alive, stayin' alive
Feel the city breakin' and everybody shakin'
And we're stayin' alive, stayin' alive
Ah, ha, ha, ha, stayin' alive, stayin' alive
Ah, ha, ha, ha, stayin' alive
The script was developed using Google Apps Script and can be configured to run on a timed basis. In order for you to use this script you need to have a Google account.
-
Go to script.google.com. If this is your first script, this will automatically create a new Google script for you and open an editor for it. Otherwise, edit an existing project by clicking the pencil icon next to it, or create another.
-
Paste this code snippet into the editor, replacing the spaces marked
Paste-Here-Your-Habitica-User-ID
andPaste-Here-Your-Habitica-API-Token
with Habitica User ID and API Token (leave the quotes). These can be found under the API tab in your Habitica settings. -
(Optional) For a more tailored experience you can optionally update the
healthTrigger
andtryBlessingFirst
variables.healthTrigger
is used to monitor your health: if it falls below a certain threshold, the script is activated. Change its value to your liking.tryBlessingFirst
if you are a healer and would like to try "Blessing" first instead of "Healing Light", set this variable totrue
.
-
Under Edit, select current project's triggers. Then add a time based trigger that runs
StayingAlive
and select the interval of your preference. When scheduling the scripts, try to not schedule them to run more than hourly. Be nice to Habitica servers! -
Save and you're done!
P.S.: If you are still not sure how to configure it, the excellent easy step-by-step setup guide with pictures written by @EugeneG may help.
- The setup instructions were adapted from the Google Apps Script page
- Staying Alive GIF by Grit
Copyright (c) 2021 RaitheOfDureya
Licensed under the MIT License.