Skip to content

RaitheOfDureya/Habitica-Stayin-Alive-Script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

Habitica Stayin' Alive Script

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.

Bee Gees - Stayin' Alive

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

Setup Instructions

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.

  1. 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.

  2. Paste this code snippet into the editor, replacing the spaces marked Paste-Here-Your-Habitica-User-ID and Paste-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.

  3. (Optional) For a more tailored experience you can optionally update the healthTrigger and tryBlessingFirst 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 to true.
  4. 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!

  5. 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.

Credits and Acknowledgments

License

Copyright (c) 2021 RaitheOfDureya

Licensed under the MIT License.

About

This script will try to keep you alive by any means possible, either by using healer skills or buying health potions.

Topics

Resources

License

Stars

Watchers

Forks