Bulk Attack Quest Boss[]
by cTheDragons
This script is great for Warriors and Mages that will allow you to bulk attack the quest boss.
- 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 the code snippet below into the editor
- Replace the spaces marked #HabiticaUserID# and #HabiticaAPIToken# with your own Habitica User ID and API Token (leave the quotes). These can be found under the API tab in your Habitica settings.
- Change the ntimes to how many times you wish to use a skill each run. Currently, this is set to 8.
- Change the skillId to skill you wish to cast based on what is described in the comments in options. Below it is currently set to Burst of Flames with
skillId = "fireball"
- Change the targetId to match one of your tasks. To find the task id:
- Open the Data Display Tool
- Go to the section for Task Overview.
- Search for the task name you wish to target (if you are unsure which is best, check under Skills and Buffs for a recommendation based on the skill you are using).
- Click toggle developer data to show the task id (it is a long string of numbers and letters like 6eb598a1-886a-4be6-a6c5-9e9fdc8f5b44 as per example below).
function bulkAttackBoss() { var habId = "#HabiticaUserID#"; var habToken = "#HabiticaAPIToken#"; var ntimes = 8 var skillId = "fireball" var targetId = "6eb598a1-886a-4be6-a6c5-9e9fdc8f5b44" /* Below is a list of options of the party buff skills. Replace the value in skillId above for the skill you desire. Ensure you copy the quotes. See http://habitica.fandom.com/wiki/Skills for more information on skills. Options for skills: Warrior Brutal Smash: "smash" Mage Burst of Flames: "fireball" */ var url = "https://habitica.com/api/v3/user/class/cast/" + skillId + "?targetId=" + targetId var sleepTime = 30000 //set paramaters var paramsTemplate = { "method" : "post", "headers" : { "x-api-user" : habId, "x-api-key" : habToken } } var params = paramsTemplate; for (var i = 0; i < ntimes; i++) { UrlFetchApp.fetch(url, params) Utilities.sleep(sleepTime);// pause in the loop for 30000 milliseconds (30 seconds); this is to avoid the servers being overloaded } }
- Save the script.
- From the menu, choose Run → Run function → bulkAttackBoss.