Talk:Tasker-habitrpg

This article is how to use tasker-habitrpg to automatic scoring tasks on android devices.

And sorry for my poor English. XD

1. Prerequisite

Tasker Android APP

Tasker-habitrpg Javascripts

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
 * 1) Install Tasker on your device.
 * 2) Download Tasker-habitrpg Javascripts and Tasker Task files.
 * 3) Read the Instructions for using Tasker-habitrpg.
 * 4) 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.
 * 5) Save this file.
 * 6) Make new directory on your android device ( from native file explorer or 3rd party file manager), /sdcard/Tasker/Javascript.
 * 7) Copy the file (HabitRPGfns.js) you edited before to your device (/sdcard/Tasker/Javascript).
 * 8) Now we need to build up our Tasker rules.
 * 9) Habits/Dailys/To-Dos id fetch: Login to your habitrpg web site from google chrome or firefox.
 * 10) When at Task Page, Press F12 (Chrome) or Ctrl+Shift+I to Debug mode.
 * 11) Press sync button from your habitrpg web site.
 * 12) (The Pictures.)Image_1.png
 * 13) You will see the Debug windows has data.
 * 14) Drill down the "batch-update....", you will see the data.
 * 15) "habits" has your habits list, "dailys" has your dailys list, and so on.
 * 16) Find you want to score tasks, and get the id.Image_2.png
 * 17) Now we can setup the Tasker.
 * 18) First at Profile we add Application Profile.
 * 19) Select Ingress and the create task.
 * 20) This task has 4 parts to be done.
 * 21) Use Function: score_task: Add/Variables/Variables Set, Name:%operation, To score_task.
 * 22) 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".
 * 23) Set Task id you want to score: Add/Variables/Variables Set, Name:%taskid, To: the string you get at 16.
 * 24) Score: Add/Variables/Variables Set, Name:%direction, To: up/down.
 * 25) Javascript: Code/Javascript Path: /sdcard/Tasker/Javascript/HabitRPGfns.js.
 * 26) If you want to get notify, you can set notify after these 4 parts.
 * 27) You will set the Tasker like this.Screenshot_2015-07-29-17-09-27.png
 * 28) Enable This Task.
 * 29) You will find when you open Ingress APP, You will score up  "玩 Ingress".
 * 30) You can use Tasker to do more things with this JavaScript.Sujunmin (talk) 09:19, July 29, 2015 (UTC)