This article is how to use tasker-habitrpg to automatic scoring tasks on android devices.
And sorry for my poor English. XD
1. Prerequisite
2. Requirements
When I use Ingress APP, The Habits "玩 Ingress" (It means Play Ingress XD) will be scored up.
(You can change the requirements for your own.)
3. Instructions
- Install Tasker on your device.
- Download Tasker-habitrpg Javascripts and Tasker Task files.
- Read the Instructions for using Tasker-habitrpg.
- Edit the HabitRPGfns.js the second and the third lines, replace the # to your UserId and API Token, and uncomment (remove the first //) these 2 lines.
- Save this file.
- Make new directory on your android device ( from native file explorer or 3rd party file manager), /sdcard/Tasker/Javascript.
- Copy the file (HabitRPGfns.js) you edited before to your device (/sdcard/Tasker/Javascript).
- Now we need to build up our Tasker rules.
- Habits/Dailys/To-Dos id fetch: Login to your habitrpg web site from google chrome or firefox.
- When at Task Page, Press F12 (Chrome) or Ctrl+Shift+I to Debug mode.
- Press sync button from your habitrpg web site.
- (The Pictures.)

- You will see the Debug windows has data.
- Drill down the "batch-update....", you will see the data.
- "habits" has your habits list, "dailys" has your dailys list, and so on.
- Find you want to score tasks, and get the id.
- Now we can setup the Tasker.
- First at Profile we add Application Profile.
- Select Ingress and the create task.
- This task has 4 parts to be done.
- Use Function: score_task: Add/Variables/Variables Set, Name:%operation, To score_task.
- The Functions you can use are in HabitRPGfns.js, all you have to do is find the function name you want to use and put the name to "To".
- Set Task id you want to score: Add/Variables/Variables Set, Name:%taskid, To: the string you get at 16.
- Score: Add/Variables/Variables Set, Name:%direction, To: up/down.
- Javascript: Code/Javascript Path: /sdcard/Tasker/Javascript/HabitRPGfns.js.
- If you want to get notify, you can set notify after these 4 parts.
- You will set the Tasker like this.
- Enable This Task.
- You will find when you open Ingress APP, You will score up "玩 Ingress".
- You can use Tasker to do more things with this JavaScript.
- Sujunmin (talk) 09:19, July 29, 2015 (UTC)