Created
September 20, 2015 20:08
-
-
Save RedHatter/cdb1d15331b725619d62 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 Egg Napper | |
// @namespace idioticdev.com | |
// @include http*://dragcave.net/locations/* | |
// @grant none | |
// @version 1 | |
// ==/UserScript== | |
var SCROLL = true; | |
var ONLY_RARES = false; | |
var found = false; | |
function s(x) | |
{ | |
var eggs = document.getElementsByClassName("eggs")[0]; | |
if (eggs) | |
{ | |
var snapResults = document.evaluate("div/a[following-sibling::text()[contains(.,\""+x+"\")]]", eggs, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); | |
for (var i = snapResults.snapshotLength - 1; i >= 0; i--) { | |
var elm = snapResults.snapshotItem(i); | |
found = true; | |
//window.location.href = elm.href; | |
elm.click (); | |
} | |
} | |
} | |
//Rares | |
s("This egg is soft and smells uncannily like cheese"); | |
s("This egg is very reflective, almost metallic looking"); | |
s("This egg gives off a beautiful glow"); | |
s("This egg looks like it doesn't belong"); | |
s("This egg is tiny and made out of several pieces of paper folded together"); | |
s("This egg is much smaller than the others"); | |
s("This egg has icicles forming on it"); | |
s("This egg is almost too hot to touch"); | |
s("Whenever you go near this egg your hair stands on end"); | |
s("Oh my. There is a Leetle Tree among the eggs"); | |
s("This egg has a faint green glow around it"); | |
s("This egg shimmers like gold"); | |
s("Mana courses throughout this glassy egg."); | |
s("This egg smells faintly like brine."); | |
s("This egg feels like polished stone."); | |
s("This egg gleams with a reddish shine."); | |
s("This egg looks like it doesn't belong; it is brightly colored with white spots. It's much lighter than the other eggs."); | |
//s("This egg displays the colors of both dawn and dusk."); | |
if (!ONLY_RARES) | |
{ | |
// Common | |
//s("This egg has strange markings on it."); | |
s("This egg smells rather rancid."); | |
s("This egg is unusually large and heavy."); | |
s("This egg has a black cap."); | |
s("This delicately patterned egg is sitting in the sunshine."); | |
s("This egg makes you feel a bit uneasy."); | |
s("This pink and red egg wobbles occasionally."); | |
s("This egg glitters oddly in the light."); | |
s("Frost is creeping over this cold egg."); | |
s("This striped egg feels moist."); | |
s("This egg is speckled with rosette-like markings."); | |
s("The surface of this egg is rough and sharp."); | |
s("This egg is encrusted with colorful gemstones."); | |
s("Cold flames dance across the surface of this egg."); | |
s("This egg is patterned with an orange flare."); | |
s("This egg is hidden by some leaves."); | |
s("This egg shines brilliantly in moonlight, and is covered in red spots."); | |
s("This egg is off-white in color and smells a bit like salt."); | |
s("This egg has a faintly exotic scent."); | |
s("There is a thin layer of moisture coating this egg."); | |
s("The air shimmers around this egg, as if from heat."); | |
s("This egg is rocking back and forth in a puddle, creating small waves."); | |
s("This opalescent egg shimmers in the moonlight."); | |
//s("This egg is glowing as brightly as the sun."); | |
//s("This egg has brightly colored markings on it."); | |
s("This egg glows from within."); | |
s("This egg is so tiny you almost didn't see it."); | |
s("This egg feels like polished stone."); | |
s("This egg is wet from the waves and has bright red stripes."); | |
s("This massive egg is covered with thick plates."); | |
s("This egg smells musty, like rotting leaves."); | |
s("This dull purple egg has two bright stripes on it."); | |
s("This egg resembles a glowing stone."); | |
s("You hear strange noises coming from inside this egg."); | |
s("This egg is hidden in the trees."); | |
s("A small puddle of condensation has collected under this egg."); | |
} | |
if (!found) | |
{ | |
if (SCROLL) | |
{ | |
var next = parseInt(window.location.href.charAt(window.location.href.length-1))+1; | |
next = (next <= 6) ? next : 1; | |
window.location.href = "http://dragcave.net/locations/"+next; | |
} | |
else | |
{ | |
window.location.reload(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The script doesn't seem to work now, I've seen it pass through a listed egg without grabbing it.