Auto Heal

== Summary ==
Auto Heal is an automation script for Habitica that casts healing skills (Blessing & Healing Light) every 15 mins as needed to heal the player & their party. The script checks the health of the player & each party member before casting, so no mana is wasted. This script only works for healers.
== Before Installing ==
It is highly recommended that you use a desktop computer for this, as some of the steps don't work well on mobile. First you must uninstall any scripts that do the same thing(s) as Auto Heal. For example, if you are running the Auto Cast Party Buff Skills script to cast healing skills, you need to uninstall it, because Auto Heal also casts healing skills, and these two scripts will conflict with each other. To uninstall a script:
# Click here to see a list of your scripts. If you're not already signed into your Google account, click the "Start Scripting" button and sign in. Then click on "My Projects" in the main menu on the left.
# Click on the script you want to uninstall.
# Click the blue "Deploy" button near the top of the page, then click "Manage deployments".
# Click the "Archive" button (looks like a box with a down arrow inside), then click the "Done" button. If the script has no deployments, there will be no archive button, and you will see the message "This project has not been deployed yet". In this case, just click "Cancel".
# In the main menu on the left, click on "Triggers" (looks like an alarm clock).
# Hover your mouse over each trigger in the list, click the three dots on the right, and click "Delete trigger".
# If your script had no deployments, you can skip to the last step. If you clicked the "Archive" button, continue to the next step.
# Click here to open your API Settings. Highlight and copy your User ID (it looks something like this: 35c3fb6f-fb98-4bc3-b57a-ac01137d0847).
# Click here to open the Habitica Webhook Editor. Paste your User ID in the "User ID" box.
# On the same page where you copied your User ID, click the "Show API Token" button, and copy your API Token.
# In the Habitica Webhook Editor, paste your API Token in the "API Token" box, then click "Login".
# Click the "Delete" button next to every webhook that belongs to the script you are uninstalling. The webhook should have a large title that matches the name of the script.
# Repeat the above steps for every script you need to uninstall.
== Setup Instructions ==
It is highly recommended that you use a desktop computer for this, as some of the steps don't work well on mobile. Make sure you read the Before Installing section above, and follow the instructions there if applicable!
# Click here to go to the Auto Heal script. If you're not signed into your Google account, click on "Start Scripting", then sign in, then click on the script link again.
# Click the "Make a copy" button (looks like two pages of paper).
# At the top of your screen, click on "Copy of Auto Heal". Rename it "Auto Heal" and click the "Rename" button.
# Click here to open your API Settings. Highlight and copy your User ID (it looks something like this: 35c3fb6f-fb98-4bc3-b57a-ac01137d0847). In the Auto Heal script, paste your User ID between the quotations where it says const USER_ID = "";. It should now look something like this: const USER_ID = "35c3fb6f-fb98-4bc3-b57a-ac01137d0847";
# On the same page where you copied your User ID, click the "Show API Token" button, and copy your API Token. In the Auto Heal script, paste your API Token between the quotations where it says const API_TOKEN = "";. It should now look something like this: const API_TOKEN = "35c3fb6f-fb98-4bc3-b57a-ac01137d0847";
# Click the "Save project" button near the top of the page (looks like a floppy disk).
# Click the drop-down menu to the right of the "Debug" button, near the top of the page. Select "install" from the drop-down.
# Click the "Run" button to the left of the "Debug" button.
# (If this is your first time running the script) Click the "Review permissions" button and select your Google account. Click on "Advanced", then "Go to Auto Heal (unsafe)". (Don't worry, it is safe!) Then click "Continue", then "Allow".
# Wait for the "Execution completed" message in the Execution Log.
You're all done! If you need to change the settings or uninstall the script at some point, follow the steps below.
== Uninstalling the Script ==
It is highly recommended that you use a desktop computer for this, as some of the steps don't work well on mobile.
# Click here to see a list of your scripts. If you're not already signed into your Google account, click the "Start Scripting" button and sign in. Then click on "My Projects" in the main menu on the left.
# Click on "Auto Heal".
# Click the drop-down menu to the right of the "Debug" button, near the top of the page. Select "uninstall" from the drop-down.
# Click the "Run" button to the left of the "Debug" button. Wait for it to say "Execution completed".
== Updating the Script ==
It is highly recommended that you use a desktop computer for this, as some of the steps don't work well on mobile.
# Follow the steps in Uninstalling the Script above.
# Copy & paste your settings (consts) into a text editor so you can reference them while setting up the new version.
# In the main menu on the left, click on "Overview" (looks like a lowercase letter i inside a circle).
# Click the "Remove project" button (looks like a trash can).
# Follow the Setup Instructions above.
== Contact ==
❔ Questions: https://github.com/bumbleshoot/auto-heal/discussions/categories/q-a
💡 Suggestions: https://github.com/bumbleshoot/auto-heal/discussions/categories/suggestions
🐞 Report a bug: https://github.com/bumbleshoot/auto-heal/issues
💗 Donate: https://github.com/sponsors/bumbleshoot