Created
October 10, 2017 02:32
-
-
Save undergroundmonorail/307f746e7d600b12137aa9ebcec0d278 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Lunar Puzzle Solver | |
// @namespace http://reddit.com/u/undergroundmonorail | |
// @version 0.1 | |
// @description Find the correct solution for the Shenkuu Lunar Temple | |
// @author monorail | |
// @match http://www.neopets.com/shenkuu/lunar/?show=puzzle | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
var angle = new URLSearchParams($("embed")[0].src).get("angleKreludor"); | |
var phase = Math.round(angle / 22.5); | |
var answer = ((phase % 16) + 8) % 16; | |
var table = $("#content > table > tbody > tr > td.content > div:nth-child(2) > form > table").children()[0]; | |
var row = answer > 7 ? 1 : 0; | |
var column = answer % 8; | |
table.rows[row].cells[column].style.backgroundColor = "red"; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment