Code Monkey home page Code Monkey logo

habitica-stayin-alive-script's Introduction

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.

habitica-stayin-alive-script's People

Contributors

raitheofdureya avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

citizenprayer

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.