{"action":"created","comment":{"url":"https://api.github.com/repos/runelite/runelite/pulls/comments/183583872","pull_request_review_id":114608836,"id":183583872,"diff_hunk":"@@ -99,48 +104,119 @@ else if (event.getKey().equals(\"showEssence\"))\n \t\t\t{\n \t\t\t\thasSentEssenceMsg = false;\n \t\t\t}\n+\t\t\telse if (event.getKey().equals(\"showSand\"))\n+\t\t\t{\n+\t\t\t\thasSentSandMsg = false;\n+\t\t\t}\n+\t\t\telse if (event.getKey().equals(\"showEcto\"))\n+\t\t\t{\n+\t\t\t\thasSentEctoMsg = false;\n+\t\t\t}\n \t\t}\n \t}\n \n \t@Subscribe\n-\tpublic void onGameStateChanged(GameStateChanged event)\n+\tpublic void onVarbitChanged(VarbitChanged event)\n \t{\n-\t\tif (event.getGameState().equals(GameState.LOGGED_IN))\n+\t\tif (config.showHerbBoxes() && !hasSentHerbMsg && checkCanCollectHerbBox())\n \t\t{\n-\t\t\tif (config.showHerbBoxes() && !hasSentHerbMsg && checkCanCollectHerbBox())\n-\t\t\t{\n-\t\t\t\tsendChatMessage(\"You have herb boxes waiting to be collected at NMZ.\");\n-\t\t\t\thasSentHerbMsg = true;\n-\t\t\t}\n-\t\t\tif (config.showStaves() && !hasSentStavesMsg && checkCanCollectStaves())\n-\t\t\t{\n-\t\t\t\tsendChatMessage(\"You have staves waiting to be collected from Zaff.\");\n-\t\t\t\thasSentStavesMsg = true;\n-\t\t\t}\n-\t\t\tif (config.showEssence() && !hasSentEssenceMsg && checkCanCollectEssence())\n-\t\t\t{\n-\t\t\t\tsendChatMessage(\"You have pure essence waiting to be collected from Wizard Cromperty.\");\n-\t\t\t\thasSentEssenceMsg = true;\n-\t\t\t}\n+\t\t\tsendChatMessage(\"You have herb boxes waiting to be collected at NMZ.\");\n+\t\t\thasSentHerbMsg = true;\n+\t\t}\n+\n+\t\tif (config.showStaves() && !hasSentStavesMsg && checkCanCollectStaves())\n+\t\t{\n+\t\t\tsendChatMessage(\"You have staves waiting to be collected from Zaff.\");\n+\t\t\thasSentStavesMsg = true;\n+\t\t}\n+\n+\t\tif (config.showEssence() && !hasSentEssenceMsg && checkCanCollectEssence())\n+\t\t{\n+\t\t\tsendChatMessage(\"You have pure essence waiting to be collected from Wizard Cromperty.\");\n+\t\t\thasSentEssenceMsg = true;\n+\t\t}\n+\n+\t\tif (config.showSand() && !hasSentSandMsg && checkCanCollectSand())\n+\t\t{\n+\t\t\tsendChatMessage(\"You have buckets of sand waiting to be collected from Bert.\");\n+\t\t\thasSentSandMsg = true;\n+\t\t}\n+\n+\t\tif (config.showEcto() && !hasSentEctoMsg && checkCanCollectEcto())\n+\t\t{\n+\t\t\tsendChatMessage(\"You have bonemeal and buckets of slime waiting to be collected from Robin.\");\n+\t\t\thasSentEctoMsg = true;\n \t\t}\n \t}\n \n \tprivate boolean checkCanCollectHerbBox()\n \t{\n \t\tint value = client.getSetting(Varbits.DAILY_HERB_BOX);\n-\t\treturn value < 15; // < 15 can claim\n+\t\treturn prevHerbVarbVal == value ? (prevHerbVarbVal = value) < 15 : false;\n \t}\n \n \tprivate boolean checkCanCollectStaves()\n \t{\n-\t\tint value = client.getSetting(Varbits.DAILY_STAVES);\n-\t\treturn value == 0; // 1 = can't claim\n+\t\tif (didCompleteDiaries(Varbits.DIARY_VARROCK_EASY, Varbits.DIARY_VARROCK_MEDIUM, Varbits.DIARY_VARROCK_HARD, Varbits.DIARY_VARROCK_ELITE))\n+\t\t{\n+\t\t\tint value = client.getSetting(Varbits.DAILY_STAVES);\n+\t\t\treturn prevStavesVarbVal == value ? (prevStavesVarbVal = value) == 0 : false;\n+\t\t}\n+\t\treturn false;\n \t}\n \n \tprivate boolean checkCanCollectEssence()\n \t{\n-\t\tint value = client.getSetting(Varbits.DAILY_ESSENCE);\n-\t\treturn value == 0; // 1 = can't claim\n+\t\tif (didCompleteDiaries(Varbits.DIARY_ARDOUGNE_EASY, Varbits.DIARY_ARDOUGNE_MEDIUM, Varbits.DIARY_ARDOUGNE_HARD, Varbits.DIARY_ARDOUGNE_ELITE))\n+\t\t{\n+\t\t\tint value = client.getSetting(Varbits.DAILY_ESSENCE);\n+\t\t\treturn prevEssVarbVal == value ? (prevEssVarbVal = value) == 0 : false;\n+\t\t}\n+\t\treturn false;\n+\t}\n+\n+\tprivate boolean checkCanCollectSand()\n+\t{\n+\t\tif (client.getSetting(Varbits.QUEST_A_HAND_IN_THE_SAND) == 160 && !FREE_TO_PLAY_WORLDS.contains(client.getWorld()))","path":"runelite-client/src/main/java/net/runelite/client/plugins/dailytaskindicators/DailyTasksPlugin.java","position":163,"original_position":163,"commit_id":"9fe7b5640db48f22f900ae2ba316c2810871d059","original_commit_id":"9fe7b5640db48f22f900ae2ba316c2810871d059","user":{"login":"Kamielvf","id":35824069,"avatar_url":"https://avatars2.githubusercontent.com/u/35824069?v=4","gravatar_id":"","url":"https://api.github.com/users/Kamielvf","html_url":"https://github.com/Kamielvf","followers_url":"https://api.github.com/users/Kamielvf/followers","following_url":"https://api.github.com/users/Kamielvf/following{/other_user}","gists_url":"https://api.github.com/users/Kamielvf/gists{/gist_id}","starred_url":"https://api.github.com/users/Kamielvf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kamielvf/subscriptions","organizations_url":"https://api.github.com/users/Kamielvf/orgs","repos_url":"https://api.github.com/users/Kamielvf/repos","events_url":"https://api.github.com/users/Kamielvf/events{/privacy}","received_events_url":"https://api.github.com/users/Kamielvf/received_events","type":"User","site_admin":false},"body":"Completing the ardy elite diaries makes buckets of sand be automatically delivered to your bank, so this notification has no use at that point.","created_at":"2018-04-24T01:39:33Z","updated_at":"2018-04-24T01:39:33Z","html_url":"https://github.com/runelite/runelite/pull/1129#discussion_r183583872","pull_request_url":"https://api.github.com/repos/runelite/runelite/pulls/1129","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/runelite/runelite/pulls/comments/183583872"},"html":{"href":"https://github.com/runelite/runelite/pull/1129#discussion_r183583872"},"pull_request":{"href":"https://api.github.com/repos/runelite/runelite/pulls/1129"}}},"pull_request":{"url":"https://api.github.com/repos/runelite/runelite/pulls/1129","id":177539102,"html_url":"https://github.com/runelite/runelite/pull/1129","diff_url":"https://github.com/runelite/runelite/pull/1129.diff","patch_url":"https://github.com/runelite/runelite/pull/1129.patch","issue_url":"https://api.github.com/repos/runelite/runelite/issues/1129","number":1129,"state":"open","locked":false,"title":" Change Event Handling & Added Diary Checking to Daily Task Plugin","user":{"login":"Infinitay","id":6964154,"avatar_url":"https://avatars1.githubusercontent.com/u/6964154?v=4","gravatar_id":"","url":"https://api.github.com/users/Infinitay","html_url":"https://github.com/Infinitay","followers_url":"https://api.github.com/users/Infinitay/followers","following_url":"https://api.github.com/users/Infinitay/following{/other_user}","gists_url":"https://api.github.com/users/Infinitay/gists{/gist_id}","starred_url":"https://api.github.com/users/Infinitay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Infinitay/subscriptions","organizations_url":"https://api.github.com/users/Infinitay/orgs","repos_url":"https://api.github.com/users/Infinitay/repos","events_url":"https://api.github.com/users/Infinitay/events{/privacy}","received_events_url":"https://api.github.com/users/Infinitay/received_events","type":"User","site_admin":false},"body":"Overview:\r\n\r\n- Changed from onGameStateChanged -> onVarbitChanged\r\n- Added `didCompleteDiaries` method to help check if a player has completed the diaries in the first place\r\n- Added _A Hand in the Sand_ Quest's varbit to `Varbits.java`","created_at":"2018-03-26T19:06:52Z","updated_at":"2018-04-24T01:39:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"322a91ee43686099b2acff81e132ce8a4cf39bc0","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":366780282,"url":"https://api.github.com/repos/runelite/runelite/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"milestone":null,"commits_url":"https://api.github.com/repos/runelite/runelite/pulls/1129/commits","review_comments_url":"https://api.github.com/repos/runelite/runelite/pulls/1129/comments","review_comment_url":"https://api.github.com/repos/runelite/runelite/pulls/comments{/number}","comments_url":"https://api.github.com/repos/runelite/runelite/issues/1129/comments","statuses_url":"https://api.github.com/repos/runelite/runelite/statuses/9fe7b5640db48f22f900ae2ba316c2810871d059","head":{"label":"Infinitay:fix-daily-tasks","ref":"fix-daily-tasks","sha":"9fe7b5640db48f22f900ae2ba316c2810871d059","user":{"login":"Infinitay","id":6964154,"avatar_url":"https://avatars1.githubusercontent.com/u/6964154?v=4","gravatar_id":"","url":"https://api.github.com/users/Infinitay","html_url":"https://github.com/Infinitay","followers_url":"https://api.github.com/users/Infinitay/followers","following_url":"https://api.github.com/users/Infinitay/following{/other_user}","gists_url":"https://api.github.com/users/Infinitay/gists{/gist_id}","starred_url":"https://api.github.com/users/Infinitay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Infinitay/subscriptions","organizations_url":"https://api.github.com/users/Infinitay/orgs","repos_url":"https://api.github.com/users/Infinitay/repos","events_url":"https://api.github.com/users/Infinitay/events{/privacy}","received_events_url":"https://api.github.com/users/Infinitay/received_events","type":"User","site_admin":false},"repo":{"id":124153461,"name":"runelite","full_name":"Infinitay/runelite","owner":{"login":"Infinitay","id":6964154,"avatar_url":"https://avatars1.githubusercontent.com/u/6964154?v=4","gravatar_id":"","url":"https://api.github.com/users/Infinitay","html_url":"https://github.com/Infinitay","followers_url":"https://api.github.com/users/Infinitay/followers","following_url":"https://api.github.com/users/Infinitay/following{/other_user}","gists_url":"https://api.github.com/users/Infinitay/gists{/gist_id}","starred_url":"https://api.github.com/users/Infinitay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Infinitay/subscriptions","organizations_url":"https://api.github.com/users/Infinitay/orgs","repos_url":"https://api.github.com/users/Infinitay/repos","events_url":"https://api.github.com/users/Infinitay/events{/privacy}","received_events_url":"https://api.github.com/users/Infinitay/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Infinitay/runelite","description":"Open source Old School RuneScape client","fork":true,"url":"https://api.github.com/repos/Infinitay/runelite","forks_url":"https://api.github.com/repos/Infinitay/runelite/forks","keys_url":"https://api.github.com/repos/Infinitay/runelite/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Infinitay/runelite/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Infinitay/runelite/teams","hooks_url":"https://api.github.com/repos/Infinitay/runelite/hooks","issue_events_url":"https://api.github.com/repos/Infinitay/runelite/issues/events{/number}","events_url":"https://api.github.com/repos/Infinitay/runelite/events","assignees_url":"https://api.github.com/repos/Infinitay/runelite/assignees{/user}","branches_url":"https://api.github.com/repos/Infinitay/runelite/branches{/branch}","tags_url":"https://api.github.com/repos/Infinitay/runelite/tags","blobs_url":"https://api.github.com/repos/Infinitay/runelite/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Infinitay/runelite/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Infinitay/runelite/git/refs{/sha}","trees_url":"https://api.github.com/repos/Infinitay/runelite/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Infinitay/runelite/statuses/{sha}","languages_url":"https://api.github.com/repos/Infinitay/runelite/languages","stargazers_url":"https://api.github.com/repos/Infinitay/runelite/stargazers","contributors_url":"https://api.github.com/repos/Infinitay/runelite/contributors","subscribers_url":"https://api.github.com/repos/Infinitay/runelite/subscribers","subscription_url":"https://api.github.com/repos/Infinitay/runelite/subscription","commits_url":"https://api.github.com/repos/Infinitay/runelite/commits{/sha}","git_commits_url":"https://api.github.com/repos/Infinitay/runelite/git/commits{/sha}","comments_url":"https://api.github.com/repos/Infinitay/runelite/comments{/number}","issue_comment_url":"https://api.github.com/repos/Infinitay/runelite/issues/comments{/number}","contents_url":"https://api.github.com/repos/Infinitay/runelite/contents/{+path}","compare_url":"https://api.github.com/repos/Infinitay/runelite/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Infinitay/runelite/merges","archive_url":"https://api.github.com/repos/Infinitay/runelite/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Infinitay/runelite/downloads","issues_url":"https://api.github.com/repos/Infinitay/runelite/issues{/number}","pulls_url":"https://api.github.com/repos/Infinitay/runelite/pulls{/number}","milestones_url":"https://api.github.com/repos/Infinitay/runelite/milestones{/number}","notifications_url":"https://api.github.com/repos/Infinitay/runelite/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Infinitay/runelite/labels{/name}","releases_url":"https://api.github.com/repos/Infinitay/runelite/releases{/id}","deployments_url":"https://api.github.com/repos/Infinitay/runelite/deployments","created_at":"2018-03-06T23:56:17Z","updated_at":"2018-04-24T00:18:43Z","pushed_at":"2018-04-24T00:42:04Z","git_url":"git://github.com/Infinitay/runelite.git","ssh_url":"git@github.com:Infinitay/runelite.git","clone_url":"https://github.com/Infinitay/runelite.git","svn_url":"https://github.com/Infinitay/runelite","homepage":"https://runelite.net","size":37807,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"bsd-2-clause","name":"BSD 2-Clause \"Simplified\" License","spdx_id":"BSD-2-Clause","url":"https://api.github.com/licenses/bsd-2-clause"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"runelite:master","ref":"master","sha":"f94efc6f55f392b9dc6a104e04cbf5c8f0dec5d2","user":{"login":"runelite","id":13814776,"avatar_url":"https://avatars1.githubusercontent.com/u/13814776?v=4","gravatar_id":"","url":"https://api.github.com/users/runelite","html_url":"https://github.com/runelite","followers_url":"https://api.github.com/users/runelite/followers","following_url":"https://api.github.com/users/runelite/following{/other_user}","gists_url":"https://api.github.com/users/runelite/gists{/gist_id}","starred_url":"https://api.github.com/users/runelite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/runelite/subscriptions","organizations_url":"https://api.github.com/users/runelite/orgs","repos_url":"https://api.github.com/users/runelite/repos","events_url":"https://api.github.com/users/runelite/events{/privacy}","received_events_url":"https://api.github.com/users/runelite/received_events","type":"Organization","site_admin":false},"repo":{"id":57461213,"name":"runelite","full_name":"runelite/runelite","owner":{"login":"runelite","id":13814776,"avatar_url":"https://avatars1.githubusercontent.com/u/13814776?v=4","gravatar_id":"","url":"https://api.github.com/users/runelite","html_url":"https://github.com/runelite","followers_url":"https://api.github.com/users/runelite/followers","following_url":"https://api.github.com/users/runelite/following{/other_user}","gists_url":"https://api.github.com/users/runelite/gists{/gist_id}","starred_url":"https://api.github.com/users/runelite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/runelite/subscriptions","organizations_url":"https://api.github.com/users/runelite/orgs","repos_url":"https://api.github.com/users/runelite/repos","events_url":"https://api.github.com/users/runelite/events{/privacy}","received_events_url":"https://api.github.com/users/runelite/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/runelite/runelite","description":"Open source Old School RuneScape client","fork":false,"url":"https://api.github.com/repos/runelite/runelite","forks_url":"https://api.github.com/repos/runelite/runelite/forks","keys_url":"https://api.github.com/repos/runelite/runelite/keys{/key_id}","collaborators_url":"https://api.github.com/repos/runelite/runelite/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/runelite/runelite/teams","hooks_url":"https://api.github.com/repos/runelite/runelite/hooks","issue_events_url":"https://api.github.com/repos/runelite/runelite/issues/events{/number}","events_url":"https://api.github.com/repos/runelite/runelite/events","assignees_url":"https://api.github.com/repos/runelite/runelite/assignees{/user}","branches_url":"https://api.github.com/repos/runelite/runelite/branches{/branch}","tags_url":"https://api.github.com/repos/runelite/runelite/tags","blobs_url":"https://api.github.com/repos/runelite/runelite/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/runelite/runelite/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/runelite/runelite/git/refs{/sha}","trees_url":"https://api.github.com/repos/runelite/runelite/git/trees{/sha}","statuses_url":"https://api.github.com/repos/runelite/runelite/statuses/{sha}","languages_url":"https://api.github.com/repos/runelite/runelite/languages","stargazers_url":"https://api.github.com/repos/runelite/runelite/stargazers","contributors_url":"https://api.github.com/repos/runelite/runelite/contributors","subscribers_url":"https://api.github.com/repos/runelite/runelite/subscribers","subscription_url":"https://api.github.com/repos/runelite/runelite/subscription","commits_url":"https://api.github.com/repos/runelite/runelite/commits{/sha}","git_commits_url":"https://api.github.com/repos/runelite/runelite/git/commits{/sha}","comments_url":"https://api.github.com/repos/runelite/runelite/comments{/number}","issue_comment_url":"https://api.github.com/repos/runelite/runelite/issues/comments{/number}","contents_url":"https://api.github.com/repos/runelite/runelite/contents/{+path}","compare_url":"https://api.github.com/repos/runelite/runelite/compare/{base}...{head}","merges_url":"https://api.github.com/repos/runelite/runelite/merges","archive_url":"https://api.github.com/repos/runelite/runelite/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/runelite/runelite/downloads","issues_url":"https://api.github.com/repos/runelite/runelite/issues{/number}","pulls_url":"https://api.github.com/repos/runelite/runelite/pulls{/number}","milestones_url":"https://api.github.com/repos/runelite/runelite/milestones{/number}","notifications_url":"https://api.github.com/repos/runelite/runelite/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/runelite/runelite/labels{/name}","releases_url":"https://api.github.com/repos/runelite/runelite/releases{/id}","deployments_url":"https://api.github.com/repos/runelite/runelite/deployments","created_at":"2016-04-30T20:48:02Z","updated_at":"2018-04-23T23:40:48Z","pushed_at":"2018-04-24T01:07:52Z","git_url":"git://github.com/runelite/runelite.git","ssh_url":"git@github.com:runelite/runelite.git","clone_url":"https://github.com/runelite/runelite.git","svn_url":"https://github.com/runelite/runelite","homepage":"https://runelite.net","size":37834,"stargazers_count":377,"watchers_count":377,"language":"Java","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":278,"mirror_url":null,"archived":false,"open_issues_count":495,"license":{"key":"bsd-2-clause","name":"BSD 2-Clause \"Simplified\" License","spdx_id":"BSD-2-Clause","url":"https://api.github.com/licenses/bsd-2-clause"},"forks":278,"open_issues":495,"watchers":377,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/runelite/runelite/pulls/1129"},"html":{"href":"https://github.com/runelite/runelite/pull/1129"},"issue":{"href":"https://api.github.com/repos/runelite/runelite/issues/1129"},"comments":{"href":"https://api.github.com/repos/runelite/runelite/issues/1129/comments"},"review_comments":{"href":"https://api.github.com/repos/runelite/runelite/pulls/1129/comments"},"review_comment":{"href":"https://api.github.com/repos/runelite/runelite/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/runelite/runelite/pulls/1129/commits"},"statuses":{"href":"https://api.github.com/repos/runelite/runelite/statuses/9fe7b5640db48f22f900ae2ba316c2810871d059"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Kamielvf"}}