Giter Site home page Giter Site logo

bumbleshoot / auto-heal Goto Github PK

View Code? Open in Web Editor NEW
1.0 4.0 0.0 36 KB

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.

Home Page: https://habitica.fandom.com/wiki/Auto_Heal

JavaScript 100.00%
automation google-apps-script habitica script

auto-heal's Introduction

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:

  1. 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.
  2. Click on the script you want to uninstall.
  3. Click the blue "Deploy" button near the top of the page, then click "Manage deployments".
  4. 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".
  5. In the main menu on the left, click on "Triggers" (looks like an alarm clock).
  6. Hover your mouse over each trigger in the list, click the three dots on the right, and click "Delete trigger".
  7. If your script had no deployments, you can skip to the last step. If you clicked the "Archive" button, continue to the next step.
  8. Click here to open your API Settings. Highlight and copy your User ID (it looks something like this: 35c3fb6f-fb98-4bc3-b57a-ac01137d0847).
  9. Click here to open the Habitica Webhook Editor. Paste your User ID in the "User ID" box.
  10. On the same page where you copied your User ID, click the "Show API Token" button, and copy your API Token.
  11. In the Habitica Webhook Editor, paste your API Token in the "API Token" box, then click "Login".
  12. 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.
  13. 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!

  1. Click here to go to the Auto Heal script. If you're not already signed into your Google account, you will be asked to sign in.
  2. In the main menu on the left, click on "Overview" (looks like a lowercase letter i inside a circle).
  3. Click the "Make a copy" button (looks like two pages of paper).
  4. At the top of your screen, click on "Copy of Auto Heal". Rename it "Auto Heal" and click the "Rename" button.
  5. 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";
  6. 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";
  7. Click the "Save project" button near the top of the page (looks like a floppy disk).
  8. Click the drop-down menu to the right of the "Debug" button, near the top of the page. Select "install" from the drop-down.
  9. Click the "Run" button to the left of the "Debug" button. Wait for it to say "Execution completed".

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.

  1. 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.
  2. Click on "Auto Heal".
  3. Click the drop-down menu to the right of the "Debug" button, near the top of the page. Select "uninstall" from the drop-down.
  4. 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.

  1. Follow the steps in Uninstalling the Script above.
  2. Copy & paste your settings (consts) into a text editor so you can reference them while setting up the new version.
  3. In the main menu on the left, click on "Overview" (looks like a lowercase letter i inside a circle).
  4. Click the "Remove project" button (looks like a trash can).
  5. 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

auto-heal's People

Contributors

bumbleshoot avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

auto-heal's Issues

`stats.buffs.con` (-200000) is less than minimum allowed value

What is the bug?
I started getting the below error today:

Error: Request failed for https://habitica.com/ returned code 400. Truncated
server response: {"success":false,"error":"BadRequest","message":"User
validation failed","errors":[{"message":"Path stats.buffs.con (-200000)
is less than minimum allowed value
(0).","path":"stats.buffs.con","value":-200000}]}
at fetch (autoHeal:155:13)
at healParty (autoHeal:236:11)
at GS_INTERNAL_top_function_call.gs:1:8

I assume this has something to do with the patch to fix negative stat values, but not sure why Auto Heal would be setting CON to -200000?

Additional context
The script is run on a 30-minute time-driven trigger

How often does this happen?
The past 4 consecutive attempts to run the script have failed with this error.

Script version
v1.0.11

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.